diff options
author | Jan Holesovsky <kendy@collabora.com> | 2014-03-21 14:24:36 +0100 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2014-03-21 15:48:05 +0100 |
commit | 09e064adc51bf4a26a4f316d42945be9cfbd2c95 (patch) | |
tree | 64d15b8cb62eb13bcd6f1bcf9584012a83a3c5b1 /oox | |
parent | fdacaab2485fa42648ae96348b9ad6a9e1f49424 (diff) |
First check if this is the one we search for, then extract.
Change-Id: Ie98dc14b743983e68f126ed4b7a7f00b637957d3
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/core/xmlfilterbase.cxx | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx index 5fc7c87fc337..9c7ee32f3478 100644 --- a/oox/source/core/xmlfilterbase.cxx +++ b/oox/source/core/xmlfilterbase.cxx @@ -666,13 +666,12 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp uno::Sequence<beans::NamedValue> aStats = xProperties->getDocumentStatistics(); for (sal_Int32 i = 0; i < aStats.getLength(); ++i) { - sal_Int32 nValue = 0; - if (aStats[i].Value >>= nValue) + if (aStats[i].Name == "ParagraphCount") { - OUString aValue = OUString::number(nValue); - if (aStats[i].Name == "ParagraphCount") + sal_Int32 nValue = 0; + if (aStats[i].Value >>= nValue) { - writeElement(pAppProps, XML_Paragraphs, aValue); + writeElement(pAppProps, XML_Paragraphs, OUString::number(nValue)); break; } } |