summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2010-09-24 12:44:15 +0200
committerKurt Zenker <kz@openoffice.org>2010-09-24 12:44:15 +0200
commit7769d917d89bdf28007261f1a628d275df4c1f61 (patch)
tree61b7ad4db203dc021c7e23427b920de07b0edbbc
parentbdab146f1c8d8a873fdddff203a6b2ef29022eaf (diff)
parent6dbee27b977b6cc7a208ca5fa6a3c88eba5d9b22 (diff)
CWS-TOOLING: integrate CWS tl85
-rw-r--r--vcl/unx/source/gdi/pspgraphics.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/vcl/unx/source/gdi/pspgraphics.cxx b/vcl/unx/source/gdi/pspgraphics.cxx
index d3eb103b9dd6..feffdc1adbb6 100644
--- a/vcl/unx/source/gdi/pspgraphics.cxx
+++ b/vcl/unx/source/gdi/pspgraphics.cxx
@@ -694,7 +694,7 @@ void PspServerFontLayout::InitFont() const
static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx, bool bIsPspServerFontLayout )
{
const int nMaxGlyphs = 200;
- sal_GlyphId aGlyphAry[ nMaxGlyphs ];
+ sal_uInt32 aGlyphAry[ nMaxGlyphs ]; // TODO: use sal_GlyphId
sal_Int32 aWidthAry[ nMaxGlyphs ];
sal_Int32 aIdxAry [ nMaxGlyphs ];
sal_Unicode aUnicodes[ nMaxGlyphs ];
@@ -720,15 +720,20 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
#ifdef ENABLE_GRAPHITE
else if (pGrLayout)
{
+ #if 0 // HACK: disabled for now due to #i114460#, see #desc12 there
+ // TODO: get rid of glyph->string mapping altogether for printing
+ // TODO: fix GraphiteServerFontLayout's returned aCharPosAry
+ // TODO: fix PrinterGfx's caching?
pText = pGrLayout->getTextPtr();
nMinCharPos = pGrLayout->getMinCharPos();
nMaxCharPos = pGrLayout->getMaxCharPos();
+ #endif
}
#endif
}
for( int nStart = 0;; )
{
- int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, bIsPspServerFontLayout ? aCharPosAry : NULL );
+ int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, pText ? aCharPosAry : NULL );
if( !nGlyphCount )
break;
@@ -738,7 +743,7 @@ static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
nXOffset += aWidthAry[ i ];
aIdxAry[ i ] = nXOffset / nUnitsPerPixel;
sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK);
- if( bIsPspServerFontLayout )
+ if( pText )
aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0;
else
aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0;