[Libreoffice-commits] .: basctl/source codemaker/source sw/source xmloff/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Tue Dec 18 08:27:17 PST 2012


 basctl/source/basicide/bastype3.cxx     |    8 +-------
 basctl/source/basicide/bastypes.cxx     |   11 ++++-------
 codemaker/source/javamaker/javatype.cxx |    6 +-----
 sw/source/filter/ww8/docxexport.cxx     |    6 ++----
 sw/source/filter/ww8/ww8graf.cxx        |    7 ++-----
 xmloff/source/core/RDFaExportHelper.cxx |    7 +------
 6 files changed, 11 insertions(+), 34 deletions(-)

New commits:
commit 5198c4a41f9cb793abd1276e75a640f7391ce0c3
Author: Christos Strubulis <strubulis at gmail.com>
Date:   Tue Dec 18 06:59:28 2012 -0800

    Replace chained O(U)StringBuffer::append() with operator+
    
    Change-Id: I0fcd70cff092c7d90b57b9af9dcec99f23750f1c
    Signed-off-by: Luboš Luňák <l.lunak at suse.cz>

diff --git a/basctl/source/basicide/bastype3.cxx b/basctl/source/basicide/bastype3.cxx
index 194d52d..db15a6a 100644
--- a/basctl/source/basicide/bastype3.cxx
+++ b/basctl/source/basicide/bastype3.cxx
@@ -455,13 +455,7 @@ SvTreeListEntry* TreeListBox::FindRootEntry( const ScriptDocument& rDocument, Li
 
 OUString CreateMgrAndLibStr( const OUString& rMgrName, const OUString& rLibName )
 {
-    OUStringBuffer aName;
-    aName.append('[');
-    aName.append(rMgrName);
-    aName.append(']');
-    aName.append('.');
-    aName.append(rLibName);
-    return aName.makeStringAndClear();
+    return "[" + rMgrName + "]." + rLibName;
 }
 
 
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 461044c..340ea40 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -183,17 +183,14 @@ OUString BaseWindow::GetTitle()
 
 OUString BaseWindow::CreateQualifiedName()
 {
-    OUStringBuffer aName;
+    OUString aName;
     if ( !m_aLibName.isEmpty() )
     {
         LibraryLocation eLocation = m_aDocument.getLibraryLocation( m_aLibName );
-        aName.append(m_aDocument.getTitle(eLocation));
-        aName.append('.');
-        aName.append(m_aLibName);
-        aName.append('.');
-        aName.append(GetTitle());
+        aName = m_aDocument.getTitle(eLocation) + "." + m_aLibName + "." +
+                GetTitle();
     }
-    return aName.makeStringAndClear();
+    return aName;
 }
 
 void BaseWindow::SetReadOnly (bool)
diff --git a/codemaker/source/javamaker/javatype.cxx b/codemaker/source/javamaker/javatype.cxx
index b0edb7f..5b8748e 100644
--- a/codemaker/source/javamaker/javatype.cxx
+++ b/codemaker/source/javamaker/javatype.cxx
@@ -855,11 +855,7 @@ void handleEnumType(
             rtl::OString(RTL_CONSTASCII_STRINGPARAM("com/sun/star/uno/Enum")),
             rtl::OString()));
     SAL_WNODEPRECATED_DECLARATIONS_POP
-    rtl::OStringBuffer buf;
-    buf.append('L');
-    buf.append(className);
-    buf.append(';');
-    rtl::OString classDescriptor(buf.makeStringAndClear());
+    rtl::OString classDescriptor("L" + className + ";");
     {for (sal_uInt16 i = 0; i < fields; ++i) {
         RTConstValue fieldValue(reader.getFieldValue(i));
         if (fieldValue.m_type != RT_TYPE_INT32
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index 59e9bd1..1b3c8f8 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -294,14 +294,12 @@ void DocxExport::DoFormText(const SwInputField* /*pFld*/)
 
 rtl::OString DocxExport::OutputChart( uno::Reference< frame::XModel >& xModel, sal_Int32 nCount )
 {
-    rtl::OUString aFileName = rtl::OUStringBuffer().append("charts/chart").append(nCount).append(".xml").makeStringAndClear();
-
+    OUString aFileName = "charts/chart" + OUString::valueOf(nCount) + ".xml";
     OUString sId = m_pFilter->addRelation( m_pDocumentFS->getOutputStream(),
                     "http://schemas.openxmlformats.org/officeDocument/2006/relationships/chart",
                     aFileName );
 
-    aFileName = rtl::OUStringBuffer().append("word/charts/chart").append(nCount).append(".xml").makeStringAndClear();
-
+    aFileName = "word/charts/chart" + OUString::valueOf(nCount) + ".xml";
     ::sax_fastparser::FSHelperPtr pChartFS =
         m_pFilter->openFragmentStreamWithSerializer( aFileName,
             "application/vnd.openxmlformats-officedocument.drawingml.chart" );
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index c432363..da4cae6 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -154,11 +154,8 @@ void wwFrameNamer::SetUniqueGraphName(SwFrmFmt *pFrmFmt, const rtl::OUString &rF
 {
     if (mbIsDisabled || rFixed.isEmpty())
         return;
-    rtl::OUStringBuffer aName(msSeed);
-    aName.append(++mnImportedGraphicsCount);
-    aName.append(": ");
-    aName.append(rFixed);
-    pFrmFmt->SetName(aName.makeStringAndClear());
+
+    pFrmFmt->SetName(msSeed+OUString::valueOf(++mnImportedGraphicsCount) + ": " + rFixed);
 }
 
 // ReadGrafStart liest die ObjektDaten ein und erzeugt falls noetig einen Anker
diff --git a/xmloff/source/core/RDFaExportHelper.cxx b/xmloff/source/core/RDFaExportHelper.cxx
index d202b06..052c76c 100644
--- a/xmloff/source/core/RDFaExportHelper.cxx
+++ b/xmloff/source/core/RDFaExportHelper.cxx
@@ -56,8 +56,6 @@ using namespace ::com::sun::star;
 
 namespace xmloff {
 
-static const char s_prefix [] = "_:b";
-
 static ::rtl::OUString
 makeCURIE(SvXMLExport * i_pExport,
     uno::Reference<rdf::XURI> const & i_xURI)
@@ -128,10 +126,7 @@ RDFaExportHelper::LookupBlankNode(
         m_BlankNodeMap[ i_xBlankNode->getStringValue() ] );
     if (rEntry.isEmpty())
     {
-        ::rtl::OUStringBuffer buf;
-        buf.appendAscii(s_prefix);
-        buf.append(++m_Counter);
-        rEntry = buf.makeStringAndClear();
+        rEntry = "_:b" + OUString::valueOf(++m_Counter);
     }
     return rEntry;
 }


More information about the Libreoffice-commits mailing list