Hello

This patch add non blank count in Writter metafile information's.

Thanks in advance

Arnaud Versini
From b37a44cbc6e54a91570620dabe0c2f8a271d4a93 Mon Sep 17 00:00:00 2001
From: Arnaud Versini <[email protected]>
Date: Sat, 12 Mar 2011 17:24:32 +0100
Subject: [PATCH] Add non blank characters to metafile.

---
 sw/source/core/doc/doc.cxx |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 4eaed8b..344d6be 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1769,7 +1769,7 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
         rStat.bModified = FALSE;
         SetDocStat( rStat );
 
-        com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( rStat.nPage ? 7 : 6);
+        com::sun::star::uno::Sequence < com::sun::star::beans::NamedValue > aStat( rStat.nPage ? 8 : 7);
         sal_Int32 n=0;
         aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("TableCount"));
         aStat[n++].Value <<= (sal_Int32)rStat.nTbl;
@@ -1788,6 +1788,8 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
         aStat[n++].Value <<= (sal_Int32)rStat.nWord;
         aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CharacterCount"));
         aStat[n++].Value <<= (sal_Int32)rStat.nChar;
+        aStat[n].Name = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("NonWhitespaceCharacterCount"));
+        aStat[n++].Value <<= (sal_Int32)rStat.nCharExcludingSpaces;
 
         // For e.g. autotext documents there is no pSwgInfo (#i79945)
         SfxObjectShell * const pObjShell( GetDocShell() );
-- 
1.7.4.1

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to