diff -urN ooo_1.1.0_src.orig/sc/source/ui/docshell/docsh.cxx ooo_1.1.0_src/sc/source/ui/docshell/docsh.cxx --- ooo_1.1.0_src.orig/sc/source/ui/docshell/docsh.cxx Sun Oct 19 11:50:01 2003 +++ ooo_1.1.0_src/sc/source/ui/docshell/docsh.cxx Sun Oct 19 11:55:56 2003 @@ -166,6 +166,10 @@ #include #endif +#ifndef _PVER_HXX +#include // GetLongLanguage +#endif + // STATIC DATA ----------------------------------------------------------- // Stream-Namen im Storage @@ -1856,7 +1860,12 @@ } BOOL bFake97 = ( aFltName.EqualsAscii(pFilterExcel97) || aFltName.EqualsAscii(pFilterEx97Temp) ); - FltError eError = ScExportExcel5( rMed, &aDocument, bFake97, RTL_TEXTENCODING_MS_1252 ); + FltError eError; + // PJ: This is for export to old Excel (5 or 95) + if (ProductVersion::GetLongLanguage().ToInt32() == 0x405 || ProductVersion::GetLongLanguage().ToInt32() == 0x41b) + eError = ScExportExcel5( rMed, &aDocument, bFake97, RTL_TEXTENCODING_MS_1250 ); + else + eError = ScExportExcel5( rMed, &aDocument, bFake97, RTL_TEXTENCODING_MS_1252 ); if (eError && !GetError()) SetError(eError); --- ooo_1.1.0_src.orig/sc/source/filter/excel/impop.cxx Sun Oct 19 14:14:23 2003 +++ ooo_1.1.0_src/sc/source/filter/excel/impop.cxx Sun Oct 19 14:20:35 2003 @@ -131,6 +131,10 @@ #include "excimp8.hxx" #include "excform.hxx" +#ifndef _PVER_HXX +#include // GetLongLanguage +#endif + using namespace ::com::sun::star; @@ -980,8 +984,20 @@ void ImportExcel::Codepage( void ) { rtl_TextEncoding eEnc = XclTools::GetTextEncoding( maStrm.ReaduInt16() ); - if( eEnc != RTL_TEXTENCODING_DONTKNOW ) - SetCharSet( eEnc ); + + // PJ: For Czech and Slovak version, use 1250 instead of provided charset + if (ProductVersion::GetLongLanguage().ToInt32() == 0x405 || ProductVersion::GetLongLanguage().ToInt32() == 0x41b) + { + if( eEnc != RTL_TEXTENCODING_DONTKNOW && eEnc != RTL_TEXTENCODING_MS_1252 ) + SetCharSet( eEnc ); + else + SetCharSet( RTL_TEXTENCODING_MS_1250 ); + } + else + { + if( eEnc != RTL_TEXTENCODING_DONTKNOW ) + SetCharSet( eEnc ); + } }