[Libreoffice-commits] .: dbaccess/source

David Tardon dtardon at kemper.freedesktop.org
Fri Feb 25 06:58:05 PST 2011


 dbaccess/source/ui/dlg/DbAdminImpl.cxx |   15 ++++++++-------
 dbaccess/source/ui/dlg/DbAdminImpl.hxx |    2 +-
 2 files changed, 9 insertions(+), 8 deletions(-)

New commits:
commit f5502dad6c1fcf575e43579d62d732ed61636ca6
Author: David Tardon <dtardon at redhat.com>
Date:   Fri Feb 25 15:47:48 2011 +0100

    fix debug build

diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
index c3ede7e..4f91b6d 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx
@@ -131,7 +131,7 @@ namespace
         }
         catch(Exception&)
         {
-    #ifdef DBG_UTIL
+    #if OSL_DEBUG_LEVEL > 0
             ::rtl::OString sMessage("ODbAdminDialog::implTranslateProperty: could not set the property ");
             sMessage += ::rtl::OString(_rName.getStr(), _rName.getLength(), RTL_TEXTENCODING_ASCII_US);
             sMessage += ::rtl::OString("!");
@@ -639,7 +639,7 @@ void ODbDataSourceAdministrationHelper::translateProperties(const Reference< XPr
             }
             catch(Exception&)
             {
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
                 ::rtl::OString aMessage("ODbDataSourceAdministrationHelper::translateProperties: could not extract the property ");
                 aMessage += ::rtl::OString(aDirect->second.getStr(), aDirect->second.getLength(), RTL_TEXTENCODING_ASCII_US);
                 aMessage += ::rtl::OString("!");
@@ -854,7 +854,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
         {
             if (aIndirectProps.end() != aIndirectProps.find(aPreserved->second))
             {
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
                 const ::rtl::OUString sName = aPreserved->second;
 #endif
                 aRemoveIndexes.push_back(aPreserved->first - nPositionCorrector);
@@ -868,7 +868,7 @@ void ODbDataSourceAdministrationHelper::fillDatasourceInfo(const SfxItemSet& _rS
                 ++aRemoveIndex
             )
             ::comphelper::removeElementAt(_rInfo, *aRemoveIndex);
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
         const PropertyValue* pWhatsLeft = _rInfo.getConstArray();
         const PropertyValue* pWhatsLeftEnd = pWhatsLeft + _rInfo.getLength();
         for (; pWhatsLeft != pWhatsLeftEnd; ++pWhatsLeft)
@@ -961,7 +961,8 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X
     Any aValue = implTranslateProperty(_pItem);
     lcl_putProperty(_rxSet, _rName,aValue);
 }
-#ifdef DBG_UTIL
+
+#if OSL_DEBUG_LEVEL > 0
 //-------------------------------------------------------------------------
 ::rtl::OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId )
 {
@@ -1077,7 +1078,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
                 }
             }
             else {
-                DBG_ERROR(
+                OSL_ENSURE(false,
                     (	::rtl::OString( "ODbDataSourceAdministrationHelper::implTranslateProperty: invalid property value (" )
                     +=	::rtl::OString( translatePropertyId( _nId ) )
                     +=	::rtl::OString( " should be no string sequence)!" )
@@ -1091,7 +1092,7 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet
             break;
 
         default:
-            DBG_ERROR("ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
+            OSL_ENSURE(false, "ODbDataSourceAdministrationHelper::implTranslateProperty: unsupported property value type!");
     }
 }
 
diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
index ad5a323..ad27050 100644
--- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx
+++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx
@@ -182,7 +182,7 @@ namespace dbaui
         */
         sal_Bool			hasAuthentication(const SfxItemSet& _rSet) const;
 
-#ifdef DBG_UTIL
+#if OSL_DEBUG_LEVEL > 0
         ::rtl::OString translatePropertyId( sal_Int32 _nId );
 #endif
     };


More information about the Libreoffice-commits mailing list