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 .
19 #ifndef __com_sun_star_frame_XStorable_idl__
20 #define __com_sun_star_frame_XStorable_idl__
22 #include
<com
/sun
/star
/uno
/XInterface.idl
>
23 #include
<com
/sun
/star
/io
/IOException.idl
>
24 #include
<com
/sun
/star
/beans
/PropertyValue.idl
>
28 module com
{ module sun
{ module star
{ module frame
{
30 /** offers a simple way to store a component to an URL.
33 It is usually only useful for two cases:
37 Large components which are wrapped up in UNO interfaces
38 and for which distinct filters are not available separately as
42 Very small components for which only one or very few hard
43 coded file format filters make sense or even exist.
47 published
interface XStorable
: com
::sun
::star
::uno
::XInterface
49 /** The object may know the location because it was loaded from there,
50 or because it is stored there.
53 `TRUE` if the object knows a location where it is persistent
56 boolean hasLocation
();
58 /** After XStorable::storeAsURL() it returns the
59 URL the object was stored to.
62 the URL of the resource which is represented by this object.
66 /** It is not possible to call XStorable::store() successfully
67 when the data store is read-only.
70 `TRUE` if the data store is readonly or opened readonly
75 /** stores the data to the URL from which it was loaded.
77 <p>Only objects which know their locations can be stored.</p>
79 @throws com::sun::star::io::IOException
80 if an IO error occurred during save operation
81 (may the location is unknown)
83 @see XStorable::storeAsURL
84 @see XStorable::storeToURL
87 raises
( com
::sun
::star
::io
::IOException
);
89 /** stores the object's persistent data to a URL and
90 makes this URL the new location of the object.
92 <p>This is the normal behavior for UI's "save-as" feature.</p>
94 <p>The change of the location makes it necessary to store the document in
95 a format that the object can load. For this reason the implementation of
96 XStorable::storeAsURL() will throw an exception if a pure
97 export filter is used, it will accept only combined import/export filters.
98 For such filters the method XStorable::storeToURL()
99 must be used that does not change the location of the object.</p>
102 specifies the new location of this component
105 optional parameters for saving
106 (see com::sun::star::document::MediaDescriptor for further details)
108 @throws com::sun::star::io::IOException
109 if an IO error occurred during save operation
110 (may the location is unknown)
112 @see XStorable::store
113 @see XStorable::storeToURL
114 @see com::sun::star::document::MediaDescriptor
118 [in] sequence
<com
::sun
::star
::beans
::PropertyValue
> lArguments
)
119 raises
( com
::sun
::star
::io
::IOException
);
121 /** stores the object's persistent data to a URL and
122 continues to be a representation of the old URL.
124 <p>This is the normal behavior for UI's export feature.</p>
126 <p>This method accepts all kinds of export filters, not only combined
127 import/export filters because it implements an exporting capability, not a
128 persistence capability.</p>
130 @throws com::sun::star::io::IOException
131 if an IO error occurred during save operation
132 (may the location is unknown)
135 specifies the location where to store the object
138 optional parameters for saving
139 (see com::sun::star::document::MediaDescriptor for further details)
141 @see XStorable::store
142 @see XStorable::storeAsURL
143 @see com::sun::star::document::MediaDescriptor
147 [in] sequence
<com
::sun
::star
::beans
::PropertyValue
> lArguments
)
148 raises
( com
::sun
::star
::io
::IOException
);
156 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */