[Libreoffice-commits] .: cui/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Fri Nov 30 11:36:41 PST 2012


 cui/source/tabpages/numfmt.cxx   |    8 +++---
 cui/source/tabpages/numpages.cxx |   51 +++++++++++++++++++--------------------
 cui/source/tabpages/page.cxx     |    4 +--
 cui/source/tabpages/tpbitmap.cxx |   22 ++++++++--------
 4 files changed, 42 insertions(+), 43 deletions(-)

New commits:
commit 2cb8883cfd1c6ffe293497f064f90f76d12eff32
Author: Ricardo Montania <ricardo at linuxafundo.com.br>
Date:   Fri Nov 30 14:10:50 2012 -0200

    fdo#38838 UniString -> OUString in cui
    
    Change-Id: I9b629cad4d9b6d4c086bfff47f1d3e9779b2c24d
    Reviewed-on: https://gerrit.libreoffice.org/1202
    Reviewed-by: Olivier Hallot <olivier.hallot at alta.org.br>
    Tested-by: Olivier Hallot <olivier.hallot at alta.org.br>

diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index 014f87b..7bd349b 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1014,8 +1014,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sa
             aEdLeadZeroes.Enable();
             aBtnNegRed.Enable();
             aBtnThousand.Enable();
-            aEdDecimals  .SetText( UniString::CreateFromInt32( nDecimals ) );
-            aEdLeadZeroes.SetText( UniString::CreateFromInt32( nZeroes ) );
+            aEdDecimals  .SetText( OUString::valueOf( nDecimals ) );
+            aEdLeadZeroes.SetText( OUString::valueOf( nZeroes ) );
             aBtnNegRed   .Check( bNegRed );
             aBtnThousand .Check( bThousand );
             break;
