diff options
Diffstat (limited to 'sc/source/filter/excel')
36 files changed, 730 insertions, 730 deletions
diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx index b62ebea9d..c6fa3afc7 100644 --- a/sc/source/filter/excel/colrowst.cxx +++ b/sc/source/filter/excel/colrowst.cxx @@ -282,7 +282,7 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab ) // hide the columns for( SCCOL nScCol = 0; nScCol <= MAXCOL; ++nScCol ) if( ::get_flag( maColFlags[ nScCol ], EXC_COLROW_HIDDEN ) ) - rDoc.ShowCol( nScCol, nScTab, FALSE ); + rDoc.ShowCol( nScCol, nScTab, sal_False ); // #i38093# rows hidden by filter need extra flag SCROW nFirstFilterScRow = SCROW_MAX; @@ -304,7 +304,7 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab ) if( ::get_flag( maRowFlags[ nScRow ], EXC_COLROW_HIDDEN ) ) { // hide the row - rDoc.ShowRow( nScRow, nScTab, FALSE ); + rDoc.ShowRow( nScRow, nScTab, sal_False ); // #i38093# rows hidden by filter need extra flag if( (nFirstFilterScRow <= nScRow) && (nScRow <= nLastFilterScRow) ) rDoc.SetRowFiltered(nScRow, nScRow, nScTab, true); @@ -313,6 +313,6 @@ void XclImpColRowSettings::ConvertHiddenFlags( SCTAB nScTab ) // #i47438# if default row format is hidden, hide remaining rows if( ::get_flag( mnDefRowFlags, EXC_DEFROW_HIDDEN ) && (mnLastScRow < MAXROW) ) - rDoc.ShowRows( mnLastScRow + 1, MAXROW, nScTab, FALSE ); + rDoc.ShowRows( mnLastScRow + 1, MAXROW, nScTab, sal_False ); } diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index ca7a5fb82..afb65a04c 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -196,8 +196,8 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList ) SCTAB nC; String aTmpString; SCTAB nScTabCount = rTabInfo.GetScTabCount(); - UINT16 nExcTabCount = rTabInfo.GetXclTabCount(); - UINT16 nCodenames = static_cast< UINT16 >( GetExtDocOptions().GetCodeNameCount() ); + sal_uInt16 nExcTabCount = rTabInfo.GetXclTabCount(); + sal_uInt16 nCodenames = static_cast< sal_uInt16 >( GetExtDocOptions().GetCodeNameCount() ); SfxObjectShell* pShell = GetDocShell(); sal_uInt16 nWriteProtHash = pShell ? pShell->GetModifyPasswordHash() : 0; diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index 159e88f97..fcb846f10 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 SotStorageStreamRef xStrgStrm; if( SotStorage::IsStorageFile( pMedStrm ) ) { - xRootStrg = new SotStorage( pMedStrm, FALSE ); + xRootStrg = new SotStorage( pMedStrm, sal_False ); if( xRootStrg->GetError() ) xRootStrg = 0; } @@ -217,10 +217,10 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument static FltError lcl_ExportExcelBiff( SfxMedium& rMedium, ScDocument *pDocument, - SvStream* pMedStrm, BOOL bBiff8, CharSet eNach ) + SvStream* pMedStrm, sal_Bool bBiff8, CharSet eNach ) { // try to open an OLE storage - SotStorageRef xRootStrg = new SotStorage( pMedStrm, FALSE ); + SotStorageRef xRootStrg = new SotStorage( pMedStrm, sal_False ); if( xRootStrg->GetError() ) return eERR_OPEN; // create BIFF dependent strings diff --git a/sc/source/filter/excel/excform.cxx b/sc/source/filter/excel/excform.cxx index cf22c81a3..e8cae6ee8 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -45,8 +45,8 @@ using ::std::vector; -const UINT16 ExcelToSc::nRowMask = 0x3FFF; -const UINT16 ExcelToSc::nLastInd = 399; +const sal_uInt16 ExcelToSc::nRowMask = 0x3FFF; +const sal_uInt16 ExcelToSc::nLastInd = 399; @@ -54,16 +54,16 @@ const UINT16 ExcelToSc::nLastInd = 399; void ImportExcel::Formula25() { XclAddress aXclPos; - UINT16 nXF = 0, nFormLen; + sal_uInt16 nXF = 0, nFormLen; double fCurVal; - BYTE nAttr0, nFlag0; - BOOL bShrFmla; + sal_uInt8 nAttr0, nFlag0; + sal_Bool bShrFmla; aIn >> aXclPos; if( GetBiff() == EXC_BIFF2 ) {// BIFF2 - BYTE nDummy; + sal_uInt8 nDummy; aIn.Ignore( 3 ); @@ -71,7 +71,7 @@ void ImportExcel::Formula25() aIn.Ignore( 1 ); aIn >> nDummy; nFormLen = nDummy; - bShrFmla = FALSE; + bShrFmla = sal_False; nAttr0 = 0x01; // Always calculate } else @@ -99,9 +99,9 @@ void ImportExcel::Formula3() void ImportExcel::Formula4() { XclAddress aXclPos; - UINT16 nXF, nFormLen; + sal_uInt16 nXF, nFormLen; double fCurVal; - BYTE nFlag0; + sal_uInt8 nFlag0; aIn >> aXclPos >> nXF >> fCurVal >> nFlag0; aIn.Ignore( 1 ); @@ -109,12 +109,12 @@ void ImportExcel::Formula4() nLastXF = nXF; - Formula( aXclPos, nXF, nFormLen, fCurVal, FALSE ); + Formula( aXclPos, nXF, nFormLen, fCurVal, sal_False ); } void ImportExcel::Formula( const XclAddress& rXclPos, - UINT16 nXF, UINT16 nFormLen, double& rCurVal, BOOL bShrFmla ) + sal_uInt16 nXF, sal_uInt16 nFormLen, double& rCurVal, sal_Bool bShrFmla ) { ConvErr eErr = ConvOK; @@ -123,14 +123,14 @@ void ImportExcel::Formula( const XclAddress& rXclPos, { // jetzt steht Lesemarke auf Formel, Laenge in nFormLen const ScTokenArray* pErgebnis = 0; - BOOL bConvert; + sal_Bool bConvert; pFormConv->Reset( aScPos ); if( bShrFmla ) bConvert = !pFormConv->GetShrFmla( pErgebnis, maStrm, nFormLen ); else - bConvert = TRUE; + bConvert = sal_True; if( bConvert ) eErr = pFormConv->Convert( pErgebnis, maStrm, nFormLen, true, FT_CellFormula); @@ -140,7 +140,7 @@ void ImportExcel::Formula( const XclAddress& rXclPos, if( pErgebnis ) { pZelle = new ScFormulaCell( pD, aScPos, pErgebnis ); - pD->PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pZelle, (BOOL)TRUE ); + pD->PutCell( aScPos.Col(), aScPos.Row(), aScPos.Tab(), pZelle, (sal_Bool)sal_True ); } else { @@ -201,23 +201,23 @@ void ExcelToSc::GetDummy( const ScTokenArray*& pErgebnis ) ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT ) { RootData& rR = GetOldRoot(); - BYTE nOp, nLen, nByte; - UINT16 nUINT16; - INT16 nINT16; + sal_uInt8 nOp, nLen, nByte; + sal_uInt16 nUINT16; + sal_Int16 nINT16; double fDouble; String aString; - BOOL bError = FALSE; - BOOL bArrayFormula = FALSE; + sal_Bool bError = sal_False; + sal_Bool bArrayFormula = sal_False; TokenId nMerk0; - const BOOL bRangeName = eFT == FT_RangeName; - const BOOL bSharedFormula = eFT == FT_SharedFormula; - const BOOL bRNorSF = bRangeName || bSharedFormula; + const sal_Bool bRangeName = eFT == FT_RangeName; + const sal_Bool bSharedFormula = eFT == FT_SharedFormula; + const sal_Bool bRNorSF = bRangeName || bSharedFormula; ScSingleRefData aSRD; ScComplexRefData aCRD; ExtensionTypeVec aExtensions; - bExternName = FALSE; + bExternName = sal_False; if( eStatus != ConvOK ) { @@ -255,7 +255,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s aIn.Ignore( nUINT16 ); - bArrayFormula = TRUE; + bArrayFormula = sal_True; break; case 0x03: // Addition [312 264] aStack >> nMerk0; @@ -374,8 +374,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s break; case 0x19: // Special Attribute [327 279] { - UINT16 nData, nFakt; - BYTE nOpt; + sal_uInt16 nData, nFakt; + sal_uInt8 nOpt; aIn >> nOpt; @@ -545,7 +545,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s aSRD.nCol = static_cast<SCsCOL>(nByte); aSRD.nRow = nUINT16 & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName ); @@ -556,8 +556,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x6A: case 0x2A: // Deleted Cell Reference [323 273] // no information which part is deleted, set both - aSRD.SetColDeleted( TRUE ); - aSRD.SetRowDeleted( TRUE ); + aSRD.SetColDeleted( sal_True ); + aSRD.SetRowDeleted( sal_True ); } aStack << aPool.Store( aSRD ); @@ -569,16 +569,16 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x6B: case 0x2B: // Deleted Area Refernce [323 273] { - UINT16 nRowFirst, nRowLast; - UINT8 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt8 nColFirst, nColLast; ScSingleRefData& rSRef1 = aCRD.Ref1; ScSingleRefData& rSRef2 = aCRD.Ref2; aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast; rSRef1.nRelTab = rSRef2.nRelTab = 0; - rSRef1.SetTabRel( TRUE ); - rSRef2.SetTabRel( TRUE ); + rSRef1.SetTabRel( sal_True ); + rSRef2.SetTabRel( sal_True ); rSRef1.SetFlag3D( bRangeName ); rSRef2.SetFlag3D( bRangeName ); @@ -596,10 +596,10 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x6B: case 0x2B: // Deleted Area Refernce [323 273] // no information which part is deleted, set all - rSRef1.SetColDeleted( TRUE ); - rSRef1.SetRowDeleted( TRUE ); - rSRef2.SetColDeleted( TRUE ); - rSRef2.SetRowDeleted( TRUE ); + rSRef1.SetColDeleted( sal_True ); + rSRef1.SetRowDeleted( sal_True ); + rSRef2.SetColDeleted( sal_True ); + rSRef2.SetRowDeleted( sal_True ); } aStack << aPool.Store( aCRD ); @@ -627,7 +627,7 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s aIn >> nUINT16 >> nByte; // >> Attribute, Row >> Col aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel( nUINT16, nByte, aSRD, bRNorSF ); @@ -639,12 +639,12 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x6D: case 0x2D: // Area Reference Within a Name [324 ] { // Area Reference Within a Shared Formula[ 274] - UINT16 nRowFirst, nRowLast; - UINT8 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt8 nColFirst, nColLast; aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0; - aCRD.Ref1.SetTabRel( TRUE ); - aCRD.Ref2.SetTabRel( TRUE ); + aCRD.Ref1.SetTabRel( sal_True ); + aCRD.Ref2.SetTabRel( sal_True ); aCRD.Ref1.SetFlag3D( bRangeName ); aCRD.Ref2.SetFlag3D( bRangeName ); @@ -692,12 +692,12 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s { const ExtName* pExtName = rR.pExtNameBuff->GetNameByIndex( nINT16, nUINT16 ); if( pExtName && pExtName->IsDDE() && - rR.pExtSheetBuff->IsLink( ( UINT16 ) nINT16 ) ) + rR.pExtSheetBuff->IsLink( ( sal_uInt16 ) nINT16 ) ) { String aAppl, aExtDoc; TokenId nPar1, nPar2; - rR.pExtSheetBuff->GetLink( ( UINT16 ) nINT16 , aAppl, aExtDoc ); + rR.pExtSheetBuff->GetLink( ( sal_uInt16 ) nINT16 , aAppl, aExtDoc ); nPar1 = aPool.Store( aAppl ); nPar2 = aPool.Store( aExtDoc ); nMerk0 = aPool.Store( pExtName->aName ); @@ -722,9 +722,9 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x7C: case 0x3C: // Deleted 3-D Cell Reference [ 277] { - UINT16 nTabFirst, nTabLast, nRow; - INT16 nExtSheet; - BYTE nCol; + sal_uInt16 nTabFirst, nTabLast, nRow; + sal_Int16 nExtSheet; + sal_uInt8 nCol; aIn >> nExtSheet; aIn.Ignore( 8 ); @@ -748,8 +748,8 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s if( nExtSheet <= 0 ) { // in aktuellem Workbook aSRD.nTab = static_cast<SCTAB>(nTabFirst); - aSRD.SetFlag3D( TRUE ); - aSRD.SetTabRel( FALSE ); + aSRD.SetFlag3D( sal_True ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel( nRow, nCol, aSRD, bRangeName ); @@ -759,11 +759,11 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x7C: case 0x3C: // Deleted 3-D Cell Reference [ 277] // no information which part is deleted, set both - aSRD.SetColDeleted( TRUE ); - aSRD.SetRowDeleted( TRUE ); + aSRD.SetColDeleted( sal_True ); + aSRD.SetRowDeleted( sal_True ); } if ( !ValidTab(static_cast<SCTAB>(nTabFirst)) ) - aSRD.SetTabDeleted( TRUE ); + aSRD.SetTabDeleted( sal_True ); if( nTabLast != nTabFirst ) { @@ -785,9 +785,9 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x7D: case 0x3D: // Deleted 3-D Area Reference [ 277] { - UINT16 nTabFirst, nTabLast, nRowFirst, nRowLast; - INT16 nExtSheet; - BYTE nColFirst, nColLast; + sal_uInt16 nTabFirst, nTabLast, nRowFirst, nRowLast; + sal_Int16 nExtSheet; + sal_uInt8 nColFirst, nColLast; aIn >> nExtSheet; aIn.Ignore( 8 ); @@ -818,10 +818,10 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s rR1.nTab = static_cast<SCTAB>(nTabFirst); rR2.nTab = static_cast<SCTAB>(nTabLast); - rR1.SetFlag3D( TRUE ); - rR1.SetTabRel( FALSE ); + rR1.SetFlag3D( sal_True ); + rR1.SetTabRel( sal_False ); rR2.SetFlag3D( nTabFirst != nTabLast ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -837,21 +837,21 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s case 0x7D: case 0x3D: // Deleted 3-D Area Reference [ 277] // no information which part is deleted, set all - rR1.SetColDeleted( TRUE ); - rR1.SetRowDeleted( TRUE ); - rR2.SetColDeleted( TRUE ); - rR2.SetRowDeleted( TRUE ); + rR1.SetColDeleted( sal_True ); + rR1.SetRowDeleted( sal_True ); + rR2.SetColDeleted( sal_True ); + rR2.SetRowDeleted( sal_True ); } if ( !ValidTab(static_cast<SCTAB>(nTabFirst)) ) - rR1.SetTabDeleted( TRUE ); + rR1.SetTabDeleted( sal_True ); if ( !ValidTab(static_cast<SCTAB>(nTabLast)) ) - rR2.SetTabDeleted( TRUE ); + rR2.SetTabDeleted( sal_True ); aStack << aPool.Store( aCRD ); }//ENDE in aktuellem Workbook } break; - default: bError = TRUE; + default: bError = sal_True; } bError |= !aIn.IsValid(); } @@ -901,21 +901,21 @@ ConvErr ExcelToSc::Convert( const ScTokenArray*& pErgebnis, XclImpStream& aIn, s ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen, const FORMULA_TYPE eFT ) { RootData& rR = GetOldRoot(); - BYTE nOp, nLen; + sal_uInt8 nOp, nLen; sal_Size nIgnore; - UINT16 nUINT16; - UINT8 nByte; - BOOL bError = FALSE; - BOOL bArrayFormula = FALSE; - const BOOL bRangeName = eFT == FT_RangeName; - const BOOL bSharedFormula = eFT == FT_SharedFormula; - const BOOL bRNorSF = bRangeName || bSharedFormula; + sal_uInt16 nUINT16; + sal_uInt8 nByte; + sal_Bool bError = sal_False; + sal_Bool bArrayFormula = sal_False; + const sal_Bool bRangeName = eFT == FT_RangeName; + const sal_Bool bSharedFormula = eFT == FT_SharedFormula; + const sal_Bool bRNorSF = bRangeName || bSharedFormula; ScSingleRefData aSRD; ScComplexRefData aCRD; aCRD.Ref1.nTab = aCRD.Ref2.nTab = aEingPos.Tab(); - bExternName = FALSE; + bExternName = sal_False; if( eStatus != ConvOK ) { @@ -942,7 +942,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal case 0x01: // Array Formula [325 ] // Array Formula or Shared Formula [ 277] nIgnore = (meBiff == EXC_BIFF2) ? 3 : 4; - bArrayFormula = TRUE; + bArrayFormula = sal_True; break; case 0x02: // Data Table [325 277] nIgnore = (meBiff == EXC_BIFF2) ? 3 : 4; @@ -974,8 +974,8 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal break; case 0x19: // Special Attribute [327 279] { - UINT16 nData, nFakt; - BYTE nOpt; + sal_uInt16 nData, nFakt; + sal_uInt8 nOpt; aIn >> nOpt; @@ -1061,7 +1061,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal aSRD.nCol = static_cast<SCsCOL>(nByte); aSRD.nRow = nUINT16 & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel( nUINT16, nByte, aSRD, bRangeName ); @@ -1072,16 +1072,16 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal case 0x65: case 0x25: // Area Reference [320 270] { - UINT16 nRowFirst, nRowLast; - UINT8 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt8 nColFirst, nColLast; ScSingleRefData &rSRef1 = aCRD.Ref1; ScSingleRefData &rSRef2 = aCRD.Ref2; aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast; rSRef1.nRelTab = rSRef2.nRelTab = 0; - rSRef1.SetTabRel( TRUE ); - rSRef2.SetTabRel( TRUE ); + rSRef1.SetTabRel( sal_True ); + rSRef2.SetTabRel( sal_True ); rSRef1.SetFlag3D( bRangeName ); rSRef2.SetFlag3D( bRangeName ); @@ -1125,7 +1125,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal aIn >> nUINT16 >> nByte; // >> Attribute, Row >> Col aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel( nUINT16, nByte, aSRD, bRNorSF ); @@ -1137,12 +1137,12 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal case 0x6D: case 0x2D: // Area Reference Within a Name [324 ] { // Area Reference Within a Shared Formula[ 274] - UINT16 nRowFirst, nRowLast; - UINT8 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt8 nColFirst, nColLast; aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0; - aCRD.Ref1.SetTabRel( TRUE ); - aCRD.Ref2.SetTabRel( TRUE ); + aCRD.Ref1.SetTabRel( sal_True ); + aCRD.Ref2.SetTabRel( sal_True ); aCRD.Ref1.SetFlag3D( bRangeName ); aCRD.Ref2.SetFlag3D( bRangeName ); @@ -1184,9 +1184,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal case 0x7A: case 0x3A: // 3-D Cell Reference [ 275] { - UINT16 nTabFirst, nTabLast, nRow; - INT16 nExtSheet; - BYTE nCol; + sal_uInt16 nTabFirst, nTabLast, nRow; + sal_Int16 nExtSheet; + sal_uInt8 nCol; aIn >> nExtSheet; aIn.Ignore( 8 ); @@ -1210,10 +1210,10 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal if( nExtSheet <= 0 ) {// in aktuellem Workbook - BOOL b3D = ( static_cast<SCTAB>(nTabFirst) != aEingPos.Tab() ) || bRangeName; + sal_Bool b3D = ( static_cast<SCTAB>(nTabFirst) != aEingPos.Tab() ) || bRangeName; aSRD.nTab = static_cast<SCTAB>(nTabFirst); aSRD.SetFlag3D( b3D ); - aSRD.SetTabRel( FALSE ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel( nRow, nCol, aSRD, bRangeName ); @@ -1225,7 +1225,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal aCRD.Ref2.nTab = static_cast<SCTAB>(nTabLast); b3D = ( static_cast<SCTAB>(nTabLast) != aEingPos.Tab() ); aCRD.Ref2.SetFlag3D( b3D ); - aCRD.Ref2.SetTabRel( FALSE ); + aCRD.Ref2.SetTabRel( sal_False ); rRangeList.Append( aCRD ); } else @@ -1238,9 +1238,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal case 0x7B: case 0x3B: // 3-D Area Reference [ 276] { - UINT16 nTabFirst, nTabLast, nRowFirst, nRowLast; - INT16 nExtSheet; - BYTE nColFirst, nColLast; + sal_uInt16 nTabFirst, nTabLast, nRowFirst, nRowLast; + sal_Int16 nExtSheet; + sal_uInt8 nColFirst, nColLast; aIn >> nExtSheet; aIn.Ignore( 8 ); @@ -1272,9 +1272,9 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal rR1.nTab = static_cast<SCTAB>(nTabFirst); rR2.nTab = static_cast<SCTAB>(nTabLast); rR1.SetFlag3D( ( static_cast<SCTAB>(nTabFirst) != aEingPos.Tab() ) || bRangeName ); - rR1.SetTabRel( FALSE ); + rR1.SetTabRel( sal_False ); rR2.SetFlag3D( ( static_cast<SCTAB>(nTabLast) != aEingPos.Tab() ) || bRangeName ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -1298,7 +1298,7 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal case 0x3D: // Deleted 3-D Area Reference [ 277] nIgnore = 20; break; - default: bError = TRUE; + default: bError = sal_True; } bError |= !aIn.IsValid(); @@ -1329,11 +1329,11 @@ ConvErr ExcelToSc::ConvertExternName( const ScTokenArray*& /*rpArray*/, XclImpSt return ConvErrNi; } -BOOL ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) +sal_Bool ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ) { DBG_ASSERT_BIFF( GetBiff() == EXC_BIFF5 ); if( GetBiff() != EXC_BIFF5 ) - return FALSE; + return sal_False; sal_uInt8 nOp; sal_uInt16 nRow1, nRow2; @@ -1518,8 +1518,8 @@ BOOL ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Si break; case 0x19: // Special Attribute [327 279] { - BYTE nOpt; - UINT16 nData; + sal_uInt8 nOpt; + sal_uInt16 nData; rStrm >> nOpt >> nData; if( nOpt & 0x04 ) nSeek = nData * 2 + 2; @@ -1537,7 +1537,7 @@ BOOL ExcelToSc::GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Si void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCount ) { TokenId eParam[ 256 ]; - INT32 nLauf; + sal_Int32 nLauf; if( eId == ocCeil || eId == ocFloor ) { @@ -1574,10 +1574,10 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo if( nAnz > 0 ) { // attention: 0 = last parameter, nAnz-1 = first parameter - INT16 nNull = -1; // skip this parameter - INT16 nSkipEnd = -1; // skip all parameters <= nSkipEnd + sal_Int16 nNull = -1; // skip this parameter + sal_Int16 nSkipEnd = -1; // skip all parameters <= nSkipEnd - INT16 nLast = nAnz - 1; + sal_Int16 nLast = nAnz - 1; // Funktionen, bei denen Parameter wegfallen muessen if( eId == ocPercentrank && nAnz == 3 ) @@ -1586,13 +1586,13 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo // Joost-Spezialfaelle else if( eId == ocIf ) { - UINT16 nNullParam = 0; + sal_uInt16 nNullParam = 0; for( nLauf = 0 ; nLauf < nAnz ; nLauf++ ) { if( aPool.IsSingleOp( eParam[ nLauf ], ocMissing ) ) { if( !nNullParam ) - nNullParam = (UINT16) aPool.Store( ( double ) 0.0 ); + nNullParam = (sal_uInt16) aPool.Store( ( double ) 0.0 ); eParam[ nLauf ] = nNullParam; } } @@ -1601,7 +1601,7 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo // FIXME: ideally we'd want to import all missing args, but this // conflicts with lots of fn's understanding of nParams - we need // a function table, and pre-call argument normalisation 1st. - INT16 nLastRemovable = nLast - nMinParamCount; + sal_Int16 nLastRemovable = nLast - nMinParamCount; // #84453# skip missing parameters at end of parameter list while( nSkipEnd < nLastRemovable && @@ -1628,36 +1628,36 @@ void ExcelToSc::DoMulArgs( DefTokenId eId, sal_uInt8 nAnz, sal_uInt8 nMinParamCo } -void ExcelToSc::ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData &rSRD, const BOOL bName ) +void ExcelToSc::ExcRelToScRel( sal_uInt16 nRow, sal_uInt8 nCol, ScSingleRefData &rSRD, const sal_Bool bName ) { if( bName ) { // C O L if( nRow & 0x4000 ) {// rel Col - rSRD.SetColRel( TRUE ); - rSRD.nRelCol = static_cast<SCsCOL>(static_cast<INT8>(nCol)); + rSRD.SetColRel( sal_True ); + rSRD.nRelCol = static_cast<SCsCOL>(static_cast<sal_Int8>(nCol)); } else {// abs Col - rSRD.SetColRel( FALSE ); + rSRD.SetColRel( sal_False ); rSRD.nCol = static_cast<SCCOL>(nCol); } // R O W if( nRow & 0x8000 ) {// rel Row - rSRD.SetRowRel( TRUE ); + rSRD.SetRowRel( sal_True ); if( nRow & 0x2000 ) // Bit 13 gesetzt? // -> Row negativ - rSRD.nRelRow = static_cast<SCsROW>(static_cast<INT16>(nRow | 0xC000)); + rSRD.nRelRow = static_cast<SCsROW>(static_cast<sal_Int16>(nRow | 0xC000)); else // -> Row positiv rSRD.nRelRow = static_cast<SCsROW>(nRow & nRowMask); } else {// abs Row - rSRD.SetRowRel( FALSE ); + rSRD.SetRowRel( sal_False ); rSRD.nRow = static_cast<SCROW>(nRow & nRowMask); } @@ -1691,7 +1691,7 @@ void ExcelToSc::ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData &rSRD, c const ScTokenArray* ExcelToSc::GetBoolErr( XclBoolError eType ) { - UINT16 nError; + sal_uInt16 nError; aPool.Reset(); aStack.Reset(); @@ -1733,13 +1733,13 @@ const ScTokenArray* ExcelToSc::GetBoolErr( XclBoolError eType ) // if a shared formula was found, stream seeks to first byte after <nFormulaLen>, // else stream pointer stays unchanged -BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, sal_Size nFormulaLen ) +sal_Bool ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, sal_Size nFormulaLen ) { - BYTE nOp; - BOOL bRet = TRUE; + sal_uInt8 nOp; + sal_Bool bRet = sal_True; if( nFormulaLen == 0 ) - bRet = FALSE; + bRet = sal_False; else { aIn.PushPosition(); @@ -1748,17 +1748,17 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, if( nOp == 0x01 ) // Shared Formula [ 277] { - UINT16 nCol, nRow; + sal_uInt16 nCol, nRow; aIn >> nRow >> nCol; aStack << aPool.Store( GetOldRoot().pShrfmlaBuff->Find( ScAddress( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), GetCurrScTab() ) ) ); - bRet = TRUE; + bRet = sal_True; } else - bRet = FALSE; + bRet = sal_False; aIn.PopPosition(); } @@ -1776,26 +1776,26 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, #if 0 -BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) +sal_Bool ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) { - UINT16 nInd; - BYTE nType; - BYTE nVal; - BOOL bString = FALSE; + sal_uInt16 nInd; + sal_uInt8 nType; + sal_uInt8 nVal; + sal_Bool bString = sal_False; #ifdef OSL_BIGENDIAN // Code fuer alle anstaendigen Prozessoren - nType = *( ( ( BYTE * ) &rfCurVal ) + 7 ); - nVal = *( ( ( BYTE * ) &rfCurVal ) + 5 ); - nInd = *( ( UINT16 * ) &rfCurVal ); + nType = *( ( ( sal_uInt8 * ) &rfCurVal ) + 7 ); + nVal = *( ( ( sal_uInt8 * ) &rfCurVal ) + 5 ); + nInd = *( ( sal_uInt16 * ) &rfCurVal ); #else // fuer Schund-Prozessoren - nType = *( ( BYTE * ) &rfCurVal ); - nVal = *( ( ( BYTE * ) &rfCurVal ) + 2 ); - nInd = *( ( ( UINT16 * ) &rfCurVal ) + 3 ); + nType = *( ( sal_uInt8 * ) &rfCurVal ); + nVal = *( ( ( sal_uInt8 * ) &rfCurVal ) + 2 ); + nInd = *( ( ( sal_uInt16 * ) &rfCurVal ) + 3 ); #endif - if( ( UINT16 ) ~nInd ) + if( ( sal_uInt16 ) ~nInd ) // Wert ist Float rCell.SetHybridDouble( rfCurVal ); else @@ -1803,7 +1803,7 @@ BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) switch( nType ) { case 0: // String - bString = TRUE; + bString = sal_True; break; case 1: // Bool if( nVal ) @@ -1825,7 +1825,7 @@ BOOL ExcelToSc::SetCurVal( ScFormulaCell &rCell, double &rfCurVal ) void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr ) { - UINT16 nInd; + sal_uInt16 nInd; switch( eErr ) { @@ -1864,8 +1864,8 @@ void ExcelToSc::ReadExtensionArray( unsigned int n, XclImpStream& aIn ) { // printf( "inline array;\n" ); - BYTE nByte; - UINT16 nUINT16; + sal_uInt8 nByte; + sal_uInt16 nUINT16; double fDouble; String aString; ScMatrix* pMatrix; diff --git a/sc/source/filter/excel/excform8.cxx b/sc/source/filter/excel/excform8.cxx index c50151c21..6530f0cc4 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -62,7 +62,7 @@ ExcelToSc8::~ExcelToSc8() { } -bool ExcelToSc8::GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) const +bool ExcelToSc8::GetExternalFileIdFromXti( sal_uInt16 nIxti, sal_uInt16& rFileId ) const { const String* pFileUrl = rLinkMan.GetSupbookUrl(nIxti); if (!pFileUrl || pFileUrl->Len() == 0 || !GetDocShell()) @@ -75,7 +75,7 @@ bool ExcelToSc8::GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) c return true; } -bool ExcelToSc8::Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ) +bool ExcelToSc8::Read3DTabReference( sal_uInt16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ) { rFirstTab = rLastTab = 0; rExtInfo.mbExternal = !rLinkMan.IsSelfRef(nIxti); @@ -96,16 +96,16 @@ bool ExcelToSc8::Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLas // otherwise it will seek to the first byte past additional content after <nFormulaLen> ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, sal_Size nFormulaLen, bool bAllowArrays, const FORMULA_TYPE eFT ) { - BYTE nOp, nLen, nByte; - UINT16 nUINT16; + sal_uInt8 nOp, nLen, nByte; + sal_uInt16 nUINT16; double fDouble; String aString; - BOOL bError = FALSE; - BOOL bArrayFormula = FALSE; + sal_Bool bError = sal_False; + sal_Bool bArrayFormula = sal_False; TokenId nMerk0; - const BOOL bRangeName = eFT == FT_RangeName; - const BOOL bSharedFormula = eFT == FT_SharedFormula; - const BOOL bRNorSF = bRangeName || bSharedFormula; + const sal_Bool bRangeName = eFT == FT_RangeName; + const sal_Bool bSharedFormula = eFT == FT_SharedFormula; + const sal_Bool bRNorSF = bRangeName || bSharedFormula; ScSingleRefData aSRD; ScComplexRefData aCRD; @@ -142,7 +142,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x02: // Data Table [325 277] aIn.Ignore( 4 ); - bArrayFormula = TRUE; + bArrayFormula = sal_True; break; case 0x03: // Addition [312 264] aStack >> nMerk0; @@ -261,8 +261,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, break; case 0x18: // natural language formula { - UINT8 nEptg; - UINT16 nCol, nRow; + sal_uInt8 nEptg; + sal_uInt16 nCol, nRow; aIn >> nEptg; switch( nEptg ) { // name size ext type @@ -280,9 +280,9 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, aSRD.InitAddress( ScAddress( static_cast<SCCOL>(nCol & 0xFF), static_cast<SCROW>(nRow), aEingPos.Tab() ) ); if( nEptg == 0x02 || nEptg == 0x06 ) - aSRD.SetRowRel( TRUE ); + aSRD.SetRowRel( sal_True ); else - aSRD.SetColRel( TRUE ); + aSRD.SetColRel( sal_True ); aSRD.CalcRelFromAbs( aEingPos ); @@ -294,7 +294,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, aSRD.InitAddress( ScAddress( static_cast<SCCOL>(nCol & 0xFF), static_cast<SCROW>(nRow), aEingPos.Tab() ) ); - aSRD.SetColRel( TRUE ); + aSRD.SetColRel( sal_True ); aSRD.CalcRelFromAbs( aEingPos ); @@ -329,8 +329,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, break; case 0x19: // Special Attribute [327 279] { - UINT16 nData, nFakt; - BYTE nOpt; + sal_uInt16 nData, nFakt; + sal_uInt8 nOpt; aIn >> nOpt >> nData; nFakt = 2; @@ -448,14 +448,14 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x6A: case 0x2A: // Deleted Cell Reference [323 273] { - UINT16 nCol, nRow; + sal_uInt16 nCol, nRow; aIn >> nRow >> nCol; aSRD.nCol = static_cast<SCCOL>(nCol); aSRD.nRow = nRow & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel8( nRow, nCol, aSRD, bRangeName ); @@ -466,8 +466,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x6A: case 0x2A: // Deleted Cell Reference [323 273] // no information which part is deleted, set both - aSRD.SetColDeleted( TRUE ); - aSRD.SetRowDeleted( TRUE ); + aSRD.SetColDeleted( sal_True ); + aSRD.SetRowDeleted( sal_True ); } aStack << aPool.Store( aSRD ); @@ -480,16 +480,16 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x6B: case 0x2B: // Deleted Area Refernce [323 273] { - UINT16 nRowFirst, nRowLast; - UINT16 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt16 nColFirst, nColLast; ScSingleRefData &rSRef1 = aCRD.Ref1; ScSingleRefData &rSRef2 = aCRD.Ref2; aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast; rSRef1.nRelTab = rSRef2.nRelTab = 0; - rSRef1.SetTabRel( TRUE ); - rSRef2.SetTabRel( TRUE ); + rSRef1.SetTabRel( sal_True ); + rSRef2.SetTabRel( sal_True ); rSRef1.SetFlag3D( bRangeName ); rSRef2.SetFlag3D( bRangeName ); @@ -507,10 +507,10 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x6B: case 0x2B: // Deleted Area Refernce [323 273] // no information which part is deleted, set all - rSRef1.SetColDeleted( TRUE ); - rSRef1.SetRowDeleted( TRUE ); - rSRef2.SetColDeleted( TRUE ); - rSRef2.SetRowDeleted( TRUE ); + rSRef1.SetColDeleted( sal_True ); + rSRef1.SetRowDeleted( sal_True ); + rSRef2.SetColDeleted( sal_True ); + rSRef2.SetRowDeleted( sal_True ); } aStack << aPool.Store( aCRD ); @@ -546,12 +546,12 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x2C: // Cell Reference Within a Name [323 ] // Cell Reference Within a Shared Formula[ 273] { - UINT16 nRow, nCol; + sal_uInt16 nRow, nCol; aIn >> nRow >> nCol; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel8( nRow, nCol, aSRD, bRNorSF ); @@ -563,12 +563,12 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x6D: case 0x2D: // Area Reference Within a Name [324 ] { // Area Reference Within a Shared Formula[ 274] - UINT16 nRowFirst, nRowLast; - UINT16 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt16 nColFirst, nColLast; aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0; - aCRD.Ref1.SetTabRel( TRUE ); - aCRD.Ref2.SetTabRel( TRUE ); + aCRD.Ref1.SetTabRel( sal_True ); + aCRD.Ref2.SetTabRel( sal_True ); aCRD.Ref1.SetFlag3D( bRangeName ); aCRD.Ref2.SetFlag3D( bRangeName ); @@ -702,7 +702,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x7C: case 0x3C: // Deleted 3-D Cell Reference [ 277] { - UINT16 nIxti, nRw, nGrbitCol; + sal_uInt16 nIxti, nRw, nGrbitCol; SCTAB nTabFirst, nTabLast; aIn >> nIxti >> nRw >> nGrbitCol; @@ -716,8 +716,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, } aSRD.nTab = nTabFirst; - aSRD.SetFlag3D( TRUE ); - aSRD.SetTabRel( FALSE ); + aSRD.SetFlag3D( sal_True ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName ); @@ -727,8 +727,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x7C: case 0x3C: // Deleted 3-D Cell Reference [ 277] // no information which part is deleted, set both - aSRD.SetColDeleted( TRUE ); - aSRD.SetRowDeleted( TRUE ); + aSRD.SetColDeleted( sal_True ); + aSRD.SetRowDeleted( sal_True ); } if (aExtInfo.mbExternal) @@ -751,7 +751,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, else { if ( !ValidTab(nTabFirst)) - aSRD.SetTabDeleted( TRUE ); + aSRD.SetTabDeleted( sal_True ); if( nTabLast != nTabFirst ) { @@ -772,7 +772,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x7D: case 0x3D: // Deleted 3-D Area Reference [ 277] { - UINT16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2; + sal_uInt16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2; SCTAB nTabFirst, nTabLast; aIn >> nIxti >> nRw1 >> nRw2 >> nGrbitCol1 >> nGrbitCol2; @@ -789,10 +789,10 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, rR1.nTab = nTabFirst; rR2.nTab = nTabLast; - rR1.SetFlag3D( TRUE ); - rR1.SetTabRel( FALSE ); + rR1.SetFlag3D( sal_True ); + rR1.SetTabRel( sal_False ); rR2.SetFlag3D( nTabFirst != nTabLast ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName ); @@ -808,10 +808,10 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, case 0x7D: case 0x3D: // Deleted 3-D Area Reference [ 277] // no information which part is deleted, set all - rR1.SetColDeleted( TRUE ); - rR1.SetRowDeleted( TRUE ); - rR2.SetColDeleted( TRUE ); - rR2.SetRowDeleted( TRUE ); + rR1.SetColDeleted( sal_True ); + rR1.SetRowDeleted( sal_True ); + rR2.SetColDeleted( sal_True ); + rR2.SetRowDeleted( sal_True ); } if (aExtInfo.mbExternal) @@ -821,15 +821,15 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, else { if ( !ValidTab(nTabFirst) ) - rR1.SetTabDeleted( TRUE ); + rR1.SetTabDeleted( sal_True ); if ( !ValidTab(nTabLast) ) - rR2.SetTabDeleted( TRUE ); + rR2.SetTabDeleted( sal_True ); aStack << aPool.Store( aCRD ); } } break; - default: bError = TRUE; + default: bError = sal_True; } bError |= !aIn.IsValid(); } @@ -873,17 +873,17 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, // stream seeks to first byte after <nFormulaLen> ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen, const FORMULA_TYPE eFT ) { - BYTE nOp, nLen;//, nByte; - BOOL bError = FALSE; - BOOL bArrayFormula = FALSE; - const BOOL bRangeName = eFT == FT_RangeName; - const BOOL bSharedFormula = eFT == FT_SharedFormula; - const BOOL bRNorSF = bRangeName || bSharedFormula; + sal_uInt8 nOp, nLen;//, nByte; + sal_Bool bError = sal_False; + sal_Bool bArrayFormula = sal_False; + const sal_Bool bRangeName = eFT == FT_RangeName; + const sal_Bool bSharedFormula = eFT == FT_SharedFormula; + const sal_Bool bRNorSF = bRangeName || bSharedFormula; ScSingleRefData aSRD; ScComplexRefData aCRD; - bExternName = FALSE; + bExternName = sal_False; if( eStatus != ConvOK ) { @@ -910,7 +910,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa // Array Formula or Shared Formula [ 277] aIn.Ignore( 4 ); - bArrayFormula = TRUE; + bArrayFormula = sal_True; break; case 0x02: // Data Table [325 277] aIn.Ignore( 4 ); @@ -943,8 +943,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa break; case 0x19: // Special Attribute [327 279] { - UINT16 nData, nFakt; - BYTE nOpt; + sal_uInt16 nData, nFakt; + sal_uInt8 nOpt; aIn >> nOpt >> nData; nFakt = 2; @@ -990,14 +990,14 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa case 0x64: case 0x24: // Cell Reference [319 270] { - UINT16 nCol, nRow; + sal_uInt16 nCol, nRow; aIn >> nRow >> nCol; aSRD.nCol = static_cast<SCCOL>(nCol); aSRD.nRow = nRow & 0x3FFF; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel8( nRow, nCol, aSRD, bRangeName ); @@ -1009,16 +1009,16 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa case 0x65: case 0x25: // Area Reference [320 270] { - UINT16 nRowFirst, nRowLast; - UINT16 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt16 nColFirst, nColLast; ScSingleRefData &rSRef1 = aCRD.Ref1; ScSingleRefData &rSRef2 = aCRD.Ref2; aIn >> nRowFirst >> nRowLast >> nColFirst >> nColLast; rSRef1.nRelTab = rSRef2.nRelTab = 0; - rSRef1.SetTabRel( TRUE ); - rSRef2.SetTabRel( TRUE ); + rSRef1.SetTabRel( sal_True ); + rSRef2.SetTabRel( sal_True ); rSRef1.SetFlag3D( bRangeName ); rSRef2.SetFlag3D( bRangeName ); @@ -1064,12 +1064,12 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa case 0x2C: // Cell Reference Within a Name [323 ] // Cell Reference Within a Shared Formula[ 273] { - UINT16 nRow, nCol; + sal_uInt16 nRow, nCol; aIn >> nRow >> nCol; aSRD.nRelTab = 0; - aSRD.SetTabRel( TRUE ); + aSRD.SetTabRel( sal_True ); aSRD.SetFlag3D( bRangeName ); ExcRelToScRel8( nRow, nCol, aSRD, bRNorSF ); @@ -1081,12 +1081,12 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa case 0x6D: case 0x2D: // Area Reference Within a Name [324 ] { // Area Reference Within a Shared Formula[ 274] - UINT16 nRowFirst, nRowLast; - UINT16 nColFirst, nColLast; + sal_uInt16 nRowFirst, nRowLast; + sal_uInt16 nColFirst, nColLast; aCRD.Ref1.nRelTab = aCRD.Ref2.nRelTab = 0; - aCRD.Ref1.SetTabRel( TRUE ); - aCRD.Ref2.SetTabRel( TRUE ); + aCRD.Ref1.SetTabRel( sal_True ); + aCRD.Ref2.SetTabRel( sal_True ); aCRD.Ref1.SetFlag3D( bRangeName ); aCRD.Ref2.SetFlag3D( bRangeName ); @@ -1123,7 +1123,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa case 0x7A: case 0x3A: // 3-D Cell Reference [ 275] { - UINT16 nIxti, nRw, nGrbitCol; + sal_uInt16 nIxti, nRw, nGrbitCol; aIn >> nIxti >> nRw >> nGrbitCol; @@ -1131,8 +1131,8 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa if( rLinkMan.GetScTabRange( nFirstScTab, nLastScTab, nIxti ) ) { aSRD.nTab = nFirstScTab; - aSRD.SetFlag3D( TRUE ); - aSRD.SetTabRel( FALSE ); + aSRD.SetFlag3D( sal_True ); + aSRD.SetTabRel( sal_False ); ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName ); @@ -1153,7 +1153,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa case 0x7B: case 0x3B: // 3-D Area Reference [ 276] { - UINT16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2; + sal_uInt16 nIxti, nRw1, nGrbitCol1, nRw2, nGrbitCol2; aIn >> nIxti >> nRw1 >> nRw2 >> nGrbitCol1 >> nGrbitCol2; @@ -1165,10 +1165,10 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa rR1.nTab = nFirstScTab; rR2.nTab = nLastScTab; - rR1.SetFlag3D( TRUE ); - rR1.SetTabRel( FALSE ); + rR1.SetFlag3D( sal_True ); + rR1.SetTabRel( sal_False ); rR2.SetFlag3D( nFirstScTab != nLastScTab ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( sal_False ); ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName ); @@ -1193,7 +1193,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa aIn.Ignore( 10 ); break; default: - bError = TRUE; + bError = sal_True; } bError |= !aIn.IsValid(); } @@ -1363,11 +1363,11 @@ ConvErr ExcelToSc8::ConvertExternName( const ScTokenArray*& rpArray, XclImpStrea return eRet; } -void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, const BOOL bName ) +void ExcelToSc8::ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nC, ScSingleRefData &rSRD, const sal_Bool bName ) { - const BOOL bColRel = ( nC & 0x4000 ) != 0; - const BOOL bRowRel = ( nC & 0x8000 ) != 0; - const UINT8 nCol = static_cast<UINT8>(nC); + const sal_Bool bColRel = ( nC & 0x4000 ) != 0; + const sal_Bool bRowRel = ( nC & 0x8000 ) != 0; + const sal_uInt8 nCol = static_cast<sal_uInt8>(nC); rSRD.SetColRel( bColRel ); rSRD.SetRowRel( bRowRel ); @@ -1377,7 +1377,7 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, // C O L if( bColRel ) // rel Col - rSRD.nRelCol = static_cast<SCsCOL>(static_cast<INT8>(nC)); + rSRD.nRelCol = static_cast<SCsCOL>(static_cast<sal_Int8>(nC)); else // abs Col rSRD.nCol = static_cast<SCCOL>(nCol); @@ -1385,7 +1385,7 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, // R O W if( bRowRel ) // rel Row - rSRD.nRelRow = static_cast<SCsROW>(static_cast<INT16>(nRow)); + rSRD.nRelRow = static_cast<SCsROW>(static_cast<sal_Int16>(nRow)); else // abs Row rSRD.nRow = Min( static_cast<SCROW>(nRow), MAXROW); @@ -1418,12 +1418,12 @@ void ExcelToSc8::ExcRelToScRel8( UINT16 nRow, UINT16 nC, ScSingleRefData &rSRD, // stream seeks to first byte after <nLen> -BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) +sal_Bool ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) { - UINT8 nOp; - UINT16 nRow1, nRow2, nCol1, nCol2; + sal_uInt8 nOp; + sal_uInt16 nRow1, nRow2, nCol1, nCol2; SCTAB nTab1, nTab2; - UINT16 nIxti; + sal_uInt16 nIxti; sal_Size nSeek; @@ -1563,7 +1563,7 @@ BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) break; case 0x17: // String Constant [314 266] { - UINT8 nStrLen; + sal_uInt8 nStrLen; aIn >> nStrLen; aIn.IgnoreUniString( nStrLen ); // reads Grbit even if nLen==0 nSeek = 0; @@ -1571,8 +1571,8 @@ BOOL ExcelToSc8::GetAbsRefs( ScRangeList& r, XclImpStream& aIn, sal_Size nLen ) break; case 0x19: // Special Attribute [327 279] { - UINT16 nData; - UINT8 nOpt; + sal_uInt16 nData; + sal_uInt8 nOpt; aIn >> nOpt >> nData; if( nOpt & 0x04 ) {// nFakt -> Bytes oder Words ueberlesen AttrChoose diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx index b8ae9df6a..58c465f36 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -159,8 +159,8 @@ void ImportExcel8::Iteration( void ) void ImportExcel8::Boundsheet( void ) { - UINT8 nLen; - UINT16 nGrbit; + sal_uInt8 nLen; + sal_uInt16 nGrbit; aIn.DisableDecryption(); maSheetOffsets.push_back( aIn.ReaduInt32() ); @@ -178,7 +178,7 @@ void ImportExcel8::Boundsheet( void ) } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nScTab, FALSE ); + pD->SetVisible( nScTab, sal_False ); if( !pD->RenameTab( nScTab, aName ) ) { @@ -192,7 +192,7 @@ void ImportExcel8::Boundsheet( void ) void ImportExcel8::Scenman( void ) { - UINT16 nLastDispl; + sal_uInt16 nLastDispl; aIn.Ignore( 4 ); aIn >> nLastDispl; @@ -210,8 +210,8 @@ void ImportExcel8::Scenario( void ) void ImportExcel8::Labelsst( void ) { XclAddress aXclPos; - UINT16 nXF; - UINT32 nSst; + sal_uInt16 nXF; + sal_uInt32 nSst; aIn >> aXclPos >> nXF >> nSst; @@ -382,10 +382,10 @@ XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRan ExcRoot( pRoot ), pCurrDBData(NULL), nFirstEmpty( 0 ), - bActive( FALSE ), - bHasConflict( FALSE ), - bCriteria( FALSE ), - bAutoOrAdvanced(FALSE), + bActive( sal_False ), + bHasConflict( sal_False ), + bCriteria( sal_False ), + bAutoOrAdvanced(sal_False), aFilterName(rName) { aParam.nCol1 = rRange.aStart.Col(); @@ -394,7 +394,7 @@ XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRan aParam.nCol2 = rRange.aEnd.Col(); aParam.nRow2 = rRange.aEnd.Row(); - aParam.bInplace = TRUE; + aParam.bInplace = sal_True; } @@ -402,7 +402,7 @@ void XclImpAutoFilterData::CreateFromDouble( String& rStr, double fVal ) { rStr += String( ::rtl::math::doubleToUString( fVal, rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, - ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), TRUE)); + ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), sal_True)); } void XclImpAutoFilterData::SetCellAttribs() @@ -410,7 +410,7 @@ void XclImpAutoFilterData::SetCellAttribs() ScDocument& rDoc = pExcRoot->pIR->GetDoc(); for ( SCCOL nCol = StartCol(); nCol <= EndCol(); nCol++ ) { - INT16 nFlag = ((ScMergeFlagAttr*) rDoc.GetAttr( nCol, StartRow(), Tab(), ATTR_MERGE_FLAG ))->GetValue(); + sal_Int16 nFlag = ((ScMergeFlagAttr*) rDoc.GetAttr( nCol, StartRow(), Tab(), ATTR_MERGE_FLAG ))->GetValue(); rDoc.ApplyAttr( nCol, StartRow(), Tab(), ScMergeFlagAttr( nFlag | SC_MF_AUTO) ); } } @@ -420,7 +420,7 @@ void XclImpAutoFilterData::InsertQueryParam() if( pCurrDBData && !bHasConflict ) { ScRange aAdvRange; - BOOL bHasAdv = pCurrDBData->GetAdvancedQuerySource( aAdvRange ); + sal_Bool bHasAdv = pCurrDBData->GetAdvancedQuerySource( aAdvRange ); if( bHasAdv ) pExcRoot->pIR->GetDoc().CreateQueryParam( aAdvRange.aStart.Col(), aAdvRange.aStart.Row(), aAdvRange.aEnd.Col(), aAdvRange.aEnd.Row(), @@ -431,7 +431,7 @@ void XclImpAutoFilterData::InsertQueryParam() pCurrDBData->SetAdvancedQuerySource( &aAdvRange ); else { - pCurrDBData->SetAutoFilter( TRUE ); + pCurrDBData->SetAutoFilter( sal_True ); SetCellAttribs(); } } @@ -471,14 +471,14 @@ static void ExcelQueryToOooQuery( ScQueryEntry& rEntry ) void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) { - UINT16 nCol, nFlags; + sal_uInt16 nCol, nFlags; rStrm >> nCol >> nFlags; ScQueryConnect eConn = ::get_flagvalue( nFlags, EXC_AFFLAG_ANDORMASK, SC_OR, SC_AND ); - BOOL bTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); - BOOL bTopOfTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10TOP ); - BOOL bPercent = ::get_flag( nFlags, EXC_AFFLAG_TOP10PERC ); - UINT16 nCntOfTop10 = nFlags >> 7; + sal_Bool bTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); + sal_Bool bTopOfTop10 = ::get_flag( nFlags, EXC_AFFLAG_TOP10TOP ); + sal_Bool bPercent = ::get_flag( nFlags, EXC_AFFLAG_TOP10PERC ); + sal_uInt16 nCntOfTop10 = nFlags >> 7; SCSIZE nCount = aParam.GetEntryCount(); if( bTop10 ) @@ -486,8 +486,8 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) if( nFirstEmpty < nCount ) { ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty ); - aEntry.bDoQuery = TRUE; - aEntry.bQueryByString = TRUE; + aEntry.bDoQuery = sal_True; + aEntry.bQueryByString = sal_True; aEntry.nField = static_cast<SCCOLROW>(StartCol() + static_cast<SCCOL>(nCol)); aEntry.eOp = bTopOfTop10 ? (bPercent ? SC_TOPPERC : SC_TOPVAL) : (bPercent ? SC_BOTPERC : SC_BOTVAL); @@ -500,12 +500,12 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) } else { - UINT8 nE, nType, nOper, nBoolErr, nVal; - INT32 nRK; + sal_uInt8 nE, nType, nOper, nBoolErr, nVal; + sal_Int32 nRK; double fVal; - BOOL bIgnore; + sal_Bool bIgnore; - UINT8 nStrLen[ 2 ] = { 0, 0 }; + sal_uInt8 nStrLen[ 2 ] = { 0, 0 }; ScQueryEntry *pQueryEntries[ 2 ] = { NULL, NULL }; for( nE = 0; nE < 2; nE++ ) @@ -514,7 +514,7 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) { ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty ); pQueryEntries[ nE ] = &aEntry; - bIgnore = FALSE; + bIgnore = sal_False; rStrm >> nType >> nOper; switch( nOper ) @@ -562,21 +562,21 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) rStrm >> nBoolErr >> nVal; rStrm.Ignore( 6 ); aEntry.pStr->Assign( String::CreateFromInt32( (sal_Int32) nVal ) ); - bIgnore = (BOOL) nBoolErr; + bIgnore = (sal_Bool) nBoolErr; break; case EXC_AFTYPE_EMPTY: - aEntry.bQueryByString = FALSE; + aEntry.bQueryByString = sal_False; aEntry.nVal = SC_EMPTYFIELDS; aEntry.eOp = SC_EQUAL; break; case EXC_AFTYPE_NOTEMPTY: - aEntry.bQueryByString = FALSE; + aEntry.bQueryByString = sal_False; aEntry.nVal = SC_NONEMPTYFIELDS; aEntry.eOp = SC_EQUAL; break; default: rStrm.Ignore( 8 ); - bIgnore = TRUE; + bIgnore = sal_True; } /* #i39464# conflict, if two conditions of one column are 'OR'ed, @@ -586,11 +586,11 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) 'A1 AND (B1 OR B2)' in this case, but Calc would do '(A1 AND B1) OR B2' instead. */ if( (nFirstEmpty > 1) && nE && (eConn == SC_OR) && !bIgnore ) - bHasConflict = TRUE; + bHasConflict = sal_True; if( !bHasConflict && !bIgnore ) { - aEntry.bDoQuery = TRUE; - aEntry.bQueryByString = TRUE; + aEntry.bDoQuery = sal_True; + aEntry.bQueryByString = sal_True; aEntry.nField = static_cast<SCCOLROW>(StartCol() + static_cast<SCCOL>(nCol)); aEntry.eConnect = nE ? eConn : SC_AND; nFirstEmpty++; @@ -615,10 +615,10 @@ void XclImpAutoFilterData::SetAdvancedRange( const ScRange* pRange ) if (pRange) { aCriteriaRange = *pRange; - bCriteria = TRUE; + bCriteria = sal_True; } else - bCriteria = FALSE; + bCriteria = sal_False; } void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr ) @@ -626,11 +626,11 @@ void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr ) aParam.nDestCol = rAddr.Col(); aParam.nDestRow = rAddr.Row(); aParam.nDestTab = rAddr.Tab(); - aParam.bInplace = FALSE; - aParam.bDestPers = TRUE; + aParam.bInplace = sal_False; + aParam.bDestPers = sal_True; } -void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed ) +void XclImpAutoFilterData::Apply( const sal_Bool bUseUnNamed ) { CreateScDBData(bUseUnNamed); @@ -642,7 +642,7 @@ void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed ) // SCROW nRow1 = StartRow(); // SCROW nRow2 = EndRow(); // size_t nRows = nRow2 - nRow1 + 1; -// boost::scoped_array<BYTE> pFlags( new BYTE[nRows]); +// boost::scoped_array<sal_uInt8> pFlags( new sal_uInt8[nRows]); // pExcRoot->pDoc->GetRowFlagsArray( Tab()).FillDataArray( nRow1, nRow2, // pFlags.get()); // for (size_t j=0; j<nRows; ++j) @@ -654,7 +654,7 @@ void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed ) } } -void XclImpAutoFilterData::CreateScDBData( const BOOL bUseUnNamed ) +void XclImpAutoFilterData::CreateScDBData( const sal_Bool bUseUnNamed ) { // Create the ScDBData() object if the AutoFilter is activated @@ -693,7 +693,7 @@ void XclImpAutoFilterData::EnableRemoveFilter() if( !bActive && bAutoOrAdvanced ) { ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty ); - aEntry.bDoQuery = TRUE; + aEntry.bDoQuery = sal_True; ++nFirstEmpty; } @@ -702,7 +702,7 @@ void XclImpAutoFilterData::EnableRemoveFilter() // inside the advanced range } -void XclImpAutoFilterData::AmendAFName(const BOOL bUseUnNamed) +void XclImpAutoFilterData::AmendAFName(const sal_Bool bUseUnNamed) { // If-and-only-if we have one AF filter then // use the Calc "unnamed" range name. Calc diff --git a/sc/source/filter/excel/excrecds.cxx b/sc/source/filter/excel/excrecds.cxx index ab3eeadd9..324550f5c 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -102,7 +102,7 @@ using ::com::sun::star::uno::Sequence; using ::rtl::OString; //--------------------------------------------------------- class ExcDummy_00 - -const BYTE ExcDummy_00::pMyData[] = { +const sal_uInt8 ExcDummy_00::pMyData[] = { 0x5c, 0x00, 0x20, 0x00, 0x04, 'C', 'a', 'l', 'c', // WRITEACCESS 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, @@ -111,20 +111,20 @@ const BYTE ExcDummy_00::pMyData[] = { const sal_Size ExcDummy_00::nMyLen = sizeof( ExcDummy_00::pMyData ); //-------------------------------------------------------- class ExcDummy_04x - -const BYTE ExcDummy_040::pMyData[] = { +const sal_uInt8 ExcDummy_040::pMyData[] = { 0x40, 0x00, 0x02, 0x00, 0x00, 0x00, // BACKUP 0x8d, 0x00, 0x02, 0x00, 0x00, 0x00, // HIDEOBJ }; const sal_Size ExcDummy_040::nMyLen = sizeof( ExcDummy_040::pMyData ); -const BYTE ExcDummy_041::pMyData[] = { +const sal_uInt8 ExcDummy_041::pMyData[] = { 0x0e, 0x00, 0x02, 0x00, 0x01, 0x00, // PRECISION 0xda, 0x00, 0x02, 0x00, 0x00, 0x00 // BOOKBOOL }; const sal_Size ExcDummy_041::nMyLen = sizeof( ExcDummy_041::pMyData ); //-------------------------------------------------------- class ExcDummy_02a - -const BYTE ExcDummy_02a::pMyData[] = { +const sal_uInt8 ExcDummy_02a::pMyData[] = { 0x0d, 0x00, 0x02, 0x00, 0x01, 0x00, // CALCMODE 0x0c, 0x00, 0x02, 0x00, 0x64, 0x00, // CALCCOUNT 0x0f, 0x00, 0x02, 0x00, 0x01, 0x00, // REFMODE @@ -160,7 +160,7 @@ void ExcEmptyRec::Save( XclExpStream& /*rStrm*/ ) } -UINT16 ExcEmptyRec::GetNum() const +sal_uInt16 ExcEmptyRec::GetNum() const { return 0; } @@ -198,7 +198,7 @@ void ExcDummyRec::Save( XclExpStream& rStrm ) } -UINT16 ExcDummyRec::GetNum( void ) const +sal_uInt16 ExcDummyRec::GetNum( void ) const { return 0x0000; } @@ -209,7 +209,7 @@ UINT16 ExcDummyRec::GetNum( void ) const void ExcBoolRecord::SaveCont( XclExpStream& rStrm ) { - rStrm << (UINT16)(bVal ? 0x0001 : 0x0000); + rStrm << (sal_uInt16)(bVal ? 0x0001 : 0x0000); } @@ -246,7 +246,7 @@ void ExcBof::SaveCont( XclExpStream& rStrm ) } -UINT16 ExcBof::GetNum( void ) const +sal_uInt16 ExcBof::GetNum( void ) const { return 0x0809; } @@ -275,7 +275,7 @@ void ExcBofW::SaveCont( XclExpStream& rStrm ) -UINT16 ExcBofW::GetNum( void ) const +sal_uInt16 ExcBofW::GetNum( void ) const { return 0x0809; } @@ -291,7 +291,7 @@ sal_Size ExcBofW::GetLen( void ) const //-------------------------------------------------------------- class ExcEof - -UINT16 ExcEof::GetNum( void ) const +sal_uInt16 ExcEof::GetNum( void ) const { return 0x000A; } @@ -312,7 +312,7 @@ sal_Size ExcDummy_00::GetLen( void ) const } -const BYTE* ExcDummy_00::GetData( void ) const +const sal_uInt8* ExcDummy_00::GetData( void ) const { return pMyData; } @@ -327,7 +327,7 @@ sal_Size ExcDummy_040::GetLen( void ) const } -const BYTE* ExcDummy_040::GetData( void ) const +const sal_uInt8* ExcDummy_040::GetData( void ) const { return pMyData; } @@ -341,7 +341,7 @@ sal_Size ExcDummy_041::GetLen( void ) const } -const BYTE* ExcDummy_041::GetData( void ) const +const sal_uInt8* ExcDummy_041::GetData( void ) const { return pMyData; } @@ -353,11 +353,11 @@ const BYTE* ExcDummy_041::GetData( void ) const Exc1904::Exc1904( ScDocument& rDoc ) { Date* pDate = rDoc.GetFormatTable()->GetNullDate(); - bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : FALSE; + bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : sal_False; } -UINT16 Exc1904::GetNum( void ) const +sal_uInt16 Exc1904::GetNum( void ) const { return 0x0022; } @@ -401,7 +401,7 @@ void ExcBundlesheetBase::UpdateStreamPos( XclExpStream& rStrm ) } -UINT16 ExcBundlesheetBase::GetNum( void ) const +sal_uInt16 ExcBundlesheetBase::GetNum( void ) const { return 0x0085; } @@ -421,7 +421,7 @@ ExcBundlesheet::ExcBundlesheet( RootData& rRootData, SCTAB _nTab ) : void ExcBundlesheet::SaveCont( XclExpStream& rStrm ) { nOwnPos = rStrm.GetSvStreamPos(); - rStrm << (UINT32) 0x00000000 // dummy (stream position of the sheet) + rStrm << (sal_uInt32) 0x00000000 // dummy (stream position of the sheet) << nGrbit; rStrm.WriteByteString( aName ); // 8 bit length, max 255 chars } @@ -440,7 +440,7 @@ sal_Size ExcDummy_02a::GetLen( void ) const return nMyLen; } -const BYTE* ExcDummy_02a::GetData( void ) const +const sal_uInt8* ExcDummy_02a::GetData( void ) const { return pMyData; } @@ -573,7 +573,7 @@ sal_Size ExcFilterCondition::GetTextBytes() const return pText ? (1 + pText->GetBufferSize()) : 0; } -void ExcFilterCondition::SetCondition( UINT8 nTp, UINT8 nOp, double fV, String* pT ) +void ExcFilterCondition::SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT ) { nType = nTp; nOper = nOp; @@ -593,17 +593,17 @@ void ExcFilterCondition::Save( XclExpStream& rStrm ) break; case EXC_AFTYPE_STRING: DBG_ASSERT( pText, "ExcFilterCondition::Save() -- pText is NULL!" ); - rStrm << (UINT32)0 << (UINT8) pText->Len() << (UINT16)0 << (UINT8)0; + rStrm << (sal_uInt32)0 << (sal_uInt8) pText->Len() << (sal_uInt16)0 << (sal_uInt8)0; break; case EXC_AFTYPE_BOOLERR: - rStrm << (UINT8)0 << (UINT8)((fVal != 0) ? 1 : 0) << (UINT32)0 << (UINT16)0; + rStrm << (sal_uInt8)0 << (sal_uInt8)((fVal != 0) ? 1 : 0) << (sal_uInt32)0 << (sal_uInt16)0; break; default: - rStrm << (UINT32)0 << (UINT32)0; + rStrm << (sal_uInt32)0 << (sal_uInt32)0; } } -static const char* lcl_GetOperator( UINT8 nOper ) +static const char* lcl_GetOperator( sal_uInt8 nOper ) { switch( nOper ) { @@ -618,7 +618,7 @@ static const char* lcl_GetOperator( UINT8 nOper ) } } -static OString lcl_GetValue( UINT8 nType, double fVal, XclExpString* pStr ) +static OString lcl_GetValue( sal_uInt8 nType, double fVal, XclExpString* pStr ) { switch( nType ) { @@ -652,7 +652,7 @@ void ExcFilterCondition::SaveText( XclExpStream& rStrm ) // ---------------------------------------------------------------------------- -XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, UINT16 nC ) : +XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ) : XclExpRecord( EXC_ID_AUTOFILTER, 24 ), XclExpRoot( rRoot ), nCol( nC ), @@ -660,13 +660,13 @@ XclExpAutofilter::XclExpAutofilter( const XclExpRoot& rRoot, UINT16 nC ) : { } -BOOL XclExpAutofilter::AddCondition( ScQueryConnect eConn, UINT8 nType, UINT8 nOp, - double fVal, String* pText, BOOL bSimple ) +sal_Bool XclExpAutofilter::AddCondition( ScQueryConnect eConn, sal_uInt8 nType, sal_uInt8 nOp, + double fVal, String* pText, sal_Bool bSimple ) { if( !aCond[ 1 ].IsEmpty() ) - return FALSE; + return sal_False; - UINT16 nInd = aCond[ 0 ].IsEmpty() ? 0 : 1; + sal_uInt16 nInd = aCond[ 0 ].IsEmpty() ? 0 : 1; if( nInd == 1 ) nFlags |= (eConn == SC_OR) ? EXC_AFFLAG_OR : EXC_AFFLAG_AND; @@ -677,12 +677,12 @@ BOOL XclExpAutofilter::AddCondition( ScQueryConnect eConn, UINT8 nType, UINT8 nO AddRecSize( aCond[ nInd ].GetTextBytes() ); - return TRUE; + return sal_True; } -BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry ) +sal_Bool XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry ) { - BOOL bConflict = FALSE; + sal_Bool bConflict = sal_False; String sText; if( rEntry.pStr ) @@ -712,23 +712,23 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry ) } } - BOOL bLen = sText.Len() > 0; + sal_Bool bLen = sText.Len() > 0; // empty/nonempty fields if( !bLen && (rEntry.nVal == SC_EMPTYFIELDS) ) - bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_EMPTY, EXC_AFOPER_NONE, 0.0, NULL, TRUE ); + bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_EMPTY, EXC_AFOPER_NONE, 0.0, NULL, sal_True ); else if( !bLen && (rEntry.nVal == SC_NONEMPTYFIELDS) ) - bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_NOTEMPTY, EXC_AFOPER_NONE, 0.0, NULL, TRUE ); + bConflict = !AddCondition( rEntry.eConnect, EXC_AFTYPE_NOTEMPTY, EXC_AFOPER_NONE, 0.0, NULL, sal_True ); // other conditions else { double fVal = 0.0; sal_uInt32 nIndex = 0; - BOOL bIsNum = bLen ? GetFormatter().IsNumberFormat( sText, nIndex, fVal ) : TRUE; + sal_Bool bIsNum = bLen ? GetFormatter().IsNumberFormat( sText, nIndex, fVal ) : sal_True; String* pText = bIsNum ? NULL : &sText; // top10 flags - UINT16 nNewFlags = 0x0000; + sal_uInt16 nNewFlags = 0x0000; switch( rEntry.eOp ) { case SC_TOPVAL: @@ -745,7 +745,7 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry ) break; default:; } - BOOL bNewTop10 = ::get_flag( nNewFlags, EXC_AFFLAG_TOP10 ); + sal_Bool bNewTop10 = ::get_flag( nNewFlags, EXC_AFFLAG_TOP10 ); bConflict = HasTop10() && bNewTop10; if( !bConflict ) @@ -754,13 +754,13 @@ BOOL XclExpAutofilter::AddEntry( const ScQueryEntry& rEntry ) { if( fVal < 0 ) fVal = 0; if( fVal >= 501 ) fVal = 500; - nFlags |= (nNewFlags | (UINT16)(fVal) << 7); + nFlags |= (nNewFlags | (sal_uInt16)(fVal) << 7); } // normal condition else { - UINT8 nType = bIsNum ? EXC_AFTYPE_DOUBLE : EXC_AFTYPE_STRING; - UINT8 nOper = EXC_AFOPER_NONE; + sal_uInt8 nType = bIsNum ? EXC_AFTYPE_DOUBLE : EXC_AFTYPE_STRING; + sal_uInt8 nOper = EXC_AFOPER_NONE; switch( rEntry.eOp ) { @@ -841,9 +841,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : XclExpNameManager& rNameMgr = GetNameManager(); // search for first DB-range with filter - UINT16 nIndex = 0; - BOOL bFound = FALSE; - BOOL bAdvanced = FALSE; + sal_uInt16 nIndex = 0; + sal_Bool bFound = sal_False; + sal_Bool bAdvanced = sal_False; ScDBData* pData = NULL; ScRange aAdvRange; while( (nIndex < rDBColl.GetCount()) && !bFound ) @@ -896,9 +896,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : // AutoFilter else { - BOOL bConflict = FALSE; - BOOL bContLoop = TRUE; - BOOL bHasOr = FALSE; + sal_Bool bConflict = sal_False; + sal_Bool bContLoop = sal_True; + sal_Bool bHasOr = sal_False; SCCOLROW nFirstField = aParam.GetEntry( 0 ).nField; // create AUTOFILTER records for filtered columns @@ -960,12 +960,12 @@ XclExpAutofilter* ExcAutoFilterRecs::GetByCol( SCCOL nCol ) return xFilter.get(); } -BOOL ExcAutoFilterRecs::IsFiltered( SCCOL nCol ) +sal_Bool ExcAutoFilterRecs::IsFiltered( SCCOL nCol ) { for( size_t nPos = 0, nSize = maFilterList.GetSize(); nPos < nSize; ++nPos ) if( maFilterList.GetRecord( nPos )->GetCol() == static_cast<sal_uInt16>(nCol) ) - return TRUE; - return FALSE; + return sal_True; + return sal_False; } void ExcAutoFilterRecs::AddObjRecs() diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx index c6a5e5e24..b0fda1d4f 100644 --- a/sc/source/filter/excel/exctools.cxx +++ b/sc/source/filter/excel/exctools.cxx @@ -98,9 +98,9 @@ XclImpOutlineBuffer::XclImpOutlineBuffer( SCSIZE nNewSize ) DBG_ASSERT( nNewSize > 0, "-OutlineBuffer::Ctor: nNewSize == 0!" ); nSize = nNewSize + 1; - pLevel = new BYTE[ nSize ]; - pOuted = new BOOL[ nSize ]; - pHidden = new BOOL[ nSize ]; + pLevel = new sal_uInt8[ nSize ]; + pOuted = new sal_Bool[ nSize ]; + pHidden = new sal_Bool[ nSize ]; pOutlineArray = NULL; Reset(); @@ -115,7 +115,7 @@ XclImpOutlineBuffer::~XclImpOutlineBuffer() } -void XclImpOutlineBuffer::SetLevel( SCSIZE nIndex, BYTE nVal, BOOL bOuted, BOOL bHidden ) +void XclImpOutlineBuffer::SetLevel( SCSIZE nIndex, sal_uInt8 nVal, sal_Bool bOuted, sal_Bool bHidden ) { if( nIndex < nSize ) { @@ -143,28 +143,28 @@ void XclImpOutlineBuffer::MakeScOutline( void ) if( !pOutlineArray || !HasOutline() ) return; - const UINT16 nNumLev = 8; - BOOL bPreOutedLevel = FALSE; - BYTE nCurrLevel = 0; - BOOL bMakeHidden[ nNumLev ]; - BOOL bMakeVisible[ nNumLev + 1 ]; + const sal_uInt16 nNumLev = 8; + sal_Bool bPreOutedLevel = sal_False; + sal_uInt8 nCurrLevel = 0; + sal_Bool bMakeHidden[ nNumLev ]; + sal_Bool bMakeVisible[ nNumLev + 1 ]; sal_uInt16 nLevel; for( nLevel = 0; nLevel < nNumLev; ++nLevel ) - bMakeHidden[ nLevel ] = FALSE; + bMakeHidden[ nLevel ] = sal_False; for( nLevel = 0; nLevel <= nNumLev; ++nLevel ) - bMakeVisible[ nLevel ] = TRUE; + bMakeVisible[ nLevel ] = sal_True; if( nLast < (nSize - 1) ) nLast++; // search for hidden attributes at end of level, move them to begin if( bButtonNormal ) { - for( BYTE nWorkLevel = 1; nWorkLevel <= nMaxLevel; nWorkLevel++ ) + for( sal_uInt8 nWorkLevel = 1; nWorkLevel <= nMaxLevel; nWorkLevel++ ) { - UINT16 nStartPos = 0; - BYTE nCurrLevel2 = 0; - BYTE nPrevLevel = 0; + sal_uInt16 nStartPos = 0; + sal_uInt8 nCurrLevel2 = 0; + sal_uInt8 nPrevLevel = 0; for( SCSIZE nC = 0 ; nC <= nLast ; nC++ ) { @@ -177,10 +177,10 @@ void XclImpOutlineBuffer::MakeScOutline( void ) if( pOuted[ nC ] && pHidden[ nStartPos ] ) { if( nStartPos ) - pOuted[ nStartPos - 1 ] = TRUE; + pOuted[ nStartPos - 1 ] = sal_True; else - bPreOutedLevel = TRUE; - pOuted[ nC ] = FALSE; + bPreOutedLevel = sal_True; + pOuted[ nC ] = sal_False; } } } @@ -190,16 +190,16 @@ void XclImpOutlineBuffer::MakeScOutline( void ) bPreOutedLevel = pHidden[ 0 ]; // generate SC outlines - UINT16 nPrevC; - UINT16 nStart[ nNumLev ]; - BOOL bDummy; - BOOL bPrevOuted = bPreOutedLevel; - BOOL bCurrHidden = FALSE; - BOOL bPrevHidden = FALSE; + sal_uInt16 nPrevC; + sal_uInt16 nStart[ nNumLev ]; + sal_Bool bDummy; + sal_Bool bPrevOuted = bPreOutedLevel; + sal_Bool bCurrHidden = sal_False; + sal_Bool bPrevHidden = sal_False; for( SCSIZE nC = 0; nC <= nLast; nC++ ) { - BYTE nWorkLevel = pLevel[ nC ]; + sal_uInt8 nWorkLevel = pLevel[ nC ]; nPrevC = static_cast< sal_uInt16 >( nC ? nC - 1 : 0 ); bPrevHidden = bCurrHidden; @@ -217,9 +217,9 @@ void XclImpOutlineBuffer::MakeScOutline( void ) // close levels while( nWorkLevel < nCurrLevel ) { - BOOL bLastLevel = (nWorkLevel == (nCurrLevel - 1)); - BOOL bRealHidden = (bMakeHidden[ nCurrLevel ] && bPrevHidden ); - BOOL bRealVisible = (bMakeVisible[ nCurrLevel ] || + sal_Bool bLastLevel = (nWorkLevel == (nCurrLevel - 1)); + sal_Bool bRealHidden = (bMakeHidden[ nCurrLevel ] && bPrevHidden ); + sal_Bool bRealVisible = (bMakeVisible[ nCurrLevel ] || (!bCurrHidden && bLastLevel)); pOutlineArray->Insert( nStart[ nCurrLevel ], nPrevC , bDummy, @@ -232,8 +232,8 @@ void XclImpOutlineBuffer::MakeScOutline( void ) } -void XclImpOutlineBuffer::SetLevelRange( SCSIZE nF, SCSIZE nL, BYTE nVal, - BOOL bOuted, BOOL bHidden ) +void XclImpOutlineBuffer::SetLevelRange( SCSIZE nF, SCSIZE nL, sal_uInt8 nVal, + sal_Bool bOuted, sal_Bool bHidden ) { DBG_ASSERT( nF <= nL, "+OutlineBuffer::SetLevelRange(): Last < First!" ); @@ -242,10 +242,10 @@ void XclImpOutlineBuffer::SetLevelRange( SCSIZE nF, SCSIZE nL, BYTE nVal, if( nL > nLast ) nLast = nL; - BYTE* pLevelCount; - BYTE* pLast; - BOOL* pOutedCount; - BOOL* pHiddenCount; + sal_uInt8* pLevelCount; + sal_uInt8* pLast; + sal_Bool* pOutedCount; + sal_Bool* pHiddenCount; pLevelCount = &pLevel[ nF ]; pLast = &pLevel[ nL ]; @@ -270,7 +270,7 @@ void XclImpOutlineBuffer::Reset( void ) for( SCSIZE nC = 0 ; nC < nSize ; nC++ ) { pLevel[ nC ] = 0; - pOuted[ nC ] = pHidden[ nC ] = FALSE; + pOuted[ nC ] = pHidden[ nC ] = sal_False; } nLast = 0; nMaxLevel = 0; @@ -280,7 +280,7 @@ void XclImpOutlineBuffer::Reset( void ) //___________________________________________________________________ -ExcScenarioCell::ExcScenarioCell( const UINT16 nC, const UINT16 nR ) : nCol( nC ), nRow( nR ) +ExcScenarioCell::ExcScenarioCell( const sal_uInt16 nC, const sal_uInt16 nR ) : nCol( nC ), nRow( nR ) { } @@ -300,8 +300,8 @@ void ExcScenarioCell::SetValue( const String& r ) ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR ) : nTab( rR.pIR->GetCurrScTab() ) { - UINT16 nCref; - UINT8 nName, nComment; + sal_uInt16 nCref; + sal_uInt8 nName, nComment; rIn >> nCref; rIn >> nProtected; @@ -324,8 +324,8 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR ) : nTab( rR.pIR else pComment = new String; - UINT16 n = nCref; - UINT16 nC, nR; + sal_uInt16 n = nCref; + sal_uInt16 nC, nR; while( n ) { rIn >> nR >> nC; @@ -365,24 +365,24 @@ ExcScenario::~ExcScenario() } -void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast ) +void ExcScenario::Apply( const XclImpRoot& rRoot, const sal_Bool bLast ) { ScDocument& r = rRoot.GetDoc(); ExcScenarioCell* p = EXCSCFIRST(); String aSzenName( *pName ); - UINT16 nNewTab = nTab + 1; + sal_uInt16 nNewTab = nTab + 1; if( !r.InsertTab( nNewTab, aSzenName ) ) return; - r.SetScenario( nNewTab, TRUE ); + r.SetScenario( nNewTab, sal_True ); // #112621# do not show scenario frames r.SetScenarioData( nNewTab, *pComment, COL_LIGHTGRAY, /*SC_SCENARIO_SHOWFRAME|*/SC_SCENARIO_COPYALL|(nProtected ? SC_SCENARIO_PROTECT : 0) ); while( p ) { - UINT16 nCol = p->nCol; - UINT16 nRow = p->nRow; + sal_uInt16 nCol = p->nCol; + sal_uInt16 nRow = p->nRow; String aVal = p->GetValue(); r.ApplyFlagsTab( nCol, nRow, nCol, nRow, nNewTab, SC_MF_SCENARIO ); @@ -393,7 +393,7 @@ void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast ) } if( bLast ) - r.SetActiveScenario( nNewTab, TRUE ); + r.SetActiveScenario( nNewTab, sal_True ); // #111896# modify what the Active tab is set to if the new // scenario tab occurs before the active tab. @@ -421,12 +421,12 @@ ExcScenarioList::~ExcScenarioList() void ExcScenarioList::Apply( const XclImpRoot& rRoot ) { ExcScenario* p = _Last(); - UINT16 n = ( UINT16 ) Count(); + sal_uInt16 n = ( sal_uInt16 ) Count(); while( p ) { n--; - p->Apply( rRoot, ( BOOL ) ( n == nLastScenario ) ); + p->Apply( rRoot, ( sal_Bool ) ( n == nLastScenario ) ); p = _Prev(); } } diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index b0b87d2cf..c4774dda3 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -97,7 +97,7 @@ FltError ExportBiff5::Write() if( pDocShell && xRootStrg.Is() && bWriteBasicStrg ) { SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg, bWriteBasicCode, bWriteBasicStrg ); - ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT ); + sal_uLong nErr = aBasicImport.SaveOrDelMSVBAStorage( sal_True, EXC_STORAGE_VBA_PROJECT ); if( nErr != ERRCODE_NONE ) pDocShell->SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); } @@ -186,7 +186,7 @@ FltError ExportXml2007::Write() if( pDocShell && xRootStrg.Is() && bWriteBasicStrg ) { SvxImportMSVBasic aBasicImport( *pDocShell, *xRootStrg, bWriteBasicCode, bWriteBasicStrg ); - ULONG nErr = aBasicImport.SaveOrDelMSVBAStorage( TRUE, EXC_STORAGE_VBA_PROJECT ); + sal_uLong nErr = aBasicImport.SaveOrDelMSVBAStorage( sal_True, EXC_STORAGE_VBA_PROJECT ); if( nErr != ERRCODE_NONE ) pDocShell->SetError( nErr, ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ) ); } diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 84b2f6c3a..91716b8c2 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -48,11 +48,11 @@ #include "patattr.hxx" #include "ftools.hxx" -const UINT16 LotusFontBuffer::nSize = 8; +const sal_uInt16 LotusFontBuffer::nSize = 8; -void LotusFontBuffer::Fill( const UINT8 nIndex, SfxItemSet& rItemSet ) +void LotusFontBuffer::Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet ) { - UINT8 nIntIndex = nIndex & 0x07; + sal_uInt8 nIntIndex = nIndex & 0x07; ENTRY* pAkt = pData + nIntIndex; @@ -93,7 +93,7 @@ void LotusFontBuffer::Fill( const UINT8 nIndex, SfxItemSet& rItemSet ) } -void LotusFontBuffer::SetName( const UINT16 nIndex, const String& rName ) +void LotusFontBuffer::SetName( const sal_uInt16 nIndex, const String& rName ) { DBG_ASSERT( nIndex < nSize, "*LotusFontBuffer::SetName(): Array zu klein!" ); if( nIndex < nSize ) @@ -107,15 +107,15 @@ void LotusFontBuffer::SetName( const UINT16 nIndex, const String& rName ) } -void LotusFontBuffer::SetHeight( const UINT16 nIndex, const UINT16 nHeight ) +void LotusFontBuffer::SetHeight( const sal_uInt16 nIndex, const sal_uInt16 nHeight ) { DBG_ASSERT( nIndex < nSize, "*LotusFontBuffer::SetHeight(): Array zu klein!" ); if( nIndex < nSize ) - pData[ nIndex ].Height( *( new SvxFontHeightItem( ( ULONG ) nHeight * 20, 100, ATTR_FONT_HEIGHT ) ) ); + pData[ nIndex ].Height( *( new SvxFontHeightItem( ( sal_uLong ) nHeight * 20, 100, ATTR_FONT_HEIGHT ) ) ); } -void LotusFontBuffer::SetType( const UINT16 nIndex, const UINT16 nType ) +void LotusFontBuffer::SetType( const sal_uInt16 nIndex, const sal_uInt16 nType ) { DBG_ASSERT( nIndex < nSize, "*LotusFontBuffer::SetType(): Array zu klein!" ); if( nIndex < nSize ) diff --git a/sc/source/filter/excel/frmbase.cxx b/sc/source/filter/excel/frmbase.cxx index 3b165e599..4c535812f 100644 --- a/sc/source/filter/excel/frmbase.cxx +++ b/sc/source/filter/excel/frmbase.cxx @@ -54,10 +54,10 @@ _ScRangeListTabs::_ScRangeListTabs( void ) { ppTabLists = new _ScRangeList*[ MAXTAB + 1 ]; - for( UINT16 n = 0 ; n <= MAXTAB ; n++ ) + for( sal_uInt16 n = 0 ; n <= MAXTAB ; n++ ) ppTabLists[ n ] = NULL; - bHasRanges = FALSE; + bHasRanges = sal_False; pAct = NULL; nAct = 0; } @@ -67,7 +67,7 @@ _ScRangeListTabs::~_ScRangeListTabs() { if( bHasRanges ) { - for( UINT16 n = 0 ; n <= MAXTAB ; n++ ) + for( sal_uInt16 n = 0 ; n <= MAXTAB ; n++ ) { if( ppTabLists[ n ] ) delete ppTabLists[ n ]; @@ -78,7 +78,7 @@ _ScRangeListTabs::~_ScRangeListTabs() } -void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b ) +void _ScRangeListTabs::Append( ScSingleRefData a, const sal_Bool b ) { if( b ) { @@ -96,7 +96,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b ) DBG_ASSERT( ValidTab(a.nTab), "-_ScRangeListTabs::Append(): Luegen haben kurze Abstuerze!" ); } - bHasRanges = TRUE; + bHasRanges = sal_True; if( a.nTab >= 0 ) { @@ -110,7 +110,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, const BOOL b ) } -void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b ) +void _ScRangeListTabs::Append( ScComplexRefData a, const sal_Bool b ) { if( b ) { @@ -156,7 +156,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b ) "+_ScRangeListTabs::Append(): 3D-Ranges werden in SC nicht unterstuetzt!" ); } - bHasRanges = TRUE; + bHasRanges = sal_True; if( a.Ref1.nTab >= 0 ) { @@ -170,7 +170,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, const BOOL b ) } -const ScRange* _ScRangeListTabs::First( const UINT16 n ) +const ScRange* _ScRangeListTabs::First( const sal_uInt16 n ) { DBG_ASSERT( ValidTab(n), "-_ScRangeListTabs::First(): Und tschuessssssss!" ); @@ -200,7 +200,7 @@ const ScRange* _ScRangeListTabs::Next( void ) -ConverterBase::ConverterBase( UINT16 nNewBuffer ) : +ConverterBase::ConverterBase( sal_uInt16 nNewBuffer ) : aEingPos( 0, 0, 0 ), eStatus( ConvOK ), nBufferSize( nNewBuffer ) @@ -224,7 +224,7 @@ void ConverterBase::Reset() -ExcelConverterBase::ExcelConverterBase( UINT16 nNewBuffer ) : +ExcelConverterBase::ExcelConverterBase( sal_uInt16 nNewBuffer ) : ConverterBase( nNewBuffer ) { } @@ -248,7 +248,7 @@ void ExcelConverterBase::Reset() -LotusConverterBase::LotusConverterBase( SvStream &rStr, UINT16 nNewBuffer ) : +LotusConverterBase::LotusConverterBase( SvStream &rStr, sal_uInt16 nNewBuffer ) : ConverterBase( nNewBuffer ), aIn( rStr ), nBytesLeft( 0 ) @@ -259,14 +259,14 @@ LotusConverterBase::~LotusConverterBase() { } -//UNUSED2008-05 void LotusConverterBase::Reset( INT32 nLen, const ScAddress& rEingPos ) +//UNUSED2008-05 void LotusConverterBase::Reset( sal_Int32 nLen, const ScAddress& rEingPos ) //UNUSED2008-05 { //UNUSED2008-05 ConverterBase::Reset(); //UNUSED2008-05 nBytesLeft = nLen; //UNUSED2008-05 aEingPos = rEingPos; //UNUSED2008-05 } //UNUSED2008-05 -//UNUSED2008-05 void LotusConverterBase::Reset( INT32 nLen ) +//UNUSED2008-05 void LotusConverterBase::Reset( sal_Int32 nLen ) //UNUSED2008-05 { //UNUSED2008-05 ConverterBase::Reset(); //UNUSED2008-05 nBytesLeft = nLen; diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index b4483910f..db8f65bb1 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -145,7 +145,7 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): // ab Biff8 pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc( GetRoot() ); - bTabTruncated = FALSE; + bTabTruncated = sal_False; // Excel-Dokument per Default auf 31.12.1899, entspricht Excel-Einstellungen mit 1.1.1900 ScDocOptions aOpt = pD->GetDocOptions(); @@ -154,9 +154,9 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): pD->GetFormatTable()->ChangeNullDate( 30, 12, 1899 ); ScDocOptions aDocOpt( pD->GetDocOptions() ); - aDocOpt.SetIgnoreCase( TRUE ); // always in Excel - aDocOpt.SetFormulaRegexEnabled( FALSE ); // regular expressions? what's that? - aDocOpt.SetLookUpColRowNames( FALSE ); // default: no natural language refs + aDocOpt.SetIgnoreCase( sal_True ); // always in Excel + aDocOpt.SetFormulaRegexEnabled( sal_False ); // regular expressions? what's that? + aDocOpt.SetLookUpColRowNames( sal_False ); // default: no natural language refs pD->SetDocOptions( aDocOpt ); } @@ -181,7 +181,7 @@ void ImportExcel::ReadFileSharing() if( (nRecommendReadOnly != 0) || (nPasswordHash != 0) ) { if( SfxItemSet* pItemSet = GetMedium().GetItemSet() ) - pItemSet->Put( SfxBoolItem( SID_DOC_READONLY, TRUE ) ); + pItemSet->Put( SfxBoolItem( SID_DOC_READONLY, sal_True ) ); if( SfxObjectShell* pShell = GetDocShell() ) { @@ -382,7 +382,7 @@ void ImportExcel::Window1() void ImportExcel::Row25( void ) { - UINT16 nRow, nRowHeight; + sal_uInt16 nRow, nRowHeight; aIn >> nRow; aIn.Ignore( 4 ); // Mic und Mac ueberspringen @@ -398,7 +398,7 @@ void ImportExcel::Row25( void ) } else {// -------------------- BIFF5 - UINT16 nGrbit; + sal_uInt16 nGrbit; aIn.Ignore( 2 ); // reserved aIn >> nGrbit; @@ -467,8 +467,8 @@ void ImportExcel:: WinProtection( void ) void ImportExcel::Columndefault( void ) {// Default Cell Attributes - UINT16 nColMic, nColMac; - BYTE nOpt0; + sal_uInt16 nColMic, nColMac; + sal_uInt8 nOpt0; aIn >> nColMic >> nColMac; @@ -478,9 +478,9 @@ void ImportExcel::Columndefault( void ) nColMac--; if( nColMac > MAXCOL ) - nColMac = static_cast<UINT16>(MAXCOL); + nColMac = static_cast<sal_uInt16>(MAXCOL); - for( UINT16 nCol = nColMic ; nCol <= nColMac ; nCol++ ) + for( sal_uInt16 nCol = nColMic ; nCol <= nColMac ; nCol++ ) { aIn >> nOpt0; aIn.Ignore( 2 ); // nur 0. Attribut-Byte benutzt @@ -493,8 +493,8 @@ void ImportExcel::Columndefault( void ) void ImportExcel::Array25( void ) { - UINT16 nFirstRow, nLastRow, nFormLen; - BYTE nFirstCol, nLastCol; + sal_uInt16 nFirstRow, nLastRow, nFormLen; + sal_uInt8 nFirstCol, nLastCol; aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol; @@ -532,7 +532,7 @@ void ImportExcel::Array25( void ) void ImportExcel::Rec1904( void ) { - UINT16 n1904; + sal_uInt16 n1904; aIn >> n1904; @@ -548,12 +548,12 @@ void ImportExcel::Rec1904( void ) void ImportExcel::Externname25( void ) { - UINT32 nRes; - UINT16 nOpt; + sal_uInt32 nRes; + sal_uInt16 nOpt; aIn >> nOpt >> nRes; - String aName( aIn.ReadByteString( FALSE ) ); + String aName( aIn.ReadByteString( sal_False ) ); if( ( nOpt & 0x0001 ) || ( ( nOpt & 0xFFFE ) == 0x0000 ) ) {// external name @@ -573,16 +573,16 @@ void ImportExcel::Externname25( void ) void ImportExcel::Colwidth( void ) {// Column Width - BYTE nColFirst, nColLast; - UINT16 nColWidth; + sal_uInt8 nColFirst, nColLast; + sal_uInt16 nColWidth; aIn >> nColFirst >> nColLast >> nColWidth; //! TODO: add a check for the unlikely case of changed MAXCOL (-> XclImpAddressConverter) // if( nColLast > MAXCOL ) -// nColLast = static_cast<UINT16>(MAXCOL); +// nColLast = static_cast<sal_uInt16>(MAXCOL); - USHORT nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() ); + sal_uInt16 nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() ); pColRowBuff->SetWidthRange( nColFirst, nColLast, nScWidth ); } @@ -641,7 +641,7 @@ void ImportExcel::DefColWidth( void ) long nFontHt = GetFontBuffer().GetAppFontData().mnHeight; fDefWidth += XclTools::GetXclDefColWidthCorrection( nFontHt ); - USHORT nScWidth = XclTools::GetScColumnWidth( limit_cast< sal_uInt16 >( fDefWidth ), GetCharWidth() ); + sal_uInt16 nScWidth = XclTools::GetScColumnWidth( limit_cast< sal_uInt16 >( fDefWidth ), GetCharWidth() ); pColRowBuff->SetDefWidth( nScWidth ); } @@ -653,8 +653,8 @@ void ImportExcel::Builtinfmtcnt( void ) void ImportExcel::Colinfo( void ) {// Column Formatting Information - UINT16 nColFirst, nColLast, nColWidth, nXF; - UINT16 nOpt; + sal_uInt16 nColFirst, nColLast, nColWidth, nXF; + sal_uInt16 nOpt; aIn >> nColFirst >> nColLast >> nColWidth >> nXF >> nOpt; @@ -662,7 +662,7 @@ void ImportExcel::Colinfo( void ) return; if( nColLast > MAXCOL ) - nColLast = static_cast<UINT16>(MAXCOL); + nColLast = static_cast<sal_uInt16>(MAXCOL); bool bHidden = ::get_flag( nOpt, EXC_COLINFO_HIDDEN ); bool bCollapsed = ::get_flag( nOpt, EXC_COLINFO_COLLAPSED ); @@ -672,7 +672,7 @@ void ImportExcel::Colinfo( void ) if( bHidden ) pColRowBuff->HideColRange( nColFirst, nColLast ); - USHORT nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() ); + sal_uInt16 nScWidth = XclTools::GetScColumnWidth( nColWidth, GetCharWidth() ); pColRowBuff->SetWidthRange( nColFirst, nColLast, nScWidth ); pColRowBuff->SetDefaultXF( nColFirst, nColLast, nXF ); } @@ -680,7 +680,7 @@ void ImportExcel::Colinfo( void ) void ImportExcel::Wsbool( void ) { - UINT16 nFlags; + sal_uInt16 nFlags; aIn >> nFlags; pRowOutlineBuff->SetButtonMode( ::get_flag( nFlags, EXC_WSBOOL_ROWBELOW ) ); @@ -692,7 +692,7 @@ void ImportExcel::Wsbool( void ) void ImportExcel::Boundsheet( void ) { - UINT16 nGrbit = 0; + sal_uInt16 nGrbit = 0; if( GetBiff() == EXC_BIFF5 ) { @@ -702,7 +702,7 @@ void ImportExcel::Boundsheet( void ) aIn >> nGrbit; } - String aName( aIn.ReadByteString( FALSE ) ); + String aName( aIn.ReadByteString( sal_False ) ); SCTAB nScTab = static_cast< SCTAB >( nBdshtTab ); if( nScTab > 0 ) @@ -712,7 +712,7 @@ void ImportExcel::Boundsheet( void ) } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nScTab, FALSE ); + pD->SetVisible( nScTab, sal_False ); if( !pD->RenameTab( nScTab, aName ) ) { @@ -746,7 +746,7 @@ void ImportExcel::ReadUsesElfs() if( maStrm.ReaduInt16() != 0 ) { ScDocOptions aDocOpt = GetDoc().GetDocOptions(); - aDocOpt.SetLookUpColRowNames( TRUE ); + aDocOpt.SetLookUpColRowNames( sal_True ); GetDoc().SetDocOptions( aDocOpt ); } } @@ -754,7 +754,7 @@ void ImportExcel::ReadUsesElfs() void ImportExcel::Hideobj( void ) { - UINT16 nHide; + sal_uInt16 nHide; ScVObjMode eOle, eChart, eDraw; aIn >> nHide; @@ -795,15 +795,15 @@ void ImportExcel::Bundleheader( void ) void ImportExcel::Standardwidth( void ) { - USHORT nScWidth = XclTools::GetScColumnWidth( maStrm.ReaduInt16(), GetCharWidth() ); - pColRowBuff->SetDefWidth( nScWidth, TRUE ); + sal_uInt16 nScWidth = XclTools::GetScColumnWidth( maStrm.ReaduInt16(), GetCharWidth() ); + pColRowBuff->SetDefWidth( nScWidth, sal_True ); } void ImportExcel::Shrfmla( void ) { - UINT16 nFirstRow, nLastRow, nLenExpr; - BYTE nFirstCol, nLastCol; + sal_uInt16 nFirstRow, nLastRow, nLenExpr; + sal_uInt8 nFirstCol, nLastCol; aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol; aIn.Ignore( 2 ); @@ -829,8 +829,8 @@ void ImportExcel::Shrfmla( void ) void ImportExcel::Mulrk( void ) { XclAddress aXclPos; - UINT16 nXF; - INT32 nRkNum; + sal_uInt16 nXF; + sal_Int32 nRkNum; aIn >> aXclPos; @@ -851,7 +851,7 @@ void ImportExcel::Mulrk( void ) void ImportExcel::Mulblank( void ) { XclAddress aXclPos; - UINT16 nXF; + sal_uInt16 nXF; aIn >> aXclPos; @@ -927,7 +927,7 @@ void ImportExcel::Olesize( void ) void ImportExcel::Row34( void ) { - UINT16 nRow, nRowHeight, nGrbit, nXF; + sal_uInt16 nRow, nRowHeight, nGrbit, nXF; aIn >> nRow; aIn.Ignore( 4 ); // Mic und Mac ueberspringen @@ -974,8 +974,8 @@ void ImportExcel::Bof3( void ) void ImportExcel::Array34( void ) { - UINT16 nFirstRow, nLastRow, nFormLen; - BYTE nFirstCol, nLastCol; + sal_uInt16 nFirstRow, nLastRow, nFormLen; + sal_uInt8 nFirstCol, nLastCol; aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol; aIn.Ignore( (GetBiff() >= EXC_BIFF5) ? 6 : 2 ); @@ -1017,10 +1017,10 @@ void ImportExcel::Defrowheight345( void ) void ImportExcel::TableOp( void ) { - UINT16 nFirstRow, nLastRow; - UINT8 nFirstCol, nLastCol; - UINT16 nGrbit; - UINT16 nInpRow, nInpCol, nInpRow2, nInpCol2; + sal_uInt16 nFirstRow, nLastRow; + sal_uInt8 nFirstCol, nLastCol; + sal_uInt16 nGrbit; + sal_uInt16 nInpRow, nInpCol, nInpRow2, nInpCol2; aIn >> nFirstRow >> nLastRow >> nFirstCol >> nLastCol >> nGrbit >> nInpRow >> nInpCol >> nInpRow2 >> nInpCol2; @@ -1031,50 +1031,50 @@ void ImportExcel::TableOp( void ) { ScTabOpParam aTabOpParam; aTabOpParam.nMode = (nGrbit & EXC_TABLEOP_BOTH) ? 2 : ((nGrbit & EXC_TABLEOP_ROW) ? 1 : 0 ); - USHORT nCol = nFirstCol - 1; - USHORT nRow = nFirstRow - 1; + sal_uInt16 nCol = nFirstCol - 1; + sal_uInt16 nRow = nFirstRow - 1; SCTAB nTab = GetCurrScTab(); switch( aTabOpParam.nMode ) { case 0: // COL aTabOpParam.aRefFormulaCell.Set( static_cast<SCCOL>(nFirstCol), - static_cast<SCROW>(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast<SCROW>(nFirstRow - 1), nTab, sal_False, + sal_False, sal_False ); aTabOpParam.aRefFormulaEnd.Set( static_cast<SCCOL>(nLastCol), - static_cast<SCROW>(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast<SCROW>(nFirstRow - 1), nTab, sal_False, + sal_False, sal_False ); aTabOpParam.aRefColCell.Set( static_cast<SCCOL>(nInpCol), - static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow), nTab, sal_False, sal_False, + sal_False ); nRow++; break; case 1: // ROW aTabOpParam.aRefFormulaCell.Set( static_cast<SCCOL>(nFirstCol - 1), - static_cast<SCROW>(nFirstRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nFirstRow), nTab, sal_False, sal_False, + sal_False ); aTabOpParam.aRefFormulaEnd.Set( static_cast<SCCOL>(nFirstCol - 1), - static_cast<SCROW>(nLastRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nLastRow), nTab, sal_False, sal_False, + sal_False ); aTabOpParam.aRefRowCell.Set( static_cast<SCCOL>(nInpCol), - static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow), nTab, sal_False, sal_False, + sal_False ); nCol++; break; case 2: // TWO-INPUT aTabOpParam.aRefFormulaCell.Set( static_cast<SCCOL>(nFirstCol - 1), - static_cast<SCROW>(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast<SCROW>(nFirstRow - 1), nTab, sal_False, + sal_False, sal_False ); aTabOpParam.aRefRowCell.Set( static_cast<SCCOL>(nInpCol), - static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow), nTab, sal_False, sal_False, + sal_False ); aTabOpParam.aRefColCell.Set( static_cast<SCCOL>(nInpCol2), - static_cast<SCROW>(nInpRow2), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow2), nTab, sal_False, sal_False, + sal_False ); break; } @@ -1087,7 +1087,7 @@ void ImportExcel::TableOp( void ) } else { - bTabTruncated = TRUE; + bTabTruncated = sal_True; GetTracer().TraceInvalidRow(GetCurrScTab(), nLastRow, MAXROW); } } @@ -1114,7 +1114,7 @@ void ImportExcel::Bof4( void ) void ImportExcel::Bof5( void ) { //POST: eDateiTyp = Typ der zu lesenden Datei - UINT16 nSubType, nVers; + sal_uInt16 nSubType, nVers; BiffTyp eDatei; maStrm.DisableDecryption(); @@ -1170,7 +1170,7 @@ void ImportExcel::NeueTabelle( void ) } -const ScTokenArray* ImportExcel::ErrorToFormula( BYTE bErrOrVal, BYTE nError, double& rVal ) +const ScTokenArray* ImportExcel::ErrorToFormula( sal_uInt8 bErrOrVal, sal_uInt8 nError, double& rVal ) { return pFormConv->GetBoolErr( XclTools::ErrorToEnum( rVal, bErrOrVal, nError ) ); } @@ -1253,7 +1253,7 @@ void ImportExcel::PostDocLoad( void ) { for( SCTAB n = 0 ; n < nLast ; n++ ) { - p = pExcRoot->pPrintRanges->First( static_cast<UINT16>(n) ); + p = pExcRoot->pPrintRanges->First( static_cast<sal_uInt16>(n) ); if( p ) { DBG_ASSERT( pExcRoot->pPrintRanges->GetActList(), @@ -1279,27 +1279,27 @@ void ImportExcel::PostDocLoad( void ) { for( SCTAB n = 0 ; n < nLast ; n++ ) { - p = pExcRoot->pPrintTitles->First( static_cast<UINT16>(n) ); + p = pExcRoot->pPrintTitles->First( static_cast<sal_uInt16>(n) ); if( p ) { DBG_ASSERT( pExcRoot->pPrintTitles->GetActList(), "-ImportExcel::PostDocLoad(): Imaginaere Tabelle gefunden!" ); - BOOL bRowVirgin = TRUE; - BOOL bColVirgin = TRUE; + sal_Bool bRowVirgin = sal_True; + sal_Bool bColVirgin = sal_True; while( p ) { if( p->aStart.Col() == 0 && p->aEnd.Col() == MAXCOL && bRowVirgin ) { pD->SetRepeatRowRange( n, p ); - bRowVirgin = FALSE; + bRowVirgin = sal_False; } if( p->aStart.Row() == 0 && p->aEnd.Row() == MAXROW && bColVirgin ) { pD->SetRepeatColRange( n, p ); - bColVirgin = FALSE; + bColVirgin = sal_False; } p = pExcRoot->pPrintTitles->Next(); @@ -1324,10 +1324,10 @@ XclImpOutlineDataBuffer::~XclImpOutlineDataBuffer() void XclImpOutlineDataBuffer::Convert() { - mxColOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, TRUE )->GetColArray() ); + mxColOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, sal_True )->GetColArray() ); mxColOutlineBuff->MakeScOutline(); - mxRowOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, TRUE )->GetRowArray() ); + mxRowOutlineBuff->SetOutlineArray( GetDoc().GetOutlineTable( mnScTab, sal_True )->GetRowArray() ); mxRowOutlineBuff->MakeScOutline(); mxColRowBuff->ConvertHiddenFlags( mnScTab ); diff --git a/sc/source/filter/excel/namebuff.cxx b/sc/source/filter/excel/namebuff.cxx index 81676152a..4b8d08f37 100644 --- a/sc/source/filter/excel/namebuff.cxx +++ b/sc/source/filter/excel/namebuff.cxx @@ -44,16 +44,16 @@ #include "xiroot.hxx" -UINT32 StringHashEntry::MakeHashCode( const String& r ) +sal_uInt32 StringHashEntry::MakeHashCode( const String& r ) { - register UINT32 n = 0; + register sal_uInt32 n = 0; const sal_Unicode* pAkt = r.GetBuffer(); register sal_Unicode cAkt = *pAkt; while( cAkt ) { n *= 70; - n += ( UINT32 ) cAkt; + n += ( sal_uInt32 ) cAkt; pAkt++; cAkt = *pAkt; } @@ -86,14 +86,14 @@ void NameBuffer::operator <<( const String &rNewString ) #ifdef DBG_UTIL -UINT16 nShrCnt; +sal_uInt16 nShrCnt; #endif size_t ShrfmlaBuffer::ScAddressHashFunc::operator() (const ScAddress &addr) const { // Use something simple, it is just a hash. - return static_cast< UINT16 >( addr.Row() ) | (static_cast< UINT8 >( addr.Col() ) << 16); + return static_cast< sal_uInt16 >( addr.Row() ) | (static_cast< sal_uInt8 >( addr.Col() ) << 16); } const size_t nBase = 16384; // Range~ und Shared~ Dingens mit jeweils der Haelfte Ids @@ -127,15 +127,15 @@ void ShrfmlaBuffer::Store( const ScRange& rRange, const ScTokenArray& rToken ) const ScAddress& rMaxPos = pExcRoot->pIR->GetMaxPos(); pData->SetMaxCol(rMaxPos.Col()); pData->SetMaxRow(rMaxPos.Row()); - pData->SetIndex( static_cast< USHORT >( mnCurrIdx ) ); + pData->SetIndex( static_cast< sal_uInt16 >( mnCurrIdx ) ); pExcRoot->pIR->GetNamedRanges().Insert( pData ); - index_hash[rRange.aStart] = static_cast< USHORT >( mnCurrIdx ); + index_hash[rRange.aStart] = static_cast< sal_uInt16 >( mnCurrIdx ); index_list.push_front (rRange); ++mnCurrIdx; } -USHORT ShrfmlaBuffer::Find( const ScAddress & aAddr ) const +sal_uInt16 ShrfmlaBuffer::Find( const ScAddress & aAddr ) const { ShrfmlaHash::const_iterator hash = index_hash.find (aAddr); if (hash != index_hash.end()) @@ -145,8 +145,8 @@ USHORT ShrfmlaBuffer::Find( const ScAddress & aAddr ) const unsigned int ind = nBase; for (ShrfmlaList::const_iterator ptr = index_list.end(); ptr != index_list.begin() ; ind++) if ((--ptr)->In (aAddr)) - return static_cast< USHORT >( ind ); - return static_cast< USHORT >( mnCurrIdx ); + return static_cast< sal_uInt16 >( ind ); + return static_cast< sal_uInt16 >( mnCurrIdx ); } @@ -180,7 +180,7 @@ ExtSheetBuffer::~ExtSheetBuffer() } -sal_Int16 ExtSheetBuffer::Add( const String& rFPAN, const String& rTN, const BOOL bSWB ) +sal_Int16 ExtSheetBuffer::Add( const String& rFPAN, const String& rTN, const sal_Bool bSWB ) { List::Insert( new Cont( rFPAN, rTN, bSWB ), LIST_APPEND ); // return 1-based index of EXTERNSHEET @@ -188,21 +188,21 @@ sal_Int16 ExtSheetBuffer::Add( const String& rFPAN, const String& rTN, const BOO } -BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex ) +sal_Bool ExtSheetBuffer::GetScTabIndex( sal_uInt16 nExcIndex, sal_uInt16& rScIndex ) { DBG_ASSERT( nExcIndex, "*ExtSheetBuffer::GetScTabIndex(): Sheet-Index == 0!" ); nExcIndex--; Cont* pCur = ( Cont * ) List::GetObject( nExcIndex ); - UINT16& rTabNum = pCur->nTabNum; + sal_uInt16& rTabNum = pCur->nTabNum; if( pCur ) { if( rTabNum < 0xFFFD ) { rScIndex = rTabNum; - return TRUE; + return sal_True; } if( rTabNum == 0xFFFF ) @@ -212,8 +212,8 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex ) {// Tabelle ist im selben Workbook! if( pExcRoot->pIR->GetDoc().GetTable( pCur->aTab, nNewTabNum ) ) { - rScIndex = rTabNum = static_cast<UINT16>(nNewTabNum); - return TRUE; + rScIndex = rTabNum = static_cast<sal_uInt16>(nNewTabNum); + return sal_True; } else rTabNum = 0xFFFD; @@ -227,8 +227,8 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex ) String aTabName( ScGlobal::GetDocTabName( aURL, pCur->aTab ) ); if( pExcRoot->pIR->GetDoc().LinkExternalTab( nNewTabNum, aTabName, aURL, pCur->aTab ) ) { - rScIndex = rTabNum = static_cast<UINT16>(nNewTabNum); - return TRUE; + rScIndex = rTabNum = static_cast<sal_uInt16>(nNewTabNum); + return sal_True; } else rTabNum = 0xFFFE; // Tabelle einmal nicht angelegt -> wird @@ -241,11 +241,11 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex ) } } - return FALSE; + return sal_False; } -BOOL ExtSheetBuffer::IsLink( const UINT16 nExcIndex ) const +sal_Bool ExtSheetBuffer::IsLink( const sal_uInt16 nExcIndex ) const { DBG_ASSERT( nExcIndex > 0, "*ExtSheetBuffer::IsLink(): Index muss >0 sein!" ); Cont* pRet = ( Cont * ) List::GetObject( nExcIndex - 1 ); @@ -253,11 +253,11 @@ BOOL ExtSheetBuffer::IsLink( const UINT16 nExcIndex ) const if( pRet ) return pRet->bLink; else - return FALSE; + return sal_False; } -BOOL ExtSheetBuffer::GetLink( const UINT16 nExcIndex, String& rAppl, String& rDoc ) const +sal_Bool ExtSheetBuffer::GetLink( const sal_uInt16 nExcIndex, String& rAppl, String& rDoc ) const { DBG_ASSERT( nExcIndex > 0, "*ExtSheetBuffer::GetLink(): Index muss >0 sein!" ); Cont* pRet = ( Cont * ) List::GetObject( nExcIndex - 1 ); @@ -266,10 +266,10 @@ BOOL ExtSheetBuffer::GetLink( const UINT16 nExcIndex, String& rAppl, String& rDo { rAppl = pRet->aFile; rDoc = pRet->aTab; - return TRUE; + return sal_True; } else - return FALSE; + return sal_False; } @@ -288,13 +288,13 @@ void ExtSheetBuffer::Reset( void ) -BOOL ExtName::IsDDE( void ) const +sal_Bool ExtName::IsDDE( void ) const { return ( nFlags & 0x0001 ) != 0; } -BOOL ExtName::IsOLE( void ) const +sal_Bool ExtName::IsOLE( void ) const { return ( nFlags & 0x0002 ) != 0; } @@ -313,7 +313,7 @@ void ExtNameBuff::AddDDE( const String& rName, sal_Int16 nRefIdx ) } -void ExtNameBuff::AddOLE( const String& rName, sal_Int16 nRefIdx, UINT32 nStorageId ) +void ExtNameBuff::AddOLE( const String& rName, sal_Int16 nRefIdx, sal_uInt32 nStorageId ) { ExtName aNew( rName, 0x0002 ); aNew.nStorageId = nStorageId; diff --git a/sc/source/filter/excel/read.cxx b/sc/source/filter/excel/read.cxx index 4b2834873..cc0e3f9ff 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -89,9 +89,9 @@ FltError ImportExcel::Read( void ) Zustand eAkt = Z_BiffNull, ePrev = Z_BiffNull; FltError eLastErr = eERR_OK; - UINT16 nOpcode; - UINT16 nBofLevel = 0; - BOOL bBiff4Workbook = FALSE; + sal_uInt16 nOpcode; + sal_uInt16 nBofLevel = 0; + sal_Bool bBiff4Workbook = sal_False; DBG_ASSERT( &aIn != NULL, "-ImportExcel::Read(): Kein Stream - wie dass?!" ); @@ -189,7 +189,7 @@ FltError ImportExcel::Read( void ) else if( pExcRoot->eDateiTyp == Biff4W ) { eAkt = Z_Biff4W; - bBiff4Workbook = TRUE; + bBiff4Workbook = sal_True; } break; case EXC_BIFF5: @@ -722,7 +722,7 @@ FltError ImportExcel::Read( void ) break; case Biff5V: default: - pD->SetVisible( GetCurrScTab(), FALSE ); + pD->SetVisible( GetCurrScTab(), sal_False ); ePrev = eAkt; eAkt = Z_Biffn0; } @@ -782,7 +782,7 @@ FltError ImportExcel8::Read( void ) { #if EXC_INCL_DUMPER { - Biff8RecDumper aDumper( GetRoot(), TRUE ); + Biff8RecDumper aDumper( GetRoot(), sal_True ); if( aDumper.Dump( aIn ) ) return ERRCODE_ABORT; } @@ -1053,7 +1053,7 @@ FltError ImportExcel8::Read( void ) case Biff8V: // VB module default: // TODO: do not create a sheet in the Calc document - pD->SetVisible( GetCurrScTab(), FALSE ); + pD->SetVisible( GetCurrScTab(), sal_False ); XclTools::SkipSubStream( maStrm ); IncCurrScTab(); } diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx index 0f364ba53..b12af1da7 100644 --- a/sc/source/filter/excel/tokstack.cxx +++ b/sc/source/filter/excel/tokstack.cxx @@ -40,10 +40,10 @@ #include <stdio.h> // printf -const UINT16 TokenPool::nScTokenOff = 8192; +const sal_uInt16 TokenPool::nScTokenOff = 8192; -TokenStack::TokenStack( UINT16 nNewSize ) +TokenStack::TokenStack( sal_uInt16 nNewSize ) { pStack = new TokenId[ nNewSize ]; @@ -69,17 +69,17 @@ TokenStack::~TokenStack() TokenPool::TokenPool( void ) { - UINT16 nLauf = nScTokenOff; + sal_uInt16 nLauf = nScTokenOff; // Sammelstelle fuer Id-Folgen nP_Id = 256; - pP_Id = new UINT16[ nP_Id ]; + pP_Id = new sal_uInt16[ nP_Id ]; // Sammelstelle fuer Ids nElement = 32; - pElement = new UINT16[ nElement ]; + pElement = new sal_uInt16[ nElement ]; pType = new E_TYPE[ nElement ]; - pSize = new UINT16[ nElement ]; + pSize = new sal_uInt16[ nElement ]; nP_IdLast = 0; // Sammelstelle fuer Strings @@ -94,7 +94,7 @@ TokenPool::TokenPool( void ) // Sammelstelle fuer error codes nP_Err = 8; - pP_Err = new USHORT[ nP_Err ]; + pP_Err = new sal_uInt16[ nP_Err ]; // Sammelstellen fuer Referenzen nP_RefTr = 32; @@ -122,7 +122,7 @@ TokenPool::TokenPool( void ) TokenPool::~TokenPool() { - UINT16 n; + sal_uInt16 n; delete[] pP_Id; delete[] pElement; @@ -172,8 +172,8 @@ TokenPool::~TokenPool() void TokenPool::GrowString( void ) { - UINT16 nP_StrNew = nP_Str * 2; - UINT16 nL; + sal_uInt16 nP_StrNew = nP_Str * 2; + sal_uInt16 nL; String** ppP_StrNew = new String *[ nP_StrNew ]; @@ -191,11 +191,11 @@ void TokenPool::GrowString( void ) void TokenPool::GrowDouble( void ) { - UINT16 nP_DblNew = nP_Dbl * 2; + sal_uInt16 nP_DblNew = nP_Dbl * 2; double* pP_DblNew = new double[ nP_DblNew ]; - for( UINT16 nL = 0 ; nL < nP_Dbl ; nL++ ) + for( sal_uInt16 nL = 0 ; nL < nP_Dbl ; nL++ ) pP_DblNew[ nL ] = pP_Dbl[ nL ]; nP_Dbl = nP_DblNew; @@ -207,11 +207,11 @@ void TokenPool::GrowDouble( void ) //UNUSED2009-05 void TokenPool::GrowError( void ) //UNUSED2009-05 { -//UNUSED2009-05 UINT16 nP_ErrNew = nP_Err * 2; +//UNUSED2009-05 sal_uInt16 nP_ErrNew = nP_Err * 2; //UNUSED2009-05 -//UNUSED2009-05 USHORT* pP_ErrNew = new USHORT[ nP_ErrNew ]; +//UNUSED2009-05 sal_uInt16* pP_ErrNew = new sal_uInt16[ nP_ErrNew ]; //UNUSED2009-05 -//UNUSED2009-05 for( UINT16 nL = 0 ; nL < nP_Err ; nL++ ) +//UNUSED2009-05 for( sal_uInt16 nL = 0 ; nL < nP_Err ; nL++ ) //UNUSED2009-05 pP_ErrNew[ nL ] = pP_Err[ nL ]; //UNUSED2009-05 //UNUSED2009-05 nP_Err = nP_ErrNew; @@ -223,8 +223,8 @@ void TokenPool::GrowDouble( void ) void TokenPool::GrowTripel( void ) { - UINT16 nP_RefTrNew = nP_RefTr * 2; - UINT16 nL; + sal_uInt16 nP_RefTrNew = nP_RefTr * 2; + sal_uInt16 nL; ScSingleRefData** ppP_RefTrNew = new ScSingleRefData *[ nP_RefTrNew ]; @@ -242,11 +242,11 @@ void TokenPool::GrowTripel( void ) void TokenPool::GrowId( void ) { - UINT16 nP_IdNew = nP_Id * 2; + sal_uInt16 nP_IdNew = nP_Id * 2; - UINT16* pP_IdNew = new UINT16[ nP_IdNew ]; + sal_uInt16* pP_IdNew = new sal_uInt16[ nP_IdNew ]; - for( UINT16 nL = 0 ; nL < nP_Id ; nL++ ) + for( sal_uInt16 nL = 0 ; nL < nP_Id ; nL++ ) pP_IdNew[ nL ] = pP_Id[ nL ]; nP_Id = nP_IdNew; @@ -258,13 +258,13 @@ void TokenPool::GrowId( void ) void TokenPool::GrowElement( void ) { - UINT16 nElementNew = nElement * 2; + sal_uInt16 nElementNew = nElement * 2; - UINT16* pElementNew = new UINT16[ nElementNew ]; + sal_uInt16* pElementNew = new sal_uInt16[ nElementNew ]; E_TYPE* pTypeNew = new E_TYPE[ nElementNew ]; - UINT16* pSizeNew = new UINT16[ nElementNew ]; + sal_uInt16* pSizeNew = new sal_uInt16[ nElementNew ]; - for( UINT16 nL = 0 ; nL < nElement ; nL++ ) + for( sal_uInt16 nL = 0 ; nL < nElement ; nL++ ) { pElementNew[ nL ] = pElement[ nL ]; pTypeNew[ nL ] = pType[ nL ]; @@ -284,7 +284,7 @@ void TokenPool::GrowElement( void ) void TokenPool::GrowExt( void ) { - UINT16 nNewSize = nP_Ext * 2; + sal_uInt16 nNewSize = nP_Ext * 2; EXTCONT** ppNew = new EXTCONT*[ nNewSize ]; @@ -299,7 +299,7 @@ void TokenPool::GrowExt( void ) void TokenPool::GrowNlf( void ) { - UINT16 nNewSize = nP_Nlf * 2; + sal_uInt16 nNewSize = nP_Nlf * 2; NLFCONT** ppNew = new NLFCONT*[ nNewSize ]; @@ -314,7 +314,7 @@ void TokenPool::GrowNlf( void ) void TokenPool::GrowMatrix( void ) { - UINT16 nNewSize = nP_Matrix * 2; + sal_uInt16 nNewSize = nP_Matrix * 2; ScMatrix** ppNew = new ScMatrix*[ nNewSize ]; @@ -326,7 +326,7 @@ void TokenPool::GrowMatrix( void ) nP_Matrix = nNewSize; } -void TokenPool::GetElement( const UINT16 nId ) +void TokenPool::GetElement( const sal_uInt16 nId ) { DBG_ASSERT( nId < nElementAkt, "*TokenPool::GetElement(): Id zu gross!?" ); @@ -353,7 +353,7 @@ void TokenPool::GetElement( const UINT16 nId ) #endif break; case T_RefC: - pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (UINT16) nId ] ] ); + pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (sal_uInt16) nId ] ] ); break; case T_RefA: { @@ -368,7 +368,7 @@ void TokenPool::GetElement( const UINT16 nId ) break; case T_Ext: { - UINT16 n = pElement[ nId ]; + sal_uInt16 n = pElement[ nId ]; EXTCONT* p = ( n < nP_Ext )? ppP_Ext[ n ] : NULL; if( p ) @@ -382,7 +382,7 @@ void TokenPool::GetElement( const UINT16 nId ) break; case T_Nlf: { - UINT16 n = pElement[ nId ]; + sal_uInt16 n = pElement[ nId ]; NLFCONT* p = ( n < nP_Nlf )? ppP_Nlf[ n ] : NULL; if( p ) @@ -391,7 +391,7 @@ void TokenPool::GetElement( const UINT16 nId ) break; case T_Matrix: { - UINT16 n = pElement[ nId ]; + sal_uInt16 n = pElement[ nId ]; ScMatrix* p = ( n < nP_Matrix )? ppP_Matrix[ n ] : NULL; if( p ) @@ -400,7 +400,7 @@ void TokenPool::GetElement( const UINT16 nId ) break; case T_ExtName: { - UINT16 n = pElement[nId]; + sal_uInt16 n = pElement[nId]; if (n < maExtNames.size()) { const ExtName& r = maExtNames[n]; @@ -409,7 +409,7 @@ void TokenPool::GetElement( const UINT16 nId ) } case T_ExtRefC: { - UINT16 n = pElement[nId]; + sal_uInt16 n = pElement[nId]; if (n < maExtCellRefs.size()) { const ExtCellRef& r = maExtCellRefs[n]; @@ -418,7 +418,7 @@ void TokenPool::GetElement( const UINT16 nId ) } case T_ExtRefA: { - UINT16 n = pElement[nId]; + sal_uInt16 n = pElement[nId]; if (n < maExtAreaRefs.size()) { const ExtAreaRef& r = maExtAreaRefs[n]; @@ -433,7 +433,7 @@ void TokenPool::GetElement( const UINT16 nId ) } -void TokenPool::GetElementRek( const UINT16 nId ) +void TokenPool::GetElementRek( const sal_uInt16 nId ) { #ifdef DBG_UTIL nRek++; @@ -445,8 +445,8 @@ void TokenPool::GetElementRek( const UINT16 nId ) DBG_ASSERT( pType[ nId ] == T_Id, "-TokenPool::GetElementRek(): nId nicht Id-Folge!" ); - UINT16 nAnz = pSize[ nId ]; - UINT16* pAkt = &pP_Id[ pElement[ nId ] ]; + sal_uInt16 nAnz = pSize[ nId ]; + sal_uInt16* pAkt = &pP_Id[ pElement[ nId ] ]; for( ; nAnz > 0 ; nAnz--, pAkt++ ) { if( *pAkt < nScTokenOff ) @@ -483,7 +483,7 @@ void TokenPool::GetElementRek( const UINT16 nId ) break; case T_Ext: { - UINT16 n = pElement[ *pAkt ]; + sal_uInt16 n = pElement[ *pAkt ]; EXTCONT* p = ( n < nP_Ext )? ppP_Ext[ n ] : NULL; if( p ) @@ -492,7 +492,7 @@ void TokenPool::GetElementRek( const UINT16 nId ) break; case T_Nlf: { - UINT16 n = pElement[ *pAkt ]; + sal_uInt16 n = pElement[ *pAkt ]; NLFCONT* p = ( n < nP_Nlf )? ppP_Nlf[ n ] : NULL; if( p ) @@ -501,7 +501,7 @@ void TokenPool::GetElementRek( const UINT16 nId ) break; case T_Matrix: { - UINT16 n = pElement[ *pAkt ]; + sal_uInt16 n = pElement[ *pAkt ]; ScMatrix* p = ( n < nP_Matrix )? ppP_Matrix[ n ] : NULL; if( p ) @@ -510,7 +510,7 @@ void TokenPool::GetElementRek( const UINT16 nId ) break; case T_ExtName: { - UINT16 n = pElement[*pAkt]; + sal_uInt16 n = pElement[*pAkt]; if (n < maExtNames.size()) { const ExtName& r = maExtNames[n]; @@ -519,7 +519,7 @@ void TokenPool::GetElementRek( const UINT16 nId ) } case T_ExtRefC: { - UINT16 n = pElement[*pAkt]; + sal_uInt16 n = pElement[*pAkt]; if (n < maExtCellRefs.size()) { const ExtCellRef& r = maExtCellRefs[n]; @@ -528,7 +528,7 @@ void TokenPool::GetElementRek( const UINT16 nId ) } case T_ExtRefA: { - UINT16 n = pElement[*pAkt]; + sal_uInt16 n = pElement[*pAkt]; if (n < maExtAreaRefs.size()) { const ExtAreaRef& r = maExtAreaRefs[n]; @@ -590,7 +590,7 @@ const TokenId TokenPool::Store( const double& rDouble ) } -const TokenId TokenPool::Store( const UINT16 nIndex ) +const TokenId TokenPool::Store( const sal_uInt16 nIndex ) { if( nElementAkt >= nElement ) GrowElement(); @@ -626,7 +626,7 @@ const TokenId TokenPool::Store( const String& rString ) DBG_ASSERT( sizeof( xub_StrLen ) <= 2, "*TokenPool::Store(): StrLen doesn't match!" ); - pSize[ nElementAkt ] = ( UINT16 ) ppP_Str[ nP_StrAkt ]->Len(); + pSize[ nElementAkt ] = ( sal_uInt16 ) ppP_Str[ nP_StrAkt ]->Len(); nElementAkt++; nP_StrAkt++; @@ -765,7 +765,7 @@ const TokenId TokenPool::StoreExtName( sal_uInt16 nFileId, const String& rName ) if ( nElementAkt >= nElement ) GrowElement(); - pElement[nElementAkt] = static_cast<UINT16>(maExtNames.size()); + pElement[nElementAkt] = static_cast<sal_uInt16>(maExtNames.size()); pType[nElementAkt] = T_ExtName; maExtNames.push_back(ExtName()); @@ -783,7 +783,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const String& rTabName if ( nElementAkt >= nElement ) GrowElement(); - pElement[nElementAkt] = static_cast<UINT16>(maExtCellRefs.size()); + pElement[nElementAkt] = static_cast<sal_uInt16>(maExtCellRefs.size()); pType[nElementAkt] = T_ExtRefC; maExtCellRefs.push_back(ExtCellRef()); @@ -802,7 +802,7 @@ const TokenId TokenPool::StoreExtRef( sal_uInt16 nFileId, const String& rTabName if ( nElementAkt >= nElement ) GrowElement(); - pElement[nElementAkt] = static_cast<UINT16>(maExtAreaRefs.size()); + pElement[nElementAkt] = static_cast<sal_uInt16>(maExtAreaRefs.size()); pType[nElementAkt] = T_ExtRefA; maExtAreaRefs.push_back(ExtAreaRef()); @@ -825,9 +825,9 @@ void TokenPool::Reset( void ) } -BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const +sal_Bool TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const { - UINT16 nId = (UINT16) rId; + sal_uInt16 nId = (sal_uInt16) rId; if( nId && nId <= nElementAkt ) {// existent? nId--; @@ -835,7 +835,7 @@ BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const {// Tokenfolge? if( pSize[ nId ] == 1 ) {// GENAU 1 Token - UINT16 nSecId = pP_Id[ pElement[ nId ] ]; + sal_uInt16 nSecId = pP_Id[ pElement[ nId ] ]; if( nSecId >= nScTokenOff ) {// Default-Token? return ( DefTokenId ) ( nSecId - nScTokenOff ) == eId; // Gesuchter? @@ -844,14 +844,14 @@ BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const } } - return FALSE; + return sal_False; } const String* TokenPool::GetExternal( const TokenId& rId ) const { const String* p = NULL; - UINT16 n = (UINT16) rId; + sal_uInt16 n = (sal_uInt16) rId; if( n && n <= nElementAkt ) { n--; @@ -866,7 +866,7 @@ const String* TokenPool::GetExternal( const TokenId& rId ) const //UNUSED2008-05 const String* TokenPool::GetString( const TokenId& r ) const //UNUSED2008-05 { //UNUSED2008-05 const String* p = NULL; -//UNUSED2008-05 UINT16 n = (UINT16) r; +//UNUSED2008-05 sal_uInt16 n = (sal_uInt16) r; //UNUSED2008-05 if( n && n <= nElementAkt ) //UNUSED2008-05 { //UNUSED2008-05 n--; diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index 480394bc3..ea312dd89 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -362,14 +362,14 @@ void XclExpMergedcells::Save( XclExpStream& rStrm ) void XclExpMergedcells::SaveXml( XclExpXmlStream& rStrm ) { - ULONG nCount = maMergedRanges.Count(); + sal_uLong nCount = maMergedRanges.Count(); if( !nCount ) return; sax_fastparser::FSHelperPtr& rWorksheet = rStrm.GetCurrentStream(); rWorksheet->startElement( XML_mergeCells, XML_count, OString::valueOf( (sal_Int32) nCount ).getStr(), FSEND ); - for( ULONG i = 0; i < nCount; ++i ) + for( sal_uLong i = 0; i < nCount; ++i ) { if( const ScRange* pRange = maMergedRanges.GetObject( i ) ) { @@ -821,7 +821,7 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat GetAddressConverter().ConvertRangeList( maXclRanges, aScRanges, true ); if( !maXclRanges.empty() ) { - for( USHORT nIndex = 0, nCount = rCondFormat.Count(); nIndex < nCount; ++nIndex ) + for( sal_uInt16 nIndex = 0, nCount = rCondFormat.Count(); nIndex < nCount; ++nIndex ) if( const ScCondFormatEntry* pEntry = rCondFormat.GetEntry( nIndex ) ) maCFList.AppendNewRecord( new XclExpCF( GetRoot(), *pEntry ) ); aScRanges.Format( msSeqRef, SCA_VALID, NULL, formula::FormulaGrammar::CONV_XL_A1 ); @@ -964,7 +964,7 @@ const char* lcl_GetOperatorType( sal_uInt32 nFlags ) // ---------------------------------------------------------------------------- -XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) : +XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) : XclExpRecord( EXC_ID_DV ), XclExpRoot( rRoot ), mnFlags( 0 ), @@ -974,7 +974,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) : { // prompt box - empty string represented by single NUL character String aTitle, aText; - bool bShowPrompt = (pValData->GetInput( aTitle, aText ) == TRUE); + bool bShowPrompt = (pValData->GetInput( aTitle, aText ) == sal_True); if( aTitle.Len() ) maPromptTitle.Assign( aTitle ); else @@ -986,7 +986,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ) : // error box - empty string represented by single NUL character ScValidErrorStyle eScErrorStyle; - bool bShowError = (pValData->GetErrMsg( aTitle, aText, eScErrorStyle ) == TRUE); + bool bShowError = (pValData->GetErrMsg( aTitle, aText, eScErrorStyle ) == sal_True); if( aTitle.Len() ) maErrorTitle.Assign( aTitle ); else @@ -1189,7 +1189,7 @@ XclExpDval::~XclExpDval() { } -void XclExpDval::InsertCellRange( const ScRange& rRange, ULONG nScHandle ) +void XclExpDval::InsertCellRange( const ScRange& rRange, sal_uLong nScHandle ) { if( GetBiff() == EXC_BIFF8 ) { @@ -1234,7 +1234,7 @@ void XclExpDval::SaveXml( XclExpXmlStream& rStrm ) rWorksheet->endElement( XML_dataValidations ); } -XclExpDV& XclExpDval::SearchOrCreateDv( ULONG nScHandle ) +XclExpDV& XclExpDval::SearchOrCreateDv( sal_uLong nScHandle ) { // test last found record if( mxLastFoundDV.get() && (mxLastFoundDV->GetScHandle() == nScHandle) ) @@ -1247,7 +1247,7 @@ XclExpDV& XclExpDval::SearchOrCreateDv( ULONG nScHandle ) size_t nFirstPos = 0; size_t nLastPos = maDVList.GetSize() - 1; bool bLoop = true; - ULONG nCurrScHandle = ::std::numeric_limits< ULONG >::max(); + sal_uLong nCurrScHandle = ::std::numeric_limits< sal_uLong >::max(); while( (nFirstPos <= nLastPos) && bLoop ) { nCurrPos = (nFirstPos + nLastPos) / 2; diff --git a/sc/source/filter/excel/xeescher.cxx b/sc/source/filter/excel/xeescher.cxx index df4340afc..74420b251 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -390,10 +390,10 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc ScfPropertySet aCtrlProp( XclControlHelper::GetControlModel( xShape ) ); // OBJ record flags - SetLocked( TRUE ); + SetLocked( sal_True ); SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) ); - SetAutoFill( FALSE ); - SetAutoLine( FALSE ); + SetAutoFill( sal_False ); + SetAutoLine( sal_False ); // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); @@ -534,10 +534,10 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rObjMgr, Referenc return; // OBJ record flags - SetLocked( TRUE ); + SetLocked( sal_True ); SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) ); - SetAutoFill( FALSE ); - SetAutoLine( FALSE ); + SetAutoFill( sal_False ); + SetAutoLine( sal_False ); // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 4305bab5e..5ffe667a4 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -522,7 +522,7 @@ XclTokenArrayRef XclExpFmlaCompImpl::CreateFormula( XclFormulaType eType, if( mxData->mbOk ) { XclExpScToken aTokData( GetNextToken() ); - USHORT nScError = rScTokArr.GetCodeError(); + sal_uInt16 nScError = rScTokArr.GetCodeError(); if( (nScError != 0) && (!aTokData.Is() || (aTokData.GetOpCode() == ocStop)) ) { // #i50253# convert simple ocStop token to error code formula (e.g. =#VALUE!) @@ -1334,7 +1334,7 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData ) AppendExt( static_cast< sal_uInt8 >( pMatVal->GetBoolean() ? 1 : 0 ) ); AppendExt( 0, 7 ); } - else if( USHORT nErr = pMatVal->GetError() ) + else if( sal_uInt16 nErr = pMatVal->GetError() ) { AppendExt( EXC_CACHEDVAL_ERROR ); AppendExt( XclTools::GetXclErrorCode( nErr ) ); @@ -1827,7 +1827,7 @@ void XclExpFmlaCompImpl::ConvertRefData( if( bTruncMaxCol && (rnScCol == mnMaxScCol) ) rnScCol = mnMaxAbsCol; else if( (rnScCol < 0) || (rnScCol > mnMaxAbsCol) ) - rRefData.SetColDeleted( TRUE ); + rRefData.SetColDeleted( sal_True ); rXclPos.mnCol = static_cast< sal_uInt16 >( rnScCol ) & mnMaxColMask; // convert row index @@ -1835,7 +1835,7 @@ void XclExpFmlaCompImpl::ConvertRefData( if( bTruncMaxRow && (rnScRow == mnMaxScRow) ) rnScRow = mnMaxAbsRow; else if( (rnScRow < 0) || (rnScRow > mnMaxAbsRow) ) - rRefData.SetRowDeleted( TRUE ); + rRefData.SetRowDeleted( sal_True ); rXclPos.mnRow = static_cast< sal_uInt16 >( rnScRow ) & mnMaxRowMask; } else @@ -2003,7 +2003,7 @@ void XclExpFmlaCompImpl::ProcessExternalCellRef( const XclExpScToken& rTokData ) ConvertRefData( aRefData, aXclPos, false, false, false ); // store external cell contents in CRN records - USHORT nFileId = rTokData.mpScToken->GetIndex(); + sal_uInt16 nFileId = rTokData.mpScToken->GetIndex(); const String& rTabName = rTokData.mpScToken->GetString(); if( mxData->mrCfg.mbFromCell && mxData->mpScBasePos ) mxData->mpLinkMgr->StoreCell( nFileId, rTabName, aRefData ); @@ -2039,7 +2039,7 @@ void XclExpFmlaCompImpl::ProcessExternalRangeRef( const XclExpScToken& rTokData ConvertRefData( aRefData, aXclRange, false ); // store external cell contents in CRN records - USHORT nFileId = rTokData.mpScToken->GetIndex(); + sal_uInt16 nFileId = rTokData.mpScToken->GetIndex(); const String& rTabName = rTokData.mpScToken->GetString(); if( mxData->mrCfg.mbFromCell && mxData->mpScBasePos ) mxData->mpLinkMgr->StoreCellRange( nFileId, rTabName, aRefData ); @@ -2098,7 +2098,7 @@ void XclExpFmlaCompImpl::ProcessExternalName( const XclExpScToken& rTokData ) if( mxData->mpLinkMgr ) { ScExternalRefManager& rExtRefMgr = *GetDoc().GetExternalRefManager(); - USHORT nFileId = rTokData.mpScToken->GetIndex(); + sal_uInt16 nFileId = rTokData.mpScToken->GetIndex(); const String& rName = rTokData.mpScToken->GetString(); ScExternalRefCache::TokenArrayRef xArray = rExtRefMgr.getRangeNameTokens( nFileId, rName ); if( xArray.get() ) @@ -2543,11 +2543,11 @@ void lclInitOwnTab( ScSingleRefData& rRef, const ScAddress& rScPos, SCTAB nCurrS if( b3DRefOnly ) { // no reduction to 2D reference, if global link manager is used - rRef.SetFlag3D( TRUE ); + rRef.SetFlag3D( sal_True ); } else if( rScPos.Tab() == nCurrScTab ) { - rRef.SetTabRel( TRUE ); + rRef.SetTabRel( sal_True ); rRef.nRelTab = 0; } } @@ -2613,14 +2613,14 @@ XclTokenArrayRef XclExpFormulaCompiler::CreateFormula( XclFormulaType eType, con XclTokenArrayRef XclExpFormulaCompiler::CreateFormula( XclFormulaType eType, const ScRangeList& rScRanges ) { - ULONG nCount = rScRanges.Count(); + sal_uLong nCount = rScRanges.Count(); if( nCount == 0 ) return XclTokenArrayRef(); ScTokenArray aScTokArr; SCTAB nCurrScTab = GetCurrScTab(); bool b3DRefOnly = mxImpl->Is3DRefOnly( eType ); - for( ULONG nIdx = 0; nIdx < nCount; ++nIdx ) + for( sal_uLong nIdx = 0; nIdx < nCount; ++nIdx ) { if( nIdx > 0 ) aScTokArr.AddOpCode( ocUnion ); diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index a8ef7eb6e..846487127 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -266,7 +266,7 @@ bool XclExpAddressConverter::ConvertRange( XclRange& rXclRange, //UNUSED2008-05 bool XclExpAddressConverter::CheckRangeList( const ScRangeList& rScRanges, bool bWarn ) //UNUSED2008-05 { -//UNUSED2008-05 for( ULONG nIdx = 0, nSize = rScRanges.Count(); nIdx < nSize; ++nIdx ) +//UNUSED2008-05 for( sal_uLong nIdx = 0, nSize = rScRanges.Count(); nIdx < nSize; ++nIdx ) //UNUSED2008-05 if( const ScRange* pScRange = rScRanges.GetObject( nIdx ) ) //UNUSED2008-05 if( !CheckRange( *pScRange, bWarn ) ) //UNUSED2008-05 return false; @@ -275,7 +275,7 @@ bool XclExpAddressConverter::ConvertRange( XclRange& rXclRange, void XclExpAddressConverter::ValidateRangeList( ScRangeList& rScRanges, bool bWarn ) { - ULONG nIdx = rScRanges.Count(); + sal_uLong nIdx = rScRanges.Count(); while( nIdx ) { --nIdx; // backwards to keep nIdx valid @@ -289,7 +289,7 @@ void XclExpAddressConverter::ConvertRangeList( XclRangeList& rXclRanges, const ScRangeList& rScRanges, bool bWarn ) { rXclRanges.clear(); - for( ULONG nPos = 0, nCount = rScRanges.Count(); nPos < nCount; ++nPos ) + for( sal_uLong nPos = 0, nCount = rScRanges.Count(); nPos < nCount; ++nPos ) { if( const ScRange* pScRange = rScRanges.GetObject( nPos ) ) { @@ -496,7 +496,7 @@ XclExpStringRef lclCreateFormattedString( { // test if the character is a text field const SfxPoolItem* pItem; - if( aEditSet.GetItemState( EE_FEATURE_FIELD, FALSE, &pItem ) == SFX_ITEM_SET ) + if( aEditSet.GetItemState( EE_FEATURE_FIELD, sal_False, &pItem ) == SFX_ITEM_SET ) { const SvxFieldData* pField = static_cast< const SvxFieldItem* >( pItem )->GetField(); if( const SvxURLField* pUrlField = PTR_CAST( SvxURLField, pField ) ) @@ -609,8 +609,8 @@ XclExpStringRef XclExpStringHelper::CreateCellString( { // formatted cell ScEditEngineDefaulter& rEE = rRoot.GetEditEngine(); - BOOL bOldUpdateMode = rEE.GetUpdateMode(); - rEE.SetUpdateMode( TRUE ); + sal_Bool bOldUpdateMode = rEE.GetUpdateMode(); + rEE.SetUpdateMode( sal_True ); // default items const SfxItemSet& rItemSet = pCellAttr ? pCellAttr->GetItemSet() : rRoot.GetDoc().GetDefPattern()->GetItemSet(); SfxItemSet* pEEItemSet = new SfxItemSet( rEE.GetEmptyItemSet() ); @@ -639,8 +639,8 @@ XclExpStringRef XclExpStringHelper::CreateString( if( const OutlinerParaObject* pParaObj = rTextObj.GetOutlinerParaObject() ) { EditEngine& rEE = rRoot.GetDrawEditEngine(); - BOOL bOldUpdateMode = rEE.GetUpdateMode(); - rEE.SetUpdateMode( TRUE ); + sal_Bool bOldUpdateMode = rEE.GetUpdateMode(); + rEE.SetUpdateMode( sal_True ); // create the string rEE.SetText( pParaObj->GetTextObject() ); xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen ); @@ -667,8 +667,8 @@ XclExpStringRef XclExpStringHelper::CreateString( { XclExpStringRef xString; EditEngine& rEE = rRoot.GetDrawEditEngine(); - BOOL bOldUpdateMode = rEE.GetUpdateMode(); - rEE.SetUpdateMode( TRUE ); + sal_Bool bOldUpdateMode = rEE.GetUpdateMode(); + rEE.SetUpdateMode( sal_True ); rEE.SetText( rEditObj ); xString = lclCreateFormattedString( rRoot, rEE, 0, nFlags, nMaxLen ); rEE.SetUpdateMode( bOldUpdateMode ); @@ -727,8 +727,8 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico SfxItemSet aItemSet( *GetDoc().GetPool(), ATTR_PATTERN_START, ATTR_PATTERN_END ); // edit engine - BOOL bOldUpdateMode = mrEE.GetUpdateMode(); - mrEE.SetUpdateMode( TRUE ); + sal_Bool bOldUpdateMode = mrEE.GetUpdateMode(); + mrEE.SetUpdateMode( sal_True ); mrEE.SetText( *pTextObj ); // font information @@ -948,7 +948,7 @@ bool lclConvertToDos( String& rUrl, const String& rBasePath, bool bSaveRelUrl ) bool bLoop = true; while( bLoop && ((nPos = aDosBase.Search( '\\', nStartSearch )) != STRING_NOTFOUND) ) { - bLoop = (TRUE == aDosBase.Equals( aDosUrl, 0, nPos + 1 )); + bLoop = (sal_True == aDosBase.Equals( aDosUrl, 0, nPos + 1 )); if( bLoop ) { aDosBase.Erase( 0, nPos + 1 ); @@ -1124,7 +1124,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const rStrm << EXC_CACHEDVAL_BOOL << nBool; rStrm.WriteZeroBytes( 7 ); } - else if( USHORT nScError = pMatVal->GetError() ) + else if( sal_uInt16 nScError = pMatVal->GetError() ) { sal_Int8 nError ( XclTools::GetXclErrorCode( nScError ) ); rStrm.SetSliceSize( 9 ); diff --git a/sc/source/filter/excel/xelink.cxx b/sc/source/filter/excel/xelink.cxx index 645abc25b..d33cf33d7 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -1068,7 +1068,7 @@ sal_uInt16 XclExpExtNameBuffer::InsertDde( sal_uInt16 nIndex = GetIndex( rItem ); if( nIndex == 0 ) { - USHORT nPos; + sal_uInt16 nPos; if( GetDoc().FindDdeLink( rApplic, rTopic, rItem, SC_DDE_IGNOREMODE, nPos ) ) { // create the leading 'StdDocumentName' EXTERNNAME record @@ -1162,7 +1162,7 @@ void XclExpCrn::WriteDouble( XclExpStream& rStrm, double fValue ) { if( ::rtl::math::isNan( fValue ) ) { - USHORT nScError = static_cast< USHORT >( reinterpret_cast< const sal_math_Double* >( &fValue )->nan_parts.fraction_lo ); + sal_uInt16 nScError = static_cast< sal_uInt16 >( reinterpret_cast< const sal_math_Double* >( &fValue )->nan_parts.fraction_lo ); WriteError( rStrm, XclTools::GetXclErrorCode( nScError ) ); } else @@ -1283,7 +1283,7 @@ void XclExpXct::Save( XclExpStream& rStrm ) ::std::pair< SCCOL, SCCOL > aColRange = mxCacheTable->getColRange( nScRow ); for( SCCOL nScCol = aColRange.first; bValid && (nScCol < aColRange.second); ++nScCol ) { - if( maUsedCells.IsCellMarked( nScCol, nScRow, TRUE ) ) + if( maUsedCells.IsCellMarked( nScCol, nScRow, sal_True ) ) { sal_uInt32 nScNumFmt = 0; ScExternalRefCache::TokenRef xToken = mxCacheTable->getCell( nScCol, nScRow, &nScNumFmt ); diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx index bcf208f00..aa20e3ebf 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -136,9 +136,9 @@ public: void Initialize(); /** Inserts the Calc name with the passed index and returns the Excel NAME index. */ - sal_uInt16 InsertName( USHORT nScNameIdx ); + sal_uInt16 InsertName( sal_uInt16 nScNameIdx ); /** Inserts the Calc database range with the passed index and returns the Excel NAME index. */ - sal_uInt16 InsertDBRange( USHORT nScDBRangeIdx ); + sal_uInt16 InsertDBRange( sal_uInt16 nScDBRangeIdx ); /** Inserts a new built-in defined name. */ sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, XclTokenArrayRef xTokArr, SCTAB nScTab ); @@ -165,11 +165,11 @@ public: private: typedef XclExpRecordList< XclExpName > XclExpNameList; typedef XclExpNameList::RecordRefType XclExpNameRef; - typedef ::std::map< USHORT, sal_uInt16 > XclExpIndexMap; + typedef ::std::map< sal_uInt16, sal_uInt16 > XclExpIndexMap; private: /** Finds the index of a NAME record from the passed Calc index in the specified map. */ - sal_uInt16 FindNameIdx( const XclExpIndexMap& rMap, USHORT nScIdx ) const; + sal_uInt16 FindNameIdx( const XclExpIndexMap& rMap, sal_uInt16 nScIdx ) const; /** Returns the index of an existing built-in NAME record with the passed definition, otherwise 0. */ sal_uInt16 FindBuiltInNameIdx( const String& rName, const XclTokenArray& rTokArr, bool bDBRange ) const; @@ -378,7 +378,7 @@ void XclExpNameManagerImpl::Initialize() CreateDatabaseNames(); } -sal_uInt16 XclExpNameManagerImpl::InsertName( USHORT nScNameIdx ) +sal_uInt16 XclExpNameManagerImpl::InsertName( sal_uInt16 nScNameIdx ) { sal_uInt16 nNameIdx = FindNameIdx( maNameMap, nScNameIdx ); if( nNameIdx == 0 ) @@ -387,7 +387,7 @@ sal_uInt16 XclExpNameManagerImpl::InsertName( USHORT nScNameIdx ) return nNameIdx; } -sal_uInt16 XclExpNameManagerImpl::InsertDBRange( USHORT nScDBRangeIdx ) +sal_uInt16 XclExpNameManagerImpl::InsertDBRange( sal_uInt16 nScDBRangeIdx ) { sal_uInt16 nNameIdx = FindNameIdx( maDBRangeMap, nScDBRangeIdx ); if( nNameIdx == 0 ) @@ -482,7 +482,7 @@ void XclExpNameManagerImpl::SaveXml( XclExpXmlStream& rStrm ) // private -------------------------------------------------------------------- -sal_uInt16 XclExpNameManagerImpl::FindNameIdx( const XclExpIndexMap& rMap, USHORT nScIdx ) const +sal_uInt16 XclExpNameManagerImpl::FindNameIdx( const XclExpIndexMap& rMap, sal_uInt16 nScIdx ) const { XclExpIndexMap::const_iterator aIt = rMap.find( nScIdx ); return (aIt == rMap.end()) ? 0 : aIt->second; @@ -628,7 +628,7 @@ void XclExpNameManagerImpl::CreateBuiltInNames() if( rDoc.HasPrintRange() ) { ScRangeList aRangeList; - for( USHORT nIdx = 0, nCount = rDoc.GetPrintRangeCount( nScTab ); nIdx < nCount; ++nIdx ) + for( sal_uInt16 nIdx = 0, nCount = rDoc.GetPrintRangeCount( nScTab ); nIdx < nCount; ++nIdx ) { ScRange aRange( *rDoc.GetPrintRange( nScTab, nIdx ) ); // Calc document does not care about sheet index in print ranges @@ -672,7 +672,7 @@ void XclExpNameManagerImpl::CreateBuiltInNames() void XclExpNameManagerImpl::CreateUserNames() { const ScRangeName& rNamedRanges = GetNamedRanges(); - for( USHORT nNameIdx = 0, nNameCount = rNamedRanges.GetCount(); nNameIdx < nNameCount; ++nNameIdx ) + for( sal_uInt16 nNameIdx = 0, nNameCount = rNamedRanges.GetCount(); nNameIdx < nNameCount; ++nNameIdx ) { const ScRangeData* pRangeData = rNamedRanges[ nNameIdx ]; DBG_ASSERT( rNamedRanges[ nNameIdx ], "XclExpNameManagerImpl::CreateUserNames - missing defined name" ); @@ -685,7 +685,7 @@ void XclExpNameManagerImpl::CreateUserNames() void XclExpNameManagerImpl::CreateDatabaseNames() { const ScDBCollection& rDBRanges = GetDatabaseRanges(); - for( USHORT nDBIdx = 0, nDBCount = rDBRanges.GetCount(); nDBIdx < nDBCount; ++nDBIdx ) + for( sal_uInt16 nDBIdx = 0, nDBCount = rDBRanges.GetCount(); nDBIdx < nDBCount; ++nDBIdx ) { const ScDBData* pDBData = rDBRanges[ nDBIdx ]; DBG_ASSERT( pDBData, "XclExpNameManagerImpl::CreateDatabaseNames - missing database range" ); @@ -712,12 +712,12 @@ void XclExpNameManager::Initialize() mxImpl->Initialize(); } -sal_uInt16 XclExpNameManager::InsertName( USHORT nScNameIdx ) +sal_uInt16 XclExpNameManager::InsertName( sal_uInt16 nScNameIdx ) { return mxImpl->InsertName( nScNameIdx ); } -sal_uInt16 XclExpNameManager::InsertDBRange( USHORT nScDBRangeIdx ) +sal_uInt16 XclExpNameManager::InsertDBRange( sal_uInt16 nScDBRangeIdx ) { return mxImpl->InsertDBRange( nScDBRangeIdx ); } diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 83ab0f883..92800e787 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -922,7 +922,7 @@ String lclGetDataFieldCaption( const String& rFieldName, GeneralFunction eFunc ) { String aCaption; - USHORT nResIdx = 0; + sal_uInt16 nResIdx = 0; using namespace ::com::sun::star::sheet; switch( eFunc ) { @@ -1281,7 +1281,7 @@ XclExpPivotTable::XclExpPivotTable( const XclExpRoot& rRoot, const ScDPObject& r maFieldList.AppendNewRecord( new XclExpPTField( *this, nFieldIdx ) ); const List& rDimList = pSaveData->GetDimensions(); - ULONG nDimIdx, nDimCount = rDimList.Count(); + sal_uLong nDimIdx, nDimCount = rDimList.Count(); /* 2) First process all data dimensions, they are needed for extended settings of row/column/page fields (sorting/auto show). */ @@ -1714,7 +1714,7 @@ XclExpPivotTableManager::XclExpPivotTableManager( const XclExpRoot& rRoot ) : void XclExpPivotTableManager::CreatePivotTables() { if( ScDPCollection* pDPColl = GetDoc().GetDPCollection() ) - for( USHORT nDPObj = 0, nCount = pDPColl->GetCount(); nDPObj < nCount; ++nDPObj ) + for( sal_uInt16 nDPObj = 0, nCount = pDPColl->GetCount(); nDPObj < nCount; ++nDPObj ) if( ScDPObject* pDPObj = (*pDPColl)[ nDPObj ] ) if( const XclExpPivotCache* pPCache = CreatePivotCache( *pDPObj ) ) maPTableList.AppendNewRecord( new XclExpPivotTable( GetRoot(), *pDPObj, *pPCache ) ); diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 5e37dbd88..424e02458 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -821,7 +821,7 @@ void XclExpPalette::WriteBody( XclExpStream& rStrm ) namespace { -typedef ::std::pair< USHORT, sal_Int16 > WhichAndScript; +typedef ::std::pair< sal_uInt16, sal_Int16 > WhichAndScript; sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet, const WhichAndScript& rWAS1, const WhichAndScript& rWAS2, const WhichAndScript& rWAS3 ) @@ -885,7 +885,7 @@ sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet, nScript = GetFirstUsedScript( rRoot, rItemSet ); // convert to core script type constants - BYTE nScScript = SCRIPTTYPE_LATIN; + sal_uInt8 nScScript = SCRIPTTYPE_LATIN; switch( nScript ) { case ApiScriptType::LATIN: nScScript = SCRIPTTYPE_LATIN; break; @@ -902,14 +902,14 @@ sal_Int16 lclCheckFontItems( const SfxItemSet& rItemSet, /*static*/ bool XclExpFontHelper::CheckItems( const XclExpRoot& rRoot, const SfxItemSet& rItemSet, sal_Int16 nScript, bool bDeep ) { - static const USHORT pnCommonIds[] = { + static const sal_uInt16 pnCommonIds[] = { ATTR_FONT_UNDERLINE, ATTR_FONT_CROSSEDOUT, ATTR_FONT_CONTOUR, ATTR_FONT_SHADOWED, ATTR_FONT_COLOR, ATTR_FONT_LANGUAGE, 0 }; - static const USHORT pnLatinIds[] = { + static const sal_uInt16 pnLatinIds[] = { ATTR_FONT, ATTR_FONT_HEIGHT, ATTR_FONT_WEIGHT, ATTR_FONT_POSTURE, 0 }; - static const USHORT pnAsianIds[] = { + static const sal_uInt16 pnAsianIds[] = { ATTR_CJK_FONT, ATTR_CJK_FONT_HEIGHT, ATTR_CJK_FONT_WEIGHT, ATTR_CJK_FONT_POSTURE, 0 }; - static const USHORT pnComplexIds[] = { + static const sal_uInt16 pnComplexIds[] = { ATTR_CTL_FONT, ATTR_CTL_FONT_HEIGHT, ATTR_CTL_FONT_WEIGHT, ATTR_CTL_FONT_POSTURE, 0 }; bool bUsed = ScfTools::CheckItems( rItemSet, pnCommonIds, bDeep ); @@ -1197,8 +1197,8 @@ size_t XclExpFontBuffer::Find( const XclFontData& rFontData ) /** Predicate for search algorithm. */ struct XclExpNumFmtPred { - ULONG mnScNumFmt; - inline explicit XclExpNumFmtPred( ULONG nScNumFmt ) : mnScNumFmt( nScNumFmt ) {} + sal_uLong mnScNumFmt; + inline explicit XclExpNumFmtPred( sal_uLong nScNumFmt ) : mnScNumFmt( nScNumFmt ) {} inline bool operator()( const XclExpNumFmt& rFormat ) const { return rFormat.mnScNumFmt == mnScNumFmt; } }; @@ -1236,7 +1236,7 @@ XclExpNumFmtBuffer::~XclExpNumFmtBuffer() delete[] mpKeywordTable; } -sal_uInt16 XclExpNumFmtBuffer::Insert( ULONG nScNumFmt ) +sal_uInt16 XclExpNumFmtBuffer::Insert( sal_uLong nScNumFmt ) { XclExpNumFmtVec::const_iterator aIt = ::std::find_if( maFormatMap.begin(), maFormatMap.end(), XclExpNumFmtPred( nScNumFmt ) ); @@ -1393,7 +1393,7 @@ bool XclExpCellAlign::FillFromItemSet( bUsed |= ScfTools::CheckItem( rItemSet, ATTR_INDENT, bStyle ); // shrink to fit - mbShrink = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_SHRINKTOFIT, BOOL ); + mbShrink = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_SHRINKTOFIT, sal_Bool ); bUsed |= ScfTools::CheckItem( rItemSet, ATTR_SHRINKTOFIT, bStyle ); // CTL text direction @@ -1409,7 +1409,7 @@ bool XclExpCellAlign::FillFromItemSet( bUsed |= ScfTools::CheckItem( rItemSet, ATTR_VER_JUSTIFY, bStyle ); // stacked/rotation - bool bStacked = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_STACKED, BOOL ); + bool bStacked = GETITEMVALUE( rItemSet, SfxBoolItem, ATTR_STACKED, sal_Bool ); bUsed |= ScfTools::CheckItem( rItemSet, ATTR_STACKED, bStyle ); if( bStacked ) { @@ -1900,7 +1900,7 @@ void XclExpXFId::ConvertXFIndex( const XclExpRoot& rRoot ) XclExpXF::XclExpXF( const XclExpRoot& rRoot, const ScPatternAttr& rPattern, sal_Int16 nScript, - ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) : + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) : XclXFBase( true ), XclExpRoot( rRoot ) { @@ -1928,7 +1928,7 @@ XclExpXF::XclExpXF( const XclExpRoot& rRoot, bool bCellXF ) : } bool XclExpXF::Equals( const ScPatternAttr& rPattern, - ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const { return IsCellXF() && (mpItemSet == &rPattern.GetItemSet()) && (!bForceLineBreak || maAlignment.mbLineBreak) && @@ -1965,7 +1965,7 @@ void XclExpXF::InitDefault() } void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript, - ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle ) + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle ) { InitDefault(); mpItemSet = &rItemSet; @@ -1987,7 +1987,7 @@ void XclExpXF::Init( const SfxItemSet& rItemSet, sal_Int16 nScript, // number format mnScNumFmt = (nForceScNumFmt == NUMBERFORMAT_ENTRY_NOT_FOUND) ? - GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALUE_FORMAT, ULONG ) : nForceScNumFmt; + GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) : nForceScNumFmt; mnXclNumFmt = GetNumFmtBuffer().Insert( mnScNumFmt ); mbFmtUsed = ScfTools::CheckItem( rItemSet, ATTR_VALUE_FORMAT, IsStyleXF() ); @@ -2349,7 +2349,7 @@ sal_uInt32 XclExpXFBuffer::InsertWithFont( const ScPatternAttr* pPattern, sal_In return InsertCellXF( pPattern, nScript, NUMBERFORMAT_ENTRY_NOT_FOUND, nForceXclFont, bForceLineBreak ); } -sal_uInt32 XclExpXFBuffer::InsertWithNumFmt( const ScPatternAttr* pPattern, sal_Int16 nScript, ULONG nForceScNumFmt, bool bForceLineBreak ) +sal_uInt32 XclExpXFBuffer::InsertWithNumFmt( const ScPatternAttr* pPattern, sal_Int16 nScript, sal_uLong nForceScNumFmt, bool bForceLineBreak ) { return InsertCellXF( pPattern, nScript, nForceScNumFmt, EXC_FONT_NOTFOUND, bForceLineBreak ); } @@ -2608,7 +2608,7 @@ void XclExpXFBuffer::SaveXFXml( XclExpXmlStream& rStrm, XclExpXF& rXF ) } sal_uInt32 XclExpXFBuffer::FindXF( const ScPatternAttr& rPattern, - ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const { for( size_t nPos = 0, nSize = maXFList.GetSize(); nPos < nSize; ++nPos ) if( maXFList.GetRecord( nPos )->Equals( rPattern, nForceScNumFmt, nForceXclFont, bForceLineBreak ) ) @@ -2633,7 +2633,7 @@ sal_uInt32 XclExpXFBuffer::FindBuiltInXF( sal_uInt8 nStyleId, sal_uInt8 nLevel ) } sal_uInt32 XclExpXFBuffer::InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript, - ULONG nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) { const ScPatternAttr* pDefPattern = GetDoc().GetDefPattern(); if( !pPattern ) diff --git a/sc/source/filter/excel/xetable.cxx b/sc/source/filter/excel/xetable.cxx index 41c2f7690..c02d68ea2 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -813,12 +813,12 @@ XclExpFormulaCell::XclExpFormulaCell( XclExpNumFmtBuffer& rNumFmtBfr = rRoot.GetNumFmtBuffer(); // current cell number format - ULONG nScNumFmt = pPattern ? - GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, ULONG ) : + sal_uLong nScNumFmt = pPattern ? + GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ) : rNumFmtBfr.GetStandardFormat(); // alternative number format passed to XF buffer - ULONG nAltScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND; + sal_uLong nAltScNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND; /* #73420# Xcl doesn't know Boolean number formats, we write "TRUE";"FALSE" (language dependent). Don't do it for automatic formula formats, because Excel gets them right. */ @@ -917,7 +917,7 @@ void XclExpFormulaCell::Save( XclExpStream& rStrm ) mxStringRec->Save( rStrm ); } -static const char* lcl_GetErrorString( USHORT nScErrCode ) +static const char* lcl_GetErrorString( sal_uInt16 nScErrCode ) { sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode ); switch( nXclErrCode ) @@ -940,7 +940,7 @@ static void lcl_GetFormulaInfo( ScFormulaCell& rCell, const char** pType, OUStri case NUMBERFORMAT_NUMBER: { // either value or error code - USHORT nScErrCode = rCell.GetErrCode(); + sal_uInt16 nScErrCode = rCell.GetErrCode(); if( nScErrCode ) { *pType = "e"; @@ -1036,7 +1036,7 @@ void XclExpFormulaCell::WriteContents( XclExpStream& rStrm ) case NUMBERFORMAT_NUMBER: { // either value or error code - USHORT nScErrCode = mrScFmlaCell.GetErrCode(); + sal_uInt16 nScErrCode = mrScFmlaCell.GetErrCode(); if( nScErrCode ) rStrm << EXC_FORMULA_RES_ERROR << sal_uInt8( 0 ) << XclTools::GetXclErrorCode( nScErrCode ) @@ -1402,7 +1402,7 @@ XclExpOutlineBuffer::XclExpOutlineBuffer( const XclExpRoot& rRoot, bool bRows ) mpScOLArray = bRows ? pOutlineTable->GetRowArray() : pOutlineTable->GetColArray(); if( mpScOLArray ) - for( USHORT nLevel = 0; nLevel < SC_OL_MAXDEPTH; ++nLevel ) + for( sal_uInt16 nLevel = 0; nLevel < SC_OL_MAXDEPTH; ++nLevel ) if( ScOutlineEntry* pEntry = mpScOLArray->GetEntryByPos( nLevel, 0 ) ) maLevelInfos[ nLevel ].mnScEndPos = pEntry->GetEnd(); } @@ -1412,7 +1412,7 @@ void XclExpOutlineBuffer::UpdateColRow( SCCOLROW nScPos ) if( mpScOLArray ) { // find open level index for passed position - USHORT nNewOpenScLevel = 0; // new open level (0-based Calc index) + sal_uInt16 nNewOpenScLevel = 0; // new open level (0-based Calc index) sal_uInt8 nNewLevel = 0; // new open level (1-based Excel index) if( mpScOLArray->FindTouchedLevel( nScPos, nScPos, nNewOpenScLevel ) ) @@ -1423,7 +1423,7 @@ void XclExpOutlineBuffer::UpdateColRow( SCCOLROW nScPos ) if( nNewLevel >= mnCurrLevel ) { // new level(s) opened, or no level closed - update all level infos - for( USHORT nScLevel = 0; nScLevel <= nNewOpenScLevel; ++nScLevel ) + for( sal_uInt16 nScLevel = 0; nScLevel <= nNewOpenScLevel; ++nScLevel ) { /* In each level: check if a new group is started (there may be neighbored groups without gap - therefore check ALL levels). */ @@ -1441,8 +1441,8 @@ void XclExpOutlineBuffer::UpdateColRow( SCCOLROW nScPos ) { // level(s) closed - check if any of the closed levels are collapsed // Calc uses 0-based level indexes - USHORT nOldOpenScLevel = mnCurrLevel - 1; - for( USHORT nScLevel = nNewOpenScLevel + 1; !mbCurrCollapse && (nScLevel <= nOldOpenScLevel); ++nScLevel ) + sal_uInt16 nOldOpenScLevel = mnCurrLevel - 1; + for( sal_uInt16 nScLevel = nNewOpenScLevel + 1; !mbCurrCollapse && (nScLevel <= nOldOpenScLevel); ++nScLevel ) mbCurrCollapse = maLevelInfos[ nScLevel ].mbHidden; } @@ -1597,7 +1597,7 @@ XclExpColinfo::XclExpColinfo( const XclExpRoot& rRoot, rDoc.GetMostUsedPattern( nScCol, 0, nLastScRow, nScTab ), GetDefApiScript() ); // column width - USHORT nScWidth = rDoc.GetColWidth( nScCol, nScTab ); + sal_uInt16 nScWidth = rDoc.GetColWidth( nScCol, nScTab ); mnWidth = XclTools::GetXclColumnWidth( nScWidth, GetCharWidth() ); // column flags @@ -1824,8 +1824,8 @@ XclExpRow::XclExpRow( const XclExpRoot& rRoot, sal_uInt16 nXclRow, // *** Row flags *** ------------------------------------------------------ - BYTE nRowFlags = GetDoc().GetRowFlags( nScRow, nScTab ); - bool bUserHeight = ::get_flag< BYTE >( nRowFlags, CR_MANUALSIZE ); + sal_uInt8 nRowFlags = GetDoc().GetRowFlags( nScRow, nScTab ); + bool bUserHeight = ::get_flag< sal_uInt8 >( nRowFlags, CR_MANUALSIZE ); bool bHidden = GetDoc().RowHidden(nScRow, nScTab); ::set_flag( mnFlags, EXC_ROW_UNSYNCED, bUserHeight ); ::set_flag( mnFlags, EXC_ROW_HIDDEN, bHidden ); @@ -2410,7 +2410,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) : // try to create a Boolean cell if( pPattern && ((fValue == 0.0) || (fValue == 1.0)) ) { - ULONG nScNumFmt = GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, ULONG ); + sal_uLong nScNumFmt = GETITEMVALUE( pPattern->GetItemSet(), SfxUInt32Item, ATTR_VALUE_FORMAT, sal_uLong ); if( rFormatter.GetType( nScNumFmt ) == NUMBERFORMAT_LOGICAL ) xCell.reset( new XclExpBooleanCell( GetRoot(), aXclPos, pPattern, nMergeBaseXFId, fValue != 0.0 ) ); @@ -2510,7 +2510,7 @@ XclExpCellTable::XclExpCellTable( const XclExpRoot& rRoot ) : // data validation if( ScfTools::CheckItem( rItemSet, ATTR_VALIDDATA, false ) ) { - ULONG nScHandle = GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALIDDATA, ULONG ); + sal_uLong nScHandle = GETITEMVALUE( rItemSet, SfxUInt32Item, ATTR_VALIDDATA, sal_uLong ); ScRange aScRange( aScPos ); aScRange.aEnd.SetCol( nLastScCol ); mxDval->InsertCellRange( aScRange, nScHandle ); diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index 54a1c9fef..d0bfcad52 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -171,7 +171,7 @@ double lclGetSerialDay( const XclImpRoot& rRoot, sal_uInt16 nValue, sal_uInt16 n case EXC_CHDATERANGE_DAYS: return nValue; case EXC_CHDATERANGE_MONTHS: - return rRoot.GetDoubleFromDateTime( Date( 1, static_cast< sal_uInt16 >( 1 + nValue % 12 ), static_cast< USHORT >( rRoot.GetBaseYear() + nValue / 12 ) ) ); + return rRoot.GetDoubleFromDateTime( Date( 1, static_cast< sal_uInt16 >( 1 + nValue % 12 ), static_cast< sal_uInt16 >( rRoot.GetBaseYear() + nValue / 12 ) ) ); case EXC_CHDATERANGE_YEARS: return rRoot.GetDoubleFromDateTime( Date( 1, 1, static_cast< sal_uInt16 >( rRoot.GetBaseYear() + nValue ) ) ); default: diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 15b08afde..79defab23 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -639,7 +639,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) if( !mxScCondFmt.get() ) { - ULONG nKey = 0; + sal_uLong nKey = 0; mxScCondFmt.reset( new ScConditionalFormat( nKey, GetDocPtr() ) ); } @@ -654,7 +654,7 @@ void XclImpCondFormat::Apply() { ScDocument& rDoc = GetDoc(); - ULONG nKey = rDoc.AddCondFormat( *mxScCondFmt ); + sal_uLong nKey = rDoc.AddCondFormat( *mxScCondFmt ); ScPatternAttr aPattern( rDoc.GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nKey ) ); @@ -851,7 +851,7 @@ void XclImpValidation::ReadDV( XclImpStream& rStrm ) aValidData.ResetError(); // set the handle ID - ULONG nHandle = rDoc.AddValidationEntry( aValidData ); + sal_uLong nHandle = rDoc.AddValidationEntry( aValidData ); ScPatternAttr aPattern( rDoc.GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nHandle ) ); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index 2106ac197..12b2aff0c 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -471,7 +471,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb #ifdef ISSUE66550_HLINK_FOR_SHAPES if( mbSimpleMacro && ((maMacroName.Len() > 0) || (maHyperlink.getLength() > 0)) ) { - if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) ) + if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, sal_True ) ) { pInfo->SetMacro( XclTools::GetSbMacroUrl( maMacroName, GetDocShell() ) ); pInfo->SetHlink( maHyperlink ); @@ -479,7 +479,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb } #else if( mbSimpleMacro && (maMacroName.Len() > 0) ) - if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, TRUE ) ) + if( ScMacroInfo* pInfo = ScDrawLayer::GetMacroInfo( &rSdrObj, sal_True ) ) pInfo->SetMacro( XclTools::GetSbMacroUrl( maMacroName, GetDocShell() ) ); #endif @@ -565,9 +565,9 @@ void XclImpDrawObjBase::ConvertLineStyle( SdrObject& rSdrObj, const XclObjLineDa rSdrObj.SetMergedItem( XLineColorItem( EMPTY_STRING, GetPalette().GetColor( rLineData.mnColorIdx ) ) ); rSdrObj.SetMergedItem( XLineJointItem( XLINEJOINT_MITER ) ); - ULONG nDotLen = ::std::max< ULONG >( 70 * rLineData.mnWidth, 35 ); - ULONG nDashLen = 3 * nDotLen; - ULONG nDist = 2 * nDotLen; + sal_uLong nDotLen = ::std::max< sal_uLong >( 70 * rLineData.mnWidth, 35 ); + sal_uLong nDashLen = 3 * nDotLen; + sal_uLong nDist = 2 * nDotLen; switch( rLineData.mnStyle ) { @@ -663,7 +663,7 @@ void XclImpDrawObjBase::ConvertFillStyle( SdrObject& rSdrObj, const XclObjFillDa aMemStrm << sal_uInt32( pnPattern[ nIdx ] ); // 32-bit little-endian aMemStrm.Seek( STREAM_SEEK_TO_BEGIN ); Bitmap aBitmap; - aBitmap.Read( aMemStrm, FALSE ); + aBitmap.Read( aMemStrm, sal_False ); XOBitmap aXOBitmap( aBitmap ); aXOBitmap.Bitmap2Array(); aXOBitmap.SetBitmapType( XBITMAP_8X8 ); @@ -681,7 +681,7 @@ void XclImpDrawObjBase::ConvertFrameStyle( SdrObject& rSdrObj, sal_uInt16 nFrame { if( ::get_flag( nFrameFlags, EXC_OBJ_FRAME_SHADOW ) ) { - rSdrObj.SetMergedItem( SdrShadowItem( TRUE ) ); + rSdrObj.SetMergedItem( SdrShadowItem( sal_True ) ); rSdrObj.SetMergedItem( SdrShadowXDistItem( 35 ) ); rSdrObj.SetMergedItem( SdrShadowYDistItem( 35 ) ); rSdrObj.SetMergedItem( SdrShadowColorItem( EMPTY_STRING, GetPalette().GetColor( EXC_COLOR_WINDOWTEXT ) ) ); @@ -1077,13 +1077,13 @@ SdrObject* XclImpLineObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re { xSdrObj->SetMergedItem( XLineStartItem( EMPTY_STRING, aArrowPolyPoly ) ); xSdrObj->SetMergedItem( XLineStartWidthItem( nWidth ) ); - xSdrObj->SetMergedItem( XLineStartCenterItem( FALSE ) ); + xSdrObj->SetMergedItem( XLineStartCenterItem( sal_False ) ); } if( bLineEnd ) { xSdrObj->SetMergedItem( XLineEndItem( EMPTY_STRING, aArrowPolyPoly ) ); xSdrObj->SetMergedItem( XLineEndWidthItem( nWidth ) ); - xSdrObj->SetMergedItem( XLineEndCenterItem( FALSE ) ); + xSdrObj->SetMergedItem( XLineEndCenterItem( sal_False ) ); } } rDffConv.Progress(); @@ -1368,10 +1368,10 @@ SdrObject* XclImpTextObj::DoCreateSdrObj( XclImpDffConverter& rDffConv, const Re OUString aRectType = CREATE_OUSTRING( "rectangle" ); xSdrObj->MergeDefaultAttributes( &aRectType ); ConvertRectStyle( *xSdrObj ); - BOOL bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE ); + sal_Bool bAutoSize = ::get_flag( maTextData.maData.mnFlags, EXC_OBJ_TEXT_AUTOSIZE ); xSdrObj->SetMergedItem( SdrTextAutoGrowWidthItem( bAutoSize ) ); xSdrObj->SetMergedItem( SdrTextAutoGrowHeightItem( bAutoSize ) ); - xSdrObj->SetMergedItem( SdrTextWordWrapItem( TRUE ) ); + xSdrObj->SetMergedItem( SdrTextWordWrapItem( sal_True ) ); rDffConv.Progress(); return xSdrObj.release(); } @@ -3067,15 +3067,15 @@ XclImpSimpleDffConverter::~XclImpSimpleDffConverter() { } -FASTBOOL XclImpSimpleDffConverter::GetColorFromPalette( USHORT nIndex, Color& rColor ) const +FASTBOOL XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const { ColorData nColor = GetPalette().GetColorData( static_cast< sal_uInt16 >( nIndex ) ); if( nColor == COL_AUTO ) - return FALSE; + return sal_False; rColor.SetColor( nColor ); - return TRUE; + return sal_True; } // ---------------------------------------------------------------------------- @@ -3205,7 +3205,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpTbxObjBase& rTbxObj, ::com::sun::star::awt::Size aDummySize; Reference< XShape > xShape; XclImpDffConvData& rConvData = GetConvData(); - if( rConvData.mxCtrlForm.is() && InsertControl( xFormComp, aDummySize, &xShape, TRUE ) ) + if( rConvData.mxCtrlForm.is() && InsertControl( xFormComp, aDummySize, &xShape, sal_True ) ) { xSdrObj.reset( rTbxObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) ); // try to attach a macro to the control @@ -3241,7 +3241,7 @@ SdrObject* XclImpDffConverter::CreateSdrObject( const XclImpPictureObj& rPicObj, mxCtlsStrm->Seek( rPicObj.GetCtlsStreamPos() ); // read from mxCtlsStrm into xShape, insert the control model into the form Reference< XShape > xShape; - if( GetConvData().mxCtrlForm.is() && ReadOCXExcelKludgeStream( mxCtlsStrm, &xShape, TRUE ) ) + if( GetConvData().mxCtrlForm.is() && ReadOCXExcelKludgeStream( mxCtlsStrm, &xShape, sal_True ) ) xSdrObj.reset( rPicObj.CreateSdrObjectFromShape( xShape, rAnchorRect ) ); } catch( Exception& ) @@ -3405,14 +3405,14 @@ SdrObject* XclImpDffConverter::ProcessObj( SvStream& rDffStrm, DffObjData& rDffO return xSdrObj.release(); } -ULONG XclImpDffConverter::Calc_nBLIPPos( ULONG /*nOrgVal*/, ULONG nStreamPos ) const +sal_uLong XclImpDffConverter::Calc_nBLIPPos( sal_uLong /*nOrgVal*/, sal_uLong nStreamPos ) const { return nStreamPos + 4; } sal_Bool XclImpDffConverter::InsertControl( const Reference< XFormComponent >& rxFormComp, const ::com::sun::star::awt::Size& /*rSize*/, Reference< XShape >* pxShape, - BOOL /*bFloatingCtrl*/ ) + sal_Bool /*bFloatingCtrl*/ ) { if( GetDocShell() ) try { @@ -3832,7 +3832,7 @@ void XclImpDrawing::ReadBmp( Graphic& rGraphic, const XclImpRoot& rRoot, XclImpS // import the graphic from memory stream aMemStrm.Seek( STREAM_SEEK_TO_BEGIN ); Bitmap aBitmap; - if( aBitmap.Read( aMemStrm, FALSE ) ) // read DIB without file header + if( aBitmap.Read( aMemStrm, sal_False ) ) // read DIB without file header rGraphic = aBitmap; } diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx index ad04a1f39..d1793fc00 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -837,7 +837,7 @@ XclImpCachedValue::~XclImpCachedValue() { } -USHORT XclImpCachedValue::GetScError() const +sal_uInt16 XclImpCachedValue::GetScError() const { return (mnType == EXC_CACHEDVAL_ERROR) ? XclTools::GetScErrorCode( mnBoolErr ) : 0; } @@ -877,7 +877,7 @@ ScMatrixRef XclImpCachedMatrix::CreateScMatrix() const { ScMatrixRef xScMatrix; DBG_ASSERT( mnScCols * mnScRows == maValueList.Count(), "XclImpCachedMatrix::CreateScMatrix - element count mismatch" ); - if( mnScCols && mnScRows && static_cast< ULONG >( mnScCols * mnScRows ) <= maValueList.Count() ) + if( mnScCols && mnScRows && static_cast< sal_uLong >( mnScCols * mnScRows ) <= maValueList.Count() ) { xScMatrix = new ScMatrix( mnScCols, mnScRows ); const XclImpCachedValue* pValue = maValueList.First(); diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 9cef1f96d..47308499a 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -143,7 +143,7 @@ XclImpName::XclImpName( XclImpStream& rStrm, sal_uInt16 nXclNameIdx ) : // find an unused name String aOrigName( maScName ); sal_Int32 nCounter = 0; - USHORT nDummy; + sal_uInt16 nDummy; while( rRangeNames.SearchName( maScName, nDummy ) ) maScName.Assign( aOrigName ).Append( ' ' ).Append( String::CreateFromInt32( ++nCounter ) ); @@ -232,7 +232,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& rRoot ) : void XclImpNameManager::ReadName( XclImpStream& rStrm ) { - ULONG nCount = maNameList.Count(); + sal_uLong nCount = maNameList.Count(); if( nCount < 0xFFFF ) maNameList.Append( new XclImpName( rStrm, static_cast< sal_uInt16 >( nCount + 1 ) ) ); } diff --git a/sc/source/filter/excel/xipivot.cxx b/sc/source/filter/excel/xipivot.cxx index df39312ba..f93aa2cef 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -966,7 +966,7 @@ void XclImpPTField::ConvertRowColField( ScDPSaveData& rSaveData ) const DBG_ASSERT( maFieldInfo.mnAxes & EXC_SXVD_AXIS_ROWCOL, "XclImpPTField::ConvertRowColField - no row/column field" ); // special data orientation field? if( maFieldInfo.mnCacheIdx == EXC_SXIVD_DATA ) - rSaveData.GetDataLayoutDimension()->SetOrientation( static_cast< USHORT >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOL ) ) ); + rSaveData.GetDataLayoutDimension()->SetOrientation( static_cast< sal_uInt16 >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOL ) ) ); else ConvertRCPField( rSaveData ); } @@ -1067,7 +1067,7 @@ ScDPSaveDimension* XclImpPTField::ConvertRCPField( ScDPSaveData& rSaveData ) con ScDPSaveDimension& rSaveDim = *rSaveData.GetNewDimensionByName( rFieldName ); // orientation - rSaveDim.SetOrientation( static_cast< USHORT >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOLPAGE ) ) ); + rSaveDim.SetOrientation( static_cast< sal_uInt16 >( maFieldInfo.GetApiOrient( EXC_SXVD_AXIS_ROWCOLPAGE ) ) ); // general field info ConvertFieldInfo( rSaveDim ); @@ -1141,7 +1141,7 @@ void XclImpPTField::ConvertDataFieldInfo( ScDPSaveDimension& rSaveDim, const Xcl rSaveDim.SetLayoutName( *pVisName ); // aggregation function - rSaveDim.SetFunction( static_cast< USHORT >( rDataInfo.GetApiAggFunc() ) ); + rSaveDim.SetFunction( static_cast< sal_uInt16 >( rDataInfo.GetApiAggFunc() ) ); // result field reference sal_Int32 nRefType = rDataInfo.GetApiRefType(); @@ -1354,7 +1354,7 @@ void XclImpPivotTable::Convert() aSaveData.SetRowGrand( ::get_flag( maPTInfo.mnFlags, EXC_SXVIEW_ROWGRAND ) ); aSaveData.SetColumnGrand( ::get_flag( maPTInfo.mnFlags, EXC_SXVIEW_COLGRAND ) ); - aSaveData.SetFilterButton( FALSE ); + aSaveData.SetFilterButton( sal_False ); aSaveData.SetDrillDown( ::get_flag( maPTExtInfo.mnFlags, EXC_SXEX_DRILLDOWN ) ); // *** fields *** @@ -1417,7 +1417,7 @@ void XclImpPivotTable::Convert() pDPObj->SetSaveData( aSaveData ); pDPObj->SetSheetDesc( aDesc ); pDPObj->SetOutRange( aOutRange ); - pDPObj->SetAlive( TRUE ); + pDPObj->SetAlive( sal_True ); pDPObj->SetHeaderLayout( maPTViewEx9Info.mnGridLayout == 0 ); GetDoc().GetDPCollection()->InsertNewTable(pDPObj); diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index d72d90099..fbaf4aca8 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -610,7 +610,7 @@ void XclImpNumFmtBuffer::CreateScFormats() } } -ULONG XclImpNumFmtBuffer::GetScFormat( sal_uInt16 nXclNumFmt ) const +sal_uLong XclImpNumFmtBuffer::GetScFormat( sal_uInt16 nXclNumFmt ) const { XclImpIndexMap::const_iterator aIt = maIndexMap.find( nXclNumFmt ); return (aIt != maIndexMap.end()) ? aIt->second : NUMBERFORMAT_ENTRY_NOT_FOUND; @@ -618,17 +618,17 @@ ULONG XclImpNumFmtBuffer::GetScFormat( sal_uInt16 nXclNumFmt ) const void XclImpNumFmtBuffer::FillToItemSet( SfxItemSet& rItemSet, sal_uInt16 nXclNumFmt, bool bSkipPoolDefs ) const { - ULONG nScNumFmt = GetScFormat( nXclNumFmt ); + sal_uLong nScNumFmt = GetScFormat( nXclNumFmt ); if( nScNumFmt == NUMBERFORMAT_ENTRY_NOT_FOUND ) nScNumFmt = GetStdScNumFmt(); FillScFmtToItemSet( rItemSet, nScNumFmt, bSkipPoolDefs ); } -void XclImpNumFmtBuffer::FillScFmtToItemSet( SfxItemSet& rItemSet, ULONG nScNumFmt, bool bSkipPoolDefs ) const +void XclImpNumFmtBuffer::FillScFmtToItemSet( SfxItemSet& rItemSet, sal_uLong nScNumFmt, bool bSkipPoolDefs ) const { DBG_ASSERT( nScNumFmt != NUMBERFORMAT_ENTRY_NOT_FOUND, "XclImpNumFmtBuffer::FillScFmtToItemSet - invalid number format" ); ScfTools::PutItem( rItemSet, SfxUInt32Item( ATTR_VALUE_FORMAT, nScNumFmt ), bSkipPoolDefs ); - if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, FALSE ) == SFX_ITEM_SET ) + if( rItemSet.GetItemState( ATTR_VALUE_FORMAT, sal_False ) == SFX_ITEM_SET ) ScGlobal::AddLanguage( rItemSet, GetFormatter() ); } @@ -1196,7 +1196,7 @@ const ScPatternAttr& XclImpXF::CreatePattern( bool bSkipPoolDefs ) void XclImpXF::ApplyPattern( SCCOL nScCol1, SCROW nScRow1, SCCOL nScCol2, SCROW nScRow2, - SCTAB nScTab, ULONG nForceScNumFmt ) + SCTAB nScTab, sal_uLong nForceScNumFmt ) { // force creation of cell style and hard formatting, do it here to have mpStyleSheet const ScPatternAttr& rPattern = CreatePattern(); @@ -1466,7 +1466,7 @@ void XclImpXFBuffer::ApplyPattern( if( XclImpXF* pXF = GetXF( rXFIndex.GetXFIndex() ) ) { // #108770# set 'Standard' number format for all Boolean cells - ULONG nForceScNumFmt = rXFIndex.IsBoolCell() ? GetNumFmtBuffer().GetStdScNumFmt() : NUMBERFORMAT_ENTRY_NOT_FOUND; + sal_uLong nForceScNumFmt = rXFIndex.IsBoolCell() ? GetNumFmtBuffer().GetStdScNumFmt() : NUMBERFORMAT_ENTRY_NOT_FOUND; pXF->ApplyPattern( nScCol1, nScRow1, nScCol2, nScRow2, nScTab, nForceScNumFmt ); } } @@ -1523,7 +1523,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) { XclImpXFRange* pPrevRange; XclImpXFRange* pNextRange; - ULONG nNextIndex; + sal_uLong nNextIndex; Find( pPrevRange, pNextRange, nNextIndex, nScRow ); @@ -1538,7 +1538,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) SCROW nFirstScRow = pPrevRange->mnScRow1; SCROW nLastScRow = pPrevRange->mnScRow2; - ULONG nIndex = nNextIndex - 1; + sal_uLong nIndex = nNextIndex - 1; XclImpXFRange* pThisRange = pPrevRange; pPrevRange = nIndex ? maIndexList.GetObject( nIndex - 1 ) : 0; @@ -1587,7 +1587,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) void XclImpXFRangeColumn::Find( XclImpXFRange*& rpPrevRange, XclImpXFRange*& rpNextRange, - ULONG& rnNextIndex, SCROW nScRow ) const + sal_uLong& rnNextIndex, SCROW nScRow ) const { // test whether list is empty @@ -1623,8 +1623,8 @@ void XclImpXFRangeColumn::Find( // loop: find range entries before and after new row // break the loop if there is no more range between first and last -or- // if rpPrevRange contains nScRow (rpNextRange will never contain nScRow) - ULONG nPrevIndex = 0; - ULONG nMidIndex; + sal_uLong nPrevIndex = 0; + sal_uLong nMidIndex; rnNextIndex = maIndexList.Count() - 1; XclImpXFRange* pMidRange; while( ((rnNextIndex - nPrevIndex) > 1) && (rpPrevRange->mnScRow2 < nScRow) ) @@ -1652,7 +1652,7 @@ void XclImpXFRangeColumn::Find( } } -void XclImpXFRangeColumn::TryConcatPrev( ULONG nIndex ) +void XclImpXFRangeColumn::TryConcatPrev( sal_uLong nIndex ) { if( !nIndex ) return; @@ -1748,7 +1748,7 @@ void XclImpXFRangeBuffer::SetColumnDefXF( SCCOL nScCol, sal_uInt16 nXFIndex ) maColumns[ nIndex ]->SetDefaultXF( XclImpXFIndex( nXFIndex ) ); } -void XclImpXFRangeBuffer::SetBorderLine( const ScRange& rRange, SCTAB nScTab, USHORT nLine ) +void XclImpXFRangeBuffer::SetBorderLine( const ScRange& rRange, SCTAB nScTab, sal_uInt16 nLine ) { SCCOL nFromScCol = (nLine == BOX_LINE_RIGHT) ? rRange.aEnd.Col() : rRange.aStart.Col(); SCROW nFromScRow = (nLine == BOX_LINE_BOTTOM) ? rRange.aEnd.Row() : rRange.aStart.Row(); diff --git a/sc/source/filter/excel/xiview.cxx b/sc/source/filter/excel/xiview.cxx index bd47a0222..636c619a5 100644 --- a/sc/source/filter/excel/xiview.cxx +++ b/sc/source/filter/excel/xiview.cxx @@ -226,8 +226,8 @@ void XclImpTabViewSettings::Finalize() // sheet flags if( maData.mbMirrored ) - // do not call this function with FALSE, it would mirror away all drawing objects - rDoc.SetLayoutRTL( nScTab, TRUE ); + // do not call this function with sal_False, it would mirror away all drawing objects + rDoc.SetLayoutRTL( nScTab, sal_True ); rTabSett.mbSelected = maData.mbSelected || bDisplayed; // first visible cell in top-left pane and in additional pane(s) diff --git a/sc/source/filter/excel/xlchart.cxx b/sc/source/filter/excel/xlchart.cxx index a069a9a54..eaedd858d 100755 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -1074,17 +1074,17 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, { if( rEscherFmt.mxItemSet.is() ) { - if( const XFillStyleItem* pStyleItem = static_cast< const XFillStyleItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLSTYLE, FALSE ) ) ) + if( const XFillStyleItem* pStyleItem = static_cast< const XFillStyleItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLSTYLE, sal_False ) ) ) { switch( pStyleItem->GetValue() ) { case XFILL_SOLID: // #i84812# Excel 2007 writes Escher properties for solid fill - if( const XFillColorItem* pColorItem = static_cast< const XFillColorItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLCOLOR, FALSE ) ) ) + if( const XFillColorItem* pColorItem = static_cast< const XFillColorItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLCOLOR, sal_False ) ) ) { namespace cssd = ::com::sun::star::drawing; // get solid transparence too - const XFillTransparenceItem* pTranspItem = static_cast< const XFillTransparenceItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLTRANSPARENCE, FALSE ) ); + const XFillTransparenceItem* pTranspItem = static_cast< const XFillTransparenceItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLTRANSPARENCE, sal_False ) ); sal_uInt16 nTransp = pTranspItem ? pTranspItem->GetValue() : 0; ScfPropSetHelper& rAreaHlp = GetAreaHelper( ePropMode ); rAreaHlp.InitializeWrite(); @@ -1093,7 +1093,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, } break; case XFILL_GRADIENT: - if( const XFillGradientItem* pGradItem = static_cast< const XFillGradientItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLGRADIENT, FALSE ) ) ) + if( const XFillGradientItem* pGradItem = static_cast< const XFillGradientItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLGRADIENT, sal_False ) ) ) { Any aGradientAny; if( pGradItem->QueryValue( aGradientAny, MID_FILLGRADIENT ) ) @@ -1111,7 +1111,7 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, } break; case XFILL_BITMAP: - if( const XFillBitmapItem* pBmpItem = static_cast< const XFillBitmapItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLBITMAP, FALSE ) ) ) + if( const XFillBitmapItem* pBmpItem = static_cast< const XFillBitmapItem* >( rEscherFmt.mxItemSet->GetItem( XATTR_FILLBITMAP, sal_False ) ) ) { Any aBitmapAny; if( pBmpItem->QueryValue( aBitmapAny, MID_GRAFURL ) ) diff --git a/sc/source/filter/excel/xlformula.cxx b/sc/source/filter/excel/xlformula.cxx index fb55a9e67..ba6c313a8 100755 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -600,7 +600,7 @@ void XclTokenArrayIterator::Init() void XclTokenArrayIterator::Init( const ScTokenArray& rScTokArr, bool bSkipSpaces ) { - USHORT nTokArrLen = rScTokArr.GetLen(); + sal_uInt16 nTokArrLen = rScTokArr.GetLen(); mppScTokenBeg = static_cast< const FormulaToken* const* >( nTokArrLen ? rScTokArr.GetArray() : 0 ); mppScTokenEnd = mppScTokenBeg ? (mppScTokenBeg + nTokArrLen) : 0; mppScToken = (mppScTokenBeg != mppScTokenEnd) ? mppScTokenBeg : 0; diff --git a/sc/source/filter/excel/xlroot.cxx b/sc/source/filter/excel/xlroot.cxx index b37497596..c8d01bc01 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -358,8 +358,8 @@ ScEditEngineDefaulter& XclRoot::GetEditEngine() const ScEditEngineDefaulter& rEE = *mrData.mxEditEngine; rEE.SetRefMapMode( MAP_100TH_MM ); rEE.SetEditTextObjectPool( GetDoc().GetEditPool() ); - rEE.SetUpdateMode( FALSE ); - rEE.EnableUndo( FALSE ); + rEE.SetUpdateMode( sal_False ); + rEE.EnableUndo( sal_False ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); } return *mrData.mxEditEngine; @@ -369,11 +369,11 @@ ScHeaderEditEngine& XclRoot::GetHFEditEngine() const { if( !mrData.mxHFEditEngine.get() ) { - mrData.mxHFEditEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool(), TRUE ) ); + mrData.mxHFEditEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool(), sal_True ) ); ScHeaderEditEngine& rEE = *mrData.mxHFEditEngine; rEE.SetRefMapMode( MAP_TWIP ); // headers/footers use twips as default metric - rEE.SetUpdateMode( FALSE ); - rEE.EnableUndo( FALSE ); + rEE.SetUpdateMode( sal_False ); + rEE.EnableUndo( sal_False ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); // set Calc header/footer defaults @@ -396,8 +396,8 @@ EditEngine& XclRoot::GetDrawEditEngine() const mrData.mxDrawEditEng.reset( new EditEngine( &GetDoc().GetDrawLayer()->GetItemPool() ) ); EditEngine& rEE = *mrData.mxDrawEditEng; rEE.SetRefMapMode( MAP_100TH_MM ); - rEE.SetUpdateMode( FALSE ); - rEE.EnableUndo( FALSE ); + rEE.SetUpdateMode( sal_False ); + rEE.EnableUndo( sal_False ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); } return *mrData.mxDrawEditEng; diff --git a/sc/source/filter/excel/xltools.cxx b/sc/source/filter/excel/xltools.cxx index e1e41082d..798119cb5 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -215,7 +215,7 @@ sal_uInt8 XclTools::GetXclOrientFromRot( sal_uInt16 nXclRot ) return EXC_ORIENT_NONE; } -sal_uInt8 XclTools::GetXclErrorCode( USHORT nScError ) +sal_uInt8 XclTools::GetXclErrorCode( sal_uInt16 nScError ) { using namespace ScErrorCodes; switch( nScError ) @@ -240,7 +240,7 @@ sal_uInt8 XclTools::GetXclErrorCode( USHORT nScError ) return EXC_ERR_NA; } -USHORT XclTools::GetScErrorCode( sal_uInt8 nXclError ) +sal_uInt16 XclTools::GetScErrorCode( sal_uInt8 nXclError ) { using namespace ScErrorCodes; switch( nXclError ) @@ -328,13 +328,13 @@ sal_Int32 XclTools::GetHmmFromTwips( sal_Int32 nTwips ) return GetHmmFromInch( GetInchFromTwips( nTwips ) ); } -USHORT XclTools::GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth ) +sal_uInt16 XclTools::GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth ) { double fScWidth = static_cast< double >( nXclWidth ) / 256.0 * nScCharWidth + 0.5; - return limit_cast< USHORT >( fScWidth ); + return limit_cast< sal_uInt16 >( fScWidth ); } -sal_uInt16 XclTools::GetXclColumnWidth( USHORT nScWidth, long nScCharWidth ) +sal_uInt16 XclTools::GetXclColumnWidth( sal_uInt16 nScWidth, long nScCharWidth ) { double fXclWidth = static_cast< double >( nScWidth ) * 256.0 / nScCharWidth + 0.5; return limit_cast< sal_uInt16 >( fXclWidth ); |