summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2018-11-21 14:06:40 +0100
committerMichael Stahl <Michael.Stahl@cib.de>2018-12-07 10:32:30 +0100
commit154bec102a4c25d8b3168120eee513b265ef132d (patch)
tree707da5f2191cfd874614c1f2019c2e3bd9d054e8
parent1f1aebabaa97951aae38de51e8abf5f6aab9c944 (diff)
sw_redlinehide_4a: SwEditShell::GetLineCount()
Change-Id: Ib9a13eab25b02b919d472ae864213b110e7794c7 (cherry picked from commit a4165e1b08c82b667b209ee38b4d2a2c534c1def)
-rw-r--r--sw/source/core/edit/editsh.cxx10
1 files changed, 9 insertions, 1 deletions
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index be3f6fee007e..27bc3125e79e 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -856,7 +856,15 @@ sal_uInt16 SwEditShell::GetLineCount()
{
if( nullptr != ( pContentFrame = pCNd->getLayoutFrame( GetLayout() ) ) && pContentFrame->IsTextFrame() )
{
- nRet = nRet + static_cast<SwTextFrame*>(pContentFrame)->GetLineCount(TextFrameIndex(COMPLETE_STRING));
+ SwTextFrame *const pFrame(static_cast<SwTextFrame*>(pContentFrame));
+ nRet = nRet + pFrame->GetLineCount(TextFrameIndex(COMPLETE_STRING));
+ if (GetLayout()->IsHideRedlines())
+ {
+ if (auto const*const pMerged = pFrame->GetMergedPara())
+ {
+ aStart = *pMerged->pLastNode;
+ }
+ }
}
}
return nRet;