Duplicate code: GlyphSet::DrawGlyphs() and GlyphSet::ImplDrawText()

Chr. Rossmanith ChrRossmanith at gmx.de
Mon Feb 27 00:49:34 PST 2012


Hi,

the method GlyphSet::DrawGlyphs() is nearly a total subset of 
GlyphSet::ImplDrawText(). The only difference is the declaration of

OString aGlyphSetName(GetGlyphSetName(*aSet)); <-- DrawGlyphs()
vs.
OString aGlyphSetName(GetCharSetName(*aSet)); <-- ImplDrawText()

DrawGlyphs() is only rarely used. I'd suggest to add a parameter 
bUseGlyphSet to switch between the declarations of aGlyphSetName and 
replace the duplicate code in ImplDrawText() with a call to DrawGlyphs().

Or are there reasons for not adding an additional parameter to 
DrawGlyphs() ?

You find the source code in vcl/generic/print/glyphset.cxx.

Christina


More information about the LibreOffice mailing list