diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-15 12:03:55 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-12-19 08:29:01 +0000 |
commit | f573de2a956d91f67c384dbb54c980c117219032 (patch) | |
tree | 05c58829e18e4099b56c3edaf2c6477b065a1a5b /sfx2 | |
parent | 6fd7c0c7714a90a6b99003b67a47b28b800cfdff (diff) |
no need to wrap calls to SAL_INFO in #ifdef DBG_UTIL
Change-Id: Ic373a8f145f3f78c3f109e36a9c1dd9156f0dd75
Reviewed-on: https://gerrit.libreoffice.org/32034
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appcfg.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/control/dispatch.cxx | 7 | ||||
-rw-r--r-- | sfx2/source/control/unoctitm.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/dialog/splitwin.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/doc/objmisc.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/doc/objstor.cxx | 6 |
7 files changed, 8 insertions, 38 deletions
diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 3a5c453aedf6..a4303961c8b2 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -850,12 +850,7 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron if ( bSynchron ) { -#ifdef DBG_UTIL - if (!pDoc) - { - SAL_INFO("sfx.appl", "SfxEvent: " << rEventHint.GetEventName()); - } -#endif + SAL_INFO_IF(!pDoc, "sfx.appl", "SfxEvent: " << rEventHint.GetEventName()); Broadcast(rEventHint); if ( pDoc ) pDoc->Broadcast( rEventHint ); diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 52d37a0d688f..6979b5ddfd5e 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -2505,9 +2505,7 @@ void SfxHelpTextWindow_Impl::SelectSearchText( const OUString& rSearchText, bool void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const { -#ifdef DBG_UTIL bool bSetOff = false; -#endif // set off the pagestyle header to prevent print output of the help URL try { @@ -2539,9 +2537,7 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const Reference< XModifiable > xReset(xStyles, UNO_QUERY); xReset->setModified(false); -#ifdef DBG_UTIL bSetOff = true; -#endif } } } @@ -2554,12 +2550,7 @@ void SfxHelpTextWindow_Impl::SetPageStyleHeaderOff() const SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): unexpected exception" ); } -#ifdef DBG_UTIL - if ( !bSetOff ) - { - SAL_WARN( "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" ); - } -#endif + SAL_WARN_IF( !bSetOff, "sfx.appl", "SfxHelpTextWindow_Impl::SetPageStyleHeaderOff(): set off failed" ); } diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx index ec5e1f74fe0e..ba5c92b1a1b4 100644 --- a/sfx2/source/control/dispatch.cxx +++ b/sfx2/source/control/dispatch.cxx @@ -475,10 +475,8 @@ SfxDispatcher::SfxDispatcher(SfxViewFrame *pViewFrame) */ SfxDispatcher::~SfxDispatcher() { -#ifdef DBG_UTIL SAL_WARN("sfx.control", "Delete Dispatcher " << reinterpret_cast<sal_Int64>(this)); DBG_ASSERT( !xImp->bActive, "deleting active Dispatcher" ); -#endif // So that no timer by Reschedule in PlugComm strikes the LeaveRegistrations xImp->aIdle.Stop(); @@ -733,10 +731,9 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI) SFX_STACK(SfxDispatcher::DoActivate); if ( bMDI ) { -#ifdef DBG_UTIL SAL_WARN("sfx.control", "Activate Dispatcher " << reinterpret_cast<sal_Int64>(this)); DBG_ASSERT( !xImp->bActive, "Activation error" ); -#endif + xImp->bActive = true; xImp->bUpdated = false; SfxBindings* pBindings = GetBindings(); @@ -748,9 +745,7 @@ void SfxDispatcher::DoActivate_Impl(bool bMDI) } else { -#ifdef DBG_UTIL SAL_WARN("sfx.control", "Non-MDI-Activate Dispatcher " << reinterpret_cast<sal_Int64>(this)); -#endif } if ( IsAppDispatcher() ) diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 3b0a6b8adbb1..3e744e5caae1 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -754,10 +754,8 @@ void SAL_CALL SfxDispatchController_Impl::dispatch( const css::util::URL& aURL, bSuccess = aReq.IsDone() || pItem != nullptr; } } -#ifdef DBG_UTIL else SAL_INFO("sfx.control", "MacroPlayer: Unknown slot dispatched!"); -#endif } } else diff --git a/sfx2/source/dialog/splitwin.cxx b/sfx2/source/dialog/splitwin.cxx index 2409baade4db..7e96d9582e88 100644 --- a/sfx2/source/dialog/splitwin.cxx +++ b/sfx2/source/dialog/splitwin.cxx @@ -733,7 +733,6 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, bool bFadeIn = ( pEmptyWin->nState & 2 ) != 0; pEmptyWin->bFadeIn = false; pEmptyWin->Actualize(); -#ifdef DBG_UTIL if ( !bPinned || !pEmptyWin->bFadeIn ) { SAL_INFO("sfx", "SfxSplitWindow::InsertWindow_Impl - registering empty Splitwindow" ); @@ -742,7 +741,6 @@ void SfxSplitWindow::InsertWindow_Impl( SfxDock_Impl* pDock, { SAL_INFO("sfx", "SfxSplitWindow::InsertWindow_Impl - registering real Splitwindow" ); } -#endif pWorkWin->RegisterChild_Impl( *GetSplitWindow(), eAlign, true )->nVisible = SfxChildVisibility::VISIBLE; pWorkWin->ArrangeChildren_Impl(); if ( bFadeIn ) diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx index 027e57b54d31..d546333bcf35 100644 --- a/sfx2/source/doc/objmisc.cxx +++ b/sfx2/source/doc/objmisc.cxx @@ -252,10 +252,7 @@ void SfxObjectShell::ResetError() void SfxObjectShell::EnableSetModified( bool bEnable ) { -#ifdef DBG_UTIL - if ( bEnable == pImpl->m_bEnableSetModified ) - SAL_INFO( "sfx", "SFX_PERSIST: EnableSetModified 2x called with the same value" ); -#endif + SAL_INFO_IF( bEnable == pImpl->m_bEnableSetModified, "sfx", "SFX_PERSIST: EnableSetModified 2x called with the same value" ); pImpl->m_bEnableSetModified = bEnable; } @@ -310,10 +307,8 @@ bool SfxObjectShell::IsModified() void SfxObjectShell::SetModified( bool bModifiedP ) { -#ifdef DBG_UTIL - if ( !bModifiedP && !IsEnableSetModified() ) - SAL_INFO( "sfx", "SFX_PERSIST: SetModified( sal_False ), although IsEnableSetModified() == sal_False" ); -#endif + SAL_INFO_IF( !bModifiedP && !IsEnableSetModified(), "sfx", + "SFX_PERSIST: SetModified( sal_False ), although IsEnableSetModified() == sal_False" ); if( !IsEnableSetModified() ) return; diff --git a/sfx2/source/doc/objstor.cxx b/sfx2/source/doc/objstor.cxx index e865a294b681..490d85d04b50 100644 --- a/sfx2/source/doc/objstor.cxx +++ b/sfx2/source/doc/objstor.cxx @@ -2772,10 +2772,8 @@ bool SfxObjectShell::PreDoSaveAs_Impl(const OUString& rFileName, const OUString& // all values present in both itemsets will be overwritten by the new parameters pMergedParams->Put(rItemSet); -#ifdef DBG_UTIL - if ( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SfxItemState::SET ) - SAL_WARN( "sfx.doc","Salvage item present in Itemset, check the parameters!"); -#endif + SAL_WARN_IF( pMergedParams->GetItemState( SID_DOC_SALVAGE) >= SfxItemState::SET, + "sfx.doc","Salvage item present in Itemset, check the parameters!"); // should be unnecessary - too hot to handle! pMergedParams->ClearItem( SID_DOC_SALVAGE ); |