:: com :: sun :: star :: frame ::

interface XStorable
Base Hierarchy
::com::sun::star::uno::XInterface
 |
 +-XStorable
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.
Developers Guide
9.2.2 Drawing Documents and Presentation Documents - Handling Drawing Document Files - Saving Drawing Documents - Storing
6.1.5 Office Development - OpenOffice.org Application Environment - Handling Documents - Storing Documents
8.2.2 Spreadsheet Documents - Handling Spreadsheet Document Files - Saving Spreadsheet Documents - Storing
7.2.2 Text Documents - Handling Text Document Files - Saving Text Documents - Storing

Methods' Summary
hasLocation The object may know the location because it was loaded from there, or because it is stored there.
getLocation After XStorable::storeAsURL() it returns the URL the object was stored to.
isReadonly It is not possible to call XStorable::store() successfully when the data store is read-only.
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.
Methods' Details
hasLocation
boolean
hasLocation();
 
 

Description
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
getLocation
string
getLocation();
 
 

Description
After XStorable::storeAsURL() it returns the URL the object was stored to.
Returns
the URL of the resource which is represented by this object.
isReadonly
boolean
isReadonly();
 
 

Description
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 );

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

Only objects which know their locations can be stored.

Throws
com::sun::star::io::IOException if an IO error occured during save operation (may the location is unknown)
See also
XStorable::storeAsURL
See also
XStorable::storeToURL
storeAsURL
void
storeAsURL(
 
[in] string
[in] sequence< ::com::sun::star::beans::PropertyValue

raises(

 
sURL,
lArguments ) 
::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.

Parameter sURL
specifies the new location of this component
Parameter lArguments
optional parameters for saving (see ::com::sun::star::document::MediaDescriptor for further details)
Throws
com::sun::star::io::IOException if an IO error occured during save operation (may the location is unknown)
See also
XStorable::store
See also
XStorable::storeToURL
See also
MediaDescriptor
storeToURL
void
storeToURL(
 
[in] string
[in] sequence< ::com::sun::star::beans::PropertyValue

raises(

 
sURL,
lArguments ) 
::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.

Throws
com::sun::star::io::IOException if an IO error occured during save operation (may the location is unknown)
See also
XStorable::store
See also
XStorable::storeAsURL
See also
MediaDescriptor
Top of Page