summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorRohan Kumar <rohankanojia420@gmail.com>2016-03-07 21:50:41 +0530
committerjan iversen <jani@documentfoundation.org>2016-03-08 13:31:09 +0000
commit576ab772555ed9f06995d9b5d605c90191500a76 (patch)
tree77865540ffe7b83eb625128cf722647c0c0665af /dbaccess
parent26b69a9d0f6ae454ccd57019a68ef96be2568ba5 (diff)
tdf#91794 Remove OSL_DEBUG_LEVEL > 1 conditionals
I either replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0 statements or i used SAL_INFO(..)s Change-Id: Iefb6b83e86e1767e55600b6e1989ee91207fb220 Reviewed-on: https://gerrit.libreoffice.org/23000 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSetCache.cxx4
-rw-r--r--dbaccess/source/core/dataaccess/databasecontext.cxx15
-rw-r--r--dbaccess/source/filter/xml/xmlfilter.cxx2
-rw-r--r--dbaccess/source/ui/browser/unodatbr.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/querycontroller.cxx8
5 files changed, 12 insertions, 19 deletions
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 69d388c22347..1d4970a97181 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -1133,10 +1133,10 @@ bool ORowSetCache::last( )
OSL_ENSURE(m_bBeforeFirst,"ORowSetCache::last return false and BeforeFirst isn't true");
m_aMatrixIter = m_pMatrix->end();
}
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
if(bRet)
{
- OSL_ENSURE((*m_aMatrixIter).is(),"ORowSetCache::last: Row not valid!");
+ assert((*m_aMatrixIter).is() && "ORowSetCache::last: Row not valid!");
}
#endif
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index b12ace6a5932..f4e92b59ad70 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -685,9 +685,7 @@ Reference< XInterface > ODatabaseContext::getObject( const OUString& _rURL )
void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl )
{
OUString sURL( _rModelImpl.getURL() );
-#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "DatabaseContext: registering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
+ SAL_INFO("dbaccess.core", "DatabaseContext: registering " << sURL);
if ( m_aDatabaseObjects.find( sURL ) == m_aDatabaseObjects.end() )
{
m_aDatabaseObjects[ sURL ] = &_rModelImpl;
@@ -700,19 +698,14 @@ void ODatabaseContext::registerDatabaseDocument( ODatabaseModelImpl& _rModelImpl
void ODatabaseContext::revokeDatabaseDocument( const ODatabaseModelImpl& _rModelImpl )
{
OUString sURL( _rModelImpl.getURL() );
-#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "DatabaseContext: deregistering %s", OUStringToOString( sURL, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
+ SAL_INFO("dbaccess.core", "DatabaseContext: deregistering " << sURL);
m_aDatabaseObjects.erase( sURL );
}
void ODatabaseContext::databaseDocumentURLChange( const OUString& _rOldURL, const OUString& _rNewURL )
{
-#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "DatabaseContext: changing registration from %s to %s",
- OUStringToOString( _rOldURL, RTL_TEXTENCODING_UTF8 ).getStr(),
- OUStringToOString( _rNewURL, RTL_TEXTENCODING_UTF8 ).getStr() );
-#endif
+ SAL_INFO("dbaccess.core", "DatabaseContext: changing registrations from " << _rOldURL <<
+ " to " << _rNewURL);
ObjectCache::iterator oldPos = m_aDatabaseObjects.find( _rOldURL );
ENSURE_OR_THROW( oldPos != m_aDatabaseObjects.end(), "illegal old database document URL" );
ObjectCache::iterator newPos = m_aDatabaseObjects.find( _rNewURL );
diff --git a/dbaccess/source/filter/xml/xmlfilter.cxx b/dbaccess/source/filter/xml/xmlfilter.cxx
index bd1d661c2a2a..44a3848b4a9e 100644
--- a/dbaccess/source/filter/xml/xmlfilter.cxx
+++ b/dbaccess/source/filter/xml/xmlfilter.cxx
@@ -114,7 +114,7 @@ sal_Int32 ReadThroughComponent(
}
catch (const SAXParseException& r)
{
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
SAL_WARN("dbaccess", "SAX parse exception catched while importing:\n" << r.Message << r.LineNumber << "," << r.ColumnNumber);
#else
(void)r;
diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx
index 43e1a35dd3fa..ed5b85e16622 100644
--- a/dbaccess/source/ui/browser/unodatbr.cxx
+++ b/dbaccess/source/ui/browser/unodatbr.cxx
@@ -3006,7 +3006,7 @@ void SbaTableQueryBrowser::unloadAndCleanup( bool _bDisposeConnection )
Reference< XPropertySet > xRowSetProps(getRowSet(),UNO_QUERY);
Reference< XConnection > xConn;
xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION) >>= xConn;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
{
Reference< XComponent > xComp(
xRowSetProps->getPropertyValue(PROPERTY_ACTIVE_CONNECTION),
diff --git a/dbaccess/source/ui/querydesign/querycontroller.cxx b/dbaccess/source/ui/querydesign/querycontroller.cxx
index 05b8bde2c3ba..498a70b35b30 100644
--- a/dbaccess/source/ui/querydesign/querycontroller.cxx
+++ b/dbaccess/source/ui/querydesign/querycontroller.cxx
@@ -138,7 +138,7 @@ extern "C" void SAL_CALL createRegistryInfo_OViewControl()
namespace dbaui
{
using namespace ::connectivity;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
namespace
{
void insertParseTree(SvTreeListBox* _pBox,::connectivity::OSQLParseNode* _pNode,SvTreeListEntry* _pParent = NULL)
@@ -541,7 +541,7 @@ FeatureState OQueryController::GetState(sal_uInt16 _nId) const
aReturn.bEnabled = true;
aReturn.bChecked = getContainer() && getContainer()->getPreviewFrame().is();
break;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
case ID_EDIT_QUERY_SQL:
break;
case ID_EDIT_QUERY_DESIGN:
@@ -749,7 +749,7 @@ void OQueryController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
{
}
break;
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
case ID_EDIT_QUERY_DESIGN:
case ID_EDIT_QUERY_SQL:
{
@@ -1137,7 +1137,7 @@ void OQueryController::describeSupportedFeatures()
implDescribeSupportedFeature( ".uno:DBLimit", SID_QUERY_LIMIT, CommandGroup::FORMAT );
implDescribeSupportedFeature( ".uno:DBQueryPropertiesDialog", SID_QUERY_PROP_DLG, CommandGroup::FORMAT );
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
implDescribeSupportedFeature( ".uno:DBShowParseTree", ID_EDIT_QUERY_SQL );
implDescribeSupportedFeature( ".uno:DBMakeDisjunct", ID_EDIT_QUERY_DESIGN );
#endif