summaryrefslogtreecommitdiff
path: root/writerfilter/source/ooxml/OOXMLFactory.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2017-07-24 13:43:28 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2017-07-24 16:30:48 +0200
commit8c7c72c8f8a1c8c09ee7cd4f413611c456f336b2 (patch)
tree90a76ce5930d6b5ece590e276f5768791f328e10 /writerfilter/source/ooxml/OOXMLFactory.cxx
parent26dd5d4614e5968f111b77a3f03129a6a2a7c0c7 (diff)
tdf#109306: consider percent unit specification for table sizes
According to ECMA-376-1:2016, ST_MeasurementOrPercent (the type of "w:w" attribute of table sizes) is allowed to have this specification (and then is expected to be a floating-point value). First edition of the standard (of 2006) only defined this attribute to contain int32 value (of fiftieths of percent when holding relative widths). Unit test included. Change-Id: I700912e4eb07430e55fe1d169d99e8e7e0e1a00b Reviewed-on: https://gerrit.libreoffice.org/40361 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'writerfilter/source/ooxml/OOXMLFactory.cxx')
-rw-r--r--writerfilter/source/ooxml/OOXMLFactory.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/writerfilter/source/ooxml/OOXMLFactory.cxx b/writerfilter/source/ooxml/OOXMLFactory.cxx
index 12f6237ea996..c164ff949757 100644
--- a/writerfilter/source/ooxml/OOXMLFactory.cxx
+++ b/writerfilter/source/ooxml/OOXMLFactory.cxx
@@ -114,6 +114,15 @@ void OOXMLFactory::attributes(OOXMLFastContextHandler * pHandler,
pFactory->attributeAction(pHandler, nToken, xValue);
}
break;
+ case ResourceType::MeasurementOrPercent:
+ {
+ const char *pValue = "";
+ pAttribs->getAsChar(nToken, pValue);
+ OOXMLValue::Pointer_t xValue(new OOXMLMeasurementOrPercentValue(pValue));
+ pHandler->newProperty(nId, xValue);
+ pFactory->attributeAction(pHandler, nToken, xValue);
+ }
+ break;
case ResourceType::List:
{
sal_uInt32 nValue;