diff options
author | Miklos Vajna <vmiklos@collabora.com> | 2019-03-22 17:57:46 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-03-22 18:45:43 +0100 |
commit | 8308d6a38ff283a2feebf84a95198159887cd685 (patch) | |
tree | fc47906c9c11e9bc0ad9f7e677820074ff48a7c2 /sw/source/core/txtnode/fntcache.cxx | |
parent | a05a55ddcfcb6ae18dad9ca5c5fb5ee0ab926b01 (diff) |
Related: tdf#124109 vcl: make glyph item caching work with kashida glyphs
This was broken because GenericSalLayout::LayoutText() sets the
SalLayoutFlags::KashidaJustification flag as a side-effect of building
the glyph list. So in case we cache the list and not build it, the flag
will be missing. This means that later in
GenericSalLayout::ApplyDXArray() kashida glyphs won't be inserted.
With this, the workaround in sw can be removed.
Change-Id: Ic18211bf50ca673daa238e8950a381915e4b3096
Reviewed-on: https://gerrit.libreoffice.org/69566
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source/core/txtnode/fntcache.cxx')
-rw-r--r-- | sw/source/core/txtnode/fntcache.cxx | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/sw/source/core/txtnode/fntcache.cxx b/sw/source/core/txtnode/fntcache.cxx index e749bc2bdac4..ed39672d4f5a 100644 --- a/sw/source/core/txtnode/fntcache.cxx +++ b/sw/source/core/txtnode/fntcache.cxx @@ -1492,7 +1492,6 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) long nSpaceAdd = rInf.GetSpace() / SPACING_PRECISION_FACTOR; bool bNoHalfSpace = false; - bool bCacheLayout = true; if ( rInf.GetFont() && rInf.GetLen() ) { @@ -1535,12 +1534,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) if ( pSI && pSI->CountKashida() && pSI->KashidaJustify( pKernArray.get(), pScrArray.get(), rInf.GetIdx(), rInf.GetLen(), nSpaceAdd ) != -1 ) - { nSpaceAdd = 0; - // Layout can't be reused in this case, it would lead to missing gaps in - // place of kashida. - bCacheLayout = false; - } else bNoHalfSpace = true; } @@ -1821,10 +1815,7 @@ void SwFntObj::DrawText( SwDrawTextInfo &rInf ) ? (rInf.GetIdx() ? 1 : 0) : sal_Int32(rInf.GetIdx()); aGlyphsKey = SwTextGlyphsKey{ &rInf.GetOut(), *pStr, nTmpIdx, nLen }; - if (bCacheLayout) - pGlyphs = lcl_CreateLayout(aGlyphsKey, m_aTextGlyphs[aGlyphsKey]); - else - pGlyphs = nullptr; + pGlyphs = lcl_CreateLayout(aGlyphsKey, m_aTextGlyphs[aGlyphsKey]); rInf.GetOut().DrawTextArray( aTextOriginPos, *pStr, pKernArray.get(), nTmpIdx , nLen, SalLayoutFlags::NONE, pGlyphs ); if (bBullet) |