[Libreoffice-commits] core.git: desktop/source

Arnold Dumas arnold at dumas.at
Fri Jun 10 15:34:52 UTC 2016


 desktop/source/deployment/gui/dp_gui_dialog2.cxx |   16 +++++-----
 desktop/source/migration/migration.cxx           |   34 ++++++-----------------
 2 files changed, 17 insertions(+), 33 deletions(-)

New commits:
commit e1ca24369142af3e721e789bf757be671e1905b7
Author: Arnold Dumas <arnold at dumas.at>
Date:   Mon Jun 6 13:47:41 2016 +0200

    tdf#43157: Clean up OSL_TRACE
    
    Change-Id: I237c0aad5eefaf7e3dda2f84924c86cd7f82021b
    Reviewed-on: https://gerrit.libreoffice.org/25970
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Michael Stahl <mstahl at redhat.com>

diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 857395c..a4a5867 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -974,11 +974,11 @@ IMPL_LINK_TYPED( ExtMgrDialog, startProgress, void*, _bLockInterface, void )
             m_pProgressBar->SetValue( 100 );
         m_xAbortChannel.clear();
 
-        OSL_TRACE( " startProgress handler: stop" );
+        SAL_INFO( "desktop.deployment", " startProgress handler: stop" );
     }
     else
     {
-        OSL_TRACE( " startProgress handler: start" );
+        SAL_INFO( "desktop.deployment", " startProgress handler: start" );
     }
 
     m_pCancelBtn->Enable( bLockInterface );
@@ -1000,13 +1000,13 @@ void ExtMgrDialog::showProgress( bool _bStart )
     {
         m_nProgress = 0;
         m_bStartProgress = true;
-        OSL_TRACE( "showProgress start" );
+        SAL_INFO( "desktop.deployment", "showProgress start" );
     }
     else
     {
         m_nProgress = 100;
         m_bStopProgress = true;
-        OSL_TRACE( "showProgress stop!" );
+        SAL_INFO( "desktop.deployment", "showProgress stop!" );
     }
 
     DialogHelper::PostUserEvent( LINK( this, ExtMgrDialog, startProgress ), reinterpret_cast<void*>(bStart) );
@@ -1286,11 +1286,11 @@ IMPL_LINK_TYPED( UpdateRequiredDialog, startProgress, void*, _bLockInterface, vo
         if ( m_pProgressBar->IsVisible() )
             m_pProgressBar->SetValue( 100 );
         m_xAbortChannel.clear();
-        OSL_TRACE( " startProgress handler: stop" );
+        SAL_INFO( "desktop.deployment", " startProgress handler: stop" );
     }
     else
     {
-        OSL_TRACE( " startProgress handler: start" );
+        SAL_INFO( "desktop.deployment", " startProgress handler: start" );
     }
 
     m_pCancelBtn->Enable( bLockInterface );
@@ -1309,13 +1309,13 @@ void UpdateRequiredDialog::showProgress( bool _bStart )
     {
         m_nProgress = 0;
         m_bStartProgress = true;
-        OSL_TRACE( "showProgress start" );
+        SAL_INFO( "desktop.deployment", "showProgress start" );
     }
     else
     {
         m_nProgress = 100;
         m_bStopProgress = true;
-        OSL_TRACE( "showProgress stop!" );
+        SAL_INFO( "desktop.deployment", "showProgress stop!" );
     }
 
     DialogHelper::PostUserEvent( LINK( this, UpdateRequiredDialog, startProgress ), reinterpret_cast<void*>(bStart) );
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index b8e9333..fb9b08d 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -170,9 +170,7 @@ bool MigrationImpl::alreadyMigrated()
     File aFile(aStr);
     // create migration stamp, and/or check its existence
     bool bRet = aFile.open (osl_File_OpenFlag_Write | osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock) == FileBase::E_EXIST;
-    OSL_TRACE( "File '%s' exists? %d\n",
-               OUStringToOString(aStr, RTL_TEXTENCODING_ASCII_US).getStr(),
-               bRet );
+    SAL_INFO( "desktop.migration", "File '" << aStr << "' exists? " << bRet );
     return bRet;
 }
 
