Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/3143

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/43/3143/1

vcl: convert some fprintf to SAL_INFO

Change-Id: I4b9a20e62e8e137a1bfaa1c654307f15c33e3d3c
---
M sal/inc/sal/log-areas.dox
M vcl/unx/gtk/app/gtkdata.cxx
M vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
M vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
M vcl/unx/kde/kdedata.cxx
M vcl/unx/kde/salnativewidgets-kde.cxx
M vcl/unx/kde4/KDESalFrame.cxx
M vcl/unx/kde4/KDEXLib.cxx
M vcl/unx/kde4/main.cxx
9 files changed, 27 insertions(+), 53 deletions(-)



diff --git a/sal/inc/sal/log-areas.dox b/sal/inc/sal/log-areas.dox
index 05c0f97..c36c742 100644
--- a/sal/inc/sal/log-areas.dox
+++ b/sal/inc/sal/log-areas.dox
@@ -260,6 +260,8 @@
 @li @c vcl.gdi - the GDI part of VCL, devices, bitmaps, etc.
 @li @c vcl.gtk - Gtk+ 2/3 plugin
 @li @c vcl.headless - bitmap-based backend
+@li @c vcl.kde - KDE
+@li @c vcl.kde4 - KDE4
 @li @c vcl.layout - Widget layout
 @li @c vcl.scrollbar - Scroll Bars
 @li @c vcl.sm - Session Manager
diff --git a/vcl/unx/gtk/app/gtkdata.cxx b/vcl/unx/gtk/app/gtkdata.cxx
index 36b0ec8..d8ef5ca 100644
--- a/vcl/unx/gtk/app/gtkdata.cxx
+++ b/vcl/unx/gtk/app/gtkdata.cxx
@@ -217,15 +217,12 @@
         {
            pDefCol = gdk_x11_colormap_foreign_new( pVis, pSD->m_aColormap.GetXColormap() );
            gdk_screen_set_default_colormap( pScreen, pDefCol );
-           #if OSL_DEBUG_LEVEL > 1
-           fprintf( stderr, "set new gdk color map for screen %d\n", nXScreen.getXScreen() );
-           #endif
+           SAL_INFO( "vcl.gtk", "set new gdk color map for screen " << nXScreen.getXScreen() );
         }
     }
-    #if OSL_DEBUG_LEVEL > 1
     else
-        fprintf( stderr, "not GdkVisual for visual id %d\n", (int)pSD->m_aVisual.visualid );
-    #endif
+        SAL_INFO( "vcl.gtk", "not GdkVisual for visual id " << pSD->m_aVisual.visualid );
+
     return pSD;
 }
 
@@ -463,7 +460,7 @@
             MAKE_CURSOR( POINTER_PAINTBRUSH, paintbrush_ );
 
         default:
-            fprintf( stderr, "pointer %d not implemented", ePointerStyle );
+            SAL_INFO( "vcl.gtk", "pointer " << ePointerStyle << "not implemented" );
             break;
         }
         if( !pCursor )
@@ -609,9 +606,7 @@
 void GtkData::Init()
 {
     int i;
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "GtkMainloop::Init()\n" );
-#endif
+    SAL_INFO( "vcl.gtk", "GtkMainloop::Init()" );
     XrmInitialize();
 
 #if !GTK_CHECK_VERSION(3,0,0)
diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
index 3558993..eebfe68 100644
--- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
+++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx
@@ -1820,10 +1820,7 @@
     if( !g_ascii_strcasecmp( pFilter, pExtn ) )
         bRetval = sal_True;
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "'%s' match extn '%s' vs '%s' yeilds %d\n",
-        filter_info->uri, pExtn, pFilter, bRetval );
-#endif
+    SAL_INFO( "vcl.gtk", "'" << filter_info->uri << "' match extn '" << pExtn << "' vs '" << 
pFilter << "' yeilds " << bRetval );
 
     return bRetval;
 }
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx 
b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
index 3f870ce..0d8cf4d 100644
--- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
+++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx
@@ -623,7 +623,7 @@
     {
         if ( !pSpinVal )
         {
-            fprintf( stderr, "Tried to draw CTRL_SPINBUTTONS, but the SpinButtons data structure 
didn't exist!\n" );
+            SAL_INFO( "vcl.gtk", "Tried to draw CTRL_SPINBUTTONS, but the SpinButtons data 
structure didn't exist!" );
             return;
         }
         areaRect = pSpinVal->maUpperRect;
diff --git a/vcl/unx/kde/kdedata.cxx b/vcl/unx/kde/kdedata.cxx
index 4eb00ff..07706b2 100644
--- a/vcl/unx/kde/kdedata.cxx
+++ b/vcl/unx/kde/kdedata.cxx
@@ -179,9 +179,7 @@
     {
         KStartupInfo::appStarted();
         m_bStartupDone = true;
-        #if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "called KStartupInfo::appStarted()\n" );
-        #endif
+        SAL_INFO( "vcl.kde", "called KStartupInfo::appStarted()" );
     }
 }
 
@@ -217,9 +215,8 @@
             XInitThreads();
 
         rtl::OString aVersion( qVersion() );
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "qt version string is \"%s\"\n", aVersion.getStr() );
-#endif
+        SAL_INFO( "vcl.kde", "qt version string is \"" << aVersion << "\"" );
+
         sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0, nMicro = 0;
         nMajor = aVersion.getToken( 0, '.', nIndex ).toInt32();
         if( nIndex > 0 )
@@ -228,16 +225,12 @@
             nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
         if( nMajor != 3 || nMinor < 2 || (nMinor == 2 && nMicro < 2) )
         {
-#if OSL_DEBUG_LEVEL > 1
-            fprintf( stderr, "unsuitable qt version %d.%d.%d\n", (int)nMajor, (int)nMinor, 
(int)nMicro );
-#endif
+            SAL_INFO( "vcl.kde", "unsuitable qt version " << nMajor << "." << nMinor << "." << 
nMicro );
             return NULL;
         }
 
         KDESalInstance* pInstance = new KDESalInstance( new SalYieldMutex() );
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "created KDESalInstance 0x%p\n", pInstance );
-#endif
+        SAL_INFO( "vcl.kde", "created KDESalInstance " << &pInstance );
 
         // initialize SalData
         KDEData *pSalData = new KDEData( pInstance );
