diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-08-25 23:29:18 +0200 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-29 20:18:35 +0000 |
commit | 8c4bb051d644996eb92e3a6c6dd8d09972450733 (patch) | |
tree | a5ed820405c8ce8c6c2e15118098cef58099f480 /sw/source | |
parent | 848e0e4f8cb4917713e522b654a69a493274952e (diff) |
related: tdf#92379: sw: backward compatible ODF export of overriding
... frame/paragraph backgrounds.
If a style is set to have draw:fill="solid" and a derived style to
draw:fill="none" then the derived one must have
fo:background-color="transparent" to override the parent for old
consumers like LO <= 4.3/AOO <= 4.1 that don't understand draw:fill.
Change-Id: I5b56c7ace927338239195c6bfcfef1950544c8d2
(cherry picked from commit 25c50a71ffdf7c43f8f3dd10736188271cc75ef0)
Reviewed-on: https://gerrit.libreoffice.org/18039
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/unocore/swunohelper.cxx | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx index 05dd0da1f1f8..b4a8a4fd9488 100644 --- a/sw/source/core/unocore/swunohelper.cxx +++ b/sw/source/core/unocore/swunohelper.cxx @@ -286,7 +286,18 @@ bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, switch (eFill) { case drawing::FillStyle_NONE: - return false; // ignoring some extremely limited XFillColorItem eval + // claim that BackColor and BackTransparent are available so that + // fo:background="transparent" attribute is exported to override + // the parent style in case it is != NONE + switch (nMID) + { + case MID_BACK_COLOR: + case MID_BACK_COLOR_R_G_B: + case MID_GRAPHIC_TRANSPARENT: // this is *BackTransparent + return true; + default: + return false; + } break; case drawing::FillStyle_SOLID: case drawing::FillStyle_GRADIENT: // gradient and hatch don't exist in @@ -294,6 +305,7 @@ bool needToMapFillItemsToSvxBrushItemTypes(const SfxItemSet& rSet, switch (nMID) { case MID_BACK_COLOR: + case MID_GRAPHIC_TRANSPARENT: // this is *BackTransparent // Gradient/Hatch always have emulated color return (drawing::FillStyle_SOLID != eFill) || SfxItemState::SET == rSet.GetItemState(XATTR_FILLCOLOR) |