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

(-)sc/source/filter/excel/xistyle.cxx (-2 / +12 lines)
Lines 256-264 Link Here
256
        rtl_TextEncoding eFontEnc = maData.GetFontEncoding();
256
        rtl_TextEncoding eFontEnc = maData.GetFontEncoding();
257
        rtl_TextEncoding eTempTextEnc = (bEE && (eFontEnc == GetTextEncoding())) ?
257
        rtl_TextEncoding eTempTextEnc = (bEE && (eFontEnc == GetTextEncoding())) ?
258
            ScfTools::GetSystemTextEncoding() : eFontEnc;
258
            ScfTools::GetSystemTextEncoding() : eFontEnc;
259
		
260
		//add corresponding pitch for FontFamily
261
		FontPitch ePitch = PITCH_DONTKNOW;
262
		FontFamily eFtFamily = maData.GetScFamily( GetTextEncoding() ); 
263
		switch( eFtFamily ) //refer http://msdn.microsoft.com/en-us/library/aa246306(v=VS.60).aspx
264
		{
265
			case FAMILY_ROMAN:				ePitch = PITCH_VARIABLE;		break;
266
			case FAMILY_SWISS:				ePitch = PITCH_VARIABLE;		break;
267
			case FAMILY_MODERN:				ePitch = PITCH_FIXED;			break;
268
			default:						break;
269
		 } 
270
        SvxFontItem aFontItem( eFtFamily , maData.maName, EMPTY_STRING, ePitch, eTempTextEnc, ATTR_FONT );
259
271
260
        SvxFontItem aFontItem( maData.GetScFamily( GetTextEncoding() ), maData.maName, EMPTY_STRING,
261
                PITCH_DONTKNOW, eTempTextEnc, ATTR_FONT );
262
        // #91658# set only for valid script types
272
        // #91658# set only for valid script types
263
        if( mbHasWstrn )
273
        if( mbHasWstrn )
264
            PUTITEM( aFontItem, ATTR_FONT,      EE_CHAR_FONTINFO );
274
            PUTITEM( aFontItem, ATTR_FONT,      EE_CHAR_FONTINFO );

Return to issue 121215