Kaydet (Commit) 34411dc2 authored tarafından Miklos Vajna's avatar Miklos Vajna

Mark Color::AsRGBHexString() as const

Change-Id: Idf00e228c480afe2bbbb64682ed01f2c778b6d9d
üst 37f613c6
......@@ -164,7 +164,7 @@ public:
// Return color as RGB hex string
// for example "00ff00" for green color
OUString AsRGBHexString();
OUString AsRGBHexString() const;
// get ::basegfx::BColor from this color
::basegfx::BColor getBColor() const { return ::basegfx::BColor(GetRed() / 255.0, GetGreen() / 255.0, GetBlue() / 255.0); }
......
......@@ -440,7 +440,7 @@ void SwFont::dumpAsXml(xmlTextWriterPtr writer) const
{
xmlTextWriterStartElement(writer, BAD_CAST("pFont"));
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("ptr"), "%p", this);
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("color"), "%s", const_cast<Color&>(GetColor()).AsRGBHexString().toUtf8().getStr());
xmlTextWriterWriteFormatAttribute(writer, BAD_CAST("color"), "%s", GetColor().AsRGBHexString().toUtf8().getStr());
xmlTextWriterEndElement(writer);
}
......
......@@ -232,7 +232,7 @@ SvStream& Color::Write( SvStream& rOStm, bool bNewFormat )
return rOStm;
}
OUString Color::AsRGBHexString()
OUString Color::AsRGBHexString() const
{
std::stringstream ss;
ss << std::hex << std::setfill ('0') << std::setw(6) << GetRGBColor();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment