Hi,
I have submitted a patch for review:
https://gerrit.libreoffice.org/2013
To pull it, you can do:
git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/13/2013/1
Show character count with word count in writer statusbar, fdo#59962
Change-Id: I65f9ce6bc9851c97e25aaf5b131a4b319f00fed0
---
M sw/source/ui/app/app.src
M sw/source/ui/uiview/view2.cxx
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/sw/source/ui/app/app.src b/sw/source/ui/app/app.src
index 4bf6801..38f114f 100644
--- a/sw/source/ui/app/app.src
+++ b/sw/source/ui/app/app.src
@@ -594,12 +594,12 @@
String STR_STATUSBAR_WORDCOUNT_NO_SELECTION
{
- Text [ en-US ] = "Words: $1";
+ Text [ en-US ] = "Words (characters): $1 ($2)";
};
String STR_STATUSBAR_WORDCOUNT
{
- Text [ en-US ] = "Words: $1 Selected: $2";
+ Text [ en-US ] = "Words (characters): $1 ($2) Selected: $3 ($4)";
};
String STR_CONVERT_TEXT_TABLE
diff --git a/sw/source/ui/uiview/view2.cxx b/sw/source/ui/uiview/view2.cxx
index 33266ad..f5aff2a 100644
--- a/sw/source/ui/uiview/view2.cxx
+++ b/sw/source/ui/uiview/view2.cxx
@@ -1247,9 +1247,11 @@
const sal_uInt32 stringId = selectionStats.nWord? STR_STATUSBAR_WORDCOUNT :
STR_STATUSBAR_WORDCOUNT_NO_SELECTION;
rtl::OUString wordCount(SW_RES(stringId));
wordCount = wordCount.replaceAll("$1", OUString::number(documentStats.nWord));
+ wordCount = wordCount.replaceAll("$2", OUString::number(documentStats.nChar));
if (selectionStats.nWord)
{
- wordCount = wordCount.replaceAll("$2", OUString::number(selectionStats.nWord));
+ wordCount = wordCount.replaceAll("$3", OUString::number(selectionStats.nWord));
+ wordCount = wordCount.replaceAll("$4", OUString::number(selectionStats.nChar));
}
rSet.Put(SfxStringItem(FN_STAT_WORDCOUNT, wordCount));
--
To view, visit https://gerrit.libreoffice.org/2013
To unsubscribe, visit https://gerrit.libreoffice.org/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: I65f9ce6bc9851c97e25aaf5b131a4b319f00fed0
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Robert Roth <robert.roth.off@gmail.com>
Context
- [PATCH] Show character count with word count in writer statusbar, fd... · Robert Roth (via Code Review)
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.