summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml/OOXMLFactory.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-03-07 14:27:11 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-03-07 15:10:26 +0100
commitd5d7c7d3b281e1a9060d60bc4ac7738ae616f167 (patch)
tree8c663fa0809457d335395b7f2e1ae3b780be97c8 /writerfilter/source/ooxml/OOXMLFactory.cxx
parent28f7f5f67cd6c064e703b3c4d3d2aa2f6286fb77 (diff)
writerfilter: introduce ooxml::OOXMLUniversalMeasureValue
In transitional DOCX, ST_UniversalMeasure is in practice a simple integer, which means twips. But in case of strict, ST_UniversalMeasure is in points in practice -- which is perfectly valid, but we didn't handle it so far. Add a separate Value class that is used only for handling ST_UniversalMeasure, then there we can handle the various additional suffixes. Change-Id: Iebb1ee859076595594d1455a1f826841dae77a0b
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFactory.cxx')
-rw-r--r--writerfilter/source/ooxml/OOXMLFactory.cxx12
1 files changed, 12 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 5d683cb9f0a3..8e2fa15bc0e1 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -202,6 +202,18 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
pFactory->attributeAction(pHandler, aIt->first, pValue);
}
break;
+ case RT_UniversalMeasure:
+ {
+#ifdef DEBUG_FACTORY
+ debug_logger->element("universalMeasure");
+#endif
+ OUString aValue(Attribs->getValue(aIt->first));
+ OOXMLFastHelper<OOXMLUniversalMeasureValue>::newProperty(pHandler, nId, aValue);
+
+ OOXMLValue::Pointer_t pValue(new OOXMLUniversalMeasureValue(aValue));
+ pFactory->attributeAction(pHandler, aIt->first, pValue);
+ }
+ break;
case RT_List:
{
#ifdef DEBUG_FACTORY