[Libreoffice-commits] core.git: cui/source
Ricardo Montania
ricardo at linuxafundo.com.br
Mon Mar 18 00:26:53 PDT 2013
cui/source/tabpages/tpbitmap.cxx | 29 +++++++++++++++--------------
cui/source/tabpages/tpcolor.cxx | 10 +++++-----
cui/source/tabpages/tpgradnt.cxx | 29 +++++++++++++++--------------
cui/source/tabpages/tphatch.cxx | 29 +++++++++++++++--------------
cui/source/tabpages/tplnedef.cxx | 3 ++-
5 files changed, 52 insertions(+), 48 deletions(-)
New commits:
commit 1044a37906f6e269f55706e9659667a6423ef2d1
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date: Fri Mar 15 13:40:30 2013 -0300
String::AppendAscii cleanup
Change-Id: I33d7a6b704cbb9a5a410b99237643c05a9c1cb9c
Reviewed-on: https://gerrit.libreoffice.org/2755
Reviewed-by: Tor Lillqvist <tml at iki.fi>
Tested-by: Tor Lillqvist <tml at iki.fi>
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 3ed60c3..be2f504 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -191,7 +191,8 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
// determining (possibly cutting) the name and
// displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
INetURLObject aURL( pBitmapList->GetPath() );
aURL.Append( pBitmapList->GetName() );
@@ -199,11 +200,11 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet& )
if( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
if( *pPageType == PT_BITMAP && *pPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -836,16 +837,16 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
// determining (possibly cutting) the name
// displaying it in the GroupBox
- String aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
- aString.AppendAscii( ": " );
+ OUString aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
+ aString += ": ";
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
*pnBitmapListState |= CT_CHANGED;
*pnBitmapListState &= ~CT_MODIFIED;
@@ -912,16 +913,16 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
{
// determining (possibly cutting) the name
// displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) );
- aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
*pnBitmapListState |= CT_SAVED;
*pnBitmapListState &= ~CT_MODIFIED;
diff --git a/cui/source/tabpages/tpcolor.cxx b/cui/source/tabpages/tpcolor.cxx
index ac0c085..f8f6f82 100644
--- a/cui/source/tabpages/tpcolor.cxx
+++ b/cui/source/tabpages/tpcolor.cxx
@@ -109,8 +109,8 @@ void SvxColorTabPage::HideLoadSaveEmbed()
void SvxColorTabPage::UpdateTableName()
{
// Truncate the name if necessary ...
- String aString( CUI_RES( RID_SVXSTR_TABLE ) );
- aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
XPropertyListRef pList = GetList();
if( !pList.is() )
@@ -121,11 +121,11 @@ void SvxColorTabPage::UpdateTableName()
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String (aURL.getBase());
+ aString += aURL.getBase();
m_pTableName->SetText( aString );
}
diff --git a/cui/source/tabpages/tpgradnt.cxx b/cui/source/tabpages/tpgradnt.cxx
index 6dc0902..1772c8a 100644
--- a/cui/source/tabpages/tpgradnt.cxx
+++ b/cui/source/tabpages/tpgradnt.cxx
@@ -200,7 +200,8 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
// determining (and possibly cutting) the name and
// displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
INetURLObject aURL( pGradientList->GetPath() );
aURL.Append( pGradientList->GetName() );
@@ -208,11 +209,11 @@ void SvxGradientTabPage::ActivatePage( const SfxItemSet& )
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
if ( *pPageType == PT_GRADIENT && *pPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -669,16 +670,16 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickLoadHdl_Impl)
// determining (possibly cutting) the name
// and displaying it in the GroupBox
- String aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
- aString.AppendAscii( ": " );
+ OUString aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
+ aString += ": ";
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
*pnGradientListState |= CT_CHANGED;
*pnGradientListState &= ~CT_MODIFIED;
@@ -745,16 +746,16 @@ IMPL_LINK_NOARG(SvxGradientTabPage, ClickSaveHdl_Impl)
{
// determining (possibly cutting) the name
// and displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) );
- aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
*pnGradientListState |= CT_SAVED;
*pnGradientListState &= ~CT_MODIFIED;
diff --git a/cui/source/tabpages/tphatch.cxx b/cui/source/tabpages/tphatch.cxx
index cb88027..c9ed900 100644
--- a/cui/source/tabpages/tphatch.cxx
+++ b/cui/source/tabpages/tphatch.cxx
@@ -189,7 +189,8 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
// determining (possibly cutting) the name
// and displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
INetURLObject aURL( pHatchingList->GetPath() );
aURL.Append( pHatchingList->GetName() );
@@ -197,11 +198,11 @@ void SvxHatchTabPage::ActivatePage( const SfxItemSet& rSet )
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
if( *pPageType == PT_HATCH && *pPos != LISTBOX_ENTRY_NOTFOUND )
{
@@ -713,16 +714,16 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickLoadHdl_Impl)
// determining (and possibly cutting) the name
// and displaying it in the GroupBox
- String aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
- aString.AppendAscii( ": " );
+ OUString aString( ResId( RID_SVXSTR_TABLE, rMgr ) );
+ aString += ": ";
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
*pnHatchingListState |= CT_CHANGED;
*pnHatchingListState &= ~CT_MODIFIED;
@@ -785,16 +786,16 @@ IMPL_LINK_NOARG(SvxHatchTabPage, ClickSaveHdl_Impl)
{
// determining (and possibly cutting) the name
// and displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) );
- aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
if ( aURL.getBase().getLength() > 18 )
{
- aString += String(aURL.getBase()).Copy( 0, 15 );
- aString.AppendAscii( "..." );
+ aString += aURL.getBase().copy( 0, 15 );
+ aString += "...";
}
else
- aString += String(aURL.getBase());
+ aString += aURL.getBase();
*pnHatchingListState |= CT_SAVED;
*pnHatchingListState &= ~CT_MODIFIED;
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index dd88083..84172dc 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -192,7 +192,8 @@ void SvxLineDefTabPage::ActivatePage( const SfxItemSet& )
// determining (and possibly cutting) the name
// and displaying it in the GroupBox
- String aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( ": " );
+ OUString aString( CUI_RES( RID_SVXSTR_TABLE ) );
+ aString += ": ";
INetURLObject aURL( pDashList->GetPath() );
aURL.Append( pDashList->GetName() );
More information about the Libreoffice-commits
mailing list