summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <Michael.Stahl@cib.de>2020-02-18 18:35:05 +0100
committerMichael Stahl <michael.stahl@cib.de>2020-02-19 16:49:06 +0100
commita26c4dbd9ca17578fd5c165bd89b618751fabb3c (patch)
treecdaee8ee1bccb83879cf602cdc980eda03433810
parent509a02aa96f6d7620cb0bf06c20b3bfa0641be92 (diff)
sw: replace confusing nVirtPageNum that is actually physical page
... in SwExtraPainter::SwExtraPainter(). Change-Id: Iac8a849b5fab25c80e81c61b267100a3fc3e2d26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88979 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
-rw-r--r--sw/source/core/text/frmpaint.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index ea617b08bf51..2f25dfed2b44 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -112,7 +112,7 @@ SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh,
if( m_aRect.Bottom() > nBottom )
m_aRect.Bottom( nBottom );
}
- int nVirtPageNum = 0;
+ bool isRightPage(false);
if( bLineNum )
{
/* Initializes the Members necessary for line numbering:
@@ -138,13 +138,13 @@ SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh,
{
if( pFrame->FindPageFrame()->OnRightPage() )
{
- nVirtPageNum = 1;
+ isRightPage = true;
ePos = ePos == LINENUMBER_POS_INSIDE ?
LINENUMBER_POS_LEFT : LINENUMBER_POS_RIGHT;
}
else
{
- nVirtPageNum = 2;
+ isRightPage = false;
ePos = ePos == LINENUMBER_POS_OUTSIDE ?
LINENUMBER_POS_LEFT : LINENUMBER_POS_RIGHT;
}
@@ -164,9 +164,9 @@ SwExtraPainter::SwExtraPainter( const SwTextFrame *pFrame, SwViewShell *pVwSh,
{
if( text::HoriOrientation::INSIDE == eHor || text::HoriOrientation::OUTSIDE == eHor )
{
- if( !nVirtPageNum )
- nVirtPageNum = pFrame->FindPageFrame()->OnRightPage() ? 1 : 2;
- if( nVirtPageNum % 2 )
+ if (!isRightPage)
+ isRightPage = pFrame->FindPageFrame()->OnRightPage();
+ if (isRightPage)
eHor = eHor == text::HoriOrientation::INSIDE ? text::HoriOrientation::LEFT : text::HoriOrientation::RIGHT;
else
eHor = eHor == text::HoriOrientation::OUTSIDE ? text::HoriOrientation::LEFT : text::HoriOrientation::RIGHT;