summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-05-19 23:01:58 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-06-29 04:57:36 +0200
commit7501f8928264c48c88ab6ee6b757b295b13b63d4 (patch)
tree2a5d801109e2a231b807adc7a4c407897bf6e2d4 /include
parentba29922dcc0a7b079fb76df445c4cd3a80102e83 (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>
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)