diff options
author | Tor Lillqvist <tml@collabora.com> | 2015-12-01 15:13:17 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2015-12-16 20:27:51 +0000 |
commit | f295adc5e5cc11134883a6d7dd50c1c8322c8139 (patch) | |
tree | 36ab23ddb66aeeaa55d947cc01bb1b64f5ffbe65 | |
parent | 80acb57d5c60abd3a07b2674d1c30f926d311513 (diff) |
tdf#95194: We need to set the GF flags in UniscribeLayout::GetNextGlyphs()
The old SimpleWinLayout::GetNextGlyphs() did it.
PDFWriterImpl::drawVerticalGlyphs() expects GF_ROTL etc to be set when
necessary for vertical text when exporting to PDF.
Change-Id: I1971dd2784efa3cd7274a32a51f61fdf197ec81a
Reviewed-on: https://gerrit.libreoffice.org/20329
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 5 | ||||
-rw-r--r-- | vcl/win/source/gdi/winlayout.hxx | 1 |
2 files changed, 6 insertions, 0 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 3f5a78c0f61c..d1515a1f1275 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -700,6 +700,8 @@ UniscribeLayout::~UniscribeLayout() bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs ) { + msTheString = OUString(rArgs.mpStr, rArgs.mnLength); + // for a base layout only the context glyphs have to be dropped // => when the whole string is involved there is no extra context typedef std::vector<int> TIntVector; @@ -1401,6 +1403,9 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, } // update return values + if( (mnLayoutFlags & SalLayoutFlags::Vertical) && + nCharPos != -1 ) + aGlyphId |= GetVerticalFlags( msTheString[nCharPos] ); *(pGlyphs++) = aGlyphId; if( pGlyphAdvances ) *(pGlyphAdvances++) = nGlyphWidth; diff --git a/vcl/win/source/gdi/winlayout.hxx b/vcl/win/source/gdi/winlayout.hxx index d558d4cc6bc2..87c9f0107e4f 100644 --- a/vcl/win/source/gdi/winlayout.hxx +++ b/vcl/win/source/gdi/winlayout.hxx @@ -110,6 +110,7 @@ private: // string specific info // everything is in logical order + OUString msTheString; // Sadly we need it in GetNextGlyphs(), to be able to call GetVerticalFlags() int mnCharCapacity; WORD* mpLogClusters; // map from absolute_char_pos to relative_glyph_pos int* mpCharWidths; // map from absolute_char_pos to char_width |