LibreOffice Module xmloff (master)  1
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
SvXMLNamespaceMap Class Reference

#include <nmspmap.hxx>

Public Types

enum  QNameMode {
  QNameMode::AttrNameCached,
  QNameMode::AttrValue
}
 

Public Member Functions

 SvXMLNamespaceMap ()
 
 ~SvXMLNamespaceMap ()
 
 SvXMLNamespaceMap (const SvXMLNamespaceMap &)
 
SvXMLNamespaceMapoperator= (const SvXMLNamespaceMap &rCmp)
 
bool operator== (const SvXMLNamespaceMap &rCmp) const
 
sal_uInt16 Add (const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey=XML_NAMESPACE_UNKNOWN)
 
sal_uInt16 AddIfKnown (const OUString &rPrefix, const OUString &rName)
 
sal_uInt16 GetKeyByName (const OUString &rName) const
 
const OUString & GetNameByKey (sal_uInt16 nKey) const
 
sal_uInt16 GetKeyByPrefix (const OUString &rPrefix) const
 
const OUString & GetPrefixByKey (sal_uInt16 nKey) const
 
OUString GetQNameByKey (sal_uInt16 nKey, const OUString &rLocalName, bool bCache=true) const
 
OUString GetAttrNameByKey (sal_uInt16 nKey) const
 
sal_uInt16 GetKeyByQName (const OUString &rQName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace, QNameMode eMode) const
 
sal_uInt16 GetKeyByAttrValueQName (const OUString &rAttrName, OUString *pLocalName) const
 
sal_uInt16 GetFirstKey () const
 
sal_uInt16 GetNextKey (sal_uInt16 nOldKey) const
 
const NameSpaceHashGetAllEntries () const
 
void AddAtIndex (const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey)
 
sal_uInt16 GetIndexByPrefix (const OUString &rPrefix) const
 
sal_uInt16 GetFirstIndex () const
 
sal_uInt16 GetNextIndex (sal_uInt16 nOldIdx) const
 
const OUString & GetPrefixByIndex (sal_uInt16 nIdx) const
 
const OUString & GetNameByIndex (sal_uInt16 nIdx) const
 
OUString GetAttrNameByIndex (sal_uInt16 nIdx) const
 
OUString GetQNameByIndex (sal_uInt16 nIdx, const OUString &rLocalName) const
 
sal_uInt16 GetKeyByAttrName (const OUString &rAttrName, OUString *pPrefix, OUString *pLocalName, OUString *pNamespace) const
 
sal_uInt16 GetKeyByAttrName (const OUString &rAttrName, OUString *pLocalName=nullptr) const
 

Static Public Member Functions

static bool NormalizeOasisURN (OUString &rName)
 
static bool NormalizeW3URI (OUString &rName)
 
static bool NormalizeURI (OUString &rName)
 
static sal_uInt16 GetIndexByKey (sal_uInt16 nKey)
 

Private Member Functions

SAL_DLLPRIVATE sal_uInt16 Add_ (const OUString &rPrefix, const OUString &rName, sal_uInt16 nKey)
 

Private Attributes

OUString sXMLNS
 
NameSpaceHash aNameHash
 
NameSpaceHash aNameCache
 
NameSpaceMap aNameMap
 
QNameCache aQNameCache
 

Detailed Description

Definition at line 69 of file nmspmap.hxx.

Member Enumeration Documentation

Enumerator
AttrNameCached 
AttrValue 

Definition at line 107 of file nmspmap.hxx.

Constructor & Destructor Documentation

SvXMLNamespaceMap::SvXMLNamespaceMap ( )

Definition at line 51 of file nmspmap.cxx.

SvXMLNamespaceMap::~SvXMLNamespaceMap ( )

Definition at line 70 of file nmspmap.cxx.

SvXMLNamespaceMap::SvXMLNamespaceMap ( const SvXMLNamespaceMap rMap)

Definition at line 56 of file nmspmap.cxx.

References aNameHash, and aNameMap.

Member Function Documentation

sal_uInt16 SvXMLNamespaceMap::Add ( const OUString &  rPrefix,
const OUString &  rName,
sal_uInt16  nKey = XML_NAMESPACE_UNKNOWN 
)
sal_uInt16 SvXMLNamespaceMap::Add_ ( const OUString &  rPrefix,
const OUString &  rName,
sal_uInt16  nKey 
)
private

