summaryrefslogtreecommitdiff
path: root/sw/inc/section.hxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-11-17 14:18:18 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-11-19 20:36:52 +0100
commit8586051f02125e7358984d2cd14c5383b26bd246 (patch)
tree4fa4b072ca1f7322f1630555168e4a5e81de8c04 /sw/inc/section.hxx
parent80530986a70bbbcca6cb71ab32da593e11e3684c (diff)
tdf#121186: sync itemset and supportsFullDrawingLayerFillAttributeSet
In the bugdoc, there are three separate section styles, first of which (Sect1) has fo:background-color attribute set to #ffffff, others with no background-related attributes. The sections using the styles are nested, the outermost one using the style Sect1 with background color. When the XML is read, SwXTextSection::attach is called, which fills an item set with values stored in an SwTextSectionProperties_Impl struct, SvxBrushItem with color value of 0x00ffffff among them. The resulting set contains the SvxBrushItem item (WhichId = RES_BACKGROUND = 105). No XATTR_FILL_FIRST .. XATTR_FILL_LAST are put into the set. When later the Edit Sections dialog is opened, SectRepr objects are constructed for each section, and the brush is taken from section's format using makeBackgroundBrushItem. It checks supportsFullDrawingLayerFillAttributeSet, and if yes, uses getSvxBrushItemFromSourceSet to fill in the SvxBrushItem; the latter only considers XATTR_FILL_FIRST .. XATTR_FILL_LAST in the passed set. For the SwSectionFormat, supportsFullDrawingLayerFillAttributeSet inherited from SwFrameFormat returns true, which means that existing RES_BACKGROUND item is ignored, and default transparent color is returned. Fix by returning false from supportsFullDrawingLayerFillAttributeSet for SwSectionFormat. This makes nested sections' properties and behaviour match what was in older versions (4.0), where all three nested sections took white fill; and only setting innermost section's fill to none made it transparent (show document's background). Change-Id: Id0b4fce221cfa9c54097e69a3acfdf018a1043b5 Reviewed-on: https://gerrit.libreoffice.org/83016 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/inc/section.hxx')
-rw-r--r--sw/inc/section.hxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 54b3f8f86c01..0776afda4cf9 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -329,6 +329,7 @@ public:
virtual bool IsInUndo() const override;
virtual bool IsInContent() const override;
virtual css::uno::Reference< css::rdf::XMetadatable > MakeUnoObject() override;
+ virtual bool supportsFullDrawingLayerFillAttributeSet() const override;
void dumpAsXml(xmlTextWriterPtr pWriter) const;
};