diff options
author | Michaël Lefèvre <lefevre00@yahoo.fr> | 2014-03-31 23:07:38 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-04-03 11:23:49 +0000 |
commit | c03c9da8c249c2e2a61bab3d6fad325d5934f5e0 (patch) | |
tree | 1f959f7d9de367315bd824d910e13f8852c46b08 /svx/source | |
parent | 333282478a956709e648427b412d90f90fc1437b (diff) |
fdo#43157 : clean up OSL_POSTCOND
Conflicts:
include/sal/log-areas.dox
Change-Id: I770b8b9fb82f873ccb88dc26ac05206f703ddf33
Reviewed-on: https://gerrit.libreoffice.org/8805
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source')
-rw-r--r-- | svx/source/form/delayedevent.cxx | 3 | ||||
-rw-r--r-- | svx/source/form/fmshimp.cxx | 6 | ||||
-rw-r--r-- | svx/source/form/fmtextcontrolshell.cxx | 2 | ||||
-rw-r--r-- | svx/source/form/formcontroller.cxx | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/svx/source/form/delayedevent.cxx b/svx/source/form/delayedevent.cxx index 1ce234505027..0a226d24a010 100644 --- a/svx/source/form/delayedevent.cxx +++ b/svx/source/form/delayedevent.cxx @@ -20,7 +20,6 @@ #include "delayedevent.hxx" -#include <osl/diagnose.h> #include <vcl/svapp.hxx> @@ -35,7 +34,7 @@ namespace svxform void DelayedEvent::Call( void* _pArg ) { CancelPendingCall(); - OSL_POSTCOND( m_nEventId == 0, "DelayedEvent::Call: CancelPendingCall did not work!" ); + SAL_WARN_IF( m_nEventId != 0, "svx.form", "DelayedEvent::Call: CancelPendingCall did not work!" ); m_nEventId = Application::PostUserEvent( LINK( this, DelayedEvent, OnCall ), _pArg ); } diff --git a/svx/source/form/fmshimp.cxx b/svx/source/form/fmshimp.cxx index 8ec0324ee6b7..9980f7946da6 100644 --- a/svx/source/form/fmshimp.cxx +++ b/svx/source/form/fmshimp.cxx @@ -1485,10 +1485,12 @@ void FmXFormShell::ExecuteSearch() m_aSearchForms.swap( aEmpty ); ::std::vector< OUString > aContextNames; impl_collectFormSearchContexts_nothrow( m_pShell->GetCurPage()->GetForms(), OUString(), m_aSearchForms, aContextNames ); - OSL_POSTCOND( m_aSearchForms.size() == aContextNames.size(), - "FmXFormShell::ExecuteSearch: nonsense!" ); + if ( m_aSearchForms.size() != aContextNames.size() ) + { + SAL_WARN ( "svx.form", "FmXFormShell::ExecuteSearch: nonsense!" ); return; + } // filter out the forms which do not contain valid controls at all { diff --git a/svx/source/form/fmtextcontrolshell.cxx b/svx/source/form/fmtextcontrolshell.cxx index 2230c80c8ec0..33b4f185d9f9 100644 --- a/svx/source/form/fmtextcontrolshell.cxx +++ b/svx/source/form/fmtextcontrolshell.cxx @@ -1006,7 +1006,7 @@ namespace svx bDisable |= true; break; } - OSL_POSTCOND( !bNeedSelection || bNeedTextComponent, "FmTextControlShell::GetTextAttributeState: bNeedSelection should imply bNeedTextComponent!" ); + SAL_WARN_IF( bNeedSelection && !bNeedTextComponent, "svx.form", "FmTextControlShell::GetTextAttributeState: bNeedSelection should imply bNeedTextComponent!" ); if ( !bDisable && bNeedWriteableControl ) bDisable |= !IsActiveControl( ) || m_bActiveControlIsReadOnly; diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx index 51f273166044..4910d26e890e 100644 --- a/svx/source/form/formcontroller.cxx +++ b/svx/source/form/formcontroller.cxx @@ -1030,8 +1030,8 @@ void SAL_CALL FormController::removeDisjunctiveTerm( ::sal_Int32 _Term ) throw ( if ( _Term < m_nCurrentFilterPosition ) --m_nCurrentFilterPosition; - OSL_POSTCOND( ( m_nCurrentFilterPosition < 0 ) == ( m_aFilterRows.empty() ), - "FormController::removeDisjunctiveTerm: inconsistency!" ); + SAL_WARN_IF( !( ( m_nCurrentFilterPosition < 0 ) != ( m_aFilterRows.empty() ) ), + "svx.form", "FormController::removeDisjunctiveTerm: inconsistency!" ); // update the texts in the filter controls impl_setTextOnAllFilter_throw(); |