Language:

The Free and Open Productivity Suite
Apache OpenOffice 4.1.4 released

Developer's Guide

API

SDK

Tips 'n' Tricks

Miscellaneous


:: 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 calli has to lease a number befor he can use it within in its own title. Such number must be freed after using e.g. while the object was closed or get's 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 reqistered 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 normaly 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 untitles objects in combination with the leased number. Note: Such string already contains leading spaces/tabs etcpp. ! 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
calli has to lease a number befor he can use it within in its own title. Such number must be freed after using e.g. while the object was closed or get's 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 reqistered 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 normaly 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 untitles objects in combination with the leased number. Note: Such string already contains leading spaces/tabs etcpp. ! 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

Apache Software Foundation

Copyright & License | Privacy | Contact Us | Donate | Thanks

Apache and the Apache feather logo are trademarks of The Apache Software Foundation. OpenOffice, OpenOffice.org and the seagull logo are registered trademarks of The Apache Software Foundation. Other names appearing on the site may be trademarks of their respective owners.