summaryrefslogtreecommitdiff
path: root/editeng
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 /editeng
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 'editeng')
-rw-r--r--editeng/source/editeng/editdbg.cxx116
1 files changed, 57 insertions, 59 deletions
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index d2506990dadf..ed1ca6e4c31c 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -64,23 +64,23 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
switch ( rItem.Which() )
{
case EE_PARA_WRITINGDIR:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("WritingDir="));
+ aDebStr.append("WritingDir=");
aDebStr.append(static_cast<sal_Int32>(((SvxFrameDirectionItem&)rItem).GetValue()));
break;
case EE_PARA_OUTLLRSPACE:
case EE_PARA_LRSPACE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FI="));
+ aDebStr.append("FI=");
aDebStr.append(static_cast<sal_Int32>(((SvxLRSpaceItem&)rItem).GetTxtFirstLineOfst()));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", LI="));
+ aDebStr.append(", LI=");
aDebStr.append(static_cast<sal_Int32>(((SvxLRSpaceItem&)rItem).GetTxtLeft()));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", RI="));
+ aDebStr.append(", RI=");
aDebStr.append(static_cast<sal_Int32>(((SvxLRSpaceItem&)rItem).GetRight()));
break;
case EE_PARA_NUMBULLET:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("NumItem "));
+ aDebStr.append("NumItem ");
for ( sal_uInt16 nLevel = 0; nLevel < 3; nLevel++ )
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Level"));
+ aDebStr.append("Level");
aDebStr.append(static_cast<sal_Int32>(nLevel));
aDebStr.append('=');
const SvxNumberFormat* pFmt = ((const SvxNumBulletItem&)rItem).GetNumRule()->Get( nLevel );
@@ -92,64 +92,64 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
aDebStr.append(static_cast<sal_Int32>(pFmt->GetAbsLSpace()));
aDebStr.append(',');
if ( pFmt->GetNumberingType() == SVX_NUM_BITMAP )
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Bitmap"));
+ aDebStr.append("Bitmap");
else if( pFmt->GetNumberingType() != SVX_NUM_CHAR_SPECIAL )
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Number"));
+ aDebStr.append("Number");
else
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Char=["));
+ aDebStr.append("Char=[");
aDebStr.append(static_cast<sal_Int32>(pFmt->GetBulletChar()));
aDebStr.append(']');
}
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(") "));
+ aDebStr.append(") ");
}
}
break;
case EE_PARA_BULLETSTATE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("ShowBullet="));
+ aDebStr.append("ShowBullet=");
aDebStr.append(static_cast<sal_Int32>(((SfxBoolItem&)rItem).GetValue()));
break;
case EE_PARA_HYPHENATE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Hyphenate="));
+ aDebStr.append("Hyphenate=");
aDebStr.append(static_cast<sal_Int32>(((SfxBoolItem&)rItem).GetValue()));
break;
case EE_PARA_OUTLLEVEL:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Level="));
+ aDebStr.append("Level=");
aDebStr.append(static_cast<sal_Int32>(((SfxInt16Item&)rItem).GetValue()));
break;
case EE_PARA_ULSPACE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("SB="));
+ aDebStr.append("SB=");
aDebStr.append(static_cast<sal_Int32>(((SvxULSpaceItem&)rItem).GetUpper()));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", SA="));
+ aDebStr.append(", SA=");
aDebStr.append(static_cast<sal_Int32>(((SvxULSpaceItem&)rItem).GetLower()));
break;
case EE_PARA_SBL:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("SBL="));
+ aDebStr.append("SBL=");
if ( ((SvxLineSpacingItem&)rItem).GetLineSpaceRule() == SVX_LINE_SPACE_MIN )
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Min: "));
+ aDebStr.append("Min: ");
aDebStr.append(static_cast<sal_Int32>(((SvxLineSpacingItem&)rItem).GetInterLineSpace()));
}
else if ( ((SvxLineSpacingItem&)rItem).GetInterLineSpaceRule() == SVX_INTER_LINE_SPACE_PROP )
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Prop: "));
+ aDebStr.append("Prop: ");
aDebStr.append(static_cast<sal_Int32>(((SvxLineSpacingItem&)rItem).GetPropLineSpace()));
}
else
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Unsupported Type!"));
+ aDebStr.append("Unsupported Type!");
break;
case EE_PARA_JUST:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("SvxAdust="));
+ aDebStr.append("SvxAdust=");
aDebStr.append(static_cast<sal_Int32>(((SvxAdjustItem&)rItem).GetAdjust()));
break;
case EE_PARA_TABS:
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Tabs: "));
+ aDebStr.append("Tabs: ");
const SvxTabStopItem& rTabs = (const SvxTabStopItem&) rItem;
aDebStr.append(static_cast<sal_Int32>(rTabs.Count()));
if ( rTabs.Count() )
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("( "));
+ aDebStr.append("( ");
for (sal_uInt16 i = 0; i < rTabs.Count(); ++i)
{
const SvxTabStop& rTab = rTabs[i];
@@ -163,17 +163,17 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
case EE_CHAR_LANGUAGE:
case EE_CHAR_LANGUAGE_CJK:
case EE_CHAR_LANGUAGE_CTL:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Language="));
+ aDebStr.append("Language=");
aDebStr.append(static_cast<sal_Int32>(((SvxLanguageItem&)rItem).GetLanguage()));
break;
case EE_CHAR_COLOR:
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Color= "));
+ aDebStr.append("Color= ");
Color aColor( ((SvxColorItem&)rItem).GetValue() );
aDebStr.append(static_cast<sal_Int32>(aColor.GetRed()));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aDebStr.append(", ");
aDebStr.append(static_cast<sal_Int32>(aColor.GetGreen()));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aDebStr.append(", ");
aDebStr.append(static_cast<sal_Int32>(aColor.GetBlue()));
}
break;
@@ -181,9 +181,9 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
case EE_CHAR_FONTINFO_CJK:
case EE_CHAR_FONTINFO_CTL:
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Font="));
+ aDebStr.append("Font=");
aDebStr.append(OUStringToOString(((SvxFontItem&)rItem).GetFamilyName(), RTL_TEXTENCODING_ASCII_US));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(" (CharSet: "));
+ aDebStr.append(" (CharSet: ");
aDebStr.append(static_cast<sal_Int32>(((SvxFontItem&)rItem).GetCharSet()));
aDebStr.append(')');
}
@@ -192,20 +192,20 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
case EE_CHAR_FONTHEIGHT_CJK:
case EE_CHAR_FONTHEIGHT_CTL:
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Groesse="));
+ aDebStr.append("Groesse=");
aDebStr.append(static_cast<sal_Int32>(((SvxFontHeightItem&)rItem).GetHeight()));
Size aSz( 0, ((SvxFontHeightItem&)rItem).GetHeight() );
SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
MapMode aItemMapMode( (MapUnit) eUnit );
MapMode aPntMap( MAP_POINT );
aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(" Points="));
+ aDebStr.append(" Points=");
aDebStr.append(static_cast<sal_Int32>(aSz.Height()));
}
break;
case EE_CHAR_FONTWIDTH:
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Breite="));
+ aDebStr.append("Breite=");
aDebStr.append(static_cast<sal_Int32>(((SvxCharScaleWidthItem&)rItem).GetValue()));
aDebStr.append('%');
}
@@ -213,72 +213,72 @@ OString DbgOutItem(const SfxItemPool& rPool, const SfxPoolItem& rItem)
case EE_CHAR_WEIGHT:
case EE_CHAR_WEIGHT_CJK:
case EE_CHAR_WEIGHT_CTL:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontWeight="));
+ aDebStr.append("FontWeight=");
aDebStr.append(static_cast<sal_Int32>(((SvxWeightItem&)rItem).GetWeight()));
break;
case EE_CHAR_UNDERLINE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontUnderline="));
+ aDebStr.append("FontUnderline=");
aDebStr.append(static_cast<sal_Int32>(((SvxUnderlineItem&)rItem).GetLineStyle()));
break;
case EE_CHAR_OVERLINE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontOverline="));
+ aDebStr.append("FontOverline=");
aDebStr.append(static_cast<sal_Int32>(((SvxOverlineItem&)rItem).GetLineStyle()));
break;
case EE_CHAR_EMPHASISMARK:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontUnderline="));
+ aDebStr.append("FontUnderline=");
aDebStr.append(static_cast<sal_Int32>(((SvxEmphasisMarkItem&)rItem).GetEmphasisMark()));
break;
case EE_CHAR_RELIEF:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontRelief="));
+ aDebStr.append("FontRelief=");
aDebStr.append(static_cast<sal_Int32>(((SvxCharReliefItem&)rItem).GetValue()));
break;
case EE_CHAR_STRIKEOUT:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontStrikeout="));
+ aDebStr.append("FontStrikeout=");
aDebStr.append(static_cast<sal_Int32>(((SvxCrossedOutItem&)rItem).GetStrikeout()));
break;
case EE_CHAR_ITALIC:
case EE_CHAR_ITALIC_CJK:
case EE_CHAR_ITALIC_CTL:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontPosture="));
+ aDebStr.append("FontPosture=");
aDebStr.append(static_cast<sal_Int32>(((SvxPostureItem&)rItem).GetPosture()));
break;
case EE_CHAR_OUTLINE:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontOutline="));
+ aDebStr.append("FontOutline=");
aDebStr.append(static_cast<sal_Int32>(((SvxContourItem&)rItem).GetValue()));
break;
case EE_CHAR_SHADOW:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("FontShadowed="));
+ aDebStr.append("FontShadowed=");
aDebStr.append(static_cast<sal_Int32>(((SvxShadowedItem&)rItem).GetValue()));
break;
case EE_CHAR_ESCAPEMENT:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Escape="));
+ aDebStr.append("Escape=");
aDebStr.append(static_cast<sal_Int32>(((SvxEscapementItem&)rItem).GetEsc()));
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(", "));
+ aDebStr.append(", ");
aDebStr.append(static_cast<sal_Int32>(((SvxEscapementItem&)rItem).GetProp()));
break;
case EE_CHAR_PAIRKERNING:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("PairKerning="));
+ aDebStr.append("PairKerning=");
aDebStr.append(static_cast<sal_Int32>(((SvxAutoKernItem&)rItem).GetValue()));
break;
case EE_CHAR_KERNING:
{
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("Kerning="));
+ aDebStr.append("Kerning=");
aDebStr.append(static_cast<sal_Int32>(((SvxKerningItem&)rItem).GetValue()));
Size aSz( 0, (short)((SvxKerningItem&)rItem).GetValue() );
SfxMapUnit eUnit = rPool.GetMetric( rItem.Which() );
MapMode aItemMapMode( (MapUnit) eUnit );
MapMode aPntMap( MAP_POINT );
aSz = OutputDevice::LogicToLogic( aSz, aItemMapMode, aPntMap );
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM(" Points="));
+ aDebStr.append(" Points=");
aDebStr.append(static_cast<sal_Int32>(aSz.Height()));
}
break;
case EE_CHAR_WLM:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("WordLineMode="));
+ aDebStr.append("WordLineMode=");
aDebStr.append(static_cast<sal_Int32>(((SvxWordLineModeItem&)rItem).GetValue()));
break;
case EE_CHAR_XMLATTRIBS:
- aDebStr.append(RTL_CONSTASCII_STRINGPARAM("XMLAttribs=..."));
+ aDebStr.append("XMLAttribs=...");
break;
}
return aDebStr.makeStringAndClear();
@@ -343,9 +343,9 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
{
const EditCharAttrib& rAttr = pPPortion->GetNode()->GetCharAttribs().GetAttribs()[z];
OStringBuffer aCharAttribs;
- aCharAttribs.append(RTL_CONSTASCII_STRINGPARAM("\nA"));
+ aCharAttribs.append("\nA");
aCharAttribs.append(static_cast<sal_Int32>(nPortion));
- aCharAttribs.append(RTL_CONSTASCII_STRINGPARAM(": "));
+ aCharAttribs.append(": ");
aCharAttribs.append(static_cast<sal_Int32>(rAttr.GetItem()->Which()));
aCharAttribs.append('\t');
aCharAttribs.append(static_cast<sal_Int32>(rAttr.GetStart()));
@@ -362,17 +362,15 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
fprintf( fp, "\nNULL-Attribute!" );
sal_uInt16 nTextPortions = pPPortion->GetTextPortions().Count();
- OStringBuffer aPortionStr(
- RTL_CONSTASCII_STRINGPARAM("\nText portions: #"));
+ OStringBuffer aPortionStr("\nText portions: #");
aPortionStr.append(static_cast<sal_Int32>(nTextPortions));
- aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(" \nA"));
+ aPortionStr.append(" \nA");
aPortionStr.append(static_cast<sal_Int32>(nPortion));
- aPortionStr.append(
- RTL_CONSTASCII_STRINGPARAM(": Paragraph Length = "));
+ aPortionStr.append(": Paragraph Length = ");
aPortionStr.append(static_cast<sal_Int32>(pPPortion->GetNode()->Len()));
- aPortionStr.append(RTL_CONSTASCII_STRINGPARAM("\nA"));
+ aPortionStr.append("\nA");
aPortionStr.append(static_cast<sal_Int32>(nPortion));
- aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(": "));
+ aPortionStr.append(": ");
sal_uLong n = 0;
for ( z = 0; z < nTextPortions; z++ )
{
@@ -388,12 +386,12 @@ void EditDbg::ShowEditEngineData( EditEngine* pEE, sal_Bool bInfoBox )
aPortionStr.append(';');
n += pPortion->GetLen();
}
- aPortionStr.append(RTL_CONSTASCII_STRINGPARAM("\nA"));
+ aPortionStr.append("\nA");
aPortionStr.append(static_cast<sal_Int32>(nPortion));
- aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(": Total length: "));
+ aPortionStr.append(": Total length: ");
aPortionStr.append(static_cast<sal_Int32>(n));
if ( pPPortion->GetNode()->Len() != n )
- aPortionStr.append(RTL_CONSTASCII_STRINGPARAM(" => Error !!!"));
+ aPortionStr.append(" => Error !!!");
fprintf(fp, "%s", aPortionStr.getStr());
fprintf( fp, "\n\nLines:" );