WaE: passing OString by value, rather pass by reference

Change-Id: I41a318b8376ae3e68701ffe6ebc745bdbec62dc8
This commit is contained in:
Tor Lillqvist
2014-04-06 23:39:50 +03:00
parent dab7865343
commit 0db3691954
4 changed files with 10 additions and 10 deletions

View File

@@ -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();
};

View File

@@ -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

View File

@@ -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())
{

View File

@@ -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;