Definition at line 79 of file nmspmap.cxx.

References aNameHash, aNameMap, XML_NAMESPACE_UNKNOWN, and XML_NAMESPACE_UNKNOWN_FLAG.

Referenced by Add(), AddAtIndex(), and AddIfKnown().

void SvXMLNamespaceMap::AddAtIndex ( const OUString &  rPrefix,
const OUString &  rName,
sal_uInt16  nKey 
)
sal_uInt16 SvXMLNamespaceMap::AddIfKnown ( const OUString &  rPrefix,
const OUString &  rName 
)
const NameSpaceHash& SvXMLNamespaceMap::GetAllEntries ( ) const
inline

Definition at line 123 of file nmspmap.hxx.

OUString SvXMLNamespaceMap::GetAttrNameByIndex ( sal_uInt16  nIdx) const

Definition at line 402 of file nmspmap.cxx.

References GetAttrNameByKey().

OUString SvXMLNamespaceMap::GetAttrNameByKey ( sal_uInt16  nKey) const
sal_uInt16 SvXMLNamespaceMap::GetFirstIndex ( ) const

Definition at line 378 of file nmspmap.cxx.

References aNameMap, and USHRT_MAX.

Referenced by SvXMLAttrCollection::GetFirstNamespaceIndex().

sal_uInt16 SvXMLNamespaceMap::GetFirstKey ( ) const
sal_uInt16 SvXMLNamespaceMap::GetIndexByKey ( sal_uInt16  nKey)
static

Definition at line 374 of file nmspmap.cxx.

Referenced by XMLVersionListExport::exportDoc().

sal_uInt16 SvXMLNamespaceMap::GetIndexByPrefix ( const OUString &  rPrefix) const

Definition at line 425 of file nmspmap.cxx.

References aNameHash, and USHRT_MAX.

Referenced by SvXMLAttrCollection::AddAttr(), and SvXMLAttrCollection::SetAt().

sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName ( const OUString &  rAttrName,
OUString *  pPrefix,
OUString *  pLocalName,
OUString *  pNamespace 
) const

Definition at line 437 of file nmspmap.cxx.

References AttrNameCached, and GetKeyByQName().

