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 (+4 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 413-418 Link Here
413
	// declared as private because some compilers would generate the default functions
416
	// declared as private because some compilers would generate the default functions
414
					FontNameBox( const FontNameBox& );
417
					FontNameBox( const FontNameBox& );
415
	FontNameBox&	operator =( const FontNameBox& );
418
	FontNameBox&	operator =( const FontNameBox& );
419
	void getExampleText(const char *localeID, String& aTestText) ;
416
};
420
};
417
421
418
// ----------------
422
// ----------------
(-)svtools/source/control/ctrlbox.cxx (+69 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 760-765 Link Here
760
                bSymbolFont = bStarSymbol = TRUE;
767
                bSymbolFont = bStarSymbol = TRUE;
761
        }
768
        }
762
769
770
	nMaxLen += 12; // Since we want to add " - ABC" or some other sample, possibly for both CTL and CJK
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
811
    	aTestText.Append( (sal_Unicode)uset_charAt(pUSet,0));
812
    	aTestText.Append( (sal_Unicode)uset_charAt(pUSet,1));
813
    	aTestText.Append( (sal_Unicode)uset_charAt(pUSet,2));
814
815
	uset_close(pUSet);
816
	ulocdata_close(uld);
817
}
818
// -------------------------------------------------------------------
793
819
794
void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
820
void FontNameBox::UserDraw( const UserDrawEvent& rUDEvt )
795
{
821
{
Lines 851-859 Link Here
851
        long nTextHeight = rUDEvt.GetDevice()->GetTextHeight();
877
        long nTextHeight = rUDEvt.GetDevice()->GetTextHeight();
852
        Point aPos( nX, aTopLeft.Y() + (nH-nTextHeight)/2 );
878
        Point aPos( nX, aTopLeft.Y() + (nH-nTextHeight)/2 );
853
879
880
	bool bShowWestern = false;
881
	bool bShowCTL = false;
882
	bool bShowCJK = false;
883
	String aWesternText, aCTLText, aCJKText;
884
    	SvtLanguageOptions aLanguageOptions;
885
886
        if ( aLanguageOptions.IsCTLFontEnabled() || aLanguageOptions.IsCJKFontEnabled())
887
	{
888
		SvtLinguConfig* pImplLinguConfig = new SvtLinguConfig();
889
		SvtLinguOptions aLinguOptions;
890
		bool bOptionRet = pImplLinguConfig->GetOptions(aLinguOptions);
891
892
		rtl::OString rLangStrWestern = MsLangId::convertLanguageToIsoByteString(aLinguOptions.nDefaultLanguage);
893
		rtl::OString rLangStrCTL = MsLangId::convertLanguageToIsoByteString(aLinguOptions.nDefaultLanguage_CTL);
894
		rtl::OString rLangStrCJK = MsLangId::convertLanguageToIsoByteString(aLinguOptions.nDefaultLanguage_CJK);
895
		
896
		getExampleText(rLangStrWestern.getStr(),aWesternText);
897
		getExampleText(rLangStrCTL.getStr(),aCTLText);
898
		getExampleText(rLangStrCJK.getStr(),aCJKText);
899
900
		bShowWestern = HasGlyphs( aFont, aWesternText ) >= aWesternText.Len();
901
		bShowCTL = HasGlyphs( aFont, aCTLText ) >= aCTLText.Len() && aLanguageOptions.IsCTLFontEnabled();
902
		bShowCJK = HasGlyphs( aFont, aCJKText ) >= aCJKText.Len() && aLanguageOptions.IsCJKFontEnabled();;
903
	}
904
854
        String aString;
905
        String aString;
855
        if( !bSymbolFont )
906
        if( !bSymbolFont )
907
	{
856
            aString = rInfo.GetName();
908
            aString = rInfo.GetName();
909
	    if (bShowWestern || bShowCTL || bShowCJK)
910
	    {
911
		    aString.AppendAscii( " - " );
912
		    if (bShowCTL && bShowCJK)
913
		    {
914
			aString += aCTLText;
915
		    	aString.AppendAscii( " - " );
916
			aString += aCJKText;
917
		    }
918
		    else if (bShowCTL)
919
			    aString += aCTLText;
920
		    else if (bShowCJK)
921
			    aString += aCJKText;
922
		    else 
923
			    aString += aWesternText;
924
	    }
925
	}
857
        else
926
        else
858
        {
927
        {
859
            // use some sample characters available in the font
928
            // use some sample characters available in the font

Return to issue 83000