LibreOffice
LibreOffice 24.2 SDK API Reference
Public Member Functions | List of all members
XUntitledNumbers Interface Reference

knows all currently used and all free numbers for using with untitled but counted objects. More...

import"XUntitledNumbers.idl";

Inheritance diagram for XUntitledNumbers:
XInterface

Public Member Functions

long leaseNumber ([in] com::sun::star::uno::XInterface xComponent) raises (com::sun::star::lang::IllegalArgumentException)
 callee has to lease a number before he can use it within in its own title. More...
 
void releaseNumber ([in] long nNumber) raises (com::sun::star::lang::IllegalArgumentException)
 has to be used to mark those numbers as "free for using". More...
 
void releaseNumberForComponent ([in] com::sun::star::uno::XInterface xComponent) raises (com::sun::star::lang::IllegalArgumentException)
 does the same then releaseNumber () but it searches the corresponding number for the specified component and deregister it. More...
 
string getUntitledPrefix ()
 returns the localized string value to be used for untitled objects in combination with the leased number. More...
 
- Public Member Functions inherited from XInterface
any queryInterface ([in] type aType)
 queries for a new interface to an existing UNO object. More...
 
void acquire ()
 increases the reference counter by one. More...
 
void release ()
 decreases the reference counter by one. More...
 

Detailed Description

knows all currently used and all free numbers for using with untitled but counted objects.

Member Function Documentation

◆ getUntitledPrefix()

string 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.

Returns
the localized string for untitled components.

◆ 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).

Parameters
xComponentthe 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.
Exceptions
[IllegalArgumentException]if an invalid object reference was provided to this method.

◆ releaseNumber()

void releaseNumber ( [in] long  nNumber)
raises (com::sun::star::lang::IllegalArgumentException
)

has to be used to mark those numbers 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.

Parameters
nNumberspecify number for release.
Exceptions
[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
)

does the same then releaseNumber () but it searches the corresponding number for the specified component and deregister it.

Parameters
xComponentthe component for deregistration.
Exceptions
[IllegalArgumentException]if an invalid object reference was provided to this method.

The documentation for this interface was generated from the following file: