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 .
21 #ifndef __com_sun_star_script_XStorageBasedLibraryContainer_idl__
22 #define __com_sun_star_script_XStorageBasedLibraryContainer_idl__
24 #include
<com
/sun
/star
/embed
/XStorage.idl
>
25 #include
<com
/sun
/star
/script
/XPersistentLibraryContainer.idl
>
28 module com
{ module sun
{ module star
{ module script
{
31 /** is the interface for an XLibraryContainer which can be made
32 persistent in an com::sun::star::embed::XStorage.
34 <p>A persistent library container is associated with a root storage. The
35 container is responsible for a particular sub storage of the root storage,
36 the container storage.</p>
40 interface XStorageBasedLibraryContainer
42 interface XPersistentLibraryContainer
;
44 /** denotes the root storage associated with the container.
46 <p>Effectively, this attribute is a typed version of
47 XPersistentLibraryContainer::RootLocation, it's guaranteed
48 that at every time, <code>XPersistentLibraryContainer::RootLocation</code> and
49 <code>RootStorage</code> have the same value.</p>
51 <p>You should only <em>set</em> this attribute to a new value if you previously
52 called storeLibrariesToStorage with the same storage. Setting this attribute
53 to a storage into which the container has not been stored previously might
54 result in unexpected behavior.</p>
56 [attribute
] ::com
::sun
::star
::embed
::XStorage RootStorage
58 set raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
);
61 /** stores the libraries to a storage other than the current container storage
63 <p>Note that the library container is not automatically associated with the
64 new root storage. Instead, you need to manually set the RootStorage
65 attribute afterwards. This separation allows for Save-To as well Save-As
69 denotes the root storage into which the libraries should be written, which
70 must not be `NULL`.<br/>
71 Note that the actual libraries are written into a sub storage of this
72 root storage, as usual.
74 @throws ::com::sun::star::lang::IllegalArgumentException
75 if the <code>RootStorage</code> parameter is `NULL`, or equals
78 @throws ::com::sun::star::lang::WrappedTargetException
79 if an error occurs during storing.
81 void storeLibrariesToStorage
( [in] ::com
::sun
::star
::embed
::XStorage RootStorage
)
82 raises
( ::com
::sun
::star
::lang
::IllegalArgumentException
, ::com
::sun
::star
::lang
::WrappedTargetException
);
91 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */