loplugin:stringadd in sw
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: I0999a0b04236c276d49c541bbbe3932ba3e5e05d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149678 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
92c504b5bd
commit
1f93816dd5
23 changed files with 132 additions and 170 deletions
|
@ -3085,8 +3085,8 @@ CPPUNIT_TEST_FIXTURE(SwTiledRenderingTest, testDropDownFormFieldButton)
|
|||
OStringBuffer aItemList;
|
||||
for (auto &item : aItems)
|
||||
{
|
||||
aItemList.append(item.second.get_value<std::string>().c_str());
|
||||
aItemList.append(";");
|
||||
aItemList.append(item.second.get_value<std::string>().c_str()
|
||||
+ OString::Concat(";"));
|
||||
}
|
||||
CPPUNIT_ASSERT_EQUAL(OString("2019/2020;2020/2021;2021/2022;2022/2023;2023/2024;2024/2025;"), aItemList.toString());
|
||||
|
||||
|
|
|
@ -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 "; "
|
||||
|
|
|
@ -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("]");
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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<sal_Int32>(*static_cast<sal_uInt16*>(pParam)));
|
||||
aOut.append(" " + OString::number(static_cast<sal_Int32>(*static_cast<sal_uInt16*>(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<sal_Int64>(*static_cast<tools::Long*>(pParam)));
|
||||
aOut.append(" " + OString::number(static_cast<sal_Int64>(*static_cast<tools::Long*>(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<SwRect*>(pParam);
|
||||
if( pFrame->getFrameArea().Pos() != rFrame.Pos() )
|
||||
{
|
||||
aOut.append("PosChg: (");
|
||||
aOut.append(static_cast<sal_Int64>(rFrame.Left()));
|
||||
aOut.append(", ");
|
||||
aOut.append(static_cast<sal_Int64>(rFrame.Top()));
|
||||
aOut.append(") -> (");
|
||||
aOut.append(static_cast<sal_Int64>(pFrame->getFrameArea().Left()));
|
||||
aOut.append(", ");
|
||||
aOut.append(static_cast<sal_Int64>(pFrame->getFrameArea().Top()));
|
||||
aOut.append(") ");
|
||||
aOut.append("PosChg: ("
|
||||
+ OString::number(static_cast<sal_Int64>(rFrame.Left()))
|
||||
+ ", "
|
||||
+ OString::number(static_cast<sal_Int64>(rFrame.Top()))
|
||||
+ ") -> ("
|
||||
+ OString::number(static_cast<sal_Int64>(pFrame->getFrameArea().Left()))
|
||||
+ ", "
|
||||
+ OString::number(static_cast<sal_Int64>(pFrame->getFrameArea().Top()))
|
||||
+ ") ");
|
||||
}
|
||||
if( pFrame->getFrameArea().Height() != rFrame.Height() )
|
||||
{
|
||||
aOut.append("Height: ");
|
||||
aOut.append(static_cast<sal_Int64>(rFrame.Height()));
|
||||
aOut.append(" -> ");
|
||||
aOut.append(static_cast<sal_Int64>(pFrame->getFrameArea().Height()));
|
||||
aOut.append(" ");
|
||||
aOut.append("Height: "
|
||||
+ OString::number(static_cast<sal_Int64>(rFrame.Height()))
|
||||
+ " -> "
|
||||
+ OString::number(static_cast<sal_Int64>(pFrame->getFrameArea().Height()))
|
||||
+ " ");
|
||||
}
|
||||
if( pFrame->getFrameArea().Width() != rFrame.Width() )
|
||||
{
|
||||
aOut.append("Width: ");
|
||||
aOut.append(static_cast<sal_Int64>(rFrame.Width()));
|
||||
aOut.append(" -> ");
|
||||
aOut.append(static_cast<sal_Int64>(pFrame->getFrameArea().Width()));
|
||||
aOut.append(' ');
|
||||
aOut.append("Width: "
|
||||
+ OString::number(static_cast<sal_Int64>(rFrame.Width()))
|
||||
+ " -> "
|
||||
+ OString::number(static_cast<sal_Int64>(pFrame->getFrameArea().Width()))
|
||||
+ " ");
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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(),
|
||||
|
|
|
@ -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 "=\"");
|
||||
|
|
|
@ -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 );
|
||||
|
|
|
@ -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( "\">" );
|
||||
}
|
||||
|
||||
|
|
|
@ -310,8 +310,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
|
|||
}
|
||||
|
||||
rWrt.OutNewLine(); // <TH>/<TD> 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);
|
||||
|
||||
|
|
|
@ -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<SwPostItFieldType*>(m_xDoc->getIDocumentFieldsAccess().GetSysFieldType( SwFieldIds::Postit )),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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<sal_Int32>(fConverted) / 2);
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRTH OOO_STRING_SVTOOLS_RTF_BRDRW
|
||||
+ OString::number(static_cast<sal_Int32>(fConverted) / 2));
|
||||
}
|
||||
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF);
|
||||
aRet.append(static_cast<sal_Int32>(rExport.GetColor(pLine->GetColor())));
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRDRCF
|
||||
+ OString::number(static_cast<sal_Int32>(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<sal_Int32>(nDist));
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_BRSP + OString::number(static_cast<sal_Int32>(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<sal_Int32>(nStyle));
|
||||
OStringBuffer aStyle(OOO_STRING_SVTOOLS_RTF_S
|
||||
+ OString::number(static_cast<sal_Int32>(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<char>(aStr.getLength()));
|
||||
aBuf.append(aStr);
|
||||
aBuf.append(char(0x00));
|
||||
aBuf.append(OStringChar(static_cast<char>(aStr.getLength())) + aStr
|
||||
+ OStringChar(char(0x00)));
|
||||
xPropSet->getPropertyValue("DefaultText") >>= aTmp;
|
||||
aStr = OUStringToOString(aTmp, m_rExport.GetCurrentEncoding());
|
||||
aBuf.append(static_cast<char>(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<sal_Int32>((100 * rRendered.Width()) / nXCroppedSize));
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_PICSCALEY);
|
||||
aRet.append(static_cast<sal_Int32>((100 * rRendered.Height()) / nYCroppedSize));
|
||||
aRet.append(
|
||||
OOO_STRING_SVTOOLS_RTF_PICSCALEX
|
||||
+ OString::number(static_cast<sal_Int32>((100 * rRendered.Width()) / nXCroppedSize))
|
||||
+ OOO_STRING_SVTOOLS_RTF_PICSCALEY
|
||||
+ OString::number(static_cast<sal_Int32>((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<sal_Int32>(rMapped.Width()));
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_PICH);
|
||||
aRet.append(static_cast<sal_Int32>(rMapped.Height()));
|
||||
+ OOO_STRING_SVTOOLS_RTF_PICW + OString::number(static_cast<sal_Int32>(rMapped.Width()))
|
||||
+ OOO_STRING_SVTOOLS_RTF_PICH
|
||||
+ OString::number(static_cast<sal_Int32>(rMapped.Height()))
|
||||
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_PICWGOAL);
|
||||
aRet.append(static_cast<sal_Int32>(rOrig.Width()));
|
||||
aRet.append(OOO_STRING_SVTOOLS_RTF_PICHGOAL);
|
||||
aRet.append(static_cast<sal_Int32>(rOrig.Height()));
|
||||
+ OOO_STRING_SVTOOLS_RTF_PICWGOAL
|
||||
+ OString::number(static_cast<sal_Int32>(rOrig.Width()))
|
||||
+ OOO_STRING_SVTOOLS_RTF_PICHGOAL
|
||||
+ OString::number(static_cast<sal_Int32>(rOrig.Height()))
|
||||
|
||||
aRet.append(pBLIPType);
|
||||
+ pBLIPType);
|
||||
if (bIsWMF)
|
||||
{
|
||||
aRet.append(sal_Int32(8));
|
||||
|
|
|
@ -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());
|
||||
}
|
||||
|
|
|
@ -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( '\\' );
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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 )
|
||||
{
|
||||
|
|
|
@ -1004,8 +1004,7 @@ static rtl::Reference<SwMailMessage> 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 );
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue