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

is used to access named objects within a container. More...

import"XNameAccess.idl";

Inheritance diagram for XNameAccess:
XElementAccess XInterface HierarchyAccess SimpleSetAccess XNameReplace ExtendedTypeDetectionFactory FilterFactory LinkTargets TypeDetection LayerManager XStorage Bibliography Settings theUICommandDescription UICommandDescription XLoaderFactory XGalleryThemeProvider XZipFileAccess2 XLibraryContainer DatabaseAccessContext DefinitionContainer XDatabaseContext Container DataPilotFieldGroup DataPilotFieldGroups DataPilotFields DataPilotItems DataPilotSourceDimensions DataPilotSourceHierarchies DataPilotSourceLevels DDELinks FunctionDescriptions SheetLinks TableConditionalFormat XDatabaseRanges XDataPilotTables XDDELinks XExternalDocLink XExternalDocLinks XMembersAccess XNamedRanges XScenarios StyleFamilies StyleFamily XAutoStyles TableColumns XTableCharts XTablePivotCharts Bookmarks DocumentIndexes ReferenceMarks TextContentCollection TextEmbeddedObjects TextFieldMasters TextFrames TextGraphicObjects TextSections TextTables XAutoTextContainer XAutoTextGroup HierarchyDataReadAccess PropertySetRegistry ModuleUICategoryDescription ModuleUICommandDescription theUICategoryDescription theWindowStateConfiguration UICategoryDescription WindowStateConfiguration XDecks XPanels XDataTypeRepository

Public Member Functions

any getByName ([in] string aName) raises ( com::sun::star::container::NoSuchElementException, com::sun::star::lang::WrappedTargetException )
 
sequence< string > getElementNames ()
 
boolean hasByName ([in] string aName)
 
- Public Member Functions inherited from XElementAccess
type getElementType ()
 
boolean hasElements ()
 
- 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

is used to access named objects within a container.

To implement inaccurate name access, support the com::sun::star::beans::XExactName interface.

See also
com::sun::star::beans::XExactName
Developers Guide
Professional UNO - Collections and Containers

Member Function Documentation

◆ getByName()

Returns
the object with the specified name.
Parameters
aNamethe name of the object.
Exceptions
NoSuchElementExceptionif an element under Name does not exist.
com::sun::star::lang::WrappedTargetExceptionIf the implementation has internal reasons for exceptions, then wrap these in a com::sun::star::lang::WrappedTargetException exception.

◆ getElementNames()

sequence<string> getElementNames ( )
Returns
a sequence of all element names in this container.

The order of the names is not specified.

◆ hasByName()

boolean hasByName ( [in] string  aName)
Returns
TRUE if an element with this name is in the container, FALSE otherwise.

In many cases the next call is XNameAccess::getByName(). You should optimize this case.

Parameters
aNamethe name of the object.

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