Referenced by SdXMLShapeContext::addGluePoint(), XMLTextShapeImportHelper::addShape(), XMLShapeImportHelper::Create3DSceneChildContext(), XMLChartPlotAreaOOoTContext::CreateChildContext(), SchXMLAxisContext::CreateChildContext(), XMLEnhancedCustomShapeContext::CreateChildContext(), SdXMLShapeContext::CreateChildContext(), SdXMLAppletShapeContext::CreateChildContext(), SdXMLPluginShapeContext::CreateChildContext(), XMLShapeImportHelper::CreateGroupChildContext(), SvXMLStylesContext::CreateStyleChildContext(), SdXMLFrameShapeContext::EndElement(), Oasis2OOoTransformer::GetEventName(), XMLTransformerContext::HasNamespace(), XMLTransformerContext::HasQName(), XMLTableImportContext::ImportColumn(), XMLTableImportContext::ImportRow(), XMLTransGradientStyleImport::importXML(), SvXMLImportPropertyMapper::importXML(), XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(), XMLTransformerBase::ProcessAttrList(), XMLTextDropCapImportContext::ProcessAttrs(), XMLBackgroundImageContext::ProcessAttrs(), QRCodeContext::QRCodeContext(), SchXMLCalculationSettingsContext::SchXMLCalculationSettingsContext(), SdXML3DCubeObjectShapeContext::SdXML3DCubeObjectShapeContext(), SdXML3DLightContext::SdXML3DLightContext(), SdXML3DObjectContext::SdXML3DObjectContext(), SdXML3DPolygonBasedShapeContext::SdXML3DPolygonBasedShapeContext(), SdXML3DSphereObjectShapeContext::SdXML3DSphereObjectShapeContext(), SdXMLCustomShapeContext::SdXMLCustomShapeContext(), SdXMLHeaderFooterDeclContext::SdXMLHeaderFooterDeclContext(), SdXMLNumberFormatImportContext::SdXMLNumberFormatImportContext(), SdXMLNumberFormatMemberImportContext::SdXMLNumberFormatMemberImportContext(), SdXMLPageMasterContext::SdXMLPageMasterContext(), SdXMLPageMasterStyleContext::SdXMLPageMasterStyleContext(), SdXMLPresentationPlaceholderContext::SdXMLPresentationPlaceholderContext(), SdXMLShapeLinkContext::SdXMLShapeLinkContext(), XMLChartOOoTransformerContext::StartElement(), XMLChartOASISTransformerContext::StartElement(), XMLDlgOASISTransformerContext::StartElement(), SchXMLLegendContext::StartElement(), XMLCreateElemTransformerContext::StartElement(), XMLControlOASISTransformerContext::StartElement(), SchXMLPropertyMappingContext::StartElement(), XMLDocumentTransformerContext::StartElement(), XMLFrameOOoTransformerContext::StartElement(), XMLSymbolImageContext::StartElement(), XMLFormPropOASISTransformerContext::StartElement(), XMLAxisOOoContext::StartElement(), XMLEventOASISTransformerContext::StartElement(), SchXMLRegressionCurveObjectContext::StartElement(), SchXMLParagraphContext::StartElement(), XMLEventOOoTransformerContext::StartElement(), XMLNotesTransformerContext::StartElement(), SchXMLAxisContext::StartElement(), XMLFormPropValueTContext_Impl::StartElement(), SdXML3DSceneShapeContext::StartElement(), XMLFrameOASISTransformerContext::StartElement(), XMLMergeElemTransformerContext::StartElement(), XMLStyleOASISTContext::StartElement(), XMLFormPropOOoTransformerContext::StartElement(), XMLStyleOOoTContext::StartElement(), XMLEnhancedCustomShapeContext::StartElement(), SchXMLTableContext::StartElement(), SchXMLEquationContext::StartElement(), DomBuilderContext::StartElement(), XMLPropertiesTContext_Impl::StartElement(), SchXMLChartContext::StartElement(), SchXMLSeries2Context::StartElement(), xmloff::OPropertyImport::StartElement(), SvXMLStyleContext::StartElement(), SchXMLPlotAreaContext::StartElement(), SchXMLTableColumnContext::StartElement(), SchXMLTitleContext::StartElement(), SchXMLTableCellContext::StartElement(), xmloff::OSinglePropertyContext::StartElement(), SchXMLDataPointContext::StartElement(), xmloff::OListPropertyContext::StartElement(), SchXMLCoordinateRegionContext::StartElement(), xmloff::OListValueContext::StartElement(), SchXMLWallFloorContext::StartElement(), SchXMLStockContext::StartElement(), SchXMLStatisticsObjectContext::StartElement(), SdXMLPluginShapeContext::StartElement(), SvxXMLListLevelStyleContext_Impl::SvxXMLListLevelStyleContext_Impl(), SvxXMLTabStopContext_Impl::SvxXMLTabStopContext_Impl(), XMLCalculationSettingsContext::XMLCalculationSettingsContext(), XMLEmbeddedObjectImportContext::XMLEmbeddedObjectImportContext(), XMLReplacementImageContext::XMLReplacementImageContext(), XMLTextColumnContext_Impl::XMLTextColumnContext_Impl(), XMLTextColumnsContext::XMLTextColumnsContext(), XMLTextColumnSepContext_Impl::XMLTextColumnSepContext_Impl(), XMLTextFrameHyperlinkContext::XMLTextFrameHyperlinkContext(), XMLTextListBlockContext::XMLTextListBlockContext(), and XMLTextMasterPageContext::XMLTextMasterPageContext().

sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName ( const OUString &  rAttrName,
OUString *  pLocalName = nullptr 
) const

Definition at line 430 of file nmspmap.cxx.

References AttrNameCached, and GetKeyByQName().

sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrValueQName ( const OUString &  rAttrName,
OUString *  pLocalName 
) const
sal_uInt16 SvXMLNamespaceMap::GetKeyByName ( const OUString &  rName) const
sal_uInt16 SvXMLNamespaceMap::GetKeyByPrefix ( const OUString &  rPrefix) const
sal_uInt16 SvXMLNamespaceMap::GetKeyByQName ( const OUString &  rQName,
OUString *  pPrefix,
OUString *  pLocalName,
OUString *  pNamespace,
QNameMode  eMode 
) const
Parameters
rQNameeither attribute name or qualified/namespaced attribute value
bCacheAttrNametrue: rQName is element or attribute name, cache it false: rQName is attribute value, may contain extra ':', don't cache it

Definition at line 275 of file nmspmap.cxx.

References aNameCache, aNameHash, aNameMap, AttrNameCached, NameSpaceEntry::nKey, SAL_INFO, NameSpaceEntry::sName, NameSpaceEntry::sPrefix, sXMLNS, XML_NAMESPACE_NONE, XML_NAMESPACE_UNKNOWN, and XML_NAMESPACE_XMLNS.

Referenced by GetKeyByAttrName(), and GetKeyByAttrValueQName().

const OUString & SvXMLNamespaceMap::GetNameByIndex ( sal_uInt16  nIdx) const

Definition at line 419 of file nmspmap.cxx.

References aNameMap, and sEmpty.

Referenced by SvXMLAttrCollection::GetAttrNamespace(), and SvXMLAttrCollection::GetNamespace().

const OUString & SvXMLNamespaceMap::GetNameByKey ( sal_uInt16  nKey) const
sal_uInt16 SvXMLNamespaceMap::GetNextIndex ( sal_uInt16  nOldIdx) const

Definition at line 383 of file nmspmap.cxx.

References aNameMap, and USHRT_MAX.

Referenced by SvXMLAttrCollection::GetNextNamespaceIndex().

sal_uInt16 SvXMLNamespaceMap::GetNextKey ( sal_uInt16  nOldKey) const
const OUString & SvXMLNamespaceMap::GetPrefixByIndex ( sal_uInt16  nIdx) const

Definition at line 413 of file nmspmap.cxx.

References aNameMap, and sEmpty.

Referenced by SvXMLAttrCollection::GetAttrPrefix(), and SvXMLAttrCollection::GetPrefix().

const OUString & SvXMLNamespaceMap::GetPrefixByKey ( sal_uInt16  nKey) const
OUString SvXMLNamespaceMap::GetQNameByIndex ( sal_uInt16  nIdx,
const OUString &  rLocalName 
) const

Definition at line 407 of file nmspmap.cxx.

References GetQNameByKey().

Referenced by xmloff::OFormsRootImport::implImportBool().

OUString SvXMLNamespaceMap::GetQNameByKey ( sal_uInt16  nKey,
const OUString &  rLocalName,
bool  bCache = true 
) const
bool SvXMLNamespaceMap::NormalizeOasisURN ( OUString &  rName)
static
bool SvXMLNamespaceMap::NormalizeURI ( OUString &  rName)
static

Definition at line 445 of file nmspmap.cxx.

References NormalizeOasisURN(), and NormalizeW3URI().

Referenced by SvXMLImport::processNSAttributes().

bool SvXMLNamespaceMap::NormalizeW3URI ( OUString &  rName)
static
SvXMLNamespaceMap & SvXMLNamespaceMap::operator= ( const SvXMLNamespaceMap rCmp)

Definition at line 63 of file nmspmap.cxx.

References aNameHash, and aNameMap.

bool SvXMLNamespaceMap::operator== ( const SvXMLNamespaceMap rCmp) const

Definition at line 74 of file nmspmap.cxx.

References aNameHash.

Member Data Documentation

NameSpaceHash SvXMLNamespaceMap::aNameCache
mutableprivate

Definition at line 74 of file nmspmap.hxx.

Referenced by GetKeyByQName().

NameSpaceHash SvXMLNamespaceMap::aNameHash
private
NameSpaceMap SvXMLNamespaceMap::aNameMap
private
QNameCache SvXMLNamespaceMap::aQNameCache
mutableprivate

Definition at line 76 of file nmspmap.hxx.

Referenced by GetQNameByKey().

OUString SvXMLNamespaceMap::sXMLNS
private

Definition at line 71 of file nmspmap.hxx.

Referenced by GetAttrNameByKey(), GetKeyByQName(), and GetQNameByKey().


The documentation for this class was generated from the following files: