summaryrefslogtreecommitdiff
path: root/sw/source/core/doc/DocumentSettingManager.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2015-04-10 23:02:01 +0200
committerMichael Stahl <mstahl@redhat.com>2015-04-10 23:36:04 +0200
commitc5cf8824a619401627f18abc7b3049551c71ac2a (patch)
tree0ce5a89721b3cd4962c2ee7868a681f377aff5fe /sw/source/core/doc/DocumentSettingManager.cxx
parentbe096cbf64700466f621e51665d48650b0915635 (diff)
tdf#86578: sw: fix rendering of legacy documents with fly achored at fly
Resurrect the special hack "lcl_SubtractFlys" that effectively paints "lower" flys on top of "higher" flys, defying the z-ordering, if the lower fly is *anchored* in or at the higher fly. It turns out that this is not obvious to emulate in any other way that it is currently implemented: One idea would be to split up painting of the fly background from the foreground, by creating 2 different view objects per fly as children of the SdrPage when decomposing it in svx; but the problem is, they will be ordered in z-order of the flys, and the point would be to paint the backgrounds first and in a different order, call it "anchoring order". What that order should be is hard to tell, there is a conflict between the defined z-order and the flys that are part of one "anchoring hierarchy" and should have their backgrounds re-ordered, because entirely unrelated flys that could belong to different "anchoring hierarchies" but overlap the first ones may result in a cyclic ordering. Painting one "anchoring hierarchy" recursively would not get z-order of flys from different anchoring hierarchies right. Another difficulty is that heaven-layer backgrounds would need to be painted before hell-layer ones. Another aspect of the lcl_SubtractFlys is that it entirely ignores drawing shapes; only Writer's own flys are handled. Since none of the above makes much sense, we clearly want to deprecate the lcl_SubtractFlys rendering. Introduce a new compatibility flag "SubtractFlysAnchoredAtFlys" so that the legacy rendering is only active for legacy documents, while new ones remain free from its taint. (regression from 6e61ecd09679a66060f932835622821d39e92f01) Change-Id: I710fe79710b89c8f865ebb7162e14713aac6cc4a
Diffstat (limited to 'sw/source/core/doc/DocumentSettingManager.cxx')
-rw-r--r--sw/source/core/doc/DocumentSettingManager.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index ba6511c44646..83ba90f99e78 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -81,6 +81,7 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
mbTabOverMargin(false),
mbSurroundTextWrapSmall(false),
mbPropLineSpacingShrinksFirstLine(true),
+ mbSubtractFlys(false),
mApplyParagraphMarkFormatToNumbering(false),
mbLastBrowseMode( false )
@@ -156,6 +157,7 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const
case DocumentSettingId::TAB_OVER_MARGIN: return mbTabOverMargin;
case DocumentSettingId::SURROUND_TEXT_WRAP_SMALL: return mbSurroundTextWrapSmall;
case DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE: return mbPropLineSpacingShrinksFirstLine;
+ case DocumentSettingId::SUBTRACT_FLYS: return mbSubtractFlys;
case DocumentSettingId::BROWSE_MODE: return mbLastBrowseMode; // Attention: normally the SwViewShell has to be asked!
case DocumentSettingId::HTML_MODE: return mbHTMLMode;
@@ -322,6 +324,10 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo
mbPropLineSpacingShrinksFirstLine = value;
break;
+ case DocumentSettingId::SUBTRACT_FLYS:
+ mbSubtractFlys = value;
+ break;
+
// COMPATIBILITY FLAGS END
case DocumentSettingId::BROWSE_MODE: //can be used temporary (load/save) when no SwViewShell is available