[Libreoffice-commits] core.git: editeng/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Fri Nov 15 19:05:26 UTC 2019


 editeng/source/items/textitem.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 45e479bf35bb74d467ed5a5e583f126c035d93b1
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Fri Nov 15 17:49:43 2019 +0100
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Fri Nov 15 20:03:51 2019 +0100

    editeng: extend SvxColorItem xml dump
    
    Show the raw ARGB color as a value, and use the current "human-friendly
    string" only as a presentation.
    
    Change-Id: I4e17a44db967f1a4c7018b507d9e68058d988783
    Reviewed-on: https://gerrit.libreoffice.org/82813
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/editeng/source/items/textitem.cxx b/editeng/source/items/textitem.cxx
index afd053da51e7..ef0a416324a0 100644
--- a/editeng/source/items/textitem.cxx
+++ b/editeng/source/items/textitem.cxx
@@ -1474,10 +1474,15 @@ void SvxColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const
 {
     xmlTextWriterStartElement(pWriter, BAD_CAST("SvxColorItem"));
     xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr()));
+
+    std::stringstream ss;
+    ss << mColor;
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(ss.str().c_str()));
+
     OUString aStr;
     IntlWrapper aIntlWrapper(SvtSysLocale().GetUILanguageTag());
     GetPresentation( SfxItemPresentation::Complete, MapUnit::Map100thMM, MapUnit::Map100thMM, aStr, aIntlWrapper);
-    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr()));
+    xmlTextWriterWriteAttribute(pWriter, BAD_CAST("presentation"), BAD_CAST(OUStringToOString(aStr, RTL_TEXTENCODING_UTF8).getStr()));
     xmlTextWriterEndElement(pWriter);
 }
 


More information about the Libreoffice-commits mailing list