[Libreoffice-commits] .: 2 commits - sw/inc sw/source

Cédric Bosdonnat cbosdo at kemper.freedesktop.org
Wed Oct 27 05:20:51 PDT 2010


 sw/inc/docstat.hxx                      |    1 
 sw/inc/ndtxt.hxx                        |    2 
 sw/source/core/doc/docstat.cxx          |    2 
 sw/source/core/txtnode/txtedt.cxx       |  107 +++++++++++++++++---------------
 sw/source/ui/dialog/wordcountdialog.cxx |    6 +
 sw/source/ui/dialog/wordcountdialog.hrc |   30 +++++---
 sw/source/ui/dialog/wordcountdialog.src |   42 +++++++++---
 sw/source/ui/inc/wordcountdialog.hxx    |    4 +
 8 files changed, 123 insertions(+), 71 deletions(-)

New commits:
commit e784df90e8f253ee582aadadfaa0cef0cd5da844
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date:   Wed Oct 27 14:21:41 2010 +0200

    Fixed a word length minimum that was removed

diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index 0aa9931..9f05346 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -1914,12 +1914,12 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
 
                     while ( aScanner.NextWord() )
                     {
-
-                        if(CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
-                        {
+                        if( aScanner.GetLen()  > 1 ||
+                            CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
                             ++nTmpWords;
+
+                        if( CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
                             nTmpCharsExcludingSpaces += aScanner.GetLen();
-                        }
 
                     }
                 }
commit 339eee93fd2a888b541eac4e7576d7091dfd1639
Author: Mattias Johnsson <m.t.johnsson at gmail.com>
Date:   Wed Oct 27 18:01:43 2010 +1100

    Add character count exclusive of whitespace to document statistics part 1

diff --git a/sw/inc/docstat.hxx b/sw/inc/docstat.hxx
index a818e2f..8b156bf 100644
--- a/sw/inc/docstat.hxx
+++ b/sw/inc/docstat.hxx
@@ -44,6 +44,7 @@ struct SW_DLLPUBLIC SwDocStat
     ULONG           nAllPara;
     ULONG			nWord;
     ULONG			nChar;
+    ULONG			nCharExcludingSpaces;
     BOOL			bModified;
 
     SwDocStat();
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 08410b0..713a30b 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -189,6 +189,8 @@ class SW_DLLPUBLIC SwTxtNode: public SwCntntNode, public ::sfx2::Metadatable
     SW_DLLPRIVATE ULONG GetParaNumberOfWords() const;
     SW_DLLPRIVATE void SetParaNumberOfChars( ULONG nTmpChars ) const;
     SW_DLLPRIVATE ULONG GetParaNumberOfChars() const;
+    SW_DLLPRIVATE void SetParaNumberOfCharsExcludingSpaces( ULONG nTmpChars ) const;
+    SW_DLLPRIVATE ULONG GetParaNumberOfCharsExcludingSpaces() const;
     SW_DLLPRIVATE void InitSwParaStatistics( bool bNew );
 
     /** create number for this text node, if not already existing
diff --git a/sw/source/core/doc/docstat.cxx b/sw/source/core/doc/docstat.cxx
index b75a057..e2bef7f 100644
--- a/sw/source/core/doc/docstat.cxx
+++ b/sw/source/core/doc/docstat.cxx
@@ -46,6 +46,7 @@ SwDocStat::SwDocStat() :
     nAllPara(1),
     nWord(0),
     nChar(0),
+    nCharExcludingSpaces(0),
     bModified(TRUE)
 {}
 
@@ -63,6 +64,7 @@ void SwDocStat::Reset()
     nAllPara= 1;
     nWord 	= 0;
     nChar	= 0;
+    nCharExcludingSpaces = 0;
     bModified = TRUE;
 }
 
diff --git a/sw/source/core/txtnode/txtedt.cxx b/sw/source/core/txtnode/txtedt.cxx
index aa8faaa..0aa9931 100644
--- a/sw/source/core/txtnode/txtedt.cxx
+++ b/sw/source/core/txtnode/txtedt.cxx
@@ -2,7 +2,7 @@
 /*************************************************************************
  *
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- * 
+ *
  * Copyright 2000, 2010 Oracle and/or its affiliates.
  *
  * OpenOffice.org - a multi-platform office productivity suite
@@ -93,7 +93,6 @@
 
 #include <vector>
 
-
 using rtl::OUString;
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::frame;
@@ -385,7 +384,7 @@ inline BOOL InRange(xub_StrLen nIdx, xub_StrLen nStart, xub_StrLen nEnd) {
 
 /* 5 cases:
  * 1) The attribute is completely in the deletion range:
- *    -> delete it 
+ *    -> delete it
  * 2) The end of the attribute is in the deletion range:
  *    -> delete it, then re-insert it with new end
  * 3) The start of the attribute is in the deletion range:
@@ -481,7 +480,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
             continue;
         }
 
-
         if( nStt <= nAttrStart )          // Faelle: 1,3,5
         {
             if( nEnd > nAttrStart
@@ -599,7 +597,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
                                 nsSetAttrMode::SETATTR_NOHINTADJUST );
                         }
 
-
                         // jetzt kein i+1, weil das eingefuegte Attribut
                         // ein anderes auf die Position geschoben hat !
                         continue;
@@ -624,8 +621,6 @@ void SwTxtNode::RstAttr(const SwIndex &rIdx, xub_StrLen nLen, USHORT nWhich,
     }
 }
 
-
-
 /*************************************************************************
  *				  SwTxtNode::GetCurWord()
  *
@@ -810,7 +805,6 @@ BOOL SwScanner::NextWord()
     return TRUE;
 }
 
-
 USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
 {
     // Die Aehnlichkeiten zu SwTxtFrm::_AutoSpell sind beabsichtigt ...
@@ -938,7 +932,6 @@ USHORT SwTxtNode::Spell(SwSpellArgs* pArgs)
     return pArgs->xSpellAlt.is() ? 1 : 0;
 }
 
-
 void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
     LanguageType nLang, USHORT nLangWhichId,
     const Font *pFont,  USHORT nFontWhichId )
@@ -974,7 +967,6 @@ void SwTxtNode::SetLanguageAndFont( const SwPaM &rPaM,
 
 }
 
-
 USHORT SwTxtNode::Convert( SwConversionArgs &rArgs )
 {
     // get range of text within node to be converted
@@ -1405,7 +1397,6 @@ SwRect SwTxtFrm::SmartTagScan( SwCntntNode* /*pActNode*/, xub_StrLen /*nActPos*/
     return aRet;
 }
 
-
 // Wird vom CollectAutoCmplWords gerufen
 void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
 {
@@ -1421,7 +1412,6 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
     xub_StrLen nLen;
     BOOL bACWDirty = FALSE, bAnyWrd = FALSE;
 
-
     if( nBegin < nEnd )
     {
         USHORT nCnt = 200;
@@ -1457,7 +1447,6 @@ void SwTxtFrm::CollectAutoCmplWrds( SwCntntNode* pActNode, xub_StrLen nActPos )
         pNode->SetAutoCompleteWordDirty( FALSE );
 }
 
-
 /*************************************************************************
  *						SwTxtNode::Hyphenate
  *************************************************************************/
@@ -1518,7 +1507,6 @@ BOOL SwTxtNode::Hyphenate( SwInterHyphInfo &rHyphInf )
 // globale Variable
 SwLinguStatistik aSwLinguStat;
 
-
 void SwLinguStatistik::Flush()
 {
     if ( !nWords )
@@ -1586,7 +1574,6 @@ void SwLinguStatistik::Flush()
 
 #endif
 
-
 struct TransliterationChgData
 {
     xub_StrLen              nStart;
@@ -1596,25 +1583,25 @@ struct TransliterationChgData
 };
 
 // change text to Upper/Lower/Hiragana/Katagana/...
-void SwTxtNode::TransliterateText( 
+void SwTxtNode::TransliterateText(
     utl::TransliterationWrapper& rTrans,
-    xub_StrLen nStt, xub_StrLen nEnd, 
+    xub_StrLen nStt, xub_StrLen nEnd,
     SwUndoTransliterate* pUndo )
 {
     if (nStt < nEnd && pBreakIt->GetBreakIter().is())
     {
         // since we don't use Hiragana/Katakana or half-width/full-width transliterations here
-        // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will 
+        // it is fine to use ANYWORD_IGNOREWHITESPACES. (ANY_WORD btw is broken and will
         // occasionaly miss words in consecutive sentences). Also with ANYWORD_IGNOREWHITESPACES
         // text like 'just-in-time' will be converted to 'Just-In-Time' which seems to be the
         // proper thing to do.
         const sal_Int16 nWordType = WordType::ANYWORD_IGNOREWHITESPACES;
 
         //! In order to have less trouble with changing text size, e.g. because
-        //! of ligatures or � (German small sz) being resolved, we need to process 
-        //! the text replacements from end to start. 
-        //! This way the offsets for the yet to be changed words will be 
-        //! left unchanged by the already replaced text. 
+        //! of ligatures or � (German small sz) being resolved, we need to process
+        //! the text replacements from end to start.
+        //! This way the offsets for the yet to be changed words will be
+        //! left unchanged by the already replaced text.
         //! For this we temporarily save the changes to be done in this vector
         std::vector< TransliterationChgData >   aChanges;
         TransliterationChgData                  aChgData;
@@ -1686,19 +1673,19 @@ void SwTxtNode::TransliterateText(
         {
             // for 'sentence case' we need to iterate sentence by sentence
 
-            sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence( 
-                    GetTxt(), nEnd, 
+            sal_Int32 nLastStart = pBreakIt->GetBreakIter()->beginOfSentence(
+                    GetTxt(), nEnd,
                     pBreakIt->GetLocale( GetLang( nEnd ) ) );
-            sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                    GetTxt(), nLastStart, 
+            sal_Int32 nLastEnd = pBreakIt->GetBreakIter()->endOfSentence(
+                    GetTxt(), nLastStart,
                     pBreakIt->GetLocale( GetLang( nLastStart ) ) );
-            
+
             // extend nStt, nEnd to the current sentence boundaries
-            sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( 
-                    GetTxt(), nStt, 
+            sal_Int32 nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence(
+                    GetTxt(), nStt,
                     pBreakIt->GetLocale( GetLang( nStt ) ) );
-            sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                    GetTxt(), nCurrentStart, 
+            sal_Int32 nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+                    GetTxt(), nCurrentStart,
                     pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
 
             // prevent backtracking to the previous sentence if selection starts at end of a sentence
@@ -1706,19 +1693,19 @@ void SwTxtNode::TransliterateText(
             {
                 // now nCurrentStart is probably located on a non-letter word. (unless we
                 // are in Asian text with no spaces...)
-                // Thus to get the real sentence start we should locate the next real word, 
+                // Thus to get the real sentence start we should locate the next real word,
                 // that is one found by DICTIONARY_WORD
-                i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord( 
+                i18n::Boundary aBndry = pBreakIt->GetBreakIter()->nextWord(
                         GetTxt(), nCurrentEnd,
                         pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
                         i18n::WordType::DICTIONARY_WORD);
 
                 // now get new current sentence boundaries
-                nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence( 
-                        GetTxt(), aBndry.startPos, 
+                nCurrentStart = pBreakIt->GetBreakIter()->beginOfSentence(
+                        GetTxt(), aBndry.startPos,
                         pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
-                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                        GetTxt(), nCurrentStart, 
+                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+                        GetTxt(), nCurrentStart,
                         pBreakIt->GetLocale( GetLang( nCurrentStart) ) );
             }
             // prevent advancing to the next sentence if selection ends at start of a sentence
@@ -1726,14 +1713,14 @@ void SwTxtNode::TransliterateText(
             {
                 // now nCurrentStart is probably located on a non-letter word. (unless we
                 // are in Asian text with no spaces...)
-                // Thus to get the real sentence start we should locate the previous real word, 
+                // Thus to get the real sentence start we should locate the previous real word,
                 // that is one found by DICTIONARY_WORD
-                i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord( 
-                        GetTxt(), nLastStart, 
+                i18n::Boundary aBndry = pBreakIt->GetBreakIter()->previousWord(
+                        GetTxt(), nLastStart,
                         pBreakIt->GetLocale( GetLang( nLastStart) ),
                         i18n::WordType::DICTIONARY_WORD);
-                nLastEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                        GetTxt(), aBndry.startPos, 
+                nLastEnd = pBreakIt->GetBreakIter()->endOfSentence(
+                        GetTxt(), aBndry.startPos,
                         pBreakIt->GetLocale( GetLang( aBndry.startPos) ) );
                 if (nCurrentEnd > nLastEnd)
                     nCurrentEnd = nLastEnd;
@@ -1748,7 +1735,7 @@ void SwTxtNode::TransliterateText(
 #endif
 
                 Sequence <sal_Int32> aOffsets;
-                String sChgd( rTrans.transliterate( GetTxt(), 
+                String sChgd( rTrans.transliterate( GetTxt(),
                         GetLang( nCurrentStart ), nCurrentStart, nLen, &aOffsets ));
 
                 if (!m_Text.Equals( sChgd, nStt, nLen ))
@@ -1766,8 +1753,8 @@ void SwTxtNode::TransliterateText(
                         pBreakIt->GetLocale( GetLang( nCurrentEnd ) ),
                         nWordType);
                 nCurrentStart = aFirstWordBndry.startPos;
-                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence( 
-                        GetTxt(), nCurrentStart, 
+                nCurrentEnd = pBreakIt->GetBreakIter()->endOfSentence(
+                        GetTxt(), nCurrentStart,
                         pBreakIt->GetLocale( GetLang( nCurrentStart ) ) );
             }
         }
@@ -1830,7 +1817,6 @@ void SwTxtNode::TransliterateText(
     }
 }
 
-
 void SwTxtNode::ReplaceTextOnly( xub_StrLen nPos, xub_StrLen nLen,
                                 const XubString& rText,
                                 const Sequence<sal_Int32>& rOffsets )
@@ -1886,6 +1872,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
             ++rStat.nPara;
             ULONG nTmpWords = 0;
             ULONG nTmpChars = 0;
+            ULONG nTmpCharsExcludingSpaces = 0;  // Number of characters in actual words (i.e. excluding spaces)
 
             // Shortcut: Whole paragraph should be considered and cached values
             // are valid:
@@ -1893,6 +1880,7 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
             {
                 nTmpWords = GetParaNumberOfWords();
                 nTmpChars = GetParaNumberOfChars();
+                nTmpCharsExcludingSpaces = GetParaNumberOfCharsExcludingSpaces();
             }
             else
             {
@@ -1926,9 +1914,13 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
 
                     while ( aScanner.NextWord() )
                     {
-                        if ( aScanner.GetLen() > 1 ||
-                             CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ) )
+
+                        if(CH_TXTATR_BREAKWORD != aExpandText.match(aBreakWord, aScanner.GetBegin() ))
+                        {
                             ++nTmpWords;
+                            nTmpCharsExcludingSpaces += aScanner.GetLen();
+                        }
+
                     }
                 }
 
@@ -1972,12 +1964,14 @@ void SwTxtNode::CountWords( SwDocStat& rStat,
                 {
                     SetParaNumberOfWords( nTmpWords );
                     SetParaNumberOfChars( nTmpChars );
+                    SetParaNumberOfCharsExcludingSpaces( nTmpCharsExcludingSpaces );
                     SetWordCountDirty( false );
                 }
             }
 
             rStat.nWord += nTmpWords;
             rStat.nChar += nTmpChars;
+            rStat.nCharExcludingSpaces += nTmpCharsExcludingSpaces;
         }
     }
 }
@@ -1992,6 +1986,7 @@ struct SwParaIdleData_Impl
     SwWrongList* pSmartTags;
     ULONG nNumberOfWords;
     ULONG nNumberOfChars;
+    ULONG nNumberOfCharsExcludingSpaces;
     bool bWordCountDirty        : 1;
     bool bWrongDirty            : 1;    // Ist das Wrong-Feld auf invalid?
     bool bGrammarCheckDirty     : 1;
@@ -2004,6 +1999,7 @@ struct SwParaIdleData_Impl
         pSmartTags          ( 0 ),
         nNumberOfWords      ( 0 ),
         nNumberOfChars      ( 0 ),
+        nNumberOfCharsExcludingSpaces      ( 0 ),
         bWordCountDirty     ( true ),
         bWrongDirty         ( true ),
         bGrammarCheckDirty  ( true ),
@@ -2051,7 +2047,6 @@ const SwWrongList* SwTxtNode::GetWrong() const
 }
 // <--
 
-
 void SwTxtNode::SetGrammarCheck( SwGrammarMarkUp* pNew, bool bDelete )
 {
     if ( m_pParaIdleData_Impl )
@@ -2118,6 +2113,20 @@ void SwTxtNode::SetWordCountDirty( bool bNew ) const
         m_pParaIdleData_Impl->bWordCountDirty = bNew;
     }
 }
+
+ULONG SwTxtNode::GetParaNumberOfCharsExcludingSpaces() const
+{
+    return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces : 0;
+}
+
+void SwTxtNode::SetParaNumberOfCharsExcludingSpaces( ULONG nNew ) const
+{
+    if ( m_pParaIdleData_Impl )
+    {
+        m_pParaIdleData_Impl->nNumberOfCharsExcludingSpaces = nNew;
+    }
+}
+
 bool SwTxtNode::IsWordCountDirty() const
 {
     return m_pParaIdleData_Impl ? m_pParaIdleData_Impl->bWordCountDirty : 0;
diff --git a/sw/source/ui/dialog/wordcountdialog.cxx b/sw/source/ui/dialog/wordcountdialog.cxx
index 113fe2b..808e169 100644
--- a/sw/source/ui/dialog/wordcountdialog.cxx
+++ b/sw/source/ui/dialog/wordcountdialog.cxx
@@ -58,12 +58,16 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) :
     aCurrentWordFI( this, SW_RES(          FI_CURRENTWORD        )),
     aCurrentCharacterFT( this, SW_RES(     FT_CURRENTCHARACTER   )),
     aCurrentCharacterFI( this, SW_RES(     FI_CURRENTCHARACTER   )),
+    aCurrentCharacterExcludingSpacesFT( this, SW_RES(     FT_CURRENTCHARACTEREXCLUDINGSPACES   )),
+    aCurrentCharacterExcludingSpacesFI( this, SW_RES(     FI_CURRENTCHARACTEREXCLUDINGSPACES   )),
 
     aDocFL( this, SW_RES(                  FL_DOC                )),
     aDocWordFT( this, SW_RES(              FT_DOCWORD            )),
     aDocWordFI( this, SW_RES(              FI_DOCWORD            )),
     aDocCharacterFT( this, SW_RES(         FT_DOCCHARACTER       )),
     aDocCharacterFI( this, SW_RES(         FI_DOCCHARACTER       )),
+    aDocCharacterExcludingSpacesFT( this, SW_RES(         FT_DOCCHARACTEREXCLUDINGSPACES       )),
+    aDocCharacterExcludingSpacesFI( this, SW_RES(         FI_DOCCHARACTEREXCLUDINGSPACES       )),
     aBottomFL(this, SW_RES(                FL_BOTTOM             )),
     aOK( this, SW_RES(                     PB_OK                 )),
     aHelp( this, SW_RES(                   PB_HELP               ))
@@ -85,8 +89,10 @@ void  SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& r
 {
     aCurrentWordFI.SetText(     String::CreateFromInt32(rCurrent.nWord ));
     aCurrentCharacterFI.SetText(String::CreateFromInt32(rCurrent.nChar ));
+    aCurrentCharacterExcludingSpacesFI.SetText(String::CreateFromInt32(rCurrent.nCharExcludingSpaces ));
     aDocWordFI.SetText(         String::CreateFromInt32(rDoc.nWord ));
     aDocCharacterFI.SetText(    String::CreateFromInt32(rDoc.nChar ));
+    aDocCharacterExcludingSpacesFI.SetText(    String::CreateFromInt32(rDoc.nCharExcludingSpaces ));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/ui/dialog/wordcountdialog.hrc b/sw/source/ui/dialog/wordcountdialog.hrc
index ccb6391..f8b64c8 100644
--- a/sw/source/ui/dialog/wordcountdialog.hrc
+++ b/sw/source/ui/dialog/wordcountdialog.hrc
@@ -26,18 +26,22 @@
  ************************************************************************/
 #ifndef SW_WORDCOUNTDIALOG_HRC
 #define SW_WORDCOUNTDIALOG_HRC
-#define FL_CURRENT                  1
-#define FT_CURRENTWORD              2
-#define FI_CURRENTWORD              3
-#define FT_CURRENTCHARACTER         4
-#define FI_CURRENTCHARACTER         5
-#define FL_DOC                      6
-#define FT_DOCWORD                  7
-#define FI_DOCWORD                  8
-#define FT_DOCCHARACTER             9
-#define FI_DOCCHARACTER             10
-#define FL_BOTTOM                   11
-#define PB_OK                       12
-#define PB_HELP                     13
+#define FL_CURRENT                                1
+#define FT_CURRENTWORD                            2
+#define FI_CURRENTWORD                            3
+#define FT_CURRENTCHARACTER                       4
+#define FI_CURRENTCHARACTER                       5
+#define FT_CURRENTCHARACTEREXCLUDINGSPACES        6
+#define FI_CURRENTCHARACTEREXCLUDINGSPACES        7
+#define FL_DOC                                    8
+#define FT_DOCWORD                                9
+#define FI_DOCWORD                               10
+#define FT_DOCCHARACTER                          11
+#define FI_DOCCHARACTER                          12
+#define FT_DOCCHARACTEREXCLUDINGSPACES           13
+#define FI_DOCCHARACTEREXCLUDINGSPACES           14
+#define FL_BOTTOM                                15
+#define PB_OK                                    16
+#define PB_HELP                                  17
 
 #endif
diff --git a/sw/source/ui/dialog/wordcountdialog.src b/sw/source/ui/dialog/wordcountdialog.src
index d2d4676..359d95e 100644
--- a/sw/source/ui/dialog/wordcountdialog.src
+++ b/sw/source/ui/dialog/wordcountdialog.src
@@ -32,7 +32,7 @@ ModalDialog DLG_WORDCOUNT
     HelpID = HID_DLG_WORDCOUNT ;
     OutputSize = TRUE ;
     SVLook = TRUE ;
-    Size = MAP_APPFONT ( 170 , 108 ) ;
+    Size = MAP_APPFONT ( 170 , 132 ) ;
     Text [ en-US ] = "Word Count" ;
     Moveable = TRUE ;
 
@@ -66,50 +66,74 @@ ModalDialog DLG_WORDCOUNT
         Size = MAP_APPFONT ( 50 , 8 ) ;
         Right = TRUE;
     };
+    FixedText       FT_CURRENTCHARACTEREXCLUDINGSPACES
+    {
+        Pos = MAP_APPFONT ( 12 , 38 ) ;
+        Size = MAP_APPFONT ( 80 , 8 ) ;
+        Text [ en-US ] = "Characters excluding spaces:";
+    };
+    FixedText       FI_CURRENTCHARACTEREXCLUDINGSPACES
+    {
+        Pos = MAP_APPFONT ( 111 , 38 ) ;
+        Size = MAP_APPFONT ( 50 , 8 ) ;
+        Right = TRUE;
+    };
     FixedLine       FL_DOC
     {
-        Pos = MAP_APPFONT (  6, 40 ) ;
+        Pos = MAP_APPFONT (  6, 52 ) ;
         Size = MAP_APPFONT ( 158 , 8 ) ;
         Text [ en-US ] = "Whole document";
     };
     FixedText       FT_DOCWORD
     {
-        Pos = MAP_APPFONT (  12, 51 ) ;
+        Pos = MAP_APPFONT (  12, 63 ) ;
         Size = MAP_APPFONT ( 80 , 8 ) ;
         Text [ en-US ] = "Words:";
     };
     FixedText       FI_DOCWORD
     {
-        Pos = MAP_APPFONT ( 111 , 51 ) ;
+        Pos = MAP_APPFONT ( 111 , 63 ) ;
         Size = MAP_APPFONT ( 50 , 8 ) ;
         Right = TRUE;
     };
     FixedText       FT_DOCCHARACTER
     {
-        Pos = MAP_APPFONT ( 12 , 63 ) ;
+        Pos = MAP_APPFONT ( 12 , 75 ) ;
         Size = MAP_APPFONT ( 80 , 8 ) ;
         Text [ en-US ] = "Characters:";
     };
     FixedText       FI_DOCCHARACTER
     {
-        Pos = MAP_APPFONT (  111, 63 ) ;
+        Pos = MAP_APPFONT (  111, 75 ) ;
+        Size = MAP_APPFONT (  50, 8 ) ;
+        Right = TRUE;
+    };
+    FixedText       FT_DOCCHARACTEREXCLUDINGSPACES
+    {
+        Pos = MAP_APPFONT ( 12 , 87 ) ;
+        Size = MAP_APPFONT ( 80 , 8 ) ;
+        Text [ en-US ] = "Characters excluding spaces:";
+    };
+    FixedText       FI_DOCCHARACTEREXCLUDINGSPACES
+    {
+        Pos = MAP_APPFONT (  111, 87 ) ;
         Size = MAP_APPFONT (  50, 8 ) ;
         Right = TRUE;
     };
     FixedLine  FL_BOTTOM
     {
-        Pos = MAP_APPFONT ( 6 , 77 ) ;
+        Pos = MAP_APPFONT ( 6 , 101 ) ;
         Size = MAP_APPFONT ( 158 , 8 ) ;
     };
     OKButton        PB_OK
     {
-        Pos = MAP_APPFONT ( 61 , 88 ) ;
+        Pos = MAP_APPFONT ( 61 , 112 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
         DefButton = TRUE ;
     };
     HelpButton      PB_HELP
     {
-        Pos = MAP_APPFONT ( 114 , 88 ) ;
+        Pos = MAP_APPFONT ( 114 , 112 ) ;
         Size = MAP_APPFONT ( 50 , 14 ) ;
     };
 };
diff --git a/sw/source/ui/inc/wordcountdialog.hxx b/sw/source/ui/inc/wordcountdialog.hxx
index 72445e0..3d640ca 100644
--- a/sw/source/ui/inc/wordcountdialog.hxx
+++ b/sw/source/ui/inc/wordcountdialog.hxx
@@ -40,12 +40,16 @@ class SwWordCountDialog : public SfxModalDialog
     FixedInfo       aCurrentWordFI;
     FixedText       aCurrentCharacterFT;
     FixedInfo       aCurrentCharacterFI;
+    FixedText       aCurrentCharacterExcludingSpacesFT;
+    FixedInfo       aCurrentCharacterExcludingSpacesFI;
 
     FixedLine       aDocFL;
     FixedText       aDocWordFT;
     FixedInfo       aDocWordFI;
     FixedText       aDocCharacterFT;
     FixedInfo       aDocCharacterFI;
+    FixedText       aDocCharacterExcludingSpacesFT;
+    FixedInfo       aDocCharacterExcludingSpacesFI;
 
     FixedLine       aBottomFL;
 


More information about the Libreoffice-commits mailing list