summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-05-19 23:01:58 +0900
committerXisco Fauli <xiscofauli@libreoffice.org>2023-06-30 22:50:25 +0200
commitbe1378854efd5e131d0a29eec668e5c00bb38603 (patch)
tree4fadef47ed2d00655c123c437d20682d6553c28c /include
parent9e7ac82396304be0a4d7d9d8836de20690c76b69 (diff)
sc: use ComplexColor for font color (+others) in OOXML export
Change-Id: I2544c7ece152323d84faafe1a544e4f89ca466d5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152014 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153796
Diffstat (limited to 'include')
-rw-r--r--include/docmodel/color/ComplexColor.hxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/include/docmodel/color/ComplexColor.hxx b/include/docmodel/color/ComplexColor.hxx
index 19e228b2a858..4952d91ac217 100644
--- a/include/docmodel/color/ComplexColor.hxx
+++ b/include/docmodel/color/ComplexColor.hxx
@@ -133,13 +133,19 @@ public:
meType = ColorType::CRGB;
}
+ void setColor(Color const& rColor)
+ {
+ mnComponent1 = rColor.GetRed();
+ mnComponent2 = rColor.GetGreen();
+ mnComponent3 = rColor.GetBlue();
+ maFinalColor = rColor;
+ meType = ColorType::RGB;
+ }
+
void setRGB(sal_Int32 nRGB)
{
::Color aColor(ColorTransparency, nRGB);
- mnComponent1 = aColor.GetRed();
- mnComponent2 = aColor.GetGreen();
- mnComponent3 = aColor.GetBlue();
- meType = ColorType::RGB;
+ setColor(aColor);
}
void setHSL(sal_Int32 nH, sal_Int32 nS, sal_Int32 nL)