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

(-)svtools/util/makefile.mk (+3 lines)
Lines 158-163 Link Here
158
		$(ICUUCLIB)		\
158
		$(ICUUCLIB)		\
159
		$(JVMFWKLIB)
159
		$(JVMFWKLIB)
160
160
161
SHL1STDLIBS+=\
162
    $(ICUINLIB)	
163
161
.IF "$(OS)"=="MACOSX"
164
.IF "$(OS)"=="MACOSX"
162
# static libraries go at end
165
# static libraries go at end
163
SHL1STDLIBS+= $(JPEG3RDLIB)
166
SHL1STDLIBS+= $(JPEG3RDLIB)
(-)svtools/inc/ctrlbox.hxx (+5 lines)
Lines 59-64 Link Here
59
#include <vcl/field.hxx>
59
#include <vcl/field.hxx>
60
#endif
60
#endif
61
61
62
#include <external/unicode/ulocdata.h>
63
#include <external/unicode/uset.h>
64
62
class ImplFontList;
65
class ImplFontList;
63
class ImpColorList;
66
class ImpColorList;
64
class ImpLineList;
67
class ImpLineList;
Lines 224-229 Link Here
224
227
225
	void			SetEntryData( USHORT nPos, void* pNewData );
228
	void			SetEntryData( USHORT nPos, void* pNewData );
226
	void*			GetEntryData( USHORT nPos ) const;
229
	void*			GetEntryData( USHORT nPos ) const;
230
227
};
231
};
228
232
229
inline void ColorListBox::SelectEntry( const Color& rColor, BOOL bSelect )
233
inline void ColorListBox::SelectEntry( const Color& rColor, BOOL bSelect )
Lines 413-418 Link Here
413
	// declared as private because some compilers would generate the default functions
417
	// declared as private because some compilers would generate the default functions
414
					FontNameBox( const FontNameBox& );
418
					FontNameBox( const FontNameBox& );
415
	FontNameBox&	operator =( const FontNameBox& );
419
	FontNameBox&	operator =( const FontNameBox& );
420
	void getExampleText(const char *localeID, String& aTestText) ;
416
};
421
};
417
422
418
// ----------------
423
// ----------------
(-)svtools/source/control/ctrlbox.cxx (-1 / +64 lines)
Lines 61-66 Link Here
61
61
62
#include <vcl/i18nhelp.hxx>
62
#include <vcl/i18nhelp.hxx>
63
63
64
#include <svtools/lingucfg.hxx>
65
#include <i18npool/mslangid.hxx>
66
67
#ifndef _SVTOOLS_LANGUAGEOPTIONS_HXX
68
#include <svtools/languageoptions.hxx>
69
#endif
70
64
#define IMGTEXTSPACE    2
71
#define IMGTEXTSPACE    2
65
#define EXTRAFONTSIZE   5
72
#define EXTRAFONTSIZE   5
66
73
Lines 759-765 Link Here
759
            ||  aFontName.EqualsIgnoreCaseAscii( "opensymbol" ) )
766
            ||  aFontName.EqualsIgnoreCaseAscii( "opensymbol" ) )
760
                bSymbolFont = bStarSymbol = TRUE;
767
                bSymbolFont = bStarSymbol = TRUE;
761
        }
768
        }
762
769
		
770
	nMaxLen += 6; // Since we want to add " - ABC" or some other sample
763
        // guess maximimum width
771
        // guess maximimum width
764
        Size aOneCharSz( GetTextWidth( String( 'X' ) ), GetTextHeight() );
772
        Size aOneCharSz( GetTextWidth( String( 'X' ) ), GetTextHeight() );
765
        Size aSz( aOneCharSz );
773
        Size aSz( aOneCharSz );
Lines 790-795 Link Here
790
}
798
}
791
799
792
// -------------------------------------------------------------------
800
// -------------------------------------------------------------------
801
void FontNameBox::getExampleText(const char *localeID, String& aTestText) 
802
{
803
	UErrorCode   status  = U_ZERO_ERROR;
804
	ULocaleData *    uld = ulocdata_open(localeID, &status);
805
	if (U_FAILURE(status))
806
		return;
807
	uint32_t  options = USET_CASE_INSENSITIVE;
808
	ULocaleDataExemplarSetType  extype = ULOCDATA_ES_STANDARD,;
809
	USet* pUSet = ulocdata_getExemplarSet (uld, 0, options, extype, &status ) ;
810
	UChar32 char1 = uset_charAt(pUSet,0);
811
	UChar32 char2 = uset_charAt(pUSet,1);
812
	UChar32 char3 = uset_charAt(pUSet,2);
813
814
    	aTestText.Append( (sal_Unicode)char1);
815
    	aTestText.Append( (sal_Unicode)char2);
816
    	aTestText.Append( (sal_Unicode)char3);
817
818
	uset_close(pUSet);
819
	ulocdata_close(uld);
820
}
821
// -------------------------------------------------------------------
793
822
794
void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
823
void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
795
{
824
{
Lines 851-859 Link Here
851
        long nTextHeight = rUDEvt.GetDevice()->GetTextHeight();
880
        long nTextHeight = rUDEvt.GetDevice()->GetTextHeight();
852
        Point aPos( nX, aTopLeft.Y() + (nH-nTextHeight)/2 );
881
        Point aPos( nX, aTopLeft.Y() + (nH-nTextHeight)/2 );
853
882
883
	bool bHasCTL = false;
884
	bool bHasWestern = false;
885
	String aCTLText, aWesternText;
886
    	SvtLanguageOptions aLanguageOptions;
887
888
        if ( aLanguageOptions.IsCTLFontEnabled() )
889
	{
890
		SvtLinguConfig* pImplLinguConfig = new SvtLinguConfig();
891
		SvtLinguOptions aLinguOptions;
892
		bool bOptionRet = pImplLinguConfig->GetOptions(aLinguOptions);
893
894
		INT16 nDefaultWestern = aLinguOptions.nDefaultLanguage;
895
		INT16 nDefaultCTL = aLinguOptions.nDefaultLanguage_CTL;
896
897
		rtl::OString rLangStr = MsLangId::convertLanguageToIsoByteString(nDefaultWestern);
898
		rtl::OString rLangStrCTL = MsLangId::convertLanguageToIsoByteString(nDefaultCTL);
899
		
900
		getExampleText(rLangStr.getStr(),aWesternText);
901
		getExampleText(rLangStrCTL.getStr(),aCTLText);
902
903
		bHasCTL = HasGlyphs( aFont, aCTLText ) >= aCTLText.Len();
904
		bHasWestern = HasGlyphs( aFont, aWesternText ) >= aWesternText.Len();
905
	}
906
854
        String aString;
907
        String aString;
855
        if( !bSymbolFont )
908
        if( !bSymbolFont )
909
	{
856
            aString = rInfo.GetName();
910
            aString = rInfo.GetName();
911
	    if (bHasCTL || bHasWestern)
912
	    {
913
		    aString.AppendAscii( " - " );
914
		    if (bHasCTL)
915
			    aString += aCTLText;
916
		    else 
917
			    aString += aWesternText;
918
	    }
919
	}
857
        else
920
        else
858
        {
921
        {
859
            // use some sample characters available in the font
922
            // use some sample characters available in the font

Return to issue 83000