summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-11-20 10:05:20 +0200
committerNoel Grandin <noel@peralex.com>2013-11-20 10:07:32 +0200
commit1730df0127ff230cf6c89f4815f5b59c8603fa2b (patch)
tree4d5b32ea155c173fe3cfd905bb148e0998286d9a /sfx2
parent52bbd9cc00b5a1e15e4f96b5c5fa5e75855692c1 (diff)
remove unnecessary RTL_CONSTASCII_STRINGPARAM in OString::append
Convert code like: aOStringBuf.append( RTL_CONSTASCII_STRINGPARAM( " is missing )") ); to: aOStringBuf.append( " is missing )" ); which compiles down to the same code. Change-Id: I3d8ed0cbf96a881686524a167412d5f303c06b71
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/impldde.cxx2
-rw-r--r--sfx2/source/bastyp/frmhtmlw.cxx4
-rw-r--r--sfx2/source/control/dispatch.cxx19
-rw-r--r--sfx2/source/control/objface.cxx20
-rw-r--r--sfx2/source/doc/docfac.cxx5
5 files changed, 21 insertions, 29 deletions
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 63630485d190..cc6431d0bd3a 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -248,7 +248,7 @@ sal_Bool SvDDEObject::Connect( SvBaseLink * pSvLink )
if( !bInWinExec )
{
OStringBuffer aCmdLine(OUStringToOString(sServer, RTL_TEXTENCODING_ASCII_US));
- aCmdLine.append(RTL_CONSTASCII_STRINGPARAM(".exe "));
+ aCmdLine.append(".exe ");
aCmdLine.append(OUStringToOString(sTopic, RTL_TEXTENCODING_ASCII_US));
if( WinExec( aCmdLine.getStr(), SW_SHOWMINIMIZED ) < 32 )
diff --git a/sfx2/source/bastyp/frmhtmlw.cxx b/sfx2/source/bastyp/frmhtmlw.cxx
index d3877b9abc3c..787e8175cca8 100644
--- a/sfx2/source/bastyp/frmhtmlw.cxx
+++ b/sfx2/source/bastyp/frmhtmlw.cxx
@@ -255,7 +255,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
aURL = URIHelper::simpleNormalizedMakeRelative(
rBaseURL, aURL );
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_src)
- .append(RTL_CONSTASCII_STRINGPARAM("=\""));
+ .append("=\"");
rOut << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rOut, aURL, eDestEnc, pNonConvertableChars );
sOut.append('\"');
@@ -266,7 +266,7 @@ void SfxFrameHTMLWriter::Out_FrameDescriptor(
if ( (aAny >>= aStr) && !aStr.isEmpty() )
{
sOut.append(' ').append(OOO_STRING_SVTOOLS_HTML_O_name)
- .append(RTL_CONSTASCII_STRINGPARAM("=\""));
+ .append("=\"");
rOut << sOut.makeStringAndClear().getStr();
HTMLOutFuncs::Out_String( rOut, aStr, eDestEnc, pNonConvertableChars );
sOut.append('\"');
diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 08e958e293ef..923a6152859a 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -369,7 +369,7 @@ SfxDispatcher::~SfxDispatcher()
{
#ifdef DBG_UTIL
- OStringBuffer sTemp(RTL_CONSTASCII_STRINGPARAM("Delete Dispatcher "));
+ OStringBuffer sTemp("Delete Dispatcher ");
sTemp.append(reinterpret_cast<sal_Int64>(this));
OSL_TRACE("%s", sTemp.getStr());
DBG_ASSERT( !pImp->bActive, "deleting active Dispatcher" );
@@ -680,8 +680,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
if ( bMDI )
{
#ifdef DBG_UTIL
- OStringBuffer sTemp(
- RTL_CONSTASCII_STRINGPARAM("Activate Dispatcher "));
+ OStringBuffer sTemp("Activate Dispatcher ");
sTemp.append(reinterpret_cast<sal_Int64>(this));
OSL_TRACE("%s", sTemp.getStr());
DBG_ASSERT( !pImp->bActive, "Activation error" );
@@ -698,8 +697,7 @@ void SfxDispatcher::DoActivate_Impl( sal_Bool bMDI, SfxViewFrame* /* pOld */ )
else
{
#ifdef DBG_UTIL
- OStringBuffer sTemp(
- RTL_CONSTASCII_STRINGPARAM("Non-MDI-Activate Dispatcher"));
+ OStringBuffer sTemp("Non-MDI-Activate Dispatcher");
sTemp.append(reinterpret_cast<sal_Int64>(this));
OSL_TRACE("%s", sTemp.getStr());
#endif
@@ -762,7 +760,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
if ( bMDI )
{
- OSL_TRACE(OStringBuffer(RTL_CONSTASCII_STRINGPARAM("Deactivate Dispatcher")).append(reinterpret_cast<sal_Int64>(this)).getStr());
+ OSL_TRACE(OStringBuffer("Deactivate Dispatcher").append(reinterpret_cast<sal_Int64>(this)).getStr());
DBG_ASSERT( pImp->bActive, "Deactivate error" );
pImp->bActive = sal_False;
@@ -783,7 +781,7 @@ void SfxDispatcher::DoDeactivate_Impl( sal_Bool bMDI, SfxViewFrame* pNew )
}
}
else {
- OSL_TRACE(OStringBuffer(RTL_CONSTASCII_STRINGPARAM("Non-MDI-DeActivate Dispatcher")).append(reinterpret_cast<sal_Int64>(this)).getStr());
+ OSL_TRACE(OStringBuffer("Non-MDI-DeActivate Dispatcher").append(reinterpret_cast<sal_Int64>(this)).getStr());
}
if ( IsAppDispatcher() && !pSfxApp->IsDowning() )
@@ -2035,11 +2033,10 @@ sal_Bool SfxDispatcher::_FillState
sal_uInt16 nSlotId = rState.GetPool()->GetSlotId(pItem->Which());
if ( !pItem->IsA(pIF->GetSlot(nSlotId)->GetType()->Type()) )
{
- OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM(
- "item-type unequal to IDL (=> no BASIC)"));
- aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nwith SID: "));
+ OStringBuffer aMsg("item-type unequal to IDL (=> no BASIC)");
+ aMsg.append("\nwith SID: ");
aMsg.append(static_cast<sal_Int32>(nSlotId));
- aMsg.append(RTL_CONSTASCII_STRINGPARAM("\nin "));
+ aMsg.append("\nin ");
aMsg.append(pIF->GetClassName());
DbgOut(aMsg.getStr(), DBG_OUT_ERROR, __FILE__, __LINE__);
}
diff --git a/sfx2/source/control/objface.cxx b/sfx2/source/control/objface.cxx
index 345ab28d14f5..2778b393a6a0 100644
--- a/sfx2/source/control/objface.cxx
+++ b/sfx2/source/control/objface.cxx
@@ -221,11 +221,10 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
{
if ( pSlave->pLinkedSlot != pMasterSlot )
{
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Wrong Master/Slave- link: "));
+ OStringBuffer aStr("Wrong Master/Slave- link: ");
aStr.append(static_cast<sal_Int32>(
pMasterSlot->GetSlotId()));
- aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(" , ");
aStr.append(static_cast<sal_Int32>(
pSlave->GetSlotId()));
OSL_FAIL(aStr.getStr());
@@ -233,11 +232,10 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
if ( pSlave->nMasterSlotId != pMasterSlot->GetSlotId() )
{
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Wrong Master/Slave-Ids: "));
+ OStringBuffer aStr("Wrong Master/Slave-Ids: ");
aStr.append(static_cast<sal_Int32>(
pMasterSlot->GetSlotId()));
- aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(" , ");
aStr.append(static_cast<sal_Int32>(
pSlave->GetSlotId()));
OSL_FAIL(aStr.getStr());
@@ -253,10 +251,9 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
{
if ( pIter->pLinkedSlot->GetKind() != SFX_KIND_ENUM )
{
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Slave is no enum: "));
+ OStringBuffer aStr("Slave is no enum: ");
aStr.append(static_cast<sal_Int32>(pIter->GetSlotId()));
- aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(" , ");
aStr.append(static_cast<sal_Int32>(
pIter->pLinkedSlot->GetSlotId()));
OSL_FAIL(aStr.getStr());
@@ -269,11 +266,10 @@ void SfxInterface::SetSlotMap( SfxSlot& rSlotMap, sal_uInt16 nSlotCount )
pCurSlot = pCurSlot->pNextSlot;
if ( pCurSlot->GetStateFnc() != pIter->GetStateFnc() )
{
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "Linked Slots with different State Methods : "));
+ OStringBuffer aStr("Linked Slots with different State Methods : ");
aStr.append(static_cast<sal_Int32>(
pCurSlot->GetSlotId()));
- aStr.append(RTL_CONSTASCII_STRINGPARAM(" , "));
+ aStr.append(" , ");
aStr.append(static_cast<sal_Int32>(pIter->GetSlotId()));
OSL_FAIL(aStr.getStr());
}
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 67de74486ea9..fcbabc4fcf01 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -151,10 +151,9 @@ void SfxObjectFactory::RegisterViewFactory
{
if ( (*it)->GetAPIViewName() != sViewName )
continue;
- OStringBuffer aStr(RTL_CONSTASCII_STRINGPARAM(
- "SfxObjectFactory::RegisterViewFactory: duplicate view name '"));
+ OStringBuffer aStr("SfxObjectFactory::RegisterViewFactory: duplicate view name '");
aStr.append(OUStringToOString(sViewName, RTL_TEXTENCODING_ASCII_US));
- aStr.append(RTL_CONSTASCII_STRINGPARAM("'!"));
+ aStr.append("'!");
OSL_FAIL(aStr.getStr());
break;
}