summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Timofeev <timofeev.i.s@gmail.com>2013-08-24 19:00:06 +0400
committerIvan Timofeev <timofeev.i.s@gmail.com>2013-08-24 22:23:19 +0400
commit72a3be3dd0983769f4d17f237844efd7536da7e1 (patch)
tree7d2b5fb7c7bf7e9f784b6d89f384bc3c59d232bf
parent4c8fd5abdfd1cf588cf38e1b8e761d09b5952343 (diff)
convert SdTpOptionsMisc to OUString
Change-Id: Ifd971d1b0b2bbccea2e3c632e35b42d1065a66ea
-rw-r--r--sd/source/ui/dlg/tpoption.cxx18
-rw-r--r--sd/source/ui/inc/tpoption.hxx8
2 files changed, 11 insertions, 15 deletions
diff --git a/sd/source/ui/dlg/tpoption.cxx b/sd/source/ui/dlg/tpoption.cxx
index ffa68c502b34..5b92eab867fb 100644
--- a/sd/source/ui/dlg/tpoption.cxx
+++ b/sd/source/ui/dlg/tpoption.cxx
@@ -194,7 +194,7 @@ SfxTabPage* SdTpOptionsContents::Create( Window* pWindow,
|*
\************************************************************************/
#define TABLE_COUNT 12
-#define TOKEN (sal_Unicode(':'))
+#define TOKEN ':'
SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs ) :
SfxTabPage ( pParent, "OptSavePage","modules/simpress/ui/optimpressgeneralpage.ui", rInAttrs )
@@ -253,7 +253,7 @@ SdTpOptionsMisc::SdTpOptionsMisc( Window* pParent, const SfxItemSet& rInAttrs )
for ( i = 0; i < aMetricArr.Count(); ++i )
{
- String sMetric = aMetricArr.GetStringByPos( i );
+ OUString sMetric = aMetricArr.GetStringByPos( i );
sal_IntPtr nFieldUnit = aMetricArr.GetValue( i );
sal_uInt16 nPos = m_pLbMetric->InsertEntry( sMetric );
m_pLbMetric->SetEntryData( nPos, (void*)nFieldUnit );
@@ -576,23 +576,19 @@ void SdTpOptionsMisc::SetDrawMode()
// -----------------------------------------------------------------------
-String SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
+OUString SdTpOptionsMisc::GetScale( sal_Int32 nX, sal_Int32 nY )
{
- String aScale( OUString::number( nX ) );
- aScale.Append( TOKEN );
- aScale.Append( OUString::number( nY ) );
-
- return( aScale );
+ return OUString::number(nX) + OUString(TOKEN) + OUString::number(nY);
}
// -----------------------------------------------------------------------
-sal_Bool SdTpOptionsMisc::SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY )
+sal_Bool SdTpOptionsMisc::SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY )
{
if( comphelper::string::getTokenCount(aScale, TOKEN) != 2 )
return( sal_False );
- OUString aTmp(aScale.GetToken( 0, TOKEN ));
+ OUString aTmp(aScale.getToken(0, TOKEN));
if (!comphelper::string::isdigitAsciiString(aTmp))
return sal_False;
@@ -600,7 +596,7 @@ sal_Bool SdTpOptionsMisc::SetScale( const String& aScale, sal_Int32& rX, sal_Int
if( rX == 0 )
return( sal_False );
- aTmp = aScale.GetToken( 1, TOKEN );
+ aTmp = aScale.getToken(1, TOKEN);
if (!comphelper::string::isdigitAsciiString(aTmp))
return sal_False;
diff --git a/sd/source/ui/inc/tpoption.hxx b/sd/source/ui/inc/tpoption.hxx
index b8e0a7261c03..cbbd960912cc 100644
--- a/sd/source/ui/inc/tpoption.hxx
+++ b/sd/source/ui/inc/tpoption.hxx
@@ -111,13 +111,13 @@ private:
sal_uInt32 nWidth;
sal_uInt32 nHeight;
- String aInfo1;
- String aInfo2;
+ OUString aInfo1;
+ OUString aInfo2;
SfxMapUnit ePoolUnit;
- String GetScale( sal_Int32 nX, sal_Int32 nY );
- sal_Bool SetScale( const String& aScale, sal_Int32& rX, sal_Int32& rY );
+ OUString GetScale( sal_Int32 nX, sal_Int32 nY );
+ sal_Bool SetScale( const OUString& aScale, sal_Int32& rX, sal_Int32& rY );
DECL_LINK( SelectMetricHdl_Impl, void * );