summaryrefslogtreecommitdiff
path: root/include/docmodel/theme
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2023-04-12 11:18:42 +0900
committerTomaž Vajngerl <quikee@gmail.com>2023-04-25 13:38:18 +0200
commit6252959192c07973af698ce30fa67b1a29e4871e (patch)
tree5713580848f0608f7143b6dad041d50a342c752e /include/docmodel/theme
parentb09c377888e2e75859fff37fdf9408065eb522d6 (diff)
oox: add support for theme import and export of blip effects
This adds support for (most) blip effects import, export and the document model. Change-Id: Iec15f4de22c31268019fa1a60432e40ae8f03635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150262 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include/docmodel/theme')
-rw-r--r--include/docmodel/theme/FormatScheme.hxx49
1 files changed, 40 insertions, 9 deletions
diff --git a/include/docmodel/theme/FormatScheme.hxx b/include/docmodel/theme/FormatScheme.hxx
index 420d5c1b7584..fb65d24d2ba8 100644
--- a/include/docmodel/theme/FormatScheme.hxx
+++ b/include/docmodel/theme/FormatScheme.hxx
@@ -311,12 +311,49 @@ enum class RectangleAlignment
constexpr sal_uInt16 RECTANGLE_ALIGNMENT_COUNT
= static_cast<sal_uInt16>(RectangleAlignment::BottomRight) + 1;
-enum class ColorEffectType
+enum class BlipEffectType
{
None,
+ AlphaBiLevel,
+ AlphaCeiling,
+ AlphaFloor,
+ AlphaInverse,
+ AlphaModulate,
+ AlphaModulateFixed,
+ AlphaReplace,
BiLevel,
+ Blur,
+ ColorChange,
+ ColorReplace,
+ DuoTone,
+ FillOverlay,
Grayscale,
- ColorChange
+ HSL,
+ Luminance,
+ Tint,
+};
+
+class BlipEffect
+{
+public:
+ BlipEffectType meType = BlipEffectType::None;
+
+ sal_Int32 mnThreshold = 0; // AlphaBiLevel, BiLevel
+ ColorDefinition maColor1; // AlphaInverse, ColorReplace, DuoTone, ColorChange (from)
+ ColorDefinition maColor2; // DuoTone, ColorChange (to)
+ sal_Int32 mnAmount = 0; // AlphaModulateFixed, Tint
+ sal_Int32 mnRadius = 0; // Blur
+ bool mbGrow = false; // Blur
+ sal_Int32 mnAlpha = 0; // AlphaReplace
+ bool mbUseAlpha = false; // ColorChange
+ sal_Int32 mnHue = 0; // HSL, Tint
+ sal_Int32 mnSaturation = 0; // HSL
+ sal_Int32 mnLuminance = 0; // HSL
+ sal_Int32 mnBrightness = 0; // Luminance
+ sal_Int32 mnContrast = 0; // Luminance
+
+ ColorDefinition& getColorFrom() { return maColor1; }
+ ColorDefinition& getColorTo() { return maColor2; }
};
class DOCMODEL_DLLPUBLIC BlipFill : public Fill
@@ -335,13 +372,7 @@ public:
RectangleAlignment meTileAlignment = RectangleAlignment::TopLeft;
css::uno::Reference<css::graphic::XGraphic> mxGraphic;
-
- ColorEffectType meColorEffectType = ColorEffectType::None;
-
- sal_Int32 mnBiLevelThreshold = 0;
- ColorDefinition maColorFrom;
- ColorDefinition maColorTo;
- bool mbUseAlpha = false;
+ std::vector<BlipEffect> maBlipEffects;
BlipFill()
: Fill(FillType::Blip)