[Libreoffice-commits] .: 3 commits - sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Tue Sep 18 15:46:58 PDT 2012
sc/source/filter/lotus/lotimpop.cxx | 42 +++++++++++++--------------
sc/source/filter/lotus/op.cxx | 56 ++++++++++++++++++------------------
2 files changed, 49 insertions(+), 49 deletions(-)
New commits:
commit b91d2753cd5ee89e4dc124d1cbd5ff2fb03bc2cf
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Sep 19 00:44:43 2012 +0200
tabs to spaces + whitespace clean-up
Change-Id: I0ebe036a53c969ba252469d10d05cdc7e2e07176
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index f6c8279..bcd505c 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -63,13 +63,13 @@
#include <vector>
#include <map>
-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 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
-static sal_uInt16 nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * 10 );
+static sal_uInt16 nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * 10 );
extern std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool;
@@ -102,7 +102,7 @@ void OP_Integer( SvStream& r, sal_uInt16 /*n*/ )
if (ValidColRow( static_cast<SCCOL>(nCol), nRow))
{
- ScValueCell* pZelle = new ScValueCell( ( double ) nValue );
+ ScValueCell* pZelle = new ScValueCell( ( double ) nValue );
pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, true );
// 0 Stellen nach'm Komma!
@@ -123,7 +123,7 @@ void OP_Number( SvStream& r, sal_uInt16 /*n*/ )
if (ValidColRow( static_cast<SCCOL>(nCol), nRow))
{
fValue = ::rtl::math::round( fValue, 15 );
- ScValueCell* pZelle = new ScValueCell( fValue );
+ ScValueCell* pZelle = new ScValueCell( fValue );
pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, true );
SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat );
@@ -178,7 +178,7 @@ void OP_Formula( SvStream& r, sal_uInt16 /*n*/ )
if (ValidColRow( static_cast<SCCOL>(nCol), nRow))
{
- ScFormulaCell* pZelle = new ScFormulaCell( pLotusRoot->pDoc, aAddress, pErg );
+ ScFormulaCell* pZelle = new ScFormulaCell( pLotusRoot->pDoc, aAddress, pErg );
pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE );
@@ -221,13 +221,13 @@ void OP_NamedRange( SvStream& r, sal_uInt16 /*n*/ )
sal_Char cPuffer[ 16+1 ];
r.Read( cPuffer, 16 );
- cPuffer[ 16 ] = 0;
+ cPuffer[ 16 ] = 0;
r >> nColSt >> nRowSt >> nColEnd >> nRowEnd;
if (ValidColRow( static_cast<SCCOL>(nColSt), nRowSt) && ValidColRow( static_cast<SCCOL>(nColEnd), nRowEnd))
{
- LotusRange* pRange;
+ LotusRange* pRange;
if( nColSt == nColEnd && nRowSt == nRowEnd )
pRange = new LotusRange( static_cast<SCCOL> (nColSt), static_cast<SCROW> (nRowSt) );
@@ -237,14 +237,14 @@ void OP_NamedRange( SvStream& r, sal_uInt16 /*n*/ )
sal_Char cBuf[sizeof(cPuffer)+1];
if( isdigit( *cPuffer ) )
- { // erstes Zeichen im Namen eine Zahl -> 'A' vor Namen setzen
+ { // erstes Zeichen im Namen eine Zahl -> 'A' vor Namen setzen
cBuf[0] = 'A';
strcpy( cBuf + 1, cPuffer ); // #100211# - checked
}
else
strcpy( cBuf, cPuffer ); // #100211# - checked
- String aTmp( cBuf, pLotusRoot->eCharsetQ );
+ String aTmp( cBuf, pLotusRoot->eCharsetQ );
ScfTools::ConvertToScDefinedName( aTmp );
@@ -267,7 +267,7 @@ void OP_SymphNamedRange( SvStream& r, sal_uInt16 /*n*/ )
if (ValidColRow( static_cast<SCCOL>(nColSt), nRowSt) && ValidColRow( static_cast<SCCOL>(nColEnd), nRowEnd))
{
- LotusRange* pRange;
+ LotusRange* pRange;
if( nType )
pRange = new LotusRange( static_cast<SCCOL> (nColSt), static_cast<SCROW> (nRowSt) );
@@ -277,14 +277,14 @@ void OP_SymphNamedRange( SvStream& r, sal_uInt16 /*n*/ )
sal_Char cBuf[sizeof(cPuffer)+1];
if( isdigit( *cPuffer ) )
- { // erstes Zeichen im Namen eine Zahl -> 'A' vor Namen setzen
+ { // erstes Zeichen im Namen eine Zahl -> 'A' vor Namen setzen
cBuf[0] = 'A';
strcpy( cBuf + 1, cPuffer ); // #100211# - checked
}
else
strcpy( cBuf, cPuffer ); // #100211# - checked
- String aTmp( cBuf, pLotusRoot->eCharsetQ );
+ String aTmp( cBuf, pLotusRoot->eCharsetQ );
ScfTools::ConvertToScDefinedName( aTmp );
pLotusRoot->pRangeNames->Append( pRange, aTmp );
@@ -415,16 +415,16 @@ void OP_Formula123( SvStream& r, sal_uInt16 n )
r.SeekRel( 8 ); // Result- jump over
const ScTokenArray* pErg;
- sal_Int32 nBytesLeft = (n > 12) ? n - 12 : 0;
- ScAddress aAddress( nCol, nRow, nTab );
+ sal_Int32 nBytesLeft = (n > 12) ? n - 12 : 0;
+ ScAddress aAddress( nCol, nRow, nTab );
- LotusToSc aConv( r, pLotusRoot->eCharsetQ, sal_True );
+ LotusToSc aConv( r, pLotusRoot->eCharsetQ, sal_True );
aConv.Reset( aAddress );
aConv.Convert( pErg, nBytesLeft );
if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab <= pDoc->GetMaxTableNumber())
{
- ScFormulaCell* pCell = new ScFormulaCell( pLotusRoot->pDoc, aAddress, pErg );
+ ScFormulaCell* pCell = new ScFormulaCell( pLotusRoot->pDoc, aAddress, pErg );
pCell->AddRecalcMode( RECALCMODE_ONLOAD_ONCE );
@@ -449,8 +449,8 @@ void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ )
void OP_Note123( SvStream& r, sal_uInt16 n)
{
- sal_uInt8 nTab, nCol;
- sal_uInt16 nRow;
+ sal_uInt8 nTab, nCol;
+ sal_uInt16 nRow;
r >> nRow >> nTab >> nCol;
n -= (n > 4) ? 4 : n;
@@ -476,7 +476,7 @@ void OP_HorAlign123( sal_uInt8 nAlignPattern, SfxItemSet& rPatternItemSet )
nAlignPattern = ( nAlignPattern & 0x07);
switch (nAlignPattern)
- {
+ {
case 1:
rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ) );
break;
@@ -486,13 +486,13 @@ void OP_HorAlign123( sal_uInt8 nAlignPattern, SfxItemSet& rPatternItemSet )
case 3:
rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY) );
break;
- case 4:
+ case 4:
rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ) );
break;
case 6:
rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_BLOCK, ATTR_HOR_JUSTIFY ) );
break;
- default:
+ default:
rPatternItemSet.Put( SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ) );
break;
}
commit 09ce51c3e3151ac73a306518deb81119fa159775
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Wed Sep 19 00:37:55 2012 +0200
import values and formulas from lotus-123, fdo#55066
Change-Id: Ia403c849ef537c7f7804f907889110b8096c0bb6
diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx
index 4bda976..f6c8279 100644
--- a/sc/source/filter/lotus/op.cxx
+++ b/sc/source/filter/lotus/op.cxx
@@ -397,7 +397,7 @@ void OP_Number123( SvStream& r, sal_uInt16 /*n*/ )
r >> nRow >> nTab >> nCol >> nValue;
- if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab < pDoc->GetMaxTableNumber())
+ if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab <= pDoc->GetMaxTableNumber())
{
double fValue = Snum32ToDouble( nValue );
@@ -422,7 +422,7 @@ void OP_Formula123( SvStream& r, sal_uInt16 n )
aConv.Reset( aAddress );
aConv.Convert( pErg, nBytesLeft );
- if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab < pDoc->GetMaxTableNumber())
+ if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab <= pDoc->GetMaxTableNumber())
{
ScFormulaCell* pCell = new ScFormulaCell( pLotusRoot->pDoc, aAddress, pErg );
@@ -440,7 +440,7 @@ void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ )
r >> nRow >> nTab >> nCol >> dValue;
- if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab < pDoc->GetMaxTableNumber())
+ if (ValidColRow( static_cast<SCCOL>(nCol), nRow) && nTab <= pDoc->GetMaxTableNumber())
{
ScValueCell *pCell = new ScValueCell(dValue);
pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, true );
commit cbd22a986a64634d332b6cf85271b14c7bf7771c
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Tue Sep 18 23:15:22 2012 +0200
tabs to spaces
Change-Id: I06376afcfe2a08c611e5426521ee9bac7f1637da
diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx
index a35892d..e77fd77 100644
--- a/sc/source/filter/lotus/lotimpop.cxx
+++ b/sc/source/filter/lotus/lotimpop.cxx
@@ -63,10 +63,10 @@ LOTUS_ROOT::LOTUS_ROOT( ScDocument* pDocP, CharSet eQ )
LOTUS_ROOT::~LOTUS_ROOT()
{
- delete pRangeNames;
- delete pRngNmBffWK3;
- delete pFontBuff;
- delete pAttrTable;
+ delete pRangeNames;
+ delete pRngNmBffWK3;
+ delete pFontBuff;
+ delete pAttrTable;
}
@@ -81,7 +81,7 @@ ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) :
// good point to start locking of import lotus
aLotImpSemaphore.acquire();
- pLotusRoot = new LOTUS_ROOT( pDoc, eQ);
+ pLotusRoot = new LOTUS_ROOT( pDoc, eQ);
}
@@ -139,7 +139,7 @@ void ImportLotus::Columnwidth( sal_uInt16 nRecLen )
OSL_ENSURE( nRecLen >= 4, "*ImportLotus::Columnwidth(): Record zu kurz!" );
sal_uInt8 nLTab, nWindow2;
- sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
+ sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
Read( nLTab );
Read( nWindow2 );
@@ -171,7 +171,7 @@ void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen )
OSL_ENSURE( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record zu kurz!" );
sal_uInt8 nLTab, nWindow2;
- sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
+ sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 2;
Read( nLTab );
Read( nWindow2 );
@@ -200,10 +200,10 @@ void ImportLotus::Userrange( void )
Read( nRangeType );
- sal_Char aBuffer[ 17 ];
- pIn->Read( aBuffer, 16 );
- aBuffer[ 16 ] = 0;
- String aName( aBuffer, eQuellChar );
+ sal_Char aBuffer[ 17 ];
+ pIn->Read( aBuffer, 16 );
+ aBuffer[ 16 ] = 0;
+ String aName( aBuffer, eQuellChar );
Read( aScRange );
@@ -282,7 +282,7 @@ ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n )
Read( aAddr );
Skip( 10 );
- n -= (n > 14) ? 14 : n;
+ n -= (n > 14) ? 14 : n;
const ScTokenArray* pErg;
sal_Int32 nRest = n;
@@ -313,7 +313,7 @@ void ImportLotus::RowPresentation( sal_uInt16 nRecLen )
sal_uInt8 nLTab, nFlags;
sal_uInt16 nRow, nHeight;
- sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 8;
+ sal_uInt16 nCnt = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 8;
Read( nLTab );
Skip( 1 );
@@ -364,33 +364,33 @@ void ImportLotus::Font_Face( void )
Read( nNum );
- if( nNum >= LotusFontBuffer::nSize )
- return; // nonsense
+ if( nNum >= LotusFontBuffer::nSize )
+ return; // nonsense
Read( aName );
- pLotusRoot->pFontBuff->SetName( nNum, aName );
+ pLotusRoot->pFontBuff->SetName( nNum, aName );
}
void ImportLotus::Font_Type( void )
{
- for( sal_uInt16 nCnt = 0 ; nCnt < LotusFontBuffer::nSize ; nCnt++ )
+ for( sal_uInt16 nCnt = 0 ; nCnt < LotusFontBuffer::nSize ; nCnt++ )
{
sal_uInt16 nType;
Read( nType );
- pLotusRoot->pFontBuff->SetType( nCnt, nType );
+ pLotusRoot->pFontBuff->SetType( nCnt, nType );
}
}
void ImportLotus::Font_Ysize( void )
{
- for( sal_uInt16 nCnt = 0 ; nCnt < LotusFontBuffer::nSize ; nCnt++ )
+ for( sal_uInt16 nCnt = 0 ; nCnt < LotusFontBuffer::nSize ; nCnt++ )
{
sal_uInt16 nSize;
Read( nSize );
- pLotusRoot->pFontBuff->SetHeight( nCnt, nSize );
+ pLotusRoot->pFontBuff->SetHeight( nCnt, nSize );
}
}
@@ -401,7 +401,7 @@ void ImportLotus::_Row( const sal_uInt16 nRecLen )
sal_uInt16 nRow;
sal_uInt16 nHeight;
- sal_uInt16 nCntDwn = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 5;
+ sal_uInt16 nCntDwn = (nRecLen < 4) ? 0 : ( nRecLen - 4 ) / 5;
SCCOL nColCnt = 0;
sal_uInt8 nRepeats;
LotAttrWK3 aAttr;
More information about the Libreoffice-commits
mailing list