basic/qa/cppunit/basic_coverage.cxx |    7 ++++---
 basic/qa/cppunit/basictest.cxx      |    8 ++++----
 basic/qa/cppunit/test_vba.cxx       |   11 ++++++-----
 include/sal/log-areas.dox           |    1 -
 4 files changed, 14 insertions(+), 13 deletions(-)

New commits:
commit 115c8b42b8db7882f3e10e7ff1ef2f48d3ef973c
Author:     Ilmari Lauhakangas <[email protected]>
AuthorDate: Sun Sep 3 13:33:13 2023 +0300
Commit:     Ilmari Lauhakangas <[email protected]>
CommitDate: Sun Sep 3 13:22:55 2023 +0200

    Revert "tdf#130924 replace '*printf' with 'SAL_*' logging macros."
    
    My mistake, did not notice
    https://bugs.documentfoundation.org/show_bug.cgi?id=130924#c5
    
    We shouldn't hide test output.
    
    This reverts commit df0db4132428e95d276e923d8d5fb603dbb7f7bb.
    
    Change-Id: Ieac40effb57333322f8db8ead093a83765d17a09
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156479
    Tested-by: Jenkins
    Tested-by: Ilmari Lauhakangas <[email protected]>
    Reviewed-by: Ilmari Lauhakangas <[email protected]>

diff --git a/basic/qa/cppunit/basic_coverage.cxx 
b/basic/qa/cppunit/basic_coverage.cxx
index ee36f2d1309f..0f0722917232 100644
--- a/basic/qa/cppunit/basic_coverage.cxx
+++ b/basic/qa/cppunit/basic_coverage.cxx
@@ -81,15 +81,16 @@ void Coverage::process_directory(const OUString& sDirName)
                     testMacro.LoadSourceFromFile("TestModule", sFileURL);
                     SbxVariableRef pReturn = testMacro.Run();
                     CPPUNIT_ASSERT_MESSAGE("No return variable huh?", 
pReturn.is());
-                    SAL_INFO("basic.qa", "macro result for " << sFileURL);
-                    SAL_INFO("basic.qa", "macro returned:\n" << 
pReturn->GetOUString());
+                    fprintf(stderr, "macro result for %s\n", 
OUStringToOString(sFileURL,RTL_TEXTENCODING_UTF8).getStr());
+                    fprintf(stderr, "macro returned:\n%s\n",
+                            OUStringToOString(pReturn->GetOUString(), 
RTL_TEXTENCODING_UTF8).getStr());
                     CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", 
OUString("OK"),
                                                  pReturn->GetOUString());
                 }
             }
         }
     }
-    SAL_INFO("basic.qa", "end process directory");
+    fprintf(stderr,"end process directory\n");
 }
 
 void Coverage::Coverage_Iterator()
diff --git a/basic/qa/cppunit/basictest.cxx b/basic/qa/cppunit/basictest.cxx
index ebf39635620a..8cf9812d5212 100644
--- a/basic/qa/cppunit/basictest.cxx
+++ b/basic/qa/cppunit/basictest.cxx
@@ -7,7 +7,6 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#include <sal/log.hxx>
 #include "basictest.hxx"
 #include <cppunit/plugin/TestPlugIn.h>
 #include <basic/sbstar.hxx>
@@ -43,7 +42,7 @@ MacroSnippet::MacroSnippet()
 void MacroSnippet::LoadSourceFromFile(const OUString& sModuleName, const 
OUString& sMacroFileURL)
 {
     OUString sSource;
-    SAL_INFO("basic.qa", "loadSource opening macro file" << sMacroFileURL);
+    fprintf(stderr,"loadSource opening macro file %s\n", OUStringToOString( 
sMacroFileURL, RTL_TEXTENCODING_UTF8 ).getStr() );
 
     osl::File aFile(sMacroFileURL);
     if(aFile.open(osl_File_OpenFlag_Read) == osl::FileBase::E_None)
@@ -113,8 +112,9 @@ const ErrCode& MacroSnippet::getError() const { return 
maErrCode; }
 
 IMPL_LINK( MacroSnippet, BasicErrorHdl, StarBASIC *, /*pBasic*/, bool)
 {
-    SAL_INFO("basic.qa", '(' << StarBASIC::GetLine() << ':' << 
StarBASIC::GetCol1() << ")");
-    SAL_INFO("basic.qa", "Basic error: " << StarBASIC::GetErrorText());
+    fprintf(stderr,"(%d:%d)\n",
+            StarBASIC::GetLine(), StarBASIC::GetCol1());
+    fprintf(stderr,"Basic error: %s\n", OUStringToOString( 
StarBASIC::GetErrorText(), RTL_TEXTENCODING_UTF8 ).getStr() );
     mbError = true;
     maErrCode = StarBASIC::GetErrorCode();
     return false;
diff --git a/basic/qa/cppunit/test_vba.cxx b/basic/qa/cppunit/test_vba.cxx
index a95e2db6a7bd..8a15ba7234e8 100644
--- a/basic/qa/cppunit/test_vba.cxx
+++ b/basic/qa/cppunit/test_vba.cxx
@@ -6,7 +6,6 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
-#include <sal/log.hxx>
 #include "basictest.hxx"
 #include <unotools/syslocaleoptions.hxx>
 
@@ -169,8 +168,9 @@ void VBATest::testMiscVBAFunctions()
         myMacro.LoadSourceFromFile("TestModule", sMacroURL);
         SbxVariableRef pReturn = myMacro.Run();
         CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is());
-        SAL_INFO("basic.qa", "macro result for" << macroSource[i]);
-        SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString());
+        fprintf(stderr, "macro result for %s\n", macroSource[i]);
+        fprintf(stderr, "macro returned:\n%s\n",
+                OUStringToOString(pReturn->GetOUString(), 
RTL_TEXTENCODING_UTF8).getStr());
         CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"),
                                      pReturn->GetOUString());
     }
@@ -248,8 +248,9 @@ void VBATest::testMiscOLEStuff()
         myMacro.LoadSourceFromFile("TestModule", sMacroURL);
         SbxVariableRef pReturn = myMacro.Run( aArgs );
         CPPUNIT_ASSERT_MESSAGE("No return variable huh?", pReturn.is());
-        SAL_INFO("basic.qa", "macro result for" << macroSource[i]);
-        SAL_INFO("basic.qa", "macro returned:\n" << pReturn->GetOUString());
+        fprintf(stderr, "macro result for %s\n", macroSource[i]);
+        fprintf(stderr, "macro returned:\n%s\n",
+                OUStringToOString(pReturn->GetOUString(), 
RTL_TEXTENCODING_UTF8).getStr());
         CPPUNIT_ASSERT_EQUAL_MESSAGE("Result not as expected", OUString("OK"),
                                      pReturn->GetOUString());
     }
diff --git a/include/sal/log-areas.dox b/include/sal/log-areas.dox
index 5540c0d2f228..53e1e3ae0cdd 100644
--- a/include/sal/log-areas.dox
+++ b/include/sal/log-areas.dox
@@ -40,7 +40,6 @@ certain functionality.
 @section basic
 
 @li @c basic
-@li @c basic.qa
 @li @c basic.sbx
 
 @section bridges

Reply via email to