summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/stringconcat.cxx35
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/source/filter/html/css1atr.cxx26
-rw-r--r--sw/source/filter/html/htmlatr.cxx38
-rw-r--r--sw/source/filter/html/htmlforw.cxx66
-rw-r--r--sw/source/filter/html/htmlftn.cxx14
-rw-r--r--sw/source/filter/html/htmlnumwriter.cxx6
-rw-r--r--sw/source/filter/html/wrthtml.cxx12
8 files changed, 114 insertions, 85 deletions
diff --git a/compilerplugins/clang/stringconcat.cxx b/compilerplugins/clang/stringconcat.cxx
index cd33bab126ac..f58e8c41bae3 100644
--- a/compilerplugins/clang/stringconcat.cxx
+++ b/compilerplugins/clang/stringconcat.cxx
@@ -11,6 +11,35 @@
namespace {
+Expr const * stripCtor(Expr const * expr) {
+ auto e0 = expr;
+ auto const e1 = dyn_cast<CXXFunctionalCastExpr>(e0);
+ if (e1 != nullptr) {
+ e0 = e1->getSubExpr()->IgnoreParenImpCasts();
+ }
+ auto const e2 = dyn_cast<CXXBindTemporaryExpr>(e0);
+ if (e2 == nullptr) {
+ return expr;
+ }
+ auto const e3 = dyn_cast<CXXConstructExpr>(
+ e2->getSubExpr()->IgnoreParenImpCasts());
+ if (e3 == nullptr) {
+ return expr;
+ }
+ auto const n = e3->getConstructor()->getQualifiedNameAsString();
+ if (n != "rtl::OString::OString" && n != "rtl::OUString::OUString") {
+ return expr;
+ }
+ if (e3->getNumArgs() != 2) {
+ return expr;
+ }
+ return e3->getArg(0)->IgnoreParenImpCasts();
+}
+
+bool isStringLiteral(Expr const * expr) {
+ return isa<StringLiteral>(stripCtor(expr));
+}
+
class StringConcat:
public RecursiveASTVisitor<StringConcat>, public loplugin::Plugin
{
@@ -35,13 +64,13 @@ bool StringConcat::VisitCallExpr(CallExpr const * expr) {
if ((oo != OverloadedOperatorKind::OO_Plus
&& oo != OverloadedOperatorKind::OO_LessLess)
|| fdecl->getNumParams() != 2 || expr->getNumArgs() != 2
- || !isa<StringLiteral>(expr->getArg(1)->IgnoreParenImpCasts()))
+ || !isStringLiteral(expr->getArg(1)->IgnoreParenImpCasts()))
{
return true;
}
SourceLocation leftLoc;
auto const leftExpr = expr->getArg(0)->IgnoreParenImpCasts();
- if (isa<StringLiteral>(leftExpr)) {
+ if (isStringLiteral(leftExpr)) {
leftLoc = leftExpr->getLocStart();
} else {
CallExpr const * left = dyn_cast<CallExpr>(leftExpr);
@@ -56,7 +85,7 @@ bool StringConcat::VisitCallExpr(CallExpr const * expr) {
if ((loo != OverloadedOperatorKind::OO_Plus
&& loo != OverloadedOperatorKind::OO_LessLess)
|| ldecl->getNumParams() != 2 || left->getNumArgs() != 2
- || !isa<StringLiteral>(left->getArg(1)->IgnoreParenImpCasts()))
+ || !isStringLiteral(left->getArg(1)->IgnoreParenImpCasts()))
{
return true;
}
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index a0547383cb82..3e40dffbcfa1 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -632,7 +632,7 @@ void SwUiWriterTest::testExportRTF()
CPPUNIT_ASSERT(aData.indexOf("bbb") != -1);
CPPUNIT_ASSERT_EQUAL(sal_Int32(-1), aData.indexOf("ccc"));
// Ensure there's no extra newline
- CPPUNIT_ASSERT(aData.endsWith(OString("bbb}") + OString(SAL_NEWLINE_STRING) + OString("}")));
+ CPPUNIT_ASSERT(aData.endsWith("bbb}" SAL_NEWLINE_STRING "}"));
}
void SwUiWriterTest::testFdo74981()
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index b5690e80ed9e..202020f083f0 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -220,8 +220,8 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
{
m_bFirstCSS1Rule = false;
OutNewLine();
- sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_style) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_O_type) + "=\"text/css\">");
+ sOut.append("<" OOO_STRING_SVTOOLS_HTML_style " "
+ OOO_STRING_SVTOOLS_HTML_O_type "=\"text/css\">");
// Optional CSS2 code for dot leaders (dotted line between the Table of Contents titles and page numbers):
// (More inforation: http://www.w3.org/Style/Examples/007/leaders.en.html)
//
@@ -254,14 +254,14 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
if (m_bCfgPrintLayout) {
sOut.append(
- "p." + OString(sCSS2_P_CLASS_leaders) + "{max-width:" + OString::number(DOT_LEADERS_MAX_WIDTH) +
+ "p." sCSS2_P_CLASS_leaders "{max-width:" + OString::number(DOT_LEADERS_MAX_WIDTH) +
"cm;padding:0;overflow-x:hidden;line-height:120%}"
- "p." + OString(sCSS2_P_CLASS_leaders) + ":after{float:left;width:0;white-space:nowrap;content:\"");
+ "p." sCSS2_P_CLASS_leaders ":after{float:left;width:0;white-space:nowrap;content:\"");
for (int i = 0; i < 100; i++ )
sOut.append(". ");
sOut.append(
- "\"}p." + OString(sCSS2_P_CLASS_leaders) + " span:first-child{padding-right:0.33em;background:white}"
- "p." + OString(sCSS2_P_CLASS_leaders) + " span+span{float:right;padding-left:0.33em;"
+ "\"}p." sCSS2_P_CLASS_leaders " span:first-child{padding-right:0.33em;background:white}"
+ "p." sCSS2_P_CLASS_leaders " span+span{float:right;padding-left:0.33em;"
"background:white;position:relative;z-index:1}");
}
Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
@@ -277,8 +277,8 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
case CSS1_OUTMODE_SPAN_TAG1_ON:
if( m_bTagOn )
{
- sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_span) +
- " " + OString(OOO_STRING_SVTOOLS_HTML_O_style) + "=\"");
+ sOut.append("<" OOO_STRING_SVTOOLS_HTML_span
+ " " OOO_STRING_SVTOOLS_HTML_O_style "=\"");
}
else
{
@@ -295,7 +295,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
break;
case CSS1_OUTMODE_STYLE_OPT_ON:
- sOut.append(" " + OString(OOO_STRING_SVTOOLS_HTML_O_style) + "=\"");
+ sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_style "=\"");
break;
}
m_bFirstCSS1Property = false;
@@ -840,8 +840,8 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFormat *pFormat, OString& rTok
case RES_POOLCOLL_TABLE:
if( pPseudo )
{
- rToken = OString(OOO_STRING_SVTOOLS_HTML_tabledata) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_parabreak);
+ rToken = OOO_STRING_SVTOOLS_HTML_tabledata " "
+ OOO_STRING_SVTOOLS_HTML_parabreak;
}
else
rToken = OOO_STRING_SVTOOLS_HTML_parabreak;
@@ -849,8 +849,8 @@ sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFormat *pFormat, OString& rTok
case RES_POOLCOLL_TABLE_HDLN:
if( pPseudo )
{
- rToken = OString(OOO_STRING_SVTOOLS_HTML_tableheader) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_parabreak);
+ rToken = OOO_STRING_SVTOOLS_HTML_tableheader " "
+ OOO_STRING_SVTOOLS_HTML_parabreak;
}
else
rToken = OString(OOO_STRING_SVTOOLS_HTML_parabreak);
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 97b9248297ee..476ce691058d 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -813,7 +813,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
// The align=... attribute does behave strange in netscape
// if there are controls in a paragraph, because the control and
// all text behind the control does not recognize this attribute.
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_division);
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_division;
rWrt.Strm().WriteOString( sOut );
rHWrt.m_bTextAttr = false;
@@ -915,7 +915,7 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
if( rHWrt.m_bCfgOutStyles &&
(!pFormatInfo->aClass.isEmpty() || pFormatInfo->bScriptDependent) )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_class "=\"";
rWrt.Strm().WriteOString( sOut );
sOut = "";
OUString aClass( pFormatInfo->aClass );
@@ -957,9 +957,9 @@ void OutHTML_SwFormat( Writer& rWrt, const SwFormat& rFormat,
}
if (rHWrt.m_bParaDotLeaders) {
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"" +
- OString(sCSS2_P_CLASS_leaders) + "\"><" +
- OString(OOO_STRING_SVTOOLS_HTML_O_span);
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_class "=\""
+ sCSS2_P_CLASS_leaders "\"><"
+ OOO_STRING_SVTOOLS_HTML_O_span;
rWrt.Strm().WriteOString( sOut );
sOut = "";
}
@@ -2692,8 +2692,8 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
if( COL_AUTO == aColor.GetColor() )
aColor.SetColor( COL_BLACK );
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_font) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_O_color) + "=";
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font " "
+ OOO_STRING_SVTOOLS_HTML_O_color "=";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_Color( rWrt.Strm(), aColor, rHTMLWrt.m_eDestEnc ).WriteChar( '>' );
}
@@ -2734,8 +2734,8 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
OUString aNames;
SwHTMLWriter::PrepareFontList( static_cast<const SvxFontItem&>(rHt), aNames, 0,
rHTMLWrt.IsHTMLMode(HTMLMODE_FONT_GENERIC) );
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_font) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_O_face) + "=\"";
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font " "
+ OOO_STRING_SVTOOLS_HTML_O_face "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(), aNames, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters )
.WriteCharPtr( "\">" );
@@ -2754,11 +2754,11 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.m_bTagOn )
{
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_font);
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_font;
sal_uInt32 nHeight = static_cast<const SvxFontHeightItem&>(rHt).GetHeight();
sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_size) + "=\"" +
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" +
OString::number(static_cast<sal_Int32>(nSize)) + "\"";
rWrt.Strm().WriteOString( sOut );
@@ -2789,7 +2789,7 @@ static Writer& OutHTML_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.m_bTagOn )
{
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_span);
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_span;
rWrt.Strm().WriteOString( sOut );
rHTMLWrt.OutLanguage( static_cast<const SvxLanguageItem &>(rHt).GetLanguage() );
rWrt.Strm().WriteChar( '>' );
@@ -2947,7 +2947,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
return rWrt;
}
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_anchor);
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_anchor;
bool bScriptDependent = false;
{
@@ -2974,7 +2974,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
if( bScriptDependent )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_class "=\"";
const sal_Char* pStr = nullptr;
switch( rHTMLWrt.m_nCSS1Script )
{
@@ -3007,7 +3007,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
}
aURL = comphelper::string::strip(aURL, ' ');
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_href) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_href "=\"";
rWrt.Strm().WriteOString( sOut );
rHTMLWrt.OutHyperlinkHRefValue( aURL );
sOut = "\"";
@@ -3015,7 +3015,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
if( !rINetFormat.GetName().isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_name "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(), rINetFormat.GetName(),
rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
@@ -3025,7 +3025,7 @@ Writer& OutHTML_INetFormat( Writer& rWrt, const SwFormatINetFormat& rINetFormat,
const OUString& rTarget = rINetFormat.GetTargetFrame();
if( !rTarget.isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_target) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_target "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(), rTarget, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
sOut = "\"";
@@ -3131,7 +3131,7 @@ static Writer& OutHTML_SwTextCharFormat( Writer& rWrt, const SfxPoolItem& rHt )
if( rHTMLWrt.m_bCfgOutStyles &&
(!pFormatInfo->aClass.isEmpty() || pFormatInfo->bScriptDependent) )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_class "=\"";
rWrt.Strm().WriteOString( sOut );
OUString aClass( pFormatInfo->aClass );
if( pFormatInfo->bScriptDependent )
@@ -3188,7 +3188,7 @@ static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt )
}
if( pStr )
{
- OString sOut = " " + OString(OOO_STRING_SVTOOLS_HTML_O_align) + "=\"" +
+ OString sOut = " " OOO_STRING_SVTOOLS_HTML_O_align "=\"" +
OString(pStr) + "\"";
rWrt.Strm().WriteOString( sOut );
}
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index b56cc4b7db5b..539d77a0522b 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -182,7 +182,7 @@ static void lcl_html_outEvents( SvStream& rStrm,
if( EXTENDED_STYPE == eScriptType &&
!pDescs[i].AddListenerParam.isEmpty() )
{
- sOut = " " + OString(OOO_STRING_SVTOOLS_HTML_O_sdaddparam) +
+ sOut = " " OOO_STRING_SVTOOLS_HTML_O_sdaddparam +
OUStringToOString(sListener, RTL_TEXTENCODING_ASCII_US) + "-" +
OUStringToOString(sMethod, RTL_TEXTENCODING_ASCII_US) + "=\"";
rStrm.WriteOString( sOut );
@@ -458,7 +458,7 @@ void SwHTMLWriter::OutForm( bool bOn,
// die neue Form wird geoeffnet
if( m_bLFPossible )
OutNewLine();
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_form);
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_form;
uno::Reference< beans::XPropertySet > xFormPropSet( rFormComps, uno::UNO_QUERY );
@@ -466,7 +466,7 @@ void SwHTMLWriter::OutForm( bool bOn,
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_name "=\"";
Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( Strm(), *static_cast<OUString const *>(aTmp.getValue()),
m_eDestEnc, &m_aNonConvertableCharacters );
@@ -477,7 +477,7 @@ void SwHTMLWriter::OutForm( bool bOn,
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_action) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_action "=\"";
Strm().WriteOString( sOut );
OUString aURL( *static_cast<OUString const *>(aTmp.getValue()) );
aURL = URIHelper::simpleNormalizedMakeRelative( GetBaseURL(), aURL);
@@ -492,8 +492,8 @@ void SwHTMLWriter::OutForm( bool bOn,
*static_cast<form::FormSubmitMethod const *>(aTmp.getValue());
if( form::FormSubmitMethod_POST==eMethod )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_method) + "=\"" +
- OString(OOO_STRING_SVTOOLS_HTML_METHOD_post) + "\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_method "=\""
+ OOO_STRING_SVTOOLS_HTML_METHOD_post "\"";
}
}
aTmp = xFormPropSet->getPropertyValue( "SubmitEncoding" );
@@ -516,7 +516,7 @@ void SwHTMLWriter::OutForm( bool bOn,
if( pStr )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_enctype) + "=\"" +
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_enctype "=\"" +
OString(pStr) + "\"";
}
}
@@ -525,7 +525,7 @@ void SwHTMLWriter::OutForm( bool bOn,
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get()&&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_target) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_target "=\"";
Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( Strm(), *static_cast<OUString const *>(aTmp.getValue()),
m_eDestEnc, &m_aNonConvertableCharacters );
@@ -591,15 +591,15 @@ void SwHTMLWriter::OutHiddenControls(
{
if( m_bLFPossible )
OutNewLine( true );
- OString sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_input) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_O_type) + "=\"" +
- OString(OOO_STRING_SVTOOLS_HTML_IT_hidden) + "\"";
+ OString sOut = "<" OOO_STRING_SVTOOLS_HTML_input " "
+ OOO_STRING_SVTOOLS_HTML_O_type "=\""
+ OOO_STRING_SVTOOLS_HTML_IT_hidden "\"";
aTmp = xPropSet->getPropertyValue( "Name" );
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_name "=\"";
Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( Strm(), *static_cast<OUString const *>(aTmp.getValue()),
m_eDestEnc, &m_aNonConvertableCharacters );
@@ -609,7 +609,7 @@ void SwHTMLWriter::OutHiddenControls(
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_value) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_value "=\"";
Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( Strm(), *static_cast<OUString const *>(aTmp.getValue()),
m_eDestEnc, &m_aNonConvertableCharacters );
@@ -736,7 +736,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aTmp.getValueType() == ::cppu::UnoType<sal_Int16>::get() &&
TRISTATE_FALSE != *static_cast<sal_Int16 const *>(aTmp.getValue()) )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_checked);
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_checked;
sOptions += "=\"";
sOptions += OString(OOO_STRING_SVTOOLS_HTML_O_checked);
sOptions += "\"";
@@ -798,7 +798,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
// wieviele sind sichtbar ??
if( aSz.Height() )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_size) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" +
OString::number(static_cast<sal_Int32>(aSz.Height())) + "\"";
}
@@ -806,7 +806,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aTmp.getValueType() == cppu::UnoType<bool>::get() &&
*static_cast<sal_Bool const *>(aTmp.getValue()) )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_multiple);
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_multiple;
}
}
break;
@@ -833,12 +833,12 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aSz.Height() )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_rows) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_rows "=\"" +
OString::number(static_cast<sal_Int32>(aSz.Height())) + "\"";
}
if( aSz.Width() )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_cols) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_cols "=\"" +
OString::number(static_cast<sal_Int32>(aSz.Width())) + "\"";
}
@@ -853,7 +853,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
(aTmp.getValueType() == cppu::UnoType<bool>::get() &&
*static_cast<sal_Bool const *>(aTmp.getValue())) ? OOO_STRING_SVTOOLS_HTML_WW_hard
: OOO_STRING_SVTOOLS_HTML_WW_soft;
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_wrap) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_wrap "=\"" +
OString(pWrapStr) + "\"";
}
}
@@ -871,7 +871,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aSz.Width() )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_size) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" +
OString::number(static_cast<sal_Int32>(aSz.Width())) + "\"";
}
@@ -879,7 +879,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aTmp.getValueType() == ::cppu::UnoType<sal_Int16>::get() &&
*static_cast<sal_Int16 const *>(aTmp.getValue()) != 0 )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_maxlength) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_maxlength "=\"" +
OString::number(static_cast<sal_Int32>(*static_cast<sal_Int16 const *>(aTmp.getValue()))) + "\"";
}
@@ -904,7 +904,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aSz.Width() )
{
- sOptions += " " + OString(OOO_STRING_SVTOOLS_HTML_O_size) + "=\"" +
+ sOptions += " " OOO_STRING_SVTOOLS_HTML_O_size "=\"" +
OString::number(static_cast<sal_Int32>(aSz.Width())) + "\"";
}
@@ -928,7 +928,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
OString sOut = "<" + OString(TagNames[eTag]);
if( eType != TYPE_NONE )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_type) + "=\"" +
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_type "=\"" +
OString(TypeNames[eType]) + "\"";
}
@@ -936,7 +936,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_name "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(), *static_cast<OUString const *>(aTmp.getValue()),
rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
@@ -947,12 +947,12 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aTmp.getValueType() == cppu::UnoType<bool>::get() &&
!*static_cast<sal_Bool const *>(aTmp.getValue()) )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_disabled);
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_disabled;
}
if( !sValue.isEmpty() || bEmptyValue )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_value) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_value "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(), sValue, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
sOut = "\"";
@@ -966,7 +966,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aTmp.getValueType() == ::cppu::UnoType<OUString>::get() &&
!static_cast<const OUString*>(aTmp.getValue())->isEmpty() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_src) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_src "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(),
@@ -991,13 +991,13 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( aPixelSz.Width() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_width) + "=\"" +
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_width "=\"" +
OString::number(static_cast<sal_Int32>(aPixelSz.Width())) + "\"";
}
if( aPixelSz.Height() )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_height) + "=\"" +
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_height "=\"" +
OString::number(static_cast<sal_Int32>(aPixelSz.Height())) + "\"";
}
}
@@ -1011,7 +1011,7 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
if( nTabIndex >= 32767 )
nTabIndex = 32767;
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_tabindex) + "=\"" +
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_tabindex "=\"" +
OString::number(static_cast<sal_Int32>(nTabIndex)) + "\"";
}
}
@@ -1200,17 +1200,17 @@ Writer& OutHTML_DrawFrameFormatAsControl( Writer& rWrt,
nSel++;
rHTMLWrt.OutNewLine(); // jede Option bekommt eine eigene Zeile
- sOut = "<" + OString(OOO_STRING_SVTOOLS_HTML_option);
+ sOut = "<" OOO_STRING_SVTOOLS_HTML_option;
if( !sVal.isEmpty() || bEmptyVal )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_value) + "=\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_value "=\"";
rWrt.Strm().WriteOString( sOut );
HTMLOutFuncs::Out_String( rWrt.Strm(), sVal,
rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
sOut = "\"";
}
if( bSelected )
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_selected);
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_selected;
sOut += ">";
rWrt.Strm().WriteOString( sOut );
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 4354358c2614..5fcdbf116d0b 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -292,20 +292,20 @@ Writer& OutHTML_SwFormatFootnote( Writer& rWrt, const SfxPoolItem& rHt )
rHTMLWrt.m_pFootEndNotes->insert( rHTMLWrt.m_pFootEndNotes->begin() + nPos, pTextFootnote );
OStringBuffer sOut;
- sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_anchor) + " " +
- OString(OOO_STRING_SVTOOLS_HTML_O_class) + "=\"");
+ sOut.append("<" OOO_STRING_SVTOOLS_HTML_anchor " "
+ OOO_STRING_SVTOOLS_HTML_O_class "=\"");
rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
HTMLOutFuncs::Out_String( rWrt.Strm(), sClass, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
- sOut.append("\" " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"");
+ sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_name "=\"");
rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
- sOut.append(OString(OOO_STRING_SVTOOLS_HTML_FTN_anchor) + "\" " +
- OString(OOO_STRING_SVTOOLS_HTML_O_href) + "=\"#");
+ sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_anchor "\" "
+ OOO_STRING_SVTOOLS_HTML_O_href "=\"#");
rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
HTMLOutFuncs::Out_String( rWrt.Strm(), sFootnoteName, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
- sOut.append(OString(OOO_STRING_SVTOOLS_HTML_FTN_symbol) + "\"");
+ sOut.append(OOO_STRING_SVTOOLS_HTML_FTN_symbol "\"");
if( !rFormatFootnote.GetNumStr().isEmpty() )
- sOut.append(" " + OString(OOO_STRING_SVTOOLS_HTML_O_sdfixed));
+ sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_sdfixed);
sOut.append(">");
rWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript );
diff --git a/sw/source/filter/html/htmlnumwriter.cxx b/sw/source/filter/html/htmlnumwriter.cxx
index a2f39ba1bb82..7b5c3f03ea6e 100644
--- a/sw/source/filter/html/htmlnumwriter.cxx
+++ b/sw/source/filter/html/htmlnumwriter.cxx
@@ -205,7 +205,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
if( pStr )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_type) + "=\"" + OString(pStr) + "\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_type "=\"" + OString(pStr) + "\"";
}
}
else if( SVX_NUM_BITMAP == eType )
@@ -243,7 +243,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
}
if( cType )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_type) + "=\"" + OString(cType) + "\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_type "=\"" + OString(cType) + "\"";
}
sal_uInt16 nStartVal = rNumFormat.GetStart();
@@ -262,7 +262,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
}
if( nStartVal != 1 )
{
- sOut += " " + OString(OOO_STRING_SVTOOLS_HTML_O_start) + "=\"" + OString::number(static_cast<sal_Int32>(nStartVal)) + "\"";
+ sOut += " " OOO_STRING_SVTOOLS_HTML_O_start "=\"" + OString::number(static_cast<sal_Int32>(nStartVal)) + "\"";
}
}
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index e741ee631b5a..f4c06463b3e6 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -579,7 +579,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
const OUString& rName = rSection.GetSectionName();
if( !rName.isEmpty() && !bContinued )
{
- sOut.append(" " + OString(OOO_STRING_SVTOOLS_HTML_O_id) + "=\"");
+ sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_id "=\"");
rHTMLWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
HTMLOutFuncs::Out_String( rHTMLWrt.Strm(), rName, rHTMLWrt.m_eDestEnc, &rHTMLWrt.m_aNonConvertableCharacters );
sOut.append('\"');
@@ -591,7 +591,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
if( FILE_LINK_SECTION == rSection.GetType() )
{
- sOut.append(" " + OString(OOO_STRING_SVTOOLS_HTML_O_href) + "=\"");
+ sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_href "=\"");
rHTMLWrt.Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
const OUString& aFName = rSection.GetLinkFileName();
@@ -643,7 +643,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt,
nGutter = (sal_uInt16)Application::GetDefaultDevice()
->LogicToPixel( Size(nGutter, 0), MapMode(MAP_TWIP) ).Width();
}
- sOut.append(" " + OString(OOO_STRING_SVTOOLS_HTML_O_gutter) + "=\"" + OString::number(nGutter) + "\"");
+ sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_gutter "=\"" + OString::number(nGutter) + "\"");
}
}
@@ -945,7 +945,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
OStringBuffer sOut;
if (!mbSkipHeaderFooter)
{
- sOut.append(OString(OOO_STRING_SVTOOLS_HTML_doctype) + " " + OString(OOO_STRING_SVTOOLS_HTML_doctype40));
+ sOut.append(OOO_STRING_SVTOOLS_HTML_doctype " " OOO_STRING_SVTOOLS_HTML_doctype40);
HTMLOutFuncs::Out_AsciiTag( Strm(), sOut.makeStringAndClear().getStr() );
// baue den Vorspann
@@ -1026,7 +1026,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
// der Body wird nicht eingerueckt, weil sonst alles eingerueckt waere!
OutNewLine();
- sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_body));
+ sOut.append("<" OOO_STRING_SVTOOLS_HTML_body);
Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
// language
@@ -1072,7 +1072,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
void SwHTMLWriter::OutAnchor( const OUString& rName )
{
OStringBuffer sOut;
- sOut.append("<" + OString(OOO_STRING_SVTOOLS_HTML_anchor) + " " + OString(OOO_STRING_SVTOOLS_HTML_O_name) + "=\"");
+ sOut.append("<" OOO_STRING_SVTOOLS_HTML_anchor " " OOO_STRING_SVTOOLS_HTML_O_name "=\"");
Strm().WriteCharPtr( sOut.makeStringAndClear().getStr() );
HTMLOutFuncs::Out_String( Strm(), rName, m_eDestEnc, &m_aNonConvertableCharacters ).WriteCharPtr( "\">" );
HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, false );