[Libreoffice-commits] .: toolkit/workben
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Wed Oct 27 05:20:46 PDT 2010
toolkit/workben/layout/wordcount-plain.xml | 26 +++++++++++++++++---------
toolkit/workben/layout/wordcount-tight.xml | 11 +++++++++--
toolkit/workben/layout/wordcount.xml | 13 +++++++++++--
toolkit/workben/layout/wordcountdialog.cxx | 13 ++++++-------
toolkit/workben/layout/wordcountdialog.hxx | 4 ++++
5 files changed, 47 insertions(+), 20 deletions(-)
New commits:
commit a3174e47363129e5c691464b4c911024c9507b0a
Author: Mattias Johnsson <m.t.johnsson at gmail.com>
Date: Wed Oct 27 18:05:28 2010 +1100
Add character count exclusive of whitespace to document statistics part 2
diff --git a/toolkit/workben/layout/wordcount-plain.xml b/toolkit/workben/layout/wordcount-plain.xml
index a7c34fe..5adce42 100644
--- a/toolkit/workben/layout/wordcount-plain.xml
+++ b/toolkit/workben/layout/wordcount-plain.xml
@@ -1,6 +1,6 @@
-<modaldialog sizeable="true" height="108" help-id="HID_DLG_WORDCOUNT" moveable="true" output-size="true" id="DLG_WORDCOUNT" sv-look="true" text="Word Count" width="170" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container">
+<modaldialog sizeable="true" height="132" help-id="HID_DLG_WORDCOUNT" moveable="true" output-size="true" id="DLG_WORDCOUNT" sv-look="true" text="Word Count" width="170" xmlns="http://openoffice.org/2007/layout" xmlns:cnt="http://openoffice.org/2007/layout/container">
<vbox>
<fixedline height="8" id="FL_CURRENT" text="Current selection" width="158" x="6" y="3"/>
<hbox>
@@ -11,19 +11,27 @@
<fixedtext height="8" id="FT_CURRENTCHARACTER" label="Characters:" width="80" x="12" y="26"/>
<fixedtext height="8" id="FI_CURRENTCHARACTER" right="true" width="50" x="111" y="26"/>
</hbox>
- <fixedline height="8" id="FL_DOC" text="Whole document" width="158" x="6" y="40"/>
<hbox>
- <fixedtext height="8" id="FT_DOCWORD" label="Words:" width="80" x="12" y="51"/>
- <fixedtext height="8" id="FI_DOCWORD" right="true" width="50" x="111" y="51"/>
+ <fixedtext height="8" id="FT_CURRENTCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" width="80" x="12" y="38"/>
+ <fixedtext height="8" id="FI_CURRENTCHARACTEREXCLUDINGSPACES" right="true" width="50" x="111" y="38"/>
</hbox>
+ <fixedline height="8" id="FL_DOC" text="Whole document" width="158" x="6" y="52"/>
<hbox>
- <fixedtext height="8" id="FT_DOCCHARACTER" label="Characters:" width="80" x="12" y="63"/>
- <fixedtext height="8" id="FI_DOCCHARACTER" right="true" width="50" x="111" y="63"/>
+ <fixedtext height="8" id="FT_DOCWORD" label="Words:" width="80" x="12" y="63"/>
+ <fixedtext height="8" id="FI_DOCWORD" right="true" width="50" x="111" y="63"/>
</hbox>
- <fixedline height="8" id="FL_BOTTOM" width="158" x="6" y="77"/>
<hbox>
- <okbutton defbutton="true" height="14" id="PB_OK" width="50" x="61" y="88"/>
- <helpbutton height="14" id="PB_HELP" width="50" x="114" y="88"/>
+ <fixedtext height="8" id="FT_DOCCHARACTER" label="Characters:" width="80" x="12" y="75"/>
+ <fixedtext height="8" id="FI_DOCCHARACTER" right="true" width="50" x="111" y="75"/>
+ </hbox>
+ <hbox>
+ <fixedtext height="8" id="FT_DOCCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" width="80" x="12" y="87"/>
+ <fixedtext height="8" id="FI_DOCCHARACTEREXCLUDINGSPACES" right="true" width="50" x="111" y="87"/>
+ </hbox>
+ <fixedline height="8" id="FL_BOTTOM" width="158" x="6" y="101"/>
+ <hbox>
+ <okbutton defbutton="true" height="14" id="PB_OK" width="50" x="61" y="112"/>
+ <helpbutton height="14" id="PB_HELP" width="50" x="114" y="112"/>
</hbox>
</vbox>
</modaldialog>
diff --git a/toolkit/workben/layout/wordcount-tight.xml b/toolkit/workben/layout/wordcount-tight.xml
index a9f6a7a..b9af6f7 100644
--- a/toolkit/workben/layout/wordcount-tight.xml
+++ b/toolkit/workben/layout/wordcount-tight.xml
@@ -16,14 +16,21 @@
<fixedtext id="FT_CURRENTCHARACTER" label="Characters:" cnt:padding="13"/>
<fixedinfo id="FI_CURRENTCHARACTER" right="true" label="00" cnt:padding="13"/>
</hbox>
+ <hbox>
+ <fixedtext id="FT_CURRENTCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" cnt:padding="13"/>
+ <fixedinfo id="FI_CURRENTCHARACTEREXCLUDINGSPACES" right="true" label="000" cnt:padding="13"/>
+ </hbox>
<fixedline id="FL_DOC" text="Whole document"/>
<hbox>
<fixedtext id="FT_DOCWORD" label="Words:" cnt:padding="13"/>
- <fixedinfo id="FI_DOCWORD" right="true" label="000" cnt:padding="13"/>
+ <fixedinfo id="FI_DOCWORD" right="true" label="0000" cnt:padding="13"/>
</hbox>
<hbox>
<fixedtext id="FT_DOCCHARACTER" label="Characters:" cnt:padding="13"/>
- <fixedinfo id="FI_DOCCHARACTER" right="true" label="0000" cnt:padding="13"/>
+ <fixedinfo id="FI_DOCCHARACTER" right="true" label="00000" cnt:padding="13"/>
+ </hbox>
+ <fixedtext id="FT_DOCCHARACTEREXCLUDINGSPACES" label="Characters excluding spaces:" cnt:padding="13"/>
+ <fixedinfo id="FI_DOCCHARACTEREXCLUDINGSPACES" right="true" label="000000" cnt:padding="13"/>
</hbox>
<fixedline cnt:padding="1" id="FL_BOTTOM"/>
<hbox border="5">
diff --git a/toolkit/workben/layout/wordcount.xml b/toolkit/workben/layout/wordcount.xml
index fa9d44f..4b4e362 100644
--- a/toolkit/workben/layout/wordcount.xml
+++ b/toolkit/workben/layout/wordcount.xml
@@ -23,6 +23,11 @@
<flow cnt:padding="60"/>
<fixedtext id="FI_CURRENTCHARACTER" right="true" _label="00"/>
</hbox>
+ <hbox>
+ <fixedtext id="FT_CURRENTCHARACTEREXCLUDINGSPACES" _label="Characters excluding spaces:"/>
+ <flow cnt:padding="60"/>
+ <fixedtext id="FI_CURRENTCHARACTEREXCLUDINGSPACES" right="true" _label="000"/>
+ </hbox>
</vbox>
</hbox>
<!-- if we could do cnt:cnt:padding="-12" here, we would not have to close
@@ -32,11 +37,15 @@
<vbox cnt:padding="12" spacing="6">
<hbox>
<fixedtext id="FT_DOCWORD" _label="Words:"/>
- <fixedtext id="FI_DOCWORD" right="true" _label="000"/>
+ <fixedtext id="FI_DOCWORD" right="true" _label="0000"/>
</hbox>
<hbox>
<fixedtext id="FT_DOCCHARACTER" _label="Characters:"/>
- <fixedtext id="FI_DOCCHARACTER" right="true" _label="0000"/>
+ <fixedtext id="FI_DOCCHARACTER" right="true" _label="00000"/>
+ </hbox>
+ <hbox>
+ <fixedtext id="FT_DOCCHARACTEREXCLUDINGSPACES" _label="Characters excluding spaces:"/>
+ <fixedtext id="FI_DOCCHARACTEREXCLUDINGSPACES" right="true" _label="000000"/>
</hbox>
</vbox>
</hbox>
diff --git a/toolkit/workben/layout/wordcountdialog.cxx b/toolkit/workben/layout/wordcountdialog.cxx
index e49ed21..f14f0c8 100644
--- a/toolkit/workben/layout/wordcountdialog.cxx
+++ b/toolkit/workben/layout/wordcountdialog.cxx
@@ -54,9 +54,6 @@
#include <helpid.h>
#endif /* ENABLE_LAYOUT */
-/*-- 06.04.2004 16:05:55---------------------------------------------------
-
- -----------------------------------------------------------------------*/
SwWordCountDialog::SwWordCountDialog(Window* pParent) :
SfxModalDialog(pParent, SW_RES(DLG_WORDCOUNT)),
#if defined _MSC_VER
@@ -67,12 +64,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,15 +86,11 @@ SwWordCountDialog::SwWordCountDialog(Window* pParent) :
#endif /* ENABLE_LAYOUT */
FreeResource();
}
-/*-- 06.04.2004 16:05:56---------------------------------------------------
- -----------------------------------------------------------------------*/
SwWordCountDialog::~SwWordCountDialog()
{
}
-/*-- 06.04.2004 16:05:57---------------------------------------------------
- -----------------------------------------------------------------------*/
void SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& rDoc)
{
#if TEST_LAYOUT
@@ -102,8 +99,10 @@ void SwWordCountDialog::SetValues(const SwDocStat& rCurrent, const SwDocStat& r
#else /* !TEST_LAYOUT */
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 ));
#endif /* !TEST_LAYOUT */
}
diff --git a/toolkit/workben/layout/wordcountdialog.hxx b/toolkit/workben/layout/wordcountdialog.hxx
index 72445e0..3d640ca 100644
--- a/toolkit/workben/layout/wordcountdialog.hxx
+++ b/toolkit/workben/layout/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