[Libreoffice-commits] core.git: sc/source
Johnny_M
klasse at partyheld.de
Mon Feb 5 08:50:45 UTC 2018
sc/source/filter/excel/read.cxx | 130 ++++++++++++++++++++--------------------
1 file changed, 65 insertions(+), 65 deletions(-)
New commits:
commit d757c695f9736c064735017c02380eb6257a7875
Author: Johnny_M <klasse at partyheld.de>
Date: Sun Feb 4 00:39:25 2018 +0100
Translate German variable names
Akt -> Current
Zustand -> STATE
Ende -> End
in Excel filter (read)
Change-Id: I4bbb59fb8de1b59ecb4c8fd1ce0765e654acd10f
Reviewed-on: https://gerrit.libreoffice.org/49193
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx
index b9d77a0b2b51..54fd40dea65a 100644
--- a/sc/source/filter/excel/read.cxx
+++ b/sc/source/filter/excel/read.cxx
@@ -74,7 +74,7 @@ ErrCode ImportExcel::Read()
XclImpNameManager& rNameMgr = GetNameManager();
// call to GetCurrSheetDrawing() cannot be cached (changes in new sheets)
- enum Zustand {
+ enum STATE {
Z_BiffNull, // not a valid Biff-Format
Z_Biff2, // Biff2: only one table
@@ -91,9 +91,9 @@ ErrCode ImportExcel::Read()
Z_Biff5T, // Biff5: a table itself
Z_Biff5E, // Biff5: between tables
Z_Biffn0, // all Biffs: skip table till next EOF
- Z_Ende };
+ Z_End };
- Zustand eAkt = Z_BiffNull, ePrev = Z_BiffNull;
+ STATE eCurrent = Z_BiffNull, ePrev = Z_BiffNull;
ErrCode eLastErr = ERRCODE_NONE;
sal_uInt16 nOpcode;
@@ -107,9 +107,9 @@ ErrCode ImportExcel::Read()
std::size_t nProgressBasePos = 0;
std::size_t nProgressBaseSize = 0;
- for (; eAkt != Z_Ende; mnLastRecId = nOpcode)
+ for (; eCurrent != Z_End; mnLastRecId = nOpcode)
{
- if( eAkt == Z_Biff5E )
+ if( eCurrent == Z_Biff5E )
{
sal_uInt16 nScTab = GetCurrScTab();
if( nScTab < maSheetOffsets.size() )
@@ -121,11 +121,11 @@ ErrCode ImportExcel::Read()
if (!bValid)
{
// Safeguard ourselves from potential infinite loop.
- eAkt = Z_Ende;
+ eCurrent = Z_End;
}
}
else
- eAkt = Z_Ende;
+ eCurrent = Z_End;
}
else
aIn.StartNextRecord();
@@ -135,7 +135,7 @@ ErrCode ImportExcel::Read()
if( !aIn.IsValid() )
{
// finalize table if EOF is missing
- switch( eAkt )
+ switch( eCurrent )
{
case Z_Biff2:
case Z_Biff3:
@@ -151,13 +151,13 @@ ErrCode ImportExcel::Read()
break;
}
- if( eAkt == Z_Ende )
+ if( eCurrent == Z_End )
break;
- if( eAkt != Z_Biff5TPre && eAkt != Z_Biff5WPre )
+ if( eCurrent != Z_Biff5TPre && eCurrent != Z_Biff5WPre )
pProgress->ProgressAbs( nProgressBaseSize + aIn.GetSvStreamPos() - nProgressBasePos );
- switch( eAkt )
+ switch( eCurrent )
{
case Z_BiffNull: // ------------------------------- Z_BiffNull -
@@ -176,7 +176,7 @@ ErrCode ImportExcel::Read()
Bof2();
if( pExcRoot->eDateiTyp == Biff2 )
{
- eAkt = Z_Biff2;
+ eCurrent = Z_Biff2;
NewTable();
}
break;
@@ -184,7 +184,7 @@ ErrCode ImportExcel::Read()
Bof3();
if( pExcRoot->eDateiTyp == Biff3 )
{
- eAkt = Z_Biff3;
+ eCurrent = Z_Biff3;
NewTable();
}
break;
@@ -192,17 +192,17 @@ ErrCode ImportExcel::Read()
Bof4();
if( pExcRoot->eDateiTyp == Biff4 )
{
- eAkt = Z_Biff4;
+ eCurrent = Z_Biff4;
NewTable();
}
else if( pExcRoot->eDateiTyp == Biff4W )
- eAkt = Z_Biff4W;
+ eCurrent = Z_Biff4W;
break;
case EXC_BIFF5:
Bof5();
if( pExcRoot->eDateiTyp == Biff5W )
{
- eAkt = Z_Biff5WPre;
+ eCurrent = Z_Biff5WPre;
nBdshtTab = 0;
@@ -212,7 +212,7 @@ ErrCode ImportExcel::Read()
{
// #i62752# possible to have BIFF5 sheet without globals
NewTable();
- eAkt = Z_Biff5TPre; // Shrfmla Prefetch, Row-Prefetch
+ eCurrent = Z_Biff5TPre; // Shrfmla Prefetch, Row-Prefetch
nBofLevel = 0;
aIn.StoreGlobalPosition(); // store position
}
@@ -249,7 +249,7 @@ ErrCode ImportExcel::Read()
rNumFmtBfr.CreateScFormats();
rNameMgr.ConvertAllTokens();
Eof();
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x14:
case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
@@ -272,7 +272,7 @@ ErrCode ImportExcel::Read()
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case EXC_ID2_FONT: rFontBfr.ReadFont( maStrm ); break;
case EXC_ID_EFONT: rFontBfr.ReadEfont( maStrm ); break;
@@ -312,7 +312,7 @@ ErrCode ImportExcel::Read()
rNumFmtBfr.CreateScFormats();
rNameMgr.ConvertAllTokens();
Eof();
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x14:
case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
@@ -332,7 +332,7 @@ ErrCode ImportExcel::Read()
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case EXC_ID_FILESHARING: ReadFileSharing(); break;
case 0x41: rTabViewSett.ReadPane( maStrm ); break;
@@ -383,7 +383,7 @@ ErrCode ImportExcel::Read()
rNumFmtBfr.CreateScFormats();
rNameMgr.ConvertAllTokens();
Eof();
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x12: SheetProtect(); break; // SHEET PROTECTION
case 0x14:
@@ -403,7 +403,7 @@ ErrCode ImportExcel::Read()
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case EXC_ID_FILESHARING: ReadFileSharing(); break;
case 0x41: rTabViewSett.ReadPane( maStrm ); break;
@@ -437,13 +437,13 @@ ErrCode ImportExcel::Read()
{
case 0x0A: // EOF [ 2345]
rNameMgr.ConvertAllTokens();
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x12: DocProtect(); break; // PROTECT [ 5]
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case EXC_ID_FILESHARING: ReadFileSharing(); break;
case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
@@ -462,11 +462,11 @@ ErrCode ImportExcel::Read()
Bof4();
if( pExcRoot->eDateiTyp == Biff4 )
{
- eAkt = Z_Biff4T;
+ eCurrent = Z_Biff4T;
NewTable();
}
else
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x041E: rNumFmtBfr.ReadFormat( maStrm ); break;
case 0x0443: rXFBfr.ReadXF( maStrm ); break;
@@ -502,7 +502,7 @@ ErrCode ImportExcel::Read()
case 0x0A: // EOF [ 2345]
rNameMgr.ConvertAllTokens();
Eof();
- eAkt = Z_Biff4E;
+ eCurrent = Z_Biff4E;
break;
case 0x12: SheetProtect(); break; // SHEET PROTECTION
case 0x14:
@@ -514,7 +514,7 @@ ErrCode ImportExcel::Read()
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x41: rTabViewSett.ReadPane( maStrm ); break;
case 0x42: Codepage(); break; // CODEPAGE [ 2345]
@@ -547,7 +547,7 @@ ErrCode ImportExcel::Read()
switch( nOpcode )
{
case 0x0A: // EOF [ 2345]
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x8F: break; // BUNDLEHEADER [ 4 ]
case EXC_ID4_BOF: // BOF [ 4 ]
@@ -555,12 +555,12 @@ ErrCode ImportExcel::Read()
NewTable();
if( pExcRoot->eDateiTyp == Biff4 )
{
- eAkt = Z_Biff4T;
+ eCurrent = Z_Biff4T;
}
else
{
- ePrev = eAkt;
- eAkt = Z_Biffn0;
+ ePrev = eCurrent;
+ eCurrent = Z_Biffn0;
}
break;
}
@@ -572,14 +572,14 @@ ErrCode ImportExcel::Read()
switch( nOpcode )
{
case 0x0A: // EOF [ 2345]
- eAkt = Z_Biff5W;
+ eCurrent = Z_Biff5W;
aIn.SeekGlobalPosition(); // and back to old position
break;
case 0x12: DocProtect(); break; // PROTECT [ 5]
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case EXC_ID_FILESHARING: ReadFileSharing(); break;
case 0x3D: Window1(); break;
@@ -599,7 +599,7 @@ ErrCode ImportExcel::Read()
rNumFmtBfr.CreateScFormats();
rXFBfr.CreateUserStyles();
rNameMgr.ConvertAllTokens();
- eAkt = Z_Biff5E;
+ eCurrent = Z_Biff5E;
break;
case 0x18: rNameMgr.ReadName( maStrm ); break;
case 0x1E: rNumFmtBfr.ReadFormat( maStrm ); break;
@@ -630,7 +630,7 @@ ErrCode ImportExcel::Read()
case EXC_ID3_DIMENSIONS: ReadDimensions(); break;
case 0x08: Row25(); break; // ROW [ 2 5]
case 0x0A: // EOF [ 2345]
- eAkt = Z_Biff5T;
+ eCurrent = Z_Biff5T;
aIn.SeekGlobalPosition(); // and back to old position
break;
case 0x12: SheetProtect(); break; // SHEET PROTECTION
@@ -676,7 +676,7 @@ ErrCode ImportExcel::Read()
case EXC_ID3_FORMULA:
case EXC_ID4_FORMULA: Formula25(); break;
case EXC_ID_SHRFMLA: Shrfmla(); break;
- case 0x0A: Eof(); eAkt = Z_Biff5E; break;
+ case 0x0A: Eof(); eCurrent = Z_Biff5E; break;
case 0x14:
case 0x15: rPageSett.ReadHeaderFooter( maStrm ); break;
case 0x17: Externsheet(); break; // EXTERNSHEET [ 2345]
@@ -692,7 +692,7 @@ ErrCode ImportExcel::Read()
case 0x2F: // FILEPASS [ 2345]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = Z_Ende;
+ eCurrent = Z_End;
break;
case 0x5D: GetCurrSheetDrawing().ReadObj( maStrm );break;
case 0x83:
@@ -723,7 +723,7 @@ ErrCode ImportExcel::Read()
{
case Biff5:
case Biff5M4:
- eAkt = Z_Biff5TPre; // Shrfmla Prefetch, Row-Prefetch
+ eCurrent = Z_Biff5TPre; // Shrfmla Prefetch, Row-Prefetch
nBofLevel = 0;
aIn.StoreGlobalPosition(); // store position
break;
@@ -735,8 +735,8 @@ ErrCode ImportExcel::Read()
case Biff5V:
default:
pD->SetVisible( GetCurrScTab(), false );
- ePrev = eAkt;
- eAkt = Z_Biffn0;
+ ePrev = eCurrent;
+ eCurrent = Z_Biffn0;
}
OSL_ENSURE( pExcRoot->eDateiTyp != Biff5W,
"+ImportExcel::Read(): Doppel-Whopper-Workbook!" );
@@ -751,7 +751,7 @@ ErrCode ImportExcel::Read()
switch( nOpcode )
{
case 0x0A: // EOF [ 2345]
- eAkt = ePrev;
+ eCurrent = ePrev;
IncCurrScTab();
break;
}
@@ -759,7 +759,7 @@ ErrCode ImportExcel::Read()
}
break;
- case Z_Ende: // ----------------------------------- Z_Ende -
+ case Z_End: // ----------------------------------- Z_End -
OSL_FAIL( "*ImportExcel::Read(): Not possible state!" );
break;
default: OSL_FAIL( "-ImportExcel::Read(): state forgotten!" );
@@ -830,7 +830,7 @@ ErrCode ImportExcel8::Read()
EXC_STATE_END /// Stop reading.
};
- XclImpReadState eAkt = EXC_STATE_BEFORE_GLOBALS;
+ XclImpReadState eCurrent = EXC_STATE_BEFORE_GLOBALS;
ErrCode eLastErr = ERRCODE_NONE;
@@ -849,9 +849,9 @@ ErrCode ImportExcel8::Read()
sal_uInt16 nRecId = 0;
- for (; eAkt != EXC_STATE_END; mnLastRecId = nRecId)
+ for (; eCurrent != EXC_STATE_END; mnLastRecId = nRecId)
{
- if( eAkt == EXC_STATE_BEFORE_SHEET )
+ if( eCurrent == EXC_STATE_BEFORE_SHEET )
{
sal_uInt16 nScTab = GetCurrScTab();
if( nScTab < maSheetOffsets.size() )
@@ -863,7 +863,7 @@ ErrCode ImportExcel8::Read()
if (!bValid)
{
// Safeguard ourselves from potential infinite loop.
- eAkt = EXC_STATE_END;
+ eCurrent = EXC_STATE_END;
}
// import only 256 sheets
@@ -873,7 +873,7 @@ ErrCode ImportExcel8::Read()
XclTools::SkipSubStream( maStrm );
// #i29930# show warning box
GetAddressConverter().CheckScTab( nScTab );
- eAkt = EXC_STATE_END;
+ eCurrent = EXC_STATE_END;
}
else
{
@@ -889,7 +889,7 @@ ErrCode ImportExcel8::Read()
{
case Biff8: // worksheet
case Biff8M4: // macro sheet
- eAkt = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
+ eCurrent = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
// go to next record
if( bIsBof ) maStrm.StartNextRecord();
maStrm.StoreGlobalPosition();
@@ -912,7 +912,7 @@ ErrCode ImportExcel8::Read()
}
}
else
- eAkt = EXC_STATE_END;
+ eCurrent = EXC_STATE_END;
}
else
aIn.StartNextRecord();
@@ -920,25 +920,25 @@ ErrCode ImportExcel8::Read()
if( !aIn.IsValid() )
{
// #i63591# finalize table if EOF is missing
- switch( eAkt )
+ switch( eCurrent )
{
case EXC_STATE_SHEET_PRE:
- eAkt = EXC_STATE_SHEET;
+ eCurrent = EXC_STATE_SHEET;
aIn.SeekGlobalPosition();
continue; // next iteration in while loop
case EXC_STATE_SHEET:
Eof();
- eAkt = EXC_STATE_END;
+ eCurrent = EXC_STATE_END;
break;
default:
- eAkt = EXC_STATE_END;
+ eCurrent = EXC_STATE_END;
}
}
- if( eAkt == EXC_STATE_END )
+ if( eCurrent == EXC_STATE_END )
break;
- if( eAkt != EXC_STATE_SHEET_PRE && eAkt != EXC_STATE_GLOBALS_PRE )
+ if( eCurrent != EXC_STATE_SHEET_PRE && eCurrent != EXC_STATE_GLOBALS_PRE )
pProgress->ProgressAbs( nProgressBaseSize + aIn.GetSvStreamPos() - nProgressBasePos );
nRecId = aIn.GetRecId();
@@ -959,7 +959,7 @@ ErrCode ImportExcel8::Read()
break;
}
- if( !bInUserView ) switch( eAkt )
+ if( !bInUserView ) switch( eCurrent )
{
// before workbook globals: wait for initial workbook globals BOF
@@ -971,7 +971,7 @@ ErrCode ImportExcel8::Read()
Bof5();
if( pExcRoot->eDateiTyp == Biff8W )
{
- eAkt = EXC_STATE_GLOBALS_PRE;
+ eCurrent = EXC_STATE_GLOBALS_PRE;
maStrm.StoreGlobalPosition();
nBdshtTab = 0;
}
@@ -979,7 +979,7 @@ ErrCode ImportExcel8::Read()
{
// #i62752# possible to have BIFF8 sheet without globals
NewTable();
- eAkt = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
+ eCurrent = EXC_STATE_SHEET_PRE; // Shrfmla Prefetch, Row-Prefetch
bSheetHasCodeName = false; // reset
aIn.StoreGlobalPosition();
}
@@ -1003,7 +1003,7 @@ ErrCode ImportExcel8::Read()
if( (nRecId == EXC_ID_EOF) ||
((nRecId == EXC_ID_EXTSST) && (maStrm.GetNextRecId() == EXC_ID5_BOF)) )
{
- eAkt = EXC_STATE_GLOBALS;
+ eCurrent = EXC_STATE_GLOBALS;
aIn.SeekGlobalPosition();
}
break;
@@ -1013,7 +1013,7 @@ ErrCode ImportExcel8::Read()
case 0x2F: // FILEPASS [ 2345 ]
eLastErr = XclImpDecryptHelper::ReadFilepass( maStrm );
if( eLastErr != ERRCODE_NONE )
- eAkt = EXC_STATE_END;
+ eCurrent = EXC_STATE_END;
break;
case EXC_ID_FILESHARING: ReadFileSharing(); break;
case 0x3D: Window1(); break;
@@ -1047,7 +1047,7 @@ ErrCode ImportExcel8::Read()
rXFBfr.CreateUserStyles();
rPTableMgr.ReadPivotCaches( maStrm );
rNameMgr.ConvertAllTokens();
- eAkt = EXC_STATE_BEFORE_SHEET;
+ eCurrent = EXC_STATE_BEFORE_SHEET;
}
break;
case 0x0E: Precision(); break; // PRECISION
@@ -1109,7 +1109,7 @@ ErrCode ImportExcel8::Read()
case 0x0A: // EOF [ 2345 ]
{
- eAkt = EXC_STATE_SHEET;
+ eCurrent = EXC_STATE_SHEET;
OUString sName;
GetDoc().GetName( GetCurrScTab(), sName );
if ( !bSheetHasCodeName )
@@ -1160,7 +1160,7 @@ ErrCode ImportExcel8::Read()
case EXC_ID4_BOF:
case EXC_ID5_BOF: XclTools::SkipSubStream( maStrm ); break;
- case EXC_ID_EOF: Eof(); eAkt = EXC_STATE_BEFORE_SHEET; break;
+ case EXC_ID_EOF: Eof(); eCurrent = EXC_STATE_BEFORE_SHEET; break;
case EXC_ID2_BLANK:
case EXC_ID3_BLANK: ReadBlank(); break;
More information about the Libreoffice-commits
mailing list