diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2013-06-14 11:10:32 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2013-06-16 15:47:36 +0000 |
commit | 67aa2ec2133bb5ba681c9a9339f362a5829f903d (patch) | |
tree | 75511c27c244b06e611a46a7ea0d7db35678340a /vcl/win/source/gdi/winlayout.cxx | |
parent | 84b8e86223a3867479f8fd39ce902def59be393a (diff) |
Get rid of SalLayout::GetFallbackFontData()
This is only used in conjunction with SalLayout::GetNextGlyphs() in
vcl/source/gdi/pdfwriter_impl.cxx to retrieve the fallback font, if any,
used to layout the given glyph, but it is a very convoluted way to do a
straight forward thing, and hard to adapt for new SalLayout
implementations.
So now I just pass a fallback fonts array, when requested, in
GetNextGlyphs() itself.
Change-Id: I24e7931f64867a4fb4e7b728c65faa6198e24aba
Reviewed-on: https://gerrit.libreoffice.org/4300
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Tested-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/win/source/gdi/winlayout.cxx')
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 41271b02c954..174539c2ec99 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -154,7 +154,8 @@ public: virtual void DrawText( SalGraphics& ) const; virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int&, - sal_Int32* pGlyphAdvances, int* pCharIndexes ) const; + sal_Int32* pGlyphAdvances, int* pCharIndexes, + const PhysicalFontFace** pFallbackFonts = NULL ) const; virtual long FillDXArray( long* pDXArray ) const; virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; @@ -532,7 +533,8 @@ bool SimpleWinLayout::LayoutText( ImplLayoutArgs& rArgs ) // ----------------------------------------------------------------------- int SimpleWinLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int& nStart, - long* pGlyphAdvances, int* pCharIndexes ) const + long* pGlyphAdvances, int* pCharIndexes, + const PhysicalFontFace** /*pFallbackFonts*/ ) const { // return zero if no more glyph found if( nStart >= mnGlyphCount ) @@ -1004,7 +1006,8 @@ public: virtual void AdjustLayout( ImplLayoutArgs& ); virtual void DrawText( SalGraphics& ) const; virtual int GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int&, - sal_Int32* pGlyphAdvances, int* pCharPosAry ) const; + sal_Int32* pGlyphAdvances, int* pCharPosAry, + const PhysicalFontFace** pFallbackFonts = NULL ) const; virtual long FillDXArray( long* pDXArray ) const; virtual int GetTextBreak( long nMaxWidth, long nCharExtra, int nFactor ) const; @@ -1631,7 +1634,8 @@ bool UniscribeLayout::GetItemSubrange( const VisualItem& rVisualItem, // ----------------------------------------------------------------------- int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, - int& nStartx8, sal_Int32* pGlyphAdvances, int* pCharPosAry ) const + int& nStartx8, sal_Int32* pGlyphAdvances, int* pCharPosAry, + const PhysicalFontFace** /*pFallbackFonts*/ ) const { // HACK to allow fake-glyph insertion (e.g. for kashidas) // TODO: use iterator idiom instead of GetNextGlyphs(...) @@ -2713,7 +2717,8 @@ public: // methods using glyph indexing virtual int GetNextGlyphs(int nLen, sal_GlyphId* pGlyphIdxAry, ::Point & rPos, int&, - long* pGlyphAdvAry = 0, int* pCharPosAry = 0 ) const; + long* pGlyphAdvAry = NULL, int* pCharPosAry = NULL, + const PhysicalFontFace** pFallbackFonts = NULL ) const; // used by glyph+font+script fallback virtual void MoveGlyph( int nStart, long nNewXPos ); @@ -2858,11 +2863,12 @@ void GraphiteWinLayout::GetCaretPositions( int nArraySize, long* pCaretXArray ) } int GraphiteWinLayout::GetNextGlyphs( int length, sal_GlyphId* glyph_out, - ::Point & pos_out, int &glyph_slot, long * glyph_adv, int *char_index) const + ::Point & pos_out, int &glyph_slot, long * glyph_adv, int *char_index, + const PhysicalFontFace** pFallbackFonts ) const { maImpl.DrawBase() = WinLayout::maDrawBase; maImpl.DrawOffset() = WinLayout::maDrawOffset; - return maImpl.GetNextGlyphs(length, glyph_out, pos_out, glyph_slot, glyph_adv, char_index); + return maImpl.GetNextGlyphs(length, glyph_out, pos_out, glyph_slot, glyph_adv, char_index, pFallbackFonts); } void GraphiteWinLayout::MoveGlyph( int glyph_idx, long new_x_pos ) |