[Libreoffice-commits] core.git: cui/source
Ricardo Montania
ricardo at linuxafundo.com.br
Wed Mar 13 08:11:42 PDT 2013
cui/source/dialogs/SpellDialog.cxx | 4 ++--
cui/source/tabpages/numpages.cxx | 12 ++++++------
cui/source/tabpages/tparea.cxx | 32 ++++++++++++++++----------------
3 files changed, 24 insertions(+), 24 deletions(-)
New commits:
commit 03c1f1732d738f57afee3d69e6a5f18d2eac5934
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Wed Mar 13 10:42:57 2013 -0300
String::AppendAscii cleanup
Change-Id: If9e57c77d39597db78739a7886d76ee0197f6461
Reviewed-on: https://gerrit.libreoffice.org/2703
Reviewed-by: Fridrich Strba <fridrich at documentfoundation.org>
Tested-by: Fridrich Strba <fridrich at documentfoundation.org>
diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx
index f098a28..dcae0d6 100644
--- a/cui/source/dialogs/SpellDialog.cxx
+++ b/cui/source/dialogs/SpellDialog.cxx
@@ -1897,10 +1897,10 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions( bool bSetIgnore
sal_uLong nPara = pTextEngine->GetParagraphCount();
if (nPara > 1)
{
- String aLeftOverText;
+ OUString aLeftOverText;
for (sal_uLong i = 1; i < nPara; ++i)
{
- aLeftOverText.AppendAscii( "\x0a" ); // the manual line break...
+ aLeftOverText += "\x0a"; // the manual line break...
aLeftOverText += pTextEngine->GetText(i);
}
if (pError)
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 252e57e..07aac6f 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -2708,22 +2708,22 @@ void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt)
{
#define TWIP_TO_MM100(TWIP) ((TWIP) >= 0 ? (((TWIP)*127L+36L)/72L) : (((TWIP)*127L-36L)/72L))
- sal_Char const sHash[] = " # ";
+ OUString const sHash( " # " );
if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
- String sDebugText( OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetAbsLSpace() ) ) );
- sDebugText.AppendAscii( sHash );
+ OUString sDebugText( OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetAbsLSpace() ) ) );
+ sDebugText += sHash;
sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetCharTextDistance() ) );
- sDebugText.AppendAscii( sHash );
+ sDebugText += sHash;
sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetFirstLineOffset() ) );
rFixed.SetText(sDebugText);
}
else if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
String sDebugText( OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetListtabPos() ) ) );
- sDebugText.AppendAscii( sHash );
+ sDebugText += sHash;
sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetFirstLineIndent() ) );
- sDebugText.AppendAscii( sHash );
+ sDebugText += sHash;
sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetIndentAt() ) );
rFixed.SetText(sDebugText);
}
diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index bd7b09b..952d612 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -1859,7 +1859,7 @@ void SvxAreaTabPage::ClickColorHdl_Impl()
aLbHatchBckgrdColor.Hide();
// set table text
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
INetURLObject aURL( pColorList->GetPath() );
aURL.Append( pColorList->GetName() );
@@ -1867,11 +1867,11 @@ void SvxAreaTabPage::ClickColorHdl_Impl()
if( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
ModifyColorHdl_Impl( this );
}
@@ -1948,7 +1948,7 @@ void SvxAreaTabPage::ClickGradientHdl_Impl()
aLbHatchBckgrdColor.Hide();
// set table text
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
INetURLObject aURL( pGradientList->GetPath() );
aURL.Append( pGradientList->GetName() );
@@ -1956,11 +1956,11 @@ void SvxAreaTabPage::ClickGradientHdl_Impl()
if( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
ModifyGradientHdl_Impl( this );
ModifyStepCountHdl_Impl( &aTsbStepCount );
@@ -2039,7 +2039,7 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl()
aLbHatchBckgrdColor.Enable();
// set table text
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
INetURLObject aURL( pHatchingList->GetPath() );
aURL.Append( pHatchingList->GetName() );
@@ -2047,11 +2047,11 @@ void SvxAreaTabPage::ClickHatchingHdl_Impl()
if( aURL.getBase().getLength() > 18 )
{
- aString += String(String(aURL.getBase()).Copy( 0, 15 ));
- aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
ModifyHatchingHdl_Impl( this );
ModifyHatchBckgrdColorHdl_Impl( this );
@@ -2198,7 +2198,7 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
aFlOffset.Show();
// set table text
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString += ": ";
INetURLObject aURL( pBitmapList->GetPath() );
aURL.Append( pBitmapList->GetName() );
@@ -2206,11 +2206,11 @@ void SvxAreaTabPage::ClickBitmapHdl_Impl()
if( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
ModifyBitmapHdl_Impl( this );
ModifyTileHdl_Impl( &aTsbOriginal );
More information about the Libreoffice-commits
mailing list