diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 11:47:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-06-23 14:38:14 +0200 |
commit | 5e028ad5dccc6ff1a9250baf2196f7a2f235e314 (patch) | |
tree | 6c6992e6fccf43b60141fb6ae32a6ad8e37cb84d /sfx2/source/control | |
parent | f905d6056606234ba53a26a3e4105ad3560d4b7b (diff) |
simplify some string handling in tracing calls
Change-Id: I0fb76562429e691400a02216019c7f96791cf9b3
Reviewed-on: https://gerrit.libreoffice.org/39159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2/source/control')
-rw-r--r-- | sfx2/source/control/objface.cxx | 9 | ||||
-rw-r--r-- | sfx2/source/control/request.cxx | 24 |
2 files changed, 8 insertions, 25 deletions
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx index 39ebcc96eb55..2a12149cc6b3 100644 --- a/sfx2/source/control/objface.cxx +++ b/sfx2/source/control/objface.cxx @@ -179,12 +179,9 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount ) pCurSlot = pCurSlot->pNextSlot; if ( pCurSlot->GetStateFnc() != pIter->GetStateFnc() ) { - OStringBuffer aStr("Linked Slots with different State Methods : "); - aStr.append(static_cast<sal_Int32>( - pCurSlot->GetSlotId())); - aStr.append(" , "); - aStr.append(static_cast<sal_Int32>(pIter->GetSlotId())); - SAL_WARN("sfx.control", aStr.getStr()); + SAL_WARN("sfx.control", "Linked Slots with different State Methods : " + << pCurSlot->GetSlotId() + << " , " << pIter->GetSlotId() ); } } while ( pCurSlot != pIter ); diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index b9bcabb547a6..11f5bb9e7786 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -191,14 +191,10 @@ SfxRequest::SfxRequest pImpl->xRecorder = SfxRequest::GetMacroRecorder( pViewFrame ); pImpl->aTarget = pImpl->pShell->GetName(); } -#ifdef DBG_UTIL else { - OStringBuffer aStr("Recording unsupported slot: "); - aStr.append(static_cast<sal_Int32>(pImpl->pPool->GetSlotId(nSlotId))); - OSL_FAIL(aStr.getStr()); + SAL_WARN( "sfx", "Recording unsupported slot: " << pImpl->pPool->GetSlotId(nSlotId) ); } -#endif } @@ -573,12 +569,8 @@ void SfxRequest::Done_Impl // recordable? // new Recording uses UnoName! - if ( !pImpl->pSlot->pUnoName ) - { - OStringBuffer aStr("Recording not exported slot: "); - aStr.append(static_cast<sal_Int32>(pImpl->pSlot->GetSlotId())); - OSL_FAIL(aStr.getStr()); - } + SAL_WARN_IF( !pImpl->pSlot->pUnoName, "sfx", "Recording not exported slot: " + << pImpl->pSlot->GetSlotId() ); if ( !pImpl->pSlot->pUnoName ) // playing it safe return; @@ -593,14 +585,8 @@ void SfxRequest::Done_Impl const SfxPoolItem *pItem; sal_uInt16 nWhich = rPool.GetWhich(pImpl->pSlot->GetSlotId()); SfxItemState eState = pSet ? pSet->GetItemState( nWhich, false, &pItem ) : SfxItemState::UNKNOWN; -#ifdef DBG_UTIL - if ( SfxItemState::SET != eState ) - { - OStringBuffer aStr("Recording property not available: "); - aStr.append(static_cast<sal_Int32>(pImpl->pSlot->GetSlotId())); - OSL_FAIL(aStr.getStr()); - } -#endif + SAL_WARN_IF( SfxItemState::SET != eState, "sfx", "Recording property not available: " + << pImpl->pSlot->GetSlotId() ); uno::Sequence < beans::PropertyValue > aSeq; if ( eState == SfxItemState::SET ) TransformItems( pImpl->pSlot->GetSlotId(), *pSet, aSeq, pImpl->pSlot ); |