summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/source/items/frmitems.cxx46
-rw-r--r--sc/CppunitTest_sc_ucalc.mk1
-rw-r--r--sc/Library_sc.mk1
-rw-r--r--sc/source/core/data/docpool.cxx11
-rw-r--r--sd/CppunitTest_sd_uimpress.mk1
-rw-r--r--sd/Library_sd.mk1
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx4
-rw-r--r--svx/Library_svxcore.mk1
-rw-r--r--svx/source/svdraw/svdattr.cxx7
-rw-r--r--svx/source/xoutdev/xattr2.cxx8
-rw-r--r--sw/source/ui/ribbar/workctrl.cxx8
-rw-r--r--sw/source/ui/utlui/unotools.cxx5
12 files changed, 72 insertions, 22 deletions
diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 6fd91136ec60..69bdcf16f630 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -43,6 +43,7 @@
#include <com/sun/star/frame/status/UpperLowerMarginScale.hpp>
#include <com/sun/star/drawing/ShadingPattern.hpp>
+#include <i18nutil/unicode.hxx>
#include <unotools/securityoptions.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <limits.h>
@@ -56,6 +57,7 @@
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
#include <vcl/graphicfilter.hxx>
+#include <vcl/svapp.hxx>
#include <editeng/editids.hrc>
#include <editeng/editrids.hrc>
#include <editeng/pbinitem.hxx>
@@ -600,19 +602,28 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
{
if ( 100 != nPropLeftMargin )
- rText = OUString::number( nPropLeftMargin ) + "%";
+ {
+ rText = unicode::formatPercent(nPropLeftMargin,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
rText = GetMetricText( (long)nLeftMargin,
eCoreUnit, ePresUnit, pIntl );
rText += OUString(cpDelim);
if ( 100 != nPropFirstLineOfst )
- rText = rText + OUString::number( nPropFirstLineOfst ) + "%";
+ {
+ rText += unicode::formatPercent(nPropFirstLineOfst,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
rText += GetMetricText( (long)nFirstLineOfst,
eCoreUnit, ePresUnit, pIntl );
rText += OUString(cpDelim);
if ( 100 != nRightMargin )
- rText = rText + OUString::number( nRightMargin ) + "%";
+ {
+ rText += unicode::formatPercent(nRightMargin,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
rText += GetMetricText( (long)nRightMargin,
eCoreUnit, ePresUnit, pIntl );
@@ -622,7 +633,8 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation
{
rText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
- rText += OUString::number( nPropLeftMargin ) + "%";
+ rText += unicode::formatPercent(nPropLeftMargin,
+ Application::GetSettings().GetUILanguageTag());
else
{
rText = rText +
@@ -634,7 +646,8 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation
{
rText += EE_RESSTR(RID_SVXITEMS_LRSPACE_FLINE);
if ( 100 != nPropFirstLineOfst )
- rText = rText + OUString::number( nPropFirstLineOfst ) + "%";
+ rText = rText + unicode::formatPercent(nPropFirstLineOfst,
+ Application::GetSettings().GetUILanguageTag());
else
{
rText = rText +
@@ -646,7 +659,8 @@ SfxItemPresentation SvxLRSpaceItem::GetPresentation
}
rText += EE_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT);
if ( 100 != nPropRightMargin )
- rText = rText + OUString::number( nPropRightMargin ) + "%";
+ rText = rText + unicode::formatPercent(nPropRightMargin,
+ Application::GetSettings().GetUILanguageTag());
else
{
rText = rText +
@@ -961,12 +975,18 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation
case SFX_ITEM_PRESENTATION_NAMELESS:
{
if ( 100 != nPropUpper )
- rText = OUString::number( nPropUpper ) + "%";
+ {
+ rText = unicode::formatPercent(nPropUpper,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
rText = GetMetricText( (long)nUpper, eCoreUnit, ePresUnit, pIntl );
rText += OUString(cpDelim);
if ( 100 != nPropLower )
- rText += OUString::number( nPropLower ) + "%";
+ {
+ rText += unicode::formatPercent(nPropLower,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
rText += GetMetricText( (long)nLower, eCoreUnit, ePresUnit, pIntl );
return SFX_ITEM_PRESENTATION_NAMELESS;
@@ -975,7 +995,10 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation
{
rText = EE_RESSTR(RID_SVXITEMS_ULSPACE_UPPER);
if ( 100 != nPropUpper )
- rText += OUString::number( nPropUpper ) + "%";
+ {
+ rText += unicode::formatPercent(nPropUpper,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
{
rText = rText +
@@ -984,7 +1007,10 @@ SfxItemPresentation SvxULSpaceItem::GetPresentation
}
rText = rText + OUString(cpDelim) + EE_RESSTR(RID_SVXITEMS_ULSPACE_LOWER);
if ( 100 != nPropLower )
- rText += OUString::number( nPropLower ) + "%";
+ {
+ rText += unicode::formatPercent(nPropLower,
+ Application::GetSettings().GetUILanguageTag());
+ }
else
{
rText = rText +
diff --git a/sc/CppunitTest_sc_ucalc.mk b/sc/CppunitTest_sc_ucalc.mk
index b7370a23b7ef..20001e51276f 100644
--- a/sc/CppunitTest_sc_ucalc.mk
+++ b/sc/CppunitTest_sc_ucalc.mk
@@ -50,6 +50,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sc_ucalc, \
for \
forui \
i18nlangtag \
+ i18nutil \
sal \
salhelper \
sax \
diff --git a/sc/Library_sc.mk b/sc/Library_sc.mk
index a7f15a9462df..d75ce95730b5 100644
--- a/sc/Library_sc.mk
+++ b/sc/Library_sc.mk
@@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,sc,\
for \
forui \
i18nlangtag \
+ i18nutil \
sal \
salhelper \
sax \
diff --git a/sc/source/core/data/docpool.cxx b/sc/source/core/data/docpool.cxx
index 098790ccca40..232a11407331 100644
--- a/sc/source/core/data/docpool.cxx
+++ b/sc/source/core/data/docpool.cxx
@@ -20,8 +20,10 @@
#include "scitems.hxx"
#include <comphelper/string.hxx>
+#include <i18nutil/unicode.hxx>
#include <tools/shl.hxx>
#include <vcl/outdev.hxx>
+#include <vcl/svapp.hxx>
#include <svl/aeitem.hxx>
#include <svl/itemiter.hxx>
#include <svl/stritem.hxx>
@@ -743,7 +745,8 @@ static SfxItemPresentation lcl_HFPresentation
aText = EE_RESSTR(RID_SVXITEMS_LRSPACE_LEFT);
if ( 100 != nPropLeftMargin )
{
- aText = aText + OUString::number( nPropLeftMargin ) + "%";
+ aText = aText + unicode::formatPercent(nPropLeftMargin,
+ Application::GetSettings().GetUILanguageTag());
}
else
{
@@ -758,7 +761,8 @@ static SfxItemPresentation lcl_HFPresentation
aText += EE_RESSTR(RID_SVXITEMS_LRSPACE_RIGHT);
if ( 100 != nPropRightMargin )
{
- aText = aText + OUString::number( nPropLeftMargin ) + "%";
+ aText = aText + unicode::formatPercent(nPropLeftMargin,
+ Application::GetSettings().GetUILanguageTag());
}
else
{
@@ -974,7 +978,8 @@ SfxItemPresentation ScDocumentPool::GetPresentation(
rText = ScGlobal::GetRscString(STR_SCATTR_PAGE_SCALE) + aStrSep;
// break; // DURCHFALLEN!!!
case SFX_ITEM_PRESENTATION_NAMELESS:
- rText = rText + OUString::number( nPercent ) + "%";
+ rText = rText + unicode::formatPercent(nPercent,
+ Application::GetSettings().GetUILanguageTag());
break;
default:
{
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk
index f232a917ce62..ad43f7ee0a4b 100644
--- a/sd/CppunitTest_sd_uimpress.mk
+++ b/sd/CppunitTest_sd_uimpress.mk
@@ -32,6 +32,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sd_uimpress,\
drawinglayer \
editeng \
i18nlangtag \
+ i18nutil \
msfilter \
sal \
sax \
diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk
index f9b69c9a2370..cb5ff9aa3f16 100644
--- a/sd/Library_sd.mk
+++ b/sd/Library_sd.mk
@@ -72,6 +72,7 @@ $(eval $(call gb_Library_use_libraries,sd,\
drawinglayer \
editeng \
i18nlangtag \
+ i18nutil \
msfilter \
oox \
sal \
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 7c3677d9438b..86a7304ae568 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -35,6 +35,7 @@
#include <boost/shared_ptr.hpp>
#include <comphelper/processfactory.hxx>
+#include <i18nutil/unicode.hxx>
#include <unotools/pathoptions.hxx>
#include <vcl/tabctrl.hxx>
#include <vcl/tabpage.hxx>
@@ -566,7 +567,8 @@ TransparencyPropertyBox::TransparencyPropertyBox( sal_Int32 nControlType, Window
mpMenu = new PopupMenu();
for( sal_Int32 i = 25; i < 101; i += 25 )
{
- OUString aStr(OUString::number(i) + "%");
+ OUString aStr(unicode::formatPercent(i,
+ Application::GetSettings().GetUILanguageTag()));
mpMenu->InsertItem( i, aStr );
}
diff --git a/svx/Library_svxcore.mk b/svx/Library_svxcore.mk
index 4b8914e2cca1..58eb5e9f4226 100644
--- a/svx/Library_svxcore.mk
+++ b/svx/Library_svxcore.mk
@@ -60,6 +60,7 @@ $(eval $(call gb_Library_use_libraries,svxcore,\
editeng \
fwe \
i18nlangtag \
+ i18nutil \
lng \
sal \
salhelper \
diff --git a/svx/source/svdraw/svdattr.cxx b/svx/source/svdraw/svdattr.cxx
index 620ec2709469..a7a23db5388e 100644
--- a/svx/source/svdraw/svdattr.cxx
+++ b/svx/source/svdraw/svdattr.cxx
@@ -38,6 +38,7 @@
#include <editeng/adjustitem.hxx>
#include <editeng/editdata.hxx>
#include <editeng/writingmodeitem.hxx>
+#include <i18nutil/unicode.hxx>
#include <svl/solar.hrc>
#include <tools/bigint.hxx>
#include <tools/stream.hxx>
@@ -837,7 +838,8 @@ SfxItemPresentation SdrPercentItem::GetPresentation(
SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/,
SfxMapUnit /*ePresMetric*/, OUString& rText, const IntlWrapper *) const
{
- rText = OUString::number(GetValue()) + "%";
+ rText = unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
{
@@ -2056,7 +2058,8 @@ SfxItemPresentation SdrSignedPercentItem::GetPresentation(
SfxItemPresentation ePres, SfxMapUnit /*eCoreMetric*/, SfxMapUnit /*ePresMetric*/,
OUString& rText, const IntlWrapper *) const
{
- rText = OUString::number(GetValue()) + "%";
+ rText = unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
if(ePres == SFX_ITEM_PRESENTATION_COMPLETE)
{
diff --git a/svx/source/xoutdev/xattr2.cxx b/svx/source/xoutdev/xattr2.cxx
index 8a644acbe168..c931ae99437f 100644
--- a/svx/source/xoutdev/xattr2.cxx
+++ b/svx/source/xoutdev/xattr2.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/drawing/LineCap.hpp>
#include <com/sun/star/uno/Any.hxx>
+#include <i18nutil/unicode.hxx>
#include <svx/dialogs.hrc>
#include "svx/xattr.hxx"
#include <svx/xtable.hxx>
@@ -28,6 +29,7 @@
#include <editeng/itemtype.hxx>
#include <svx/xdef.hxx>
#include <svx/AffineMatrixItem.hxx>
+#include <vcl/svapp.hxx>
// class XLineTransparenceItem
@@ -70,7 +72,8 @@ SfxItemPresentation XLineTransparenceItem::GetPresentation
case SFX_ITEM_PRESENTATION_COMPLETE:
rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": ";
case SFX_ITEM_PRESENTATION_NAMELESS:
- rText = rText + OUString::number( GetValue() ) + "%";
+ rText += unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
return ePres;
default:
return SFX_ITEM_PRESENTATION_NONE;
@@ -459,7 +462,8 @@ SfxItemPresentation XFillTransparenceItem::GetPresentation
case SFX_ITEM_PRESENTATION_COMPLETE:
rText = OUString( ResId( RID_SVXSTR_TRANSPARENCE, DIALOG_MGR() ) ) + ": ";
case SFX_ITEM_PRESENTATION_NAMELESS:
- rText = rText + OUString::number( GetValue() ) + "%";
+ rText += unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
return ePres;
default:
return SFX_ITEM_PRESENTATION_NONE;
diff --git a/sw/source/ui/ribbar/workctrl.cxx b/sw/source/ui/ribbar/workctrl.cxx
index 8e660dc829e4..2833fef429cb 100644
--- a/sw/source/ui/ribbar/workctrl.cxx
+++ b/sw/source/ui/ribbar/workctrl.cxx
@@ -19,6 +19,7 @@
#include <string>
#include <comphelper/string.hxx>
+#include <i18nutil/unicode.hxx>
#include <svl/eitem.hxx>
#include <sfx2/htmlmode.hxx>
#include <sfx2/dispatch.hxx>
@@ -643,7 +644,8 @@ SwZoomBox_Impl::SwZoomBox_Impl(
{ 25, 50, 75, 100, 150, 200 };
for(sal_uInt16 i = 0; i < sizeof(aZoomValues)/sizeof(sal_uInt16); i++)
{
- OUString sEntry = OUString::number(aZoomValues[i]) + "%";
+ OUString sEntry = unicode::formatPercent(aZoomValues[i],
+ Application::GetSettings().GetUILanguageTag());
InsertEntry(sEntry);
}
}
@@ -758,8 +760,8 @@ void SwPreviewZoomControl::StateChanged( sal_uInt16 /*nSID*/,
SwZoomBox_Impl* pBox = (SwZoomBox_Impl*)GetToolBox().GetItemWindow( GetId() );
if(SFX_ITEM_AVAILABLE <= eState)
{
- OUString sZoom(OUString::number(((const SfxUInt16Item*)pState)->GetValue()));
- sZoom += "%";
+ OUString sZoom(unicode::formatPercent(((const SfxUInt16Item*)pState)->GetValue(),
+ Application::GetSettings().GetUILanguageTag()));
pBox->SetText(sZoom);
pBox->SaveValue();
}
diff --git a/sw/source/ui/utlui/unotools.cxx b/sw/source/ui/utlui/unotools.cxx
index ebc2affdc408..d685b564d0af 100644
--- a/sw/source/ui/utlui/unotools.cxx
+++ b/sw/source/ui/utlui/unotools.cxx
@@ -26,8 +26,10 @@
#include <unotools.hrc>
#include <unotools.hxx>
#include <unoprnms.hxx>
+#include <i18nutil/unicode.hxx>
#include <osl/diagnose.h>
#include <vcl/msgbox.hxx>
+#include <vcl/svapp.hxx>
#include <com/sun/star/text/XTextViewCursorSupplier.hpp>
#include <com/sun/star/view/XScreenCursor.hpp>
#include <com/sun/star/view/DocumentZoomType.hpp>
@@ -471,7 +473,8 @@ void SwOneExampleFrame::CreatePopup(const Point& rPt)
for (sal_uInt16 i = 0;
i < (sizeof(nZoomValues)/sizeof(nZoomValues[0])); ++i)
{
- OUString sTemp = OUString::number(nZoomValues[i]) + " %";
+ OUString sTemp = unicode::formatPercent(nZoomValues[i],
+ Application::GetSettings().GetUILanguageTag());
aSubPop1.InsertItem( ITEM_ZOOM + i + 1, sTemp);
if(nZoom == nZoomValues[i])
aSubPop1.CheckItem(ITEM_ZOOM + i + 1);