Kaydet (Commit) e556657e authored tarafından Christian M. Heller's avatar Christian M. Heller Kaydeden (comit) Noel Grandin

fdo#39468 Translate German Comments - sc/source/filter/{lotus,rtf}

Change-Id: Ib5f1865cfd5d62f45919af8119d4ab691811225b
Reviewed-on: https://gerrit.libreoffice.org/12021Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst 42f767f4
...@@ -17,8 +17,7 @@ ...@@ -17,8 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
// Das geht: Versionserkennung WKS, WK1 und WK3 // Discover WKS, WK1 und WK3; s.a op.cpp
// ...Rest steht in op.cpp
#include <string.h> #include <string.h>
#include <map> #include <map>
...@@ -109,11 +108,11 @@ generate_Opcodes(LotusContext &rContext, SvStream& aStream, ...@@ -109,11 +108,11 @@ generate_Opcodes(LotusContext &rContext, SvStream& aStream,
WKTYP ScanVersion(LotusContext &rContext, SvStream& aStream) WKTYP ScanVersion(LotusContext &rContext, SvStream& aStream)
{ {
// PREC: pWKDatei: Zeiger auf offene Datei // PREC: pWKDatei: pointer to open file
// POST: return: Typ der Datei // POST: return: type of file
sal_uInt16 nOpcode(0), nVersNr(0), nRecLen(0); sal_uInt16 nOpcode(0), nVersNr(0), nRecLen(0);
// erstes Byte muss wegen BOF zwingend 0 sein! // first byte has to be 0 because of BOF!
aStream.ReadUInt16( nOpcode ); aStream.ReadUInt16( nOpcode );
if (nOpcode != rContext.nBOF) if (nOpcode != rContext.nBOF)
return eWK_UNKNOWN; return eWK_UNKNOWN;
...@@ -166,21 +165,21 @@ FltError ScImportLotus123old(LotusContext& rContext, SvStream& aStream, ScDocume ...@@ -166,21 +165,21 @@ FltError ScImportLotus123old(LotusContext& rContext, SvStream& aStream, ScDocume
{ {
aStream.Seek( 0UL ); aStream.Seek( 0UL );
// Zeiger auf Dokument global machen // make document pointer global
rContext.pDoc = pDocument; rContext.pDoc = pDocument;
rContext.bEOF = false; rContext.bEOF = false;
rContext.eCharVon = eSrc; rContext.eCharVon = eSrc;
// Speicher besorgen // allocate memory
if( !MemNew(rContext) ) if( !MemNew(rContext) )
return eERR_NOMEM; return eERR_NOMEM;
InitPage(); // Seitenformat initialisieren (nur Tab 0!) InitPage(); // initialize page format (only Tab 0!)
// Progressbar starten // start progressbar
ScfStreamProgressBar aPrgrsBar( aStream, pDocument->GetDocumentShell() ); ScfStreamProgressBar aPrgrsBar( aStream, pDocument->GetDocumentShell() );
// Datei-Typ ermitteln // detect file type
rContext.eTyp = ScanVersion(rContext, aStream); rContext.eTyp = ScanVersion(rContext, aStream);
rContext.aLotusPatternPool.clear(); rContext.aLotusPatternPool.clear();
......
...@@ -95,7 +95,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) ...@@ -95,7 +95,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr )
if (iter != aEntries.end()) if (iter != aEntries.end())
return *(iter->pPattAttr); return *(iter->pPattAttr);
// neues PatternAttribute erzeugen // generate new Pattern Attribute
ScPatternAttr* pNewPatt = new ScPatternAttr(pDocPool); ScPatternAttr* pNewPatt = new ScPatternAttr(pDocPool);
SfxItemSet& rItemSet = pNewPatt->GetItemSet(); SfxItemSet& rItemSet = pNewPatt->GetItemSet();
...@@ -180,7 +180,7 @@ const SvxColorItem& LotAttrCache::GetColorItem( const sal_uInt8 nLotIndex ) cons ...@@ -180,7 +180,7 @@ const SvxColorItem& LotAttrCache::GetColorItem( const sal_uInt8 nLotIndex ) cons
const Color& LotAttrCache::GetColor( const sal_uInt8 nLotIndex ) const const Color& LotAttrCache::GetColor( const sal_uInt8 nLotIndex ) const
{ {
// Farbe <-> Index passt fuer Background, nicht aber fuer Fonts (0 <-> 7)! // color <-> index fits background, but not for fonts (0 <-> 7)!
OSL_ENSURE( nLotIndex < 8, "*LotAttrCache::GetColor(): Index > 7, caller hast to check index!" ); OSL_ENSURE( nLotIndex < 8, "*LotAttrCache::GetColor(): Index > 7, caller hast to check index!" );
return pColTab[ nLotIndex ]; return pColTab[ nLotIndex ];
...@@ -209,7 +209,7 @@ void LotAttrCol::SetAttr( const SCROW nRow, const ScPatternAttr& rAttr ) ...@@ -209,7 +209,7 @@ void LotAttrCol::SetAttr( const SCROW nRow, const ScPatternAttr& rAttr )
} }
} }
else else
{ // erster Eintrag { // first entry
ENTRY *pAkt = new ENTRY; ENTRY *pAkt = new ENTRY;
pAkt->pPattAttr = &rAttr; pAkt->pPattAttr = &rAttr;
pAkt->nFirstRow = pAkt->nLastRow = nRow; pAkt->nFirstRow = pAkt->nLastRow = nRow;
...@@ -252,7 +252,7 @@ void LotAttrTable::Apply(LOTUS_ROOT* pLotusRoot, const SCTAB nTabNum) ...@@ -252,7 +252,7 @@ void LotAttrTable::Apply(LOTUS_ROOT* pLotusRoot, const SCTAB nTabNum)
{ {
SCCOL nColCnt; SCCOL nColCnt;
for( nColCnt = 0 ; nColCnt <= MAXCOL ; nColCnt++ ) for( nColCnt = 0 ; nColCnt <= MAXCOL ; nColCnt++ )
pCols[ nColCnt ].Apply(pLotusRoot, nColCnt, nTabNum); // macht auch gleich ein Clear() am Ende pCols[ nColCnt ].Apply(pLotusRoot, nColCnt, nTabNum); // does a Clear() at end
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -34,16 +34,16 @@ class FormCache; ...@@ -34,16 +34,16 @@ class FormCache;
struct LotusContext struct LotusContext
{ {
const sal_uInt16 nBOF; const sal_uInt16 nBOF;
WKTYP eTyp; // Typ der gerade in bearbeitung befindlichen Datei WKTYP eTyp; // type of file being processed
bool bEOF; // zeigt Ende der Datei bool bEOF; // shows end of file
rtl_TextEncoding eCharVon; rtl_TextEncoding eCharVon;
ScDocument* pDoc; // Aufhaenger zum Dokumentzugriff ScDocument* pDoc; // pointer to access document
static OPCODE_FKT pOpFkt[ FKT_LIMIT ]; static OPCODE_FKT pOpFkt[ FKT_LIMIT ];
static OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx, Table of possible Opcodes static OPCODE_FKT pOpFkt123[ FKT_LIMIT123 ]; // -> optab.cxx, table of possible Opcodes
LOTUS_ROOT* pLotusRoot; LOTUS_ROOT* pLotusRoot;
std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool; std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool;
sal_uInt8 nDefaultFormat; // -> op.cpp, Standard-Zellenformat sal_uInt8 nDefaultFormat; // -> op.cpp, standard cell format
SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard; SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard;
ScProtectionAttr* pAttrUnprot; ScProtectionAttr* pAttrUnprot;
......
...@@ -147,7 +147,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) ...@@ -147,7 +147,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen )
{ {
Read( nCol ); Read( nCol );
Read( nSpaces ); Read( nSpaces );
// ACHTUNG: Korrekturfaktor nach 'Augenmass' ermittelt! // Attention: ambiguous Correction factor!
pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), ( sal_uInt16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), ( sal_uInt16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) );
nCnt--; nCnt--;
...@@ -157,7 +157,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) ...@@ -157,7 +157,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen )
void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen ) void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen )
{ {
OSL_ENSURE( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record zu kurz!" ); OSL_ENSURE( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record too short!" );
sal_uInt8 nLTab, nWindow2; sal_uInt8 nLTab, nWindow2;
sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2; sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
...@@ -265,7 +265,7 @@ void ImportLotus::Smallnumcell( void ) ...@@ -265,7 +265,7 @@ void ImportLotus::Smallnumcell( void )
ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n ) ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n )
{ {
OSL_ENSURE( pIn, "-ImportLotus::Formulacell(): Null-Stream -> Rums!" ); OSL_ENSURE( pIn, "-ImportLotus::Formulacell(): Null-Stream!" );
ScAddress aAddr; ScAddress aAddr;
...@@ -296,7 +296,7 @@ void ImportLotus::Read( OUString &r ) ...@@ -296,7 +296,7 @@ void ImportLotus::Read( OUString &r )
void ImportLotus::RowPresentation( sal_uInt16 nRecLen ) void ImportLotus::RowPresentation( sal_uInt16 nRecLen )
{ {
OSL_ENSURE( nRecLen > 4, "*ImportLotus::RowPresentation(): Record zu kurz!" ); OSL_ENSURE( nRecLen > 4, "*ImportLotus::RowPresentation(): Record too short!" );
sal_uInt8 nLTab, nFlags; sal_uInt8 nLTab, nFlags;
sal_uInt16 nRow, nHeight; sal_uInt16 nRow, nHeight;
...@@ -382,7 +382,7 @@ void ImportLotus::Font_Ysize( void ) ...@@ -382,7 +382,7 @@ void ImportLotus::Font_Ysize( void )
void ImportLotus::_Row( const sal_uInt16 nRecLen ) void ImportLotus::_Row( const sal_uInt16 nRecLen )
{ {
OSL_ENSURE( nExtTab >= 0, "*ImportLotus::_Row(): Kann hier nicht sein!" ); OSL_ENSURE( nExtTab >= 0, "*ImportLotus::_Row(): not possible!" );
sal_uInt16 nRow; sal_uInt16 nRow;
sal_uInt16 nHeight; sal_uInt16 nHeight;
...@@ -413,21 +413,21 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen ) ...@@ -413,21 +413,21 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen )
rContext.pLotusRoot->pAttrTable->SetAttr( rContext.pLotusRoot->pAttrTable->SetAttr(
nColCnt, static_cast<SCCOL> ( nColCnt + nRepeats ), static_cast<SCROW> (nRow), aAttr ); nColCnt, static_cast<SCCOL> ( nColCnt + nRepeats ), static_cast<SCROW> (nRow), aAttr );
// hier und NICHT in class LotAttrTable, weil nur Attributiert wird, // Do this here and NOT in class LotAttrTable, as we only add attributes if the other
// wenn die anderen Attribute gesetzt sind // attributes are set
// -> bei Center-Attribute wird generell zentriert gesetzt // -> for Center-Attribute default is centered
if( aAttr.IsCentered() ) if( aAttr.IsCentered() )
{ {
if( bCenter ) if( bCenter )
{ {
if( pD->HasData( nColCnt, static_cast<SCROW> (nRow), static_cast<SCTAB> (nExtTab) ) ) if( pD->HasData( nColCnt, static_cast<SCROW> (nRow), static_cast<SCTAB> (nExtTab) ) )
{// neue Center nach vorheriger Center {// new Center after previous Center
pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) ); pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) );
nCenterStart = nColCnt; nCenterStart = nColCnt;
} }
} }
else else
{// ganz neue Center {// fully new Center
bCenter = true; bCenter = true;
nCenterStart = nColCnt; nCenterStart = nColCnt;
} }
...@@ -436,7 +436,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen ) ...@@ -436,7 +436,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen )
else else
{ {
if( bCenter ) if( bCenter )
{// evtl. alte Center bemachen {// possibly reset old Center
pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) ); pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) );
bCenter = false; bCenter = false;
} }
...@@ -449,7 +449,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen ) ...@@ -449,7 +449,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen )
} }
if( bCenter ) if( bCenter )
// evtl. alte Center bemachen // possibly reset old Center
pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) ); pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) );
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
...@@ -17,8 +17,8 @@ ...@@ -17,8 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
// Bemerkung: Variablen nicht ueber Headerfile, Module muessen sich // Remark: Variables are not declared in header file! Modules have to declare
// selbst per extern ihre Sachen besorgen! // their variables via extern!
#include "scitems.hxx" #include "scitems.hxx"
#include "scmem.h" #include "scmem.h"
......
...@@ -62,7 +62,7 @@ void NI(LotusContext& /*rContext*/, SvStream& r, sal_uInt16 n) ...@@ -62,7 +62,7 @@ void NI(LotusContext& /*rContext*/, SvStream& r, sal_uInt16 n)
void OP_BOF(LotusContext& /*rContext*/, SvStream& r, sal_uInt16 /*n*/) void OP_BOF(LotusContext& /*rContext*/, SvStream& r, sal_uInt16 /*n*/)
{ {
r.SeekRel( 2 ); // Versionsnummer ueberlesen r.SeekRel( 2 ); // skip version number
} }
void OP_EOF(LotusContext& rContext, SvStream& /*r*/, sal_uInt16 /*n*/) void OP_EOF(LotusContext& rContext, SvStream& /*r*/, sal_uInt16 /*n*/)
...@@ -84,7 +84,7 @@ void OP_Integer(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -84,7 +84,7 @@ void OP_Integer(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
rContext.pDoc->EnsureTable(nTab); rContext.pDoc->EnsureTable(nTab);
rContext.pDoc->SetValue(ScAddress(nCol,nRow,nTab), static_cast<double>(nValue)); rContext.pDoc->SetValue(ScAddress(nCol,nRow,nTab), static_cast<double>(nValue));
// 0 Stellen nach'm Komma! // 0 decimal places!
SetFormat(rContext, static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, 0); SetFormat(rContext, static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, 0);
} }
} }
...@@ -124,8 +124,8 @@ void OP_Label(LotusContext& rContext, SvStream& r, sal_uInt16 n) ...@@ -124,8 +124,8 @@ void OP_Label(LotusContext& rContext, SvStream& r, sal_uInt16 n)
if (ValidColRow( static_cast<SCCOL>(nCol), nRow)) if (ValidColRow( static_cast<SCCOL>(nCol), nRow))
{ {
nFormat &= 0x80; // Bit 7 belassen nFormat &= 0x80; // don't change Bit 7
nFormat |= 0x75; // protected egal, special-text gesetzt nFormat |= 0x75; // protected does not matter, special-text is set
PutFormString(rContext, static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pText.get()); PutFormString(rContext, static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pText.get());
...@@ -140,7 +140,7 @@ void OP_Formula(LotusContext &rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -140,7 +140,7 @@ void OP_Formula(LotusContext &rContext, SvStream& r, sal_uInt16 /*n*/)
SCTAB nTab = 0; SCTAB nTab = 0;
r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow ); r.ReadUChar( nFormat ).ReadUInt16( nCol ).ReadUInt16( nRow );
r.SeekRel( 8 ); // Ergebnis ueberspringen r.SeekRel( 8 ); // skip result
r.ReadUInt16( nFormulaSize ); r.ReadUInt16( nFormulaSize );
const ScTokenArray* pErg; const ScTokenArray* pErg;
...@@ -159,7 +159,7 @@ void OP_Formula(LotusContext &rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -159,7 +159,7 @@ void OP_Formula(LotusContext &rContext, SvStream& r, sal_uInt16 /*n*/)
rContext.pDoc->EnsureTable(nTab); rContext.pDoc->EnsureTable(nTab);
rContext.pDoc->SetFormulaCell(ScAddress(nCol,nRow,nTab), pCell); rContext.pDoc->SetFormulaCell(ScAddress(nCol,nRow,nTab), pCell);
// nFormat = Standard -> Nachkommastellen wie Float // nFormat = Default -> decimal places like Float
SetFormat(rContext, static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat); SetFormat(rContext, static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat);
} }
} }
...@@ -175,7 +175,7 @@ void OP_ColumnWidth(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -175,7 +175,7 @@ void OP_ColumnWidth(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
if (ValidCol( static_cast<SCCOL>(nCol))) if (ValidCol( static_cast<SCCOL>(nCol)))
{ {
if( nWidthSpaces ) if( nWidthSpaces )
// Annahme: 10cpi-Zeichensatz // assuming 10cpi character set
nBreite = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nWidthSpaces ); nBreite = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nWidthSpaces );
else else
{ {
...@@ -189,7 +189,7 @@ void OP_ColumnWidth(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -189,7 +189,7 @@ void OP_ColumnWidth(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
{ {
// POST: waren Koordinaten ungueltig, wird nicht gespeichert // POST: don't save for invalid coordinates
sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd; sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd;
sal_Char cPuffer[ 16+1 ]; sal_Char cPuffer[ 16+1 ];
...@@ -210,7 +210,7 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -210,7 +210,7 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
sal_Char cBuf[sizeof(cPuffer)+1]; sal_Char cBuf[sizeof(cPuffer)+1];
if( isdigit( *cPuffer ) ) if( isdigit( *cPuffer ) )
{ // erstes Zeichen im Namen eine Zahl -> 'A' vor Namen setzen { // first char in name is a number -> prepend 'A'
cBuf[0] = 'A'; cBuf[0] = 'A';
strcpy( cBuf + 1, cPuffer ); // #100211# - checked strcpy( cBuf + 1, cPuffer ); // #100211# - checked
} }
...@@ -227,7 +227,7 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -227,7 +227,7 @@ void OP_NamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
{ {
// POST: waren Koordinaten ungueltig, wird nicht gespeichert // POST:don't save for invalid coordinates
sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd; sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd;
sal_uInt8 nType; sal_uInt8 nType;
...@@ -249,7 +249,7 @@ void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -249,7 +249,7 @@ void OP_SymphNamedRange(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
sal_Char cBuf[sizeof(cPuffer)+1]; sal_Char cBuf[sizeof(cPuffer)+1];
if( isdigit( *cPuffer ) ) if( isdigit( *cPuffer ) )
{ // erstes Zeichen im Namen eine Zahl -> 'A' vor Namen setzen { // first char in name is a number -> prepend 'A'
cBuf[0] = 'A'; cBuf[0] = 'A';
strcpy( cBuf + 1, cPuffer ); // #100211# - checked strcpy( cBuf + 1, cPuffer ); // #100211# - checked
} }
...@@ -285,38 +285,38 @@ void OP_HiddenCols(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/) ...@@ -285,38 +285,38 @@ void OP_HiddenCols(LotusContext& rContext, SvStream& r, sal_uInt16 /*n*/)
sal_uInt8 nAkt; sal_uInt8 nAkt;
nCount = 0; nCount = 0;
for( nByte = 0 ; nByte < 32 ; nByte++ ) // 32 Bytes mit ... for( nByte = 0 ; nByte < 32 ; nByte++ ) // 32 Bytes with ...
{ {
r.ReadUChar( nAkt ); r.ReadUChar( nAkt );
for( nBit = 0 ; nBit < 8 ; nBit++ ) // ...jeweils 8 Bits = 256 Bits for( nBit = 0 ; nBit < 8 ; nBit++ ) // ...each 8 Bits = 256 Bits
{ {
if( nAkt & 0x01 ) // unterstes Bit gesetzt? if( nAkt & 0x01 ) // is lowest Bit set?
{ {
// -> Hidden Col // -> Hidden Col
rContext.pDoc->SetColHidden(nCount, nCount, 0, true); rContext.pDoc->SetColHidden(nCount, nCount, 0, true);
} }
nCount++; nCount++;
nAkt = nAkt / 2; // der Naechste bitte... nAkt = nAkt / 2; // the next please...
} }
} }
} }
void OP_Window1(LotusContext& rContext, SvStream& r, sal_uInt16 n) void OP_Window1(LotusContext& rContext, SvStream& r, sal_uInt16 n)
{ {
r.SeekRel( 4 ); // Cursor Pos ueberspringen r.SeekRel( 4 ); // skip Cursor Pos
r.ReadUChar(rContext.nDefaultFormat); r.ReadUChar(rContext.nDefaultFormat);
r.SeekRel( 1 ); // 'unused' ueberspringen r.SeekRel( 1 ); // skip 'unused'
r.ReadUInt16( nDefWidth ); r.ReadUInt16( nDefWidth );
r.SeekRel( n - 8 ); // und den Rest ueberspringen r.SeekRel( n - 8 ); // skip the rest
nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nDefWidth ); nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nDefWidth );
// statt Defaulteinstellung in SC alle Cols zu Fuss setzen // instead of default, set all Cols in SC by hand
for( SCCOL nCol = 0 ; nCol <= MAXCOL ; nCol++ ) for( SCCOL nCol = 0 ; nCol <= MAXCOL ; nCol++ )
rContext.pDoc->SetColWidth( nCol, 0, nDefWidth ); rContext.pDoc->SetColWidth( nCol, 0, nDefWidth );
} }
...@@ -376,7 +376,7 @@ void OP_Formula123(LotusContext& rContext, SvStream& r, sal_uInt16 n) ...@@ -376,7 +376,7 @@ void OP_Formula123(LotusContext& rContext, SvStream& r, sal_uInt16 n)
sal_uInt16 nRow(0); sal_uInt16 nRow(0);
r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol ); r.ReadUInt16( nRow ).ReadUChar( nTab ).ReadUChar( nCol );
r.SeekRel( 8 ); // Result- jump over r.SeekRel( 8 ); // skip Result
const ScTokenArray* pErg; const ScTokenArray* pErg;
sal_Int32 nBytesLeft = (n > 12) ? n - 12 : 0; sal_Int32 nBytesLeft = (n > 12) ? n - 12 : 0;
......
...@@ -39,7 +39,7 @@ ...@@ -39,7 +39,7 @@
void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString) void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString)
{ {
// Label-Format-Auswertung // evaluate Label-Format
OSL_ENSURE( pString != NULL, "PutFormString(): pString == NULL" ); OSL_ENSURE( pString != NULL, "PutFormString(): pString == NULL" );
if (!pString) if (!pString)
return; return;
...@@ -51,26 +51,26 @@ void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, s ...@@ -51,26 +51,26 @@ void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, s
switch( cForm ) switch( cForm )
{ {
case '"': // rechtsbuendig case '"': // align-right
pJustify = rContext.pAttrRight; pJustify = rContext.pAttrRight;
pString++; pString++;
break; break;
case '\'': // linksbuendig case '\'': // align-left
pJustify = rContext.pAttrLeft; pJustify = rContext.pAttrLeft;
pString++; pString++;
break; break;
case '^': // zentriert case '^': // centered
pJustify = rContext.pAttrCenter; pJustify = rContext.pAttrCenter;
pString++; pString++;
break; break;
case '|': // printer command case '|': // printer command
pString = NULL; pString = NULL;
break; break;
case '\\': // Wiederholung case '\\': // repetition
pJustify = rContext.pAttrRepeat; pJustify = rContext.pAttrRepeat;
pString++; pString++;
break; break;
default: // kenn' ich nicht! default: // undefined case!
pJustify = rContext.pAttrStandard; pJustify = rContext.pAttrStandard;
} }
...@@ -85,7 +85,7 @@ void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, s ...@@ -85,7 +85,7 @@ void PutFormString(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, s
void SetFormat(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt) void SetFormat(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt)
{ {
// PREC: nSt = Standard-Dezimalstellenanzahl // PREC: nSt = default number of decimal places
rContext.pDoc->ApplyAttr(nCol, nRow, nTab, *(rContext.pValueFormCache->GetAttr(nFormat, nSt))); rContext.pDoc->ApplyAttr(nCol, nRow, nTab, *(rContext.pValueFormCache->GetAttr(nFormat, nSt)));
ScProtectionAttr aAttr; ScProtectionAttr aAttr;
...@@ -96,7 +96,7 @@ void SetFormat(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_u ...@@ -96,7 +96,7 @@ void SetFormat(LotusContext& rContext, SCCOL nCol, SCROW nRow, SCTAB nTab, sal_u
} }
void InitPage( void ) void InitPage( void )
{ // Seitenformat initialisieren, d.h. Default-Werte von SC holen { // initialize page format; meaning: get defaults from SC TODO:
//scGetPageFormat( 0, &aPage ); //scGetPageFormat( 0, &aPage );
} }
...@@ -146,7 +146,7 @@ double Snum32ToDouble( sal_uInt32 nValue ) ...@@ -146,7 +146,7 @@ double Snum32ToDouble( sal_uInt32 nValue )
FormCache::FormCache( ScDocument* pDoc1, sal_uInt8 nNewDefaultFormat ) FormCache::FormCache( ScDocument* pDoc1, sal_uInt8 nNewDefaultFormat )
: nIndex(0) : nIndex(0)
{ // Default-Format ist 'Default' { // Default format is 'Default'
nDefaultFormat = nNewDefaultFormat; nDefaultFormat = nNewDefaultFormat;
pFormTable = pDoc1->GetFormatTable(); pFormTable = pDoc1->GetFormatTable();
for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ ) for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ )
...@@ -162,7 +162,7 @@ FormCache::~FormCache() ...@@ -162,7 +162,7 @@ FormCache::~FormCache()
SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
{ {
// neues Format erzeugen // setup new Format
sal_uInt8 nL, nH; // Low-/High-Nibble sal_uInt8 nL, nH; // Low-/High-Nibble
sal_uInt8 nForm = nFormat; sal_uInt8 nForm = nFormat;
OUString aFormString; OUString aFormString;
...@@ -175,56 +175,56 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) ...@@ -175,56 +175,56 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
if( nForm == 0xFF ) // Default-Format? if( nForm == 0xFF ) // Default-Format?
nForm = nDefaultFormat; nForm = nDefaultFormat;
// Aufdroeseln in Low- und High-Nibble // split into Low and High byte
nL = nFormat & 0x0F; nL = nFormat & 0x0F;
nH = ( nFormat & 0xF0 ) / 16; nH = ( nFormat & 0xF0 ) / 16;
nH &= 0x07; // Bits 4-6 'rausziehen nH &= 0x07; // extract bits 4-6
switch( nH ) switch( nH )
{ {
case 0x00: // Festkommaformat (fixed) case 0x00: // fixed-point number
//fStandard;nL; //fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage ); NUMBERFORMAT_NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1); eLanguage, false, false, nL, 1);
break; break;
case 0x01: // Exponentdarstellung (scientific notation) case 0x01: // scientific notation
//fExponent;nL; //fExponent;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_SCIENTIFIC, eLanguage ); NUMBERFORMAT_SCIENTIFIC, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1); eLanguage, false, false, nL, 1);
break; break;
case 0x02: // Waehrungsdarstellung (currency) case 0x02: // currency
//fMoney;nL; //fMoney;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_CURRENCY, eLanguage ); NUMBERFORMAT_CURRENCY, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1); eLanguage, false, false, nL, 1);
break; break;
case 0x03: // Prozent case 0x03: // percentage
//fPercent;nL; //fPercent;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_PERCENT, eLanguage ); NUMBERFORMAT_PERCENT, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1); eLanguage, false, false, nL, 1);
break; break;
case 0x04: // Komma case 0x04: // Decimal
//fStandard;nL; //fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage ); NUMBERFORMAT_NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, true, false, nL, 1); eLanguage, true, false, nL, 1);
break; break;
case 0x05: // frei case 0x05: // unspecified
//fStandard;nL; //fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage ); NUMBERFORMAT_NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nL, 1); eLanguage, false, false, nL, 1);
break; break;
case 0x06: // frei case 0x06: // unspecified
//fStandard;nL; //fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage ); NUMBERFORMAT_NUMBER, eLanguage );
...@@ -232,7 +232,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) ...@@ -232,7 +232,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
eLanguage, false, false, nL, 1); eLanguage, false, false, nL, 1);
nIndex1 = 0; nIndex1 = 0;
break; break;
case 0x07: // Spezialformat case 0x07: // Special format
switch( nL ) switch( nL )
{ {
case 0x00: // +/- case 0x00: // +/-
...@@ -242,38 +242,38 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) ...@@ -242,38 +242,38 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, true, nSt, 1); eLanguage, false, true, nSt, 1);
break; break;
case 0x01: // generelles Format case 0x01: // general Format
//fStandard;nSt; //fStandard;nSt;
nIndex1 = pFormTable->GetStandardFormat( nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage ); NUMBERFORMAT_NUMBER, eLanguage );
aFormString = pFormTable->GenerateFormat(nIndex1, aFormString = pFormTable->GenerateFormat(nIndex1,
eLanguage, false, false, nSt, 1); eLanguage, false, false, nSt, 1);
break; break;
case 0x02: // Datum: Tag, Monat, Jahr case 0x02: // Date: Day, Month, Year
//fDate;dfDayMonthYearLong; //fDate;dfDayMonthYearLong;
eType = NUMBERFORMAT_DATE; eType = NUMBERFORMAT_DATE;
eIndexTableOffset = NF_DATE_SYS_DDMMYYYY; eIndexTableOffset = NF_DATE_SYS_DDMMYYYY;
break; break;
case 0x03: // Datum: Tag, Monat case 0x03: // Date: Day, Month
//fDate;dfDayMonthLong; //fDate;dfDayMonthLong;
eType = NUMBERFORMAT_DATE; eType = NUMBERFORMAT_DATE;
aFormString = pFormTable->GetKeyword( eLanguage, NF_KEY_DD); aFormString = pFormTable->GetKeyword( eLanguage, NF_KEY_DD);
aFormString += pFormTable->GetDateSep(); // matches last eLanguage aFormString += pFormTable->GetDateSep(); // matches last eLanguage
aFormString += pFormTable->GetKeyword( eLanguage, NF_KEY_MMMM); aFormString += pFormTable->GetKeyword( eLanguage, NF_KEY_MMMM);
break; break;
case 0x04: // Datum: Monat, Jahr case 0x04: // Date: Month, Year
//fDate;dfMonthYearLong; //fDate;dfMonthYearLong;
eType = NUMBERFORMAT_DATE; eType = NUMBERFORMAT_DATE;
aFormString = pFormTable->GetKeyword( eLanguage, NF_KEY_MM); aFormString = pFormTable->GetKeyword( eLanguage, NF_KEY_MM);
aFormString += pFormTable->GetDateSep(); // matches last eLanguage aFormString += pFormTable->GetDateSep(); // matches last eLanguage
aFormString += pFormTable->GetKeyword( eLanguage, NF_KEY_YYYY); aFormString += pFormTable->GetKeyword( eLanguage, NF_KEY_YYYY);
break; break;
case 0x05: // Textformate case 0x05: // Text formats
//fString;nSt; //fString;nSt;
eType = NUMBERFORMAT_TEXT; eType = NUMBERFORMAT_TEXT;
eIndexTableOffset = NF_TEXT; eIndexTableOffset = NF_TEXT;
break; break;
case 0x06: // versteckt case 0x06: // hidden
//wFlag |= paHideAll;bSetFormat = sal_False; //wFlag |= paHideAll;bSetFormat = sal_False;
eType = NUMBERFORMAT_NUMBER; eType = NUMBERFORMAT_NUMBER;
aFormString = "\"\""; aFormString = "\"\"";
...@@ -308,7 +308,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) ...@@ -308,7 +308,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
eType = NUMBERFORMAT_TIME; eType = NUMBERFORMAT_TIME;
eIndexTableOffset = NF_TIME_HHMMSS; eIndexTableOffset = NF_TIME_HHMMSS;
break; break;
case 0x0F: // Standardeinstellung case 0x0F: // Default
//fStandard;nSt; //fStandard;nSt;
bDefault = true; bDefault = true;
break; break;
...@@ -320,7 +320,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) ...@@ -320,7 +320,7 @@ SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
break; break;
} }
// Format in Table schieben // push Format into table
if( bDefault ) if( bDefault )
nHandle = 0; nHandle = 0;
else if (eIndexTableOffset != NF_NUMERIC_START) else if (eIndexTableOffset != NF_NUMERIC_START)
...@@ -416,7 +416,7 @@ LR_ID LotusRangeList::GetIndex( const LotusRange &rRef ) ...@@ -416,7 +416,7 @@ LR_ID LotusRangeList::GetIndex( const LotusRange &rRef )
void LotusRangeList::Append( LotusRange* pLR, const OUString& rName ) void LotusRangeList::Append( LotusRange* pLR, const OUString& rName )
{ {
OSL_ENSURE( pLR, "*LotusRangeList::Append(): das wird nichts!" ); OSL_ENSURE( pLR, "*LotusRangeList::Append(): no pointer!" );
maRanges.push_back(pLR); maRanges.push_back(pLR);
ScTokenArray aTokArray; ScTokenArray aTokArray;
...@@ -512,14 +512,14 @@ bool RangeNameBufferWK3::FindAbs( const OUString& rRef, sal_uInt16& rIndex ) ...@@ -512,14 +512,14 @@ bool RangeNameBufferWK3::FindAbs( const OUString& rRef, sal_uInt16& rIndex )
{ {
OUString aTmp( rRef ); OUString aTmp( rRef );
aTmp = aTmp.copy(1); aTmp = aTmp.copy(1);
StringHashEntry aRef( aTmp ); // ohne '$' suchen! StringHashEntry aRef( aTmp ); // search w/o '$'!
std::vector<Entry>::iterator itr; std::vector<Entry>::iterator itr;
for ( itr = maEntries.begin(); itr != maEntries.end(); ++itr ) for ( itr = maEntries.begin(); itr != maEntries.end(); ++itr )
{ {
if ( aRef == itr->aStrHashEntry ) if ( aRef == itr->aStrHashEntry )
{ {
// eventuell neuen Range Name aufbauen // setup new range if needed
if( itr->nAbsInd ) if( itr->nAbsInd )
rIndex = itr->nAbsInd; rIndex = itr->nAbsInd;
else else
......
...@@ -48,9 +48,9 @@ ScRTFImport::ScRTFImport( ScDocument* pDocP, const ScRange& rRange ) : ...@@ -48,9 +48,9 @@ ScRTFImport::ScRTFImport( ScDocument* pDocP, const ScRange& rRange ) :
ScRTFImport::~ScRTFImport() ScRTFImport::~ScRTFImport()
{ {
// Reihenfolge wichtig, sonst knallt's irgendwann irgendwo in irgendeinem Dtor! // ordering is important; get error in some other Dtor otherwise!
// Ist gewaehrleistet, da ScEEImport Basisklasse ist // Is correct, as ScEEImport is Base Class
delete (ScRTFParser*) mpParser; // vor EditEngine! delete (ScRTFParser*) mpParser; // before EditEngine!
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment