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 /forms | |
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 'forms')
-rw-r--r-- | forms/source/component/Columns.cxx | 2 | ||||
-rw-r--r-- | forms/source/runtime/formoperations.cxx | 4 | ||||
-rw-r--r-- | forms/source/xforms/propertysetbase.cxx | 4 |
3 files changed, 6 insertions, 4 deletions
diff --git a/forms/source/component/Columns.cxx b/forms/source/component/Columns.cxx index 944374e1ed2d..94c7e5f43841 100644 --- a/forms/source/component/Columns.cxx +++ b/forms/source/component/Columns.cxx @@ -97,9 +97,9 @@ sal_Int32 getColumnTypeByModelName(const OUString& aModelName) sal_Int32 nPrefixPos = aModelName.indexOf(aModelPrefix); #ifdef DBG_UTIL sal_Int32 nCompatiblePrefixPos = aModelName.indexOf(aCompatibleModelPrefix); -#endif DBG_ASSERT( (nPrefixPos != -1) || (nCompatiblePrefixPos != -1), "::getColumnTypeByModelName() : wrong servivce !"); +#endif OUString aColumnType = (nPrefixPos != -1) ? aModelName.copy(aModelPrefix.getLength()) diff --git a/forms/source/runtime/formoperations.cxx b/forms/source/runtime/formoperations.cxx index b770a5f0e129..aac04be88707 100644 --- a/forms/source/runtime/formoperations.cxx +++ b/forms/source/runtime/formoperations.cxx @@ -878,7 +878,9 @@ namespace frm bool FormOperations::impl_commitCurrentRecord_throw( sal_Bool* _pRecordInserted ) const { +#ifdef DBG_UTIL DBG_ASSERT( m_nMethodNestingLevel, "FormOperations::impl_commitCurrentRecord_throw: to be called within a MethodGuard'ed section only!" ); +#endif if ( !impl_hasCursor_nothrow() ) return false; @@ -911,7 +913,9 @@ namespace frm bool FormOperations::impl_commitCurrentControl_throw() const { +#ifdef DBG_UTIL DBG_ASSERT( m_nMethodNestingLevel, "FormOperations::impl_commitCurrentControl_throw: to be called within a MethodGuard'ed section only!" ); +#endif OSL_PRECOND( m_xController.is(), "FormOperations::commitCurrentControl: no controller!" ); if ( !m_xController.is() ) return false; diff --git a/forms/source/xforms/propertysetbase.cxx b/forms/source/xforms/propertysetbase.cxx index ee443fdbaa85..04cd4ac290df 100644 --- a/forms/source/xforms/propertysetbase.cxx +++ b/forms/source/xforms/propertysetbase.cxx @@ -123,10 +123,8 @@ void PropertySetBase::initializePropertyValueCache( sal_Int32 nHandle ) Any aCurrentValue; getFastPropertyValue( aCurrentValue, nHandle ); -#if OSL_DEBUG_LEVEL > 0 ::std::pair< PropertyValueCache::iterator, bool > aInsertResult = -#endif - m_aCache.insert( PropertyValueCache::value_type( nHandle, aCurrentValue ) ); + m_aCache.insert( PropertyValueCache::value_type( nHandle, aCurrentValue ) ); OSL_ENSURE( aInsertResult.second, "PropertySetBase::initializePropertyValueCache: already cached a value for this property!" ); } |