[Libreoffice-commits] core.git: sw/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Mar 7 15:40:02 UTC 2019
sw/source/core/doc/docfld.cxx | 8 ++++++++
1 file changed, 8 insertions(+)
New commits:
commit 5e2ac5a598972c18523916f5992376590a629729
Author: Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Wed Mar 6 17:56:52 2019 +0100
Commit: Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Thu Mar 7 16:38:43 2019 +0100
sw: document a problem with IsFrameBehind()/SetGetExpField
This causes asserts from std::upper_bound in ooo26330-3.sxw (without the
fix to the initial expansion, when the fields all expand empty)
Change-Id: I1005e68d27f53986b9216541e0b26ce52082cf55
diff --git a/sw/source/core/doc/docfld.cxx b/sw/source/core/doc/docfld.cxx
index 36e16bff2f5b..02b81afd2340 100644
--- a/sw/source/core/doc/docfld.cxx
+++ b/sw/source/core/doc/docfld.cxx
@@ -244,6 +244,14 @@ bool SetGetExpField::operator<( const SetGetExpField& rField ) const
if( pFirst->IsTextNode() && pNext->IsTextNode() &&
( pFirst->FindFlyStartNode() || pNext->FindFlyStartNode() ))
{
+ // FIXME: in NewFieldPortion(), SwGetExpField are expanded via
+ // DocumentFieldsManager::FieldsToExpand() calling
+ // std::upper_bound binary search function - the sort order
+ // depends on the fly positions in the layout, but the fly
+ // positions depend on the expansion of the SwGetExpField!
+ // This circular dep will cause trouble, it would be better to
+ // use only model positions (anchor), but then how to compare
+ // at-page anchored flys which don't have a model anchor?
return ::IsFrameBehind( *pNext->GetTextNode(), m_nContent, *pFirst->GetTextNode(), m_nContent );
}
return pFirstStt->GetIndex() < pNextStt->GetIndex();
More information about the Libreoffice-commits
mailing list