summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authoralexey.chemichev <alexey.chemichev@gmail.com>2015-11-19 08:47:55 -0500
committerMichael Stahl <mstahl@redhat.com>2015-11-19 14:44:53 +0000
commit24346dc6630471da65a2c19d767cb9deed73405a (patch)
tree53be14b6dde24ded9c99e3213019724d60aba990 /oox
parenta95f2e02e1ede0a0533312705aa27c82619ed340 (diff)
tdf#90904 Sorry, mixed Characters and CharactersWithSpaces at a first time
Without this patch Windows Explorer shows different "Character count" for the same text saved with MSW an LO. Now both stats are explicitly exported this way: NonWhitespaceCharacterCount -> XML_Characters CharacterCount -> XML_CharactersWithSpaces Change-Id: I0a3b827629e88ab5e09aa8440e5f19e7fba2d831 Reviewed-on: https://gerrit.libreoffice.org/20058 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/core/xmlfilterbase.cxx10
1 files changed, 8 insertions, 2 deletions
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index a89cc9d4fec8..aa202ffef82a 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -664,7 +664,6 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
writeElement( pAppProps, XML_HeadingPairs, "heading pairs" );
writeElement( pAppProps, XML_TitlesOfParts, "titles of parts" );
writeElement( pAppProps, XML_LinksUpToDate, "links up-to-date" );
- writeElement( pAppProps, XML_CharactersWithSpaces, "characters with spaces" );
writeElement( pAppProps, XML_SharedDoc, "shared doc" );
writeElement( pAppProps, XML_HyperlinkBase, "hyperlink base" );
writeElement( pAppProps, XML_HLinks, "hlinks" );
@@ -695,13 +694,20 @@ writeAppProperties( XmlFilterBase& rSelf, Reference< XDocumentProperties > xProp
writeElement(pAppProps, XML_Words, nValue);
}
- it = aStats.find("CharacterCount");
+ it = aStats.find("NonWhitespaceCharacterCount");
if (it != aStats.end())
{
if (it->second >>= nValue)
writeElement(pAppProps, XML_Characters, nValue);
}
+ it = aStats.find("CharacterCount");
+ if (it != aStats.end())
+ {
+ if (it->second >>= nValue)
+ writeElement(pAppProps, XML_CharactersWithSpaces, nValue);
+ }
+
it = aStats.find("ParagraphCount");
if (it != aStats.end())
{