diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-14 09:20:38 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-09-14 09:20:38 +0200 |
commit | df344855e1c90e6be333afc143044bb04114c683 (patch) | |
tree | 802f35fe1496b4c63adf752f61fddb4d41e19764 | |
parent | 1ebbb8bceb9f8e5876894f04b2e52cf772eb06a0 (diff) |
Use oox::getNamespace()
Change-Id: I43df705a6cf5371ee495336d9dbe2b87020cf0e0
-rw-r--r-- | writerfilter/source/ooxml/OOXMLFastContextHandler.cxx | 7 | ||||
-rw-r--r-- | writerfilter/source/ooxml/factoryimpl.py | 4 |
2 files changed, 4 insertions, 7 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx index 268400de838a..634af433bd1f 100644 --- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx +++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx @@ -1797,9 +1797,8 @@ OOXMLFastContextHandlerShape::lcl_createFastChildContext bool bGroupShape = Element == Token_t(NMSP_vml | XML_group); // drawingML version also counts as a group shape. 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_vmlWord: @@ -1977,9 +1976,7 @@ OOXMLFastContextHandlerWrapper::lcl_createFastChildContext { uno::Reference< xml::sax::XFastContextHandler > xResult; - Id nNameSpace = Element & 0xffff0000; - - bool bInNamespaces = mMyNamespaces.find(nNameSpace) != mMyNamespaces.end(); + bool bInNamespaces = mMyNamespaces.find(oox::getNamespace(Element)) != mMyNamespaces.end(); bool bInTokens = mMyTokens.find( Element ) != mMyTokens.end( ); // We have methods to _add_ individual tokens or whole namespaces to be diff --git a/writerfilter/source/ooxml/factoryimpl.py b/writerfilter/source/ooxml/factoryimpl.py index dcd624875237..c2a627d2a106 100644 --- a/writerfilter/source/ooxml/factoryimpl.py +++ b/writerfilter/source/ooxml/factoryimpl.py @@ -64,7 +64,7 @@ def getFactoryForNamespace(model): { OOXMLFactory_ns::Pointer_t pResult; - switch (nId & 0xffff0000) + switch (oox::getNamespace(nId)) {""") for namespace in [ns.getAttribute("name") for ns in model.getElementsByTagName("namespace")]: @@ -122,7 +122,7 @@ std::string fastTokenToId(sal_uInt32 nToken) std::string sResult; - switch (nToken & 0xffff0000) + switch (oox::getNamespace(nToken)) {""") aliases = [] |