sw/source/core/layout/trvlfrm.cxx | 3 +-- sw/source/core/text/itrcrsr.cxx | 2 +- sw/source/core/text/itrpaint.cxx | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-)
New commits: commit b63dcee30b7b7138f135fffd5abb6d9fa16d4f28 Author: Mark Hung <mark...@gmail.com> Date: Sat Aug 8 00:18:20 2015 +0800 Fix tdf#82176 CJK: Cursor position, line selection and non-printing characters do not take account of hanging punctuation. Note that placing a cursor next to the hanging puncuation is still not possible, but the selection and the non-printing characters works fine now. Change-Id: I22c8c2c5044b46c325236caffec67d9f68c23eed Reviewed-on: https://gerrit.libreoffice.org/17591 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Norbert Thiebaud <nthieb...@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/19031 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx index bbb4e16..65aa24f 100644 --- a/sw/source/core/layout/trvlfrm.cxx +++ b/sw/source/core/layout/trvlfrm.cxx @@ -2429,8 +2429,7 @@ void SwRootFrm::CalcFrmRects(SwShellCrsr &rCrsr) { lLeft = (pStartFrm->Frm().*fnRect->fnGetLeft)() + (pStartFrm->Prt().*fnRect->fnGetLeft)(); - lRight = (pStartFrm->Frm().*fnRect->fnGetLeft)() + - (pStartFrm->Prt().*fnRect->fnGetRight)(); + lRight = (aEndFrm.*fnRect->fnGetRight)(); } if( lLeft < (aStFrm.*fnRect->fnGetLeft)() ) lLeft = (aStFrm.*fnRect->fnGetLeft)(); diff --git a/sw/source/core/text/itrcrsr.cxx b/sw/source/core/text/itrcrsr.cxx index d8ea12b..65e4689 100644 --- a/sw/source/core/text/itrcrsr.cxx +++ b/sw/source/core/text/itrcrsr.cxx @@ -1265,7 +1265,7 @@ sal_Int32 SwTextCursor::GetCrsrOfst( SwPosition *pPos, const Point &rPoint, // x is the horizontal offset within the line. SwTwips x = rPoint.X(); const SwTwips nLeftMargin = GetLineStart(); - SwTwips nRightMargin = GetLineEnd(); + SwTwips nRightMargin = GetLineEnd() + GetCurr()->GetHangingMargin(); if( nRightMargin == nLeftMargin ) nRightMargin += 30; diff --git a/sw/source/core/text/itrpaint.cxx b/sw/source/core/text/itrpaint.cxx index 4608248..fa9716e 100644 --- a/sw/source/core/text/itrpaint.cxx +++ b/sw/source/core/text/itrpaint.cxx @@ -423,7 +423,7 @@ void SwTextPainter::DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip, if ( bAdjustBaseLine ) GetInfo().Y( GetInfo().GetPos().Y() + AdjustBaseLine( *pCurr, &aEnd ) ); - + GetInfo().X( GetInfo().X() + GetCurr()->GetHangingMargin() ); aEnd.Paint( GetInfo() ); GetInfo().Y( nOldY ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits