[Libreoffice-commits] core.git: 2 commits - include/svtools svtools/qa svtools/source

Tor Lillqvist tml at collabora.com
Sun Apr 6 13:51:42 PDT 2014


 include/svtools/HtmlWriter.hxx       |    8 ++++----
 include/svtools/htmlout.hxx          |    2 +-
 svtools/qa/unit/testHtmlWriter.cxx   |    2 +-
 svtools/source/svhtml/HtmlWriter.cxx |    8 ++++----
 svtools/source/svhtml/htmlout.cxx    |    2 +-
 5 files changed, 11 insertions(+), 11 deletions(-)

New commits:
commit 3b6dba357f94b581cfeee844f9203a84aa1b5823
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Apr 6 23:40:56 2014 +0300

    WaE: overriding virtual function declaration not marked 'override'
    
    Change-Id: I6d38c9b389ce2c5d196e372fd6ae5ad7ac0a03af

diff --git a/svtools/qa/unit/testHtmlWriter.cxx b/svtools/qa/unit/testHtmlWriter.cxx
index 78548b3..59cdb24 100644
--- a/svtools/qa/unit/testHtmlWriter.cxx
+++ b/svtools/qa/unit/testHtmlWriter.cxx
@@ -34,7 +34,7 @@ class Test: public CppUnit::TestFixture
 {
 
 public:
-    virtual void setUp();
+    virtual void setUp() SAL_OVERRIDE;
     void testSingleElement();
     void testSingleElementWithAttributes();
     void testSingleElementWithContent();
commit 0db36919545b437eb154c24512b406ea78be78b7
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sun Apr 6 23:39:50 2014 +0300

    WaE: passing OString by value, rather pass by reference
    
    Change-Id: I41a318b8376ae3e68701ffe6ebc745bdbec62dc8

diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index acfeb65..66d2112 100644
--- a/include/svtools/HtmlWriter.hxx
+++ b/include/svtools/HtmlWriter.hxx
@@ -32,11 +32,11 @@ public:
 
     void prettyPrint(bool bChoice);
 
-    void start(OString aElement);
+    void start(const OString &aElement);
     void end();
-    void write(OString aContent);
-    void attribute(OString aAttribute, OString aValue);
-    void single(OString aContent);
+    void write(const OString &aContent);
+    void attribute(const OString &aAttribute, const OString &aValue);
+    void single(const OString &aContent);
     void endAttribute();
 };
 
diff --git a/include/svtools/htmlout.hxx b/include/svtools/htmlout.hxx
index dd3b245..f904a05 100644
--- a/include/svtools/htmlout.hxx
+++ b/include/svtools/htmlout.hxx
@@ -108,7 +108,7 @@ struct HTMLOutFuncs
 
 struct HtmlWriterHelper
 {
-    SVT_DLLPUBLIC static void applyColor( HtmlWriter& rHtmlWriter, OString aAttributeName, const Color& rColor);
+    SVT_DLLPUBLIC static void applyColor( HtmlWriter& rHtmlWriter, const OString &aAttributeName, const Color& rColor);
 };
 
 #endif
diff --git a/svtools/source/svhtml/HtmlWriter.cxx b/svtools/source/svhtml/HtmlWriter.cxx
index e107bee..5accc5d 100644
--- a/svtools/source/svhtml/HtmlWriter.cxx
+++ b/svtools/source/svhtml/HtmlWriter.cxx
@@ -25,7 +25,7 @@ void HtmlWriter::prettyPrint(bool bChoice)
     mbPrettyPrint = bChoice;
 }
 
-void HtmlWriter::start(OString aElement)
+void HtmlWriter::start(const OString &aElement)
 {
     if (mbElementOpen)
     {
@@ -49,7 +49,7 @@ void HtmlWriter::start(OString aElement)
     mbElementOpen = true;
 }
 
-void HtmlWriter::single(OString aContent)
+void HtmlWriter::single(const OString &aContent)
 {
     start(aContent);
     end();
@@ -94,7 +94,7 @@ void HtmlWriter::end()
     mbContentWritten = false;
 }
 
-void HtmlWriter::write(OString aContent)
+void HtmlWriter::write(const OString &aContent)
 {
     if (mbElementOpen)
     {
@@ -105,7 +105,7 @@ void HtmlWriter::write(OString aContent)
     mrStream.WriteOString(aContent);
 }
 
-void HtmlWriter::attribute(OString aAttribute, OString aValue)
+void HtmlWriter::attribute(const OString &aAttribute, const OString &aValue)
 {
     if (mbElementOpen && !aAttribute.isEmpty() && !aValue.isEmpty())
     {
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 1a675cf..72d61c6c 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -977,7 +977,7 @@ OString HTMLOutFuncs::CreateTableDataOptionsValNum(
     return aStrTD.makeStringAndClear();
 }
 
-void HtmlWriterHelper::applyColor(HtmlWriter& rHtmlWriter, OString aAttributeName, const Color& rColor)
+void HtmlWriterHelper::applyColor(HtmlWriter& rHtmlWriter, const OString &aAttributeName, const Color& rColor)
 {
     OStringBuffer sBuffer;
 


More information about the Libreoffice-commits mailing list