diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-11-15 17:49:43 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-11-15 20:03:51 +0100 |
commit | 45e479bf35bb74d467ed5a5e583f126c035d93b1 (patch) | |
tree | b0d4df27c7df4c1199ac95a4582ec21077145d2e | |
parent | 72bc1fad399f78c48b186dee8759e12654cdf5d5 (diff) |
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@collabora.com>
Tested-by: Jenkins
-rw-r--r-- | editeng/source/items/textitem.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
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); } |