diff options
-rw-r--r-- | include/tools/color.hxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/xmldump.cxx | 2 | ||||
-rw-r--r-- | tools/source/generic/color.cxx | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/include/tools/color.hxx b/include/tools/color.hxx index 3515e59b7ed3..ea921878e48c 100644 --- a/include/tools/color.hxx +++ b/include/tools/color.hxx @@ -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); } diff --git a/sw/source/core/text/xmldump.cxx b/sw/source/core/text/xmldump.cxx index 17ba86b72b58..e74ecd15a47b 100644 --- a/sw/source/core/text/xmldump.cxx +++ b/sw/source/core/text/xmldump.cxx @@ -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); } diff --git a/tools/source/generic/color.cxx b/tools/source/generic/color.cxx index 64cc6c44e3fa..cbdc6e4c8112 100644 --- a/tools/source/generic/color.cxx +++ b/tools/source/generic/color.cxx @@ -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(); |