sw/source/core/doc/docfld.cxx | 8 ++++++++ 1 file changed, 8 insertions(+)
New commits: commit 5e2ac5a598972c18523916f5992376590a629729 Author: Michael Stahl <michael.st...@cib.de> AuthorDate: Wed Mar 6 17:56:52 2019 +0100 Commit: Michael Stahl <michael.st...@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(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits