summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@collabora.com>2015-12-01 15:13:17 +0200
committerTor Lillqvist <tml@collabora.com>2015-12-01 15:18:49 +0200
commit93e20c7fd94cf447572e6a9c95bbad788bf92a1f (patch)
treec4877b4e11a91dd7f18cd8693a6e621fab75e7a1
parent04e67d89dfcab58fd885b4c4444cf2875dee8044 (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: I325d6e9f75a3bc51f24add33dd3bffe7b3c7bee0 (cherry picked from commit 7ac763db694a956cb1e4f82477a7f9fe993f1f1a)
-rw-r--r--vcl/win/source/gdi/winlayout.cxx5
-rw-r--r--vcl/win/source/gdi/winlayout.hxx1
2 files changed, 6 insertions, 0 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx
index 7339fb7ccc67..6e2810e22c2e 100644
--- a/vcl/win/source/gdi/winlayout.cxx
+++ b/vcl/win/source/gdi/winlayout.cxx
@@ -824,6 +824,8 @@ OUString VisAttrArrayToString(SCRIPT_VISATTR *pVisAttrs, int n)
bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs )
{
+ msTheString = rArgs.mrStr;
+
// 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;
@@ -1524,6 +1526,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 664915be8d95..545d26735907 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