[Libreoffice-commits] core.git: sw/source

Mark Hung marklh9 at gmail.com
Sun Oct 22 05:34:09 UTC 2017


 sw/source/core/text/itrtxt.cxx |    6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 2a65ad5708d1013a28fe6c250701c8f385c2083f
Author: Mark Hung <marklh9 at gmail.com>
Date:   Sat Aug 12 18:16:13 2017 +0800

    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 at libreoffice.org>
    Reviewed-by: Mark Hung <marklh9 at gmail.com>

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;


More information about the Libreoffice-commits mailing list