summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml/OOXMLFactory.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFactory.cxx')
-rw-r--r--[-rwxr-xr-x]writerfilter/source/ooxml/OOXMLFactory.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 80f0ebfb2..9607478d0 100755..100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -262,8 +262,14 @@ OOXMLFactory::createFastChildContext(OOXMLFastContextHandler * pHandler,
Id nDefine = pHandler->getDefine();
OOXMLFactory_ns::Pointer_t pFactory = getFactoryForNamespace(nDefine);
-
- return createFastChildContextFromFactory(pHandler, pFactory, Element);
+
+ uno::Reference< xml::sax::XFastContextHandler> ret;
+
+ //Avoid handling unknown tokens and recursing to death
+ if ((Element & 0xffff) < OOXML_FAST_TOKENS_END)
+ ret = createFastChildContextFromFactory(pHandler, pFactory, Element);
+
+ return ret;
}
void OOXMLFactory::characters(OOXMLFastContextHandler * pHandler,