1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: XUntitledNumbers.idl,v $
13 * This file is part of OpenOffice.org.
15 * OpenOffice.org is free software: you can redistribute it and/or modify
16 * it under the terms of the GNU Lesser General Public License version 3
17 * only, as published by the Free Software Foundation.
19 * OpenOffice.org is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU Lesser General Public License version 3 for more details
23 * (a copy is included in the LICENSE file that accompanied this code).
25 * You should have received a copy of the GNU Lesser General Public License
26 * version 3 along with OpenOffice.org. If not, see
27 * <http://www.openoffice.org/license.html>
28 * for a copy of the LGPLv3 License.
30 ************************************************************************/
31 #ifndef __com_sun_star_frame_XUntitledNumbers_idl__
32 #define __com_sun_star_frame_XUntitledNumbers_idl__
34 #ifndef __com_sun_star_uno_XInterface_idl__
35 #include
<com
/sun
/star
/uno
/XInterface.idl
>
38 #ifndef __com_sun_star_lang_IllegalArgumentException_idl__
39 #include
<com
/sun
/star
/lang
/IllegalArgumentException.idl
>
42 //=============================================================================
44 module com
{ module sun
{ module star
{ module frame
{
46 constants UntitledNumbersConst
48 const long INVALID_NUMBER
= 0;
51 //=============================================================================
52 /** knows all currently used and all free numbers for using with untitled
55 interface XUntitledNumbers
: com
::sun
::star
::uno
::XInterface
57 //-------------------------------------------------------------------------
58 /** calli has to lease a number befor he can use it within in its own title.
60 Such number must be freed after using e.g. while the object was closed or
61 get's another title (e.g. by saving a document to a real location on disc).
64 the component which has to be registered for the leased number.
66 @return the new number for these object or 0 if no further numbers are available.
68 @throws [IllegalArgumentException]
69 if an invalid object reference was provided to this method.
71 long leaseNumber
( [in] com
::sun
::star
::uno
::XInterface xComponent
)
72 raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
74 //-------------------------------------------------------------------------
75 /** has to be used to mark those number as "free for using".
77 If the reqistered component does not use such leased number any longer
78 it has to be released so it can be used for new components.
80 Note: calling this method with an unknown (but normaly valid number)
81 has to be ignored. No exceptions - no errors.
84 specify number for release.
86 @throws [IllegalArgumentException]
87 if the given number is the special value 0.
89 void releaseNumber
( [in] long nNumber
)
90 raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
92 //-------------------------------------------------------------------------
93 /** does the same then releaseNumber () but it searches the corresponding
94 number for the specified component and deregister it.
97 the component for deregistration.
99 @throws [IllegalArgumentException]
100 if an invalid object reference was provided to this method.
102 void releaseNumberForComponent
( [in] com
::sun
::star
::uno
::XInterface xComponent
)
103 raises
(com
::sun
::star
::lang
::IllegalArgumentException
);
105 //-------------------------------------------------------------------------
106 /** returns the localized string value to be used for untitles objects in
107 combination with the leased number.
109 Note: Such string already contains leading spaces/tabs etcpp. !
110 The only thing which an outside code has todo then ... adding a leased number
113 @return the localized string for untitled components.
115 string getUntitledPrefix
();
118 //=============================================================================