LibreOffice Module xmloff (master)
1
|
#include <xmlprmap.hxx>
Classes | |
struct | Impl |
Public Member Functions | |
XMLPropertySetMapper (const XMLPropertyMapEntry *pEntries, const rtl::Reference< XMLPropertyHandlerFactory > &rFactory, bool bForExport) | |
The last element of the XMLPropertyMapEntry-array must contain NULL-values. More... | |
virtual | ~XMLPropertySetMapper () override |
void | AddMapperEntry (const rtl::Reference< XMLPropertySetMapper > &rMapper) |
sal_Int32 | GetEntryCount () const |
Return number of entries in input-array. More... | |
sal_uInt32 | GetEntryFlags (sal_Int32 nIndex) const |
Returns the flags of an entry. More... | |
sal_uInt32 | GetEntryType (sal_Int32 nIndex) const |
Returns the type of an entry. More... | |
sal_uInt16 | GetEntryNameSpace (sal_Int32 nIndex) const |
Returns the namespace-key of an entry. More... | |
const OUString & | GetEntryXMLName (sal_Int32 nIndex) const |
Returns the 'local' XML-name of the entry. More... | |
const OUString & | GetEntryAPIName (sal_Int32 nIndex) const |
Returns the entry API name. More... | |
sal_Int16 | GetEntryContextId (sal_Int32 nIndex) const |
returns the entry context id. More... | |
SvtSaveOptions::ODFSaneDefaultVersion | GetEarliestODFVersionForExport (sal_Int32 nIndex) const |
returns the earliest ODF version for which this property should be exported as standard ODF element, which is the earliest ODF version for which the property should not be exported as extension element. More... | |
sal_Int32 | GetEntryIndex (sal_uInt16 nNamespace, std::u16string_view rStrName, sal_uInt32 nPropType, sal_Int32 nStartAt=-1) const |
Returns the index of an entry with the given XML-name and namespace If there is no matching entry the method returns -1. More... | |
sal_Int32 | GetEntryIndex (sal_Int32 nElement, sal_uInt32 nPropType, sal_Int32 nStartAt=-1) const |
Returns the index of an entry with the given XML-name and namespace If there is no matching entry the method returns -1. More... | |
const XMLPropertyHandler * | GetPropertyHandler (sal_Int32 nIndex) const |
Retrieves a PropertyHandler for that property which placed at nIndex in the XMLPropertyMapEntry-array. More... | |
bool | exportXML (OUString &rStrExpValue, const XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter) const |
import/export This methods calls the respective im/export-method of the respective PropertyHandler. More... | |
bool | importXML (const OUString &rStrImpValue, XMLPropertyState &rProperty, const SvXMLUnitConverter &rUnitConverter) const |
sal_Int32 | FindEntryIndex (const char *sApiName, sal_uInt16 nNameSpace, std::u16string_view sXMLName) const |
searches for an entry that matches the given api name, namespace and local name or -1 if nothing found More... | |
sal_Int32 | FindEntryIndex (const sal_Int16 nContextId) const |
searches for an entry that matches the given ContextId or gives -1 if nothing found More... | |
void | RemoveEntry (sal_Int32 nIndex) |
Remove an entry. More... | |
![]() | |
SimpleReferenceObject () | |
void | acquire () |
void | release () |
Private Member Functions | |
XMLPropertySetMapper (const XMLPropertySetMapper &)=delete | |
XMLPropertySetMapper & | operator= (const XMLPropertySetMapper &)=delete |
Private Attributes | |
std::unique_ptr< Impl > | mpImpl |
Additional Inherited Members | |
![]() | |
static void * | operator new (std::size_t nSize) |
static void * | operator new (std::size_t nSize, std::nothrow_t const &rNothrow) |
static void | operator delete (void *pPtr) |
static void | operator delete (void *pPtr, std::nothrow_t const &rNothrow) |
![]() | |
virtual | ~SimpleReferenceObject () COVERITY_NOEXCEPT_FALSE |
![]() | |
oslInterlockedCount | m_nCount |
Definition at line 38 of file xmlprmap.hxx.
|
privatedelete |
XMLPropertySetMapper::XMLPropertySetMapper | ( | const XMLPropertyMapEntry * | pEntries, |
const rtl::Reference< XMLPropertyHandlerFactory > & | rFactory, | ||
bool | bForExport | ||
) |
The last element of the XMLPropertyMapEntry-array must contain NULL-values.
bForExport | If TRUE, only entries that have the mbImportOnly flag not set will be in the mappings. |
Definition at line 102 of file xmlprmap.cxx.
References XMLPropertyMapEntry::mbImportOnly, mpImpl, and XMLPropertyMapEntry::msApiName.
|
overridevirtual |
Definition at line 136 of file xmlprmap.cxx.
void XMLPropertySetMapper::AddMapperEntry | ( | const rtl::Reference< XMLPropertySetMapper > & | rMapper | ) |
Definition at line 140 of file xmlprmap.cxx.
References mpImpl.
bool XMLPropertySetMapper::exportXML | ( | OUString & | rStrExpValue, |
const XMLPropertyState & | rProperty, | ||
const SvXMLUnitConverter & | rUnitConverter | ||
) | const |
import/export This methods calls the respective im/export-method of the respective PropertyHandler.
Definition at line 211 of file xmlprmap.cxx.
References XMLPropertyHandler::exportXML(), GetPropertyHandler(), XMLPropertyState::maValue, and XMLPropertyState::mnIndex.
sal_Int32 XMLPropertySetMapper::FindEntryIndex | ( | const char * | sApiName, |
sal_uInt16 | nNameSpace, | ||
std::u16string_view | sXMLName | ||
) | const |
searches for an entry that matches the given api name, namespace and local name or -1 if nothing found
Definition at line 307 of file xmlprmap.cxx.
References GetEntryCount(), mpImpl, and nIndex.
sal_Int32 XMLPropertySetMapper::FindEntryIndex | ( | const sal_Int16 | nContextId | ) | const |
searches for an entry that matches the given ContextId or gives -1 if nothing found
Definition at line 330 of file xmlprmap.cxx.
References GetEntryCount(), mpImpl, and nIndex.
SvtSaveOptions::ODFSaneDefaultVersion XMLPropertySetMapper::GetEarliestODFVersionForExport | ( | sal_Int32 | nIndex | ) | const |
returns the earliest ODF version for which this property should be exported as standard ODF element, which is the earliest ODF version for which the property should not be exported as extension element.
Definition at line 198 of file xmlprmap.cxx.
References o3tl::make_unsigned(), and mpImpl.
const OUString & XMLPropertySetMapper::GetEntryAPIName | ( | sal_Int32 | nIndex | ) | const |
Returns the entry API name.
Definition at line 185 of file xmlprmap.cxx.
References o3tl::make_unsigned(), and mpImpl.
sal_Int16 XMLPropertySetMapper::GetEntryContextId | ( | sal_Int32 | nIndex | ) | const |
returns the entry context id.
-1 is a valid index here.
Definition at line 191 of file xmlprmap.cxx.
References mpImpl.
sal_Int32 XMLPropertySetMapper::GetEntryCount | ( | ) | const |
Return number of entries in input-array.
Definition at line 155 of file xmlprmap.cxx.
References mpImpl.
Referenced by FindEntryIndex(), GetEntryIndex(), and RemoveEntry().
sal_uInt32 XMLPropertySetMapper::GetEntryFlags | ( | sal_Int32 | nIndex | ) | const |
Returns the flags of an entry.
Definition at line 160 of file xmlprmap.cxx.
References o3tl::make_unsigned(), MID_FLAG_MASK, and mpImpl.
sal_Int32 XMLPropertySetMapper::GetEntryIndex | ( | sal_uInt16 | nNamespace, |
std::u16string_view | rStrName, | ||
sal_uInt32 | nPropType, | ||
sal_Int32 | nStartAt = -1 |
||
) | const |
Returns the index of an entry with the given XML-name and namespace If there is no matching entry the method returns -1.
Definition at line 248 of file xmlprmap.cxx.
References GetEntryCount(), mpImpl, and nIndex.
sal_Int32 XMLPropertySetMapper::GetEntryIndex | ( | sal_Int32 | nElement, |
sal_uInt32 | nPropType, | ||
sal_Int32 | nStartAt = -1 |
||
) | const |
Returns the index of an entry with the given XML-name and namespace If there is no matching entry the method returns -1.
Definition at line 278 of file xmlprmap.cxx.
References GetEntryCount(), SvXMLImport::getNameFromToken(), mpImpl, nIndex, NMSP_SHIFT, and nNamespace.
sal_uInt16 XMLPropertySetMapper::GetEntryNameSpace | ( | sal_Int32 | nIndex | ) | const |
Returns the namespace-key of an entry.
Definition at line 173 of file xmlprmap.cxx.
References o3tl::make_unsigned(), and mpImpl.
sal_uInt32 XMLPropertySetMapper::GetEntryType | ( | sal_Int32 | nIndex | ) | const |
Returns the type of an entry.
Definition at line 166 of file xmlprmap.cxx.
References o3tl::make_unsigned(), mpImpl, and nType.
const OUString & XMLPropertySetMapper::GetEntryXMLName | ( | sal_Int32 | nIndex | ) | const |
Returns the 'local' XML-name of the entry.
Definition at line 179 of file xmlprmap.cxx.
References o3tl::make_unsigned(), and mpImpl.
const XMLPropertyHandler * XMLPropertySetMapper::GetPropertyHandler | ( | sal_Int32 | nIndex | ) | const |
Retrieves a PropertyHandler for that property which placed at nIndex in the XMLPropertyMapEntry-array.
Definition at line 204 of file xmlprmap.cxx.
References o3tl::make_unsigned(), and mpImpl.
Referenced by exportXML(), and importXML().
bool XMLPropertySetMapper::importXML | ( | const OUString & | rStrImpValue, |
XMLPropertyState & | rProperty, | ||
const SvXMLUnitConverter & | rUnitConverter | ||
) | const |
Definition at line 229 of file xmlprmap.cxx.
References GetPropertyHandler(), XMLPropertyHandler::importXML(), XMLPropertyState::maValue, and XMLPropertyState::mnIndex.
|
privatedelete |
void XMLPropertySetMapper::RemoveEntry | ( | sal_Int32 | nIndex | ) |
Remove an entry.
Definition at line 351 of file xmlprmap.cxx.
References GetEntryCount(), and mpImpl.
|
private |
Definition at line 40 of file xmlprmap.hxx.
Referenced by AddMapperEntry(), FindEntryIndex(), GetEarliestODFVersionForExport(), GetEntryAPIName(), GetEntryContextId(), GetEntryCount(), GetEntryFlags(), GetEntryIndex(), GetEntryNameSpace(), GetEntryType(), GetEntryXMLName(), GetPropertyHandler(), RemoveEntry(), and XMLPropertySetMapper().