diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-04-07 12:21:30 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-07 13:01:37 +0100 |
commit | 9526d1969da25189563a99476176842d38418b76 (patch) | |
tree | 646904b3cc4d8b2ba2d2b3df8b042f05773c47b6 /sw | |
parent | 74fdda0cd41d97b6c97d2115584ee48fd552514e (diff) |
Related: fdo#51818 format statistical numbers with locale rules
Change-Id: Ic21e93d55037a7971b2b6f7988f87c9b4eb01de5
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/ui/dialog/docstdlg.cxx | 20 | ||||
-rw-r--r-- | sw/uiconfig/swriter/ui/statisticsinfopage.ui | 30 |
2 files changed, 32 insertions, 18 deletions
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx index 0cb27d61fdd9..7cf70ba65dbc 100644 --- a/sw/source/ui/dialog/docstdlg.cxx +++ b/sw/source/ui/dialog/docstdlg.cxx @@ -34,6 +34,9 @@ #include <fldmgr.hxx> #include <fldbas.hxx> +#include <unotools/localedatawrapper.hxx> +#include <vcl/settings.hxx> + SfxTabPage * SwDocStatPage::Create(Window *pParent, const SfxItemSet &rSet) { return new SwDocStatPage(pParent, rSet); @@ -88,14 +91,15 @@ void SwDocStatPage::Reset(const SfxItemSet &/*rSet*/) // Description: update / set data void SwDocStatPage::SetData(const SwDocStat &rStat) { - m_pTableNo->SetText(OUString::number( rStat.nTbl )); - m_pGrfNo->SetText(OUString::number( rStat.nGrf )); - m_pOLENo->SetText(OUString::number( rStat.nOLE )); - m_pPageNo->SetText(OUString::number( rStat.nPage )); - m_pParaNo->SetText(OUString::number( rStat.nPara )); - m_pWordNo->SetText(OUString::number( rStat.nWord )); - m_pCharNo->SetText(OUString::number( rStat.nChar )); - m_pCharExclSpacesNo->SetText(OUString::number( rStat.nCharExcludingSpaces )); + const LocaleDataWrapper& rLocaleData = GetSettings().GetUILocaleDataWrapper(); + m_pTableNo->SetText(rLocaleData.getNum(rStat.nTbl, 0)); + m_pGrfNo->SetText(rLocaleData.getNum(rStat.nGrf, 0)); + m_pOLENo->SetText(rLocaleData.getNum(rStat.nOLE, 0)); + m_pPageNo->SetText(rLocaleData.getNum(rStat.nPage, 0)); + m_pParaNo->SetText(rLocaleData.getNum(rStat.nPara, 0)); + m_pWordNo->SetText(rLocaleData.getNum(rStat.nWord, 0)); + m_pCharNo->SetText(rLocaleData.getNum(rStat.nChar, 0)); + m_pCharExclSpacesNo->SetText(rLocaleData.getNum(rStat.nCharExcludingSpaces, 0)); } // Description: update statistics diff --git a/sw/uiconfig/swriter/ui/statisticsinfopage.ui b/sw/uiconfig/swriter/ui/statisticsinfopage.ui index 462e5990c347..e628534eb38b 100644 --- a/sw/uiconfig/swriter/ui/statisticsinfopage.ui +++ b/sw/uiconfig/swriter/ui/statisticsinfopage.ui @@ -1,6 +1,7 @@ <?xml version="1.0" encoding="UTF-8"?> +<!-- Generated with glade 3.16.1 --> <interface> - <!-- interface-requires gtk+ 3.0 --> + <requires lib="gtk+" version="3.0"/> <object class="GtkGrid" id="StatisticsInfoPage"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -157,8 +158,9 @@ <object class="GtkLabel" id="nopages"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -172,8 +174,9 @@ <object class="GtkLabel" id="notables"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -187,8 +190,9 @@ <object class="GtkLabel" id="nogrfs"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -202,8 +206,9 @@ <object class="GtkLabel" id="nooles"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -217,8 +222,9 @@ <object class="GtkLabel" id="noparas"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -232,8 +238,9 @@ <object class="GtkLabel" id="nowords"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -247,8 +254,9 @@ <object class="GtkLabel" id="nochars"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -262,8 +270,9 @@ <object class="GtkLabel" id="nocharsexspaces"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="width_chars">10</property> </object> <packing> @@ -292,8 +301,9 @@ <object class="GtkLabel" id="nolines"> <property name="visible">True</property> <property name="can_focus">False</property> + <property name="halign">start</property> <property name="hexpand">True</property> - <property name="xalign">0</property> + <property name="xalign">1</property> <property name="label">...</property> <property name="width_chars">10</property> </object> |