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

Julien Nabet serval2412 at yahoo.fr
Fri May 22 07:58:21 PDT 2015


 sc/source/core/data/documen9.cxx        |    1 -
 sc/source/core/data/dptabdat.cxx        |    1 -
 sc/source/core/tool/compiler.cxx        |    1 -
 sc/source/core/tool/interpr5.cxx        |    3 +++
 sc/source/core/tool/parclass.cxx        |   11 ++++-------
 sc/source/filter/dif/difexp.cxx         |    2 --
 sc/source/filter/excel/read.cxx         |    1 -
 sc/source/filter/excel/tokstack.cxx     |    3 +--
 sc/source/filter/excel/xestring.cxx     |    1 -
 sc/source/filter/ftools/ftools.cxx      |    1 -
 sc/source/filter/lotus/op.cxx           |    1 -
 sc/source/filter/qpro/qpro.cxx          |    5 +----
 sc/source/filter/qpro/qprostyle.cxx     |    1 -
 sc/source/filter/starcalc/scflt.cxx     |    1 -
 sc/source/ui/app/inputwin.cxx           |    1 -
 sc/source/ui/docshell/docsh8.cxx        |   20 +++++---------------
 sc/source/ui/miscdlgs/retypepassdlg.cxx |    2 --
 sc/source/ui/vba/vbaapplication.cxx     |    2 --
 sc/source/ui/vba/vbaworkbook.cxx        |    1 -
 19 files changed, 14 insertions(+), 45 deletions(-)

New commits:
commit a4bf46accfc73f6993c1d29b84d586a91d21c2c8
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Thu May 21 22:49:50 2015 +0200

    Remove include stdio (part5)
    
    Change-Id: Iea3eb02b5ae54de1de14b5357726d1073e54e1af
    Reviewed-on: https://gerrit.libreoffice.org/15851
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx
index f780169..abaed19 100644
--- a/sc/source/core/data/documen9.cxx
+++ b/sc/source/core/data/documen9.cxx
@@ -57,7 +57,6 @@
 #include <documentlinkmgr.hxx>
 
 using namespace ::com::sun::star;
-#include <stdio.h>
 
 SfxBroadcaster* ScDocument::GetDrawBroadcaster()
 {
diff --git a/sc/source/core/data/dptabdat.cxx b/sc/source/core/data/dptabdat.cxx
index ad16b25..ca1fe11 100644
--- a/sc/source/core/data/dptabdat.cxx
+++ b/sc/source/core/data/dptabdat.cxx
@@ -25,7 +25,6 @@
 #include "document.hxx"
 #include "dpobject.hxx"
 
-#include <stdio.h>
 #include <rtl/math.hxx>
 #include <osl/diagnose.h>
 #include <tools/date.hxx>
diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx
index f2350e2..1253f59 100644
--- a/sc/source/core/tool/compiler.cxx
+++ b/sc/source/core/tool/compiler.cxx
@@ -43,7 +43,6 @@
 #include <rtl/ustring.hxx>
 #include <svtools/miscopt.hxx>
 #include <ctype.h>
-#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <math.h>
diff --git a/sc/source/core/tool/interpr5.cxx b/sc/source/core/tool/interpr5.cxx
index 8397a0e..c3c746d 100644
--- a/sc/source/core/tool/interpr5.cxx
+++ b/sc/source/core/tool/interpr5.cxx
@@ -20,7 +20,10 @@
 #include <rtl/math.hxx>
 #include <string.h>
 #include <math.h>
+
+#if OSL_DEBUG_LEVEL > 1
 #include <stdio.h>
+#endif
 
 #include <unotools/bootstrap.hxx>
 #include <officecfg/Office/Common.hxx>
diff --git a/sc/source/core/tool/parclass.cxx b/sc/source/core/tool/parclass.cxx
index 8afc2b0..c93ffc4 100644
--- a/sc/source/core/tool/parclass.cxx
+++ b/sc/source/core/tool/parclass.cxx
@@ -30,7 +30,6 @@
 
 #if OSL_DEBUG_LEVEL > 1
 // the documentation thingy
-#include <stdio.h>
 #include <com/sun/star/sheet/FormulaLanguage.hpp>
 #include <rtl/strbuf.hxx>
 #include "compiler.hxx"
@@ -498,7 +497,7 @@ void ScParameterClassification::GenerateDocumentation()
         OpCode eOp = OpCode(i);
         if ( !xMap->getSymbol(eOp).isEmpty() )
         {
-            fprintf( stdout, "%s: ", aEnvVarName);
+            SAL_TRACE("sc.core", "GenerateDocumentation, env var name: " << aEnvVarName);
             OStringBuffer aStr(OUStringToOString(xMap->getSymbol(eOp), RTL_TEXTENCODING_UTF8));
             aStr.append('(');
             formula::FormulaByteToken aToken( eOp);
@@ -549,12 +548,10 @@ void ScParameterClassification::GenerateDocumentation()
             // NoPar, 1Par, ...) and override parameter count with
             // classification
             if ( nParams != aToken.GetByte() )
-                fprintf( stdout, "(parameter count differs, token Byte: %d  classification: %d) ",
-                        aToken.GetByte(), nParams);
+                SAL_WARN("sc.core", "(parameter count differs, token Byte: " << aToken.GetByte() << " classification: " << nParams << ") ");
             aToken.SetByte( nParams);
             if ( nParams != aToken.GetParamCount() )
-                fprintf( stdout, "(parameter count differs, token ParamCount: %d  classification: %d) ",
-                        aToken.GetParamCount(), nParams);
+                SAL_WARN("sc.core", "(parameter count differs, token ParamCount: " << aToken.GetParamCount() << " classification: " << nParams << ") ");
             for ( sal_uInt16 j=0; j < nParams; ++j )
             {
                 if ( j > 0 )
@@ -608,7 +605,7 @@ void ScParameterClassification::GenerateDocumentation()
                 break;
                 default:;
             }
-            fprintf( stdout, "%s\n", aStr.getStr());
+            SAL_TRACE( "sc.core", "" << aStr.getStr() << "\n");
         }
     }
     fflush( stdout);
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx
index 79907ce..0678587 100644
--- a/sc/source/filter/dif/difexp.cxx
+++ b/sc/source/filter/dif/difexp.cxx
@@ -19,8 +19,6 @@
 
 #include <rtl/math.hxx>
 
-#include <stdio.h>
-
 #include "dif.hxx"
 #include "filter.hxx"
 #include "document.hxx"
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index 02d7078..159e8b4 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <stdlib.h>
-#include <stdio.h>
 
 #include "document.hxx"
 #include "scerrors.hxx"
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 7837b6d..8365121 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -24,7 +24,6 @@
 
 #include <svl/sharedstringpool.hxx>
 
-#include <stdio.h>
 #include <string.h>
 
 const sal_uInt16    TokenPool::nScTokenOff = 8192;
@@ -932,7 +931,7 @@ ScMatrix* TokenPool::GetMatrix( unsigned int n ) const
     if( n < nP_MatrixAkt )
         return ppP_Matrix[ n ];
     else
-        printf ("GETMATRIX %d >= %d\n", n, nP_MatrixAkt);
+        SAL_WARN("sc.filter", "GetMatrix: " << n << " >= " << nP_MatrixAkt << "\n");
     return NULL;
 }
 
diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx
index 0e1a127..3388048 100644
--- a/sc/source/filter/excel/xestring.cxx
+++ b/sc/source/filter/excel/xestring.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <algorithm>
-#include <stdio.h>
 
 #include <osl/diagnose.h>
 #include "xlstyle.hxx"
diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx
index 342715e..698dc14 100644
--- a/sc/source/filter/ftools/ftools.cxx
+++ b/sc/source/filter/ftools/ftools.cxx
@@ -41,7 +41,6 @@
 #include "orcusfiltersimpl.hxx"
 #endif
 
-#include <stdio.h>
 
 // ScFilterTools::ReadLongDouble()
 
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index bc5b690..fba14cd 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -19,7 +19,6 @@
 
 #include <rtl/math.hxx>
 
-#include <stdio.h>
 #include <string.h>
 #include <math.h>
 #include <ctype.h>
diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx
index 7a73b2e..442a0ad 100644
--- a/sc/source/filter/qpro/qpro.cxx
+++ b/sc/source/filter/qpro/qpro.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <sal/config.h>
-#include <stdio.h>
 #include <sfx2/docfile.hxx>
 
 #include "qproform.hxx"
@@ -44,9 +43,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt
     sal_uInt16 nStyle;
     bool bEndOfSheet = false;
 
-#if OSL_DEBUG_LEVEL > 1
-    fprintf( stderr, "Read sheet (%d)\n", nTab );
-#endif
+    SAL_INFO("sc", "Read sheet " << nTab << "\n");
 
     while( eERR_OK == eRet && !bEndOfSheet && nextRecord() )
     {
diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx
index e0db2209..64ad410 100644
--- a/sc/source/filter/qpro/qprostyle.cxx
+++ b/sc/source/filter/qpro/qprostyle.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <sal/config.h>
-#include <stdio.h>
 #include <sfx2/docfile.hxx>
 
 #include "qproform.hxx"
diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx
index b21f9a4..fbdbd01 100644
--- a/sc/source/filter/starcalc/scflt.cxx
+++ b/sc/source/filter/starcalc/scflt.cxx
@@ -41,7 +41,6 @@
 #include <svl/zforlist.hxx>
 #include <svl/PasswordHelper.hxx>
 #include <cassert>
-#include <stdio.h>
 #include <math.h>
 #include <string.h>
 
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index d0415df..42e6774 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -40,7 +40,6 @@
 #include <vcl/help.hxx>
 #include <vcl/settings.hxx>
 #include <svl/stritem.hxx>
-#include <stdio.h>
 
 #include "inputwin.hxx"
 #include "scmod.hxx"
diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx
index c78021f..5813bd2 100644
--- a/sc/source/ui/docshell/docsh8.cxx
+++ b/sc/source/ui/docshell/docsh8.cxx
@@ -19,7 +19,6 @@
 
 #include <config_features.h>
 
-#include <stdio.h>
 #include <tools/urlobj.hxx>
 #include <svl/converter.hxx>
 #include <comphelper/processfactory.hxx>
@@ -1058,12 +1057,9 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
     catch ( const sdbc::SQLException& aException )
     {
         sal_Int32 nError = aException.ErrorCode;
-#if OSL_DEBUG_LEVEL > 1
-        fprintf( stderr, "ScDocShell::DBaseExport: SQLException ErrorCode: %d, SQLState: %s, Message: %s\n",
-                (int)nError, OUStringToOString( aException.SQLState,
-                    RTL_TEXTENCODING_UTF8).getStr(), OUStringToOString(
-                        aException.Message, RTL_TEXTENCODING_UTF8).getStr());
-#endif
+        SAL_WARN("sc", "ScDocShell::DBaseExport: SQLException ErrorCode: " << nError << ", SQLState: " << aException.SQLState <<
+            ", Message: " << aException.Message << "\n");
+
         if (nError == 22018 || nError == 22001)
         {
             // SQL error 22018: Character not in target encoding.
@@ -1119,11 +1115,8 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
                             bEncErr = true;
                         }
                         nLen = aOString.getLength();
-#if OSL_DEBUG_LEVEL > 1
                         if (!bTest)
-                            fprintf( stderr, "ScDocShell::DBaseExport encoding error, string with default replacements: ``%s''\n",
-                                    OUStringToOString( aOUString, eCharSet).getStr());
-#endif
+                            SAL_WARN("sc", "ScDocShell::DBaseExport encoding error, string with default replacements: ``" << aOUString << "''\n");
                     }
                     else
                         nLen = aString.getLength() * sizeof(sal_Unicode);
@@ -1132,10 +1125,7 @@ sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncodi
                             pColLengths[nCol] < nLen)
                     {
                         bTest = false;
-#if OSL_DEBUG_LEVEL > 1
-                        fprintf( stderr, "ScDocShell::DBaseExport: field width: %d, encoded length: %d\n",
-                                (int)pColLengths[nCol], (int)nLen);
-#endif
+                        SAL_INFO("sc", "ScDocShell::DBaseExport: field width: " << pColLengths[nCol] << ", encoded length: " << nLen << "\n");
                     }
                 }
                 else
diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx
index ba02adc..511a341 100644
--- a/sc/source/ui/miscdlgs/retypepassdlg.cxx
+++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx
@@ -23,8 +23,6 @@
 #include "document.hxx"
 #include "tabprotection.hxx"
 
-#include <stdio.h>
-
 #include <vcl/msgbox.hxx>
 
 ScRetypePassDlg::ScRetypePassDlg(vcl::Window* pParent) :
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index cc51da6..d70c508 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -17,8 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include <stdio.h>
-
 #include <com/sun/star/frame/XLayoutManager.hpp>
 #include <com/sun/star/frame/XDesktop.hpp>
 #include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/sc/source/ui/vba/vbaworkbook.cxx b/sc/source/ui/vba/vbaworkbook.cxx
index 1883e29..383ad1d 100644
--- a/sc/source/ui/vba/vbaworkbook.cxx
+++ b/sc/source/ui/vba/vbaworkbook.cxx
@@ -41,7 +41,6 @@
 #include "excelvbahelper.hxx"
 #include "vbapalette.hxx"
 #include <osl/file.hxx>
-#include <stdio.h>
 #include "vbanames.hxx"
 #include "nameuno.hxx"
 #include "docoptio.hxx"


More information about the Libreoffice-commits mailing list