summaryrefslogtreecommitdiff
path: root/sw/source/core/txtnode
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-16 16:26:38 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-12-01 08:44:43 +0100
commita91992e7b3e7f59e9116aef859696d517a93dab7 (patch)
treef65352ba9104cd3ba93dad9ab8697f3999d34405 /sw/source/core/txtnode
parent52e8b41f1ceec33cd774d3e6b61e208b61a65eb3 (diff)
sw: SwTextNode::GetAttr() inconsistency
If there are hints, the aFormatSet.Differentiate(rSet) will cause the pre-existing items in the parameter rSet to win, whereas without hints the SwContentNode::GetAttr() calls rSet.Set() which clears everything. It looks like WW8Export::WriteFootnoteBegin() was sort of relying on this; presumably it wants the pCFormat to win over node's items but hints on the position to win over pCFormat. Well that's what it currently gets anyway, so try to preserve that. The other use in SwUnoCursorHelper::SetPropertyValues() looks like an oversight. Change-Id: I80e18e040413fcf26f6f77844ed731de31a464d2
Diffstat (limited to 'sw/source/core/txtnode')
-rw-r--r--sw/source/core/txtnode/thints.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/txtnode/thints.cxx b/sw/source/core/txtnode/thints.cxx
index e467a79f7634..f021b17b3a28 100644
--- a/sw/source/core/txtnode/thints.cxx
+++ b/sw/source/core/txtnode/thints.cxx
@@ -2052,6 +2052,8 @@ bool SwTextNode::GetAttr( SfxItemSet& rSet, sal_Int32 nStt, sal_Int32 nEnd,
const bool bOnlyTextAttr, const bool bGetFromChrFormat,
const bool bMergeIndentValuesOfNumRule ) const
{
+ assert(!rSet.Count()); // handled inconsistently, typically an error?
+
if( HasHints() )
{
// First, check which text attributes are valid in the range.