LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XStorable Interface Referencepublished

offers a simple way to store a component to a URL. More...

import"XStorable.idl";

Inheritance diagram for XStorable:
XInterface OfficeDocument XStorable2 Dictionary GenericDrawingDocument OfficeDatabaseDocument SpreadsheetDocument GenericTextDocument DrawingDocument PresentationDocument GlobalDocument TextDocument WebDocument

Public Member Functions

boolean hasLocation ()
 The object may know the location because it was loaded from there, or because it is stored there. More...
 
string getLocation ()
 After XStorable::storeAsURL() it returns the URL the object was stored to. More...
 
boolean isReadonly ()
 It is not possible to call XStorable::store() successfully when the data store is read-only. More...
 
void store () raises ( com::sun::star::io::IOException )
 stores the data to the URL from which it was loaded. More...
 
void storeAsURL ([in] string sURL, [in] sequence< com::sun::star::beans::PropertyValue > lArguments) raises ( com::sun::star::io::IOException )
 stores the object's persistent data to a URL and makes this URL the new location of the object. More...
 
void storeToURL ([in] string sURL, [in] sequence< com::sun::star::beans::PropertyValue > lArguments) raises ( com::sun::star::io::IOException )
 stores the object's persistent data to a URL and continues to be a representation of the old URL. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

offers a simple way to store a component to a URL.

It is usually only useful for two cases:

  1. Large components which are wrapped up in UNO interfaces and for which distinct filters are not available separately as components.
  2. Very small components for which only one or very few hard coded file format filters make sense or even exist.
Developers Guide
Drawings and Presentations - Storing
Office Development - Storing Documents
Spreadsheet Documents - Saving Spreadsheet Documents - Storing
Text Documents - Saving Text Documents - Storing

Member Function Documentation

◆ getLocation()

string getLocation ( )

After XStorable::storeAsURL() it returns the URL the object was stored to.

Returns
the URL of the resource which is represented by this object.

◆ hasLocation()

boolean hasLocation ( )

The object may know the location because it was loaded from there, or because it is stored there.

Returns
TRUE if the object knows a location where it is persistent FALSE otherwise

◆ isReadonly()

boolean isReadonly ( )

It is not possible to call XStorable::store() successfully when the data store is read-only.

Returns
TRUE if the data store is readonly or opened readonly FALSE otherwise

◆ store()

void store ( )
raises (com::sun::star::io::IOException
)

stores the data to the URL from which it was loaded.

Only objects which know their locations can be stored.

Exceptions
com::sun::star::io::IOExceptionif an IO error occurred during save operation (may the location is unknown)
See also
XStorable::storeAsURL
XStorable::storeToURL

◆ storeAsURL()

void storeAsURL ( [in] string  sURL,
[in] sequence< com::sun::star::beans::PropertyValue lArguments 
)
raises (com::sun::star::io::IOException
)

stores the object's persistent data to a URL and makes this URL the new location of the object.

This is the normal behavior for UI's "save-as" feature.

The change of the location makes it necessary to store the document in a format that the object can load. For this reason the implementation of XStorable::storeAsURL() will throw an exception if a pure export filter is used, it will accept only combined import/export filters. For such filters the method XStorable::storeToURL() must be used that does not change the location of the object.

Parameters
sURLspecifies the new location of this component
lArgumentsoptional parameters for saving (see com::sun::star::document::MediaDescriptor for further details)
Exceptions
com::sun::star::io::IOExceptionif an IO error occurred during save operation (may the location is unknown)
See also
XStorable::store
XStorable::storeToURL
com::sun::star::document::MediaDescriptor

◆ storeToURL()

void storeToURL ( [in] string  sURL,
[in] sequence< com::sun::star::beans::PropertyValue lArguments 
)
raises (com::sun::star::io::IOException
)

stores the object's persistent data to a URL and continues to be a representation of the old URL.

This is the normal behavior for UI's export feature.

This method accepts all kinds of export filters, not only combined import/export filters because it implements an exporting capability, not a persistence capability.

Exceptions
com::sun::star::io::IOExceptionif an IO error occurred during save operation (may the location is unknown)
Parameters
sURLspecifies the location where to store the object
lArgumentsoptional parameters for saving (see com::sun::star::document::MediaDescriptor for further details)
See also
XStorable::store
XStorable::storeAsURL
com::sun::star::document::MediaDescriptor

The documentation for this interface was generated from the following file: