[Libreoffice-commits] .: connectivity/source

Thomas Arnhold tarnhold at kemper.freedesktop.org
Tue Jan 24 01:27:30 PST 2012


 connectivity/source/drivers/evoab2/NConnection.cxx |    4 -
 connectivity/source/drivers/evoab2/NDebug.cxx      |   40 ------------------
 connectivity/source/drivers/evoab2/NDebug.hxx      |   45 ---------------------
 connectivity/source/drivers/evoab2/NStatement.cxx  |   13 ++----
 connectivity/source/drivers/evoab2/makefile.mk     |    1 
 5 files changed, 8 insertions(+), 95 deletions(-)

New commits:
commit e8d4222a1cf5770433d465441b35eced9b30f9b8
Author: Thomas Arnhold <thomas at arnhold.org>
Date:   Sun Jan 22 14:20:52 2012 +0100

    Remove evoab debug facility and use SAL_INFO

diff --git a/connectivity/source/drivers/evoab2/NConnection.cxx b/connectivity/source/drivers/evoab2/NConnection.cxx
index f3e5313..896d34f 100644
--- a/connectivity/source/drivers/evoab2/NConnection.cxx
+++ b/connectivity/source/drivers/evoab2/NConnection.cxx
@@ -36,8 +36,8 @@
 #include <comphelper/extract.hxx>
 #include <connectivity/dbexception.hxx>
 #include <comphelper/processfactory.hxx>
-#include "NDebug.hxx"
 #include <comphelper/sequence.hxx>
+#include <rtl/oustringostreaminserter.hxx>
 
 using namespace connectivity::evoab;
 using namespace dbtools;
@@ -105,7 +105,7 @@ IMPLEMENT_SERVICE_INFO(OEvoabConnection, "com.sun.star.sdbc.drivers.evoab.Connec
 void OEvoabConnection::construct(const ::rtl::OUString& url, const Sequence< PropertyValue >& info)  throw(SQLException)
 {
     osl_incrementInterlockedCount( &m_refCount );
-    EVO_TRACE_STRING("OEvoabConnection::construct()::url = %s\n", url );
+    SAL_INFO("evoab2", "OEvoabConnection::construct()::url = " << url );
 
      ::rtl::OUString sPassword;
         const char* pPwd                = "password";
diff --git a/connectivity/source/drivers/evoab2/NDebug.cxx b/connectivity/source/drivers/evoab2/NDebug.cxx
deleted file mode 100644
index 6fa7af3..0000000
--- a/connectivity/source/drivers/evoab2/NDebug.cxx
+++ /dev/null
@@ -1,40 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#include "NDebug.hxx"
-#include <osl/diagnose.h>
-#if OSL_DEBUG_LEVEL > 1
-void evo_traceStringMessage( const sal_Char *pFormat,
-                             const ::rtl::OUString& rString )
-{
-    rtl::OString aStr(::rtl::OUStringToOString(rString, RTL_TEXTENCODING_UTF8));
-    OSL_TRACE(pFormat, aStr.getStr());
-}
-#endif
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab2/NDebug.hxx b/connectivity/source/drivers/evoab2/NDebug.hxx
deleted file mode 100644
index 95ba056..0000000
--- a/connectivity/source/drivers/evoab2/NDebug.hxx
+++ /dev/null
@@ -1,45 +0,0 @@
-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
- /*************************************************************************
- *
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * Copyright 2000, 2010 Oracle and/or its affiliates.
- *
- * OpenOffice.org - a multi-platform office productivity suite
- *
- * This file is part of OpenOffice.org.
- *
- * OpenOffice.org is free software: you can redistribute it and/or modify
- * it under the terms of the GNU Lesser General Public License version 3
- * only, as published by the Free Software Foundation.
- *
- * OpenOffice.org is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU Lesser General Public License version 3 for more details
- * (a copy is included in the LICENSE file that accompanied this code).
- *
- * You should have received a copy of the GNU Lesser General Public License
- * version 3 along with OpenOffice.org.  If not, see
- * <http://www.openoffice.org/license.html>
- * for a copy of the LGPLv3 License.
- *
- ************************************************************************/
-
-#ifndef CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX
-#define CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX
-
-#include <stdio.h>
-#include <rtl/ustring.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-
-#if OSL_DEBUG_LEVEL > 1
-    void evo_traceStringMessage( const sal_Char* pFormat, const ::rtl::OUString& rString );
-#   define EVO_TRACE_STRING( pFormat, rString ) evo_traceStringMessage( pFormat, rString )
-#else
-#   define EVO_TRACE_STRING( pFormat, rString ) ((void)0)
-#endif
-
-#endif // CONNECTIVITY_EVOAB_DEBUG_HELPER_HXX
-
-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index fbd88ca..36786a4 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -26,10 +26,10 @@
  *
  ************************************************************************/
 
-
 #include <stdio.h>
 #include <osl/diagnose.h>
 #include <osl/thread.h>
+#include <rtl/oustringostreaminserter.hxx>
 #include <com/sun/star/sdbc/ResultSetConcurrency.hpp>
 #include <com/sun/star/sdbc/ResultSetType.hpp>
 #include <com/sun/star/sdbc/FetchDirection.hpp>
@@ -40,7 +40,6 @@
 #include "NConnection.hxx"
 #include "NDatabaseMetaData.hxx"
 #include "NResultSet.hxx"
-#include "NDebug.hxx"
 #include "resource/evoab2_res.hrc"
 #include <resource/common_res.hrc>
 #include <connectivity/dbexception.hxx>
@@ -415,7 +414,7 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
         }
         else if( aMatchString.indexOf( WILDCARD ) == -1 )
         {   // Simple string , eg. "to match" "contains in evo"
-            EVO_TRACE_STRING( "Plain contains '%s'", aMatchString );
+            SAL_INFO( "evoab2", "Plain contains '" << aMatchString << "'" );
             pResult = createTest( aColumnName, E_BOOK_QUERY_CONTAINS, aMatchString );
             if( pResult && bNotLike )
                 pResult = e_book_query_not( pResult, TRUE );
@@ -485,7 +484,7 @@ rtl::OUString OCommonStatement::getTableName()
 
 void OCommonStatement::parseSql( const rtl::OUString& sql, QueryData& _out_rQueryData )
 {
-    EVO_TRACE_STRING( "parsing %s", sql );
+    SAL_INFO( "evoab2", "parsing " << sql );
 
     _out_rQueryData.eFilterType = eFilterOther;
 
@@ -503,7 +502,7 @@ void OCommonStatement::parseSql( const rtl::OUString& sql, QueryData& _out_rQuer
     #if OSL_DEBUG_LEVEL > 1
         ::rtl::OUString sTreeDebug;
         pOrderByClause->showParseTree( sTreeDebug );
-        EVO_TRACE_STRING( "found order-by tree:\n%s", sTreeDebug );
+        SAL_INFO( "evoab2", "found order-by tree:\n" << sTreeDebug );
     #endif
         orderByAnalysis( pOrderByClause, _out_rQueryData.aSortOrder );
     }
@@ -514,7 +513,7 @@ void OCommonStatement::parseSql( const rtl::OUString& sql, QueryData& _out_rQuer
     #if OSL_DEBUG_LEVEL > 1
         ::rtl::OUString sTreeDebug;
         pWhereClause->showParseTree( sTreeDebug );
-        EVO_TRACE_STRING( "found where tree:\n%s", sTreeDebug );
+        SAL_INFO( "evoab2", "found where tree:\n" << sTreeDebug );
     #endif
         EBookQuery* pQuery = whereAnalysis( pWhereClause->getChild( 1 ) );
         if ( !pQuery )
@@ -622,7 +621,7 @@ Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const QueryDa
 // -------------------------------------------------------------------------
 Reference< XResultSet > OCommonStatement::impl_executeQuery_throw( const ::rtl::OUString& _rSql )
 {
-    EVO_TRACE_STRING( "OCommonStatement::impl_executeQuery_throw(%s)\n", _rSql );
+    SAL_INFO( "evoab2", "OCommonStatement::impl_executeQuery_throw(" << _rSql << "%s)\n" );
 
 #if OSL_DEBUG_LEVEL > 1
     g_message( "Parse SQL '%s'\n",
diff --git a/connectivity/source/drivers/evoab2/makefile.mk b/connectivity/source/drivers/evoab2/makefile.mk
index 6f61762..2a72f14 100755
--- a/connectivity/source/drivers/evoab2/makefile.mk
+++ b/connectivity/source/drivers/evoab2/makefile.mk
@@ -63,7 +63,6 @@ SLOFILES=\
     $(SLO)$/NResultSet.obj  \
     $(SLO)$/NResultSetMetaData.obj \
     $(SLO)$/EApi.obj \
-    $(SLO)$/NDebug.obj
 
 SHL1VERSIONMAP=$(SOLARENV)/src/component.map
 


More information about the Libreoffice-commits mailing list