Overview | Module | Use | Devguide | Index

Methods' Summary | Attributes' Summary | Methods' Details | Attributes' Details

:: com :: sun :: star :: frame ::
unpublished | interface XUntitledNumbers |
Usage Restrictions not published Description knows all currently used and all free numbers for using with untitled but counted objects.

Methods' Summary
leaseNumber | callee has to lease a number before he can use it within in its own title. Such number must be freed after using e.g. while the object was closed or gets another title (e.g. by saving a document to a real location on disc).
releaseNumber | has to be used to mark those number as "free for using". If the registered component does not use such leased number any longer it has to be released so it can be used for new components. Note: calling this method with an unknown (but normally valid number) has to be ignored. No exceptions - no errors.
releaseNumberForComponent | does the same then releaseNumber () but it searches the corresponding number for the specified component and deregister it.
getUntitledPrefix | returns the localized string value to be used for untitled objects in combination with the leased number. Note: Such string already contains leading spaces/tabs etc. ! The only thing which an outside code has todo then ... adding a leased number to the string.

Methods' Details
leaseNumber
long
leaseNumber( | [in] ::com::sun::star::uno::XInterface | xComponent )
raises( | ::com::sun::star::lang::IllegalArgumentException );
Description callee has to lease a number before he can use it within in its own title. Such number must be freed after using e.g. while the object was closed or gets another title (e.g. by saving a document to a real location on disc). Parameter xComponent the component which has to be registered for the leased number. Returns the new number for these object or 0 if no further numbers are available. Throws [IllegalArgumentException] if an invalid object reference was provided to this method.
releaseNumber
void
releaseNumber( | [in] long | nNumber )
raises( | ::com::sun::star::lang::IllegalArgumentException );
Description has to be used to mark those number as "free for using". If the registered component does not use such leased number any longer it has to be released so it can be used for new components. Note: calling this method with an unknown (but normally valid number) has to be ignored. No exceptions - no errors. Parameter nNumber specify number for release. Throws [IllegalArgumentException] if the given number is the special value 0.
releaseNumberForComponent
void
releaseNumberForComponent( | [in] ::com::sun::star::uno::XInterface | xComponent )
raises( | ::com::sun::star::lang::IllegalArgumentException );
Description does the same then releaseNumber () but it searches the corresponding number for the specified component and deregister it. Parameter xComponent the component for deregistration. Throws [IllegalArgumentException] if an invalid object reference was provided to this method.
getUntitledPrefix
string
getUntitledPrefix();
Description returns the localized string value to be used for untitled objects in combination with the leased number. Note: Such string already contains leading spaces/tabs etc. ! The only thing which an outside code has todo then ... adding a leased number to the string. Returns the localized string for untitled components.

Top of Page

Copyright © 2000, 2014 LibreOffice contributors and/or their affiliates. All rights reserved.

LibreOffice was created by The Document Foundation, based on OpenOffice.org, which is Copyright 2000, 2010 Oracle and/or its affiliates.

The Document Foundation acknowledges all community members, please find more info at our website.

Privacy Policy | Impressum (Legal Info) | Copyright information: The source code of LibreOffice is licensed under the GNU Lesser General Public License (LGPLv3). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.