Репозиторий Sisyphus
Последнее обновление: 1 октября 2023 | Пакетов: 18631 | Посещений: 37836970
en ru br
Репозитории ALT
5.1: 3.2.0.7-alt0.M51.1
4.1: 3.0.0.10-alt1.M41.1
4.0: 2.4.1.7-alt0.M40.1
3.0: 1.1.5-alt1
www.altlinux.org/Changes

Группа :: Офис
Пакет: openoffice.org

 Главная   Изменения   Спек   Патчи   Sources   Загрузить   Gear   Bugs and FR  Repocop 

Патч: openoffice.org-2.4.0-infra-402-sw_source_filter_ww1_w1class_cxx.diff
Скачать


--- sw/source/filter/ww1/w1class.cxx
+++ sw/source/filter/ww1/w1class.cxx
@@ -47,6 +47,9 @@
 #include <w1class.hxx>
 #endif
 
+#ifndef _SV_SVAPP_HXX
+#include <vcl/svapp.hxx>
+#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<Count(), "Ww1PlainText");
 	if( rFib.GetStream().Seek(ulFilePos+ulOffset) == ulFilePos+ulOffset &&
         rFib.GetStream().Read( aStr.AllocBuffer( static_cast< xub_StrLen >(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<MaxFields, "out of range");
 	if (pStrTbl[code] != NULL)
 		for( USHORT i=0;i<pStrTbl[code][0];i++ )
-			sRet += String( pStrTbl[code][i+1], RTL_TEXTENCODING_MS_1252 );
+			sRet += String( pStrTbl[code][i+1], Application::GetSettings().GetDefaultTextEncoding());
 	return sRet;
 }
 
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 1f93a0a..c676f6b 100644
 
дизайн и разработка: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
текущий майнтейнер: Michael Shigorin