[Libreoffice-commits] core.git: vcl/source
Mark Hung (via logerrit)
logerrit at kemper.freedesktop.org
Fri May 28 05:04:32 UTC 2021
vcl/source/gdi/sallayout.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 8a65d3e9ceb268f785c5b2b77e126bd62af567a3
Author: Mark Hung <marklh9 at gmail.com>
AuthorDate: Thu May 13 23:57:31 2021 +0800
Commit: Mark Hung <marklh9 at gmail.com>
CommitDate: Fri May 28 07:03:53 2021 +0200
vcl: handle fallback glyph offset for vertical writing.
When GenericSalLayout::MoveGlyph() is called from
MultiSalLayout::AdjustLayout(), new position is calculatd
by adding glyph advances ( i.e. glyph items' m_nNewWidth ).
To move the glyph, the moving offset should be calculated
based on the corresponding position, i.e. m_nXOffset v.s.
m_LinearPos.X().
Change-Id: I912d499f49f69f68d8388bc8677e6b47bfb6f066
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115926
Tested-by: Jenkins
Reviewed-by: Mark Hung <marklh9 at gmail.com>
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index cde5cac31730..9f4757148b36 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -949,7 +949,7 @@ void GenericSalLayout::MoveGlyph( int nStart, tools::Long nNewXPos )
if( pGlyphIter->IsRTLGlyph() )
nNewXPos += pGlyphIter->m_nNewWidth - pGlyphIter->origWidth();
// calculate the x-offset to the old position
- tools::Long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.getX();
+ tools::Long nXDelta = nNewXPos - pGlyphIter->m_aLinearPos.getX() + pGlyphIter->xOffset();
// adjust all following glyph positions if needed
if( nXDelta != 0 )
{
More information about the Libreoffice-commits
mailing list