diff options
author | Mark Hung <marklh9@gmail.com> | 2017-08-12 18:16:13 +0800 |
---|---|---|
committer | Mark Hung <marklh9@gmail.com> | 2017-10-22 07:33:48 +0200 |
commit | 2a65ad5708d1013a28fe6c250701c8f385c2083f (patch) | |
tree | 551cb48644f8c3be88ef2524aefa8f524bc59119 /sw | |
parent | db61ca5b3abbd2df433bcab516f8fa2cfbc01944 (diff) |
tdf#110994 make text-to-text alignment work in standard page mode.
Allow it to align as if there is no grid at all.
Change-Id: I784284a05c1f1323e050e74a5d574a9b11189298
Reviewed-on: https://gerrit.libreoffice.org/43005
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/itrtxt.cxx | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/sw/source/core/text/itrtxt.cxx b/sw/source/core/text/itrtxt.cxx index de2f8f6a6546..90301cac9102 100644 --- a/sw/source/core/text/itrtxt.cxx +++ b/sw/source/core/text/itrtxt.cxx @@ -226,14 +226,12 @@ sal_uInt16 SwTextCursor::AdjustBaseLine( const SwLineLayout& rLine, SwTextGridItem const*const pGrid(GetGridItem(m_pFrame->FindPageFrame())); - if ( pGrid && GetInfo().SnapToGrid() ) + if ( pGrid && GetInfo().SnapToGrid() && pGrid->IsSquaredMode() ) { const sal_uInt16 nRubyHeight = pGrid->GetRubyHeight(); const bool bRubyTop = ! pGrid->GetRubyTextBelow(); - if ( !pGrid->IsSquaredMode() ) - nOfst += ( rLine.Height() - nPorHeight ) / 2 + nPorAscent; - else if ( GetInfo().IsMulti() ) + if ( GetInfo().IsMulti() ) // we are inside the GetCharRect recursion for multi portions // we center the portion in its surrounding line nOfst = ( m_pCurr->Height() - nPorHeight ) / 2 + nPorAscent; |