[Libreoffice-commits] core.git: vcl/aqua

Caolán McNamara caolanm at redhat.com
Tue Oct 22 05:24:04 PDT 2013


 vcl/aqua/source/gdi/atsui/salatslayout.cxx      |    2 +-
 vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx |   14 +++++++-------
 vcl/aqua/source/window/salmenu.cxx              |   16 ++++++++--------
 3 files changed, 16 insertions(+), 16 deletions(-)

New commits:
commit 6d7c2a44870ef6427dd944769b1bdbd80b9f8f91
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 22 13:23:30 2013 +0100

    aqua String remnants
    
    Change-Id: Ic574acda26775848918dc42ce3bce43c731ae267

diff --git a/vcl/aqua/source/gdi/atsui/salatslayout.cxx b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
index fd080f6..311d28d 100644
--- a/vcl/aqua/source/gdi/atsui/salatslayout.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatslayout.cxx
@@ -232,7 +232,7 @@ bool ATSLayout::LayoutText( ImplLayoutArgs& rArgs )
     Fixed fFontSize = 0;
     ByteCount nDummy;
     ATSUGetAttribute( mrATSUStyle, kATSUSizeTag, sizeof(fFontSize), &fFontSize, &nDummy);
-    String aUniName( &rArgs.mpStr[rArgs.mnMinCharPos], mnCharCount );
+    OUString aUniName( &rArgs.mpStr[rArgs.mnMinCharPos], mnCharCount );
     OString aCName(OUStringToOString(aUniName, RTL_TEXTENCODING_UTF8));
     fprintf( stderr, "ATSLayout( \"%s\" %d..%d of %d) with h=%4.1f\n",
         aCName.getStr(),rArgs.mnMinCharPos,rArgs.mnEndCharPos,rArgs.mnLength,Fix2X(fFontSize) );
diff --git a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
index 0c0f580..18509e9 100644
--- a/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
+++ b/vcl/aqua/source/gdi/atsui/salatsuifontutils.cxx
@@ -38,7 +38,7 @@
 // since neither head's macStyle nor OS/2's panose are easily available
 // during font enumeration. macStyle bits would be not sufficient anyway
 // and SFNT fonts on Mac usually do not contain an OS/2 table.
