convert include/svx/pszctrl.hxx from String to OUString
Change-Id: I9ed9781b3beb16b680206dcfcb8eb63b7f31ecb7
This commit is contained in:
@@ -33,7 +33,7 @@ class SVX_DLLPUBLIC SvxPosSizeStatusBarControl : public SfxStatusBarControl
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
SvxPosSizeStatusBarControl_Impl* pImp;
|
SvxPosSizeStatusBarControl_Impl* pImp;
|
||||||
SVX_DLLPRIVATE String GetMetricStr_Impl( long nVal );
|
SVX_DLLPRIVATE OUString GetMetricStr_Impl( long nVal );
|
||||||
public:
|
public:
|
||||||
SFX_DECL_STATUSBAR_CONTROL();
|
SFX_DECL_STATUSBAR_CONTROL();
|
||||||
|
|
||||||
|
@@ -59,29 +59,29 @@
|
|||||||
<SvxPosSizeStatusBarControl::Paint(const UserDrawEvent&)>
|
<SvxPosSizeStatusBarControl::Paint(const UserDrawEvent&)>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
String SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
|
OUString SvxPosSizeStatusBarControl::GetMetricStr_Impl( long nVal )
|
||||||
{
|
{
|
||||||
// deliver and set the Metric of the application
|
// deliver and set the Metric of the application
|
||||||
FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
|
FieldUnit eOutUnit = SfxModule::GetModuleFieldUnit( getFrameInterface() );
|
||||||
FieldUnit eInUnit = FUNIT_100TH_MM;
|
FieldUnit eInUnit = FUNIT_100TH_MM;
|
||||||
|
|
||||||
String sMetric;
|
OUString sMetric;
|
||||||
const sal_Unicode cSep = Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()[0];
|
const sal_Unicode cSep = Application::GetSettings().GetLocaleDataWrapper().getNumDecimalSep()[0];
|
||||||
sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0, eInUnit, eOutUnit );
|
sal_Int64 nConvVal = MetricField::ConvertValue( nVal * 100, 0L, 0, eInUnit, eOutUnit );
|
||||||
|
|
||||||
if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
|
if ( nConvVal < 0 && ( nConvVal / 100 == 0 ) )
|
||||||
sMetric += '-';
|
sMetric += "-";
|
||||||
sMetric += OUString::number(nConvVal / 100);
|
sMetric += OUString::number(nConvVal / 100);
|
||||||
|
|
||||||
if( FUNIT_NONE != eOutUnit )
|
if( FUNIT_NONE != eOutUnit )
|
||||||
{
|
{
|
||||||
sMetric += cSep;
|
sMetric += OUString(cSep);
|
||||||
sal_Int64 nFract = nConvVal % 100;
|
sal_Int64 nFract = nConvVal % 100;
|
||||||
|
|
||||||
if ( nFract < 0 )
|
if ( nFract < 0 )
|
||||||
nFract *= -1;
|
nFract *= -1;
|
||||||
if ( nFract < 10 )
|
if ( nFract < 10 )
|
||||||
sMetric += '0';
|
sMetric += "0";
|
||||||
sMetric += OUString::number(nFract);
|
sMetric += OUString::number(nFract);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user