[Libreoffice-commits] .: 3 commits - tools/source tools/workben vcl/source vcl/unx

Caolán McNamara caolan at kemper.freedesktop.org
Fri Nov 19 01:45:10 PST 2010


 tools/source/fsys/urlobj.cxx                  |    2 +-
 tools/source/generic/config.cxx               |   12 ++++++------
 tools/source/generic/svlibrary.cxx            |    2 +-
 tools/workben/urltest.cxx                     |    6 +++---
 vcl/source/fontsubset/sft.cxx                 |    2 +-
 vcl/unx/source/dtrans/X11_clipboard.cxx       |    2 +-
 vcl/unx/source/dtrans/X11_selection.cxx       |    2 +-
 vcl/unx/source/dtrans/config.cxx              |    4 ++--
 vcl/unx/source/fontmanager/fontmanager.cxx    |    4 ++--
 vcl/unx/source/printer/printerinfomanager.cxx |    2 +-
 10 files changed, 19 insertions(+), 19 deletions(-)

New commits:
commit 7eacf8b6189647b6df015a9daa2b523759f8b4c4
Author: Kevin Hunter <hunteke at earlham.edu>
Date:   Thu Nov 18 16:54:53 2010 -0500

    Easy Hack: RTL_CONST macro from createFromAscii

diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 1f4b675..c87c0b2 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -2336,7 +2336,7 @@ bool INetURLObject::setPassword(rtl::OUString const & rThePassword,
     else if (m_aHost.isPresent())
     {
         m_aAbsURIRef.insert(m_aHost.getBegin(),
-            rtl::OUString::createFromAscii(":@"));
+            rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ":@" )));
         m_aUser.set(m_aAbsURIRef, rtl::OUString(), m_aHost.getBegin());
         nDelta
             = m_aAuth.set(m_aAbsURIRef, aNewAuth, m_aHost.getBegin() + 1) + 2;
diff --git a/tools/source/generic/config.cxx b/tools/source/generic/config.cxx
index 9d92aff..85e7448 100644
--- a/tools/source/generic/config.cxx
+++ b/tools/source/generic/config.cxx
@@ -217,20 +217,20 @@ static String ImplMakeConfigName( const XubString* pFileName,
     if ( pFileName )
     {
 #ifdef UNX
-        aFileName = ::rtl::OUString::createFromAscii( "." );
+        aFileName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "." ));
         aFileName += *pFileName;
-        aFileName += ::rtl::OUString::createFromAscii( "rc" );
+        aFileName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "rc" ));
 #else
         aFileName = *pFileName;
-        aFileName += ::rtl::OUString::createFromAscii( ".ini" );
+        aFileName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".ini" ));
 #endif
     }
     else
     {
 #ifdef UNX
-        aFileName = ::rtl::OUString::createFromAscii( ".sversionrc" );
+        aFileName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".sversionrc" ));
 #else
-        aFileName = ::rtl::OUString::createFromAscii( "sversion.ini" );
+        aFileName = ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "sversion.ini" ));
 #endif
     }
 
@@ -249,7 +249,7 @@ static String ImplMakeConfigName( const XubString* pFileName,
     }
 
     ::rtl::OUString aName( aPathName );
-    aName += ::rtl::OUString::createFromAscii( "/" );
+    aName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "/" ));
     aName += aFileName;
     
     return aName;
diff --git a/tools/source/generic/svlibrary.cxx b/tools/source/generic/svlibrary.cxx
index be6772f..5864bdf 100644
--- a/tools/source/generic/svlibrary.cxx
+++ b/tools/source/generic/svlibrary.cxx
@@ -62,7 +62,7 @@ static uno::Sequence< rtl::OUString > GetMultiPaths_Impl()
             aUser     .AppendAscii( "_user" );
 
             uno::Reference< beans::XPropertySet > xPathSettings( xMgr->createInstance(
-                rtl::OUString::createFromAscii( "com.sun.star.util.PathSettings" ) ), uno::UNO_QUERY_THROW );
+                rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSettings" )) ), uno::UNO_QUERY_THROW );
             xPathSettings->getPropertyValue( aInternal )  >>= aInternalPaths;
             xPathSettings->getPropertyValue( aUser )      >>= aUserPaths;
         }
