summaryrefslogtreecommitdiff
path: root/sw/sdi
diff options
context:
space:
mode:
authorMuhammad Haggag <mhaggag@gmail.com>2012-05-22 16:59:37 +0200
committerTor Lillqvist <tlillqvist@suse.com>2012-05-25 09:53:33 +0300
commitce14342c4292628a641a72d4f63d9c048e030c6a (patch)
treee7fd22a2d4c21b470fe6e3b8fc2d11dd7f27866e /sw/sdi
parent89d6c3ef8ea691dbd3383cffe21e75c3200821de (diff)
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
Diffstat (limited to 'sw/sdi')
-rw-r--r--sw/sdi/_viewsh.sdi5
-rw-r--r--sw/sdi/swriter.sdi25
-rw-r--r--sw/sdi/viewsh.sdi23
3 files changed, 44 insertions, 9 deletions
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
@@ -8027,6 +8027,31 @@ SfxStringItem StateZoom FN_STAT_ZOOM
]
//--------------------------------------------------------------------------
+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
}
//=========================================================================