LibreOffice Module xmloff (master)
1
|
#include <namespacemap.hxx>
Public Types | |
enum | QNameMode { QNameMode::AttrNameCached, QNameMode::AttrValue } |
Public Member Functions | |
SvXMLNamespaceMap () | |
~SvXMLNamespaceMap () | |
SvXMLNamespaceMap (const SvXMLNamespaceMap &) | |
SvXMLNamespaceMap & | operator= (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 NameSpaceHash & | GetAllEntries () 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 |
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 |
Definition at line 69 of file namespacemap.hxx.
|
strong |
Enumerator | |
---|---|
AttrNameCached | |
AttrValue |
Definition at line 107 of file namespacemap.hxx.
SvXMLNamespaceMap::SvXMLNamespaceMap | ( | ) |
Definition at line 51 of file namespacemap.cxx.
SvXMLNamespaceMap::~SvXMLNamespaceMap | ( | ) |
Definition at line 70 of file namespacemap.cxx.
SvXMLNamespaceMap::SvXMLNamespaceMap | ( | const SvXMLNamespaceMap & | rMap | ) |
Definition at line 56 of file namespacemap.cxx.
sal_uInt16 SvXMLNamespaceMap::Add | ( | const OUString & | rPrefix, |
const OUString & | rName, | ||
sal_uInt16 | nKey = XML_NAMESPACE_UNKNOWN |
||
) |
Definition at line 103 of file namespacemap.cxx.
References Add_(), aNameHash, assert(), GetKeyByName(), USHRT_MAX, XML_NAMESPACE_NONE, and XML_NAMESPACE_UNKNOWN.
Referenced by SvXMLExportPropertyMapper::_exportXML(), SvXMLAttrCollection::AddAttr(), Oasis2OOoTransformer::Oasis2OOoTransformer(), SchXMLExport::SchXMLExport(), SchXMLImport::SchXMLImport(), SdXMLImport::SdXMLImport(), SvXMLAttrCollection::SetAt(), SdXMLExport::setSourceDocument(), and SvXMLExport::setSourceDocument().
|
private |
Definition at line 79 of file namespacemap.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 | ||
) |
Definition at line 390 of file namespacemap.cxx.
References Add_(), aNameHash, assert(), GetKeyByName(), XML_NAMESPACE_NONE, and XML_NAMESPACE_UNKNOWN.
Referenced by XMLVersionListExport::XMLVersionListExport().
sal_uInt16 SvXMLNamespaceMap::AddIfKnown | ( | const OUString & | rPrefix, |
const OUString & | rName | ||
) |
Definition at line 122 of file namespacemap.cxx.
References Add_(), aNameHash, assert(), GetKeyByName(), XML_NAMESPACE_NONE, and XML_NAMESPACE_UNKNOWN.
|
inline |
Definition at line 123 of file namespacemap.hxx.
OUString SvXMLNamespaceMap::GetAttrNameByIndex | ( | sal_uInt16 | nIdx | ) | const |
Definition at line 403 of file namespacemap.cxx.
References GetAttrNameByKey().
OUString SvXMLNamespaceMap::GetAttrNameByKey | ( | sal_uInt16 | nKey | ) | const |
Definition at line 174 of file namespacemap.cxx.
References aNameMap, and sXMLNS.
Referenced by XMLMetaExportComponent::exportDoc(), and GetAttrNameByIndex().
sal_uInt16 SvXMLNamespaceMap::GetFirstIndex | ( | ) | const |
Definition at line 379 of file namespacemap.cxx.
References aNameMap, and USHRT_MAX.
Referenced by SvXMLAttrCollection::GetFirstNamespaceIndex().
sal_uInt16 SvXMLNamespaceMap::GetFirstKey | ( | ) | const |
Definition at line 361 of file namespacemap.cxx.
References aNameMap, and USHRT_MAX.
Referenced by XMLMetaExportComponent::exportDoc(), and lcl_fillNamespaceContainer().
|
static |
Definition at line 375 of file namespacemap.cxx.
Referenced by XMLVersionListExport::exportDoc().
sal_uInt16 SvXMLNamespaceMap::GetIndexByPrefix | ( | const OUString & | rPrefix | ) | const |
Definition at line 420 of file namespacemap.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 432 of file namespacemap.cxx.
References AttrNameCached, and GetKeyByQName().
Referenced by XMLChartPlotAreaOOoTContext::CreateChildContext(), Oasis2OOoTransformer::GetEventName(), XMLTransformerContext::HasNamespace(), XMLTransformerContext::HasQName(), SvXMLImportPropertyMapper::importXMLAttribute(), XMLFrameOASISTransformerContext::IsLinkedEmbeddedObject(), XMLTransformerBase::ProcessAttrList(), XMLChartOASISTransformerContext::StartElement(), XMLChartOOoTransformerContext::StartElement(), XMLDlgOASISTransformerContext::StartElement(), XMLCreateElemTransformerContext::StartElement(), XMLControlOASISTransformerContext::StartElement(), XMLDocumentTransformerContext::StartElement(), XMLFrameOOoTransformerContext::StartElement(), XMLFormPropOASISTransformerContext::StartElement(), XMLAxisOOoContext::StartElement(), XMLEventOASISTransformerContext::StartElement(), XMLEventOOoTransformerContext::StartElement(), XMLNotesTransformerContext::StartElement(), XMLFormPropValueTContext_Impl::StartElement(), XMLFrameOASISTransformerContext::StartElement(), XMLMergeElemTransformerContext::StartElement(), XMLStyleOASISTContext::StartElement(), XMLFormPropOOoTransformerContext::StartElement(), XMLStyleOOoTContext::StartElement(), and XMLPropertiesTContext_Impl::StartElement().
sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrName | ( | const OUString & | rAttrName, |
OUString * | pLocalName = nullptr |
||
) | const |
Definition at line 425 of file namespacemap.cxx.
References AttrNameCached, and GetKeyByQName().
sal_uInt16 SvXMLNamespaceMap::GetKeyByAttrValueQName | ( | const OUString & | rAttrName, |
OUString * | pLocalName | ||
) | const |
Definition at line 263 of file namespacemap.cxx.
References AttrValue, and GetKeyByQName().
Referenced by XMLEventImportHelper::CreateContext(), XMLDocumentSettingsContext::createFastChildContext(), XMLDatabaseNextImportContext::ProcessAttribute(), XMLHiddenParagraphImportContext::ProcessAttribute(), XMLTransformerBase::RemoveNamespacePrefix(), SchXMLChartContext::startFastElement(), SchXMLSeries2Context::startFastElement(), xmloff::OElementImport::startFastElement(), xforms_getTypeClass(), and xforms_getTypeName().
sal_uInt16 SvXMLNamespaceMap::GetKeyByName | ( | const OUString & | rName | ) | const |
Definition at line 150 of file namespacemap.cxx.
References aNameHash, and XML_NAMESPACE_UNKNOWN.
Referenced by SvXMLExportPropertyMapper::_exportXML(), Add(), AddAtIndex(), AddIfKnown(), and SvXMLImport::getNamespacePrefixFromToken().
sal_uInt16 SvXMLNamespaceMap::GetKeyByPrefix | ( | const OUString & | rPrefix | ) | const |
Definition at line 144 of file namespacemap.cxx.
References aNameHash, and USHRT_MAX.
Referenced by SvXMLExportPropertyMapper::_exportXML(), SvXMLExport::EnsureNamespace(), exportXFormsBinding(), and SvXMLImportPropertyMapper::importXML().
sal_uInt16 SvXMLNamespaceMap::GetKeyByQName | ( | const OUString & | rQName, |
OUString * | pPrefix, | ||
OUString * | pLocalName, | ||
OUString * | pNamespace, | ||
QNameMode | eMode | ||
) | const |
rQName | either attribute name or qualified/namespaced attribute value |
bCacheAttrName | true: 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 namespacemap.cxx.
References aNameCache, aNameHash, aNameMap, assert(), 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 414 of file namespacemap.cxx.
References aNameMap, and sEmpty.
Referenced by SvXMLAttrCollection::GetAttrNamespace(), and SvXMLAttrCollection::GetNamespace().
const OUString & SvXMLNamespaceMap::GetNameByKey | ( | sal_uInt16 | nKey | ) | const |
Definition at line 168 of file namespacemap.cxx.
References aNameMap, and sEmpty.
Referenced by SvXMLExportPropertyMapper::_exportXML(), XMLMetaExportComponent::exportDoc(), exportXFormsBinding(), lcl_fillNamespaceContainer(), and XMLTransformerBase::startElement().
sal_uInt16 SvXMLNamespaceMap::GetNextIndex | ( | sal_uInt16 | nOldIdx | ) | const |
Definition at line 384 of file namespacemap.cxx.
References aNameMap, and USHRT_MAX.
Referenced by SvXMLAttrCollection::GetNextNamespaceIndex().
sal_uInt16 SvXMLNamespaceMap::GetNextKey | ( | sal_uInt16 | nOldKey | ) | const |
Definition at line 366 of file namespacemap.cxx.
References aNameMap, and USHRT_MAX.
Referenced by XMLMetaExportComponent::exportDoc(), and lcl_fillNamespaceContainer().
const OUString & SvXMLNamespaceMap::GetPrefixByIndex | ( | sal_uInt16 | nIdx | ) | const |
Definition at line 408 of file namespacemap.cxx.
References aNameMap, and sEmpty.
Referenced by SvXMLAttrCollection::GetAttrPrefix(), and SvXMLAttrCollection::GetPrefix().
const OUString & SvXMLNamespaceMap::GetPrefixByKey | ( | sal_uInt16 | nKey | ) | const |
Definition at line 162 of file namespacemap.cxx.
References aNameMap, and sEmpty.
Referenced by SvXMLExportPropertyMapper::_exportXML(), SvXMLExport::EnsureNamespace(), SvXMLImport::getNamespacePrefixFromToken(), and lcl_fillNamespaceContainer().
OUString SvXMLNamespaceMap::GetQNameByKey | ( | sal_uInt16 | nKey, |
const OUString & | rLocalName, | ||
bool | bCache = true |
||
) | const |
Definition at line 187 of file namespacemap.cxx.
References aNameMap, aQNameCache, assert(), xmloff::token::GetXMLToken(), SAL_WARN, sXMLNS, XML_NAMESPACE_NONE, XML_NAMESPACE_UNKNOWN, XML_NAMESPACE_XML, XML_NAMESPACE_XMLNS, and xmloff::token::XML_XML.
Referenced by SvXMLExportPropertyMapper::_exportXML(), XMLTransformerBase::AddNamespacePrefix(), XMLMetaTransformerContext::EndElement(), XMLScriptExportHandler::Export(), XMLStarBasicExportHandler::Export(), XMLEventExport::ExportEvent(), XMLSectionExport::ExportRegularSectionStart(), SchXMLExportHelper_Impl::exportSeries(), xmloff::OElementExport::exportServiceNameAttribute(), xmloff::OColumnExport::exportServiceNameAttribute(), OOo2OasisTransformer::GetEventName(), XMLChartExportPropertyMapper::handleSpecialItem(), XMLTextExportPropertySetMapper::handleSpecialItem(), XMLShapeExport::ImpExportEvents(), SvXMLExport::ImplExportSettings(), lcl_getXSDType(), SchXMLExportHelper_Impl::parseDocument(), XMLFormPropOOoTransformerContext::StartElement(), SvXMLElementExport::StartElement(), XMLNumberFormatAttributesExportHelper::WriteAttributes(), and XMLTextCharStyleNamesElementExport::XMLTextCharStyleNamesElementExport().
|
static |
Definition at line 473 of file namespacemap.cxx.
References xmloff::token::GetXMLToken(), xmloff::token::IsXMLToken(), nPos, xmloff::token::XML_N_FO, xmloff::token::XML_N_FO_COMPAT, xmloff::token::XML_N_SMIL, xmloff::token::XML_N_SMIL_COMPAT, xmloff::token::XML_N_SMIL_OLD, xmloff::token::XML_N_SVG, and xmloff::token::XML_N_SVG_COMPAT.
Referenced by NormalizeURI(), and XMLTransformerBase::startElement().
|
static |
Definition at line 440 of file namespacemap.cxx.
References NormalizeOasisURN(), and NormalizeW3URI().
Referenced by SvXMLImport::processNSAttributes().
|
static |
Definition at line 449 of file namespacemap.cxx.
References xmloff::token::GetXMLToken().
Referenced by NormalizeURI().
SvXMLNamespaceMap & SvXMLNamespaceMap::operator= | ( | const SvXMLNamespaceMap & | rCmp | ) |
Definition at line 63 of file namespacemap.cxx.
bool SvXMLNamespaceMap::operator== | ( | const SvXMLNamespaceMap & | rCmp | ) | const |
Definition at line 74 of file namespacemap.cxx.
References aNameHash.
|
mutableprivate |
Definition at line 74 of file namespacemap.hxx.
Referenced by GetKeyByQName().
|
private |
Definition at line 73 of file namespacemap.hxx.
Referenced by Add(), Add_(), AddAtIndex(), AddIfKnown(), GetIndexByPrefix(), GetKeyByName(), GetKeyByPrefix(), GetKeyByQName(), operator=(), operator==(), and SvXMLNamespaceMap().
|
private |
Definition at line 75 of file namespacemap.hxx.
Referenced by Add_(), GetAttrNameByKey(), GetFirstIndex(), GetFirstKey(), GetKeyByQName(), GetNameByIndex(), GetNameByKey(), GetNextIndex(), GetNextKey(), GetPrefixByIndex(), GetPrefixByKey(), GetQNameByKey(), operator=(), and SvXMLNamespaceMap().
|
mutableprivate |
Definition at line 76 of file namespacemap.hxx.
Referenced by GetQNameByKey().
|
private |
Definition at line 71 of file namespacemap.hxx.
Referenced by GetAttrNameByKey(), GetKeyByQName(), and GetQNameByKey().