From ce14342c4292628a641a72d4f63d9c048e030c6a Mon Sep 17 00:00:00 2001 From: Muhammad Haggag Date: Tue, 22 May 2012 16:59:37 +0200 Subject: fdo#34772 Add word count to the status bar in writer This change adds a new status bar control, "SwWordCountStatusBarControl". The control shows the number of words selected as well as the number of words in the whole document. Double-clicking the control launches the modeless word count dialog. Change-Id: I756183ab1aaf4d059e782dfb05508370178cfbe3 --- sw/sdi/_viewsh.sdi | 5 +++++ sw/sdi/swriter.sdi | 25 +++++++++++++++++++++++++ sw/sdi/viewsh.sdi | 23 ++++++++++++++--------- 3 files changed, 44 insertions(+), 9 deletions(-) (limited to 'sw/sdi') diff --git a/sw/sdi/_viewsh.sdi b/sw/sdi/_viewsh.sdi index a17fbb8f5742..d4486af83a36 100644 --- a/sw/sdi/_viewsh.sdi +++ b/sw/sdi/_viewsh.sdi @@ -317,6 +317,11 @@ interface BaseTextEditView ExecMethod = ExecuteStatusLine ; StateMethod = StateStatusLine ; ] + FN_STAT_WORDCOUNT // status() + [ + ExecMethod = ExecuteStatusLine ; + StateMethod = StateStatusLine ; + ] FN_STAT_BOOKMARK // status() [ ExecMethod = ExecuteStatusLine ; diff --git a/sw/sdi/swriter.sdi b/sw/sdi/swriter.sdi index edb780916471..89e1530ca803 100644 --- a/sw/sdi/swriter.sdi +++ b/sw/sdi/swriter.sdi @@ -8026,6 +8026,31 @@ SfxStringItem StateZoom FN_STAT_ZOOM GroupId = GID_EDIT; ] +//-------------------------------------------------------------------------- +SfxStringItem StateWordCount FN_STAT_WORDCOUNT +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = FALSE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Synchron; + + /* config: */ + AccelConfig = FALSE, + MenuConfig = FALSE, + StatusBarConfig = TRUE, + ToolBoxConfig = FALSE, + GroupId = GID_VIEW; +] + //-------------------------------------------------------------------------- SfxBoolItem SubScript FN_SET_SUB_SCRIPT diff --git a/sw/sdi/viewsh.sdi b/sw/sdi/viewsh.sdi index 1005c96040a1..d5d8380d29c9 100644 --- a/sw/sdi/viewsh.sdi +++ b/sw/sdi/viewsh.sdi @@ -275,8 +275,8 @@ interface TextPrintPreview [ StateMethod = StateUndo ; ] - //--------------------------------------------------------------------- - //Ab hier Statusleiste + //--------------------------------------------------------------------- + // Begin StatusBar FN_STAT_ZOOM // status() [ ExecMethod = Execute ; @@ -307,13 +307,18 @@ interface TextPrintPreview ExecMethod = Execute ; StateMethod = GetState ; ] - SID_ATTR_ZOOMSLIDER // status() - [ - ExecMethod = Execute ; - StateMethod = GetState ; - ] - //---------------------------------------------- - //End mit Statusleiste + SID_ATTR_ZOOMSLIDER // status() + [ + ExecMethod = Execute ; + StateMethod = GetState ; + ] + FN_STAT_WORDCOUNT // status() + [ + ExecMethod = Execute ; + StateMethod = GetState ; + ] + //---------------------------------------------- + // End StatusBar } //========================================================================= -- cgit