summaryrefslogtreecommitdiffstats
path: root/sc/source/filter/lotus/tool.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/filter/lotus/tool.cxx')
-rw-r--r--sc/source/filter/lotus/tool.cxx128
1 files changed, 64 insertions, 64 deletions
diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx
index 0e99b1140c2a..4891447624b6 100644
--- a/sc/source/filter/lotus/tool.cxx
+++ b/sc/source/filter/lotus/tool.cxx
@@ -60,10 +60,10 @@ extern sal_Char* pDummy2; // -> memory.cxx
extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff
extern CharSet eCharNach; // -> filter.cxx, Zeichenkonvertierung von->nach
-extern BOOL bFormInit; // -> memory.cxx, fuer GetFormHandle()
+extern sal_Bool bFormInit; // -> memory.cxx, fuer GetFormHandle()
//--------------------------------------------------------- GLOBALE VARIABLEN -
-BYTE nDefaultFormat; // -> op.cpp, Standard-Zellenformat
+sal_uInt8 nDefaultFormat; // -> op.cpp, Standard-Zellenformat
extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard;
extern ScProtectionAttr* pAttrUnprot;
@@ -121,14 +121,14 @@ void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString )
{
pDoc->ApplyAttr( nCol, nRow, nTab, *pJustify );
ScStringCell* pZelle = new ScStringCell( String( pString, pLotusRoot->eCharsetQ ) );
- pDoc->PutCell( nCol, nRow, nTab, pZelle, ( BOOL ) TRUE );
+ pDoc->PutCell( nCol, nRow, nTab, pZelle, ( sal_Bool ) sal_True );
}
}
-void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, BYTE nFormat, BYTE nSt )
+void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt )
{
// PREC: nSt = Standard-Dezimalstellenanzahl
pDoc->ApplyAttr( nCol, nRow, nTab, *( pValueFormCache->GetAttr( nFormat, nSt ) ) );
@@ -146,7 +146,7 @@ void InitPage( void )
}
-double SnumToDouble( INT16 nVal )
+double SnumToDouble( sal_Int16 nVal )
{
const double pFacts[ 8 ] = {
5000.0,
@@ -163,15 +163,15 @@ double SnumToDouble( INT16 nVal )
if( nVal & 0x0001 )
{
fVal = pFacts[ ( nVal >> 1 ) & 0x0007 ];
- fVal *= ( INT16 ) ( nVal >> 4 );
+ fVal *= ( sal_Int16 ) ( nVal >> 4 );
}
else
- fVal = ( INT16 ) ( nVal >> 1 );
+ fVal = ( sal_Int16 ) ( nVal >> 1 );
return fVal;
}
-double Snum32ToDouble( UINT32 nValue )
+double Snum32ToDouble( sal_uInt32 nValue )
{
double fValue, temp;
@@ -191,36 +191,36 @@ double Snum32ToDouble( UINT32 nValue )
}
-FormCache::FormCache( ScDocument* pDoc1, BYTE nNewDefaultFormat )
+FormCache::FormCache( ScDocument* pDoc1, sal_uInt8 nNewDefaultFormat )
{ // Default-Format ist 'Default'
nDefaultFormat = nNewDefaultFormat;
pFormTable = pDoc1->GetFormatTable();
- for( UINT16 nC = 0 ; nC < __nSize ; nC++ )
- bValid[ nC ] = FALSE;
+ for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ )
+ bValid[ nC ] = sal_False;
eLanguage = ScGlobal::eLnge;
}
FormCache::~FormCache()
{
- for( UINT16 nC = 0 ; nC < __nSize ; nC++ )
+ for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ )
delete aIdents[ nC ].GetAttr();
}
-SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
+SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt )
{
// neues Format erzeugen
- BYTE nL, nH; // Low-/High-Nibble
- BYTE nForm = nFormat;
+ sal_uInt8 nL, nH; // Low-/High-Nibble
+ sal_uInt8 nForm = nFormat;
String aFormString;
const sal_Char* pFormString = 0;
- INT16 eType = NUMBERFORMAT_ALL;
- UINT32 nIndex1;
- UINT32 nHandle;
- BOOL bDefault = FALSE;
+ sal_Int16 eType = NUMBERFORMAT_ALL;
+ sal_uInt32 nIndex1;
+ sal_uInt32 nHandle;
+ sal_Bool bDefault = sal_False;
//void GenerateFormat( aFormString, eType, COUNTRY_SYSTEM, LANGUAGE_SYSTEM,
- // BOOL bThousand, BOOL IsRed, UINT16 nPrecision, UINT16 nAnzLeading );
+ // sal_Bool bThousand, sal_Bool IsRed, sal_uInt16 nPrecision, sal_uInt16 nAnzLeading );
if( nForm == 0xFF ) // Default-Format?
nForm = nDefaultFormat;
@@ -237,49 +237,49 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
break;
case 0x01: // Exponentdarstellung (scientific notation)
//fExponent;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_SCIENTIFIC, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
break;
case 0x02: // Waehrungsdarstellung (currency)
//fMoney;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_CURRENCY, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
break;
case 0x03: // Prozent
//fPercent;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_PERCENT, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
break;
case 0x04: // Komma
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, TRUE, FALSE, nL, 1 );
+ eLanguage, sal_True, sal_False, nL, 1 );
break;
case 0x05: // frei
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
break;
case 0x06: // frei
//fStandard;nL;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
nIndex1 = 0;
break;
case 0x07: // Spezialformat
@@ -290,14 +290,14 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, TRUE, nSt, 1 );
+ eLanguage, sal_False, sal_True, nSt, 1 );
break;
case 0x01: // generelles Format
//fStandard;nSt;
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nSt, 1 );
+ eLanguage, sal_False, sal_False, nSt, 1 );
break;
case 0x02: // Datum: Tag, Monat, Jahr
//fDate;dfDayMonthYearLong;
@@ -320,7 +320,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
pFormString = "@";
break;
case 0x06: // versteckt
- //wFlag |= paHideAll;bSetFormat = FALSE;
+ //wFlag |= paHideAll;bSetFormat = sal_False;
eType = NUMBERFORMAT_NUMBER;
pFormString = "";
break;
@@ -334,33 +334,33 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
eType = NUMBERFORMAT_TIME;
pFormString = "HH:MM";
break;
- case 0x09: // Date, intern INT32 1
+ case 0x09: // Date, intern sal_Int32 1
//fDate;dfDayMonthYearLong;
eType = NUMBERFORMAT_DATE;
pFormString = "TT.MM.JJJJ";
break;
- case 0x0A: // Date, intern INT32 2
+ case 0x0A: // Date, intern sal_Int32 2
//fDate;dfDayMonthYearLong;
eType = NUMBERFORMAT_DATE;
pFormString = "TT.MM.JJJJ";
break;
- case 0x0B: // Time, intern INT32 1
+ case 0x0B: // Time, intern sal_Int32 1
//fTime;tfHourMinSec24;
eType = NUMBERFORMAT_TIME;
pFormString = "HH:MM:SS";
break;
- case 0x0C: // Time, intern INT32 2
+ case 0x0C: // Time, intern sal_Int32 2
//fTime;tfHourMinSec24;
eType = NUMBERFORMAT_TIME;
pFormString = "HH:MM:SS";
break;
case 0x0F: // Standardeinstellung
//fStandard;nSt;
- bDefault = TRUE;
+ bDefault = sal_True;
break;
default:
//fStandard;nSt;
- bDefault = TRUE;
+ bDefault = sal_True;
break;
}
break;
@@ -369,7 +369,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
nIndex1 = pFormTable->GetStandardFormat(
NUMBERFORMAT_NUMBER, eLanguage );
pFormTable->GenerateFormat( aFormString, nIndex1,
- eLanguage, FALSE, FALSE, nL, 1 );
+ eLanguage, sal_False, sal_False, nL, 1 );
nIndex1 = 0;
break;
}
@@ -386,7 +386,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt )
pFormTable->PutEntry( aFormString, nDummy, eType, nHandle, eLanguage );
}
- return new SfxUInt32Item( ATTR_VALUE_FORMAT, ( UINT32 ) nHandle );
+ return new SfxUInt32Item( ATTR_VALUE_FORMAT, ( sal_uInt32 ) nHandle );
}
@@ -400,10 +400,10 @@ void LotusRange::MakeHash( void )
// ******** nColE
// **************** nRowS
// **************** nRowE
- nHash = static_cast<UINT32>(nColStart);
- nHash += static_cast<UINT32>(nColEnd) << 6;
- nHash += static_cast<UINT32>(nRowStart) << 12;
- nHash += static_cast<UINT32>(nRowEnd ) << 16;
+ nHash = static_cast<sal_uInt32>(nColStart);
+ nHash += static_cast<sal_uInt32>(nColEnd) << 6;
+ nHash += static_cast<sal_uInt32>(nRowStart) << 12;
+ nHash += static_cast<sal_uInt32>(nRowEnd ) << 16;
}
@@ -445,17 +445,17 @@ LotusRangeList::LotusRangeList( void )
pSingRef = &aComplRef.Ref1;
pSingRef->nTab = pSingRef->nRelTab = 0;
- pSingRef->SetColRel( FALSE );
- pSingRef->SetRowRel( FALSE );
- pSingRef->SetTabRel( TRUE );
- pSingRef->SetFlag3D( FALSE );
+ pSingRef->SetColRel( sal_False );
+ pSingRef->SetRowRel( sal_False );
+ pSingRef->SetTabRel( sal_True );
+ pSingRef->SetFlag3D( sal_False );
pSingRef = &aComplRef.Ref2;
pSingRef->nTab = pSingRef->nRelTab = 0;
- pSingRef->SetColRel( FALSE );
- pSingRef->SetRowRel( FALSE );
- pSingRef->SetTabRel( TRUE );
- pSingRef->SetFlag3D( FALSE );
+ pSingRef->SetColRel( sal_False );
+ pSingRef->SetRowRel( sal_False );
+ pSingRef->SetTabRel( sal_True );
+ pSingRef->SetFlag3D( sal_False );
}
@@ -559,12 +559,12 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rC
if( rRef1.nCol == rRef2.nCol && rRef1.nRow == rRef2.nRow && rRef1.nTab == rRef2.nTab )
{
pScTokenArray->AddSingleReference( rCRD.Ref1 );
- pInsert->bSingleRef = TRUE;
+ pInsert->bSingleRef = sal_True;
}
else
{
pScTokenArray->AddDoubleReference( rCRD );
- pInsert->bSingleRef = FALSE;
+ pInsert->bSingleRef = sal_False;
}
ScRangeData* pData = new ScRangeData( pLotusRoot->pDoc, aScName, *pScTokenArray );
@@ -577,7 +577,7 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rC
}
-BOOL RangeNameBufferWK3::FindRel( const String& rRef, UINT16& rIndex )
+sal_Bool RangeNameBufferWK3::FindRel( const String& rRef, sal_uInt16& rIndex )
{
StringHashEntry aRef( rRef );
@@ -588,16 +588,16 @@ BOOL RangeNameBufferWK3::FindRel( const String& rRef, UINT16& rIndex )
if( aRef == pFind->aStrHashEntry )
{
rIndex = pFind->nRelInd;
- return TRUE;
+ return sal_True;
}
pFind = ( ENTRY* ) List::Next();
}
- return FALSE;
+ return sal_False;
}
-BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
+sal_Bool RangeNameBufferWK3::FindAbs( const String& rRef, sal_uInt16& rIndex )
{
String aTmp( rRef );
StringHashEntry aRef( aTmp.Erase( 0, 1 ) ); // ohne '$' suchen!
@@ -616,18 +616,18 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
ScSingleRefData* pRef = &pFind->aScComplexRefDataRel.Ref1;
pScTokenArray->Clear();
- pRef->SetColRel( FALSE );
- pRef->SetRowRel( FALSE );
- pRef->SetTabRel( TRUE );
+ pRef->SetColRel( sal_False );
+ pRef->SetRowRel( sal_False );
+ pRef->SetTabRel( sal_True );
if( pFind->bSingleRef )
pScTokenArray->AddSingleReference( *pRef );
else
{
pRef = &pFind->aScComplexRefDataRel.Ref2;
- pRef->SetColRel( FALSE );
- pRef->SetRowRel( FALSE );
- pRef->SetTabRel( TRUE );
+ pRef->SetColRel( sal_False );
+ pRef->SetRowRel( sal_False );
+ pRef->SetTabRel( sal_True );
pScTokenArray->AddDoubleReference( pFind->aScComplexRefDataRel );
}
@@ -640,12 +640,12 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex )
pLotusRoot->pScRangeName->Insert( pData );
}
- return TRUE;
+ return sal_True;
}
pFind = ( ENTRY* ) List::Next();
}
- return FALSE;
+ return sal_False;
}