Lines 698-734
static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
Link Here
|
698 |
sal_Int32 aWidthAry[ nMaxGlyphs ]; |
698 |
sal_Int32 aWidthAry[ nMaxGlyphs ]; |
699 |
sal_Int32 aIdxAry [ nMaxGlyphs ]; |
699 |
sal_Int32 aIdxAry [ nMaxGlyphs ]; |
700 |
sal_Unicode aUnicodes[ nMaxGlyphs ]; |
700 |
sal_Unicode aUnicodes[ nMaxGlyphs ]; |
701 |
int aCharPosAry [ nMaxGlyphs ]; |
|
|
702 |
|
701 |
|
703 |
Point aPos; |
702 |
Point aPos; |
704 |
long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); |
703 |
long nUnitsPerPixel = rLayout.GetUnitsPerPixel(); |
705 |
const sal_Unicode* pText = NULL; |
|
|
706 |
int nMinCharPos = 0; |
707 |
int nMaxCharPos = 0; |
708 |
if (bIsPspServerFontLayout) |
709 |
{ |
710 |
const PspServerFontLayout * pPspLayout = dynamic_cast<const PspServerFontLayout*>(&rLayout); |
711 |
#ifdef ENABLE_GRAPHITE |
712 |
const GraphiteServerFontLayout * pGrLayout = dynamic_cast<const GraphiteServerFontLayout*>(&rLayout); |
713 |
#endif |
714 |
if (pPspLayout) |
715 |
{ |
716 |
pText = pPspLayout->getTextPtr(); |
717 |
nMinCharPos = pPspLayout->getMinCharPos(); |
718 |
nMaxCharPos = pPspLayout->getMaxCharPos(); |
719 |
} |
720 |
#ifdef ENABLE_GRAPHITE |
721 |
else if (pGrLayout) |
722 |
{ |
723 |
pText = pGrLayout->getTextPtr(); |
724 |
nMinCharPos = pGrLayout->getMinCharPos(); |
725 |
nMaxCharPos = pGrLayout->getMaxCharPos(); |
726 |
} |
727 |
#endif |
728 |
} |
729 |
for( int nStart = 0;; ) |
704 |
for( int nStart = 0;; ) |
730 |
{ |
705 |
{ |
731 |
int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry, bIsPspServerFontLayout ? aCharPosAry : NULL ); |
706 |
int nGlyphCount = rLayout.GetNextGlyphs( nMaxGlyphs, aGlyphAry, aPos, nStart, aWidthAry ); |
732 |
if( !nGlyphCount ) |
707 |
if( !nGlyphCount ) |
733 |
break; |
708 |
break; |
734 |
|
709 |
|
Lines 739-745
static void DrawPrinterLayout( const SalLayout& rLayout, ::psp::PrinterGfx& rGfx
Link Here
|
739 |
aIdxAry[ i ] = nXOffset / nUnitsPerPixel; |
714 |
aIdxAry[ i ] = nXOffset / nUnitsPerPixel; |
740 |
sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); |
715 |
sal_Int32 nGlyphIdx = aGlyphAry[i] & (GF_IDXMASK | GF_ROTMASK); |
741 |
if( bIsPspServerFontLayout ) |
716 |
if( bIsPspServerFontLayout ) |
742 |
aUnicodes[i] = (aCharPosAry[i] >= nMinCharPos && aCharPosAry[i] <= nMaxCharPos) ? pText[ aCharPosAry[i] ] : 0; |
717 |
aUnicodes[i] = 0; |
743 |
else |
718 |
else |
744 |
aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0; |
719 |
aUnicodes[i] = (aGlyphAry[i] & GF_ISCHAR) ? nGlyphIdx : 0; |
745 |
aGlyphAry[i] = nGlyphIdx; |
720 |
aGlyphAry[i] = nGlyphIdx; |