-static void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttributes& rDFA )
+static void UpdateAttributesFromPSName( const OUString& rPSName, ImplDevFontAttributes& rDFA )
 {
     OString aPSName( OUStringToOString( rPSName, RTL_TEXTENCODING_UTF8 ).toAsciiLowerCase() );
 
@@ -163,20 +163,20 @@ static void UpdateAttributesFromPSName( const String& rPSName, ImplDevFontAttrib
 
    // #i100020# special heuristic for names with single-char styles
    // NOTE: we are checking name that hasn't been lower-cased
-   if( rPSName.Len() > 3 )
+   if( rPSName.getLength() > 3 )
    {
-        int i = rPSName.Len();
-        sal_Unicode c = rPSName.GetChar( --i );
+        int i = rPSName.getLength();
+        sal_Unicode c = rPSName[--i];
         if( c == 'C' ) { // "capitals"
             rDFA.SetFamilyType(FAMILY_DECORATIVE);
-            c = rPSName.GetChar( --i );
+            c = rPSName[--i];
         }
         if( c == 'O' ) { // CFF-based OpenType
-            c = rPSName.GetChar( --i );
+            c = rPSName[--i];
         }
         if( c == 'I' ) { // "italic"
             rDFA.SetItalic(ITALIC_NORMAL);
-            c = rPSName.GetChar( --i );
+            c = rPSName[--i];
         }
         if( c == 'B' )   // "bold"
             rDFA.SetWeight(WEIGHT_BOLD);
diff --git a/vcl/aqua/source/window/salmenu.cxx b/vcl/aqua/source/window/salmenu.cxx
index 5d29c23..0e73a75 100644
--- a/vcl/aqua/source/window/salmenu.cxx
+++ b/vcl/aqua/source/window/salmenu.cxx
@@ -115,7 +115,7 @@ static void initAppMenu()
                 if( pAppMenu )
                 {
                     // insert about entry
-                    String aAbout( ResId( SV_STDTEXT_ABOUT, *pMgr ) );
+                    OUString aAbout( ResId( SV_STDTEXT_ABOUT, *pMgr ) );
                     NSString* pString = CreateNSString( aAbout );
                     NSMenuItem* pNewItem = [pAppMenu insertItemWithTitle: pString
                                                      action: @selector(showAbout:)
@@ -130,7 +130,7 @@ static void initAppMenu()
                     }
 
                     // insert preferences entry
-                    String aPref( ResId( SV_STDTEXT_PREFERENCES, *pMgr ) );
+                    OUString aPref( ResId( SV_STDTEXT_PREFERENCES, *pMgr ) );
                     pString = CreateNSString( aPref );
                     pNewItem = [pAppMenu insertItemWithTitle: pString
                                          action: @selector(showPreferences:)
@@ -152,7 +152,7 @@ static void initAppMenu()
                     pNewItem = [pAppMenu itemAtIndex: 4];
                     if( pNewItem )
                     {
-                        pString = CreateNSString( String( ResId( SV_MENU_MAC_SERVICES, *pMgr ) ) );
+                        pString = CreateNSString( OUString( ResId( SV_MENU_MAC_SERVICES, *pMgr ) ) );
                         [pNewItem  setTitle: pString];
                         if( pString )
                             [pString release];
@@ -162,7 +162,7 @@ static void initAppMenu()
                     pNewItem = [pAppMenu itemAtIndex: 6];
                     if( pNewItem )
                     {
-                        pString = CreateNSString( String( ResId( SV_MENU_MAC_HIDEAPP, *pMgr ) ) );
+                        pString = CreateNSString( OUString( ResId( SV_MENU_MAC_HIDEAPP, *pMgr ) ) );
                         [pNewItem  setTitle: pString];
                         if( pString )
                             [pString release];
@@ -172,7 +172,7 @@ static void initAppMenu()
                     pNewItem = [pAppMenu itemAtIndex: 7];
                     if( pNewItem )
                     {
-                        pString = CreateNSString( String( ResId( SV_MENU_MAC_HIDEALL, *pMgr ) ) );
+                        pString = CreateNSString( OUString( ResId( SV_MENU_MAC_HIDEALL, *pMgr ) ) );
                         [pNewItem  setTitle: pString];
                         if( pString )
                             [pString release];
@@ -182,7 +182,7 @@ static void initAppMenu()
                     pNewItem = [pAppMenu itemAtIndex: 8];
                     if( pNewItem )
                     {
-                        pString = CreateNSString( String( ResId( SV_MENU_MAC_SHOWALL, *pMgr ) ) );
+                        pString = CreateNSString( OUString( ResId( SV_MENU_MAC_SHOWALL, *pMgr ) ) );
                         [pNewItem  setTitle: pString];
                         if( pString )
                             [pString release];
@@ -192,7 +192,7 @@ static void initAppMenu()
                     pNewItem = [pAppMenu itemAtIndex: 10];
                     if( pNewItem )
                     {
-                        pString = CreateNSString( String( ResId( SV_MENU_MAC_QUITAPP, *pMgr ) ) );
+                        pString = CreateNSString( OUString( ResId( SV_MENU_MAC_QUITAPP, *pMgr ) ) );
                         [pNewItem  setTitle: pString];
                         if( pString )
                             [pString release];
@@ -922,7 +922,7 @@ AquaSalMenuItem::AquaSalMenuItem( const SalItemParams* pItemData ) :
     mpMenuItem( nil )
 {
     // Delete mnemonics
-    String aText( comphelper::string::remove(pItemData->aText, '~') );
+    OUString aText( comphelper::string::remove(pItemData->aText, '~') );
 
     if (pItemData->eType == MENUITEM_SEPARATOR)
     {


More information about the Libreoffice-commits mailing list