diff options
author | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 11:31:31 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-10-21 14:26:31 +0100 |
commit | 958f7b512cff932f7f2d52d128c297d0f0ab6354 (patch) | |
tree | 33d65c06a9575aafde39e3258d2a9c27130cfaab | |
parent | 288c606d84821026db130fc883825fdd0e2f65fe (diff) |
drop CharSet typedef
Change-Id: Ia160d7cbaa2ee71773483c3f91306f89cdad5947
40 files changed, 83 insertions, 91 deletions
diff --git a/include/tools/string.hxx b/include/tools/string.hxx index 21eb3c5587d8..6904e0ef5680 100644 --- a/include/tools/string.hxx +++ b/include/tools/string.hxx @@ -50,15 +50,6 @@ class UniString; RTL_TEXTTOUNICODE_FLAGS_MBUNDEFINED_DEFAULT |\ RTL_TEXTTOUNICODE_FLAGS_INVALID_DEFAULT) -// CharSet - -#ifndef ENUM_CHARSET_DECLARED -#define ENUM_CHARSET_DECLARED - -typedef rtl_TextEncoding CharSet; - -#endif - // String-Types #ifdef STRING32 diff --git a/sc/inc/column.hxx b/sc/inc/column.hxx index d623efa87b4c..2f16a6b94aa7 100644 --- a/sc/inc/column.hxx +++ b/sc/inc/column.hxx @@ -451,7 +451,7 @@ public: void CompileNameFormula( bool bCreateFormulaString ); void CompileColRowNameFormula(); - sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const; + sal_Int32 GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const; xub_StrLen GetMaxNumberStringLen( sal_uInt16& nPrecision, SCROW nRowStart, SCROW nRowEnd ) const; diff --git a/sc/inc/table.hxx b/sc/inc/table.hxx index 2ab016a94300..a843c60ddec2 100644 --- a/sc/inc/table.hxx +++ b/sc/inc/table.hxx @@ -824,7 +824,7 @@ public: bool HasRowHeader( SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) const; sal_Int32 GetMaxStringLen( SCCOL nCol, - SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const; + SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const; xub_StrLen GetMaxNumberStringLen( sal_uInt16& nPrecision, SCCOL nCol, SCROW nRowStart, SCROW nRowEnd ) const; diff --git a/sc/source/core/data/column3.cxx b/sc/source/core/data/column3.cxx index 02ed182bfbce..e656d5173db9 100644 --- a/sc/source/core/data/column3.cxx +++ b/sc/source/core/data/column3.cxx @@ -2475,7 +2475,7 @@ class MaxStringLenHandler sal_Int32 mnMaxLen; const ScColumn& mrColumn; SvNumberFormatter* mpFormatter; - CharSet meCharSet; + rtl_TextEncoding meCharSet; bool mbOctetEncoding; void processCell(size_t nRow, ScRefCellValue& rCell) @@ -2507,7 +2507,7 @@ class MaxStringLenHandler } public: - MaxStringLenHandler(const ScColumn& rColumn, CharSet eCharSet) : + MaxStringLenHandler(const ScColumn& rColumn, rtl_TextEncoding eCharSet) : mnMaxLen(0), mrColumn(rColumn), mpFormatter(rColumn.GetDoc().GetFormatTable()), @@ -2545,7 +2545,7 @@ public: } -sal_Int32 ScColumn::GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const +sal_Int32 ScColumn::GetMaxStringLen( SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const { MaxStringLenHandler aFunc(*this, eCharSet); sc::ParseAllNonEmpty(maCells.begin(), maCells, nRowStart, nRowEnd, aFunc); diff --git a/sc/source/core/data/documen4.cxx b/sc/source/core/data/documen4.cxx index d5e842942800..590737ce63ba 100644 --- a/sc/source/core/data/documen4.cxx +++ b/sc/source/core/data/documen4.cxx @@ -588,7 +588,7 @@ void ScDocument::InvalidateTableArea() } sal_Int32 ScDocument::GetMaxStringLen( SCTAB nTab, SCCOL nCol, - SCROW nRowStart, SCROW nRowEnd, CharSet eCharSet ) const + SCROW nRowStart, SCROW nRowEnd, rtl_TextEncoding eCharSet ) const { if (ValidTab(nTab) && nTab < static_cast<SCTAB>(maTabs.size()) && maTabs[nTab]) return maTabs[nTab]->GetMaxStringLen( nCol, nRowStart, nRowEnd, eCharSet ); diff --git a/sc/source/core/data/documen9.cxx b/sc/source/core/data/documen9.cxx index 3d9110b3936a..6f339fbb5d75 100644 --- a/sc/source/core/data/documen9.cxx +++ b/sc/source/core/data/documen9.cxx @@ -553,7 +553,7 @@ void ScDocument::UpdateFontCharSet() bool bUpdateOld = ( nSrcVer < SC_FONTCHARSET ); - CharSet eSysSet = osl_getThreadTextEncoding(); + rtl_TextEncoding eSysSet = osl_getThreadTextEncoding(); if ( eSrcSet != eSysSet || bUpdateOld ) { sal_uInt32 nCount,i; diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx index 6a99807b70da..0b76d336ec3f 100644 --- a/sc/source/core/data/global.cxx +++ b/sc/source/core/data/global.cxx @@ -688,7 +688,7 @@ void ScGlobal::Clear() //------------------------------------------------------------------------ -CharSet ScGlobal::GetCharsetValue( const OUString& rCharSet ) +rtl_TextEncoding ScGlobal::GetCharsetValue( const OUString& rCharSet ) { // new TextEncoding values if ( CharClass::isAsciiNumeric( rCharSet ) ) @@ -696,7 +696,7 @@ CharSet ScGlobal::GetCharsetValue( const OUString& rCharSet ) sal_Int32 nVal = rCharSet.toInt32(); if ( !nVal || nVal == RTL_TEXTENCODING_DONTKNOW ) return osl_getThreadTextEncoding(); - return (CharSet) nVal; + return (rtl_TextEncoding) nVal; } // old CharSet values for compatibility else if (rCharSet.equalsIgnoreAsciiCase("ANSI") ) return RTL_TEXTENCODING_MS_1252; @@ -713,7 +713,7 @@ CharSet ScGlobal::GetCharsetValue( const OUString& rCharSet ) //------------------------------------------------------------------------ -OUString ScGlobal::GetCharsetString( CharSet eVal ) +OUString ScGlobal::GetCharsetString( rtl_TextEncoding eVal ) { const sal_Char* pChar; switch ( eVal ) diff --git a/sc/source/core/data/table3.cxx b/sc/source/core/data/table3.cxx index 1e2162190f6b..61aa6373b6b8 100644 --- a/sc/source/core/data/table3.cxx +++ b/sc/source/core/data/table3.cxx @@ -2330,7 +2330,7 @@ sal_uLong ScTable::GetCodeCount() const } sal_Int32 ScTable::GetMaxStringLen( SCCOL nCol, SCROW nRowStart, - SCROW nRowEnd, CharSet eCharSet ) const + SCROW nRowEnd, rtl_TextEncoding eCharSet ) const { if ( ValidCol(nCol) ) return aCol[nCol].GetMaxStringLen( nRowStart, nRowEnd, eCharSet ); diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx index a77f0ecd7e46..33ba8899501b 100644 --- a/sc/source/core/tool/compiler.cxx +++ b/sc/source/core/tool/compiler.cxx @@ -28,6 +28,7 @@ #include <sal/macros.h> #include <tools/rcid.h> #include <tools/solar.h> +#include <tools/string.hxx> #include <unotools/charclass.hxx> #include <com/sun/star/lang/Locale.hpp> #include <com/sun/star/sheet/FormulaOpCodeMapEntry.hpp> diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 94dd320d9b7a..d3c6ee421cd4 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -144,7 +144,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, - SvStream* pMedStrm, sal_Bool bBiff8, CharSet eNach ) + SvStream* pMedStrm, sal_Bool bBiff8, rtl_TextEncoding eNach ) { // try to open an OLE storage SotStorageRef xRootStrg = new SotStorage( pMedStrm, false ); @@ -198,7 +198,7 @@ static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, } FltError ScFormatFilterPluginImpl::ScExportExcel5( SfxMedium& rMedium, ScDocument *pDocument, - ExportFormatExcel eFormat, CharSet eNach ) + ExportFormatExcel eFormat, rtl_TextEncoding eNach ) { if( eFormat != ExpBiff5 && eFormat != ExpBiff8 ) return eERR_NI; diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 27c15aec3463..2d0dbba9f2cb 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -121,7 +121,7 @@ void LotusFontBuffer::MakeFont( ENTRY* pEntry ) { FontFamily eFamily = FAMILY_DONTKNOW; FontPitch ePitch = PITCH_DONTKNOW; - CharSet eCharSet = RTL_TEXTENCODING_DONTKNOW; + rtl_TextEncoding eCharSet = RTL_TEXTENCODING_DONTKNOW; switch( pEntry->nType ) { diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index eea594886044..e8caace8386c 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -90,7 +90,7 @@ const double ImportExcel::fExcToTwips = ( double ) TWIPS_PER_CHAR / 256.0; -ImportTyp::ImportTyp( ScDocument* pDoc, CharSet eQ ) +ImportTyp::ImportTyp( ScDocument* pDoc, rtl_TextEncoding eQ ) { eQuellChar = eQ; pD = pDoc; diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index c14bd66be66d..0849729ffa4f 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -133,7 +133,7 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = //======================================================================== FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const OUString& rBaseURL, ScDocument* pDoc, - const ScRange& rRange, const CharSet /*eNach*/, bool bAll, + const ScRange& rRange, const rtl_TextEncoding /*eNach*/, bool bAll, const OUString& rStreamPath, OUString& rNonConvertibleChars ) { ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath ); diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx index 7fafecf80ff2..26fafa67138c 100644 --- a/sc/source/filter/inc/imp_op.hxx +++ b/sc/source/filter/inc/imp_op.hxx @@ -48,11 +48,11 @@ class ExcelToSc; class ImportTyp { protected: - CharSet eQuellChar; // Quell-Zeichensatz + rtl_TextEncoding eQuellChar; // Quell-Zeichensatz ScDocument* pD; // Dokument public: - ImportTyp( ScDocument*, CharSet eSrc ); + ImportTyp( ScDocument*, rtl_TextEncoding eSrc ); virtual ~ImportTyp(); virtual FltError Read( void ); diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx index ae07457f1b68..f805edbbbc12 100644 --- a/sc/source/filter/inc/lotform.hxx +++ b/sc/source/filter/inc/lotform.hxx @@ -62,7 +62,7 @@ enum FUNC_TYPE class LotusToSc : public LotusConverterBase { private: - CharSet eSrcChar; + rtl_TextEncoding eSrcChar; TokenId nAddToken; // ')+1.0' TokenId nSubToken; // ~ TokenId n0Token; // '0.0'; @@ -88,7 +88,7 @@ private: void NegToken( TokenId& rParam ); // ACHTUNG: wie ~, nur wird '-(<rParam>)' gebildet public: - LotusToSc( SvStream& aStr, CharSet eSrc, sal_Bool b ); + LotusToSc( SvStream& aStr, rtl_TextEncoding eSrc, sal_Bool b ); virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, const FORMULA_TYPE eFT = FT_CellFormula ); diff --git a/sc/source/filter/inc/lotimpop.hxx b/sc/source/filter/inc/lotimpop.hxx index 61a0066e8f9e..ed1c492d79bc 100644 --- a/sc/source/filter/inc/lotimpop.hxx +++ b/sc/source/filter/inc/lotimpop.hxx @@ -78,7 +78,7 @@ private: inline void Skip( const sal_uInt16 nNumBytes ); // ------------------------------------------------------------------- public: - ImportLotus( SvStream&, ScDocument*, CharSet eSrc ); + ImportLotus( SvStream&, ScDocument*, rtl_TextEncoding eSrc ); virtual ~ImportLotus(); diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx index b54233a9d9d8..7771234b30bb 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -54,8 +54,8 @@ WKTYP eTyp; extern sal_Bool bEOF; // zeigt Ende der Datei sal_Bool bEOF; -extern CharSet eCharVon; -CharSet eCharVon; +extern rtl_TextEncoding eCharVon; +rtl_TextEncoding eCharVon; extern ScDocument* pDoc; // Aufhaenger zum Dokumentzugriff ScDocument* pDoc; @@ -200,7 +200,7 @@ WKTYP ScanVersion( SvStream& aStream ) return eWK_UNKNOWN; } -FltError ScImportLotus123old( SvStream& aStream, ScDocument* pDocument, CharSet eSrc ) +FltError ScImportLotus123old( SvStream& aStream, ScDocument* pDocument, rtl_TextEncoding eSrc ) { aStream.Seek( 0UL ); diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 7e9e1d0a292b..f09c11436d26 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -341,7 +341,7 @@ void LotusToSc::Reset( const ScAddress& rEingPos ) } -LotusToSc::LotusToSc( SvStream &rStream, CharSet e, sal_Bool b ) : +LotusToSc::LotusToSc( SvStream &rStream, rtl_TextEncoding e, sal_Bool b ) : LotusConverterBase( rStream, 128 ) { eSrcChar = e; diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index 64663cfeda5f..ad273603fe9b 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -38,7 +38,7 @@ #include "lotattr.hxx" #include "stringutil.hxx" -LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, CharSet eQ ) +LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, rtl_TextEncoding eQ ) : pDoc( pDocP), pRangeNames( new LotusRangeList), @@ -65,7 +65,7 @@ LOTUS_ROOT::~LOTUS_ROOT() static osl::Mutex aLotImpSemaphore; -ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) : +ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, rtl_TextEncoding eQ ) : ImportTyp( pDoc, eQ ), pIn( &aStream ), aConv( *pIn, eQ, false ) diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx index 2e752fcce6c7..eb6621a0100e 100644 --- a/sc/source/filter/lotus/lotus.cxx +++ b/sc/source/filter/lotus/lotus.cxx @@ -29,10 +29,10 @@ //------------------------------------------------------------------------ -extern FltError ScImportLotus123old( SvStream&, ScDocument*, CharSet eSrc ); +extern FltError ScImportLotus123old( SvStream&, ScDocument*, rtl_TextEncoding eSrc ); // alter Krempel in filter.cxx! -FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, CharSet eSrc ) +FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, rtl_TextEncoding eSrc ) { ScFilterOptions aFilterOpt; sal_Bool bWithWK3 = aFilterOpt.GetWK3Flag(); diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index ba1522a3c020..9e777a7e6109 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -57,8 +57,8 @@ extern WKTYP eTyp; // -> filter.cxx, aktueller Dateityp extern sal_Bool bEOF; // -> filter.cxx, zeigt Dateiende an extern sal_uInt8 nDefaultFormat; // -> tool.cxx, Default-Zellenformat -extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff -extern CharSet eCharVon; // -> filter.cxx, character set specified +extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff +extern rtl_TextEncoding eCharVon; // -> filter.cxx, character set specified static sal_uInt16 nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * 10 ); diff --git a/sc/source/ui/dbgui/scuiasciiopt.cxx b/sc/source/ui/dbgui/scuiasciiopt.cxx index 787f9607fdaf..89c13d8be5a5 100644 --- a/sc/source/ui/dbgui/scuiasciiopt.cxx +++ b/sc/source/ui/dbgui/scuiasciiopt.cxx @@ -676,7 +676,7 @@ IMPL_LINK( ScImportAsciiDlg, CharSetHdl, SvxTextEncodingBox*, pCharSetBox ) if( (pCharSetBox == pLbCharSet) && (pCharSetBox->GetSelectEntryCount() == 1) ) { SetPointer( Pointer( POINTER_WAIT ) ); - CharSet eOldCharSet = meCharSet; + rtl_TextEncoding eOldCharSet = meCharSet; SetSelectedCharSet(); // switching char-set invalidates 8bit -> String conversions if (eOldCharSet != meCharSet) diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx index 386eddb49650..6da65ad87d47 100644 --- a/sc/source/ui/docshell/docsh.cxx +++ b/sc/source/ui/docshell/docsh.cxx @@ -1771,12 +1771,12 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt { sal_Unicode cDelim = rAsciiOpt.nFieldSepCode; sal_Unicode cStrDelim = rAsciiOpt.nTextSepCode; - CharSet eCharSet = rAsciiOpt.eCharSet; + rtl_TextEncoding eCharSet = rAsciiOpt.eCharSet; bool bFixedWidth = rAsciiOpt.bFixedWidth; bool bSaveAsShown = rAsciiOpt.bSaveAsShown; bool bShowFormulas = rAsciiOpt.bSaveFormulas; - CharSet eOldCharSet = rStream.GetStreamCharSet(); + rtl_TextEncoding eOldCharSet = rStream.GetStreamCharSet(); rStream.SetStreamCharSet( eCharSet ); sal_uInt16 nOldNumberFormatInt = rStream.GetNumberFormatInt(); OString aStrDelimEncoded; // only used if not Unicode diff --git a/sc/source/ui/docshell/docsh8.cxx b/sc/source/ui/docshell/docsh8.cxx index 5fa6795215ff..87a7226de05f 100644 --- a/sc/source/ui/docshell/docsh8.cxx +++ b/sc/source/ui/docshell/docsh8.cxx @@ -291,7 +291,7 @@ static void lcl_setScalesToColumns(ScDocument& rDoc, const vector<long>& rScales #endif // !DISABLE_DBCONNECTIVITY -sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, CharSet eCharSet, +sal_uLong ScDocShell::DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet, ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc ) { #ifdef DISABLE_DBCONNECTIVITY @@ -486,7 +486,7 @@ inline bool IsAsciiAlpha( sal_Unicode c ) void lcl_GetColumnTypes( ScDocShell& rDocShell, const ScRange& rDataRange, bool bHasFieldNames, OUString* pColNames, sal_Int32* pColTypes, sal_Int32* pColLengths, - sal_Int32* pColScales, bool& bHasMemo, CharSet eCharSet ) + sal_Int32* pColScales, bool& bHasMemo, rtl_TextEncoding eCharSet ) { // updating of column titles didn't work in 5.2 and isn't always wanted // (saving normally shouldn't modify the document) @@ -770,7 +770,7 @@ inline void lcl_getLongVarCharString( #endif // !DISABLE_DBCONNECTIVITY -sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, CharSet eCharSet, bool& bHasMemo ) +sal_uLong ScDocShell::DBaseExport( const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo ) { #ifdef DISABLE_DBCONNECTIVITY (void) rFullFileName; diff --git a/sc/source/ui/docshell/impex.cxx b/sc/source/ui/docshell/impex.cxx index d2c1d1e5b4a9..93f9782cec34 100644 --- a/sc/source/ui/docshell/impex.cxx +++ b/sc/source/ui/docshell/impex.cxx @@ -2212,7 +2212,7 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual FltError ScImportExcel( SfxMedium&, ScDocument*, const EXCIMPFORMAT ) RETURN_ERROR virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ) RETURN_ERROR virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress&, - const CharSet, sal_uInt32 ) RETURN_ERROR + const rtl_TextEncoding, sal_uInt32 ) RETURN_ERROR virtual FltError ScImportRTF( SvStream&, const OUString&, ScDocument*, ScRange& ) RETURN_ERROR virtual FltError ScImportHTML( SvStream&, const OUString&, ScDocument*, ScRange&, double, bool, SvNumberFormatter*, bool ) RETURN_ERROR @@ -2221,9 +2221,9 @@ class ScFormatFilterMissing : public ScFormatFilterPlugin { virtual OUString GetHTMLRangeNameList( ScDocument*, const OUString& ) { return OUString(); } virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel, rtl_TextEncoding ) RETURN_ERROR - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const CharSet, sal_uInt32 ) RETURN_ERROR - virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const CharSet, sal_uInt32 ) RETURN_ERROR - virtual FltError ScExportHTML( SvStream&, const OUString&, ScDocument*, const ScRange&, const CharSet, bool, + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress&, const rtl_TextEncoding, sal_uInt32 ) RETURN_ERROR + virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding, sal_uInt32 ) RETURN_ERROR + virtual FltError ScExportHTML( SvStream&, const OUString&, ScDocument*, const ScRange&, const rtl_TextEncoding, bool, const OUString&, OUString& ) RETURN_ERROR virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange&, const rtl_TextEncoding ) RETURN_ERROR diff --git a/sc/source/ui/inc/asciiopt.hxx b/sc/source/ui/inc/asciiopt.hxx index 9f1200eadf7e..c114d389c8a3 100644 --- a/sc/source/ui/inc/asciiopt.hxx +++ b/sc/source/ui/inc/asciiopt.hxx @@ -44,7 +44,7 @@ private: bool bQuotedFieldAsText; bool bDetectSpecialNumber; sal_Unicode cTextSep; - CharSet eCharSet; + rtl_TextEncoding eCharSet; LanguageType eLang; bool bCharSetSystem; long nStartRow; @@ -68,7 +68,7 @@ public: void InterpretColumnList( const OUString& rString ); - CharSet GetCharSet() const { return eCharSet; } + rtl_TextEncoding GetCharSet() const { return eCharSet; } bool GetCharSetSystem() const { return bCharSetSystem; } const OUString& GetFieldSeps() const { return aFieldSeps; } bool IsMergeSeps() const { return bMergeFieldSeps; } @@ -82,7 +82,7 @@ public: long GetStartRow() const { return nStartRow; } LanguageType GetLanguage() const { return eLang; } - void SetCharSet( CharSet eNew ) { eCharSet = eNew; } + void SetCharSet( rtl_TextEncoding eNew ) { eCharSet = eNew; } void SetCharSetSystem( bool bSet ) { bCharSetSystem = bSet; } void SetFixedLen( bool bSet ) { bFixedLen = bSet; } void SetFieldSeps( const OUString& rStr ) { aFieldSeps = rStr; } diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx index 1e1808b8b83d..20a4833a1c54 100644 --- a/sc/source/ui/inc/docsh.hxx +++ b/sc/source/ui/inc/docsh.hxx @@ -143,10 +143,10 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener SC_DLLPRIVATE bool SaveCurrentChart( SfxMedium& rMedium ); - SC_DLLPRIVATE sal_uLong DBaseImport( const OUString& rFullFileName, CharSet eCharSet, + SC_DLLPRIVATE sal_uLong DBaseImport( const OUString& rFullFileName, rtl_TextEncoding eCharSet, ScColWidthParam aColWidthParam[MAXCOLCOUNT], ScFlatBoolRowSegments& rRowHeightsRecalc ); SC_DLLPRIVATE sal_uLong DBaseExport( - const OUString& rFullFileName, CharSet eCharSet, bool& bHasMemo ); + const OUString& rFullFileName, rtl_TextEncoding eCharSet, bool& bHasMemo ); SC_DLLPRIVATE static bool MoveFile( const INetURLObject& rSource, const INetURLObject& rDest ); SC_DLLPRIVATE static bool KillFile( const INetURLObject& rURL ); diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx index a8b45ab7362e..26b506b5ecf4 100644 --- a/sc/source/ui/inc/imoptdlg.hxx +++ b/sc/source/ui/inc/imoptdlg.hxx @@ -94,7 +94,7 @@ public: sal_Unicode nFieldSepCode; sal_Unicode nTextSepCode; OUString aStrFont; - CharSet eCharSet; + rtl_TextEncoding eCharSet; sal_Bool bFixedWidth; sal_Bool bSaveAsShown; sal_Bool bQuoteAllText; diff --git a/sc/source/ui/inc/scuiasciiopt.hxx b/sc/source/ui/inc/scuiasciiopt.hxx index 68ed4e2dbcec..514bec86a37a 100644 --- a/sc/source/ui/inc/scuiasciiopt.hxx +++ b/sc/source/ui/inc/scuiasciiopt.hxx @@ -76,7 +76,7 @@ class ScImportAsciiDlg : public ModalDialog OUString maFieldSeparators; // selected field separators sal_Unicode mcTextSep; - CharSet meCharSet; /// Selected char set. + rtl_TextEncoding meCharSet; /// Selected char set. bool mbCharSetSystem; /// Is System char set selected? ScImportAsciiCall meCall; /// How the dialog is called (see asciiopt.hxx) diff --git a/sw/inc/iodetect.hxx b/sw/inc/iodetect.hxx index ef9933d33fdd..c77ee2dacacf 100644 --- a/sw/inc/iodetect.hxx +++ b/sw/inc/iodetect.hxx @@ -108,7 +108,7 @@ public: SWD_DLLPUBLIC static bool IsDetectableText( const sal_Char* pBuf, sal_uLong &rLen, - CharSet *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false ); + rtl_TextEncoding *pCharSet=0, bool *pSwap=0, LineEnd *pLineEnd=0, bool bEncodedFilter = false ); static const SfxFilter* GetTextFilter( const sal_Char* pBuf, sal_uLong nLen ); diff --git a/sw/source/core/doc/tblafmt.cxx b/sw/source/core/doc/tblafmt.cxx index cfb57994d4a8..80e8761dedc0 100644 --- a/sw/source/core/doc/tblafmt.cxx +++ b/sw/source/core/doc/tblafmt.cxx @@ -473,7 +473,7 @@ sal_Bool SwBoxAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions, s { sal_uInt16 eSys, eLge; // --- from 680/dr25 on: store strings as UTF-8 - CharSet eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet(); + rtl_TextEncoding eCharSet = (nVer >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet(); sNumFmtString = rStream.ReadUniOrByteString( eCharSet ); rStream >> eSys >> eLge; eSysLanguage = (LanguageType) eSys; @@ -908,7 +908,7 @@ sal_Bool SwTableAutoFmt::Load( SvStream& rStream, const SwAfVersions& rVersions { sal_Bool b; // --- from 680/dr25 on: store strings as UTF-8 - CharSet eCharSet = (nVal >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet(); + rtl_TextEncoding eCharSet = (nVal >= AUTOFORMAT_ID_680DR25) ? RTL_TEXTENCODING_UTF8 : rStream.GetStreamCharSet(); m_aName = rStream.ReadUniOrByteString( eCharSet ); if( AUTOFORMAT_DATA_ID_552 <= nVal ) { @@ -1154,7 +1154,7 @@ sal_Bool SwTableAutoFmtTbl::Load( SvStream& rStream ) OSL_ENSURE( !this, "The Header contains more or newer Data" ); rStream.Seek( nPos + nCnt ); } - rStream.SetStreamCharSet( (CharSet)nChrSet ); + rStream.SetStreamCharSet( (rtl_TextEncoding)nChrSet ); rStream.SetVersion( nFileVers ); } diff --git a/sw/source/core/inc/swfont.hxx b/sw/source/core/inc/swfont.hxx index 8f7338f8a79d..6df1dd2d33fb 100644 --- a/sw/source/core/inc/swfont.hxx +++ b/sw/source/core/inc/swfont.hxx @@ -84,7 +84,7 @@ class SwSubFont : public SvxFont inline void SetColor( const Color& rColor ); inline void SetFillColor( const Color& rColor ); - inline void SetCharSet( const CharSet eCharSet ); + inline void SetCharSet( const rtl_TextEncoding eCharSet ); inline void SetPitch( const FontPitch ePitch ); inline void SetAlign( const FontAlign eAlign ); inline void SetUnderline( const FontUnderline eUnderline ); @@ -236,7 +236,7 @@ public: inline void SetWeight( const FontWeight eWeight, const sal_uInt8 nWhich ); inline void SetItalic( const FontItalic eItalic, const sal_uInt8 nWhich ); inline void SetLanguage( LanguageType eNewLang, const sal_uInt8 nWhich ); - inline void SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich ); + inline void SetCharSet( const rtl_TextEncoding eCharSet, const sal_uInt8 nWhich ); inline void SetPitch( const FontPitch ePitch, const sal_uInt8 nWhich ); inline void SetRelief( const FontRelief eNew ); @@ -513,13 +513,13 @@ inline void SwFont::SetStyleName( const OUString& rStyle, const sal_uInt8 nWhich } // gekapselte SV-Font-Methode -inline void SwSubFont::SetCharSet( const CharSet eCharSet ) +inline void SwSubFont::SetCharSet( const rtl_TextEncoding eCharSet ) { pMagic = 0; Font::SetCharSet( eCharSet ); } -inline void SwFont::SetCharSet( const CharSet eCharSet, const sal_uInt8 nWhich ) +inline void SwFont::SetCharSet( const rtl_TextEncoding eCharSet, const sal_uInt8 nWhich ) { bFntChg = sal_True; aSub[nWhich].SetCharSet( eCharSet ); diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx index e1138d3fb480..9351dc0bf85f 100644 --- a/sw/source/filter/basflt/iodetect.cxx +++ b/sw/source/filter/basflt/iodetect.cxx @@ -404,10 +404,10 @@ const SfxFilter* SwIoSystem::GetFileFilter(const OUString& rFileName, } bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen, - CharSet *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool bEncodedFilter) + rtl_TextEncoding *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool bEncodedFilter) { bool bSwap = false; - CharSet eCharSet = RTL_TEXTENCODING_DONTKNOW; + rtl_TextEncoding eCharSet = RTL_TEXTENCODING_DONTKNOW; bool bLE = true; /*See if it's a known unicode type*/ if (rLen >= 2) diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 50354b3abfa5..313b423d5e03 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -2395,7 +2395,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp) return bTableRowEnd; } -CharSet SwWW8ImplReader::GetCurrentCharSet() +rtl_TextEncoding SwWW8ImplReader::GetCurrentCharSet() { /* #i2015 @@ -2403,7 +2403,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet() character run that has set the charset, if not then fallback to the current underlying paragraph style. */ - CharSet eSrcCharSet = eHardCharSet; + rtl_TextEncoding eSrcCharSet = eHardCharSet; if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) { if (!maFontSrcCharSets.empty()) @@ -2434,7 +2434,7 @@ CharSet SwWW8ImplReader::GetCurrentCharSet() } //Takashi Ono for CJK -CharSet SwWW8ImplReader::GetCurrentCJKCharSet() +rtl_TextEncoding SwWW8ImplReader::GetCurrentCJKCharSet() { /* #i2015 @@ -2442,7 +2442,7 @@ CharSet SwWW8ImplReader::GetCurrentCJKCharSet() character run that has set the charset, if not then fallback to the current underlying paragraph style. */ - CharSet eSrcCharSet = eHardCharSet; + rtl_TextEncoding eSrcCharSet = eHardCharSet; if (eSrcCharSet == RTL_TEXTENCODING_DONTKNOW) { if (!maFontSrcCJKCharSets.empty()) @@ -2652,9 +2652,9 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs) else nStrLen = STRING_MAXLEN-1; - const CharSet eSrcCharSet = bVer67 ? GetCurrentCharSet() : + const rtl_TextEncoding eSrcCharSet = bVer67 ? GetCurrentCharSet() : RTL_TEXTENCODING_MS_1252; - const CharSet eSrcCJKCharSet = bVer67 ? GetCurrentCJKCharSet() : + const rtl_TextEncoding eSrcCJKCharSet = bVer67 ? GetCurrentCJKCharSet() : RTL_TEXTENCODING_MS_1252; // allocate unicode string data diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx index 775137e213ab..789a5a6b1534 100644 --- a/sw/source/filter/ww8/ww8par.hxx +++ b/sw/source/filter/ww8/ww8par.hxx @@ -312,8 +312,8 @@ public: { return pOutlineNumrule; } - CharSet GetCharSet() const; - CharSet GetCJKCharSet() const; + rtl_TextEncoding GetCharSet() const; + rtl_TextEncoding GetCJKCharSet() const; }; //----------------------------------------- @@ -1808,8 +1808,8 @@ public: // eigentlich private, geht aber leider nur public const OUString& GetBaseURL() const { return sBaseURL; } // Laden eines kompletten DocFiles sal_uLong LoadDoc( SwPaM&,WW8Glossary *pGloss=0); - CharSet GetCurrentCharSet(); - CharSet GetCurrentCJKCharSet(); + rtl_TextEncoding GetCurrentCharSet(); + rtl_TextEncoding GetCurrentCJKCharSet(); void PostProcessAttrs(); }; diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx index 88d30f29a793..70492ba5512a 100644 --- a/sw/source/filter/ww8/ww8par2.cxx +++ b/sw/source/filter/ww8/ww8par2.cxx @@ -598,7 +598,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const sal_uInt8* pTxt, bool bOutline) { bool bInsert = false; // Default - CharSet eCharSet = eStructCharSet; + rtl_TextEncoding eCharSet = eStructCharSet; const WW8_FFN* pF = pFonts->GetFont(SVBT16ToShort(rAV.ftc)); // FontInfo bool bListSymbol = pF && ( pF->chs == 2 ); // Symbol/WingDings/... @@ -4472,14 +4472,14 @@ void WW8RStyle::Import() pIo->pAktColl = 0; } -CharSet SwWW8StyInf::GetCharSet() const +rtl_TextEncoding SwWW8StyInf::GetCharSet() const { if ((pFmt) && (pFmt->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) return eRTLFontSrcCharSet; return eLTRFontSrcCharSet; } -CharSet SwWW8StyInf::GetCJKCharSet() const +rtl_TextEncoding SwWW8StyInf::GetCJKCharSet() const { if ((pFmt) && (pFmt->GetFrmDir().GetValue() == FRMDIR_HORI_RIGHT_TOP)) return eRTLFontSrcCharSet; diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx index ba481f3853f6..5a72a197ff10 100644 --- a/sw/source/filter/ww8/ww8par5.cxx +++ b/sw/source/filter/ww8/ww8par5.cxx @@ -2146,7 +2146,7 @@ eF_ResT SwWW8ImplReader::Read_F_Macro( WW8FieldDesc*, OUString& rStr) FontFamily eFamily; OUString aFontName; FontPitch ePitch; - CharSet eSrcCharSet; + rtl_TextEncoding eSrcCharSet; if( GetFontParams( i, eFamily, aFontName, ePitch, eSrcCharSet ) && aFontName=="Wingdings" ) { diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index 61b5e2d30ea7..90038c8412b8 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3359,7 +3359,7 @@ void SwWW8ImplReader::Read_UnderlineColor(sal_uInt16, const sal_uInt8* pData, sh } } bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily, - OUString& rName, FontPitch& rePitch, CharSet& reCharSet ) + OUString& rName, FontPitch& rePitch, rtl_TextEncoding& reCharSet ) { // Die Defines, aus denen diese Tabellen erzeugt werden, stehen in windows.h static const FontPitch ePitchA[] = @@ -3434,7 +3434,7 @@ bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, FontFamily eFamily; OUString aName; FontPitch ePitch; - CharSet eSrcCharSet; + rtl_TextEncoding eSrcCharSet; if( !GetFontParams( nFCode, eFamily, aName, ePitch, eSrcCharSet ) ) { @@ -3473,7 +3473,7 @@ bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, return false; } - CharSet eDstCharSet = eSrcCharSet; + rtl_TextEncoding eDstCharSet = eSrcCharSet; SvxFontItem aFont( eFamily, aName, aEmptyOUStr, ePitch, eDstCharSet, nWhich); diff --git a/sw/source/ui/config/uinums.cxx b/sw/source/ui/config/uinums.cxx index 12bf8130b494..7a9b63e6f9d4 100644 --- a/sw/source/ui/config/uinums.cxx +++ b/sw/source/ui/config/uinums.cxx @@ -221,7 +221,7 @@ const SwNumRulesWithName& SwNumRulesWithName::operator=(const SwNumRulesWithName SwNumRulesWithName::SwNumRulesWithName( SvStream &rStream, sal_uInt16 nVersion ) { - CharSet eEncoding = osl_getThreadTextEncoding(); + rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); maName = rStream.ReadUniOrByteString(eEncoding); char c; @@ -260,7 +260,7 @@ void SwNumRulesWithName::MakeNumRule( SwWrtShell& rSh, SwNumRule& rChg ) const void SwNumRulesWithName::Store( SvStream &rStream ) { - CharSet eEncoding = osl_getThreadTextEncoding(); + rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); rStream.WriteUniOrByteString(maName, eEncoding); for( sal_uInt16 n = 0; n < MAXLEVEL; ++n ) @@ -317,7 +317,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, sal_uInt16 nVersion ) : nCharPoolId( USHRT_MAX ) { - CharSet eEncoding = osl_getThreadTextEncoding(); + rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); { sal_uInt16 nUS; short nShort; @@ -379,7 +379,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::_SwNumFmtGlobal( SvStream& rStream, { Font aFont( static_cast<FontFamily>(nFamily), Size( nWidth, nHeight ) ); aFont.SetName( aName ); - aFont.SetCharSet( (CharSet)nCharSet ); + aFont.SetCharSet( (rtl_TextEncoding)nCharSet ); aFont.SetPitch( (FontPitch)nPitch ); aFmt.SetBulletFont( &aFont ); @@ -452,7 +452,7 @@ SwNumRulesWithName::_SwNumFmtGlobal::~_SwNumFmtGlobal() void SwNumRulesWithName::_SwNumFmtGlobal::Store( SvStream& rStream ) { - CharSet eEncoding = osl_getThreadTextEncoding(); + rtl_TextEncoding eEncoding = osl_getThreadTextEncoding(); { OUString aName; sal_uInt16 nFamily = FAMILY_DONTKNOW, nCharSet = 0, nPitch = 0; diff --git a/sw/source/ui/inc/insfnote.hxx b/sw/source/ui/inc/insfnote.hxx index cb65e5211a2e..c4dec65a06e8 100644 --- a/sw/source/ui/inc/insfnote.hxx +++ b/sw/source/ui/inc/insfnote.hxx @@ -36,7 +36,7 @@ class SwInsFootNoteDlg: public SvxStandardDialog // everything for the character(s) OUString m_aFontName; - CharSet eCharSet; + rtl_TextEncoding eCharSet; sal_Bool bExtCharAvailable; sal_Bool bEdit; @@ -68,7 +68,7 @@ public: SwInsFootNoteDlg(Window * pParent, SwWrtShell &rSh, sal_Bool bEd = sal_False); ~SwInsFootNoteDlg(); - CharSet GetCharSet() { return eCharSet; } + rtl_TextEncoding GetCharSet() { return eCharSet; } sal_Bool IsExtCharAvailable() { return bExtCharAvailable; } OUString GetFontName() { return m_aFontName; } sal_Bool IsEndNote() { return m_pEndNoteBtn->IsChecked(); } |