diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2019-03-06 17:56:52 +0100 |
---|---|---|
committer | Michael Stahl <Michael.Stahl@cib.de> | 2019-03-07 16:38:43 +0100 |
commit | 5e2ac5a598972c18523916f5992376590a629729 (patch) | |
tree | d8e9c4c9df2681005f75f636d3022a6c78d9bec8 /sw | |
parent | d0586b42a715e4d14eeb5b3e729f20c3fb40c391 (diff) |
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
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/docfld.cxx | 8 |
1 files changed, 8 insertions, 0 deletions
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(); |