diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-08-21 18:28:23 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-08-22 01:00:03 +0200 |
commit | 79fb61efb847405fa47235002b52ee8efad5e339 (patch) | |
tree | 8ae2763d18c65cf465b77ce248202c96139b2bc5 /sw/source/core/unocore | |
parent | ece9da2f47def7ed5cd5e04add0eeb7a90a6e1b6 (diff) |
tdf#92379: svx: don't overwrite fo:background-color on ODF import
getSvxBrushItemFromSourceSet() is called once for each property of a
frame style that is set, and the "solid" fill-style is set by first
applying the BackColorRGB and then BackTransparency property. So there
is an intermediate state that has fill-style NONE but a XFillColorItem
set - don't reset the color to white in that case!
Apparently writerfilter generally relies on the current reset-to-AUTO
implementation (loads of test failures), so for now limit the fix for
when we know that a frame style is imported from ODF.
(regression from 3d399b0e45720354fc64dc3d121ee486e01eff89)
Change-Id: Ia987fe586ec819a1f3cd85acdbfb03c74ca0ec2c
Diffstat (limited to 'sw/source/core/unocore')
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index a17eaf175360..da3d56ff5bb8 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1761,7 +1761,7 @@ static void lcl_SetStyleProperty(const SfxItemPropertySimpleEntry& rEntry, { //UUUU SfxItemSet& rStyleSet = rBase.GetItemSet(); - const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND)); + const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(rStyleSet, RES_BACKGROUND, true, pDoc->IsInXMLImport())); SvxBrushItem aChangedBrushItem(aOriginalBrushItem); aChangedBrushItem.PutValue(aValue, nMemberId); @@ -4297,7 +4297,7 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle( case RES_BACKGROUND: { //UUUU - const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND)); + const SvxBrushItem aOriginalBrushItem(getSvxBrushItemFromSourceSet(aSet, RES_BACKGROUND, true, pDocShell->GetDoc()->IsInXMLImport())); SvxBrushItem aChangedBrushItem(aOriginalBrushItem); aChangedBrushItem.PutValue(aValue, nMemberId); |