interface XStorable in module com::sun::star::frame::

(Global Index)

Syntax

interface XStorable : com::sun::star::uno::XInterface ;

Description

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

It is usually only useful for two cases:

  1. Large components which are wrapped with StarOne 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.

Method Summary

hasLocation

getLocation

isReadonly

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

storeAsURL stores the object's persistent data to a URL and lets the object become the representation of this new URL.

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

Known Services Which Export this Interface

com::sun::star::document::OfficeDocument

Method Details



hasLocation

Syntax

boolean hasLocation ();

Returns

true if the object knows a location where it is persistent.

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


getLocation

Syntax

string getLocation ();

Returns

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

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


isReadonly

Syntax

boolean isReadonly ();

Returns

true if the data store is readonly or opened readonly.

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


store

Syntax

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

Description

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

Only objects which know their locations can be stored.


storeAsURL

Syntax

void storeAsURL (
string aURL,
sequence< com::sun::star::beans::PropertyValue > aArgs )
raises ( com::sun::star::io::IOException );

Description

stores the object's persistent data to a URL and lets the object become the representation of this new URL.

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

The arguments depend on the object itself. Commonly used are:

string FilterName
The programmatic name of the file format filter to be used.
string FilterFlags
This string contains flags which depend on the filter. They describe how the data is to be stored. (E.g., the field delimitors for text database formats or the character set.)
boolean Overwrite
Overwrites the target file if it exists. Otherwise the call would result in an exception if the file exists.
string Password
This argument specifies the password to be used to encrypt the document.

See also

storeTo

See also

MediaDescriptor
for more information on values for aArgs .

storeToURL

Syntax

void storeToURL (
string aURL,
sequence< com::sun::star::beans::PropertyValue > aArgs )
raises ( com::sun::star::io::IOException );

Description

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.

See also

storeAs

See also

MediaDescriptor
for more information on values for aArgs .
Top of Page