summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2014-01-20 12:36:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2014-01-20 12:37:24 +0000
commit96c0f5b1c712e72e4a5ad6b69e744d6187afdc83 (patch)
treefca66715336847925b510ea903c90d8c240f2e6f /sw
parentfdf9406792905a4bbd49b4ad88c40e6af9c17da3 (diff)
Related: #i56998# use locale rules to format percentage
Change-Id: I26af0abee94c911fd0d2b84e829f4489e625c0b2
Diffstat (limited to 'sw')
-rw-r--r--sw/source/ui/utlui/attrdesc.cxx22
1 files changed, 15 insertions, 7 deletions
diff --git a/sw/source/ui/utlui/attrdesc.cxx b/sw/source/ui/utlui/attrdesc.cxx
index 65278f5cec99..48e2e13c6118 100644
--- a/sw/source/ui/utlui/attrdesc.cxx
+++ b/sw/source/ui/utlui/attrdesc.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <i18nutil/unicode.hxx>
#include <svl/itemiter.hxx>
#include <vcl/svapp.hxx>
#include <editeng/itemtype.hxx>
@@ -336,7 +337,8 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
rText = SW_RESSTR( STR_FRM_WIDTH ) + " ";
if ( GetWidthPercent() )
{
- rText = rText + OUString::number(GetWidthPercent()) + "%";
+ rText = rText + unicode::formatPercent(GetWidthPercent(),
+ Application::GetSettings().GetUILanguageTag());
}
else
{
@@ -350,7 +352,8 @@ SfxItemPresentation SwFmtFrmSize::GetPresentation
rText = rText + ", " + SW_RESSTR( nId ) + " ";
if ( GetHeightPercent() )
{
- rText = rText + OUString::number(GetHeightPercent()) + "%";
+ rText = rText + unicode::formatPercent(GetHeightPercent(),
+ Application::GetSettings().GetUILanguageTag());
}
else
{
@@ -1042,7 +1045,8 @@ SfxItemPresentation SwLuminanceGrf::GetPresentation(
rText = SW_RESSTR( STR_LUMINANCE );
else if( rText.getLength() )
rText = OUString();
- rText = rText + OUString::number( GetValue() ) + "%";
+ rText = rText + unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
break;
default:
@@ -1065,7 +1069,8 @@ SfxItemPresentation SwContrastGrf::GetPresentation(
rText = SW_RESSTR( STR_CONTRAST );
else if( rText.getLength() )
rText = OUString();
- rText = rText + OUString::number( GetValue() ) + "%";
+ rText = rText + unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
break;
default:
@@ -1101,7 +1106,8 @@ SfxItemPresentation SwChannelGrf::GetPresentation(
}
else if( rText.getLength() )
rText = OUString();
- rText = rText + OUString::number( GetValue() ) + "%";
+ rText = rText + unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
break;
default:
@@ -1123,7 +1129,8 @@ SfxItemPresentation SwGammaGrf::GetPresentation(
case SFX_ITEM_PRESENTATION_COMPLETE:
if( SFX_ITEM_PRESENTATION_COMPLETE == ePres )
aText.append(SW_RESSTR(STR_GAMMA));
- aText.append(GetValue()).append('%');
+ aText.append(unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag()));
break;
default:
@@ -1169,7 +1176,8 @@ SfxItemPresentation SwTransparencyGrf::GetPresentation(
rText = SW_RESSTR( STR_TRANSPARENCY );
else if( rText.getLength() )
rText = OUString();
- rText = rText + OUString::number( GetValue() ) + "%";
+ rText = rText + unicode::formatPercent(GetValue(),
+ Application::GetSettings().GetUILanguageTag());
break;
default: