diff options
author | Regina Henschel <rb.henschel@t-online.de> | 2022-04-20 18:16:50 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2022-04-26 21:13:28 +0200 |
commit | 02c59c79f30705450224fdb6eb3b001da457f81e (patch) | |
tree | a0646692c1186f13efdf555bef5387cbc0de0540 /include | |
parent | a9d8f86488dcd44bef4d6f8cee1d6c803f237f9c (diff) |
tdf#109169 export Type encoded shading to OOXML
A shape might have the shading information not in commands in the
enhanced-path, but generated in ctor of EnhancedCustomShape2d from the
Type value of the shape. This shading information is a 32 bit value
with first the number of the shadings and then the shadings. A shading
is encoded with 1,2,3,4,5,6,7 for lighten 10 to 70 and 8,9,a,b,c,d,e,f
for darken -80 to -10.
To get this information from EnhanceCustomShape2d I have made its
method GetLuminanceChange() public.
Because OOXML only has darken, darkenLess, lighten and lightenLess our
values are mapped:
-10, -20, -30 to darkenLess
-40, -50, -60, -70, -80 to darken
10, 20, 30 to lightenLess
40, 50, 60, 70 to lighten
The bupreport mentions only 'Octagon Bevel' and 'Diamond Bevel'. But
the patch fixes missing shading for shapes of Types 'ActionButton*'
as well. Such shapes come in from MS binary import.
Change-Id: I03f19496b915f3ced6346222e8806832b4ee2827
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133220
Tested-by: Jenkins
Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133366
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/EnhancedCustomShape2d.hxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/svx/EnhancedCustomShape2d.hxx b/include/svx/EnhancedCustomShape2d.hxx index 18ce21437bcc..abe9319407ff 100644 --- a/include/svx/EnhancedCustomShape2d.hxx +++ b/include/svx/EnhancedCustomShape2d.hxx @@ -127,7 +127,6 @@ class SVXCORE_DLLPUBLIC EnhancedCustomShape2d final : public SfxItemSet Degree100 nRotateAngle; SAL_DLLPRIVATE bool SetAdjustValueAsDouble( const double& rValue, const sal_Int32 nIndex ); - SAL_DLLPRIVATE sal_Int32 GetLuminanceChange( sal_uInt32 nIndex ) const; SAL_DLLPRIVATE Color GetColorData( const Color& rFillColor, sal_uInt32 nIndex, double dBrightness ) const; SAL_DLLPRIVATE void AdaptObjColor( SdrPathObj& rObj, @@ -183,6 +182,7 @@ class SVXCORE_DLLPUBLIC EnhancedCustomShape2d final : public SfxItemSet } }; + sal_Int32 GetLuminanceChange( sal_uInt32 nIndex ) const; SAL_DLLPRIVATE bool IsFlipVert() const { return bFlipV; }; SAL_DLLPRIVATE bool IsFlipHorz() const { return bFlipH; }; SAL_DLLPRIVATE Degree100 GetRotateAngle() const { return nRotateAngle; }; |