--- sw/source/filter/ww1/w1class.cxx +++ sw/source/filter/ww1/w1class.cxx @@ -47,6 +47,9 @@ #include #endif +#ifndef _SV_SVAPP_HXX +#include +#endif #ifdef DUMP static const sal_Char* pUnknown = "?"; @@ -84,7 +87,7 @@ sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset ) if( rFib.GetStream().Seek( ulFilePos + ulOffset ) == ulFilePos+ulOffset && rFib.GetStream().Read( &cRead, sizeof( cRead ) ) == sizeof( cRead ) ) { - cRet = ByteString::ConvertToUnicode( cRead, RTL_TEXTENCODING_MS_1252 ); + cRet = ByteString::ConvertToUnicode( cRead, Application::GetSettings().GetDefaultTextEncoding()); } else cRet = ' '; @@ -98,7 +101,7 @@ String Ww1PlainText::GetText( ULONG ulOffset, ULONG nLen ) const DBG_ASSERT(ulOffset+nLen(nLen) ), nLen ) == nLen ) - sRet = String( aStr, RTL_TEXTENCODING_MS_1252 ); + sRet = String( aStr, Application::GetSettings().GetDefaultTextEncoding() ); return sRet; } @@ -176,11 +179,11 @@ USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc ) pStr = "?"; else pStr = names[nSize-222]; - SetName(String(pStr, RTL_TEXTENCODING_MS_1252)); + SetName(String(pStr, Application::GetSettings().GetDefaultTextEncoding())); } else if( 255 > nCountBytes ) // unused { - SetName( String( (sal_Char*)p, nCountBytes, RTL_TEXTENCODING_MS_1252 )); + SetName( String( (sal_Char*)p, nCountBytes, Application::GetSettings().GetDefaultTextEncoding())); p += nCountBytes; DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1Style"); rnCountBytes = rnCountBytes - nCountBytes; @@ -892,7 +895,7 @@ const String Ww1StringList::GetStr( USHORT nNum ) const { String sRet; if( nNum <= nMax ) - sRet = String( pIdxA[ nNum+1 ], RTL_TEXTENCODING_MS_1252 ); + sRet = String( pIdxA[ nNum+1 ], Application::GetSettings().GetDefaultTextEncoding()); return sRet; } @@ -1074,7 +1077,7 @@ String Ww1Assoc::GetStr(USHORT code) DBG_ASSERT(code