diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-07-09 08:50:37 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-07-13 18:14:11 +0200 |
commit | cbce40e965acef51822b31d73da5fbc271fbcad0 (patch) | |
tree | bad77c67c68055f7597b8ecf1df1b74e778873cf /dbaccess | |
parent | 429280541ff1fbbbf3f0482211a659c96c3347d2 (diff) |
Make content of OSL_ASSERT, DBG_ASSERT, etc. visiblie in non-debug builds
...to avoid lots of loplugin:staticmethods warnings. Also enables DBG_ASSERT
etc. also for --enable-debug builds in addition to --enable-dbgutil builds.
Change-Id: Ib89ecd9ab8ce7abb2c64790ace248b31f9d2b64d
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/RowSetBase.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/core/misc/dsntypes.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ext/macromigration/progressmixer.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/unodatbr.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 3 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/inc/unodatbr.hxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/TokenWriter.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx | 3 |
10 files changed, 8 insertions, 25 deletions
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx index ebdd4a81f073..26d799f04f2c 100644 --- a/dbaccess/source/core/api/RowSetBase.cxx +++ b/dbaccess/source/core/api/RowSetBase.cxx @@ -242,9 +242,7 @@ const ORowSetValue& ORowSetBase::impl_getValue(sal_Int32 columnIndex) ORowSetValueVector* pTemp = k->get(); OSL_ENSURE( pTemp != reinterpret_cast<void*>(0xfeeefeee),"HALT!" ); } -#endif OSL_ENSURE(!m_aCurrentRow.isNull() && m_aCurrentRow < m_pCache->getEnd() && aCacheIter != m_pCache->m_aCacheIterators.end(),"Invalid iterator set for currentrow!"); -#if OSL_DEBUG_LEVEL > 0 ORowSetRow rRow = (*m_aCurrentRow); OSL_ENSURE(rRow.is() && static_cast<sal_uInt16>(columnIndex) < (rRow->get()).size(),"Invalid size of vector!"); #endif diff --git a/dbaccess/source/core/misc/dsntypes.cxx b/dbaccess/source/core/misc/dsntypes.cxx index 1e4d003c271a..3e1f6790038a 100644 --- a/dbaccess/source/core/misc/dsntypes.cxx +++ b/dbaccess/source/core/misc/dsntypes.cxx @@ -72,7 +72,9 @@ ODsnTypeCollection::ODsnTypeCollection(const ::com::sun::star::uno::Reference< : ODsnTypeCollection::~ODsnTypeCollection() { +#if OSL_DEBUG_LEVEL > 0 OSL_ENSURE(0 == m_nLivingIterators, "ODsnTypeCollection::~ODsnTypeCollection : there are still living iterator objects!"); +#endif } OUString ODsnTypeCollection::getTypeDisplayName(const OUString& _sURL) const diff --git a/dbaccess/source/ext/macromigration/progressmixer.cxx b/dbaccess/source/ext/macromigration/progressmixer.cxx index 87c7d84579d1..d75da510282d 100644 --- a/dbaccess/source/ext/macromigration/progressmixer.cxx +++ b/dbaccess/source/ext/macromigration/progressmixer.cxx @@ -81,12 +81,11 @@ namespace dbmm namespace { -#if OSL_DEBUG_LEVEL > 0 bool lcl_isRunning( const ProgressMixer_Data& _rData ) { return _rData.pCurrentPhase != _rData.aPhases.end(); } -#endif + void lcl_ensureInitialized( ProgressMixer_Data& _rData ) { OSL_PRECOND( _rData.nWeightSum, "lcl_ensureInitialized: we have no phases, this will crash!" ); diff --git a/dbaccess/source/ui/browser/unodatbr.cxx b/dbaccess/source/ui/browser/unodatbr.cxx index e593add1f0b3..6b1220ff3531 100644 --- a/dbaccess/source/ui/browser/unodatbr.cxx +++ b/dbaccess/source/ui/browser/unodatbr.cxx @@ -1006,10 +1006,7 @@ void SAL_CALL SbaTableQueryBrowser::statusChanged( const FeatureStateEvent& _rEv { // if it's the slot for the document data source, remember the state Sequence< PropertyValue > aDescriptor; - #if OSL_DEBUG_LEVEL > 0 - bool bProperFormat = - #endif - _rEvent.State >>= aDescriptor; + bool bProperFormat = _rEvent.State >>= aDescriptor; OSL_ENSURE(bProperFormat, "SbaTableQueryBrowser::statusChanged: need a data access descriptor here!"); m_aDocumentDataSource.initializeFrom(aDescriptor); @@ -1879,10 +1876,8 @@ void SbaTableQueryBrowser::Execute(sal_uInt16 nId, const Sequence< PropertyValue OUString sNewQueryCommand; bool bNewQueryEP; -#if OSL_DEBUG_LEVEL > 0 bool bIsQuery = -#endif - implGetQuerySignature( sNewQueryCommand, bNewQueryEP ); + implGetQuerySignature( sNewQueryCommand, bNewQueryEP ); OSL_ENSURE( bIsQuery, "SbaTableQueryBrowser::Execute: was a query before, but is not anymore?" ); bFullReinit = ( sNewQueryCommand != m_sQueryCommand ) || ( m_bQueryEscapeProcessing != bNewQueryEP ); @@ -3318,14 +3313,11 @@ bool SbaTableQueryBrowser::getExistentConnectionFor( SvTreeListEntry* _pAnyEntry return _rConnection.is(); } -#if OSL_DEBUG_LEVEL > 0 bool SbaTableQueryBrowser::impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) const { return m_pTreeModel->GetRootLevelParent( _pEntry ) == _pEntry; } -#endif - bool SbaTableQueryBrowser::ensureConnection( SvTreeListEntry* _pDSEntry, void* pDSData, SharedConnection& _rConnection ) { OSL_ENSURE( impl_isDataSourceEntry( _pDSEntry ), "SbaTableQueryBrowser::ensureConnection: this entry does not denote a data source!" ); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index ece6bea52cfd..97c6452ce663 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -883,7 +883,6 @@ void ODbDataSourceAdministrationHelper::implTranslateProperty(const Reference< X lcl_putProperty(_rxSet, _rName,aValue); } -#if OSL_DEBUG_LEVEL > 0 OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId ) { OUString aString; @@ -904,8 +903,6 @@ OString ODbDataSourceAdministrationHelper::translatePropertyId( sal_Int32 _nId ) return aReturn; } -#endif - void ODbDataSourceAdministrationHelper::implTranslateProperty( SfxItemSet& _rSet, sal_Int32 _nId, const Any& _rValue ) { switch ( _rValue.getValueType().getTypeClass() ) diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.hxx b/dbaccess/source/ui/dlg/DbAdminImpl.hxx index 0e7803d9e9bc..5f952cfd2591 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.hxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.hxx @@ -167,9 +167,7 @@ namespace dbaui */ static bool hasAuthentication(const SfxItemSet& _rSet); -#if OSL_DEBUG_LEVEL > 0 OString translatePropertyId( sal_Int32 _nId ); -#endif }; } // namespace dbaui diff --git a/dbaccess/source/ui/inc/unodatbr.hxx b/dbaccess/source/ui/inc/unodatbr.hxx index fb8d26629f05..6f3eb8f49904 100644 --- a/dbaccess/source/ui/inc/unodatbr.hxx +++ b/dbaccess/source/ui/inc/unodatbr.hxx @@ -434,10 +434,8 @@ namespace dbaui void* _pTreeListUserData // in reality a DBTreeListUserData*, but we do not know this class here... ); -#if OSL_DEBUG_LEVEL > 0 // checks whether the given tree entry denotes a data source bool impl_isDataSourceEntry( SvTreeListEntry* _pEntry ) const; -#endif /// retrieves the data source URL/name for the given entry representing a data source OUString getDataSourceAcessor( SvTreeListEntry* _pDataSourceEntry ) const; diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx index e88d9da0f2ed..0ad8c09ab4b4 100644 --- a/dbaccess/source/ui/misc/TokenWriter.cxx +++ b/dbaccess/source/ui/misc/TokenWriter.cxx @@ -1013,7 +1013,9 @@ void OHTMLImportExport::FontOn() inline void OHTMLImportExport::FontOff() { +#if OSL_DEBUG_LEVEL > 0 OSL_ENSURE(m_bCheckFont,"Kein FontOn() gerufen"); +#endif TAG_OFF( OOO_STRING_SVTOOLS_HTML_font ); #if OSL_DEBUG_LEVEL > 0 m_bCheckFont = false; diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx index 7931fee33ba8..f9413ce3a338 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.cxx @@ -82,14 +82,12 @@ void OFieldDescGenWin::DisplayData( OFieldDescription* pFieldDescr ) m_pFieldControl->DisplayData(pFieldDescr); } -#if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* OFieldDescGenWin::GetEditorCtrl() { OTableDesignView* pDesignWin = static_cast<OTableDesignView*>(GetParent()->GetParent()->GetParent()); return pDesignWin->GetEditorCtrl(); } -#endif void OFieldDescGenWin::SaveData( OFieldDescription* pFieldDescr ) { m_pFieldControl->SaveData(pFieldDescr); diff --git a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx index 04011c61c340..15eed590dbb5 100644 --- a/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx +++ b/dbaccess/source/ui/tabledesign/FieldDescGenWin.hxx @@ -50,9 +50,8 @@ namespace dbaui void SetControlText( sal_uInt16 nControlId, const OUString& rText ); OUString GetControlText( sal_uInt16 nControlId ); void SetReadOnly( bool bReadOnly ); -#if OSL_DEBUG_LEVEL > 0 OTableEditorCtrl* GetEditorCtrl(); -#endif + // short GetFormatCategory(OFieldDescription* pFieldDescr); // gives you one of the CAT_xxx-values (CAT_NUMBER, CAT_DATE ...) belonging to the format specified by the field |