@@ -1036,8 +1036,8 @@ void SvxNumberFormatTabPage::UpdateOptions_Impl( sal_Bool bCheckCatChange /*= sa
             aEdLeadZeroes   .Disable();
             aBtnNegRed      .Disable();
             aBtnThousand    .Disable();
-            aEdDecimals     .SetText( UniString::CreateFromInt32( 0 ) );
-            aEdLeadZeroes   .SetText( UniString::CreateFromInt32( 0 ) );
+            aEdDecimals     .SetText( OUString::valueOf( 0 ) );
+            aEdLeadZeroes   .SetText( OUString::valueOf( 0 ) );
             aBtnNegRed      .Check( sal_False );
             aBtnThousand    .Check( sal_False );
     }
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 3747402..d81de7b 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -78,7 +78,6 @@ using namespace com::sun::star::i18n;
 using namespace com::sun::star::text;
 using namespace com::sun::star::container;
 using namespace com::sun::star::style;
-using rtl::OUString;
 
 #define NUM_PAGETYPE_BULLET         0
 #define NUM_PAGETYPE_SINGLENUM      1
@@ -170,7 +169,7 @@ static sal_Bool lcl_IsNumFmtSet(SvxNumRule* pNum, sal_uInt16 nLevelMask)
 static Font& lcl_GetDefaultBulletFont()
 {
     static sal_Bool bInit = 0;
-    static Font aDefBulletFont( rtl::OUString("StarSymbol"),
+    static Font aDefBulletFont( OUString("StarSymbol"),
                                 String(), Size( 0, 14 ) );
     if(!bInit)
     {
@@ -504,8 +503,8 @@ IMPL_LINK_NOARG(SvxBulletPickTabPage, NumSelectHdl_Impl)
                 SvxNumberFormat aFmt(pActNum->GetLevel(i));
                 aFmt.SetNumberingType( SVX_NUM_CHAR_SPECIAL );
                 // #i93908# clear suffix for bullet lists
-                aFmt.SetPrefix(::rtl::OUString());
-                aFmt.SetSuffix(::rtl::OUString());
+                aFmt.SetPrefix( OUString() );
+                aFmt.SetSuffix( OUString() );
                 aFmt.SetBulletFont(&rActBulletFont);
                 aFmt.SetBulletChar(cChar );
                 aFmt.SetCharFmtName(sBulletCharFmtName);
@@ -716,8 +715,8 @@ IMPL_LINK_NOARG(SvxNumPickTabPage, NumSelectHdl_Impl)
             if(aFmt.GetNumberingType() == SVX_NUM_CHAR_SPECIAL)
             {
                 // #i93908# clear suffix for bullet lists
-                aFmt.SetPrefix(::rtl::OUString());
-                aFmt.SetSuffix(::rtl::OUString());
+                aFmt.SetPrefix(OUString());
+                aFmt.SetSuffix(OUString());
                 if( !pLevelSettings->sBulletFont.isEmpty() &&
                     pLevelSettings->sBulletFont.compareTo(
                             rActBulletFont.GetName()))
@@ -1281,11 +1280,11 @@ void    SvxNumOptionsTabPage::Reset( const SfxItemSet& rSet )
     if(!aLevelLB.GetEntryCount())
     {
         for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++)
-            aLevelLB.InsertEntry( UniString::CreateFromInt32(i));
+            aLevelLB.InsertEntry( OUString::valueOf(i));
         if(pSaveNum->GetLevelCount() > 1)
         {
-            String sEntry(rtl::OUString("1 - "));
-            sEntry += UniString::CreateFromInt32( pSaveNum->GetLevelCount() );
+            String sEntry( OUString("1 - ") );
+            sEntry += OUString::valueOf( pSaveNum->GetLevelCount() );
             aLevelLB.InsertEntry(sEntry);
             aLevelLB.SelectEntry(sEntry);
         }
@@ -2302,7 +2301,7 @@ static sal_uInt16 lcl_DrawBullet(VirtualDevice* pVDev,
         aBulletColor.Invert();
     aFont.SetColor(aBulletColor);
     pVDev->SetFont( aFont );
-    rtl::OUString aText(rFmt.GetBulletChar());
+    OUString aText(rFmt.GetBulletChar());
     long nY = nYStart;
     nY -= ((aTmpSize.Height() - rSize.Height())/ 2);
     pVDev->DrawText( Point(nXStart, nY), aText );
@@ -2454,7 +2453,7 @@ void    SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
                      rFmt.GetLabelFollowedBy() == SvxNumberFormat::SPACE )
                 {
                     pVDev->SetFont(aStdFont);
-                    rtl::OUString aText(' ');
+                    OUString aText(' ');
                     pVDev->DrawText( Point(nNumberXPos, nYStart), aText );
                     nBulletWidth = nBulletWidth + (sal_uInt16)pVDev->GetTextWidth(aText);
                 }
@@ -2505,7 +2504,7 @@ void    SvxNumberingPreview::Paint( const Rectangle& /*rRect*/ )
         else
         {
             //#i5153# painting gray or black rectangles as 'normal' numbering text
-            String sMsg( RTL_CONSTASCII_USTRINGPARAM( "Preview") );
+            String sMsg( "Preview" );
             long nWidth = pVDev->GetTextWidth(sMsg);
             long nTextHeight = pVDev->GetTextHeight();
             long nRectHeight = nTextHeight * 2 / 3;
@@ -2709,7 +2708,7 @@ SvxNumPositionTabPage::SvxNumPositionTabPage(Window* pParent,
     Point aPos(250,0);
 
     pDebugFixedText->SetPosSizePixel(aPos, aSize);
-    pDebugFixedText->SetText(rtl::OUString("Das ist ein Debug-Text"));
+    pDebugFixedText->SetText( OUString("Das ist ein Debug-Text") );
 #endif
 
     aStandardPB.SetAccessibleRelationMemberOf(&aPositionFL);
@@ -2734,20 +2733,20 @@ void lcl_PrintDebugOutput(FixedText& rFixed, const SvxNumberFormat& rNumFmt)
     sal_Char const sHash[] = " # ";
     if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
     {
-        String sDebugText( UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetAbsLSpace() ) ) );
-        sDebugText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sHash ) );
-        sDebugText += UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetCharTextDistance() ) );
-        sDebugText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sHash ) );
-        sDebugText += UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetFirstLineOffset() ) );
+        String sDebugText( OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetAbsLSpace() ) ) );
+        sDebugText.AppendAscii( sHash );
+        sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetCharTextDistance() ) );
+        sDebugText.AppendAscii( sHash );
+        sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetFirstLineOffset() ) );
         rFixed.SetText(sDebugText);
     }
     else if ( rNumFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
     {
-        String sDebugText( UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetListtabPos() ) ) );
-        sDebugText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sHash ) );
-        sDebugText += UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetFirstLineIndent() ) );
-        sDebugText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( sHash ) );
-        sDebugText += UniString::CreateFromInt32( TWIP_TO_MM100(rNumFmt.GetIndentAt() ) );
+        String sDebugText( OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetListtabPos() ) ) );
+        sDebugText.AppendAscii( sHash );
+        sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetFirstLineIndent() ) );
+        sDebugText.AppendAscii( sHash );
+        sDebugText += OUString::valueOf( TWIP_TO_MM100(rNumFmt.GetIndentAt() ) );
         rFixed.SetText(sDebugText);
     }
 
