LibreOffice Module sfx2 (master) 1
|
handles registration of XMetadatable. More...
Public Member Functions | |
XmlIdRegistry () | |
virtual css::uno::Reference< css::rdf::XMetadatable > | GetElementByMetadataReference (const css::beans::StringPair &i_rReference) const override |
get the ODF element with the given metadata reference. More... | |
virtual void | RegisterMetadatableAndCreateID (Metadatable &i_xObject)=0 |
register an ODF element at a newly generated, unique metadata reference. More... | |
virtual bool | TryRegisterMetadatable (Metadatable &i_xObject, OUString const &i_rStreamName, OUString const &i_rIdref)=0 |
try to register an ODF element at a given XML ID, or update its registration to a different XML ID. More... | |
virtual void | UnregisterMetadatable (Metadatable const &)=0 |
unregister an ODF element. More... | |
css::beans::StringPair | GetXmlIdForElement (Metadatable const &) const |
get the metadata reference for the given element. More... | |
virtual void | RemoveXmlIdForElement (Metadatable const &)=0 |
remove the metadata reference for the given element. More... | |
Public Member Functions inherited from sfx2::IXmlIdRegistry | |
virtual | ~IXmlIdRegistry () |
virtual css::uno::Reference< css::rdf::XMetadatable > | GetElementByMetadataReference (const css::beans::StringPair &i_rXmlId) const =0 |
Protected Member Functions | |
virtual bool | LookupXmlId (const Metadatable &i_xObject, OUString &o_rStream, OUString &o_rIdref) const =0 |
virtual Metadatable * | LookupElement (const OUString &i_rStreamName, const OUString &i_rIdref) const =0 |
handles registration of XMetadatable.
This class is responsible for guaranteeing that XMetadatable objects always have XML IDs that are unique within a stream.
This is an abstract base class; see subclasses XmlIdRegistryDocument and XmlIdRegistryClipboard.
Definition at line 143 of file Metadatable.cxx.
sfx2::XmlIdRegistry::XmlIdRegistry | ( | ) |
Definition at line 360 of file Metadatable.cxx.
|
overridevirtual |
get the ODF element with the given metadata reference.
Implements sfx2::IXmlIdRegistry.
Definition at line 365 of file Metadatable.cxx.
References LookupElement(), and pObject.
beans::StringPair sfx2::XmlIdRegistry::GetXmlIdForElement | ( | Metadatable const & | i_rObject | ) | const |
get the metadata reference for the given element.
Definition at line 374 of file Metadatable.cxx.
References LookupElement(), and LookupXmlId().
|
protectedpure virtual |
Referenced by GetElementByMetadataReference(), and GetXmlIdForElement().
|
protectedpure virtual |
Referenced by GetXmlIdForElement().
|
pure virtual |
register an ODF element at a newly generated, unique metadata reference.
Find a fresh XML ID, and register it for the element. The generated ID does not occur in any stream of the document.
|
pure virtual |
remove the metadata reference for the given element.
|
pure virtual |
try to register an ODF element at a given XML ID, or update its registration to a different XML ID.
If the given new metadata reference is not already occupied in the document, unregister the element at its old metadata reference if it has one, and register the new metadata reference for the element. Note that this method only ensures that XML IDs are unique per stream, so using the same XML ID in both content.xml and styles.xml is allowed.
|
pure virtual |
unregister an ODF element.
Unregister the element at its metadata reference. Does not remove the metadata reference from the element.