[Libreoffice-commits] core.git: include/tools sw/source tools/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Nov 19 14:05:57 PST 2014


 include/tools/color.hxx         |    2 +-
 sw/source/core/text/xmldump.cxx |    2 +-
 tools/source/generic/color.cxx  |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 34411dc2f0535a21b4ec3bec19d493e0aa037646
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Nov 19 22:50:10 2014 +0100

    Mark Color::AsRGBHexString() as const
    
    Change-Id: Idf00e228c480afe2bbbb64682ed01f2c778b6d9d

diff --git a/include/tools/color.hxx b/include/tools/color.hxx
index 3515e59..ea92187 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 17ba86b..e74ecd1 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 64cc6c4..cbdc6e4 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();


More information about the Libreoffice-commits mailing list