[Libreoffice-commits] core.git: include/sal sc/qa

Tor Lillqvist tml at collabora.com
Wed Nov 20 14:06:29 PST 2013


 include/sal/log-areas.dox      |    1 +
 sc/qa/unit/helper/qahelper.cxx |    6 +++---
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 3b176d77e7021d1ce3e82c28b921bbd4f7523a7d
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 21 00:03:02 2013 +0200

    Use SAL_INFO() instead of printf()
    
    printf() and SAL_INFO() / SAL_DEBUG() output apparently don't end up in
    correct order in a cppunit log file which can be extremely confusing. So let's
    use SAL_INFO() (with the tag sc.qa) for the qahelper debug output.
    
    Change-Id: I529482c07651f84688ec5751d2b3dfc7d89cb4ca

diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index eb22ea0..7d8d70f 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -85,6 +85,7 @@ certain functionality.
 @li @c sc
 @li @c sc.opencl
 @li @c sc.opencl.thread
+ at li @c sc.qa
 @li @c sc.core
 @li @c sc.filter - Calc filter
 @li @c sc.ui - Calc UI
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 23b45c8..1378e72 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -470,7 +470,7 @@ ScDocShellRef ScBootstrapFixture::load( bool bReadWrite,
         SfxItemSet* pSet = pSrcMed->GetItemSet();
         pSet->Put(SfxStringItem(SID_PASSWORD, *pPassword));
     }
-    printf("about to load %s\n", OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+    SAL_INFO( "sc.qa", "about to load " << rURL );
     if (!xDocShRef->DoLoad(pSrcMed))
     {
         xDocShRef->DoClose();
@@ -573,7 +573,7 @@ void ScBootstrapFixture::miscRowHeightsTest( TestParam* aTestValues, unsigned in
     for ( unsigned int index=0; index<numElems; ++index )
     {
         OUString sFileName = OUString::createFromAscii( aTestValues[ index ].sTestDoc );
-        printf("aTestValues[%u] %s\n", index, OUStringToOString( sFileName, RTL_TEXTENCODING_UTF8 ).getStr() );
+        SAL_INFO( "sc.qa", "aTestValues[" << index << "] " << sFileName );
         int nImportType =  aTestValues[ index ].nImportType;
         int nExportType =  aTestValues[ index ].nExportType;
         ScDocShellRef xShell = loadDoc( sFileName, nImportType );
@@ -597,7 +597,7 @@ void ScBootstrapFixture::miscRowHeightsTest( TestParam* aTestValues, unsigned in
             bool bCheckOpt = ( ( aTestValues[ index ].pData[ i ].nCheck & CHECK_OPTIMAL ) == CHECK_OPTIMAL );
             for ( ; nRow <= nEndRow; ++nRow )
             {
-                printf("\t checking row %" SAL_PRIdINT32 " for height %d\n", nRow, nExpectedHeight );
+                SAL_INFO( "sc.qa", " checking row " << nRow << " for height " << nExpectedHeight );
                 int nHeight = sc::TwipsToHMM( pDoc->GetRowHeight(nRow, nTab, false) );
                 if ( bCheckOpt )
                 {


More information about the Libreoffice-commits mailing list