summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-20 11:45:23 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 13:56:07 +0200
commitd894fee80e40519cb579987b95cb3d19345dfa71 (patch)
treef0b91e37171f4123d3528b681613c99f34509d2e /sfx2
parent5112f6a6c6e4cd76045f31e269a679b50dc83fb2 (diff)
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
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/appcfg.cxx4
-rw-r--r--sfx2/source/appl/appuno.cxx20
-rw-r--r--sfx2/source/appl/sfxhelp.cxx2
-rw-r--r--sfx2/source/control/request.cxx9
-rw-r--r--sfx2/source/control/unoctitm.cxx2
5 files changed, 15 insertions, 22 deletions
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::Sequence<beans::Propert
#ifdef DBG_UTIL
else
{
- OStringBuffer aDbgStr(RTL_CONSTASCII_STRINGPARAM("Property not convertible: "));
+ OStringBuffer aDbgStr("Property not convertible: ");
aDbgStr.append(pSlot->pUnoName);
OSL_FAIL( aDbgStr.getStr() );
}
@@ -333,7 +333,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
if ( nSub >= 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<beans::Propert
if ( !pItem )
{
#ifdef DBG_UTIL
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM("No creator method for argument: "));
+ OStringBuffer aStr("No creator method for argument: ");
aStr.append(rArg.pName);
OSL_FAIL( aStr.getStr() );
#endif
@@ -460,7 +460,7 @@ void TransformParameters( sal_uInt16 nSlotId, const uno::Sequence<beans::Propert
// ... but it was not convertible
bRet = sal_False;
#ifdef DBG_UTIL
- OStringBuffer aDbgStr(RTL_CONSTASCII_STRINGPARAM("Property not convertible: "));
+ OStringBuffer aDbgStr("Property not convertible: ");
aDbgStr.append(rArg.pName);
OSL_FAIL( aDbgStr.getStr() );
#endif
@@ -1003,8 +1003,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
else
{
// we will not rely on the "toggle" ability of some property slots
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Processing property slot without argument: "));
+ OStringBuffer aStr("Processing property slot without argument: ");
aStr.append(static_cast<sal_Int32>(nSlotId));
OSL_FAIL(aStr.getStr());
}
@@ -1306,8 +1305,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
continue;
}
- OStringBuffer aDbg(RTL_CONSTASCII_STRINGPARAM(
- "Unknown item detected: "));
+ OStringBuffer aDbg("Unknown item detected: ");
aDbg.append(static_cast<sal_Int32>(nId));
DBG_ASSERT(nArg<nFormalArgs, aDbg.getStr());
}
@@ -1337,8 +1335,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
pValue[nActProp].Name = OUString::createFromAscii(pSlot->pUnoName) ;
if ( !pItem->QueryValue( pValue[nActProp].Value ) )
{
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Item not convertible: "));
+ OStringBuffer aStr("Item not convertible: ");
aStr.append(static_cast<sal_Int32>(nSlotId));
OSL_FAIL(aStr.getStr());
}
@@ -1390,8 +1387,7 @@ void TransformItems( sal_uInt16 nSlotId, const SfxItemSet& rSet, uno::Sequence<b
pValue[nActProp].Name = OUString::createFromAscii( rArg.pName ) ;
if ( !pItem->QueryValue( pValue[nActProp++].Value ) )
{
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Item not convertible: "));
+ OStringBuffer aStr("Item not convertible: ");
aStr.append(static_cast<sal_Int32>(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<sal_Int32>(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<sal_Int32>(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<sal_Int32>(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() ) );