summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2014-04-06 23:39:50 +0300
committerTor Lillqvist <tml@collabora.com>2014-04-06 23:39:50 +0300
commit0db36919545b437eb154c24512b406ea78be78b7 (patch)
treec8e9c0116ff83bd95e486f22c23b49c7d48df5f2
parentdab78653430200bab325db6348734e570a34fe12 (diff)
WaE: passing OString by value, rather pass by reference
Change-Id: I41a318b8376ae3e68701ffe6ebc745bdbec62dc8
-rw-r--r--include/svtools/HtmlWriter.hxx8
-rw-r--r--include/svtools/htmlout.hxx2
-rw-r--r--svtools/source/svhtml/HtmlWriter.cxx8
-rw-r--r--svtools/source/svhtml/htmlout.cxx2
4 files changed, 10 insertions, 10 deletions
diff --git a/include/svtools/HtmlWriter.hxx b/include/svtools/HtmlWriter.hxx
index acfeb651266c..66d211211ed4 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 dd3b24510df8..f904a05b3f20 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 e107bee175cb..5accc5de633e 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 1a675cf2f016..72d61c6cab8d 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;