summaryrefslogtreecommitdiff
path: root/sc/source/filter/oox
diff options
context:
space:
mode:
authorRegina Henschel <rb.henschel@t-online.de>2022-10-30 00:35:31 +0200
committerRegina Henschel <rb.henschel@t-online.de>2022-10-30 13:30:21 +0100
commit4d15adebcc492112ca88e36aa7e8799b62d86466 (patch)
tree32b6cb25d79f69c4ae45d7d8a05c98b696732749 /sc/source/filter/oox
parent347fa47507fce9758b60d9126a1beed04c45dc35 (diff)
tdf#151818 xlsx SmartArt import, apply theme text color
Similar as patch 2406ba67 for tdf#54095 but now for import of SmartArt objects in xlsx files. Change-Id: I12ca8c476fb9d141cef991e8e98ad13b53c70613 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142027 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Diffstat (limited to 'sc/source/filter/oox')
-rw-r--r--sc/source/filter/oox/drawingfragment.cxx14
1 files changed, 14 insertions, 0 deletions
diff --git a/sc/source/filter/oox/drawingfragment.cxx b/sc/source/filter/oox/drawingfragment.cxx
index d61e17331428..5fb1cd029972 100644
--- a/sc/source/filter/oox/drawingfragment.cxx
+++ b/sc/source/filter/oox/drawingfragment.cxx
@@ -325,6 +325,9 @@ void DrawingFragment::onEndElement()
mxShape->setId(sBackupId);
}
+ if (mxShape->getFontRefColorForNodes().isUsed())
+ applyFontRefColor(mxShape, mxShape->getFontRefColorForNodes());
+
basegfx::B2DHomMatrix aTransformation;
if ( !bIsShapeVisible)
mxShape->setHidden(true);
@@ -355,6 +358,17 @@ void DrawingFragment::onEndElement()
}
}
+void DrawingFragment::applyFontRefColor(const oox::drawingml::ShapePtr& pShape,
+ const oox::drawingml::Color& rFontRefColor)
+{
+ pShape->getShapeStyleRefs()[XML_fontRef].maPhClr = rFontRefColor;
+ std::vector<oox::drawingml::ShapePtr>& vChildren = pShape->getChildren();
+ for (auto const& child : vChildren)
+ {
+ applyFontRefColor(child, rFontRefColor);
+ }
+}
+
// VML
namespace {