View | Details | Raw Unified | Return to issue 18818
Collapse All | Expand All

(-)oo_1.1rc3_src/vcl/unx/source/gdi/xfont.cxx.vcl-fix-HasUnicodeChar (-2 / +8 lines)
Lines 591-605 ExtendedFontStruct::GetCharWidth( sal_Un Link Here
591
bool ExtendedFontStruct::HasUnicodeChar( sal_Unicode cChar ) const
591
bool ExtendedFontStruct::HasUnicodeChar( sal_Unicode cChar ) const
592
{
592
{
593
    // init unicode range cache if needed
593
    // init unicode range cache if needed
594
    if( mnRangeCount < 0 )
594
    if( mnRangeCount <= 0 )
595
    {
595
    {
596
#if 0
597
        // Optimize mnRangeCount == 0 case if there is no encoding
598
        if (mnRangeCount == 0 && mpXlfd->NumEncodings() == 0)
599
            return false;
600
#endif
596
        mnRangeCount = mpXlfd->GetFontCodeRanges( NULL );
601
        mnRangeCount = mpXlfd->GetFontCodeRanges( NULL );
597
        if( !mnRangeCount )
602
        if( !mnRangeCount )
598
            return NULL;
603
            return false;
599
        mpRangeCodes = new sal_uInt32[ 2*mnRangeCount ];
604
        mpRangeCodes = new sal_uInt32[ 2*mnRangeCount ];
600
        mpXlfd->GetFontCodeRanges( mpRangeCodes );
605
        mpXlfd->GetFontCodeRanges( mpRangeCodes );
601
        // TODO: make sure everything is sorted
606
        // TODO: make sure everything is sorted
602
    }
607
    }
608
    DBG_ASSERT( mpRangeCodes, "ExtendedFontStruct::HasUnicodeChar() - NULL mpRangeCodes" );
603
609
604
    // binary search in unicode ranges
610
    // binary search in unicode ranges
605
    int nLower = 0;
611
    int nLower = 0;

Return to issue 18818