summaryrefslogtreecommitdiff
path: root/sfx2/source/control/request.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 11:47:53 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-06-23 14:38:14 +0200
commit5e028ad5dccc6ff1a9250baf2196f7a2f235e314 (patch)
tree6c6992e6fccf43b60141fb6ae32a6ad8e37cb84d /sfx2/source/control/request.cxx
parentf905d6056606234ba53a26a3e4105ad3560d4b7b (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/request.cxx')
-rw-r--r--sfx2/source/control/request.cxx24
1 files changed, 5 insertions, 19 deletions
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 );