diff --git a/vcl/unx/kde/salnativewidgets-kde.cxx b/vcl/unx/kde/salnativewidgets-kde.cxx
index 1f99710..dcce289 100644
--- a/vcl/unx/kde/salnativewidgets-kde.cxx
+++ b/vcl/unx/kde/salnativewidgets-kde.cxx
@@ -1800,18 +1800,14 @@
     else
         aInfo.m_eWidth = WIDTH_ULTRA_EXPANDED;
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "font name BEFORE system match: \"%s\"\n", OUStringToOString( 
aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
-#endif
+    SAL_INFO( "vcl.kde", "font name BEFORE system match: \"" << aInfo.m_aFamilyName << "\"" );
 
     // match font to e.g. resolve "Sans"
     psp::PrintFontManager::get().matchFont( aInfo, rLocale );
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "font match %s, name AFTER: \"%s\"\n",
-             aInfo.m_nID != 0 ? "succeeded" : "failed",
-             OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
-#endif
+    SAL_INFO( "vcl.kde", "font match " <<
+              (aInfo.m_nID != 0 ? "succeeded" : "failed") <<
+              ", name AFTER: \"" << aInfo.m_aFamilyName << "\"" );
 
     // font height
     int nPointHeight = qFontInfo.pointSize();
diff --git a/vcl/unx/kde4/KDESalFrame.cxx b/vcl/unx/kde4/KDESalFrame.cxx
index 6039daa..d25ee46 100644
--- a/vcl/unx/kde4/KDESalFrame.cxx
+++ b/vcl/unx/kde4/KDESalFrame.cxx
@@ -129,18 +129,14 @@
     else
         aInfo.m_eWidth = WIDTH_ULTRA_EXPANDED;
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "font name BEFORE system match: \"%s\"\n", OUStringToOString( 
aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
-#endif
+    SAL_INFO( "vcl.kde4", "font name BEFORE system match: \"" << aInfo.m_aFamilyName << "\"" );
 
     // match font to e.g. resolve "Sans"
     psp::PrintFontManager::get().matchFont( aInfo, rLocale );
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "font match %s, name AFTER: \"%s\"\n",
-             aInfo.m_nID != 0 ? "succeeded" : "failed",
-             OUStringToOString( aInfo.m_aFamilyName, RTL_TEXTENCODING_ISO_8859_1 ).getStr() );
-#endif
+    SAL_INFO( "vcl.kde4", "font match " <<
+              (aInfo.m_nID != 0 ? "succeeded" : "failed") <<
+              ", name AFTER: \"" << aInfo.m_aFamilyName << "\"" );
 
     // font height
     int nPointHeight = qFontInfo.pointSize();
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 1917df9..73915ee 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -392,9 +392,7 @@
     {
         KStartupInfo::appStarted();
         m_bStartupDone = true;
-        #if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "called KStartupInfo::appStarted()\n" );
-        #endif
+        SAL_INFO( "vcl.kde4", "called KStartupInfo::appStarted()" );
     }
 }
 
diff --git a/vcl/unx/kde4/main.cxx b/vcl/unx/kde4/main.cxx
index a934c43..45c1584 100644
--- a/vcl/unx/kde4/main.cxx
+++ b/vcl/unx/kde4/main.cxx
@@ -61,9 +61,8 @@
 #if QT_VERSION < 0x050000
         // Qt 4.x support needs >= 4.1.0
         rtl::OString aVersion( qVersion() );
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "qt version string is \"%s\"\n", aVersion.getStr() );
-#endif
+        SAL_INFO( "vcl.kde4", "qt version string is " << aVersion );
+
         sal_Int32 nIndex = 0, nMajor = 0, nMinor = 0;
         nMajor = aVersion.getToken( 0, '.', nIndex ).toInt32();
         if( nIndex > 0 )
@@ -74,16 +73,14 @@
             sal_Int32 nMicro = 0;
             if( nIndex > 0 )
                 nMicro = aVersion.getToken( 0, '.', nIndex ).toInt32();
-            fprintf( stderr, "unsuitable qt version %d.%d.%d\n", nMajor, nMinor, nMicro );
+            SAL_INFO( "vcl.kde4", "unsuitable qt version " << nMajor << "." << nMinor << "." << 
nMicro );
 #endif
             return NULL;
         }
 #endif
 
         KDESalInstance* pInstance = new KDESalInstance( new SalYieldMutex() );
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "created KDESalInstance 0x%p\n", pInstance );
-#endif
+        SAL_INFO( "vcl.kde4", "created KDESalInstance " << &pInstance );
 
         // initialize SalData
         KDEData *salData = new KDEData( pInstance );

-- 
To view, visit https://gerrit.libreoffice.org/3143
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4b9a20e62e8e137a1bfaa1c654307f15c33e3d3c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Thomas Arnhold <thomas@arnhold.org>


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.