1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
22 module com
{ module sun
{ module star
{ module frame
{
24 /** offers a simple way to store a component to a URL.
27 It is usually only useful for two cases:
31 Large components which are wrapped up in UNO interfaces
32 and for which distinct filters are not available separately as
36 Very small components for which only one or very few hard
37 coded file format filters make sense or even exist.
41 published
interface XStorable
: com
::sun
::star
::uno
::XInterface
43 /** The object may know the location because it was loaded from there,
44 or because it is stored there.
47 `TRUE` if the object knows a location where it is persistent
50 boolean hasLocation
();
52 /** After XStorable::storeAsURL() it returns the
53 URL the object was stored to.
56 the URL of the resource which is represented by this object.
60 /** It is not possible to call XStorable::store() successfully
61 when the data store is read-only.
64 `TRUE` if the data store is readonly or opened readonly
69 /** stores the data to the URL from which it was loaded.
71 <p>Only objects which know their locations can be stored.</p>
73 @throws com::sun::star::io::IOException
74 if an IO error occurred during save operation
75 (may the location is unknown)
77 @see XStorable::storeAsURL
78 @see XStorable::storeToURL
81 raises
( com
::sun
::star
::io
::IOException
);
83 /** stores the object's persistent data to a URL and
84 makes this URL the new location of the object.
86 <p>This is the normal behavior for UI's "save-as" feature.</p>
88 <p>The change of the location makes it necessary to store the document in
89 a format that the object can load. For this reason the implementation of
90 XStorable::storeAsURL() will throw an exception if a pure
91 export filter is used, it will accept only combined import/export filters.
92 For such filters the method XStorable::storeToURL()
93 must be used that does not change the location of the object.</p>
96 specifies the new location of this component
99 optional parameters for saving
100 (see com::sun::star::document::MediaDescriptor for further details)
102 @throws com::sun::star::io::IOException
103 if an IO error occurred during save operation
104 (may the location is unknown)
106 @see XStorable::store
107 @see XStorable::storeToURL
108 @see com::sun::star::document::MediaDescriptor
112 [in] sequence
<com
::sun
::star
::beans
::PropertyValue
> lArguments
)
113 raises
( com
::sun
::star
::io
::IOException
);
115 /** stores the object's persistent data to a URL and
116 continues to be a representation of the old URL.
118 <p>This is the normal behavior for UI's export feature.</p>
120 <p>This method accepts all kinds of export filters, not only combined
121 import/export filters because it implements an exporting capability, not a
122 persistence capability.</p>
124 @throws com::sun::star::io::IOException
125 if an IO error occurred during save operation
126 (may the location is unknown)
129 specifies the location where to store the object
132 optional parameters for saving
133 (see com::sun::star::document::MediaDescriptor for further details)
135 @see XStorable::store
136 @see XStorable::storeAsURL
137 @see com::sun::star::document::MediaDescriptor
141 [in] sequence
<com
::sun
::star
::beans
::PropertyValue
> lArguments
)
142 raises
( com
::sun
::star
::io
::IOException
);
148 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */