From d894fee80e40519cb579987b95cb3d19345dfa71 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Wed, 20 Nov 2013 11:45:23 +0200 Subject: remove RTL_CONSTASCII_STRINGPARAM in OStringBuffer constructor Convert code like: OStringBuffer aKeyName(RTL_CONSTASCII_STRINGPARAM("NDX")); to: OStringBuffer aKeyName("NDX"); which compiles down to the same code Change-Id: If9c96a290bc18cc8285fb733f27be58c6958b63c --- sfx2/source/appl/appcfg.cxx | 4 ++-- sfx2/source/appl/appuno.cxx | 20 ++++++++------------ sfx2/source/appl/sfxhelp.cxx | 2 +- sfx2/source/control/request.cxx | 9 +++------ sfx2/source/control/unoctitm.cxx | 2 +- 5 files changed, 15 insertions(+), 22 deletions(-) (limited to 'sfx2/source') diff --git a/sfx2/source/appl/appcfg.cxx b/sfx2/source/appl/appcfg.cxx index 2ae3ec009704..acd9eebc1998 100644 --- a/sfx2/source/appl/appcfg.cxx +++ b/sfx2/source/appl/appcfg.cxx @@ -135,7 +135,7 @@ IMPL_LINK(SfxEventAsyncer_Impl, TimerHdl, Timer*, pAsyncTimer) #ifdef DBG_UTIL if (!xRef.Is()) { - OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("SfxEvent: ")); + OStringBuffer aTmp("SfxEvent: "); aTmp.append(OUStringToOString(aHint.GetEventName(), RTL_TEXTENCODING_UTF8)); OSL_TRACE( "%s", aTmp.getStr() ); } @@ -884,7 +884,7 @@ void SfxApplication::NotifyEvent( const SfxEventHint& rEventHint, bool bSynchron #ifdef DBG_UTIL if (!pDoc) { - OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("SfxEvent: ")); + OStringBuffer aTmp("SfxEvent: "); aTmp.append(OUStringToOString(rEventHint.GetEventName(), RTL_TEXTENCODING_UTF8)); OSL_TRACE( "%s", aTmp.getStr() ); } diff --git a/sfx2/source/appl/appuno.cxx b/sfx2/source/appl/appuno.cxx index 33ce8ed817ed..edc0bc536ef1 100644 --- a/sfx2/source/appl/appuno.cxx +++ b/sfx2/source/appl/appuno.cxx @@ -320,7 +320,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::SequencepUnoName); OSL_FAIL( aDbgStr.getStr() ); } @@ -333,7 +333,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence= nSubCount ) { // there was a parameter with a name that didn't match to any of the members - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("Property name does not match: ")); + OStringBuffer aStr("Property name does not match: "); aStr.append(OUStringToOString(rPropValue.Name, RTL_TEXTENCODING_UTF8)); OSL_FAIL( aStr.getStr() ); } @@ -364,7 +364,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence(nSlotId)); OSL_FAIL(aStr.getStr()); } @@ -1306,8 +1305,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence(nId)); DBG_ASSERT(nArgpUnoName) ; if ( !pItem->QueryValue( pValue[nActProp].Value ) ) { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "Item not convertible: ")); + OStringBuffer aStr("Item not convertible: "); aStr.append(static_cast(nSlotId)); OSL_FAIL(aStr.getStr()); } @@ -1390,8 +1387,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::SequenceQueryValue( pValue[nActProp++].Value ) ) { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "Item not convertible: ")); + OStringBuffer aStr("Item not convertible: "); aStr.append(static_cast(rArg.nSlotId)); OSL_FAIL(aStr.getStr()); } diff --git a/sfx2/source/appl/sfxhelp.cxx b/sfx2/source/appl/sfxhelp.cxx index 33224c51ee90..3640b4616a8c 100644 --- a/sfx2/source/appl/sfxhelp.cxx +++ b/sfx2/source/appl/sfxhelp.cxx @@ -636,7 +636,7 @@ sal_Bool SfxHelp::Start_Impl(const OUString& rURL, const Window* pWindow, const return sal_False; #ifdef DBG_UTIL - OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM("SfxHelp: HelpId = ")); + OStringBuffer aTmp("SfxHelp: HelpId = "); aTmp.append(OUStringToOString(aHelpURL, RTL_TEXTENCODING_UTF8)); OSL_TRACE( aTmp.getStr() ); #endif diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx index 403150554844..c5ced2466e03 100644 --- a/sfx2/source/control/request.cxx +++ b/sfx2/source/control/request.cxx @@ -204,8 +204,7 @@ SfxRequest::SfxRequest #ifdef DBG_UTIL else { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "Recording unsupported slot: ")); + OStringBuffer aStr("Recording unsupported slot: "); aStr.append(static_cast(pImp->pPool->GetSlotId(nSlotId))); OSL_FAIL(aStr.getStr()); } @@ -692,8 +691,7 @@ void SfxRequest::Done_Impl // new Recording uses UnoName! if ( !pImp->pSlot->pUnoName ) { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "Recording not exported slot: ")); + OStringBuffer aStr("Recording not exported slot: "); aStr.append(static_cast(pImp->pSlot->GetSlotId())); OSL_FAIL(aStr.getStr()); } @@ -714,8 +712,7 @@ void SfxRequest::Done_Impl #ifdef DBG_UTIL if ( SFX_ITEM_SET != eState ) { - OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM( - "Recording property not available: ")); + OStringBuffer aStr("Recording property not available: "); aStr.append(static_cast(pImp->pSlot->GetSlotId())); OSL_FAIL(aStr.getStr()); } diff --git a/sfx2/source/control/unoctitm.cxx b/sfx2/source/control/unoctitm.cxx index 7fdde8e0a71c..146245afcd12 100644 --- a/sfx2/source/control/unoctitm.cxx +++ b/sfx2/source/control/unoctitm.cxx @@ -444,7 +444,7 @@ SfxDispatchController_Impl::SfxDispatchController_Impl( { if ( aDispatchURL.Protocol == "slot:" && pUnoName ) { - OStringBuffer aTmp(RTL_CONSTASCII_STRINGPARAM(".uno:")); + OStringBuffer aTmp(".uno:"); aTmp.append(pUnoName); aDispatchURL.Complete = OStringToOUString(aTmp.makeStringAndClear(), RTL_TEXTENCODING_ASCII_US); Reference< XURLTransformer > xTrans( URLTransformer::create( ::comphelper::getProcessComponentContext() ) ); -- cgit