Kaydet (Commit) df344855 authored tarafından Miklos Vajna's avatar Miklos Vajna

Use oox::getNamespace()

Change-Id: I43df705a6cf5371ee495336d9dbe2b87020cf0e0
üst 1ebbb8bc
...@@ -1797,9 +1797,8 @@ OOXMLFastContextHandlerShape::lcl_createFastChildContext ...@@ -1797,9 +1797,8 @@ OOXMLFastContextHandlerShape::lcl_createFastChildContext
bool bGroupShape = Element == Token_t(NMSP_vml | XML_group); bool bGroupShape = Element == Token_t(NMSP_vml | XML_group);
// drawingML version also counts as a group shape. // drawingML version also counts as a group shape.
bGroupShape |= mrShapeContext->getStartToken() == Token_t(NMSP_wpg | XML_wgp); bGroupShape |= mrShapeContext->getStartToken() == Token_t(NMSP_wpg | XML_wgp);
sal_uInt32 nNamespace = Element & 0xffff0000;
switch (nNamespace) switch (oox::getNamespace(Element))
{ {
case NMSP_doc: case NMSP_doc:
case NMSP_vmlWord: case NMSP_vmlWord:
...@@ -1977,9 +1976,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext ...@@ -1977,9 +1976,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext
{ {
uno::Reference< xml::sax::XFastContextHandler > xResult; uno::Reference< xml::sax::XFastContextHandler > xResult;
Id nNameSpace = Element & 0xffff0000; bool bInNamespaces = mMyNamespaces.find(oox::getNamespace(Element)) != mMyNamespaces.end();
bool bInNamespaces = mMyNamespaces.find(nNameSpace) != mMyNamespaces.end();
bool bInTokens = mMyTokens.find( Element ) != mMyTokens.end( ); bool bInTokens = mMyTokens.find( Element ) != mMyTokens.end( );
// We have methods to _add_ individual tokens or whole namespaces to be // We have methods to _add_ individual tokens or whole namespaces to be
......
...@@ -64,7 +64,7 @@ def getFactoryForNamespace(model): ...@@ -64,7 +64,7 @@ def getFactoryForNamespace(model):
{ {
OOXMLFactory_ns::Pointer_t pResult; OOXMLFactory_ns::Pointer_t pResult;
switch (nId & 0xffff0000) switch (oox::getNamespace(nId))
{""") {""")
for namespace in [ns.getAttribute("name") for ns in model.getElementsByTagName("namespace")]: for namespace in [ns.getAttribute("name") for ns in model.getElementsByTagName("namespace")]:
...@@ -122,7 +122,7 @@ std::string fastTokenToId(sal_uInt32 nToken) ...@@ -122,7 +122,7 @@ std::string fastTokenToId(sal_uInt32 nToken)
std::string sResult; std::string sResult;
switch (nToken & 0xffff0000) switch (oox::getNamespace(nToken))
{""") {""")
aliases = [] aliases = []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment