diff options
author | Michael Stahl <Michael.Stahl@cib.de> | 2018-05-24 15:59:10 +0200 |
---|---|---|
committer | Thorsten Behrens <Thorsten.Behrens@CIB.de> | 2018-06-14 16:18:59 +0200 |
commit | 22b34bda2193464f766c2d9b3e51f7d558aa43a1 (patch) | |
tree | aef8f9ee7ad12ccc10ccb8a4757326ccfe9ebf15 /sw/source/core/edit | |
parent | 22bc2db963e510c2e5fb8c131f40de4ccd80f5ce (diff) |
sw_redlinehide: SwScriptInfo::GetScriptInfo() should return frame too
The SwScriptInfo comes from the frame, and if both are used together
they have to match.
Change-Id: I3de0754d9ff316180fc04708889886684d6868e5
Diffstat (limited to 'sw/source/core/edit')
-rw-r--r-- | sw/source/core/edit/editsh.cxx | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx index b5f8dbc1cee8..d04548b7eb23 100644 --- a/sw/source/core/edit/editsh.cxx +++ b/sw/source/core/edit/editsh.cxx @@ -129,14 +129,16 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) if ( nPrevPos ) --nPrevPos; - SwScriptInfo* pSI = SwScriptInfo::GetScriptInfo( static_cast<SwTextNode&>(rNode), true ); + SwTextFrame const* pFrame; + SwScriptInfo *const pSI = SwScriptInfo::GetScriptInfo( + static_cast<SwTextNode&>(rNode), &pFrame, true); sal_uInt8 nLevel = 0; if ( ! pSI ) { // seems to be an empty paragraph. Point aPt; // why ??? - SwTextFrame *const pFrame = static_cast<SwTextFrame*>( + pFrame = static_cast<SwTextFrame*>( static_cast<SwTextNode&>(rNode).getLayoutFrame( GetLayout(), &aPt, pTmpCursor->GetPoint(), false)); @@ -149,10 +151,6 @@ void SwEditShell::Insert2(const OUString &rStr, const bool bForceExpandHints ) { if (TextFrameIndex(COMPLETE_STRING) != pSI->GetInvalidityA()) { - // note: if pSI was found, there must be a frame - SwTextFrame *const pFrame = static_cast<SwTextFrame*>( - static_cast<SwTextNode&>(rNode).getLayoutFrame( - GetLayout(), nullptr, pTmpCursor->GetPoint(), false)); // mystery why this doesn't use the other overload? pSI->InitScriptInfo(static_cast<SwTextNode&>(rNode), pFrame->GetMergedPara()); } |