summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-06-01 22:45:55 +0200
committerMichael Stahl <Michael.Stahl@cib.de>2018-06-08 19:40:47 +0200
commitf0f506ada77930de38bec99a4dc4deb045a2450a (patch)
tree913072e92770190108293d78fbd4b890db3bc131
parentsw_redlinehide: convert spelling SwTextFrame funcs called by DoIdleJob_ (diff)
downloadcore-f0f506ada77930de38bec99a4dc4deb045a2450a.tar.gz
core-f0f506ada77930de38bec99a4dc4deb045a2450a.zip
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
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index b044a7439429..a241caf00d4e 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -1993,6 +1993,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());
@@ -2064,12 +2070,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();