diff --git a/tools/workben/urltest.cxx b/tools/workben/urltest.cxx
index 98424a5..b274ea4 100644
--- a/tools/workben/urltest.cxx
+++ b/tools/workben/urltest.cxx
@@ -611,7 +611,7 @@ main()
     if (true)
     {
         rtl::OUString
-            aParameters(rtl::OUString::createFromAscii("; CharSet=UTF-8  ; Blubber=Blob"));
+            aParameters(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "; CharSet=UTF-8  ; Blubber=Blob" )));
         sal_Unicode const * pBegin = aParameters.getStr();
         sal_Unicode const * pEnd = pBegin + aParameters.getLength();
         INetContentTypeParameterList aList;
@@ -1451,7 +1451,7 @@ main()
     }
 
     if (true) { // #112130#
-        INetURLObject url1(rtl::OUString::createFromAscii(".uno:abc%3Fdef"));
+        INetURLObject url1(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:abc%3Fdef" )));
         if (url1.GetProtocol() != INET_PROT_UNO) {
             printf("BAD .uno:abc%%3Fdef\n");
             bSuccess = false;
@@ -1469,7 +1469,7 @@ main()
             printf("BAD HasParam(.uno:abc%%3Fdef)\n");
             bSuccess = false;
         }
-        INetURLObject url2(rtl::OUString::createFromAscii(".uno:abc?def?ghi"));
+        INetURLObject url2(rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( ".uno:abc?def?ghi" )));
         if (url2.GetProtocol() != INET_PROT_UNO) {
             printf("BAD .uno:abc?def?ghi\n");
             bSuccess = false;
commit fe14d09179231f64cfd3337d4487f4dad0f6ebdc
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 18 13:50:03 2010 +0000

    remove 64bit warnings in debug mode

diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx
index 5a54ef2..d13e559 100644
--- a/vcl/source/fontsubset/sft.cxx
+++ b/vcl/source/fontsubset/sft.cxx
@@ -1842,7 +1842,7 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t )
         {
 #if OSL_DEBUG_LEVEL > 1
             if( t->tables[i] )
-                fprintf( stderr, "font file %s has bad table offset %d (tagnum=%d)\n", t->fname, (sal_uInt8*)t->tables[i]-t->ptr, i );
+                fprintf( stderr, "font file %s has bad table offset %" SAL_PRI_PTRDIFFT "d (tagnum=%d)\n", t->fname, (sal_uInt8*)t->tables[i]-t->ptr, i );
 #endif
             t->tlens[i] = 0;
             t->tables[i] = NULL;
diff --git a/vcl/unx/source/dtrans/X11_clipboard.cxx b/vcl/unx/source/dtrans/X11_clipboard.cxx
index 18b0bb4..6f60d48 100644
--- a/vcl/unx/source/dtrans/X11_clipboard.cxx
+++ b/vcl/unx/source/dtrans/X11_clipboard.cxx
@@ -108,7 +108,7 @@ void X11Clipboard::fireChangedContentsEvent()
 {
     ClearableMutexGuard aGuard( m_rSelectionManager.getMutex() );
 #if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "X11Clipboard::fireChangedContentsEvent for %s (%d listeners)\n",
+    fprintf( stderr, "X11Clipboard::fireChangedContentsEvent for %s (%" SAL_PRI_SIZET "u listeners)\n",
              OUStringToOString( m_rSelectionManager.getString( m_aSelection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(), m_aListeners.size() );
 #endif
     ::std::list< Reference< XClipboardListener > > listeners( m_aListeners );
diff --git a/vcl/unx/source/dtrans/X11_selection.cxx b/vcl/unx/source/dtrans/X11_selection.cxx
index d06cb26..38de22d 100644
--- a/vcl/unx/source/dtrans/X11_selection.cxx
+++ b/vcl/unx/source/dtrans/X11_selection.cxx
@@ -1237,7 +1237,7 @@ bool SelectionManager::getPasteData( Atom selection, const ::rtl::OUString& rTyp
             bSuccess = getPasteData( selection, nSelectedType, rData );
     }
 #if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "getPasteData for selection %s and data type %s returns %s, returned sequence has length %ld\n",
+    fprintf( stderr, "getPasteData for selection %s and data type %s returns %s, returned sequence has length %" SAL_PRIdINT32 "\n",
              OUStringToOString( getString( selection ), RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
              OUStringToOString( rType, RTL_TEXTENCODING_ISO_8859_1 ).getStr(),
              bSuccess ? "true" : "false",
diff --git a/vcl/unx/source/dtrans/config.cxx b/vcl/unx/source/dtrans/config.cxx
index 45e56b4..34eb2ea 100644
--- a/vcl/unx/source/dtrans/config.cxx
+++ b/vcl/unx/source/dtrans/config.cxx
@@ -67,7 +67,7 @@ sal_Int32 SelectionManager::getSelectionTimeout()
         DtransX11ConfigItem aCfg;
         m_nSelectionTimeout = aCfg.getSelectionTimeout();
 #if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "initialized selection timeout to %ld seconds\n", m_nSelectionTimeout );
+        fprintf( stderr, "initialized selection timeout to %" SAL_PRIdINT32 " seconds\n", m_nSelectionTimeout );
 #endif
     }
     return m_nSelectionTimeout;
@@ -88,7 +88,7 @@ DtransX11ConfigItem::DtransX11ConfigItem() :
         aKeys.getArray()[0] = OUString( RTL_CONSTASCII_USTRINGPARAM( SELECTION_PROPERTY ) );
         Sequence< Any > aValues = GetProperties( aKeys );
 #if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "found %ld properties for %s\n", aValues.getLength(), SELECTION_PROPERTY );
+        fprintf( stderr, "found %" SAL_PRIdINT32 " properties for %s\n", aValues.getLength(), SELECTION_PROPERTY );
 #endif
         Any* pValue = aValues.getArray();
         for( int i = 0; i < aValues.getLength(); i++, pValue++ )
diff --git a/vcl/unx/source/printer/printerinfomanager.cxx b/vcl/unx/source/printer/printerinfomanager.cxx
index c71088f..9aa1b7e 100644
--- a/vcl/unx/source/printer/printerinfomanager.cxx
+++ b/vcl/unx/source/printer/printerinfomanager.cxx
@@ -326,7 +326,7 @@ void PrinterInfoManager::initialize()
                 }
             }
             #if OSL_DEBUG_LEVEL > 1
-            fprintf( stderr, "global settings: fontsubst = %s, %d substitutes\n", m_aGlobalDefaults.m_bPerformFontSubstitution ? "true" : "false", m_aGlobalDefaults.m_aFontSubstitutes.size() );
+            fprintf( stderr, "global settings: fontsubst = %s, %" SAL_PRI_SIZET "u substitutes\n", m_aGlobalDefaults.m_bPerformFontSubstitution ? "true" : "false", m_aGlobalDefaults.m_aFontSubstitutes.size() );
             #endif
         }
     }
commit 1546287294ba9cce1c1c9cba44eccb44330e1f1d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 18 13:24:31 2010 +0000

    use printf size_t modifier on all platforms

diff --git a/vcl/unx/source/fontmanager/fontmanager.cxx b/vcl/unx/source/fontmanager/fontmanager.cxx
index 3bc8a1e..eef7888 100644
--- a/vcl/unx/source/fontmanager/fontmanager.cxx
+++ b/vcl/unx/source/fontmanager/fontmanager.cxx
@@ -705,7 +705,7 @@ bool PrintFontManager::TrueTypeFontFile::queryMetricPage( int nPage, MultiAtomPr
             }
 
 #if OSL_DEBUG_LEVEL > 1
-            fprintf( stderr, "found %d/%d kern pairs for %s\n",
+            fprintf( stderr, "found %" SAL_PRI_SIZET "u/%" SAL_PRI_SIZET "u kern pairs for %s\n",
                      m_pMetrics->m_aXKernPairs.size(),
                      m_pMetrics->m_aYKernPairs.size(),
                      OUStringToOString( pProvider->getString( ATOM_FAMILYNAME, m_nFamilyName ), RTL_TEXTENCODING_MS_1252 ).getStr() );
@@ -2405,7 +2405,7 @@ void PrintFontManager::initialize()
 
 #if OSL_DEBUG_LEVEL > 1
     aStep3 = times( &tms );
-    fprintf( stderr, "PrintFontManager::initialize: collected %d fonts (%d builtin, %d cached)\n", m_aFonts.size(), nBuiltinFonts, nCached );
+    fprintf( stderr, "PrintFontManager::initialize: collected %" SAL_PRI_SIZET "u fonts (%d builtin, %d cached)\n", m_aFonts.size(), nBuiltinFonts, nCached );
     double fTick = (double)sysconf( _SC_CLK_TCK );
     fprintf( stderr, "Step 1 took %lf seconds\n", (double)(aStep1 - aStart)/fTick );
     fprintf( stderr, "Step 2 took %lf seconds\n", (double)(aStep2 - aStep1)/fTick );


More information about the Libreoffice-commits mailing list