diff --git a/sw/qa/extras/tiledrendering/tiledrendering.cxx b/sw/qa/extras/tiledrendering/tiledrendering.cxx index 230c3588026b..346023898c23 100644 --- a/sw/qa/extras/tiledrendering/tiledrendering.cxx +++ b/sw/qa/extras/tiledrendering/tiledrendering.cxx @@ -3085,8 +3085,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDropDownFormFieldButton) OStringBuffer aItemList; for (auto &item : aItems) { - aItemList.append(item.second.get_value().c_str()); - aItemList.append(";"); + aItemList.append(item.second.get_value().c_str() + + OString::Concat(";")); } CPPUNIT_ASSERT_EQUAL(OString("2019/2020;2020/2021;2021/2022;2022/2023;2023/2024;2024/2025;"), aItemList.toString()); diff --git a/sw/source/core/crsr/crsrsh.cxx b/sw/source/core/crsr/crsrsh.cxx index 9d94c133f028..b8dd11dc533f 100644 --- a/sw/source/core/crsr/crsrsh.cxx +++ b/sw/source/core/crsr/crsrsh.cxx @@ -1330,14 +1330,14 @@ OUString SwCursorShell::getPageRectangles() OUStringBuffer aBuf; for (const SwFrame* pFrame = pLayout->GetLower(); pFrame; pFrame = pFrame->GetNext()) { - aBuf.append(pFrame->getFrameArea().Left()); - aBuf.append(", "); - aBuf.append(pFrame->getFrameArea().Top()); - aBuf.append(", "); - aBuf.append(pFrame->getFrameArea().Width()); - aBuf.append(", "); - aBuf.append(pFrame->getFrameArea().Height()); - aBuf.append("; "); + aBuf.append(OUString::number(pFrame->getFrameArea().Left()) + + ", " + + OUString::number(pFrame->getFrameArea().Top()) + + ", " + + OUString::number(pFrame->getFrameArea().Width()) + + ", " + + OUString::number(pFrame->getFrameArea().Height()) + + "; "); } if (!aBuf.isEmpty()) aBuf.setLength( aBuf.getLength() - 2); // remove the last "; " diff --git a/sw/source/core/doc/dbgoutsw.cxx b/sw/source/core/doc/dbgoutsw.cxx index 20f8e6ecae9f..8b1f18348796 100644 --- a/sw/source/core/doc/dbgoutsw.cxx +++ b/sw/source/core/doc/dbgoutsw.cxx @@ -298,9 +298,7 @@ static OUString lcl_dbg_out(const SwpHints & rHints) for (size_t i = 0; i < rHints.Count(); ++i) { - aStr.append(" "); - aStr.append(lcl_dbg_out(*rHints.Get(i))); - aStr.append("\n"); + aStr.append(" " + lcl_dbg_out(*rHints.Get(i)) + "\n"); } aStr.append("]\n"); @@ -647,8 +645,7 @@ static OUString lcl_dbg_out(SwOutlineNodes const & rNodes) for (size_t i = 0; i < rNodes.size(); i++) { - aStr.append(lcl_dbg_out(*rNodes[i])); - aStr.append("\n"); + aStr.append(lcl_dbg_out(*rNodes[i]) + "\n"); } aStr.append("]\n"); @@ -669,10 +666,7 @@ static OUString lcl_dbg_out(const SvxNumberFormat & rFormat) static OUString lcl_dbg_out(const SwNumRule & rRule) { - OUStringBuffer aResult("[ "); - - aResult.append(rRule.GetName()); - aResult.append(" ["); + OUStringBuffer aResult("[ " + rRule.GetName() + " ["); for (sal_uInt8 n = 0; n < MAXLEVEL; n++) { @@ -682,9 +676,7 @@ static OUString lcl_dbg_out(const SwNumRule & rRule) aResult.append(lcl_dbg_out(rRule.Get(n))); } - aResult.append("]"); - - aResult.append("]"); + aResult.append("]]"); return aResult.makeStringAndClear(); } @@ -792,9 +784,7 @@ static OUString lcl_dbg_out(const SwFormTokens & rTokens) if (aIt != rTokens.begin()) aStr.append(", "); - aStr.append(lcl_TokenType2Str(aIt->eTokenType)); - aStr.append(": "); - aStr.append(lcl_dbg_out(*aIt)); + aStr.append(lcl_TokenType2Str(aIt->eTokenType) + ": " + lcl_dbg_out(*aIt)); } aStr.append("]"); diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx index c0ed059e2882..d8a66d6ec7a7 100644 --- a/sw/source/core/fields/reffld.cxx +++ b/sw/source/core/fields/reffld.cxx @@ -404,8 +404,7 @@ static OUString lcl_formatStringByCombiningCharacter(std::u16string_view sText, OUStringBuffer sRet(sText.size() * 2); for (size_t i = 0; i < sText.size(); ++i) { - sRet.append(sText[i]); - sRet.append(cChar); + sRet.append(OUStringChar(sText[i]) + OUStringChar(cChar)); } return sRet.makeStringAndClear(); } diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx index 37d4c5271557..256038d24c6d 100644 --- a/sw/source/core/layout/dbg_lay.cxx +++ b/sw/source/core/layout/dbg_lay.cxx @@ -675,8 +675,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n lcl_Start(aOut, m_aLayer, nAct); if( pParam ) { - aOut.append(' '); - aOut.append(static_cast(*static_cast(pParam))); + aOut.append(" " + OString::number(static_cast(*static_cast(pParam)))); } break; case PROT::GrowTest: @@ -703,8 +702,7 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n lcl_Start(aOut, m_aLayer, nAct); if( pParam ) { - aOut.append(' '); - aOut.append(static_cast(*static_cast(pParam))); + aOut.append(" " + OString::number(static_cast(*static_cast(pParam)))); } break; case PROT::PrintArea: aOut.append("PROT::PrintArea"); @@ -751,31 +749,31 @@ void SwImplProtocol::Record_( const SwFrame* pFrame, PROT nFunction, DbgAction n SwRect& rFrame = *static_cast(pParam); if( pFrame->getFrameArea().Pos() != rFrame.Pos() ) { - aOut.append("PosChg: ("); - aOut.append(static_cast(rFrame.Left())); - aOut.append(", "); - aOut.append(static_cast(rFrame.Top())); - aOut.append(") -> ("); - aOut.append(static_cast(pFrame->getFrameArea().Left())); - aOut.append(", "); - aOut.append(static_cast(pFrame->getFrameArea().Top())); - aOut.append(") "); + aOut.append("PosChg: (" + + OString::number(static_cast(rFrame.Left())) + + ", " + + OString::number(static_cast(rFrame.Top())) + + ") -> (" + + OString::number(static_cast(pFrame->getFrameArea().Left())) + + ", " + + OString::number(static_cast(pFrame->getFrameArea().Top())) + + ") "); } if( pFrame->getFrameArea().Height() != rFrame.Height() ) { - aOut.append("Height: "); - aOut.append(static_cast(rFrame.Height())); - aOut.append(" -> "); - aOut.append(static_cast(pFrame->getFrameArea().Height())); - aOut.append(" "); + aOut.append("Height: " + + OString::number(static_cast(rFrame.Height())) + + " -> " + + OString::number(static_cast(pFrame->getFrameArea().Height())) + + " "); } if( pFrame->getFrameArea().Width() != rFrame.Width() ) { - aOut.append("Width: "); - aOut.append(static_cast(rFrame.Width())); - aOut.append(" -> "); - aOut.append(static_cast(pFrame->getFrameArea().Width())); - aOut.append(' '); + aOut.append("Width: " + + OString::number(static_cast(rFrame.Width())) + + " -> " + + OString::number(static_cast(pFrame->getFrameArea().Width())) + + " "); } break; } diff --git a/sw/source/core/tox/ToxTextGenerator.cxx b/sw/source/core/tox/ToxTextGenerator.cxx index 1ef2a59d55bf..158cc0c72bc7 100644 --- a/sw/source/core/tox/ToxTextGenerator.cxx +++ b/sw/source/core/tox/ToxTextGenerator.cxx @@ -451,8 +451,7 @@ ToxTextGenerator::ConstructPageNumberPlaceholder(size_t numberOfToxSources) // Place holder for the PageNumber; we only respect the first one retval.append(C_NUM_REPL); for (size_t i = 1; i < numberOfToxSources; ++i) { - retval.append(SwTOXMark::S_PAGE_DELI); - retval.append(C_NUM_REPL); + retval.append(SwTOXMark::S_PAGE_DELI + OUStringChar(C_NUM_REPL)); } retval.append(C_END_PAGE_NUM); return retval.makeStringAndClear(); diff --git a/sw/source/core/txtnode/atrftn.cxx b/sw/source/core/txtnode/atrftn.cxx index 1624e6d29f96..59eb9b12f8f5 100644 --- a/sw/source/core/txtnode/atrftn.cxx +++ b/sw/source/core/txtnode/atrftn.cxx @@ -205,8 +205,7 @@ OUString SwFormatFootnote::GetFootnoteText(SwRootFrame const& rLayout) const while ( !aIdx.GetNode().IsEndNode() ) { if ( aIdx.GetNode().IsTextNode() ) { - buf.append(" "); - buf.append(aIdx.GetNode().GetTextNode()->GetExpandText(&rLayout)); + buf.append(" " + aIdx.GetNode().GetTextNode()->GetExpandText(&rLayout)); } ++aIdx; } diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx index fb34dc56ff01..45c04b973150 100644 --- a/sw/source/filter/html/htmlfldw.cxx +++ b/sw/source/filter/html/htmlfldw.cxx @@ -270,8 +270,10 @@ static SwHTMLWriter& OutHTML_SwField( SwHTMLWriter& rWrt, const SwField* pField, { OStringBuffer sOut("<" + rWrt.GetNamespace() - + OOO_STRING_SVTOOLS_HTML_sdfield " " - OOO_STRING_SVTOOLS_HTML_O_type "=" + + OOO_STRING_SVTOOLS_HTML_sdfield + " " + OOO_STRING_SVTOOLS_HTML_O_type + "=" + pTypeStr); if( pSubStr ) { @@ -554,17 +556,15 @@ SwHTMLWriter& OutHTML_SwFormatField( SwHTMLWriter& rWrt, const SfxPoolItem& rHt if (bFieldShadings) { - OStringBuffer sOut; - sOut.append("<" + rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_span); - sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_style "=\""); - sOut.append(sCSS1_P_background); - sOut.append(": "); - const Color& rColor = pViewOptions->GetFieldShadingsColor(); - sOut.append(GetCSS1_Color(rColor)); - sOut.append("\">"); + OString sOut( + "<" + rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_span + " " OOO_STRING_SVTOOLS_HTML_O_style "=\"" + + sCSS1_P_background + + ": " + + GetCSS1_Color(rColor) + + "\">"); rWrt.Strm().WriteOString(sOut); - sOut.setLength(0); } OutHTML_SwField( rWrt, pField, pTextField->GetTextNode(), diff --git a/sw/source/filter/html/htmlflywriter.cxx b/sw/source/filter/html/htmlflywriter.cxx index b35d25dc7ab6..85caaff8d896 100644 --- a/sw/source/filter/html/htmlflywriter.cxx +++ b/sw/source/filter/html/htmlflywriter.cxx @@ -1391,27 +1391,26 @@ SwHTMLWriter& OutHTML_ImageStart( HtmlWriter& rHtml, SwHTMLWriter& rWrt, const S aTag = OOO_STRING_SVTOOLS_HTML_object; rHtml.start(aTag); - OStringBuffer sBuffer; if(rWrt.mbEmbedImages) { OUString aGraphicInBase64; if (XOutBitmap::GraphicToBase64(rGraphic, aGraphicInBase64)) { - sBuffer.append(OOO_STRING_SVTOOLS_HTML_O_data); - sBuffer.append(":"); - sBuffer.append(OUStringToOString(aGraphicInBase64, RTL_TEXTENCODING_UTF8)); - rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_src, sBuffer.makeStringAndClear().getStr()); + OString sBuffer(OString::Concat(OOO_STRING_SVTOOLS_HTML_O_data) + + ":" + + OUStringToOString(aGraphicInBase64, RTL_TEXTENCODING_UTF8)); + rHtml.attribute(OOO_STRING_SVTOOLS_HTML_O_src, sBuffer.getStr()); } else rWrt.m_nWarn = WARN_SWG_POOR_LOAD; } else { - sBuffer.append(OUStringToOString(aGraphicURL, RTL_TEXTENCODING_UTF8)); + OString sBuffer(OUStringToOString(aGraphicURL, RTL_TEXTENCODING_UTF8)); OString aAttribute(OOO_STRING_SVTOOLS_HTML_O_src); if (bReplacement) aAttribute = OOO_STRING_SVTOOLS_HTML_O_data; - rHtml.attribute(aAttribute, sBuffer.makeStringAndClear().getStr()); + rHtml.attribute(aAttribute, sBuffer.getStr()); } if (bReplacement) @@ -1523,8 +1522,7 @@ SwHTMLWriter& OutHTML_BulletImage( SwHTMLWriter& rWrt, if( pTag ) sOut.append(OString::Concat("<") + pTag); - sOut.append(' '); - sOut.append(OOO_STRING_SVTOOLS_HTML_O_style "=\""); + sOut.append(" " OOO_STRING_SVTOOLS_HTML_O_style "=\""); if(!aLink.isEmpty()) { sOut.append(OOO_STRING_SVTOOLS_HTML_O_src "=\""); diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx index f57be78ea048..0f8b15ed4185 100644 --- a/sw/source/filter/html/htmlftn.cxx +++ b/sw/source/filter/html/htmlftn.cxx @@ -464,9 +464,9 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFormatFootnote& rFormatFootnote, } } - OStringBuffer sOut; - sOut.append("<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor " " - OOO_STRING_SVTOOLS_HTML_O_class "=\""); + OStringBuffer sOut("<" + + GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor " " + OOO_STRING_SVTOOLS_HTML_O_class "=\""); Strm().WriteOString( sOut ); sOut.setLength(0); HTMLOutFuncs::Out_String( Strm(), sClass ); diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx index c9b1c01c6ef6..83c047ef2603 100644 --- a/sw/source/filter/html/htmlplug.cxx +++ b/sw/source/filter/html/htmlplug.cxx @@ -1255,8 +1255,7 @@ SwHTMLWriter& OutHTML_FrameFormatOLENode( SwHTMLWriter& rWrt, const SwFrameForma "ole" ); uno::Any aAny; SvGlobalName aGlobName( xObj->getClassID() ); - OStringBuffer sOut; - sOut.append('<'); + OStringBuffer sOut("<"); if( aGlobName == SvGlobalName( SO3_PLUGIN_CLASSID ) ) { // first the plug-in specifics @@ -1427,15 +1426,16 @@ SwHTMLWriter& OutHTML_FrameFormatOLENode( SwHTMLWriter& rWrt, const SwFrameForma const OUString& rName = rCommand.GetCommand(); const OUString& rValue = rCommand.GetArgument(); rWrt.OutNewLine(); - OStringBuffer sBuf; - sBuf.append("<" + rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_param - " " OOO_STRING_SVTOOLS_HTML_O_name - "=\""); - rWrt.Strm().WriteOString( sBuf ); + sOut.append( + "<" + rWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_param + " " OOO_STRING_SVTOOLS_HTML_O_name + "=\""); + rWrt.Strm().WriteOString( sOut ); sOut.setLength(0); HTMLOutFuncs::Out_String( rWrt.Strm(), rName ); - sBuf.append("\" " OOO_STRING_SVTOOLS_HTML_O_value "=\""); - rWrt.Strm().WriteOString( sBuf ); + sOut.append("\" " OOO_STRING_SVTOOLS_HTML_O_value "=\""); + rWrt.Strm().WriteOString( sOut ); + sOut.setLength(0); HTMLOutFuncs::Out_String( rWrt.Strm(), rValue ).WriteCharPtr( "\">" ); } diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx index 17a7874a7d28..1bd94a828188 100644 --- a/sw/source/filter/html/htmltabw.cxx +++ b/sw/source/filter/html/htmltabw.cxx @@ -310,8 +310,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt, } rWrt.OutNewLine(); // / in new line - OStringBuffer sOut; - sOut.append('<'); + OStringBuffer sOut("<"); OString aTag(bHead ? OOO_STRING_SVTOOLS_HTML_tableheader : OOO_STRING_SVTOOLS_HTML_tabledata); sOut.append(rWrt.GetNamespace() + aTag); diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx index 641bc3d87d1e..67502f1a278b 100644 --- a/sw/source/filter/html/swhtml.cxx +++ b/sw/source/filter/html/swhtml.cxx @@ -5460,21 +5460,21 @@ void SwHTMLParser::ParseMoreMetaOptions() return; } - OUStringBuffer sText; - sText.append("HTML: <"); - sText.append(OOO_STRING_SVTOOLS_HTML_meta); - sText.append(' '); + OUStringBuffer sText( + "HTML: <" + OOO_STRING_SVTOOLS_HTML_meta + " "); if( bHTTPEquiv ) sText.append(OOO_STRING_SVTOOLS_HTML_O_httpequiv); else sText.append(OOO_STRING_SVTOOLS_HTML_O_name); - sText.append("=\""); - sText.append(aName); - sText.append("\" "); - sText.append(OOO_STRING_SVTOOLS_HTML_O_content); - sText.append("=\""); - sText.append(aContent); - sText.append("\">"); + sText.append( + "=\"" + aName + + "\" " + OOO_STRING_SVTOOLS_HTML_O_content + "=\"" + + aContent + + "\">"); SwPostItField aPostItField( static_cast(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Postit )), diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx index aeb8080903d7..8ba792eb5a2f 100644 --- a/sw/source/filter/html/wrthtml.cxx +++ b/sw/source/filter/html/wrthtml.cxx @@ -715,8 +715,7 @@ static void lcl_html_OutSectionStartTag( SwHTMLWriter& rHTMLWrt, if( rHTMLWrt.m_bLFPossible ) rHTMLWrt.OutNewLine(); - OStringBuffer sOut; - sOut.append("<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_division); + OStringBuffer sOut("<" + rHTMLWrt.GetNamespace() + OOO_STRING_SVTOOLS_HTML_division); const OUString& rName = rSection.GetSectionName(); if( !rName.isEmpty() && !bContinued ) @@ -1217,8 +1216,7 @@ void SwHTMLWriter::OutAnchor( const OUString& rName ) return; } - OStringBuffer sOut; - sOut.append("<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor " "); + OStringBuffer sOut("<" + GetNamespace() + OOO_STRING_SVTOOLS_HTML_anchor " "); if (!mbXHTML) { sOut.append(OOO_STRING_SVTOOLS_HTML_O_name "=\""); @@ -1448,8 +1446,7 @@ void SwHTMLWriter::OutLanguage( LanguageType nLang ) if (!(LANGUAGE_DONTKNOW != nLang && !mbReqIF)) return; - OStringBuffer sOut; - sOut.append(' '); + OStringBuffer sOut(" "); if (mbXHTML) sOut.append(OOO_STRING_SVTOOLS_XHTML_O_lang); else diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 6577bf1dbdc3..60f93917117e 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -7413,9 +7413,9 @@ void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel, // FIXME so far we support the ww8 limit of levels only if ( *pIt < sal_Unicode( WW8ListManager::nMaxLevel ) ) { - aBuffer.append( pPrev, pIt - pPrev ); - aBuffer.append( '%' ); - aBuffer.append( sal_Int32( *pIt ) + 1 ); + aBuffer.append( OUString::Concat(std::u16string_view(pPrev, pIt - pPrev)) + + "%" + + OUString::number(sal_Int32( *pIt ) + 1 )); pPrev = pIt + 1; } diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index d4f417b0c9f6..74656bdb110f 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -180,17 +180,16 @@ static OString OutTBLBorderLine(RtfExport const& rExport, const editeng::SvxBord else { // use \brdrth to double the value range... - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW); - aRet.append(static_cast(fConverted) / 2); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW + + OString::number(static_cast(fConverted) / 2)); } - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF); - aRet.append(static_cast(rExport.GetColor(pLine->GetColor()))); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF + + OString::number(static_cast(rExport.GetColor(pLine->GetColor())))); } else // tdf#129758 "no border" may be needed to override style { - aRet.append(pStr); - aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRNONE); + aRet.append(OString::Concat(pStr) + OOO_STRING_SVTOOLS_RTF_BRDRNONE); } return aRet.makeStringAndClear(); } @@ -203,8 +202,7 @@ static OString OutBorderLine(RtfExport const& rExport, const editeng::SvxBorderL aRet.append(OutTBLBorderLine(rExport, pLine, pStr)); if (pLine) { - aRet.append(OOO_STRING_SVTOOLS_RTF_BRSP); - aRet.append(static_cast(nDist)); + aRet.append(OOO_STRING_SVTOOLS_RTF_BRSP + OString::number(static_cast(nDist))); } if (eShadowLocation == SvxShadowLocation::BottomRight) aRet.append(LO_STRING_SVTOOLS_RTF_BRDRSH); @@ -381,9 +379,7 @@ void RtfAttributeOutput::StartParagraphProperties() OStringBuffer aPar; if (!m_rExport.GetRTFFlySyntax()) { - aPar.append(OOO_STRING_SVTOOLS_RTF_PARD); - aPar.append(OOO_STRING_SVTOOLS_RTF_PLAIN); - aPar.append(' '); + aPar.append(OOO_STRING_SVTOOLS_RTF_PARD OOO_STRING_SVTOOLS_RTF_PLAIN " "); } if (!m_bBufferSectionHeaders) m_rExport.Strm().WriteOString(aPar); @@ -654,9 +650,8 @@ void RtfAttributeOutput::FormatDrop(const SwTextNode& /*rNode*/, void RtfAttributeOutput::ParagraphStyle(sal_uInt16 nStyle) { OString* pStyle = m_rExport.GetStyle(nStyle); - OStringBuffer aStyle; - aStyle.append(OOO_STRING_SVTOOLS_RTF_S); - aStyle.append(static_cast(nStyle)); + OStringBuffer aStyle(OOO_STRING_SVTOOLS_RTF_S + + OString::number(static_cast(nStyle))); if (pStyle) aStyle.append(*pStyle); if (!m_bBufferSectionHeaders) @@ -2248,9 +2243,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl(const ww8::Frame& rFrame, const Poi aBuf.append(char(0x00)); xPropSet->getPropertyValue("Name") >>= aTmp; aStr = OUStringToOString(aTmp, m_rExport.GetCurrentEncoding()); - aBuf.append(static_cast(aStr.getLength())); - aBuf.append(aStr); - aBuf.append(char(0x00)); + aBuf.append(OStringChar(static_cast(aStr.getLength())) + aStr + + OStringChar(char(0x00))); xPropSet->getPropertyValue("DefaultText") >>= aTmp; aStr = OUStringToOString(aTmp, m_rExport.GetCurrentEncoding()); aBuf.append(static_cast(aStr.getLength())); @@ -4112,31 +4106,27 @@ static OString ExportPICT(const SwFlyFrameFormat* pFlyFrameFormat, const Size& r //Given the original size and taking cropping into account //first, how much has the original been scaled to get the //final rendered size - aRet.append(OOO_STRING_SVTOOLS_RTF_PICSCALEX); - aRet.append(static_cast((100 * rRendered.Width()) / nXCroppedSize)); - aRet.append(OOO_STRING_SVTOOLS_RTF_PICSCALEY); - aRet.append(static_cast((100 * rRendered.Height()) / nYCroppedSize)); + aRet.append( + OOO_STRING_SVTOOLS_RTF_PICSCALEX + + OString::number(static_cast((100 * rRendered.Width()) / nXCroppedSize)) + + OOO_STRING_SVTOOLS_RTF_PICSCALEY + + OString::number(static_cast((100 * rRendered.Height()) / nYCroppedSize)) - aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPL); - aRet.append(rCr.GetLeft()); - aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPR); - aRet.append(rCr.GetRight()); - aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPT); - aRet.append(rCr.GetTop()); - aRet.append(OOO_STRING_SVTOOLS_RTF_PICCROPB); - aRet.append(rCr.GetBottom()); + + OOO_STRING_SVTOOLS_RTF_PICCROPL + OString::number(rCr.GetLeft()) + + OOO_STRING_SVTOOLS_RTF_PICCROPR + OString::number(rCr.GetRight()) + + OOO_STRING_SVTOOLS_RTF_PICCROPT + OString::number(rCr.GetTop()) + + OOO_STRING_SVTOOLS_RTF_PICCROPB + OString::number(rCr.GetBottom()) - aRet.append(OOO_STRING_SVTOOLS_RTF_PICW); - aRet.append(static_cast(rMapped.Width())); - aRet.append(OOO_STRING_SVTOOLS_RTF_PICH); - aRet.append(static_cast(rMapped.Height())); + + OOO_STRING_SVTOOLS_RTF_PICW + OString::number(static_cast(rMapped.Width())) + + OOO_STRING_SVTOOLS_RTF_PICH + + OString::number(static_cast(rMapped.Height())) - aRet.append(OOO_STRING_SVTOOLS_RTF_PICWGOAL); - aRet.append(static_cast(rOrig.Width())); - aRet.append(OOO_STRING_SVTOOLS_RTF_PICHGOAL); - aRet.append(static_cast(rOrig.Height())); + + OOO_STRING_SVTOOLS_RTF_PICWGOAL + + OString::number(static_cast(rOrig.Width())) + + OOO_STRING_SVTOOLS_RTF_PICHGOAL + + OString::number(static_cast(rOrig.Height())) - aRet.append(pBLIPType); + + pBLIPType); if (bIsWMF) { aRet.append(sal_Int32(8)); diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx index bcbe282b6a2b..a39d12228c0a 100644 --- a/sw/source/filter/xml/xmlexpit.cxx +++ b/sw/source/filter/xml/xmlexpit.cxx @@ -776,9 +776,9 @@ bool SvXMLExportItemMapper::QueryXMLValue( ::sax::Converter::convertMeasure(aOut, nWidth, util::MeasureUnit::TWIP, util::MeasureUnit::POINT); - aOut.append( ' ' ); - aOut.append( GetXMLToken( eStyle ) ); - aOut.append( ' ' ); + aOut.append( " " + + GetXMLToken( eStyle ) + + " " ); ::sax::Converter::convertColor(aOut, pLine->GetColor()); } diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx index 3161d416797c..5565de4dfcd6 100644 --- a/sw/source/filter/xml/xmltexte.cxx +++ b/sw/source/filter/xml/xmltexte.cxx @@ -330,8 +330,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded( case '\\': if( aBuffer.isEmpty() ) { - aBuffer.append( '\'' ); - aBuffer.append( sRange.subView(0, i) ); + aBuffer.append( OUString::Concat("\'") + sRange.subView(0, i) ); } if( '\'' == c || '\\' == c ) aBuffer.append( '\\' ); diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx index 0476b1894138..61f17c2f1f1b 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -1209,8 +1209,7 @@ IMPL_LINK_NOARG(SwMMResultEmailDialog, SendDocumentsHdl_Impl, weld::Button&, voi bool bDone = pInStream->ReadLine( sLine ); while ( bDone ) { - sBody.append( OStringToOUString(sLine, eEncoding) ); - sBody.append("\n"); + sBody.append( OStringToOUString(sLine, eEncoding) + "\n"); bDone = pInStream->ReadLine( sLine ); } } diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx index a1b328e6a20e..71b97a6e8ac0 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -85,8 +85,7 @@ static OUString lcl_GetValidShortCut( const OUString& rName ) while( rName[nStart-1]==' ' && nStart < nSz ) nStart++; - OUStringBuffer aBuf; - aBuf.append(rName[nStart-1]); + OUStringBuffer aBuf(OUString::number(rName[nStart-1])); for( ; nStart < nSz; ++nStart ) { diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 2f94b26b7063..5a536cc9ef58 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -1004,8 +1004,7 @@ static rtl::Reference lcl_CreateMailFromDoc( OStringBuffer sLine; while ( pInStream->ReadLine( sLine ) ) { - sBody.append(OStringToOUString( sLine, sMailEncoding )); - sBody.append("\n"); + sBody.append(OStringToOUString( sLine, sMailEncoding ) + "\n"); } } pMessage->setSubject( rMergeDescriptor.sSubject ); diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx index dddfcbb31da7..94febf8b1f72 100644 --- a/sw/source/uibase/docvw/edtwin2.cxx +++ b/sw/source/uibase/docvw/edtwin2.cxx @@ -82,17 +82,15 @@ static OUString lcl_GetRedlineHelp( const SwRangeRedline& rRedl, bool bBalloon, default: break; } - OUStringBuffer sBuf; - if (pResId) - { - sBuf.append(SwResId(pResId)); - sBuf.append(": "); - sBuf.append(rRedl.GetAuthorString()); - sBuf.append(" - "); - sBuf.append(GetAppLangDateTimeString(rRedl.GetTimeStamp())); - if( bBalloon && !rRedl.GetComment().isEmpty() ) - sBuf.append("\n" + rRedl.GetComment()); - } + if (!pResId) + return OUString(); + OUStringBuffer sBuf(SwResId(pResId) + + ": " + + rRedl.GetAuthorString() + + " - " + + GetAppLangDateTimeString(rRedl.GetTimeStamp())); + if( bBalloon && !rRedl.GetComment().isEmpty() ) + sBuf.append("\n" + rRedl.GetComment()); return sBuf.makeStringAndClear(); } diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx index 6fee616c2823..453c06741adb 100644 --- a/sw/source/uibase/uno/unotxdoc.cxx +++ b/sw/source/uibase/uno/unotxdoc.cxx @@ -996,8 +996,7 @@ static OUString lcl_CreateOutlineString(const size_t nIndex, const SwDoc* pDoc) tools::Long nVal = aNumVector[nLevel]; nVal ++; nVal -= pOutlRule->Get(nLevel).GetStart(); - sEntry.append( nVal ); - sEntry.append("."); + sEntry.append( OUString::number(nVal) + "."); } OUString sOutlineText = pDoc->getIDocumentOutlineNodes().getOutlineText( nIndex, pDoc->GetDocShell()->GetWrtShell()->GetLayout(), false);