diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-06-01 22:45:55 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-14 16:19:08 +0200 |
commit | cb6f2e535714082444a94cfcce4137517a2f9226 (patch) | |
tree | 128e4e97d0207309bc25271f59d689766bf87670 /sw | |
parent | 4688fc3953c5461e8a53ecb80e71734a87622f8f (diff) |
sw_redlinehide: SwTextNode::Insert(): send SwInsText hint before
... adjusting hints, as the latter sends RES_UPDATE_ATTR hints
and the ModelToViewPos() asserts because the mergedText is too short.
Change-Id: I48bf6388ce69f3294decf96dc6dd11ba3bf4bc7b
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/txtnode/ndtxt.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx index 134b24cf96c5..ed08bd992e13 100644 --- a/sw/source/core/txtnode/ndtxt.cxx +++ b/sw/source/core/txtnode/ndtxt.cxx @@ -1991,6 +1991,12 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx, SetIgnoreDontExpand( bOldExpFlg ); } + if ( HasWriterListeners() ) + { // send this before messing with hints, which will send RES_UPDATE_ATTR + SwInsText aHint( aPos, nLen ); + NotifyClients( nullptr, &aHint ); + } + if ( HasHints() ) { bool const bHadHints(!m_pSwpHints->CanBeDeleted()); @@ -2062,12 +2068,6 @@ OUString SwTextNode::InsertText( const OUString & rStr, const SwIndex & rIdx, "SwTextNode::InsertText: unexpected loss of hints"); } - if ( HasWriterListeners() ) - { - SwInsText aHint( aPos, nLen ); - NotifyClients( nullptr, &aHint ); - } - // By inserting a character, the hidden flags // at the TextNode can become invalid: SetCalcHiddenCharFlags(); |