diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2022-02-16 20:02:01 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2022-02-17 08:23:15 +0100 |
commit | 8cc70d18c4507a746607fe5922b7c5e94b7f7579 (patch) | |
tree | 92b23704bcabac77dfa5b896833ef6c59aec6183 /svx | |
parent | b447be3ccba686c4e35d61b05b50d31045c9d1ac (diff) |
sd theme: add doc model for shape fill color
In preparation of adding UNO API for this.
Change-Id: Iecb2e44c43bca9e892fcb6242870ec12faa48be5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130050
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/xoutdev/xattr.cxx | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/svx/source/xoutdev/xattr.cxx b/svx/source/xoutdev/xattr.cxx index 0539e19664e7..81d10a97061c 100644 --- a/svx/source/xoutdev/xattr.cxx +++ b/svx/source/xoutdev/xattr.cxx @@ -279,7 +279,8 @@ XColorItem::XColorItem(TypedWhichId<XColorItem> _nWhich, const Color& rTheColor) XColorItem::XColorItem(const XColorItem& rItem) : NameOrIndex(rItem), - aColor(rItem.aColor) + aColor(rItem.aColor), + maThemeColor(rItem.maThemeColor) { } @@ -291,7 +292,8 @@ XColorItem* XColorItem::Clone(SfxItemPool* /*pPool*/) const bool XColorItem::operator==(const SfxPoolItem& rItem) const { return ( NameOrIndex::operator==(rItem) && - static_cast<const XColorItem&>(rItem).aColor == aColor ); + static_cast<const XColorItem&>(rItem).aColor == aColor ) && + static_cast<const XColorItem&>(rItem).maThemeColor == maThemeColor; } const Color& XColorItem::GetColorValue() const @@ -323,11 +325,17 @@ void XColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const { (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST("SDRATTR_SHADOWCOLOR")); } + else if (Which() == XATTR_FILLCOLOR) + { + (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST("XATTR_FILLCOLOR")); + } (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("aColor"), BAD_CAST(aColor.AsRGBHexString().toUtf8().getStr())); NameOrIndex::dumpAsXml(pWriter); + maThemeColor.dumpAsXml(pWriter); + (void)xmlTextWriterEndElement(pWriter); } @@ -1913,7 +1921,9 @@ void XFillColorItem::dumpAsXml(xmlTextWriterPtr pWriter) const { (void)xmlTextWriterStartElement(pWriter, BAD_CAST("XFillColorItem")); (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("whichId"), BAD_CAST(OString::number(Which()).getStr())); - (void)xmlTextWriterWriteAttribute(pWriter, BAD_CAST("value"), BAD_CAST(GetColorValue().AsRGBHexString().toUtf8().getStr())); + + XColorItem::dumpAsXml(pWriter); + (void)xmlTextWriterEndElement(pWriter); } |