@@ -193,7 +191,7 @@ bool MigrationImpl::initializeMigration()
         bRet = !m_aInfo.userdata.isEmpty();
     }
 
-    OSL_TRACE( "Migration %s", bRet ? "needed" : "not required" );
+    SAL_INFO( "desktop.migration", "Migration " << ( bRet ? "needed" : "not required" ) );
 
     return bRet;
 }
@@ -344,7 +342,7 @@ bool MigrationImpl::checkMigrationCompleted()
     } catch (const Exception&) {
         // just return false...
     }
-    OSL_TRACE( "Migration %s", bMigrationCompleted ? "already completed" : "not done" );
+    SAL_INFO( "desktop.migration", "Migration " << ( bMigrationCompleted ? "already completed" : "not done" ) );
 
     return bMigrationCompleted;
 }
@@ -387,8 +385,7 @@ bool MigrationImpl::readAvailableMigrations(migrations_available& rAvailableMigr
         for (sal_Int32 j=0; j<seqVersions.getLength(); j++)
             aSupportedMigration.supported_versions.push_back(seqVersions[j].trim());
         insertSorted( rAvailableMigrations, aSupportedMigration );
-        OSL_TRACE( " available migration '%s'\n",
-                   OUStringToOString( aSupportedMigration.name, RTL_TEXTENCODING_ASCII_US ).getStr() );
+        SAL_INFO( "desktop.migration", " available migration '" << aSupportedMigration.name << "'" );
     }
 
     return true;
@@ -583,10 +580,8 @@ sal_Int32 MigrationImpl::findPreferredMigrationProcess(const migrations_availabl
         ++rIter;
     }
 
-    OSL_TRACE( " preferred migration is from product '%s'\n",
-               OUStringToOString( m_aInfo.productname, RTL_TEXTENCODING_ASCII_US ).getStr() );
-    OSL_TRACE( " and settings directory '%s'\n",
-               OUStringToOString( m_aInfo.userdata, RTL_TEXTENCODING_ASCII_US ).getStr() );
+    SAL_INFO( "desktop.migration", " preferred migration is from product '" << m_aInfo.productname << "'");
+    SAL_INFO( "desktop.migration", " and settings directory '" << m_aInfo.userdata << "'");
 
     return nIndex;
 }
@@ -705,10 +700,7 @@ bool getComponent(OUString const & path, OUString * component)
 {
     OSL_ASSERT(component != nullptr);
     if (path.isEmpty() || path[0] != '/') {
-        OSL_TRACE(
-            ("configuration migration in/exclude path %s ignored (does not"
-             " start with slash)"),
-            OUStringToOString(path, RTL_TEXTENCODING_UTF8).getStr());
+        SAL_INFO( "desktop.migration", "configuration migration in/exclude path " << path << " ignored (does not start with slash)" );
         return false;
     }
     sal_Int32 i = path.indexOf('/', 1);
@@ -781,11 +773,7 @@ void MigrationImpl::copyConfig()
                             seg, rtl_UriCharClassPchar, rtl_UriEncodeStrict,
                             RTL_TEXTENCODING_UTF8));
                     if (enc.isEmpty() && !seg.isEmpty()) {
-                        OSL_TRACE(
-                            ("configuration migration component %s ignored (cannot"
-                             " be encoded as file path)"),
-                            OUStringToOString(
-                                i->first, RTL_TEXTENCODING_UTF8).getStr());
+                        SAL_INFO( "desktop.migration", "configuration migration component " << i->first << " ignored (cannot be encoded as file path)" );
                         goto next;
                     }
                     buf.append('/');
@@ -800,11 +788,7 @@ void MigrationImpl::copyConfig()
                 regFilePath, setToSeq(i->second.includedPaths),
                 setToSeq(i->second.excludedPaths));
         } else {
-            OSL_TRACE(
-                ("configuration migration component %s ignored (only excludes,"
-                 " no includes)"),
-                OUStringToOString(
-                    i->first, RTL_TEXTENCODING_UTF8).getStr());
+            SAL_INFO( "desktop.migration", "configuration migration component " << i->first << " ignored (only excludes, no includes)" );
         }
 next:
         ;


More information about the Libreoffice-commits mailing list