@@ -3045,11 +3044,11 @@ void SvxNumPositionTabPage::Reset( const SfxItemSet& rSet )
     if(!aLevelLB.GetEntryCount())
     {
         for(sal_uInt16 i = 1; i <= pSaveNum->GetLevelCount(); i++)
-            aLevelLB.InsertEntry(UniString::CreateFromInt32(i));
+            aLevelLB.InsertEntry( OUString::valueOf(i) );
         if(pSaveNum->GetLevelCount() > 1)
         {
-            String sEntry(rtl::OUString("1 - "));
-            sEntry.Append( UniString::CreateFromInt32( pSaveNum->GetLevelCount() ) );
+            String sEntry( OUString("1 - ") );
+            sEntry.Append( OUString::valueOf( pSaveNum->GetLevelCount() ) );
             aLevelLB.InsertEntry(sEntry);
             aLevelLB.SelectEntry(sEntry);
         }
diff --git a/cui/source/tabpages/page.cxx b/cui/source/tabpages/page.cxx
index 6b66340..b29d37b 100644
--- a/cui/source/tabpages/page.cxx
+++ b/cui/source/tabpages/page.cxx
@@ -663,7 +663,7 @@ void SvxPageDescPage::Reset( const SfxItemSet& rSet )
 void SvxPageDescPage::FillUserData()
 {
     if ( SVX_PAGE_MODE_PRESENTATION == eMode )
-        SetUserData( UniString::CreateFromInt32( (sal_Int32)aAdaptBox.IsChecked() ) );
+        SetUserData( OUString::valueOf( (sal_Int32)aAdaptBox.IsChecked() ) );
 }
 
 // -----------------------------------------------------------------------
@@ -944,7 +944,7 @@ IMPL_LINK_NOARG(SvxPageDescPage, PaperBinHdl_Impl)
         {
             aName = aPaperBin;
             aName.Append( sal_Unicode(' ') );
-            aName.Append( UniString::CreateFromInt32( i+1 ) );
+            aName.Append( OUString::valueOf( i+1 ) );
         }
         nEntryPos = aPaperTrayBox.InsertEntry( aName );
         aPaperTrayBox.SetEntryData( nEntryPos, (void*)(sal_uLong)i );
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index c080cb3..1c7b87a 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -182,7 +182,7 @@ 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( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+            String          aString( CUI_RES( RID_SVXSTR_TABLE ) ); aString.AppendAscii( ": " );
             INetURLObject   aURL( pBitmapList->GetPath() );
 
             aURL.Append( pBitmapList->GetName() );
@@ -191,7 +191,7 @@ void SvxBitmapTabPage::ActivatePage( const SfxItemSet&  )
             if( aURL.getBase().getLength() > 18 )
             {
                 aString += String(aURL.getBase()).Copy( 0, 15 );
-                aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+                aString.AppendAscii( "..." );
             }
             else
                 aString += String(aURL.getBase());
@@ -570,7 +570,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
     {
         aName  = aNewName;
         aName += sal_Unicode(' ');
-        aName += UniString::CreateFromInt32( j++ );
+        aName += OUString::valueOf( j++ );
         bDifferent = sal_True;
 
         for( long i = 0; i < nCount && bDifferent; i++ )
@@ -686,7 +686,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickAddHdl_Impl)
 IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl_Impl)
 {
     ResMgr& rMgr = CUI_MGR();
-    SvxOpenGraphicDialog aDlg(rtl::OUString("Import"));
+    SvxOpenGraphicDialog aDlg( OUString("Import") );
     aDlg.EnableLink(sal_False);
 
     if( !aDlg.Execute() )
@@ -906,7 +906,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickLoadHdl_Impl)
         ::sfx2::FileDialogHelper aDlg(
             com::sun::star::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
             0 );
-        String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sob" ) );
+        String aStrFilterType( "*.sob" );
         aDlg.AddFilter( aStrFilterType, aStrFilterType );
         INetURLObject aFile( SvtPathOptions().GetPalettePath() );
         aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -938,12 +938,12 @@ 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( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+                aString.AppendAscii( ": " );
 
                 if ( aURL.getBase().getLength() > 18 )
                 {
                     aString += String(aURL.getBase()).Copy( 0, 15 );
-                    aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+                    aString.AppendAscii( "..." );
                 }
                 else
                     aString += String(aURL.getBase());
@@ -983,7 +983,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
 {
        ::sfx2::FileDialogHelper aDlg(
         com::sun::star::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, 0 );
-    String aStrFilterType( RTL_CONSTASCII_USTRINGPARAM( "*.sob" ) );
+    String aStrFilterType( "*.sob" );
     aDlg.AddFilter( aStrFilterType, aStrFilterType );
 
     INetURLObject aFile( SvtPathOptions().GetPalettePath() );
@@ -994,7 +994,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ClickSaveHdl_Impl)
         aFile.Append( pBitmapList->GetName() );
 
         if( aFile.getExtension().isEmpty() )
-            aFile.SetExtension(rtl::OUString("sob"));
+            aFile.SetExtension( OUString("sob") );
     }
 
     aDlg.SetDisplayDirectory( aFile.GetMainURL( INetURLObject::NO_DECODE ) );
@@ -1014,12 +1014,12 @@ 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( RTL_CONSTASCII_STRINGPARAM( ": " ) );
+            aString.AppendAscii( ": " );
 
             if ( aURL.getBase().getLength() > 18 )
             {
                 aString += String(aURL.getBase()).Copy( 0, 15 );
-                aString.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "..." ) );
+                aString.AppendAscii( "..." );
             }
             else
                 aString += String(aURL.getBase());


More information about the Libreoffice-commits mailing list