diff options
author | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 16:55:21 -0500 |
---|---|---|
committer | Kohei Yoshida <kyoshida@novell.com> | 2011-03-10 20:21:13 -0500 |
commit | 12343c15568dcc2c9209d8ca41fda2263122448f (patch) | |
tree | 3212a89c6cd8ea2e0aee7103aa9669bbb8a6f307 /sc/source/filter | |
parent | 99745dbcbb25b61437914c9782475d0b67a4b0bd (diff) | |
parent | ce6308e4fad2281241bf4ca78280eba29f744d43 (diff) |
Merge commit 'ooo/DEV300_m101' into integration/dev300_m101
Diffstat (limited to 'sc/source/filter')
218 files changed, 4299 insertions, 3692 deletions
diff --git a/sc/source/filter/dif/difexp.cxx b/sc/source/filter/dif/difexp.cxx index 0a04d2ca7d6f..9ebf05f31080 100644 --- a/sc/source/filter/dif/difexp.cxx +++ b/sc/source/filter/dif/difexp.cxx @@ -48,7 +48,7 @@ #include "ftools.hxx" FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* pDoc, - const ScAddress& rOutPos, const CharSet eNach, UINT32 nDifOption ) + const ScAddress& rOutPos, const CharSet eNach, sal_uInt32 nDifOption ) { SCCOL nEndCol; SCROW nEndRow; @@ -63,7 +63,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rStream, ScDocument* p FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc, - const ScRange&rRange, const CharSet eCharSet, UINT32 nDifOption ) + const ScRange&rRange, const CharSet eCharSet, sal_uInt32 nDifOption ) { DBG_ASSERT( rRange.aStart <= rRange.aEnd, "*ScExportDif(): Range unsortiert!" ); DBG_ASSERTWARNING( rRange.aStart.Tab() == rRange.aEnd.Tab(), @@ -76,11 +76,11 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc sal_Unicode cStrDelim('"'); ByteString aStrDelimEncoded; // only used if not Unicode UniString aStrDelimDecoded; // only used if context encoding - BOOL bContextOrNotAsciiEncoding; + sal_Bool bContextOrNotAsciiEncoding; if ( eCharSet == RTL_TEXTENCODING_UNICODE ) { rOut.StartWritingUnicodeText(); - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = false; } else { @@ -96,7 +96,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc aStrDelimDecoded = String( aStrDelimEncoded, eCharSet ); } else - bContextOrNotAsciiEncoding = FALSE; + bContextOrNotAsciiEncoding = false; } const sal_Char* p2DoubleQuotes_LF = "\"\"\n"; @@ -117,7 +117,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc double fVal; - const BOOL bPlain = ( nDifOption == SC_DIFOPT_PLAIN ); + const sal_Bool bPlain = ( nDifOption == SC_DIFOPT_PLAIN ); ScProgress aPrgrsBar( pDoc->GetDocumentShell(), ScGlobal::GetRscString( STR_LOAD_DOC ), nNumRows ); @@ -185,7 +185,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc fVal = ( ( ScValueCell * ) pAkt )->GetValue(); aOS += String( ::rtl::math::doubleToUString( fVal, rtl_math_StringFormat_G, 14, '.', - TRUE)); + sal_True)); } else { @@ -213,7 +213,7 @@ FltError ScFormatFilterPluginImpl::ScExportDif( SvStream& rOut, ScDocument* pDoc fVal = ( ( ScFormulaCell * ) pAkt )->GetValue(); aOS += String( ::rtl::math::doubleToUString( fVal, rtl_math_StringFormat_G, 14, - '.', TRUE)); + '.', sal_True)); } else { diff --git a/sc/source/filter/dif/difimp.cxx b/sc/source/filter/dif/difimp.cxx index 8f87d50cf826..18d0c532fff9 100644 --- a/sc/source/filter/dif/difimp.cxx +++ b/sc/source/filter/dif/difimp.cxx @@ -61,20 +61,20 @@ const sal_Unicode pKey1_0[] = { '1', ',', '0', 0 }; FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, const ScAddress& rInsPos, - const CharSet eVon, UINT32 nDifOption ) + const CharSet eVon, sal_uInt32 nDifOption ) { DifParser aDifParser( rIn, nDifOption, *pDoc, eVon ); - const BOOL bPlain = aDifParser.IsPlain(); + const sal_Bool bPlain = aDifParser.IsPlain(); SCTAB nBaseTab = rInsPos.Tab(); TOPIC eTopic = T_UNKNOWN; - BOOL bSyntErrWarn = FALSE; - BOOL bOverflowWarn = FALSE; + sal_Bool bSyntErrWarn = false; + sal_Bool bOverflowWarn = false; String& rData = aDifParser.aData; - BOOL bData = FALSE; + sal_Bool bData = false; rIn.Seek( 0 ); @@ -93,7 +93,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, case T_TABLE: { if( aDifParser.nVector != 0 || aDifParser.nVal != 1 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = sal_True; if( bData ) pDoc->RenameTab( nBaseTab, rData ); } @@ -101,19 +101,19 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, case T_VECTORS: { if( aDifParser.nVector != 0 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = true; } break; case T_TUPLES: { if( aDifParser.nVector != 0 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = true; } break; case T_DATA: { if( aDifParser.nVector != 0 || aDifParser.nVal != 0 ) - bSyntErrWarn = TRUE; + bSyntErrWarn = sal_True; } break; case T_LABEL: @@ -193,10 +193,10 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, pCell = new ScStringCell( aTmp ); } - pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, pCell, ( BOOL ) TRUE ); + pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, pCell, ( sal_Bool ) sal_True ); } else - bOverflowWarn = TRUE; + bOverflowWarn = sal_True; nColCnt++; break; @@ -209,11 +209,11 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, if( rData.Len() > 0 ) { pDoc->PutCell( nColCnt, nRowCnt, nBaseTab, - ScBaseCell::CreateTextCell( rData, pDoc ), ( BOOL ) TRUE ); + ScBaseCell::CreateTextCell( rData, pDoc ), ( sal_Bool ) sal_True ); } } else - bOverflowWarn = TRUE; + bOverflowWarn = sal_True; nColCnt++; break; @@ -243,7 +243,7 @@ FltError ScFormatFilterPluginImpl::ScImportDif( SvStream& rIn, ScDocument* pDoc, } -DifParser::DifParser( SvStream& rNewIn, const UINT32 nOption, ScDocument& rDoc, CharSet e ) : +DifParser::DifParser( SvStream& rNewIn, const sal_uInt32 nOption, ScDocument& rDoc, CharSet e ) : rIn( rNewIn ) { eCharSet = e; @@ -252,8 +252,7 @@ DifParser::DifParser( SvStream& rNewIn, const UINT32 nOption, ScDocument& rDoc, DBG_ERRORFILE( "CharSet passed overrides and modifies StreamCharSet" ); rIn.SetStreamCharSet( eCharSet ); } - if ( eCharSet == RTL_TEXTENCODING_UNICODE ) - rIn.StartReadingUnicodeText(); + rIn.StartReadingUnicodeText( eCharSet ); bPlain = ( nOption == SC_DIFOPT_PLAIN ); @@ -335,8 +334,8 @@ TOPIC DifParser::GetNextTopic( void ) case S_START: { const sal_Unicode* pRef; - UINT16 nCnt = 0; - BOOL bSearch = TRUE; + sal_uInt16 nCnt = 0; + sal_Bool bSearch = sal_True; pRef = ppKeys[ nCnt ]; @@ -345,14 +344,14 @@ TOPIC DifParser::GetNextTopic( void ) if( aLine == pRef ) { eRet = pTopics[ nCnt ]; - bSearch = FALSE; + bSearch = false; } else { nCnt++; pRef = ppKeys[ nCnt ]; if( !*pRef ) - bSearch = FALSE; + bSearch = false; } } @@ -616,7 +615,7 @@ DATASET DifParser::GetNextDataset( void ) } -const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRet ) +const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, sal_uInt32& rRet ) { // eat leading whitespace, not specified, but seen in the wild while (*pStart == ' ' || *pStart == '\t') @@ -625,7 +624,7 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRe sal_Unicode cAkt = *pStart; if( IsNumber( cAkt ) ) - rRet = ( UINT32 ) ( cAkt - '0' ); + rRet = ( sal_uInt32 ) ( cAkt - '0' ); else return NULL; @@ -635,7 +634,7 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRe while( IsNumber( cAkt ) && rRet < ( 0xFFFFFFFF / 10 ) ) { rRet *= 10; - rRet += ( UINT32 ) ( cAkt - '0' ); + rRet += ( sal_uInt32 ) ( cAkt - '0' ); pStart++; cAkt = *pStart; @@ -645,18 +644,18 @@ const sal_Unicode* DifParser::ScanIntVal( const sal_Unicode* pStart, UINT32& rRe } -BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) +sal_Bool DifParser::ScanFloatVal( const sal_Unicode* pStart ) { double fNewVal = 0.0; - BOOL bNeg = FALSE; + sal_Bool bNeg = false; double fFracPos = 1.0; - INT32 nExp = 0; - BOOL bExpNeg = FALSE; - BOOL bExpOverflow = FALSE; - static const UINT16 nExpLimit = 4096; // ACHTUNG: muss genauer ermittelt werden! + sal_Int32 nExp = 0; + sal_Bool bExpNeg = false; + sal_Bool bExpOverflow = false; + static const sal_uInt16 nExpLimit = 4096; // ACHTUNG: muss genauer ermittelt werden! sal_Unicode cAkt; - BOOL bRet = FALSE; + sal_Bool bRet = false; enum STATE { S_FIRST, S_PRE, S_POST, S_EXP_FIRST, S_EXP, S_END, S_FINDEND }; @@ -717,7 +716,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) eS = S_EXP; break; case 0x00: // IsNumberEnding( cAkt ) - bRet = TRUE; // no + bRet = sal_True; // no default: // break! eS = S_END; } @@ -738,7 +737,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) eS = S_EXP_FIRST; break; case 0x00: // IsNumberEnding( cAkt ) - bRet = TRUE; // no + bRet = sal_True; // no default: // break! eS = S_END; } @@ -750,7 +749,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) if( nExp < nExpLimit ) { nExp *= 10; - nExp += ( UINT16 ) ( cAkt - '0' ); + nExp += ( sal_uInt16 ) ( cAkt - '0' ); } eS = S_EXP; } @@ -774,11 +773,11 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) if( nExp < ( 0xFFFF / 10 ) ) { nExp *= 10; - nExp += ( UINT16 ) ( cAkt - '0' ); + nExp += ( sal_uInt16 ) ( cAkt - '0' ); } else { - bExpOverflow = TRUE; + bExpOverflow = sal_True; eS = S_FINDEND; } } @@ -791,7 +790,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) case S_FINDEND: if( IsNumberEnding( cAkt ) ) { - bRet = TRUE; // damit sinnvoll weitergeparst werden kann + bRet = sal_True; // damit sinnvoll weitergeparst werden kann eS = S_END; } break; @@ -807,7 +806,7 @@ BOOL DifParser::ScanFloatVal( const sal_Unicode* pStart ) if( bRet ) { if( bExpOverflow ) - return sal_False; // ACHTUNG: hier muss noch differenziert werden + return false; // ACHTUNG: hier muss noch differenziert werden if( bNeg ) fNewVal *= 1.0; @@ -853,7 +852,7 @@ void DifColumn::SetLogical( SCROW nRow ) } -void DifColumn::SetNumFormat( SCROW nRow, const UINT32 nNumFormat ) +void DifColumn::SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat ) { DBG_ASSERT( ValidRow(nRow), "*DifColumn::SetNumFormat(): Row zu gross!" ); @@ -879,7 +878,7 @@ void DifColumn::SetNumFormat( SCROW nRow, const UINT32 nNumFormat ) } -void DifColumn::NewEntry( const SCROW nPos, const UINT32 nNumFormat ) +void DifColumn::NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat ) { pAkt = new ENTRY; pAkt->nStart = pAkt->nEnd = nPos; @@ -915,7 +914,7 @@ void DifColumn::Apply( ScDocument& rDoc, const SCCOL nCol, const SCTAB nTab ) } -DifAttrCache::DifAttrCache( const BOOL bNewPlain ) +DifAttrCache::DifAttrCache( const sal_Bool bNewPlain ) { bPlain = bNewPlain; ppCols = new DifColumn *[ MAXCOL + 1 ]; @@ -944,7 +943,7 @@ void DifAttrCache::SetLogical( const SCCOL nCol, const SCROW nRow ) ppCols[ nCol ]->SetLogical( nRow ); } -void DifAttrCache::SetNumFormat( const SCCOL nCol, const SCROW nRow, const UINT32 nNumFormat ) +void DifAttrCache::SetNumFormat( const SCCOL nCol, const SCROW nRow, const sal_uInt32 nNumFormat ) { DBG_ASSERT( ValidCol(nCol), "-DifAttrCache::SetNumFormat(): Col zu gross!" ); DBG_ASSERT( !bPlain, "*DifAttrCache::SetNumFormat(): sollte nicht Plain sein!" ); diff --git a/sc/source/filter/excel/colrowst.cxx b/sc/source/filter/excel/colrowst.cxx index 363e522092f4..17270c14fc00 100644 --- a/sc/source/filter/excel/colrowst.cxx +++ b/sc/source/filter/excel/colrowst.cxx @@ -303,7 +303,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, false ); // #i38093# rows hidden by filter need extra flag SCROW nFirstFilterScRow = SCROW_MAX; @@ -358,7 +358,7 @@ 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, false ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/sc/source/filter/excel/excdoc.cxx b/sc/source/filter/excel/excdoc.cxx index 6bd9a1388513..1b2491ae15dd 100644 --- a/sc/source/filter/excel/excdoc.cxx +++ b/sc/source/filter/excel/excdoc.cxx @@ -194,8 +194,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; @@ -219,7 +219,7 @@ void ExcTable::FillAsHeader( ExcBoundsheetList& rBoundsheetList ) else { if( IsDocumentEncrypted() ) - Add( new XclExpFilePass( GetRoot() ) ); + Add( new XclExpFileEncryption( GetRoot() ) ); Add( new XclExpInterfaceHdr( nCodePage ) ); Add( new XclExpUInt16Record( EXC_ID_MMS, 0 ) ); Add( new XclExpInterfaceEnd ); diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx index c0012c5519f7..4bd3654caa64 100644 --- a/sc/source/filter/excel/excel.cxx +++ b/sc/source/filter/excel/excel.cxx @@ -32,6 +32,8 @@ #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> #include <sfx2/app.hxx> +#include <sfx2/frame.hxx> +#include <sfx2/request.hxx> #include <sot/storage.hxx> #include <sot/exchange.hxx> #include <tools/globname.hxx> @@ -93,17 +95,24 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument aArgs[ 0 ] <<= getProcessServiceFactory(); aArgs[ 1 ] <<= aArgSeq; uno::Reference< document::XImporter > xImporter( ScfApiHelper::CreateInstanceWithArgs( - CREATE_OUSTRING( "com.sun.star.comp.oox.ExcelBiffFilter" ), aArgs ), uno::UNO_QUERY_THROW ); + CREATE_OUSTRING( "com.sun.star.comp.oox.xls.ExcelBiffFilter" ), aArgs ), uno::UNO_QUERY_THROW ); xImporter->setTargetDocument( xComponent ); MediaDescriptor aMediaDesc; SfxItemSet* pItemSet = rMedium.GetItemSet(); if( pItemSet ) { - if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( pItemSet->GetItem( SID_FILE_NAME ) ) ) - aMediaDesc[ MediaDescriptor::PROP_URL() ] <<= ::rtl::OUString( pItem->GetValue() ); - if( const SfxStringItem* pItem = static_cast< const SfxStringItem* >( pItemSet->GetItem( SID_PASSWORD ) ) ) - aMediaDesc[ MediaDescriptor::PROP_PASSWORD() ] <<= ::rtl::OUString( pItem->GetValue() ); + SFX_ITEMSET_ARG( pItemSet, pFileNameItem, SfxStringItem, SID_FILE_NAME, false); + if( pFileNameItem ) + aMediaDesc[ MediaDescriptor::PROP_URL() ] <<= ::rtl::OUString( pFileNameItem->GetValue() ); + + SFX_ITEMSET_ARG( pItemSet, pPasswordItem, SfxStringItem, SID_PASSWORD, false); + if( pPasswordItem ) + aMediaDesc[ MediaDescriptor::PROP_PASSWORD() ] <<= ::rtl::OUString( pPasswordItem->GetValue() ); + + SFX_ITEMSET_ARG( pItemSet, pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false); + if( pEncryptionDataItem ) + aMediaDesc[ MediaDescriptor::PROP_ENCRYPTIONDATA() ] = pEncryptionDataItem->GetValue(); } aMediaDesc[ MediaDescriptor::PROP_INPUTSTREAM() ] <<= rMedium.GetInputStream(); aMediaDesc[ MediaDescriptor::PROP_INTERACTIONHANDLER() ] <<= rMedium.GetInteractionHandler(); @@ -136,7 +145,7 @@ FltError ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument SotStorageStreamRef xStrgStrm; if( SotStorage::IsStorageFile( pMedStrm ) ) { - xRootStrg = new SotStorage( pMedStrm, FALSE ); + xRootStrg = new SotStorage( pMedStrm, false ); if( xRootStrg->GetError() ) xRootStrg = 0; } @@ -209,10 +218,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, 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 c9cb9ccb301f..ff3c3e118f9f 100644 --- a/sc/source/filter/excel/excform.cxx +++ b/sc/source/filter/excel/excform.cxx @@ -46,8 +46,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; @@ -55,16 +55,16 @@ const UINT16 ExcelToSc::nLastInd = 399; void ImportExcel::Formula25() { XclAddress aXclPos; - UINT16 nXF = 0, nFormLen; + sal_uInt16 nXF = 0, nFormLen; double fCurVal; - BYTE nFlag0; - BOOL bShrFmla; + sal_uInt8 nFlag0; + sal_Bool bShrFmla; aIn >> aXclPos; if( GetBiff() == EXC_BIFF2 ) {// BIFF2 - BYTE nDummy; + sal_uInt8 nDummy; aIn.Ignore( 3 ); @@ -72,7 +72,7 @@ void ImportExcel::Formula25() aIn.Ignore( 1 ); aIn >> nDummy; nFormLen = nDummy; - bShrFmla = FALSE; + bShrFmla = false; } else {// BIFF5 @@ -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, 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 { @@ -196,23 +196,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 = false; + sal_Bool bArrayFormula = 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 = false; if( eStatus != ConvOK ) { @@ -250,7 +250,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; @@ -368,8 +368,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; @@ -535,7 +535,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 ); @@ -546,8 +546,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 ); @@ -559,16 +559,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 ); @@ -586,10 +586,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 ); @@ -617,7 +617,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 ); @@ -629,12 +629,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 ); @@ -682,12 +682,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 ); @@ -712,9 +712,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 ); @@ -738,8 +738,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( false ); ExcRelToScRel( nRow, nCol, aSRD, bRangeName ); @@ -749,11 +749,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 ) { @@ -775,9 +775,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 ); @@ -808,10 +808,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( false ); rR2.SetFlag3D( nTabFirst != nTabLast ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( false ); ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -827,21 +827,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(); } @@ -892,21 +892,21 @@ ConvErr ExcelToSc::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal SCsTAB nTab, 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 = false; + sal_Bool bArrayFormula = 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 = false; if( eStatus != ConvOK ) { @@ -933,7 +933,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; @@ -965,8 +965,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; @@ -1052,7 +1052,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 ); @@ -1063,16 +1063,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 ); @@ -1116,7 +1116,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 ); @@ -1128,12 +1128,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 ); @@ -1175,9 +1175,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 ); @@ -1201,10 +1201,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( false ); ExcRelToScRel( nRow, nCol, aSRD, bRangeName ); @@ -1216,7 +1216,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( false ); rRangeList.Append( aCRD, nTab ); } else @@ -1229,9 +1229,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 ); @@ -1263,9 +1263,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( false ); rR2.SetFlag3D( ( static_cast<SCTAB>(nTabLast) != aEingPos.Tab() ) || bRangeName ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( false ); ExcRelToScRel( nRowFirst, nColFirst, aCRD.Ref1, bRangeName ); ExcRelToScRel( nRowLast, nColLast, aCRD.Ref2, bRangeName ); @@ -1289,7 +1289,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(); @@ -1320,11 +1320,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 false; sal_uInt8 nOp; sal_uInt16 nRow1, nRow2; @@ -1509,8 +1509,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; @@ -1528,7 +1528,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 ) { @@ -1565,10 +1565,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 ) @@ -1577,13 +1577,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; } } @@ -1592,7 +1592,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; // skip missing parameters at end of parameter list while( nSkipEnd < nLastRemovable && @@ -1619,36 +1619,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( 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( false ); rSRD.nRow = static_cast<SCROW>(nRow & nRowMask); } @@ -1682,7 +1682,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(); @@ -1724,13 +1724,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 = false; else { aIn.PushPosition(); @@ -1739,17 +1739,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 = false; aIn.PopPosition(); } @@ -1768,7 +1768,7 @@ BOOL ExcelToSc::GetShrFmla( const ScTokenArray*& rpErgebnis, XclImpStream& aIn, void ExcelToSc::SetError( ScFormulaCell &rCell, const ConvErr eErr ) { - UINT16 nInd; + sal_uInt16 nInd; switch( eErr ) { @@ -1807,8 +1807,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 772d41ddbcad..2508e20681f4 100644 --- a/sc/source/filter/excel/excform8.cxx +++ b/sc/source/filter/excel/excform8.cxx @@ -63,7 +63,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()) @@ -76,7 +76,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); @@ -97,16 +97,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 = false; + sal_Bool bArrayFormula = 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; @@ -143,7 +143,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; @@ -445,14 +445,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 ); @@ -463,8 +463,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 ); @@ -477,16 +477,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 ); @@ -504,10 +504,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 ); @@ -543,12 +543,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 ); @@ -560,12 +560,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 ); @@ -699,7 +699,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; @@ -713,8 +713,8 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, } aSRD.nTab = nTabFirst; - aSRD.SetFlag3D( TRUE ); - aSRD.SetTabRel( FALSE ); + aSRD.SetFlag3D( sal_True ); + aSRD.SetTabRel( false ); ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName ); @@ -724,8 +724,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) @@ -748,7 +748,7 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, else { if ( !ValidTab(nTabFirst)) - aSRD.SetTabDeleted( TRUE ); + aSRD.SetTabDeleted( sal_True ); if( nTabLast != nTabFirst ) { @@ -769,7 +769,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; @@ -786,10 +786,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( false ); rR2.SetFlag3D( nTabFirst != nTabLast ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( false ); ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName ); @@ -805,10 +805,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) @@ -818,15 +818,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(); } @@ -871,16 +871,16 @@ ConvErr ExcelToSc8::Convert( const ScTokenArray*& rpTokArray, XclImpStream& aIn, ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sal_Size nFormulaLen, SCsTAB nTab, const FORMULA_TYPE eFT ) { - BYTE nOp, nLen;//, nByte; - BOOL bError = 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 = 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 = false; if( eStatus != ConvOK ) { @@ -938,8 +938,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; @@ -985,14 +985,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 ); @@ -1004,16 +1004,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 ); @@ -1059,12 +1059,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 ); @@ -1076,12 +1076,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 ); @@ -1118,7 +1118,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; @@ -1126,8 +1126,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( false ); ExcRelToScRel8( nRw, nGrbitCol, aSRD, bRangeName ); @@ -1148,7 +1148,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; @@ -1160,10 +1160,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( false ); rR2.SetFlag3D( nFirstScTab != nLastScTab ); - rR2.SetTabRel( FALSE ); + rR2.SetTabRel( false ); ExcRelToScRel8( nRw1, nGrbitCol1, aCRD.Ref1, bRangeName ); ExcRelToScRel8( nRw2, nGrbitCol2, aCRD.Ref2, bRangeName ); @@ -1188,7 +1188,7 @@ ConvErr ExcelToSc8::Convert( _ScRangeListTabs& rRangeList, XclImpStream& aIn, sa aIn.Ignore( 10 ); break; default: - bError = TRUE; + bError = sal_True; } bError |= !aIn.IsValid(); } @@ -1358,11 +1358,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 ); @@ -1372,7 +1372,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); @@ -1380,7 +1380,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); @@ -1413,12 +1413,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; @@ -1558,7 +1558,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; @@ -1566,8 +1566,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 b18e3a33b323..beb64b9b30ca 100644 --- a/sc/source/filter/excel/excimp8.cxx +++ b/sc/source/filter/excel/excimp8.cxx @@ -31,10 +31,9 @@ #include "excimp8.hxx" -#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> - #include <scitems.hxx> #include <comphelper/processfactory.hxx> +#include <comphelper/mediadescriptor.hxx> #include <unotools/fltrcfg.hxx> #include <svtools/wmf.hxx> @@ -43,6 +42,11 @@ #include <sfx2/docfile.hxx> #include <sfx2/objsh.hxx> +#include <sfx2/request.hxx> +#include <sfx2/app.hxx> +#include <sfx2/docinf.hxx> +#include <sfx2/frame.hxx> + #include <editeng/brshitem.hxx> #include <editeng/editdata.hxx> #include <editeng/editeng.hxx> @@ -55,19 +59,16 @@ #include <editeng/crsditem.hxx> #include <editeng/flditem.hxx> #include <svx/xflclit.hxx> -#include <filter/msfilter/svxmsbas.hxx> -#include <basic/basmgr.hxx> #include <vcl/graph.hxx> #include <vcl/bmpacc.hxx> #include <sot/exchange.hxx> -#include <sfx2/docinf.hxx> +#include <svl/stritem.hxx> #include <tools/string.hxx> #include <tools/urlobj.hxx> #include <rtl/math.hxx> -#include <rtl/ustrbuf.hxx> #include <unotools/localedatawrapper.hxx> #include <unotools/charclass.hxx> #include <drwlayer.hxx> @@ -249,8 +250,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() ); @@ -268,7 +269,7 @@ void ImportExcel8::Boundsheet( void ) } if( ( nGrbit & 0x0001 ) || ( nGrbit & 0x0002 ) ) - pD->SetVisible( nScTab, FALSE ); + pD->SetVisible( nScTab, false ); if( !pD->RenameTab( nScTab, aName ) ) { @@ -282,7 +283,7 @@ void ImportExcel8::Boundsheet( void ) void ImportExcel8::Scenman( void ) { - UINT16 nLastDispl; + sal_uInt16 nLastDispl; aIn.Ignore( 4 ); aIn >> nLastDispl; @@ -300,8 +301,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; @@ -324,8 +325,7 @@ void ImportExcel8::ReadBasic( void ) { SfxObjectShell* pShell = GetDocShell(); SotStorageRef xRootStrg = GetRootStorage(); - SvtFilterOptions* pFilterOpt = SvtFilterOptions::Get(); - if( pShell && xRootStrg.Is() && pFilterOpt ) + if( pShell && xRootStrg.Is() ) try { bool bLoadCode = pFilterOpt->IsLoadExcelBasicCode(); bool bLoadExecutable = pFilterOpt->IsLoadExcelBasicExecutable(); @@ -392,6 +392,15 @@ void ImportExcel8::ReadBasic( void ) catch( uno::Exception& ) { } + aMediaDesc[ MediaDescriptor::PROP_INPUTSTREAM() ] <<= rMedium.GetInputStream(); + aMediaDesc[ MediaDescriptor::PROP_INTERACTIONHANDLER() ] <<= rMedium.GetInteractionHandler(); + + // call the filter + uno::Reference< document::XFilter > xFilter( xImporter, uno::UNO_QUERY_THROW ); + xFilter->filter( aMediaDesc.getAsConstPropertyValueList() ); + } + catch( uno::Exception& ) + { } } @@ -498,10 +507,10 @@ XclImpAutoFilterData::XclImpAutoFilterData( RootData* pRoot, const ScRange& rRan ExcRoot( pRoot ), pCurrDBData(NULL), nFirstEmpty( 0 ), - bActive( FALSE ), - bHasConflict( FALSE ), - bCriteria( FALSE ), - bAutoOrAdvanced(FALSE), + bActive( false ), + bHasConflict( false ), + bCriteria( false ), + bAutoOrAdvanced(false), aFilterName(rName) { aParam.nCol1 = rRange.aStart.Col(); @@ -510,7 +519,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; } @@ -518,7 +527,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() @@ -526,7 +535,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) ); } } @@ -536,7 +545,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(), @@ -547,7 +556,7 @@ void XclImpAutoFilterData::InsertQueryParam() pCurrDBData->SetAdvancedQuerySource( &aAdvRange ); else { - pCurrDBData->SetAutoFilter( TRUE ); + pCurrDBData->SetAutoFilter( sal_True ); SetCellAttribs(); } } @@ -587,14 +596,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 ) @@ -602,8 +611,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); @@ -616,12 +625,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++ ) @@ -630,7 +639,7 @@ void XclImpAutoFilterData::ReadAutoFilter( XclImpStream& rStrm ) { ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty ); pQueryEntries[ nE ] = &aEntry; - bIgnore = FALSE; + bIgnore = false; rStrm >> nType >> nOper; switch( nOper ) @@ -678,21 +687,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 = false; aEntry.nVal = SC_EMPTYFIELDS; aEntry.eOp = SC_EQUAL; break; case EXC_AFTYPE_NOTEMPTY: - aEntry.bQueryByString = FALSE; + aEntry.bQueryByString = 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, @@ -702,11 +711,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++; @@ -731,10 +740,10 @@ void XclImpAutoFilterData::SetAdvancedRange( const ScRange* pRange ) if (pRange) { aCriteriaRange = *pRange; - bCriteria = TRUE; + bCriteria = sal_True; } else - bCriteria = FALSE; + bCriteria = false; } void XclImpAutoFilterData::SetExtractPos( const ScAddress& rAddr ) @@ -742,11 +751,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 = false; + aParam.bDestPers = sal_True; } -void XclImpAutoFilterData::Apply( const BOOL bUseUnNamed ) +void XclImpAutoFilterData::Apply( const sal_Bool bUseUnNamed ) { CreateScDBData(bUseUnNamed); @@ -758,7 +767,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) @@ -770,7 +779,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 @@ -809,7 +818,7 @@ void XclImpAutoFilterData::EnableRemoveFilter() if( !bActive && bAutoOrAdvanced ) { ScQueryEntry& aEntry = aParam.GetEntry( nFirstEmpty ); - aEntry.bDoQuery = TRUE; + aEntry.bDoQuery = sal_True; ++nFirstEmpty; } @@ -818,7 +827,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 032a540c867a..ec4c425c1621 100644 --- a/sc/source/filter/excel/excrecds.cxx +++ b/sc/source/filter/excel/excrecds.cxx @@ -97,15 +97,13 @@ #include "xcl97rec.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; 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, @@ -114,20 +112,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 @@ -167,7 +165,7 @@ void ExcEmptyRec::Save( XclExpStream& /*rStrm*/ ) } -UINT16 ExcEmptyRec::GetNum() const +sal_uInt16 ExcEmptyRec::GetNum() const { return 0; } @@ -205,7 +203,7 @@ void ExcDummyRec::Save( XclExpStream& rStrm ) } -UINT16 ExcDummyRec::GetNum( void ) const +sal_uInt16 ExcDummyRec::GetNum( void ) const { return 0x0000; } @@ -216,7 +214,7 @@ UINT16 ExcDummyRec::GetNum( void ) const void ExcBoolRecord::SaveCont( XclExpStream& rStrm ) { - rStrm << (UINT16)(bVal ? 0x0001 : 0x0000); + rStrm << (sal_uInt16)(bVal ? 0x0001 : 0x0000); } @@ -253,7 +251,7 @@ void ExcBof::SaveCont( XclExpStream& rStrm ) } -UINT16 ExcBof::GetNum( void ) const +sal_uInt16 ExcBof::GetNum( void ) const { return 0x0809; } @@ -282,7 +280,7 @@ void ExcBofW::SaveCont( XclExpStream& rStrm ) -UINT16 ExcBofW::GetNum( void ) const +sal_uInt16 ExcBofW::GetNum( void ) const { return 0x0809; } @@ -298,7 +296,7 @@ sal_Size ExcBofW::GetLen( void ) const //-------------------------------------------------------------- class ExcEof - -UINT16 ExcEof::GetNum( void ) const +sal_uInt16 ExcEof::GetNum( void ) const { return 0x000A; } @@ -319,7 +317,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; } @@ -334,7 +332,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; } @@ -348,7 +346,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; } @@ -360,12 +358,12 @@ const BYTE* ExcDummy_041::GetData( void ) const Exc1904::Exc1904( ScDocument& rDoc ) { Date* pDate = rDoc.GetFormatTable()->GetNullDate(); - bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : FALSE; - bDateCompatibility = pDate ? !( *pDate == Date( 30, 12, 1899 )) : FALSE; + bVal = pDate ? (*pDate == Date( 1, 1, 1904 )) : false; + bDateCompatibility = pDate ? !( *pDate == Date( 30, 12, 1899 )) : false; } -UINT16 Exc1904::GetNum( void ) const +sal_uInt16 Exc1904::GetNum( void ) const { return 0x0022; } @@ -421,7 +419,7 @@ void ExcBundlesheetBase::UpdateStreamPos( XclExpStream& rStrm ) } -UINT16 ExcBundlesheetBase::GetNum( void ) const +sal_uInt16 ExcBundlesheetBase::GetNum( void ) const { return 0x0085; } @@ -441,7 +439,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 } @@ -460,7 +458,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; } @@ -593,7 +591,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; @@ -613,17 +611,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 ) { @@ -638,7 +636,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 ) { @@ -672,7 +670,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 ), @@ -680,13 +678,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 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; @@ -697,12 +695,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 = false; String sText; if( rEntry.pStr ) @@ -732,23 +730,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: @@ -765,7 +763,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 ) @@ -774,13 +772,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 ) { @@ -862,9 +860,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 = false; + sal_Bool bAdvanced = false; ScDBData* pData = NULL; ScRange aAdvRange; while( (nIndex < rDBColl.GetCount()) && !bFound ) @@ -917,9 +915,9 @@ ExcAutoFilterRecs::ExcAutoFilterRecs( const XclExpRoot& rRoot, SCTAB nTab ) : // AutoFilter else { - BOOL bConflict = FALSE; - BOOL bContLoop = TRUE; - BOOL bHasOr = FALSE; + sal_Bool bConflict = false; + sal_Bool bContLoop = sal_True; + sal_Bool bHasOr = false; SCCOLROW nFirstField = aParam.GetEntry( 0 ).nField; // create AUTOFILTER records for filtered columns @@ -984,12 +982,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 false; } void ExcAutoFilterRecs::AddObjRecs() diff --git a/sc/source/filter/excel/exctools.cxx b/sc/source/filter/excel/exctools.cxx index 4797d4b71c7b..2b442a240bb8 100644 --- a/sc/source/filter/excel/exctools.cxx +++ b/sc/source/filter/excel/exctools.cxx @@ -161,7 +161,7 @@ void XclImpOutlineBuffer::MakeScOutline() else if (nFirstPos > 0) bCollapsed = maCollapsedPosSet.count(nFirstPos-1) > 0; - BOOL bDummy; + sal_Bool bDummy; mpOutlineArray->Insert(nFirstPos, nPos-1, bDummy, bCollapsed); } } @@ -193,8 +193,8 @@ ExcScenarioCell::ExcScenarioCell( const UINT16 nC, const UINT16 nR ) 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; @@ -217,8 +217,8 @@ ExcScenario::ExcScenario( XclImpStream& rIn, const RootData& rR ) else pComment = new String; - UINT16 n = nCref; - UINT16 nC, nR; + sal_uInt16 n = nCref; + sal_uInt16 nC, nR; while( n ) { rIn >> nR >> nC; @@ -245,16 +245,16 @@ ExcScenario::~ExcScenario() delete pUserName; } -void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast ) +void ExcScenario::Apply( const XclImpRoot& rRoot, const sal_Bool bLast ) { ScDocument& r = rRoot.GetDoc(); 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, true ); // do not show scenario frames r.SetScenarioData( nNewTab, *pComment, COL_LIGHTGRAY, /*SC_SCENARIO_SHOWFRAME|*/SC_SCENARIO_COPYALL|(nProtected ? SC_SCENARIO_PROTECT : 0) ); @@ -271,7 +271,7 @@ void ExcScenario::Apply( const XclImpRoot& rRoot, const BOOL bLast ) } if( bLast ) - r.SetActiveScenario( nNewTab, TRUE ); + r.SetActiveScenario( nNewTab, sal_True ); // modify what the Active tab is set to if the new // scenario tab occurs before the active tab. diff --git a/sc/source/filter/excel/expop2.cxx b/sc/source/filter/excel/expop2.cxx index 643b557300c6..f52c0d7feec2 100644 --- a/sc/source/filter/excel/expop2.cxx +++ b/sc/source/filter/excel/expop2.cxx @@ -98,7 +98,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 ) ) ); } @@ -119,7 +119,7 @@ FltError ExportBiff5::Write() if ( SvtFilterOptions::Get()->IsEnableCalcPreview() ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - pDocShell->GetPreviewMetaFile (sal_False); + pDocShell->GetPreviewMetaFile (false); uno::Sequence<sal_uInt8> metaFile( sfx2::convertMetaFile(pMetaFile.get())); sfx2::SaveOlePropertySet(xDocProps, xRootStrg, &metaFile); diff --git a/sc/source/filter/excel/fontbuff.cxx b/sc/source/filter/excel/fontbuff.cxx index 21f99163f52a..26db50f0166f 100644 --- a/sc/source/filter/excel/fontbuff.cxx +++ b/sc/source/filter/excel/fontbuff.cxx @@ -49,11 +49,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; @@ -94,7 +94,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 ) @@ -108,15 +108,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 26db049dfdb8..0b34736d8c8f 100644 --- a/sc/source/filter/excel/frmbase.cxx +++ b/sc/source/filter/excel/frmbase.cxx @@ -35,10 +35,10 @@ _ScRangeListTabs::_ScRangeListTabs() { 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 = false; pAct = NULL; nAct = 0; } @@ -47,7 +47,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 ]; @@ -58,7 +58,7 @@ _ScRangeListTabs::~_ScRangeListTabs() } -void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b ) +void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const sal_Bool b ) { if( b ) { @@ -76,7 +76,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b ) DBG_ASSERT( ValidTab(a.nTab), "-_ScRangeListTabs::Append(): Luegen haben kurze Abstuerze!" ); } - bHasRanges = TRUE; + bHasRanges = sal_True; if( nTab == SCTAB_MAX) return; @@ -94,7 +94,7 @@ void _ScRangeListTabs::Append( ScSingleRefData a, SCsTAB nTab, const BOOL b ) } } -void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const BOOL b ) +void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const sal_Bool b ) { if( b ) { @@ -140,7 +140,7 @@ void _ScRangeListTabs::Append( ScComplexRefData a, SCsTAB nTab, const BOOL b ) "+_ScRangeListTabs::Append(): 3D-Ranges werden in SC nicht unterstuetzt!" ); } - bHasRanges = TRUE; + bHasRanges = sal_True; if( nTab == SCTAB_MAX) return; @@ -188,7 +188,7 @@ const ScRange* _ScRangeListTabs::Next () return NULL; } -ConverterBase::ConverterBase( UINT16 nNewBuffer ) : +ConverterBase::ConverterBase( sal_uInt16 nNewBuffer ) : aEingPos( 0, 0, 0 ), eStatus( ConvOK ), nBufferSize( nNewBuffer ) @@ -212,7 +212,7 @@ void ConverterBase::Reset() -ExcelConverterBase::ExcelConverterBase( UINT16 nNewBuffer ) : +ExcelConverterBase::ExcelConverterBase( sal_uInt16 nNewBuffer ) : ConverterBase( nNewBuffer ) { } @@ -236,7 +236,7 @@ void ExcelConverterBase::Reset() -LotusConverterBase::LotusConverterBase( SvStream &rStr, UINT16 nNewBuffer ) : +LotusConverterBase::LotusConverterBase( SvStream &rStr, sal_uInt16 nNewBuffer ) : ConverterBase( nNewBuffer ), aIn( rStr ), nBytesLeft( 0 ) diff --git a/sc/source/filter/excel/impop.cxx b/sc/source/filter/excel/impop.cxx index 6267c64a2c3c..7f862721a3b2 100644 --- a/sc/source/filter/excel/impop.cxx +++ b/sc/source/filter/excel/impop.cxx @@ -89,7 +89,7 @@ #include "excimp8.hxx" #include "excform.hxx" -#if defined( WNT ) || defined( WIN ) +#if defined( WNT ) #include <math.h> #else #include <stdlib.h> @@ -147,7 +147,7 @@ ImportExcel::ImportExcel( XclImpRootData& rImpData, SvStream& rStrm ): // ab Biff8 pFormConv = pExcRoot->pFmlaConverter = new ExcelToSc( GetRoot() ); - bTabTruncated = FALSE; + bTabTruncated = false; // Excel-Dokument per Default auf 31.12.1899, entspricht Excel-Einstellungen mit 1.1.1900 ScDocOptions aOpt = pD->GetDocOptions(); @@ -156,9 +156,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( false ); // regular expressions? what's that? + aDocOpt.SetLookUpColRowNames( false ); // default: no natural language refs pD->SetDocOptions( aDocOpt ); } @@ -183,7 +183,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() ) { @@ -384,7 +384,7 @@ void ImportExcel::Window1() void ImportExcel::Row25( void ) { - UINT16 nRow, nRowHeight; + sal_uInt16 nRow, nRowHeight; aIn >> nRow; aIn.Ignore( 4 ); // Mic und Mac ueberspringen @@ -400,7 +400,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( 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( 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, 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 @@ -972,8 +972,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 ); @@ -1015,10 +1015,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; @@ -1029,50 +1029,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, false, + false, false ); aTabOpParam.aRefFormulaEnd.Set( static_cast<SCCOL>(nLastCol), - static_cast<SCROW>(nFirstRow - 1), nTab, FALSE, - FALSE, FALSE ); + static_cast<SCROW>(nFirstRow - 1), nTab, false, + false, false ); aTabOpParam.aRefColCell.Set( static_cast<SCCOL>(nInpCol), - static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow), nTab, false, false, + 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, false, false, + false ); aTabOpParam.aRefFormulaEnd.Set( static_cast<SCCOL>(nFirstCol - 1), - static_cast<SCROW>(nLastRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nLastRow), nTab, false, false, + false ); aTabOpParam.aRefRowCell.Set( static_cast<SCCOL>(nInpCol), - static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow), nTab, false, false, + 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, false, + false, false ); aTabOpParam.aRefRowCell.Set( static_cast<SCCOL>(nInpCol), - static_cast<SCROW>(nInpRow), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow), nTab, false, false, + false ); aTabOpParam.aRefColCell.Set( static_cast<SCCOL>(nInpCol2), - static_cast<SCROW>(nInpRow2), nTab, FALSE, FALSE, - FALSE ); + static_cast<SCROW>(nInpRow2), nTab, false, false, + false ); break; } @@ -1085,7 +1085,7 @@ void ImportExcel::TableOp( void ) } else { - bTabTruncated = TRUE; + bTabTruncated = sal_True; GetTracer().TraceInvalidRow(GetCurrScTab(), nLastRow, MAXROW); } } @@ -1112,7 +1112,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(); @@ -1176,7 +1176,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 ) ); } @@ -1259,7 +1259,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->HasActList(), @@ -1285,27 +1285,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->HasActList(), "-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 = false; } if( p->aStart.Row() == 0 && p->aEnd.Row() == MAXROW && bColVirgin ) { pD->SetRepeatColRange( n, p ); - bColVirgin = FALSE; + bColVirgin = false; } p = pExcRoot->pPrintTitles->Next(); @@ -1330,10 +1330,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 42ebd6d4c5a2..fe388a218e95 100644 --- a/sc/source/filter/excel/namebuff.cxx +++ b/sc/source/filter/excel/namebuff.cxx @@ -45,16 +45,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; } @@ -87,14 +87,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 @@ -128,15 +128,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()) @@ -146,8 +146,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 ); } @@ -181,7 +181,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 @@ -189,21 +189,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 ) @@ -213,8 +213,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; @@ -228,8 +228,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 @@ -242,11 +242,11 @@ BOOL ExtSheetBuffer::GetScTabIndex( UINT16 nExcIndex, UINT16& rScIndex ) } } - return FALSE; + return 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 ); @@ -254,11 +254,11 @@ BOOL ExtSheetBuffer::IsLink( const UINT16 nExcIndex ) const if( pRet ) return pRet->bLink; else - return FALSE; + return 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 ); @@ -267,10 +267,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 false; } @@ -289,13 +289,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; } @@ -314,7 +314,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 3e4227062863..07a8ba1aaf03 100644 --- a/sc/source/filter/excel/read.cxx +++ b/sc/source/filter/excel/read.cxx @@ -719,7 +719,7 @@ FltError ImportExcel::Read( void ) break; case Biff5V: default: - pD->SetVisible( GetCurrScTab(), FALSE ); + pD->SetVisible( GetCurrScTab(), false ); ePrev = eAkt; eAkt = Z_Biffn0; } @@ -779,7 +779,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; } @@ -1058,7 +1058,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(), false ); XclTools::SkipSubStream( maStrm ); IncCurrScTab(); } diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx index 3959019382b0..9c144b3d00e8 100644 --- a/sc/source/filter/excel/tokstack.cxx +++ b/sc/source/filter/excel/tokstack.cxx @@ -41,10 +41,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 ]; @@ -70,17 +70,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 @@ -95,7 +95,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; @@ -123,7 +123,7 @@ TokenPool::TokenPool( void ) TokenPool::~TokenPool() { - UINT16 n; + sal_uInt16 n; delete[] pP_Id; delete[] pElement; @@ -173,8 +173,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 ]; @@ -192,11 +192,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,8 +207,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 ]; @@ -226,11 +226,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; @@ -242,13 +242,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 ]; @@ -268,7 +268,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 ]; @@ -283,7 +283,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 ]; @@ -298,7 +298,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 ]; @@ -310,7 +310,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!?" ); @@ -334,7 +334,7 @@ void TokenPool::GetElement( const UINT16 nId ) case T_Err: break; case T_RefC: - pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (UINT16) nId ] ] ); + pScToken->AddSingleReference( *ppP_RefTr[ pElement[ (sal_uInt16) nId ] ] ); break; case T_RefA: { @@ -349,7 +349,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 ) @@ -363,7 +363,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 ) @@ -372,7 +372,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 ) @@ -381,7 +381,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]; @@ -390,7 +390,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]; @@ -399,7 +399,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]; @@ -414,7 +414,7 @@ void TokenPool::GetElement( const UINT16 nId ) } -void TokenPool::GetElementRek( const UINT16 nId ) +void TokenPool::GetElementRek( const sal_uInt16 nId ) { #ifdef DBG_UTIL nRek++; @@ -426,8 +426,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 ) @@ -461,7 +461,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 ) @@ -470,7 +470,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 ) @@ -479,7 +479,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 ) @@ -488,7 +488,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]; @@ -497,7 +497,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]; @@ -506,7 +506,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]; @@ -568,7 +568,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(); @@ -604,7 +604,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++; @@ -743,7 +743,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()); @@ -761,7 +761,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()); @@ -780,7 +780,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()); @@ -803,9 +803,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--; @@ -813,7 +813,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? @@ -822,13 +822,13 @@ BOOL TokenPool::IsSingleOp( const TokenId& rId, const DefTokenId eId ) const } } - return FALSE; + return 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--; diff --git a/sc/source/filter/excel/xechart.cxx b/sc/source/filter/excel/xechart.cxx index a5f47770e4a2..ebf622b080c5 100644 --- a/sc/source/filter/excel/xechart.cxx +++ b/sc/source/filter/excel/xechart.cxx @@ -38,9 +38,13 @@ #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart/ChartAxisLabelPosition.hpp> #include <com/sun/star/chart/ChartAxisPosition.hpp> +#include <com/sun/star/chart/ChartLegendExpansion.hpp> #include <com/sun/star/chart/DataLabelPlacement.hpp> #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <com/sun/star/chart/MissingValueTreatment.hpp> +#include <com/sun/star/chart/TimeInterval.hpp> +#include <com/sun/star/chart/TimeUnit.hpp> +#include <com/sun/star/chart/XAxisSupplier.hpp> #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart/XDiagramPositioning.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> @@ -56,9 +60,9 @@ #include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/DataPointGeometry3D.hpp> #include <com/sun/star/chart2/DataPointLabel.hpp> -#include <com/sun/star/chart2/LegendExpansion.hpp> #include <com/sun/star/chart2/LegendPosition.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> +#include <com/sun/star/chart2/RelativeSize.hpp> #include <com/sun/star/chart2/StackingDirection.hpp> #include <com/sun/star/chart2/TickmarkStyle.hpp> @@ -93,6 +97,7 @@ using ::com::sun::star::drawing::XShapes; using ::com::sun::star::chart2::IncrementData; using ::com::sun::star::chart2::RelativePosition; +using ::com::sun::star::chart2::RelativeSize; using ::com::sun::star::chart2::ScaleData; using ::com::sun::star::chart2::SubIncrement; using ::com::sun::star::chart2::XAxis; @@ -181,6 +186,56 @@ bool lclIsAutoAnyOrGetScaledValue( double& rfValue, const Any& rAny, bool bLogSc return bIsAuto; } +sal_uInt16 lclGetTimeValue( const XclExpRoot& rRoot, double fSerialDate, sal_uInt16 nTimeUnit ) +{ + DateTime aDateTime = rRoot.GetDateTimeFromDouble( fSerialDate ); + switch( nTimeUnit ) + { + case EXC_CHDATERANGE_DAYS: + return ::limit_cast< sal_uInt16, double >( fSerialDate, 0, SAL_MAX_UINT16 ); + case EXC_CHDATERANGE_MONTHS: + return ::limit_cast< sal_uInt16, sal_uInt16 >( 12 * (aDateTime.GetYear() - rRoot.GetBaseYear()) + aDateTime.GetMonth() - 1, 0, SAL_MAX_INT16 ); + case EXC_CHDATERANGE_YEARS: + return ::limit_cast< sal_uInt16, sal_uInt16 >( aDateTime.GetYear() - rRoot.GetBaseYear(), 0, SAL_MAX_INT16 ); + default: + OSL_ENSURE( false, "lclGetTimeValue - unexpected time unit" ); + } + return ::limit_cast< sal_uInt16, double >( fSerialDate, 0, SAL_MAX_UINT16 ); +} + +bool lclConvertTimeValue( const XclExpRoot& rRoot, sal_uInt16& rnValue, const Any& rAny, sal_uInt16 nTimeUnit ) +{ + double fSerialDate = 0; + bool bAuto = lclIsAutoAnyOrGetValue( fSerialDate, rAny ); + if( !bAuto ) + rnValue = lclGetTimeValue( rRoot, fSerialDate, nTimeUnit ); + return bAuto; +} + +sal_uInt16 lclGetTimeUnit( sal_Int32 nApiTimeUnit ) +{ + switch( nApiTimeUnit ) + { + case cssc::TimeUnit::DAY: return EXC_CHDATERANGE_DAYS; + case cssc::TimeUnit::MONTH: return EXC_CHDATERANGE_MONTHS; + case cssc::TimeUnit::YEAR: return EXC_CHDATERANGE_YEARS; + default: OSL_ENSURE( false, "lclGetTimeUnit - unexpected time unit" ); + } + return EXC_CHDATERANGE_DAYS; +} + +bool lclConvertTimeInterval( sal_uInt16 rnValue, sal_uInt16& rnTimeUnit, const Any& rAny ) +{ + cssc::TimeInterval aInterval; + bool bAuto = lclIsAutoAnyOrGetValue( aInterval, rAny ); + if( !bAuto ) + { + rnValue = ::limit_cast< sal_uInt16, sal_Int32 >( aInterval.Number, 1, SAL_MAX_UINT16 ); + rnTimeUnit = lclGetTimeUnit( aInterval.TimeUnit ); + } + return bAuto; +} + } // namespace // Common ===================================================================== @@ -769,6 +824,12 @@ void XclExpChFrame::Convert( const ScfPropertySet& rPropSet ) ConvertFrameBase( GetChRoot(), rPropSet, meObjType ); } +void XclExpChFrame::SetAutoFlags( bool bAutoPos, bool bAutoSize ) +{ + ::set_flag( maData.mnFlags, EXC_CHFRAME_AUTOPOS, bAutoPos ); + ::set_flag( maData.mnFlags, EXC_CHFRAME_AUTOSIZE, bAutoSize ); +} + bool XclExpChFrame::IsDefault() const { return IsDefaultFrameBase( GetFormatInfo( meObjType ).meDefFrameType ); @@ -1286,7 +1347,7 @@ bool XclExpChText::ConvertDataLabel( const ScfPropertySet& rPropSet, sal_uInt16 nLabelPos = EXC_CHTEXT_POS_AUTO; if( rPropSet.GetProperty( nPlacement, EXC_CHPROP_LABELPLACEMENT ) ) { - using namespace ::com::sun::star::chart::DataLabelPlacement; + using namespace cssc::DataLabelPlacement; if( nPlacement == rTypeInfo.mnDefaultLabelPos ) { nLabelPos = EXC_CHTEXT_POS_DEFAULT; @@ -1507,7 +1568,7 @@ void XclExpCh3dDataFormat::Convert( const ScfPropertySet& rPropSet ) sal_Int32 nApiType(0); if( rPropSet.GetProperty( nApiType, EXC_CHPROP_GEOMETRY3D ) ) { - using namespace ::com::sun::star::chart2::DataPointGeometry3D; + using namespace cssc2::DataPointGeometry3D; switch( nApiType ) { case CUBOID: @@ -2252,33 +2313,52 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) mxText.reset( new XclExpChText( GetChRoot() ) ); mxText->ConvertLegend( rPropSet ); - // legend position - Any aRelPosAny; + // legend position and size + Any aRelPosAny, aRelSizeAny; rPropSet.GetAnyProperty( aRelPosAny, EXC_CHPROP_RELATIVEPOSITION ); - if( aRelPosAny.has< RelativePosition >() ) + rPropSet.GetAnyProperty( aRelSizeAny, EXC_CHPROP_RELATIVESIZE ); + cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM; + rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION ); + if( aRelPosAny.has< RelativePosition >() || ((eApiExpand == cssc::ChartLegendExpansion_CUSTOM) && aRelSizeAny.has< RelativeSize >()) ) { try { - /* The 'RelativePosition' property is used as indicator of manually - changed legend position, but due to the different anchor modes - used by this property (in the RelativePosition.Anchor member) - it cannot be used to calculate the position easily. For this, - the Chart1 API will be used instead. */ - Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); + /* The 'RelativePosition' or 'RelativeSize' properties are used as + indicator of manually changed legend position/size, but due to + the different anchor modes used by this property (in the + RelativePosition.Anchor member) it cannot be used to calculate + the position easily. For this, the Chart1 API will be used + instead. */ + Reference< cssc::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); Reference< XShape > xChart1Legend( xChart1Doc->getLegend(), UNO_SET_THROW ); // coordinates in CHLEGEND record written but not used by Excel mxFramePos.reset( new XclExpChFramePos( EXC_CHFRAMEPOS_CHARTSIZE, EXC_CHFRAMEPOS_PARENT ) ); XclChFramePos& rFramePos = mxFramePos->GetFramePosData(); - rFramePos.maRect.mnX = maData.maRect.mnX = CalcChartXFromHmm( xChart1Legend->getPosition().X ); - rFramePos.maRect.mnY = maData.maRect.mnY = CalcChartYFromHmm( xChart1Legend->getPosition().Y ); + rFramePos.mnTLMode = EXC_CHFRAMEPOS_CHARTSIZE; + ::com::sun::star::awt::Point aLegendPos = xChart1Legend->getPosition(); + rFramePos.maRect.mnX = maData.maRect.mnX = CalcChartXFromHmm( aLegendPos.X ); + rFramePos.maRect.mnY = maData.maRect.mnY = CalcChartYFromHmm( aLegendPos.Y ); + // legend size, Excel expects points in CHFRAMEPOS record + rFramePos.mnBRMode = EXC_CHFRAMEPOS_ABSSIZE_POINTS; + ::com::sun::star::awt::Size aLegendSize = xChart1Legend->getSize(); + rFramePos.maRect.mnWidth = static_cast< sal_uInt16 >( aLegendSize.Width * EXC_POINTS_PER_HMM + 0.5 ); + rFramePos.maRect.mnHeight = static_cast< sal_uInt16 >( aLegendSize.Height * EXC_POINTS_PER_HMM + 0.5 ); + maData.maRect.mnWidth = CalcChartXFromHmm( aLegendSize.Width ); + maData.maRect.mnHeight = CalcChartYFromHmm( aLegendSize.Height ); + eApiExpand = cssc::ChartLegendExpansion_CUSTOM; // manual legend position implies manual plot area GetChartData().SetManualPlotArea(); maData.mnDockMode = EXC_CHLEGEND_NOTDOCKED; + // a CHFRAME record with cleared auto flags is needed + if( !mxFrame ) + mxFrame.reset( new XclExpChFrame( GetChRoot(), EXC_CHOBJTYPE_LEGEND ) ); + mxFrame->SetAutoFlags( false, false ); } catch( Exception& ) { OSL_ENSURE( false, "XclExpChLegend::Convert - cannot get legend shape" ); maData.mnDockMode = EXC_CHLEGEND_RIGHT; + eApiExpand = cssc::ChartLegendExpansion_HIGH; } } else @@ -2294,13 +2374,10 @@ void XclExpChLegend::Convert( const ScfPropertySet& rPropSet ) default: OSL_ENSURE( false, "XclExpChLegend::Convert - unrecognized legend position" ); maData.mnDockMode = EXC_CHLEGEND_RIGHT; + eApiExpand = cssc::ChartLegendExpansion_HIGH; } } - - // legend expansion - cssc2::LegendExpansion eApiExpand = cssc2::LegendExpansion_BALANCED; - rPropSet.GetProperty( eApiExpand, EXC_CHPROP_EXPANSION ); - ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand != cssc2::LegendExpansion_WIDE ); + ::set_flag( maData.mnFlags, EXC_CHLEGEND_STACKED, eApiExpand == cssc::ChartLegendExpansion_HIGH ); // other flags ::set_flag( maData.mnFlags, EXC_CHLEGEND_AUTOSERIES ); @@ -2366,9 +2443,9 @@ void XclExpChTypeGroup::ConvertType( // spline - TODO: get from single series (#i66858#) ScfPropertySet aTypeProp( xChartType ); - ::com::sun::star::chart2::CurveStyle eCurveStyle; + cssc2::CurveStyle eCurveStyle; bool bSpline = aTypeProp.GetProperty( eCurveStyle, EXC_CHPROP_CURVESTYLE ) && - (eCurveStyle != ::com::sun::star::chart2::CurveStyle_LINES); + (eCurveStyle != cssc2::CurveStyle_LINES); // extended type info maTypeInfo.Set( maType.GetTypeInfo(), b3dChart, bSpline ); @@ -2568,16 +2645,53 @@ XclExpChLabelRange::XclExpChLabelRange( const XclExpChRoot& rRoot ) : { } -void XclExpChLabelRange::Convert( const ScaleData& rScaleData, bool bMirrorOrient ) +void XclExpChLabelRange::Convert( const ScaleData& rScaleData, const ScfPropertySet& rChart1Axis, bool bMirrorOrient ) { + /* Base time unit (using the property 'ExplicitTimeIncrement' from the old + chart API allows to detect axis type (date axis, if property exists), + and to receive the base time unit currently used in case the base time + unit is set to 'automatic'. */ + cssc::TimeIncrement aTimeIncrement; + if( rChart1Axis.GetProperty( aTimeIncrement, EXC_CHPROP_EXPTIMEINCREMENT ) ) + { + // property exists -> this is a date axis currently + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS ); + + // automatic base time unit, if the UNO Any 'rScaleData.TimeIncrement.TimeResolution' does not contain a valid value... + bool bAutoBase = !rScaleData.TimeIncrement.TimeResolution.has< cssc::TimeIncrement >(); + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOBASE, bAutoBase ); + + // ...but get the current base time unit from the property of the old chart API + sal_Int32 nApiTimeUnit = 0; + bool bValidBaseUnit = aTimeIncrement.TimeResolution >>= nApiTimeUnit; + DBG_ASSERT( bValidBaseUnit, "XclExpChLabelRange::Convert - cannot ghet base time unit" ); + maDateData.mnBaseUnit = bValidBaseUnit ? lclGetTimeUnit( nApiTimeUnit ) : EXC_CHDATERANGE_DAYS; + + /* Min/max values depend on base time unit, they specify the number of + days, months, or years starting from null date. */ + bool bAutoMin = lclConvertTimeValue( GetRoot(), maDateData.mnMinDate, rScaleData.Minimum, maDateData.mnBaseUnit ); + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMIN, bAutoMin ); + bool bAutoMax = lclConvertTimeValue( GetRoot(), maDateData.mnMaxDate, rScaleData.Maximum, maDateData.mnBaseUnit ); + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAX, bAutoMax ); + } + + // automatic axis type detection + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTODATE, rScaleData.AutoDateAxis ); + + // increment + bool bAutoMajor = lclConvertTimeInterval( maDateData.mnMajorStep, maDateData.mnMajorUnit, rScaleData.TimeIncrement.MajorTimeInterval ); + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAJOR, bAutoMajor ); + bool bAutoMinor = lclConvertTimeInterval( maDateData.mnMinorStep, maDateData.mnMinorUnit, rScaleData.TimeIncrement.MinorTimeInterval ); + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMINOR, bAutoMinor ); + // origin double fOrigin = 0.0; if( !lclIsAutoAnyOrGetValue( fOrigin, rScaleData.Origin ) ) - maData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 31999 ); + maLabelData.mnCross = limit_cast< sal_uInt16 >( fOrigin, 1, 31999 ); // reverse order - if( (rScaleData.Orientation == ::com::sun::star::chart2::AxisOrientation_REVERSE) != bMirrorOrient ) - ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE ); + if( (rScaleData.Orientation == cssc2::AxisOrientation_REVERSE) != bMirrorOrient ) + ::set_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_REVERSE ); } void XclExpChLabelRange::ConvertAxisPosition( const ScfPropertySet& rPropSet ) @@ -2586,19 +2700,55 @@ void XclExpChLabelRange::ConvertAxisPosition( const ScfPropertySet& rPropSet ) rPropSet.GetProperty( eAxisPos, EXC_CHPROP_CROSSOVERPOSITION ); double fCrossingPos = 1.0; rPropSet.GetProperty( fCrossingPos, EXC_CHPROP_CROSSOVERVALUE ); + + bool bDateAxis = ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS ); switch( eAxisPos ) { - case cssc::ChartAxisPosition_ZERO: maData.mnCross = 1; break; - case cssc::ChartAxisPosition_START: maData.mnCross = 1; break; - case cssc::ChartAxisPosition_END: ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_MAXCROSS ); break; - case cssc::ChartAxisPosition_VALUE: maData.mnCross = limit_cast< sal_uInt16 >( fCrossingPos, 1, 31999 ); break; - default: maData.mnCross = 1; + case cssc::ChartAxisPosition_ZERO: + case cssc::ChartAxisPosition_START: + maLabelData.mnCross = 1; + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS ); + break; + case cssc::ChartAxisPosition_END: + ::set_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_MAXCROSS ); + break; + case cssc::ChartAxisPosition_VALUE: + maLabelData.mnCross = limit_cast< sal_uInt16 >( fCrossingPos, 1, 31999 ); + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS, false ); + if( bDateAxis ) + maDateData.mnCross = lclGetTimeValue( GetRoot(), fCrossingPos, maDateData.mnBaseUnit ); + break; + default: + maLabelData.mnCross = 1; + ::set_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS ); + } +} + +void XclExpChLabelRange::Save( XclExpStream& rStrm ) +{ + // the CHLABELRANGE record + XclExpRecord::Save( rStrm ); + + // the CHDATERANGE record with date axis settings (BIFF8 only) + if( GetBiff() == EXC_BIFF8 ) + { + rStrm.StartRecord( EXC_ID_CHDATERANGE, 18 ); + rStrm << maDateData.mnMinDate + << maDateData.mnMaxDate + << maDateData.mnMajorStep + << maDateData.mnMajorUnit + << maDateData.mnMinorStep + << maDateData.mnMinorUnit + << maDateData.mnBaseUnit + << maDateData.mnCross + << maDateData.mnFlags; + rStrm.EndRecord(); } } void XclExpChLabelRange::WriteBody( XclExpStream& rStrm ) { - rStrm << maData.mnCross << maData.mnLabelFreq << maData.mnTickFreq << maData.mnFlags; + rStrm << maLabelData.mnCross << maLabelData.mnLabelFreq << maLabelData.mnTickFreq << maLabelData.mnFlags; } // ---------------------------------------------------------------------------- @@ -2683,7 +2833,7 @@ namespace { sal_uInt8 lclGetXclTickPos( sal_Int32 nApiTickmarks ) { - using namespace ::com::sun::star::chart2::TickmarkStyle; + using namespace cssc2::TickmarkStyle; sal_uInt8 nXclTickPos = 0; ::set_flag( nXclTickPos, EXC_CHTICK_INSIDE, ::get_flag( nApiTickmarks, INNER ) ); ::set_flag( nXclTickPos, EXC_CHTICK_OUTSIDE, ::get_flag( nApiTickmarks, OUTER ) ); @@ -2786,6 +2936,30 @@ Reference< XAxis > lclGetApiAxis( Reference< XCoordinateSystem > xCoordSystem, return xAxis; } +Reference< cssc::XAxis > lclGetApiChart1Axis( Reference< XChartDocument > xChartDoc, + sal_Int32 nApiAxisDim, sal_Int32 nApiAxesSetIdx ) +{ + Reference< cssc::XAxis > xChart1Axis; + try + { + Reference< cssc::XChartDocument > xChart1Doc( xChartDoc, UNO_QUERY_THROW ); + Reference< cssc::XAxisSupplier > xChart1AxisSupp( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); + switch( nApiAxesSetIdx ) + { + case EXC_CHART_AXESSET_PRIMARY: + xChart1Axis = xChart1AxisSupp->getAxis( nApiAxisDim ); + break; + case EXC_CHART_AXESSET_SECONDARY: + xChart1Axis = xChart1AxisSupp->getSecondaryAxis( nApiAxisDim ); + break; + } + } + catch( Exception& ) + { + } + return xChart1Axis; +} + } // namespace XclExpChAxis::XclExpChAxis( const XclExpChRoot& rRoot, sal_uInt16 nAxisType ) : @@ -2808,7 +2982,8 @@ void XclExpChAxis::SetRotation( sal_uInt16 nRotation ) mxTick->SetRotation( nRotation ); } -void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis, const XclChExtTypeInfo& rTypeInfo ) +void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossingAxis, + Reference< cssc::XAxis > xChart1Axis, const XclChExtTypeInfo& rTypeInfo ) { ScfPropertySet aAxisProp( xAxis ); bool bCategoryAxis = ((GetAxisType() == EXC_CHAXIS_X) && rTypeInfo.mbCategoryAxis) || (GetAxisType() == EXC_CHAXIS_Z); @@ -2828,8 +3003,11 @@ void XclExpChAxis::Convert( Reference< XAxis > xAxis, Reference< XAxis > xCrossi mxLabelRange.reset( new XclExpChLabelRange( GetChRoot() ) ); mxLabelRange->SetTicksBetweenCateg( rTypeInfo.mbTicksBetweenCateg ); if( xAxis.is() ) + { + ScfPropertySet aChart1AxisProp( xChart1Axis ); // #i71684# radar charts have reversed rotation direction - mxLabelRange->Convert( xAxis->getScaleData(), (GetAxisType() == EXC_CHAXIS_X) && (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR) ); + mxLabelRange->Convert( xAxis->getScaleData(), aChart1AxisProp, (GetAxisType() == EXC_CHAXIS_X) && (rTypeInfo.meTypeCateg == EXC_CHTYPECATEG_RADAR) ); + } // get position of crossing axis on this axis from passed axis object if( aCrossingProp.Is() ) mxLabelRange->ConvertAxisPosition( aCrossingProp ); @@ -2957,7 +3135,7 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16 bool b3dChart = xCoordSystem.is() && (xCoordSystem->getDimension() == 3); // percent charts - namespace ApiAxisType = ::com::sun::star::chart2::AxisType; + namespace ApiAxisType = cssc2::AxisType; Reference< XAxis > xApiYAxis = lclGetApiAxis( xCoordSystem, EXC_CHART_AXIS_Y, nApiAxesSetIdx ); bool bPercent = xApiYAxis.is() && (xApiYAxis->getScaleData().AxisType == ApiAxisType::PERCENT); @@ -3064,8 +3242,8 @@ sal_uInt16 XclExpChAxesSet::Convert( Reference< XDiagram > xDiagram, sal_uInt16 // inner and outer plot area position and size try { - Reference< ::com::sun::star::chart::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); - Reference< ::com::sun::star::chart::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); + Reference< cssc::XChartDocument > xChart1Doc( GetChartDocument(), UNO_QUERY_THROW ); + Reference< cssc::XDiagramPositioning > xPositioning( xChart1Doc->getDiagram(), UNO_QUERY_THROW ); // set manual flag in chart data if( !xPositioning->isAutomaticDiagramPositioning() ) GetChartData().SetManualPlotArea(); @@ -3132,7 +3310,8 @@ void XclExpChAxesSet::ConvertAxis( sal_Int32 nApiAxesSetIdx = GetApiAxesSetIndex(); Reference< XAxis > xAxis = lclGetApiAxis( xCoordSystem, nApiAxisDim, nApiAxesSetIdx ); Reference< XAxis > xCrossingAxis = lclGetApiAxis( xCoordSystem, nCrossingAxisDim, nApiAxesSetIdx ); - rxChAxis->Convert( xAxis, xCrossingAxis, rTypeInfo ); + Reference< cssc::XAxis > xChart1Axis = lclGetApiChart1Axis( GetChartDocument(), nApiAxisDim, nApiAxesSetIdx ); + rxChAxis->Convert( xAxis, xCrossingAxis, xChart1Axis, rTypeInfo ); // create and convert axis title Reference< XTitled > xTitled( xAxis, UNO_QUERY ); @@ -3215,7 +3394,7 @@ XclExpChChart::XclExpChChart( const XclExpRoot& rRoot, sal_Int32 nMissingValues = 0; if( aDiaProp.GetProperty( nMissingValues, EXC_CHPROP_MISSINGVALUETREATMENT ) ) { - using namespace ::com::sun::star::chart::MissingValueTreatment; + using namespace cssc::MissingValueTreatment; switch( nMissingValues ) { case LEAVE_GAP: maProps.mnEmptyMode = EXC_CHPROPS_EMPTY_SKIP; break; diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx index aecf72da0937..b25cc7f20b1e 100644 --- a/sc/source/filter/excel/xecontent.cxx +++ b/sc/source/filter/excel/xecontent.cxx @@ -56,7 +56,7 @@ #include "xestyle.hxx" #include "xename.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; @@ -853,7 +853,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 ); @@ -996,7 +996,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 ), @@ -1006,7 +1006,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 @@ -1018,7 +1018,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 @@ -1222,7 +1222,7 @@ XclExpDval::~XclExpDval() { } -void XclExpDval::InsertCellRange( const ScRange& rRange, ULONG nScHandle ) +void XclExpDval::InsertCellRange( const ScRange& rRange, sal_uLong nScHandle ) { if( GetBiff() == EXC_BIFF8 ) { @@ -1267,7 +1267,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) ) @@ -1280,7 +1280,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 e26a0b3e630c..c7cfe136bff2 100644 --- a/sc/source/filter/excel/xeescher.cxx +++ b/sc/source/filter/excel/xeescher.cxx @@ -531,10 +531,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( false ); + SetAutoLine( false ); // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); @@ -553,7 +553,7 @@ XclExpOcxControlObj::XclExpOcxControlObj( XclExpObjectManager& rObjMgr, Referenc // meta file //! TODO - needs check Reference< XPropertySet > xShapePS( xShape, UNO_QUERY ); - if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, CREATE_STRING( "MetaFile" ), sal_False ) ) + if( xShapePS.is() && aPropOpt.CreateGraphicProperties( xShapePS, CREATE_STRING( "MetaFile" ), false ) ) { sal_uInt32 nBlipId; if( aPropOpt.GetOpt( ESCHER_Prop_pib, nBlipId ) ) @@ -675,10 +675,10 @@ XclExpTbxControlObj::XclExpTbxControlObj( XclExpObjectManager& rRoot, Reference< return; // OBJ record flags - SetLocked( TRUE ); + SetLocked( sal_True ); SetPrintable( aCtrlProp.GetBoolProperty( CREATE_OUSTRING( "Printable" ) ) ); - SetAutoFill( FALSE ); - SetAutoLine( FALSE ); + SetAutoFill( false ); + SetAutoLine( false ); // fill DFF property set mrEscherEx.OpenContainer( ESCHER_SpContainer ); @@ -1256,7 +1256,7 @@ XclExpNote::XclExpNote( const XclExpRoot& rRoot, const ScAddress& rScPos, // AutoFill style would change if Postit.cxx object creation values are changed OUString aCol(((XFillColorItem &)GETITEM(aItemSet, XFillColorItem , XATTR_FILLCOLOR)).GetValue()); - mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, ULONG) == XFILL_SOLID); + mbAutoFill = !aCol.getLength() && (GETITEMVALUE(aItemSet, XFillStyleItem, XATTR_FILLSTYLE, sal_uLong) == XFILL_SOLID); mbAutoLine = true; mbRowHidden = (rRoot.GetDoc().RowHidden(maScPos.Row(),maScPos.Tab())); mbColHidden = (rRoot.GetDoc().ColHidden(maScPos.Col(),maScPos.Tab())); diff --git a/sc/source/filter/excel/xeformula.cxx b/sc/source/filter/excel/xeformula.cxx index 4373cff8edac..4d40aaf1d206 100644 --- a/sc/source/filter/excel/xeformula.cxx +++ b/sc/source/filter/excel/xeformula.cxx @@ -521,7 +521,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!) @@ -1319,7 +1319,7 @@ void XclExpFmlaCompImpl::ProcessMatrix( const XclExpScToken& rTokData ) AppendExt( static_cast< sal_uInt8 >( nMatVal.GetBoolean() ? 1 : 0 ) ); AppendExt( 0, 7 ); } - else if( USHORT nErr = nMatVal.GetError() ) + else if( sal_uInt16 nErr = nMatVal.GetError() ) { AppendExt( EXC_CACHEDVAL_ERROR ); AppendExt( XclTools::GetXclErrorCode( nErr ) ); @@ -1744,7 +1744,11 @@ void XclExpFmlaCompImpl::AppendTrailingParam( XclExpFuncData& rFuncData ) break; - default:; + default: + // #i108420# function without parameters stored as macro call needs the external name reference + if( (nParamCount == 0) && rFuncData.IsMacroFunc() ) + AppendDefaultParam( rFuncData ); + } } @@ -1808,7 +1812,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 @@ -1816,7 +1820,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 @@ -1984,7 +1988,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 ); @@ -2020,7 +2024,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 ); @@ -2079,7 +2083,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() ) @@ -2519,11 +2523,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; } } diff --git a/sc/source/filter/excel/xehelper.cxx b/sc/source/filter/excel/xehelper.cxx index 93eb4e54cb63..90743a7ffb28 100644 --- a/sc/source/filter/excel/xehelper.cxx +++ b/sc/source/filter/excel/xehelper.cxx @@ -479,7 +479,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, false, &pItem ) == SFX_ITEM_SET ) { const SvxFieldData* pField = static_cast< const SvxFieldItem* >( pItem )->GetField(); if( const SvxURLField* pUrlField = PTR_CAST( SvxURLField, pField ) ) @@ -592,8 +592,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() ); @@ -622,8 +622,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 ); @@ -650,8 +650,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 ); @@ -710,8 +710,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 @@ -832,7 +832,7 @@ void XclExpHFConverter::AppendPortion( const EditTextObject* pTextObj, sal_Unico const SfxPoolItem* pItem; if( (aSel.nStartPos + 1 == aSel.nEndPos) && // fields are single characters - (aEditSet.GetItemState( EE_FEATURE_FIELD, sal_False, &pItem ) == SFX_ITEM_SET) ) + (aEditSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_SET) ) { if( const SvxFieldData* pFieldData = static_cast< const SvxFieldItem* >( pItem )->GetField() ) { @@ -931,7 +931,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 ); @@ -1106,7 +1106,7 @@ void XclExpCachedMatrix::Save( XclExpStream& rStrm ) const rStrm << EXC_CACHEDVAL_BOOL << nBool; rStrm.WriteZeroBytes( 7 ); } - else if( USHORT nScError = nMatVal.GetError() ) + else if( sal_uInt16 nScError = nMatVal.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 39396179f8d8..43f8342bf815 100644 --- a/sc/source/filter/excel/xelink.cxx +++ b/sc/source/filter/excel/xelink.cxx @@ -1063,7 +1063,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 @@ -1157,7 +1157,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 @@ -1278,7 +1278,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 ae95b6a0725a..9bd32dc63fd4 100644 --- a/sc/source/filter/excel/xename.cxx +++ b/sc/source/filter/excel/xename.cxx @@ -42,9 +42,10 @@ // for filter manager #include "excrecds.hxx" -#include <oox/core/tokens.hxx> #include <formula/grammar.hxx> +using namespace ::oox; + using ::rtl::OString; // ============================================================================ @@ -136,9 +137,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 +166,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 +379,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 +388,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 +483,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 +629,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 @@ -684,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" ); @@ -711,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/xepage.cxx b/sc/source/filter/excel/xepage.cxx index 4d3f3dae9d9e..47396d620e41 100644 --- a/sc/source/filter/excel/xepage.cxx +++ b/sc/source/filter/excel/xepage.cxx @@ -49,7 +49,7 @@ #include <set> #include <limits> -#include <oox/core/tokens.hxx> +using namespace ::oox; using ::rtl::OString; using ::std::set; diff --git a/sc/source/filter/excel/xepivot.cxx b/sc/source/filter/excel/xepivot.cxx index 56c98a199f9a..069c9a7719e6 100644 --- a/sc/source/filter/excel/xepivot.cxx +++ b/sc/source/filter/excel/xepivot.cxx @@ -52,7 +52,7 @@ #include "xestring.hxx" #include "xelink.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; using ::com::sun::star::sheet::DataPilotFieldOrientation; using ::com::sun::star::sheet::DataPilotFieldOrientation_HIDDEN; @@ -938,7 +938,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 ) { diff --git a/sc/source/filter/excel/xerecord.cxx b/sc/source/filter/excel/xerecord.cxx index f02e2db82fc1..f210efd1a4a1 100644 --- a/sc/source/filter/excel/xerecord.cxx +++ b/sc/source/filter/excel/xerecord.cxx @@ -31,7 +31,7 @@ #include "xerecord.hxx" #include "xeroot.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; // Base classes to export Excel records ======================================= diff --git a/sc/source/filter/excel/xeroot.cxx b/sc/source/filter/excel/xeroot.cxx index 4b6169ceb20a..d72f9c77d61d 100644 --- a/sc/source/filter/excel/xeroot.cxx +++ b/sc/source/filter/excel/xeroot.cxx @@ -29,7 +29,10 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" +#include <rtl/random.h> #include <sfx2/docfile.hxx> +#include <sfx2/request.hxx> +#include <sfx2/frame.hxx> #include <sfx2/sfxsids.hrc> #include <unotools/saveopt.hxx> #include <svl/itemset.hxx> @@ -52,6 +55,8 @@ #include "document.hxx" #include "scextopt.hxx" +using namespace ::com::sun::star; + // Global data ================================================================ XclExpRootData::XclExpRootData( XclBiff eBiff, SfxMedium& rMedium, @@ -242,23 +247,66 @@ bool XclExpRoot::IsDocumentEncrypted() const if (pDocProt && pDocProt->isProtected() && pDocProt->isOptionEnabled(ScDocProtection::STRUCTURE)) return true; - if (GetPassword().Len() > 0) + if ( GetEncryptionData().getLength() > 0 ) // Password is entered directly into the save dialog. return true; return false; } -String XclExpRoot::GetPassword() const +uno::Sequence< beans::NamedValue > XclExpRoot::GenerateEncryptionData( const ::rtl::OUString& aPass ) const { - if( SfxItemSet* pItemSet = GetMedium().GetItemSet() ) + uno::Sequence< beans::NamedValue > aEncryptionData; + + if ( aPass.getLength() > 0 && aPass.getLength() < 16 ) { - const SfxPoolItem* pItem = 0; - if( pItemSet->GetItemState( SID_PASSWORD, TRUE, &pItem ) == SFX_ITEM_SET ) - if( const SfxStringItem* pStrItem = dynamic_cast< const SfxStringItem* >( pItem ) ) - return pStrItem->GetValue(); + TimeValue aTime; + osl_getSystemTime( &aTime ); + rtlRandomPool aRandomPool = rtl_random_createPool (); + rtl_random_addBytes ( aRandomPool, &aTime, 8 ); + + sal_uInt8 pnDocId[16]; + rtl_random_getBytes( aRandomPool, pnDocId, 16 ); + + rtl_random_destroyPool( aRandomPool ); + + sal_uInt16 pnPasswd[16]; + memset( pnPasswd, 0, sizeof( pnPasswd ) ); + for (xub_StrLen nChar = 0; nChar < aPass.getLength(); ++nChar ) + pnPasswd[nChar] = aPass.getStr()[nChar]; + + ::msfilter::MSCodec_Std97 aCodec; + aCodec.InitKey( pnPasswd, pnDocId ); + aEncryptionData = aCodec.GetEncryptionData(); } - return String::EmptyString(); + + return aEncryptionData; +} + +uno::Sequence< beans::NamedValue > XclExpRoot::GetEncryptionData() const +{ + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( GetMedium().GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false ); + if ( pEncryptionDataItem ) + pEncryptionDataItem->GetValue() >>= aEncryptionData; + else + { + // try to get the encryption data from the password + SFX_ITEMSET_ARG( GetMedium().GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false ); + if ( pPasswordItem && pPasswordItem->GetValue().Len() ) + aEncryptionData = GenerateEncryptionData( pPasswordItem->GetValue() ); + } + + return aEncryptionData; +} + +uno::Sequence< beans::NamedValue > XclExpRoot::GenerateDefaultEncryptionData() const +{ + uno::Sequence< beans::NamedValue > aEncryptionData; + if ( GetDefaultPassword().Len() > 0 ) + aEncryptionData = GenerateEncryptionData( GetDefaultPassword() ); + + return aEncryptionData; } XclExpRootData::XclExpLinkMgrRef XclExpRoot::GetLocalLinkMgrRef() const diff --git a/sc/source/filter/excel/xestream.cxx b/sc/source/filter/excel/xestream.cxx index e1e44a52b7cc..d8fe4bed9234 100644 --- a/sc/source/filter/excel/xestream.cxx +++ b/sc/source/filter/excel/xestream.cxx @@ -33,6 +33,8 @@ #include <utility> #include <rtl/ustring.hxx> +#include <rtl/ustrbuf.hxx> +#include <rtl/random.h> #include <sax/fshelper.hxx> #include <unotools/streamwrap.hxx> @@ -78,10 +80,17 @@ using ::com::sun::star::uno::UNO_QUERY; using ::com::sun::star::uno::XInterface; using ::rtl::OString; using ::rtl::OUString; +using ::rtl::OUStringBuffer; using ::utl::OStreamWrapper; using ::std::vector; -using namespace formula; +using namespace ::com::sun::star::beans; +using namespace ::com::sun::star::io; +using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::sheet; +using namespace ::com::sun::star::uno; +using namespace ::formula; +using namespace ::oox; // ============================================================================ @@ -473,17 +482,16 @@ void XclExpStream::WriteRawZeroBytes( sal_Size nBytes ) // ============================================================================ -XclExpBiff8Encrypter::XclExpBiff8Encrypter( const XclExpRoot& rRoot, const sal_uInt8 nDocId[16], - const sal_uInt8 nSalt[16] ) : +XclExpBiff8Encrypter::XclExpBiff8Encrypter( const XclExpRoot& rRoot ) : mrRoot(rRoot), mnOldPos(STREAM_SEEK_TO_END), mbValid(false) { - String aPass = rRoot.GetPassword(); - if (aPass.Len() == 0) + Sequence< NamedValue > aEncryptionData = rRoot.GetEncryptionData(); + if( !aEncryptionData.hasElements() ) // Empty password. Get the default biff8 password. - aPass = rRoot.GetDefaultPassword(); - Init(aPass, nDocId, nSalt); + aEncryptionData = rRoot.GenerateDefaultEncryptionData(); + Init( aEncryptionData ); } XclExpBiff8Encrypter::~XclExpBiff8Encrypter() @@ -495,9 +503,22 @@ bool XclExpBiff8Encrypter::IsValid() const return mbValid; } -void XclExpBiff8Encrypter::GetSaltDigest( sal_uInt8 nSaltDigest[16] ) const +void XclExpBiff8Encrypter::GetSaltDigest( sal_uInt8 pnSaltDigest[16] ) const { - memcpy(nSaltDigest, mnSaltDigest, 16); + if ( sizeof( mpnSaltDigest ) == 16 ) + memcpy( pnSaltDigest, mpnSaltDigest, 16 ); +} + +void XclExpBiff8Encrypter::GetSalt( sal_uInt8 pnSalt[16] ) const +{ + if ( sizeof( mpnSalt ) == 16 ) + memcpy( pnSalt, mpnSalt, 16 ); +} + +void XclExpBiff8Encrypter::GetDocId( sal_uInt8 pnDocId[16] ) const +{ + if ( sizeof( mpnDocId ) == 16 ) + memcpy( pnDocId, mpnDocId, 16 ); } void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_uInt8 nData ) @@ -554,46 +575,42 @@ void XclExpBiff8Encrypter::Encrypt( SvStream& rStrm, sal_Int32 nData ) Encrypt(rStrm, static_cast<sal_uInt32>(nData)); } -void XclExpBiff8Encrypter::Init( const String& aPass, const sal_uInt8 nDocId[16], - const sal_uInt8 nSalt[16] ) +void XclExpBiff8Encrypter::Init( const Sequence< NamedValue >& rEncryptionData ) { - memset(mnSaltDigest, 0, sizeof(mnSaltDigest)); + mbValid = false; - xub_StrLen nLen = aPass.Len(); - bool bValid = (0 < nLen) && (nLen < 16); - if ( bValid ) + if( maCodec.InitCodec( rEncryptionData ) ) { - // transform String to sal_uInt16 array - memset(mnPassw, 0, sizeof(mnPassw)); - for (xub_StrLen nChar = 0; nChar < nLen; ++nChar) - mnPassw[nChar] = static_cast<sal_uInt16>(aPass.GetChar(nChar)); + maCodec.GetDocId( mpnDocId ); - // copy document ID - memcpy(mnDocId, nDocId, sizeof(mnDocId)); + // generate the salt here + TimeValue aTime; + osl_getSystemTime( &aTime ); + rtlRandomPool aRandomPool = rtl_random_createPool (); + rtl_random_addBytes( aRandomPool, &aTime, 8 ); + rtl_random_getBytes( aRandomPool, mpnSalt, 16 ); + rtl_random_destroyPool( aRandomPool ); - // init codec - maCodec.InitKey(mnPassw, mnDocId); + memset( mpnSaltDigest, 0, sizeof( mpnSaltDigest ) ); // generate salt hash. ::msfilter::MSCodec_Std97 aCodec; - aCodec.InitKey(mnPassw, mnDocId); - aCodec.CreateSaltDigest(nSalt, mnSaltDigest); + aCodec.InitCodec( rEncryptionData ); + aCodec.CreateSaltDigest( mpnSalt, mpnSaltDigest ); // verify to make sure it's in good shape. - bValid = maCodec.VerifyKey(nSalt, mnSaltDigest); + mbValid = maCodec.VerifyKey( mpnSalt, mpnSaltDigest ); } - - mbValid = bValid; } sal_uInt32 XclExpBiff8Encrypter::GetBlockPos( sal_Size nStrmPos ) const { - return static_cast<sal_uInt32>(nStrmPos / EXC_ENCR_BLOCKSIZE); + return static_cast< sal_uInt32 >( nStrmPos / EXC_ENCR_BLOCKSIZE ); } sal_uInt16 XclExpBiff8Encrypter::GetOffsetInBlock( sal_Size nStrmPos ) const { - return static_cast<sal_uInt16>(nStrmPos % EXC_ENCR_BLOCKSIZE); + return static_cast< sal_uInt16 >( nStrmPos % EXC_ENCR_BLOCKSIZE ); } void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBytes ) @@ -660,7 +677,7 @@ void XclExpBiff8Encrypter::EncryptBytes( SvStream& rStrm, vector<sal_uInt8>& aBy mnOldPos = nStrmPos; } -static const char* lcl_GetErrorString( USHORT nScErrCode ) +static const char* lcl_GetErrorString( sal_uInt16 nScErrCode ) { sal_uInt8 nXclErrCode = XclTools::GetXclErrorCode( nScErrCode ); switch( nXclErrCode ) @@ -683,7 +700,7 @@ void XclXmlUtils::GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& rsT case NUMBERFORMAT_NUMBER: { // either value or error code - USHORT nScErrCode = rCell.GetErrCode(); + sal_uInt16 nScErrCode = rCell.GetErrCode(); if( nScErrCode ) { rsType = "e"; @@ -726,7 +743,7 @@ void XclXmlUtils::GetFormulaTypeAndValue( ScFormulaCell& rCell, const char*& rsT rtl::OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sStream, sal_Int32 nId ) { - rtl::OUStringBuffer sBuf; + OUStringBuffer sBuf; if( sStreamDir ) sBuf.appendAscii( sStreamDir ); sBuf.appendAscii( sStream ); @@ -739,7 +756,7 @@ rtl::OUString XclXmlUtils::GetStreamName( const char* sStreamDir, const char* sS return sBuf.makeStringAndClear(); } -rtl::OString XclXmlUtils::ToOString( const Color& rColor ) +OString XclXmlUtils::ToOString( const Color& rColor ) { char buf[9]; sprintf( buf, "%.2X%.2X%.2X%.2X", rColor.GetTransparency(), rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue() ); @@ -747,37 +764,37 @@ rtl::OString XclXmlUtils::ToOString( const Color& rColor ) return OString( buf ); } -rtl::OString XclXmlUtils::ToOString( const ::rtl::OUString& s ) +OString XclXmlUtils::ToOString( const OUString& s ) { return OUStringToOString( s, RTL_TEXTENCODING_UTF8 ); } -rtl::OString XclXmlUtils::ToOString( const String& s ) +OString XclXmlUtils::ToOString( const String& s ) { - return rtl::OString( s.GetBuffer(), s.Len(), RTL_TEXTENCODING_UTF8 ); + return OString( s.GetBuffer(), s.Len(), RTL_TEXTENCODING_UTF8 ); } -rtl::OString XclXmlUtils::ToOString( const ScAddress& rAddress ) +OString XclXmlUtils::ToOString( const ScAddress& rAddress ) { String sAddress; rAddress.Format( sAddress, SCA_VALID, NULL, ScAddress::Details( FormulaGrammar::CONV_XL_A1 ) ); return ToOString( sAddress ); } -rtl::OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer ) +OString XclXmlUtils::ToOString( const ScfUInt16Vec& rBuffer ) { const sal_uInt16* pBuffer = &rBuffer [0]; - return ::rtl::OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 ); + return OString( pBuffer, rBuffer.size(), RTL_TEXTENCODING_UTF8 ); } -rtl::OString XclXmlUtils::ToOString( const ScRange& rRange ) +OString XclXmlUtils::ToOString( const ScRange& rRange ) { String sRange; rRange.Format( sRange, SCA_VALID, NULL, ScAddress::Details( FormulaGrammar::CONV_XL_A1 ) ); return ToOString( sRange ); } -rtl::OString XclXmlUtils::ToOString( const ScRangeList& rRangeList ) +OString XclXmlUtils::ToOString( const ScRangeList& rRangeList ) { String s; rRangeList.Format( s, SCA_VALID, NULL, FormulaGrammar::CONV_XL_A1, ' ' ); @@ -797,12 +814,12 @@ static ScAddress lcl_ToAddress( const XclAddress& rAddress ) return aAddress; } -rtl::OString XclXmlUtils::ToOString( const XclAddress& rAddress ) +OString XclXmlUtils::ToOString( const XclAddress& rAddress ) { return ToOString( lcl_ToAddress( rAddress ) ); } -rtl::OString XclXmlUtils::ToOString( const XclExpString& s ) +OString XclXmlUtils::ToOString( const XclExpString& s ) { DBG_ASSERT( !s.IsRich(), "XclXmlUtils::ToOString(XclExpString): rich text string found!" ); return ToOString( s.GetUnicodeBuffer() ); @@ -852,7 +869,7 @@ OUString XclXmlUtils::ToOUString( const String& s ) return OUString( s.GetBuffer(), s.Len() ); } -rtl::OUString XclXmlUtils::ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray ) +OUString XclXmlUtils::ToOUString( ScDocument& rDocument, const ScAddress& rAddress, ScTokenArray* pTokenArray ) { ScCompiler aCompiler( &rDocument, rAddress, *pTokenArray); aCompiler.SetGrammar(FormulaGrammar::GRAM_ENGLISH_XL_A1); @@ -1033,7 +1050,7 @@ sax_fastparser::FSHelperPtr XclExpXmlStream::CreateOutputStream ( const Reference< XOutputStream >& xParentRelation, const char* sContentType, const char* sRelationshipType, - ::rtl::OUString* pRelationshipId ) + OUString* pRelationshipId ) { OUString sRelationshipId; if (xParentRelation.is()) @@ -1138,7 +1155,12 @@ OUString XlsxExport_getImplementationName() return OUString( RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME ) ); } -::rtl::OUString XclExpXmlStream::implGetImplementationName() const +::oox::ole::VbaProject* XclExpXmlStream::implCreateVbaProject() const +{ + return new ::oox::xls::ExcelVbaProject( getComponentContext(), Reference< XSpreadsheetDocument >( getModel(), UNO_QUERY ) ); +} + +OUString XclExpXmlStream::implGetImplementationName() const { return CREATE_OUSTRING( "TODO" ); } @@ -1168,7 +1190,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey ) { - sal_Bool bRet = sal_False; + sal_Bool bRet = false; if( pRegistryKey ) { @@ -1183,7 +1205,7 @@ SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceMan } catch( InvalidRegistryException& ) { - OSL_ENSURE( sal_False, "### InvalidRegistryException!" ); + OSL_ENSURE( false, "### InvalidRegistryException!" ); } } diff --git a/sc/source/filter/excel/xestring.cxx b/sc/source/filter/excel/xestring.cxx index b6e6dc02115c..987b25dba294 100644 --- a/sc/source/filter/excel/xestring.cxx +++ b/sc/source/filter/excel/xestring.cxx @@ -38,7 +38,7 @@ #include "xestyle.hxx" #include "xestring.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; using ::rtl::OString; using ::rtl::OUString; diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx index 8964b9f52366..79b4d1949507 100644 --- a/sc/source/filter/excel/xestyle.cxx +++ b/sc/source/filter/excel/xestyle.cxx @@ -837,7 +837,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 ) @@ -901,7 +901,7 @@ Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxIte 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; @@ -918,14 +918,14 @@ Font XclExpFontHelper::GetFontFromItemSet( const XclExpRoot& rRoot, const SfxIte 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 ); @@ -1213,8 +1213,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; } }; @@ -1252,7 +1252,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 ) ); @@ -1403,7 +1403,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 @@ -1419,7 +1419,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 ) { @@ -1895,7 +1895,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 ) { @@ -1923,7 +1923,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) && @@ -1960,7 +1960,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; @@ -1982,7 +1982,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() ); @@ -2304,7 +2304,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 ); } @@ -2563,7 +2563,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 ) ) @@ -2588,7 +2588,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 eb113ad932f0..ac86a0b065c4 100644 --- a/sc/source/filter/excel/xetable.cxx +++ b/sc/source/filter/excel/xetable.cxx @@ -44,7 +44,7 @@ #include "xecontent.hxx" #include "xeescher.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; using ::rtl::OString; using ::rtl::OUString; @@ -779,12 +779,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; /* 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. */ @@ -938,7 +938,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 ) @@ -1304,7 +1304,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(); } @@ -1314,7 +1314,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 ) ) @@ -1325,7 +1325,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). */ @@ -1343,8 +1343,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; } @@ -1499,7 +1499,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 @@ -1726,8 +1726,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 ); @@ -2273,7 +2273,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 ) ); @@ -2373,7 +2373,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/xeview.cxx b/sc/source/filter/excel/xeview.cxx index 85cd24ece0a5..df69840081cb 100644 --- a/sc/source/filter/excel/xeview.cxx +++ b/sc/source/filter/excel/xeview.cxx @@ -35,7 +35,7 @@ #include "xelink.hxx" #include "xestyle.hxx" -#include <oox/core/tokens.hxx> +using namespace ::oox; using ::rtl::OString; diff --git a/sc/source/filter/excel/xichart.cxx b/sc/source/filter/excel/xichart.cxx index d262342b65a4..0393ad2d45bf 100644 --- a/sc/source/filter/excel/xichart.cxx +++ b/sc/source/filter/excel/xichart.cxx @@ -44,6 +44,9 @@ #include <com/sun/star/chart/ChartAxisLabelPosition.hpp> #include <com/sun/star/chart/ChartAxisMarkPosition.hpp> #include <com/sun/star/chart/ChartAxisPosition.hpp> +#include <com/sun/star/chart/ChartLegendExpansion.hpp> +#include <com/sun/star/chart/TimeInterval.hpp> +#include <com/sun/star/chart/TimeUnit.hpp> #include <com/sun/star/chart/XChartDocument.hpp> #include <com/sun/star/chart/XDiagramPositioning.hpp> #include <com/sun/star/chart2/XChartDocument.hpp> @@ -60,11 +63,11 @@ #include <com/sun/star/chart2/CurveStyle.hpp> #include <com/sun/star/chart2/DataPointGeometry3D.hpp> #include <com/sun/star/chart2/DataPointLabel.hpp> -#include <com/sun/star/chart2/LegendExpansion.hpp> #include <com/sun/star/chart2/LegendPosition.hpp> #include <com/sun/star/chart2/StackingDirection.hpp> #include <com/sun/star/chart2/TickmarkStyle.hpp> #include <com/sun/star/chart2/RelativePosition.hpp> +#include <com/sun/star/chart2/RelativeSize.hpp> #include <com/sun/star/chart/DataLabelPlacement.hpp> #include <com/sun/star/chart/ErrorBarStyle.hpp> #include <com/sun/star/chart/MissingValueTreatment.hpp> @@ -108,6 +111,7 @@ using ::com::sun::star::drawing::XShape; using ::com::sun::star::chart2::IncrementData; using ::com::sun::star::chart2::RelativePosition; +using ::com::sun::star::chart2::RelativeSize; using ::com::sun::star::chart2::ScaleData; using ::com::sun::star::chart2::SubIncrement; using ::com::sun::star::chart2::XAxis; @@ -151,13 +155,12 @@ XclImpStream& operator>>( XclImpStream& rStrm, XclChRectangle& rRect ) return rStrm >> rRect.mnX >> rRect.mnY >> rRect.mnWidth >> rRect.mnHeight; } -template< typename Type > -void lclSetValueOrClearAny( Any& rAny, const Type& rValue, bool bClear ) +inline void lclSetValueOrClearAny( Any& rAny, double fValue, bool bClear ) { if( bClear ) rAny.clear(); else - rAny <<= rValue; + rAny <<= fValue; } void lclSetExpValueOrClearAny( Any& rAny, double fValue, bool bLogScale, bool bClear ) @@ -167,6 +170,50 @@ void lclSetExpValueOrClearAny( Any& rAny, double fValue, bool bLogScale, bool bC lclSetValueOrClearAny( rAny, fValue, bClear ); } +double lclGetSerialDay( const XclImpRoot& rRoot, sal_uInt16 nValue, sal_uInt16 nTimeUnit ) +{ + switch( nTimeUnit ) + { + case EXC_CHDATERANGE_DAYS: + return nValue; + case EXC_CHDATERANGE_MONTHS: + 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: + OSL_ENSURE( false, "lclGetSerialDay - unexpected time unit" ); + } + return nValue; +} + +void lclConvertTimeValue( const XclImpRoot& rRoot, Any& rAny, sal_uInt16 nValue, bool bAuto, sal_uInt16 nTimeUnit ) +{ + if( bAuto ) + rAny.clear(); + else + rAny <<= lclGetSerialDay( rRoot, nValue, nTimeUnit ); +} + +sal_Int32 lclGetApiTimeUnit( sal_uInt16 nTimeUnit ) +{ + switch( nTimeUnit ) + { + case EXC_CHDATERANGE_DAYS: return cssc::TimeUnit::DAY; + case EXC_CHDATERANGE_MONTHS: return cssc::TimeUnit::MONTH; + case EXC_CHDATERANGE_YEARS: return cssc::TimeUnit::YEAR; + default: OSL_ENSURE( false, "lclGetApiTimeUnit - unexpected time unit" ); + } + return cssc::TimeUnit::DAY; +} + +void lclConvertTimeInterval( Any& rInterval, sal_uInt16 nValue, bool bAuto, sal_uInt16 nTimeUnit ) +{ + if( bAuto || (nValue == 0) ) + rInterval.clear(); + else + rInterval <<= cssc::TimeInterval( nValue, lclGetApiTimeUnit( nTimeUnit ) ); +} + } // namespace // Common ===================================================================== @@ -296,14 +343,24 @@ sal_Int32 XclImpChRoot::CalcHmmFromChartY( sal_Int32 nPosY ) const CalcHmmFromChartY( rRect.mnHeight ) ); } +double XclImpChRoot::CalcRelativeFromHmmX( sal_Int32 nPosX ) const +{ + return static_cast< double >( nPosX ) / mxChData->maChartRect.GetWidth(); +} + +double XclImpChRoot::CalcRelativeFromHmmY( sal_Int32 nPosY ) const +{ + return static_cast< double >( nPosY ) / mxChData->maChartRect.GetHeight(); +} + double XclImpChRoot::CalcRelativeFromChartX( sal_Int32 nPosX ) const { - return static_cast< double >( CalcHmmFromChartX( nPosX ) ) / mxChData->maChartRect.GetWidth(); + return CalcRelativeFromHmmX( CalcHmmFromChartX( nPosX ) ); } double XclImpChRoot::CalcRelativeFromChartY( sal_Int32 nPosY ) const { - return static_cast< double >( CalcHmmFromChartY( nPosY ) ) / mxChData->maChartRect.GetHeight(); + return CalcRelativeFromHmmY( CalcHmmFromChartY( nPosY ) ); } void XclImpChRoot::ConvertLineFormat( ScfPropertySet& rPropSet, @@ -2460,18 +2517,30 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const manual mode, if the legend is moved or resized). With manual plot areas, Excel ignores the value in maData.mnDockMode completely. */ cssc2::LegendPosition eApiPos = cssc2::LegendPosition_CUSTOM; - cssc2::LegendExpansion eApiExpand = cssc2::LegendExpansion_BALANCED; + cssc::ChartLegendExpansion eApiExpand = cssc::ChartLegendExpansion_CUSTOM; if( !GetChartData().IsManualPlotArea() ) switch( maData.mnDockMode ) { - case EXC_CHLEGEND_LEFT: eApiPos = cssc2::LegendPosition_LINE_START; eApiExpand = cssc2::LegendExpansion_HIGH; break; - case EXC_CHLEGEND_RIGHT: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc2::LegendExpansion_HIGH; break; - case EXC_CHLEGEND_TOP: eApiPos = cssc2::LegendPosition_PAGE_START; eApiExpand = cssc2::LegendExpansion_WIDE; break; - case EXC_CHLEGEND_BOTTOM: eApiPos = cssc2::LegendPosition_PAGE_END; eApiExpand = cssc2::LegendExpansion_WIDE; break; + case EXC_CHLEGEND_LEFT: + eApiPos = cssc2::LegendPosition_LINE_START; + eApiExpand = cssc::ChartLegendExpansion_HIGH; + break; + case EXC_CHLEGEND_RIGHT: // top-right not supported - case EXC_CHLEGEND_CORNER: eApiPos = cssc2::LegendPosition_LINE_END; eApiExpand = cssc2::LegendExpansion_HIGH; break; + case EXC_CHLEGEND_CORNER: + eApiPos = cssc2::LegendPosition_LINE_END; + eApiExpand = cssc::ChartLegendExpansion_HIGH; + break; + case EXC_CHLEGEND_TOP: + eApiPos = cssc2::LegendPosition_PAGE_START; + eApiExpand = cssc::ChartLegendExpansion_WIDE; + break; + case EXC_CHLEGEND_BOTTOM: + eApiPos = cssc2::LegendPosition_PAGE_END; + eApiExpand = cssc::ChartLegendExpansion_WIDE; + break; } - // no automatic position: try to find the correct position and size + // no automatic position/size: try to find the correct position and size if( eApiPos == cssc2::LegendPosition_CUSTOM ) { const XclChFramePos* pFramePos = mxFramePos ? &mxFramePos->GetFramePosData() : 0; @@ -2481,38 +2550,35 @@ Reference< XLegend > XclImpChLegend::CreateLegend() const ignored. */ if( pFramePos ) { - RelativePosition aRelPos; - aRelPos.Primary = CalcRelativeFromChartX( pFramePos->maRect.mnX ); - aRelPos.Secondary = CalcRelativeFromChartY( pFramePos->maRect.mnY ); - aRelPos.Anchor = ::com::sun::star::drawing::Alignment_TOP_LEFT; + RelativePosition aRelPos( + CalcRelativeFromChartX( pFramePos->maRect.mnX ), + CalcRelativeFromChartY( pFramePos->maRect.mnY ), + ::com::sun::star::drawing::Alignment_TOP_LEFT ); aLegendProp.SetProperty( EXC_CHPROP_RELATIVEPOSITION, aRelPos ); } else { - // no manual position found, just go for the default + // no manual position/size found, just go for the default eApiPos = cssc2::LegendPosition_LINE_END; } - - /* Legend size. #i71697# It is not possible to set the legend size - directly in the Chart, do some magic here. */ - if( !pFramePos || (pFramePos->mnBRMode != EXC_CHFRAMEPOS_ABSSIZE_POINTS) || - (pFramePos->maRect.mnWidth == 0) || (pFramePos->maRect.mnHeight == 0) ) + /* Legend size. The member mnBRMode specifies whether size is + automatic or changes manually. Manual size is given in points, + not in chart units. */ + if( pFramePos && (pFramePos->mnBRMode == EXC_CHFRAMEPOS_ABSSIZE_POINTS) && + (pFramePos->maRect.mnWidth > 0) && (pFramePos->maRect.mnHeight > 0) ) { - // automatic size: determine entry direction from flags - eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED, - cssc2::LegendExpansion_HIGH, cssc2::LegendExpansion_WIDE ); + eApiExpand = cssc::ChartLegendExpansion_CUSTOM; + sal_Int32 nWidthHmm = static_cast< sal_Int32 >( pFramePos->maRect.mnWidth / EXC_POINTS_PER_HMM ); + sal_Int32 nHeightHmm = static_cast< sal_Int32 >( pFramePos->maRect.mnHeight / EXC_POINTS_PER_HMM ); + RelativeSize aRelSize( CalcRelativeFromHmmX( nWidthHmm ), CalcRelativeFromHmmY( nHeightHmm ) ); + aLegendProp.SetProperty( EXC_CHPROP_RELATIVESIZE, aRelSize ); } else { - // legend size is given in points, not in chart units - double fRatio = static_cast< double >( pFramePos->maRect.mnWidth ) / pFramePos->maRect.mnHeight; - if( fRatio > 1.5 ) - eApiExpand = cssc2::LegendExpansion_WIDE; - else if( fRatio < 0.75 ) - eApiExpand = cssc2::LegendExpansion_HIGH; - else - eApiExpand = cssc2::LegendExpansion_BALANCED; + // automatic size: determine entry direction from flags + eApiExpand = ::get_flagvalue( maData.mnFlags, EXC_CHLEGEND_STACKED, + cssc::ChartLegendExpansion_HIGH, cssc::ChartLegendExpansion_WIDE ); } } aLegendProp.SetProperty( EXC_CHPROP_ANCHORPOSITION, eApiPos ); @@ -2866,20 +2932,60 @@ XclImpChLabelRange::XclImpChLabelRange( const XclImpChRoot& rRoot ) : void XclImpChLabelRange::ReadChLabelRange( XclImpStream& rStrm ) { - rStrm >> maData.mnCross >> maData.mnLabelFreq >> maData.mnTickFreq >> maData.mnFlags; + rStrm >> maLabelData.mnCross >> maLabelData.mnLabelFreq >> maLabelData.mnTickFreq >> maLabelData.mnFlags; +} + +void XclImpChLabelRange::ReadChDateRange( XclImpStream& rStrm ) +{ + rStrm >> maDateData.mnMinDate + >> maDateData.mnMaxDate + >> maDateData.mnMajorStep + >> maDateData.mnMajorUnit + >> maDateData.mnMinorStep + >> maDateData.mnMinorUnit + >> maDateData.mnBaseUnit + >> maDateData.mnCross + >> maDateData.mnFlags; } void XclImpChLabelRange::Convert( ScfPropertySet& rPropSet, ScaleData& rScaleData, bool bMirrorOrient ) const { - // do not overlap text unless all labels are visible - rPropSet.SetBoolProperty( EXC_CHPROP_TEXTOVERLAP, maData.mnLabelFreq == 1 ); - // do not break text into several lines unless all labels are visible - rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, maData.mnLabelFreq == 1 ); - // do not stagger labels in two lines - rPropSet.SetProperty( EXC_CHPROP_ARRANGEORDER, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE ); + // automatic axis type detection + rScaleData.AutoDateAxis = ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTODATE ); + + // the flag EXC_CHDATERANGE_DATEAXIS specifies whether this is a date axis + if( ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS ) ) + { + /* Chart2 requires axis type CATEGORY for automatic category/date axis + (even if it is a date axis currently). */ + rScaleData.AxisType = rScaleData.AutoDateAxis ? cssc2::AxisType::CATEGORY : cssc2::AxisType::DATE; + rScaleData.Scaling.set( ScfApiHelper::CreateInstance( SERVICE_CHART2_LINEARSCALING ), UNO_QUERY ); + /* Min/max values depend on base time unit, they specify the number of + days, months, or years starting from null date. */ + lclConvertTimeValue( GetRoot(), rScaleData.Minimum, maDateData.mnMinDate, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMIN ), maDateData.mnBaseUnit ); + lclConvertTimeValue( GetRoot(), rScaleData.Maximum, maDateData.mnMaxDate, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAX ), maDateData.mnBaseUnit ); + // increment + cssc::TimeIncrement& rTimeIncrement = rScaleData.TimeIncrement; + lclConvertTimeInterval( rTimeIncrement.MajorTimeInterval, maDateData.mnMajorStep, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMAJOR ), maDateData.mnMajorUnit ); + lclConvertTimeInterval( rTimeIncrement.MinorTimeInterval, maDateData.mnMinorStep, ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOMINOR ), maDateData.mnMinorUnit ); + // base unit + if( ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOBASE ) ) + rTimeIncrement.TimeResolution.clear(); + else + rTimeIncrement.TimeResolution <<= lclGetApiTimeUnit( maDateData.mnBaseUnit ); + } + else + { + // do not overlap text unless all labels are visible + rPropSet.SetBoolProperty( EXC_CHPROP_TEXTOVERLAP, maLabelData.mnLabelFreq == 1 ); + // do not break text into several lines unless all labels are visible + rPropSet.SetBoolProperty( EXC_CHPROP_TEXTBREAK, maLabelData.mnLabelFreq == 1 ); + // do not stagger labels in two lines + rPropSet.SetProperty( EXC_CHPROP_ARRANGEORDER, cssc::ChartAxisArrangeOrderType_SIDE_BY_SIDE ); + } // reverse order - bool bReverse = ::get_flag( maData.mnFlags, EXC_CHLABELRANGE_REVERSE ) != bMirrorOrient; + bool bReverse = ::get_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_REVERSE ) != bMirrorOrient; rScaleData.Orientation = bReverse ? cssc2::AxisOrientation_REVERSE : cssc2::AxisOrientation_MATHEMATICAL; //! TODO #i58731# show n-th category @@ -2891,13 +2997,29 @@ void XclImpChLabelRange::ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3d does not move the Y axis in 3D charts, regardless of actual settings. But: the Y axis has to be moved to "end", if the X axis is mirrored, to keep it at the left end of the chart. */ - bool bMaxCross = ::get_flag( maData.mnFlags, b3dChart ? EXC_CHLABELRANGE_REVERSE : EXC_CHLABELRANGE_MAXCROSS ); + bool bMaxCross = ::get_flag( maLabelData.mnFlags, b3dChart ? EXC_CHLABELRANGE_REVERSE : EXC_CHLABELRANGE_MAXCROSS ); cssc::ChartAxisPosition eAxisPos = bMaxCross ? cssc::ChartAxisPosition_END : cssc::ChartAxisPosition_VALUE; rPropSet.SetProperty( EXC_CHPROP_CROSSOVERPOSITION, eAxisPos ); - // crossing position - double fCrossingPos = b3dChart ? 1.0 : maData.mnCross; - rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos ); + // crossing position (depending on axis type text/date) + if( ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_DATEAXIS ) ) + { + bool bAutoCross = ::get_flag( maDateData.mnFlags, EXC_CHDATERANGE_AUTOCROSS ); + /* Crossing position value depends on base time unit, it specifies the + number of days, months, or years from null date. Note that Excel + 2007/2010 write broken BIFF8 files, they always stores the number + of days cregardless of the base time unit (and they are reading it + the same way, thus wrongly displaying files written by Excel + 97-2003). This filter sticks to the correct behaviour of Excel + 97-2003. */ + double fCrossingPos = bAutoCross ? 1.0 : lclGetSerialDay( GetRoot(), maDateData.mnCross, maDateData.mnBaseUnit ); + rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos ); + } + else + { + double fCrossingPos = b3dChart ? 1.0 : maLabelData.mnCross; + rPropSet.SetProperty( EXC_CHPROP_CROSSOVERVALUE, fCrossingPos ); + } } // ---------------------------------------------------------------------------- @@ -2938,6 +3060,7 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co Sequence< SubIncrement >& rSubIncrementSeq = rIncrementData.SubIncrements; rSubIncrementSeq.realloc( 1 ); Any& rIntervalCount = rSubIncrementSeq[ 0 ].IntervalCount; + rIntervalCount.clear(); if( bLogScale ) { if( !bAutoMinor ) @@ -2945,14 +3068,12 @@ void XclImpChValueRange::Convert( ScaleData& rScaleData, bool bMirrorOrient ) co } else { - sal_Int32 nCount = 0; if( !bAutoMajor && !bAutoMinor && (0.0 < maData.mfMinorStep) && (maData.mfMinorStep <= maData.mfMajorStep) ) { double fCount = maData.mfMajorStep / maData.mfMinorStep + 0.5; - if( fCount < 1001.0 ) - nCount = static_cast< sal_Int32 >( fCount ); + if( (1.0 <= fCount) && (fCount < 1001.0) ) + rIntervalCount <<= static_cast< sal_Int32 >( fCount ); } - lclSetValueOrClearAny( rIntervalCount, nCount, nCount == 0 ); } // reverse order @@ -3073,6 +3194,11 @@ void XclImpChAxis::ReadSubRecord( XclImpStream& rStrm ) mxLabelRange.reset( new XclImpChLabelRange( GetChRoot() ) ); mxLabelRange->ReadChLabelRange( rStrm ); break; + case EXC_ID_CHDATERANGE: + if( !mxLabelRange ) + mxLabelRange.reset( new XclImpChLabelRange( GetChRoot() ) ); + mxLabelRange->ReadChDateRange( rStrm ); + break; case EXC_ID_CHVALUERANGE: mxValueRange.reset( new XclImpChValueRange( GetChRoot() ) ); mxValueRange->ReadChValueRange( rStrm ); diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx index 1d5323645650..40a3e7ab9d23 100644 --- a/sc/source/filter/excel/xicontent.cxx +++ b/sc/source/filter/excel/xicontent.cxx @@ -626,7 +626,7 @@ void XclImpCondFormat::ReadCF( XclImpStream& rStrm ) if( !mxScCondFmt.get() ) { - ULONG nKey = 0; + sal_uLong nKey = 0; mxScCondFmt.reset( new ScConditionalFormat( nKey, GetDocPtr() ) ); } @@ -641,7 +641,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 ) ); @@ -863,7 +863,7 @@ void XclImpValidationManager::Apply() { DVItem& rItem = *itr; // set the handle ID - ULONG nHandle = rDoc.AddValidationEntry( rItem.maValidData ); + sal_uLong nHandle = rDoc.AddValidationEntry( rItem.maValidData ); ScPatternAttr aPattern( rDoc.GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nHandle ) ); @@ -931,14 +931,13 @@ void XclImpWebQuery::ReadWqtables( XclImpStream& rStrm ) String aTables( rStrm.ReadUniString() ); const sal_Unicode cSep = ';'; - aTables.SearchAndReplaceAll( ',', cSep ); String aQuotedPairs( RTL_CONSTASCII_USTRINGPARAM( "\"\"" ) ); - xub_StrLen nTokenCnt = aTables.GetQuotedTokenCount( aQuotedPairs, cSep ); + xub_StrLen nTokenCnt = aTables.GetQuotedTokenCount( aQuotedPairs, ',' ); maTables.Erase(); xub_StrLen nStringIx = 0; for( xub_StrLen nToken = 0; nToken < nTokenCnt; ++nToken ) { - String aToken( aTables.GetQuotedToken( 0, aQuotedPairs, cSep, nStringIx ) ); + String aToken( aTables.GetQuotedToken( 0, aQuotedPairs, ',', nStringIx ) ); sal_Int32 nTabNum = CharClass::isAsciiNumeric( aToken ) ? aToken.ToInt32() : 0; if( nTabNum > 0 ) ScGlobal::AddToken( maTables, ScfTools::GetNameFromHTMLIndex( static_cast< sal_uInt32 >( nTabNum ) ), cSep ); diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx index fa0f1dab8b2e..3039fba3b81e 100644 --- a/sc/source/filter/excel/xiescher.cxx +++ b/sc/source/filter/excel/xiescher.cxx @@ -481,7 +481,7 @@ void XclImpDrawObjBase::PreProcessSdrObject( XclImpDffConverter& rDffConv, SdrOb if( (maMacroName.Len() > 0 ) || (maHyperlink.Len() > 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 ); @@ -570,9 +570,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 ) { @@ -668,7 +668,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, false ); XOBitmap aXOBitmap( aBitmap ); aXOBitmap.Bitmap2Array(); aXOBitmap.SetBitmapType( XBITMAP_8X8 ); @@ -686,7 +686,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 ) ) ); @@ -1082,13 +1082,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( false ) ); } if( bLineEnd ) { xSdrObj->SetMergedItem( XLineEndItem( EMPTY_STRING, aArrowPolyPoly ) ); xSdrObj->SetMergedItem( XLineEndWidthItem( nWidth ) ); - xSdrObj->SetMergedItem( XLineEndCenterItem( FALSE ) ); + xSdrObj->SetMergedItem( XLineEndCenterItem( false ) ); } } rDffConv.Progress(); @@ -1373,10 +1373,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(); } @@ -3129,7 +3129,7 @@ XclImpSimpleDffConverter::~XclImpSimpleDffConverter() { } -bool XclImpSimpleDffConverter::GetColorFromPalette( USHORT nIndex, Color& rColor ) const +bool XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const { ColorData nColor = GetPalette().GetColorData( static_cast< sal_uInt16 >( nIndex ) ); @@ -3285,7 +3285,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 @@ -3321,7 +3321,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& ) @@ -3485,14 +3485,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 { @@ -3520,7 +3520,7 @@ sal_Bool XclImpDffConverter::InsertControl( const Reference< XFormComponent >& r DBG_ERRORFILE( "XclImpDffConverter::InsertControl - cannot create form control" ); } - return sal_False; + return false; } // private -------------------------------------------------------------------- @@ -3917,7 +3917,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, 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 f0bd8425d661..34a02e028070 100644 --- a/sc/source/filter/excel/xihelper.cxx +++ b/sc/source/filter/excel/xihelper.cxx @@ -811,7 +811,7 @@ XclImpCachedValue::~XclImpCachedValue() { } -USHORT XclImpCachedValue::GetScError() const +sal_uInt16 XclImpCachedValue::GetScError() const { return (mnType == EXC_CACHEDVAL_ERROR) ? XclTools::GetScErrorCode( mnBoolErr ) : 0; } @@ -851,7 +851,7 @@ ScMatrixRef XclImpCachedMatrix::CreateScMatrix() const { ScMatrixRef xScMatrix; DBG_ASSERT( mnScCols * mnScRows == maValueList.size(), "XclImpCachedMatrix::CreateScMatrix - element count mismatch" ); - if( mnScCols && mnScRows && static_cast< ULONG >( mnScCols * mnScRows ) <= maValueList.size() ) + if( mnScCols && mnScRows && static_cast< sal_uLong >( mnScCols * mnScRows ) <= maValueList.size() ) { xScMatrix = new ScMatrix( mnScCols, mnScRows ); XclImpValueList::const_iterator itValue = maValueList.begin(); diff --git a/sc/source/filter/excel/xiname.cxx b/sc/source/filter/excel/xiname.cxx index 03a49acfc787..b5eba95c6755 100644 --- a/sc/source/filter/excel/xiname.cxx +++ b/sc/source/filter/excel/xiname.cxx @@ -255,7 +255,7 @@ XclImpNameManager::XclImpNameManager( const XclImpRoot& rRoot ) : void XclImpNameManager::ReadName( XclImpStream& rStrm ) { - ULONG nCount = maNameList.size(); + sal_uLong nCount = maNameList.size(); if( nCount < 0xFFFF ) maNameList.push_back( 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 bcdf78f588f7..b6ba93124e0e 100644 --- a/sc/source/filter/excel/xipivot.cxx +++ b/sc/source/filter/excel/xipivot.cxx @@ -498,7 +498,7 @@ ScDPNumGroupInfo XclImpPCField::GetScNumGroupInfo() const { ScDPNumGroupInfo aNumInfo; aNumInfo.Enable = sal_True; - aNumInfo.DateValues = sal_False; + aNumInfo.DateValues = false; aNumInfo.AutoStart = sal_True; aNumInfo.AutoEnd = sal_True; @@ -522,7 +522,7 @@ ScDPNumGroupInfo XclImpPCField::GetScDateGroupInfo() const { ScDPNumGroupInfo aDateInfo; aDateInfo.Enable = sal_True; - aDateInfo.DateValues = sal_False; + aDateInfo.DateValues = false; aDateInfo.AutoStart = sal_True; aDateInfo.AutoEnd = sal_True; @@ -982,7 +982,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 ); } @@ -1086,7 +1086,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 ); @@ -1160,7 +1160,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(); @@ -1366,7 +1366,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( false ); aSaveData.SetDrillDown( ::get_flag( maPTExtInfo.mnFlags, EXC_SXEX_DRILLDOWN ) ); // *** fields *** @@ -1435,7 +1435,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/xistream.cxx b/sc/source/filter/excel/xistream.cxx index e0af805fa09a..9a4bcfb43d10 100644 --- a/sc/source/filter/excel/xistream.cxx +++ b/sc/source/filter/excel/xistream.cxx @@ -29,6 +29,9 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_sc.hxx" +#include <comphelper/docpasswordhelper.hxx> +#include <comphelper/sequenceashashmap.hxx> + #include "xistream.hxx" #include "xlstring.hxx" #include "xiroot.hxx" @@ -39,6 +42,8 @@ using ::rtl::OString; using ::rtl::OUString; using ::rtl::OUStringToOString; +using namespace ::com::sun::star; + // ============================================================================ // Decryption // ============================================================================ @@ -70,9 +75,16 @@ XclImpDecrypterRef XclImpDecrypter::Clone() const return xNewDecr; } -::comphelper::DocPasswordVerifierResult XclImpDecrypter::verifyPassword( const OUString& rPassword ) +::comphelper::DocPasswordVerifierResult XclImpDecrypter::verifyPassword( const ::rtl::OUString& rPassword, uno::Sequence< beans::NamedValue >& o_rEncryptionData ) +{ + o_rEncryptionData = OnVerifyPassword( rPassword ); + mnError = o_rEncryptionData.getLength() ? ERRCODE_NONE : ERRCODE_ABORT; + return o_rEncryptionData.getLength() ? ::comphelper::DocPasswordVerifierResult_OK : ::comphelper::DocPasswordVerifierResult_WRONG_PASSWORD; +} + +::comphelper::DocPasswordVerifierResult XclImpDecrypter::verifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData ) { - bool bValid = OnVerify( rPassword ); + bool bValid = OnVerifyEncryptionData( rEncryptionData ); mnError = bValid ? ERRCODE_NONE : ERRCODE_ABORT; return bValid ? ::comphelper::DocPasswordVerifierResult_OK : ::comphelper::DocPasswordVerifierResult_WRONG_PASSWORD; } @@ -111,7 +123,6 @@ sal_uInt16 XclImpDecrypter::Read( SvStream& rStrm, void* pData, sal_uInt16 nByte // ---------------------------------------------------------------------------- XclImpBiff5Decrypter::XclImpBiff5Decrypter( sal_uInt16 nKey, sal_uInt16 nHash ) : - maPassword( 16 ), mnKey( nKey ), mnHash( nHash ) { @@ -119,12 +130,12 @@ XclImpBiff5Decrypter::XclImpBiff5Decrypter( sal_uInt16 nKey, sal_uInt16 nHash ) XclImpBiff5Decrypter::XclImpBiff5Decrypter( const XclImpBiff5Decrypter& rSrc ) : XclImpDecrypter( rSrc ), - maPassword( rSrc.maPassword ), + maEncryptionData( rSrc.maEncryptionData ), mnKey( rSrc.mnKey ), mnHash( rSrc.mnHash ) { if( IsValid() ) - maCodec.InitKey( &maPassword.front() ); + maCodec.InitCodec( maEncryptionData ); } XclImpBiff5Decrypter* XclImpBiff5Decrypter::OnClone() const @@ -132,24 +143,59 @@ XclImpBiff5Decrypter* XclImpBiff5Decrypter::OnClone() const return new XclImpBiff5Decrypter( *this ); } -bool XclImpBiff5Decrypter::OnVerify( const OUString& rPassword ) +uno::Sequence< beans::NamedValue > XclImpBiff5Decrypter::OnVerifyPassword( const ::rtl::OUString& rPassword ) { + maEncryptionData.realloc( 0 ); + /* Convert password to a byte string. TODO: this needs some finetuning according to the spec... */ OString aBytePassword = OUStringToOString( rPassword, osl_getThreadTextEncoding() ); sal_Int32 nLen = aBytePassword.getLength(); if( (0 < nLen) && (nLen < 16) ) { - // copy byte string to sal_uInt8 array - maPassword.clear(); - maPassword.resize( 16, 0 ); - memcpy( &maPassword.front(), aBytePassword.getStr(), static_cast< size_t >( nLen ) ); + // init codec + maCodec.InitKey( (sal_uInt8*)aBytePassword.getStr() ); + + if ( maCodec.VerifyKey( mnKey, mnHash ) ) + { + maEncryptionData = maCodec.GetEncryptionData(); + + // since the export uses Std97 encryption always we have to request it here + ::std::vector< sal_uInt16 > aPassVect( 16 ); + ::std::vector< sal_uInt16 >::iterator aIt = aPassVect.begin(); + for( sal_Int32 nInd = 0; nInd < nLen; ++nInd, ++aIt ) + *aIt = static_cast< sal_uInt16 >( rPassword.getStr()[nInd] ); + + uno::Sequence< sal_Int8 > aDocId = ::comphelper::DocPasswordHelper::GenerateRandomByteSequence( 16 ); + OSL_ENSURE( aDocId.getLength() == 16, "Unexpected length of the senquence!" ); + + ::msfilter::MSCodec_Std97 aCodec97; + aCodec97.InitKey( &aPassVect.front(), (sal_uInt8*)aDocId.getConstArray() ); + + // merge the EncryptionData, there should be no conflicts + ::comphelper::SequenceAsHashMap aEncryptionHash( maEncryptionData ); + aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) ); + aEncryptionHash >> maEncryptionData; + } + } + + return maEncryptionData; +} +bool XclImpBiff5Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData ) +{ + maEncryptionData.realloc( 0 ); + + if( rEncryptionData.getLength() ) + { // init codec - maCodec.InitKey( &maPassword.front() ); - return maCodec.VerifyKey( mnKey, mnHash ); + maCodec.InitCodec( rEncryptionData ); + + if ( maCodec.VerifyKey( mnKey, mnHash ) ) + maEncryptionData = rEncryptionData; } - return false; + + return maEncryptionData.getLength(); } void XclImpBiff5Decrypter::OnUpdate( sal_Size /*nOldStrmPos*/, sal_Size nNewStrmPos, sal_uInt16 nRecSize ) @@ -169,7 +215,6 @@ sal_uInt16 XclImpBiff5Decrypter::OnRead( SvStream& rStrm, sal_uInt8* pnData, sal XclImpBiff8Decrypter::XclImpBiff8Decrypter( sal_uInt8 pnSalt[ 16 ], sal_uInt8 pnVerifier[ 16 ], sal_uInt8 pnVerifierHash[ 16 ] ) : - maPassword( 16, 0 ), maSalt( pnSalt, pnSalt + 16 ), maVerifier( pnVerifier, pnVerifier + 16 ), maVerifierHash( pnVerifierHash, pnVerifierHash + 16 ) @@ -178,13 +223,13 @@ XclImpBiff8Decrypter::XclImpBiff8Decrypter( sal_uInt8 pnSalt[ 16 ], XclImpBiff8Decrypter::XclImpBiff8Decrypter( const XclImpBiff8Decrypter& rSrc ) : XclImpDecrypter( rSrc ), - maPassword( rSrc.maPassword ), + maEncryptionData( rSrc.maEncryptionData ), maSalt( rSrc.maSalt ), maVerifier( rSrc.maVerifier ), maVerifierHash( rSrc.maVerifierHash ) { if( IsValid() ) - maCodec.InitKey( &maPassword.front(), &maSalt.front() ); + maCodec.InitCodec( maEncryptionData ); } XclImpBiff8Decrypter* XclImpBiff8Decrypter::OnClone() const @@ -192,25 +237,44 @@ XclImpBiff8Decrypter* XclImpBiff8Decrypter::OnClone() const return new XclImpBiff8Decrypter( *this ); } -bool XclImpBiff8Decrypter::OnVerify( const OUString& rPassword ) +uno::Sequence< beans::NamedValue > XclImpBiff8Decrypter::OnVerifyPassword( const ::rtl::OUString& rPassword ) { + maEncryptionData.realloc( 0 ); + sal_Int32 nLen = rPassword.getLength(); if( (0 < nLen) && (nLen < 16) ) { // copy string to sal_uInt16 array - maPassword.clear(); - maPassword.resize( 16, 0 ); + ::std::vector< sal_uInt16 > aPassVect( 16 ); const sal_Unicode* pcChar = rPassword.getStr(); const sal_Unicode* pcCharEnd = pcChar + nLen; - ::std::vector< sal_uInt16 >::iterator aIt = maPassword.begin(); + ::std::vector< sal_uInt16 >::iterator aIt = aPassVect.begin(); for( ; pcChar < pcCharEnd; ++pcChar, ++aIt ) *aIt = static_cast< sal_uInt16 >( *pcChar ); // init codec - maCodec.InitKey( &maPassword.front(), &maSalt.front() ); - return maCodec.VerifyKey( &maVerifier.front(), &maVerifierHash.front() ); + maCodec.InitKey( &aPassVect.front(), &maSalt.front() ); + if ( maCodec.VerifyKey( &maVerifier.front(), &maVerifierHash.front() ) ) + maEncryptionData = maCodec.GetEncryptionData(); + } + + return maEncryptionData; +} + +bool XclImpBiff8Decrypter::OnVerifyEncryptionData( const uno::Sequence< beans::NamedValue >& rEncryptionData ) +{ + maEncryptionData.realloc( 0 ); + + if( rEncryptionData.getLength() ) + { + // init codec + maCodec.InitCodec( rEncryptionData ); + + if ( maCodec.VerifyKey( &maVerifier.front(), &maVerifierHash.front() ) ) + maEncryptionData = rEncryptionData; } - return false; + + return maEncryptionData.getLength(); } void XclImpBiff8Decrypter::OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 /*nRecSize*/ ) diff --git a/sc/source/filter/excel/xistyle.cxx b/sc/source/filter/excel/xistyle.cxx index c3e6ae6b273a..290ce0eebdcf 100644 --- a/sc/source/filter/excel/xistyle.cxx +++ b/sc/source/filter/excel/xistyle.cxx @@ -157,6 +157,19 @@ ColorData XclImpPalette::GetColorData( sal_uInt16 nXclIndex ) const return GetDefColorData( nXclIndex ); } +::com::sun::star::uno::Sequence< sal_Int32 > XclImpPalette::CreateColorSequence() const +{ + sal_Int32 nCount = static_cast< sal_Int32 >( maColorTable.size() ); + ::com::sun::star::uno::Sequence< sal_Int32 > aSeq( nCount ); + if( nCount > 0 ) + { + sal_Int32* pnSeqColor = aSeq.getArray(); + for( ColorDataVec::const_iterator aIt = maColorTable.begin(), aEnd = maColorTable.end(); aIt != aEnd; ++aIt, ++pnSeqColor ) + *pnSeqColor = static_cast< sal_Int32 >( *aIt ); + } + return aSeq; +} + void XclImpPalette::ReadPalette( XclImpStream& rStrm ) { sal_uInt16 nCount; @@ -674,7 +687,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; @@ -682,17 +695,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, false ) == SFX_ITEM_SET ) ScGlobal::AddLanguage( rItemSet, GetFormatter() ); } @@ -1632,7 +1645,7 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) { XclImpXFRange* pPrevRange; XclImpXFRange* pNextRange; - ULONG nNextIndex; + sal_uLong nNextIndex; Find( pPrevRange, pNextRange, nNextIndex, nScRow ); @@ -1647,7 +1660,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 > 0 && nIndex <= maIndexList.size()) ? &(maIndexList[ nIndex - 1 ]) : 0; @@ -1694,14 +1707,14 @@ void XclImpXFRangeColumn::SetXF( SCROW nScRow, const XclImpXFIndex& rXFIndex ) Insert( new XclImpXFRange( nScRow, rXFIndex ), nNextIndex ); } -void XclImpXFRangeColumn::Insert(XclImpXFRange* pXFRange, ULONG nIndex) +void XclImpXFRangeColumn::Insert(XclImpXFRange* pXFRange, sal_uLong nIndex) { maIndexList.insert( maIndexList.begin() + nIndex, pXFRange ); } void XclImpXFRangeColumn::Find( XclImpXFRange*& rpPrevRange, XclImpXFRange*& rpNextRange, - ULONG& rnNextIndex, SCROW nScRow ) + sal_uLong& rnNextIndex, SCROW nScRow ) { // test whether list is empty @@ -1737,8 +1750,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.size() - 1; XclImpXFRange* pMidRange; while( ((rnNextIndex - nPrevIndex) > 1) && (rpPrevRange->mnScRow2 < nScRow) ) @@ -1766,7 +1779,7 @@ void XclImpXFRangeColumn::Find( } } -void XclImpXFRangeColumn::TryConcatPrev( ULONG nIndex ) +void XclImpXFRangeColumn::TryConcatPrev( sal_uLong nIndex ) { if( !nIndex || nIndex >= maIndexList.size() ) return; @@ -1865,7 +1878,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 79bf333fcacd..1220b2afa0c6 100644 --- a/sc/source/filter/excel/xiview.cxx +++ b/sc/source/filter/excel/xiview.cxx @@ -227,8 +227,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 8fcace686292..033468998ea5 100644 --- a/sc/source/filter/excel/xlchart.cxx +++ b/sc/source/filter/excel/xlchart.cxx @@ -331,6 +331,24 @@ XclChLabelRange::XclChLabelRange() : // ---------------------------------------------------------------------------- +XclChDateRange::XclChDateRange() : + mnMinDate( 0 ), + mnMaxDate( 0 ), + mnMajorStep( 0 ), + mnMajorUnit( EXC_CHDATERANGE_DAYS ), + mnMinorStep( 0 ), + mnMinorUnit( EXC_CHDATERANGE_DAYS ), + mnBaseUnit( EXC_CHDATERANGE_DAYS ), + mnCross( 0 ), + mnFlags( EXC_CHDATERANGE_AUTOMIN | EXC_CHDATERANGE_AUTOMAX | + EXC_CHDATERANGE_AUTOMAJOR | EXC_CHDATERANGE_AUTOMINOR | + EXC_CHDATERANGE_AUTOBASE | EXC_CHDATERANGE_AUTOCROSS | + EXC_CHDATERANGE_AUTODATE ) +{ +} + +// ---------------------------------------------------------------------------- + XclChValueRange::XclChValueRange() : mfMin( 0.0 ), mfMax( 0.0 ), @@ -338,7 +356,8 @@ XclChValueRange::XclChValueRange() : mfMinorStep( 0.0 ), mfCross( 0.0 ), mnFlags( EXC_CHVALUERANGE_AUTOMIN | EXC_CHVALUERANGE_AUTOMAX | - EXC_CHVALUERANGE_AUTOMAJOR | EXC_CHVALUERANGE_AUTOMINOR | EXC_CHVALUERANGE_AUTOCROSS | EXC_CHVALUERANGE_BIT8 ) + EXC_CHVALUERANGE_AUTOMAJOR | EXC_CHVALUERANGE_AUTOMINOR | + EXC_CHVALUERANGE_AUTOCROSS | EXC_CHVALUERANGE_BIT8 ) { } @@ -1057,17 +1076,17 @@ void XclChPropSetHelper::WriteEscherProperties( ScfPropertySet& rPropSet, { if( rEscherFmt.mxItemSet ) { - 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, 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, 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, false ) ); sal_uInt16 nTransp = pTranspItem ? pTranspItem->GetValue() : 0; ScfPropSetHelper& rAreaHlp = GetAreaHelper( ePropMode ); rAreaHlp.InitializeWrite(); @@ -1076,7 +1095,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, false ) ) ) { Any aGradientAny; if( pGradItem->QueryValue( aGradientAny, MID_FILLGRADIENT ) ) @@ -1094,7 +1113,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, 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 c06d4ed07179..336de4ded284 100644..100755 --- a/sc/source/filter/excel/xlformula.cxx +++ b/sc/source/filter/excel/xlformula.cxx @@ -394,7 +394,7 @@ static const XclFunctionInfo saFuncTable_Odf[] = EXC_FUNCENTRY_ODF( ocVariationen2, 2, 2, 0, "PERMUTATIONA" ), EXC_FUNCENTRY_ODF( ocPhi, 1, 1, 0, "PHI" ), EXC_FUNCENTRY_ODF( ocZGZ, 3, 3, 0, "RRI" ), - EXC_FUNCENTRY_ODF( ocTable, 1, 1, 0, "SHEET" ), + EXC_FUNCENTRY_ODF( ocTable, 0, 1, 0, "SHEET" ), EXC_FUNCENTRY_ODF( ocTables, 0, 1, 0, "SHEETS" ), EXC_FUNCENTRY_ODF( ocNoName, 1, MX, 0, "SKEWP" ), EXC_FUNCENTRY_ODF( ocUnichar, 1, 1, 0, "UNICHAR" ), @@ -601,7 +601,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 5d439a249bc1..418ae1d0f689 100644 --- a/sc/source/filter/excel/xlroot.cxx +++ b/sc/source/filter/excel/xlroot.cxx @@ -72,6 +72,8 @@ using ::com::sun::star::frame::XFrame; using ::com::sun::star::frame::XFramesSupplier; using ::com::sun::star::lang::XMultiServiceFactory; +using namespace ::com::sun::star; + // Global data ================================================================ #ifdef DBG_UTIL @@ -257,7 +259,7 @@ String XclRoot::RequestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) { ::std::vector< OUString > aDefaultPasswords; aDefaultPasswords.push_back( mrData.maDefPassword ); - return ScfApiHelper::QueryPasswordForMedium( mrData.mrMedium, rVerifier, &aDefaultPasswords ); + return ScfApiHelper::QueryEncryptionDataForMedium( mrData.mrMedium, rVerifier, &aDefaultPasswords ); } bool XclRoot::HasVbaStorage() const @@ -337,6 +339,12 @@ DateTime XclRoot::GetNullDate() const return *GetFormatter().GetNullDate(); } +sal_uInt16 XclRoot::GetBaseYear() const +{ + // return 1904 for 1904-01-01, and 1900 for 1899-12-30 + return (GetNullDate().GetYear() == 1904) ? 1904 : 1900; +} + double XclRoot::GetDoubleFromDateTime( const DateTime& rDateTime ) const { double fValue = rDateTime - GetNullDate(); @@ -363,8 +371,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( false ); + rEE.EnableUndo( false ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); } return *mrData.mxEditEngine; @@ -374,11 +382,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( false ); + rEE.EnableUndo( false ); rEE.SetControlWord( rEE.GetControlWord() & ~EE_CNTRL_ALLOWBIGOBJS ); // set Calc header/footer defaults @@ -401,8 +409,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( false ); + rEE.EnableUndo( 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 950d92f5a99c..0d0b63c0ebc7 100644 --- a/sc/source/filter/excel/xltools.cxx +++ b/sc/source/filter/excel/xltools.cxx @@ -217,7 +217,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 ) @@ -242,7 +242,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 ) @@ -330,13 +330,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 ); @@ -697,9 +697,9 @@ const OUString XclTools::maSbMacroSuffix( RTL_CONSTASCII_USTRINGPARAM( "?languag OUString XclTools::GetSbMacroUrl( const String& rMacroName, SfxObjectShell* pDocShell ) { OSL_ENSURE( rMacroName.Len() > 0, "XclTools::GetSbMacroUrl - macro name is empty" ); - ::ooo::vba::VBAMacroResolvedInfo aMacroInfo = ::ooo::vba::resolveVBAMacro( pDocShell, rMacroName, false ); - if( aMacroInfo.IsResolved() ) - return ::ooo::vba::makeMacroURL( aMacroInfo.ResolvedMacro() ); + ::ooo::vba::MacroResolvedInfo aMacroInfo = ::ooo::vba::resolveVBAMacro( pDocShell, rMacroName, false ); + if( aMacroInfo.mbFound ) + return ::ooo::vba::makeMacroURL( aMacroInfo.msResolvedMacro ); return OUString(); } diff --git a/sc/source/filter/ftools/fapihelper.cxx b/sc/source/filter/ftools/fapihelper.cxx index ac41cc47b224..3e96a92d6485 100644 --- a/sc/source/filter/ftools/fapihelper.cxx +++ b/sc/source/filter/ftools/fapihelper.cxx @@ -39,6 +39,8 @@ #include <tools/urlobj.hxx> #include <sfx2/objsh.hxx> #include <sfx2/docfile.hxx> +#include <sfx2/request.hxx> +#include <sfx2/frame.hxx> #include <sfx2/sfxsids.hrc> #include <svl/stritem.hxx> #include <svl/itemset.hxx> @@ -60,6 +62,8 @@ using ::com::sun::star::lang::XServiceName; using ::com::sun::star::lang::XMultiServiceFactory; using ::com::sun::star::task::PasswordRequestMode_PASSWORD_ENTER; +using namespace ::com::sun::star; + // Static helper functions ==================================================== OUString ScfApiHelper::GetServiceName( Reference< XInterface > xInt ) @@ -131,25 +135,33 @@ Reference< XInterface > ScfApiHelper::CreateInstanceWithArgs( return CreateInstanceWithArgs( ::comphelper::getProcessServiceFactory(), rServiceName, rArgs ); } -String ScfApiHelper::QueryPasswordForMedium( SfxMedium& rMedium, +uno::Sequence< beans::NamedValue > ScfApiHelper::QueryEncryptionDataForMedium( SfxMedium& rMedium, ::comphelper::IDocPasswordVerifier& rVerifier, const ::std::vector< OUString >* pDefaultPasswords ) { - OUString aMediaPassword; - SfxItemSet* pItemSet = rMedium.GetItemSet(); - const SfxPoolItem *pPasswordItem; - if( pItemSet && (SFX_ITEM_SET == pItemSet->GetItemState( SID_PASSWORD, TRUE, &pPasswordItem )) ) - aMediaPassword = static_cast< const SfxStringItem* >( pPasswordItem )->GetValue(); + uno::Sequence< beans::NamedValue > aEncryptionData; + SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, false); + if ( pEncryptionDataItem ) + pEncryptionDataItem->GetValue() >>= aEncryptionData; + + ::rtl::OUString aPassword; + SFX_ITEMSET_ARG( rMedium.GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, false); + if ( pPasswordItem ) + aPassword = pPasswordItem->GetValue(); + OUString aDocName = INetURLObject( rMedium.GetOrigURL() ).GetName( INetURLObject::DECODE_WITH_CHARSET ); bool bIsDefaultPassword = false; - OUString aPassword = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( - rVerifier, aMediaPassword, rMedium.GetInteractionHandler(), aDocName, + aEncryptionData = ::comphelper::DocPasswordHelper::requestAndVerifyDocPassword( + rVerifier, aEncryptionData, aPassword, rMedium.GetInteractionHandler(), aDocName, ::comphelper::DocPasswordRequestType_MS, pDefaultPasswords, &bIsDefaultPassword ); - if( !bIsDefaultPassword && (aPassword.getLength() > 0) && pItemSet ) - pItemSet->Put( SfxStringItem( SID_PASSWORD, aPassword ) ); + rMedium.GetItemSet()->ClearItem( SID_PASSWORD ); + rMedium.GetItemSet()->ClearItem( SID_ENCRYPTIONDATA ); + + if( !bIsDefaultPassword && (aEncryptionData.getLength() > 0) ) + rMedium.GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) ); - return aPassword; + return aEncryptionData; } // Property sets ============================================================== diff --git a/sc/source/filter/ftools/fprogressbar.cxx b/sc/source/filter/ftools/fprogressbar.cxx index 418ea656ebda..20e227f69f46 100644 --- a/sc/source/filter/ftools/fprogressbar.cxx +++ b/sc/source/filter/ftools/fprogressbar.cxx @@ -53,7 +53,7 @@ ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, const String& rText ) Init( pDocShell ); } -ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, USHORT nResId ) : +ScfProgressBar::ScfProgressBar( SfxObjectShell* pDocShell, sal_uInt16 nResId ) : maText( ScGlobal::GetRscString( nResId ) ) { Init( pDocShell ); @@ -101,7 +101,7 @@ void ScfProgressBar::SetCurrSegment( ScfProgressSegment* pSegment ) { // System progress has an internal limit of ULONG_MAX/100. mnSysProgressScale = 1; - ULONG nSysTotalSize = static_cast< ULONG >( mnTotalSize ); + sal_uLong nSysTotalSize = static_cast< sal_uLong >( mnTotalSize ); while( nSysTotalSize >= ULONG_MAX / 100 ) { nSysTotalSize /= 2; @@ -137,7 +137,7 @@ void ScfProgressBar::IncreaseProgressBar( sal_Size nDelta ) if( nNewPos >= mnNextUnitPos ) { mnNextUnitPos = nNewPos + mnUnitSize; - mxSysProgress->SetState( static_cast< ULONG >( nNewPos / mnSysProgressScale ) ); + mxSysProgress->SetState( static_cast< sal_uLong >( nNewPos / mnSysProgressScale ) ); } } else @@ -213,7 +213,7 @@ ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDoc Init( nSize ); } -ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, USHORT nResId ) : +ScfSimpleProgressBar::ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId ) : maProgress( pDocShell, nResId ) { Init( nSize ); @@ -226,7 +226,7 @@ void ScfSimpleProgressBar::Init( sal_Size nSize ) maProgress.ActivateSegment( nSegment ); } -ScfStreamProgressBar::ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, USHORT nResId ) : +ScfStreamProgressBar::ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, sal_uInt16 nResId ) : mrStrm( rStrm ) { Init( pDocShell, ScGlobal::GetRscString( nResId ) ); diff --git a/sc/source/filter/ftools/ftools.cxx b/sc/source/filter/ftools/ftools.cxx index ce6264b50828..dd708ff35ea2 100644 --- a/sc/source/filter/ftools/ftools.cxx +++ b/sc/source/filter/ftools/ftools.cxx @@ -207,15 +207,15 @@ SotStorageStreamRef ScfTools::OpenStorageStreamWrite( SotStorageRef xStrg, const // *** item handling *** ------------------------------------------------------ -bool ScfTools::CheckItem( const SfxItemSet& rItemSet, USHORT nWhichId, bool bDeep ) +bool ScfTools::CheckItem( const SfxItemSet& rItemSet, sal_uInt16 nWhichId, bool bDeep ) { return rItemSet.GetItemState( nWhichId, bDeep ) == SFX_ITEM_SET; } -bool ScfTools::CheckItems( const SfxItemSet& rItemSet, const USHORT* pnWhichIds, bool bDeep ) +bool ScfTools::CheckItems( const SfxItemSet& rItemSet, const sal_uInt16* pnWhichIds, bool bDeep ) { DBG_ASSERT( pnWhichIds, "ScfTools::CheckItems - no which id list" ); - for( const USHORT* pnWhichId = pnWhichIds; *pnWhichId != 0; ++pnWhichId ) + for( const sal_uInt16* pnWhichId = pnWhichIds; *pnWhichId != 0; ++pnWhichId ) if( CheckItem( rItemSet, *pnWhichId, bDeep ) ) return true; return false; diff --git a/sc/source/filter/html/htmlexp.cxx b/sc/source/filter/html/htmlexp.cxx index 63c94ca764d0..05338c3849b1 100644 --- a/sc/source/filter/html/htmlexp.cxx +++ b/sc/source/filter/html/htmlexp.cxx @@ -110,20 +110,20 @@ const static sal_Char sMyEndComment[] = " -->"; const static sal_Char sFontFamily[] = "font-family:"; const static sal_Char sFontSize[] = "font-size:"; -const USHORT ScHTMLExport::nDefaultFontSize[SC_HTML_FONTSIZES] = +const sal_uInt16 ScHTMLExport::nDefaultFontSize[SC_HTML_FONTSIZES] = { HTMLFONTSZ1_DFLT, HTMLFONTSZ2_DFLT, HTMLFONTSZ3_DFLT, HTMLFONTSZ4_DFLT, HTMLFONTSZ5_DFLT, HTMLFONTSZ6_DFLT, HTMLFONTSZ7_DFLT }; -USHORT ScHTMLExport::nFontSize[SC_HTML_FONTSIZES] = { 0 }; +sal_uInt16 ScHTMLExport::nFontSize[SC_HTML_FONTSIZES] = { 0 }; const char* ScHTMLExport::pFontSizeCss[SC_HTML_FONTSIZES] = { "xx-small", "x-small", "small", "medium", "large", "x-large", "xx-large" }; -const USHORT ScHTMLExport::nCellSpacing = 0; +const sal_uInt16 ScHTMLExport::nCellSpacing = 0; const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = "\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t"; @@ -133,7 +133,7 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = #define OUT_PROLOGUE() (rStrm << sHTML30_Prologue << ScExportBase::sNewLine \ << ScExportBase::sNewLine) #define TAG_ON( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag ) -#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, FALSE ) +#define TAG_OFF( tag ) HTMLOutFuncs::Out_AsciiTag( rStrm, tag, false ) #define OUT_STR( str ) HTMLOutFuncs::Out_String( rStrm, str, eDestEnc, &aNonConvertibleChars ) #define OUT_STR_NO_CONV( str ) HTMLOutFuncs::Out_String( rStrm, str, eDestEnc ) #define OUT_LF() rStrm << ScExportBase::sNewLine << GetIndentStr() @@ -157,7 +157,7 @@ const sal_Char ScHTMLExport::sIndentSource[nIndentMax+1] = //======================================================================== FltError ScFormatFilterPluginImpl::ScExportHTML( SvStream& rStrm, const String& rBaseURL, ScDocument* pDoc, - const ScRange& rRange, const CharSet /*eNach*/, BOOL bAll, + const ScRange& rRange, const CharSet /*eNach*/, sal_Bool bAll, const String& rStreamPath, String& rNonConvertibleChars ) { ScHTMLExport aEx( rStrm, rBaseURL, pDoc, rRange, bAll, rStreamPath ); @@ -218,7 +218,7 @@ void lcl_AppendHTMLColorTripel( ByteString& rStr, const Color& rColor ) ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument* pDocP, const ScRange& rRangeP, - BOOL bAllP, const String& rStreamPathP ) : + sal_Bool bAllP, const String& rStreamPathP ) : ScExportBase( rStrmP, pDocP, rRangeP ), aBaseURL( rBaseURL ), aStreamPath( rStreamPathP ), @@ -228,10 +228,10 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument nUsedTables( 0 ), nIndent( 0 ), bAll( bAllP ), - bTabHasGraphics( FALSE ), + bTabHasGraphics( false ), bCalcAsShown( pDocP->GetDocOptions().IsCalcAsShown() ), - bTableDataWidth( TRUE ), - bTableDataHeight( TRUE ) + bTableDataWidth( sal_True ), + bTableDataHeight( sal_True ) { strcpy( sIndent, sIndentSource ); sIndent[0] = 0; @@ -240,9 +240,9 @@ ScHTMLExport::ScHTMLExport( SvStream& rStrmP, const String& rBaseURL, ScDocument SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get(); eDestEnc = (pDoc->IsClipOrUndo() ? RTL_TEXTENCODING_UTF8 : pHtmlOptions->GetTextEncoding()); bCopyLocalFileToINet = pHtmlOptions->IsSaveGraphicsLocal(); - for ( USHORT j=0; j < SC_HTML_FONTSIZES; j++ ) + for ( sal_uInt16 j=0; j < SC_HTML_FONTSIZES; j++ ) { - USHORT nSize = pHtmlOptions->GetFontSize( j ); + sal_uInt16 nSize = pHtmlOptions->GetFontSize( j ); // remember in Twips, like our SvxFontHeightItem if ( nSize ) nFontSize[j] = nSize * 20; @@ -279,10 +279,10 @@ ScHTMLExport::~ScHTMLExport() } -USHORT ScHTMLExport::GetFontSizeNumber( USHORT nHeight ) +sal_uInt16 ScHTMLExport::GetFontSizeNumber( sal_uInt16 nHeight ) { - USHORT nSize = 1; - for ( USHORT j=SC_HTML_FONTSIZES-1; j>0; j-- ) + sal_uInt16 nSize = 1; + for ( sal_uInt16 j=SC_HTML_FONTSIZES-1; j>0; j-- ) { if( nHeight > (nFontSize[j] + nFontSize[j-1]) / 2 ) { // der naechstgelegene @@ -293,18 +293,18 @@ USHORT ScHTMLExport::GetFontSizeNumber( USHORT nHeight ) return nSize; } -const char* ScHTMLExport::GetFontSizeCss( USHORT nHeight ) +const char* ScHTMLExport::GetFontSizeCss( sal_uInt16 nHeight ) { - USHORT nSize = GetFontSizeNumber( nHeight ); + sal_uInt16 nSize = GetFontSizeNumber( nHeight ); return pFontSizeCss[ nSize-1 ]; } -USHORT ScHTMLExport::ToPixel( USHORT nVal ) +sal_uInt16 ScHTMLExport::ToPixel( sal_uInt16 nVal ) { if( nVal ) { - nVal = (USHORT)pAppWin->LogicToPixel( + nVal = (sal_uInt16)pAppWin->LogicToPixel( Size( nVal, nVal ), MapMode( MAP_TWIP ) ).Width(); if( !nVal ) // wo ein Twip ist sollte auch ein Pixel sein nVal = 1; @@ -326,7 +326,7 @@ Size ScHTMLExport::MMToPixel( const Size& rSize ) } -ULONG ScHTMLExport::Write() +sal_uLong ScHTMLExport::Write() { rStrm << '<' << OOO_STRING_SVTOOLS_HTML_doctype << ' ' << OOO_STRING_SVTOOLS_HTML_doctype32 << '>' << sNewLine << sNewLine; @@ -403,7 +403,7 @@ void ScHTMLExport::WriteHeader() } } rStrm << "; " << sFontSize - << GetFontSizeCss( ( USHORT ) aHTMLStyle.nFontHeight ) << " }"; + << GetFontSizeCss( ( sal_uInt16 ) aHTMLStyle.nFontHeight ) << " }"; OUT_LF(); rStrm << sMyEndComment; IncIndent(-1); OUT_LF(); TAG_OFF_LF( OOO_STRING_SVTOOLS_HTML_style ); @@ -473,7 +473,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab ) ScGlobal::GetScriptedWhichID( aHTMLStyle.nDefaultScriptType, ATTR_FONT_HEIGHT )))).GetHeight(); - aHTMLStyle.nFontSizeNumber = GetFontSizeNumber( static_cast< USHORT >( aHTMLStyle.nFontHeight ) ); + aHTMLStyle.nFontSizeNumber = GetFontSizeNumber( static_cast< sal_uInt16 >( aHTMLStyle.nFontHeight ) ); } // Page style sheet printer settings, e.g. for background graphics. @@ -488,7 +488,7 @@ const SfxItemSet& ScHTMLExport::PageDefaults( SCTAB nTab ) { const SvxBrushItem* pBrushItem = (const SvxBrushItem*)&rSet.Get( ATTR_BACKGROUND ); aHTMLStyle.aBackgroundColor = pBrushItem->GetColor(); - aHTMLStyle.bInitialized = TRUE; + aHTMLStyle.bInitialized = sal_True; } return rSet; } @@ -549,7 +549,7 @@ void ScHTMLExport::WriteBody() { // Grafik als (JPG-)File speichern aGrfNm = aStreamPath; - USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm, + sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, aGrfNm, CREATE_STRING( "JPG" ), XOUTBMP_USE_NATIVE_IF_POSSIBLE ); if( !nErr ) // fehlerhaft, da ist nichts auszugeben { @@ -688,7 +688,7 @@ void ScHTMLExport::WriteTables() // FRAME=VOID, we do the styling of the cells in <TD> (((aByteStrOut += ' ') += OOO_STRING_SVTOOLS_HTML_frame) += '=') += OOO_STRING_SVTOOLS_HTML_TF_void; - bTabHasGraphics = bTabAlignedLeft = FALSE; + bTabHasGraphics = bTabAlignedLeft = false; if ( bAll && pDrawLayer ) PrepareGraphics( pDrawLayer, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); @@ -740,7 +740,7 @@ void ScHTMLExport::WriteTables() IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tbody ); // At least old (3.x, 4.x?) Netscape doesn't follow <TABLE COLS=n> and // <COL WIDTH=x> specified, but needs a width at every column. - bTableDataWidth = TRUE; // widths in first row + bTableDataWidth = sal_True; // widths in first row bool bHasHiddenRows = pDoc->HasHiddenRows(nStartRow, nEndRow, nTab); for ( SCROW nRow=nStartRow; nRow<=nEndRow; nRow++ ) { @@ -752,7 +752,7 @@ void ScHTMLExport::WriteTables() } IncIndent(1); TAG_ON_LF( OOO_STRING_SVTOOLS_HTML_tablerow ); - bTableDataHeight = TRUE; // height at every first cell of each row + bTableDataHeight = sal_True; // height at every first cell of each row for ( SCCOL nCol2=nStartCol; nCol2<=nEndCol; nCol2++ ) { if ( pDoc->ColHidden(nCol2, nTab) ) @@ -761,9 +761,9 @@ void ScHTMLExport::WriteTables() if ( nCol2 == nEndCol ) IncIndent(-1); WriteCell( nCol2, nRow, nTab ); - bTableDataHeight = FALSE; + bTableDataHeight = false; } - bTableDataWidth = FALSE; // widths only in first row + bTableDataWidth = false; // widths only in first row if ( nRow == nEndRow ) IncIndent(-1); @@ -826,9 +826,9 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } ScBaseCell* pCell = pDoc->GetCell( aPos ); - ULONG nFormat = pAttr->GetNumberFormat( pFormatter ); - BOOL bValueData; - BYTE nScriptType; + sal_uLong nFormat = pAttr->GetNumberFormat( pFormatter ); + sal_Bool bValueData; + sal_uInt8 nScriptType; if ( pCell ) { bValueData = pCell->HasValueData(); @@ -836,7 +836,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } else { - bValueData = FALSE; + bValueData = false; nScriptType = 0; } if ( nScriptType == 0 ) @@ -861,15 +861,15 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } const sal_Char* pChar; - USHORT nWidthPixel; - USHORT nHeightPixel; + sal_uInt16 nWidthPixel; + sal_uInt16 nHeightPixel; const ScMergeAttr& rMergeAttr = (const ScMergeAttr&) pAttr->GetItem( ATTR_MERGE, pCondItemSet ); if ( pGraphEntry || rMergeAttr.IsMerged() ) { SCCOL nC, jC; SCROW nR; - ULONG v; + sal_uLong v; if ( pGraphEntry ) nC = Max( SCCOL(pGraphEntry->aRange.aEnd.Col() - nCol + 1), SCCOL(rMergeAttr.GetColMerge()) ); @@ -881,7 +881,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) nC = nC + nCol; for ( jC=nCol, v=0; jC<nC; jC++ ) v += pDoc->GetColWidth( jC, nTab ); - nWidthPixel = ToPixel( static_cast< USHORT >( v ) ); + nWidthPixel = ToPixel( static_cast< sal_uInt16 >( v ) ); } else nWidthPixel = ToPixel( pDoc->GetColWidth( nCol, nTab ) ); @@ -896,7 +896,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) (((aStrTD += ' ') += OOO_STRING_SVTOOLS_HTML_O_rowspan) += '=') += ByteString::CreateFromInt32( nR ); nR += nRow; v = pDoc->GetRowHeight( nRow, nR-1, nTab ); - nHeightPixel = ToPixel( static_cast< USHORT >( v ) ); + nHeightPixel = ToPixel( static_cast< sal_uInt16 >( v ) ); } else nHeightPixel = ToPixel( pDoc->GetRowHeight( nRow, nTab ) ); @@ -949,21 +949,21 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) else aBgColor = rBrushItem.GetColor(); - BOOL bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); - BOOL bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); - BOOL bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() ); - BOOL bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now - BOOL bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); - USHORT nSetFontSizeNumber = 0; - UINT32 nFontHeight = rFontHeightItem.GetHeight(); + sal_Bool bBold = ( WEIGHT_BOLD <= rWeightItem.GetWeight() ); + sal_Bool bItalic = ( ITALIC_NONE != rPostureItem.GetPosture() ); + sal_Bool bUnderline = ( UNDERLINE_NONE != rUnderlineItem.GetLineStyle() ); + sal_Bool bSetFontColor = ( COL_AUTO != rColorItem.GetValue().GetColor() ); // default is AUTO now + sal_Bool bSetFontName = ( aHTMLStyle.aFontFamilyName != rFontItem.GetFamilyName() ); + sal_uInt16 nSetFontSizeNumber = 0; + sal_uInt32 nFontHeight = rFontHeightItem.GetHeight(); if ( nFontHeight != aHTMLStyle.nFontHeight ) { - nSetFontSizeNumber = GetFontSizeNumber( (USHORT) nFontHeight ); + nSetFontSizeNumber = GetFontSizeNumber( (sal_uInt16) nFontHeight ); if ( nSetFontSizeNumber == aHTMLStyle.nFontSizeNumber ) nSetFontSizeNumber = 0; // no difference, don't set } - BOOL bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber); + sal_Bool bSetFont = (bSetFontColor || bSetFontName || nSetFontSizeNumber); //! TODO: we could entirely use CSS1 here instead, but that would exclude //! Netscape 3.0 and Netscape 4.x without JavaScript enabled. @@ -1084,7 +1084,7 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } String aStrOut; - BOOL bFieldText = FALSE; + sal_Bool bFieldText = false; if ( pCell ) { // cell content Color* pColor; @@ -1143,51 +1143,51 @@ void ScHTMLExport::WriteCell( SCCOL nCol, SCROW nRow, SCTAB nTab ) } -BOOL ScHTMLExport::WriteFieldText( const ScEditCell* pCell ) +sal_Bool ScHTMLExport::WriteFieldText( const ScEditCell* pCell ) { - BOOL bFields = FALSE; + sal_Bool bFields = false; const EditTextObject* pData; pCell->GetData( pData ); // text and anchor of URL fields, Doc-Engine is a ScFieldEditEngine EditEngine& rEngine = pDoc->GetEditEngine(); rEngine.SetText( *pData ); - USHORT nParas = rEngine.GetParagraphCount(); + sal_uInt16 nParas = rEngine.GetParagraphCount(); if ( nParas ) { ESelection aSel( 0, 0, nParas-1, rEngine.GetTextLen( nParas-1 ) ); SfxItemSet aSet( rEngine.GetAttribs( aSel ) ); - SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE ); + SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) - bFields = TRUE; + bFields = sal_True; } if ( bFields ) { - BOOL bOldUpdateMode = rEngine.GetUpdateMode(); - rEngine.SetUpdateMode( TRUE ); // no portions if not formatted - for ( USHORT nPar=0; nPar < nParas; nPar++ ) + sal_Bool bOldUpdateMode = rEngine.GetUpdateMode(); + rEngine.SetUpdateMode( sal_True ); // no portions if not formatted + for ( sal_uInt16 nPar=0; nPar < nParas; nPar++ ) { if ( nPar > 0 ) TAG_ON( OOO_STRING_SVTOOLS_HTML_linebreak ); SvUShorts aPortions; rEngine.GetPortions( nPar, aPortions ); - USHORT nCnt = aPortions.Count(); - USHORT nStart = 0; - for ( USHORT nPos = 0; nPos < nCnt; nPos++ ) + sal_uInt16 nCnt = aPortions.Count(); + sal_uInt16 nStart = 0; + for ( sal_uInt16 nPos = 0; nPos < nCnt; nPos++ ) { - USHORT nEnd = aPortions.GetObject( nPos ); + sal_uInt16 nEnd = aPortions.GetObject( nPos ); ESelection aSel( nPar, nStart, nPar, nEnd ); - BOOL bUrl = FALSE; + sal_Bool bUrl = false; // fields are single characters if ( nEnd == nStart+1 ) { const SfxPoolItem* pItem; SfxItemSet aSet = rEngine.GetAttribs( aSel ); - if ( aSet.GetItemState( EE_FEATURE_FIELD, FALSE, &pItem ) == SFX_ITEM_ON ) + if ( aSet.GetItemState( EE_FEATURE_FIELD, false, &pItem ) == SFX_ITEM_ON ) { const SvxFieldData* pField = ((const SvxFieldItem*)pItem)->GetField(); if ( pField && pField->ISA(SvxURLField) ) { - bUrl = TRUE; + bUrl = sal_True; const SvxURLField* pURLField = (const SvxURLField*)pField; // String aFieldText = rEngine.GetText( aSel ); rStrm << '<' << OOO_STRING_SVTOOLS_HTML_anchor << ' ' << OOO_STRING_SVTOOLS_HTML_O_href << "=\""; @@ -1209,10 +1209,10 @@ BOOL ScHTMLExport::WriteFieldText( const ScEditCell* pCell ) } -BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm, - const String& rTargetNm, BOOL bFileToFile ) +sal_Bool ScHTMLExport::CopyLocalFileToINet( String& rFileNm, + const String& rTargetNm, sal_Bool bFileToFile ) { - BOOL bRet = FALSE; + sal_Bool bRet = false; INetURLObject aFileUrl, aTargetUrl; aFileUrl.SetSmartURL( rFileNm ); aTargetUrl.SetSmartURL( rTargetNm ); @@ -1225,11 +1225,11 @@ BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm, if( pSrcArr ) { // wurde die Datei schon verschoben - USHORT nPos; + sal_uInt16 nPos; if( pSrcArr->Seek_Entry( &rFileNm, &nPos )) { rFileNm = *(*pDestArr)[ nPos ]; - return TRUE; + return sal_True; } } else @@ -1256,7 +1256,7 @@ BOOL ScHTMLExport::CopyLocalFileToINet( String& rFileNm, else { SfxMedium aMedium( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, - FALSE ); + false ); { SvFileStream aCpy( aMedium.GetPhysicalName(), STREAM_WRITE ); diff --git a/sc/source/filter/html/htmlexp2.cxx b/sc/source/filter/html/htmlexp2.cxx index ae072892e7d4..0100c1d9d258 100644 --- a/sc/source/filter/html/htmlexp2.cxx +++ b/sc/source/filter/html/htmlexp2.cxx @@ -65,7 +65,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab, SdrPage* pDrawPage = pDrawLayer->GetPage( static_cast<sal_uInt16>(nTab) ); if ( pDrawPage ) { - bTabHasGraphics = TRUE; + bTabHasGraphics = true; FillGraphList( pDrawPage, nTab, nStartCol, nStartRow, nEndCol, nEndRow ); size_t ListSize = aGraphList.size(); for ( size_t i = 0; i < ListSize; ++i ) @@ -73,7 +73,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab, ScHTMLGraphEntry* pE = &aGraphList[ i ]; if ( !pE->bInCell ) { // nicht alle in Zellen: einige neben Tabelle - bTabAlignedLeft = TRUE; + bTabAlignedLeft = sal_True; break; } } @@ -85,7 +85,7 @@ void ScHTMLExport::PrepareGraphics( ScDrawLayer* pDrawLayer, SCTAB nTab, void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, SCCOL nStartCol, SCROW nStartRow, SCCOL nEndCol, SCROW nEndRow ) { - ULONG nObjCount = pPage->GetObjCount(); + sal_uLong nObjCount = pPage->GetObjCount(); if ( nObjCount ) { Rectangle aRect; @@ -110,7 +110,7 @@ void ScHTMLExport::FillGraphList( const SdrPage* pPage, SCTAB nTab, SCCOL nCol2 = aR.aEnd.Col(); SCROW nRow2 = aR.aEnd.Row(); // All cells empty under object? - BOOL bInCell = (pDoc->GetEmptyLinesInBlock( + sal_Bool bInCell = (pDoc->GetEmptyLinesInBlock( nCol1, nRow1, nTab, nCol2, nRow2, nTab, DIR_TOP ) == static_cast< SCSIZE >( nRow2 - nRow1 )); // rows-1 ! if ( bInCell ) @@ -156,11 +156,11 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) { const SdrGrafObj* pSGO = (SdrGrafObj*)pObject; const SdrGrafObjGeoData* pGeo = (SdrGrafObjGeoData*)pSGO->GetGeoData(); - USHORT nMirrorCase = (pGeo->aGeo.nDrehWink == 18000 ? + sal_uInt16 nMirrorCase = (pGeo->aGeo.nDrehWink == 18000 ? ( pGeo->bMirrored ? 3 : 4 ) : ( pGeo->bMirrored ? 2 : 1 )); - BOOL bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) ); - BOOL bVMirr = ( ( nMirrorCase == 3 ) || ( nMirrorCase == 4 ) ); - ULONG nXOutFlags = 0; + sal_Bool bHMirr = ( ( nMirrorCase == 2 ) || ( nMirrorCase == 4 ) ); + sal_Bool bVMirr = ( ( nMirrorCase == 3 ) || ( nMirrorCase == 4 ) ); + sal_uLong nXOutFlags = 0; if ( bHMirr ) nXOutFlags |= XOUTBMP_MIRROR_HORZ; if ( bVMirr ) @@ -169,7 +169,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) if ( pSGO->IsLinkedGraphic() ) aLinkName = pSGO->GetFileName(); WriteImage( aLinkName, pSGO->GetGraphic(), aOpt, nXOutFlags ); - pE->bWritten = TRUE; + pE->bWritten = sal_True; } break; case OBJ_OLE2: @@ -179,7 +179,7 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) { String aLinkName; WriteImage( aLinkName, *pGraphic, aOpt ); - pE->bWritten = TRUE; + pE->bWritten = sal_True; } } break; @@ -189,14 +189,14 @@ void ScHTMLExport::WriteGraphEntry( ScHTMLGraphEntry* pE ) pDoc->GetDrawLayer(), pObject ) ); String aLinkName; WriteImage( aLinkName, aGraph, aOpt ); - pE->bWritten = TRUE; + pE->bWritten = sal_True; } } } void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf, - const ByteString& rImgOptions, ULONG nXOutFlags ) + const ByteString& rImgOptions, sal_uLong nXOutFlags ) { // embeddete Grafik -> via WriteGraphic schreiben if( !rLinkName.Len() ) @@ -206,7 +206,7 @@ void ScHTMLExport::WriteImage( String& rLinkName, const Graphic& rGrf, // Grafik als (JPG-)File speichern String aGrfNm( aStreamPath ); nXOutFlags |= XOUTBMP_USE_NATIVE_IF_POSSIBLE; - USHORT nErr = XOutBitmap::WriteGraphic( rGrf, aGrfNm, + sal_uInt16 nErr = XOutBitmap::WriteGraphic( rGrf, aGrfNm, CREATE_STRING( "JPG" ), nXOutFlags ); if( !nErr ) // sonst fehlerhaft, da ist nichts auszugeben { diff --git a/sc/source/filter/html/htmlimp.cxx b/sc/source/filter/html/htmlimp.cxx index 17d0592f5784..5bae367a3f65 100644 --- a/sc/source/filter/html/htmlimp.cxx +++ b/sc/source/filter/html/htmlimp.cxx @@ -61,23 +61,23 @@ //------------------------------------------------------------------------ FltError ScFormatFilterPluginImpl::ScImportHTML( SvStream &rStream, const String& rBaseURL, ScDocument *pDoc, - ScRange& rRange, double nOutputFactor, BOOL bCalcWidthHeight, SvNumberFormatter* pFormatter, + ScRange& rRange, double nOutputFactor, sal_Bool bCalcWidthHeight, SvNumberFormatter* pFormatter, bool bConvertDate ) { ScHTMLImport aImp( pDoc, rBaseURL, rRange, bCalcWidthHeight ); FltError nErr = (FltError) aImp.Read( rStream, rBaseURL ); ScRange aR = aImp.GetRange(); rRange.aEnd = aR.aEnd; - aImp.WriteToDocument( TRUE, nOutputFactor, pFormatter, bConvertDate ); + aImp.WriteToDocument( sal_True, nOutputFactor, pFormatter, bConvertDate ); return nErr; } -ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ) +ScEEAbsImport *ScFormatFilterPluginImpl::CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight ) { return new ScHTMLImport( pDocP, rBaseURL, rRange, bCalcWidthHeight ); } -ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ) : +ScHTMLImport::ScHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight ) : ScEEImport( pDocP, rRange ) { Size aPageSize; @@ -137,7 +137,7 @@ void ScHTMLImport::InsertRangeName( ScDocument* pDoc, const String& rName, const } void ScHTMLImport::WriteToDocument( - BOOL bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate ) + sal_Bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate ) { ScEEImport::WriteToDocument( bSizeColsRows, nOutputFactor, pFormatter, bConvertDate ); @@ -235,7 +235,7 @@ String ScHTMLImport::GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrig String aToken( rOrigName.GetToken( 0, ';', nStringIx ) ); if( pRangeNames && ScfTools::IsHTMLTablesName( aToken ) ) { // build list with all HTML tables - ULONG nIndex = 1; + sal_uLong nIndex = 1; bool bLoop = true; while( bLoop ) { diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx index bdb142a2ba9f..c1f6cacd7eb6 100644 --- a/sc/source/filter/html/htmlpars.cxx +++ b/sc/source/filter/html/htmlpars.cxx @@ -71,7 +71,7 @@ using namespace ::com::sun::star; -SV_IMPL_VARARR_SORT( ScHTMLColOffset, ULONG ); +SV_IMPL_VARARR_SORT( ScHTMLColOffset, sal_uLong ); // ============================================================================ @@ -113,10 +113,10 @@ ScHTMLLayoutParser::ScHTMLLayoutParser( EditEngine* pEditP, const String& rBaseU nColOffsetStart(0), nMetaCnt(0), nOffsetTolerance( SC_HTML_OFFSET_TOLERANCE_SMALL ), - bTabInTabCell( FALSE ), - bFirstRow( TRUE ), - bInCell( FALSE ), - bInTitle( FALSE ) + bTabInTabCell( false ), + bFirstRow( sal_True ), + bInCell( false ), + bInTitle( false ) { MakeColNoRef( pLocalColOffset, 0, 0, 0, 0 ); MakeColNoRef( pColOffset, 0, 0, 0, 0 ); @@ -156,13 +156,13 @@ ScHTMLLayoutParser::~ScHTMLLayoutParser() } -ULONG ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL ) +sal_uLong ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL ) { Link aOldLink = pEdit->GetImportHdl(); pEdit->SetImportHdl( LINK( this, ScHTMLLayoutParser, HTMLImportHdl ) ); SfxObjectShell* pObjSh = mpDoc->GetDocumentShell(); - BOOL bLoading = pObjSh && pObjSh->IsLoading(); + sal_Bool bLoading = pObjSh && pObjSh->IsLoading(); SvKeyValueIteratorRef xValues; SvKeyValueIterator* pAttributes = NULL; @@ -185,17 +185,17 @@ ULONG ScHTMLLayoutParser::Read( SvStream& rStream, const String& rBaseURL ) } } - ULONG nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_HTML, pAttributes ); + sal_uLong nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_HTML, pAttributes ); pEdit->SetImportHdl( aOldLink ); // Spaltenbreiten erzeugen Adjust(); OutputDevice* pDefaultDev = Application::GetDefaultDevice(); - USHORT nCount = pColOffset->Count(); - const ULONG* pOff = (const ULONG*) pColOffset->GetData(); - ULONG nOff = *pOff++; + sal_uInt16 nCount = pColOffset->Count(); + const sal_uLong* pOff = (const sal_uLong*) pColOffset->GetData(); + sal_uLong nOff = *pOff++; Size aSize; - for ( USHORT j = 1; j < nCount; j++, pOff++ ) + for ( sal_uInt16 j = 1; j < nCount; j++, pOff++ ) { aSize.Width() = *pOff - nOff; aSize = pDefaultDev->PixelToLogic( aSize, MapMode( MAP_TWIP ) ); @@ -253,61 +253,61 @@ void ScHTMLLayoutParser::NextRow( ImportInfo* pInfo ) nRowMax = nRowCnt; nColCnt = nColCntStart; nColOffset = nColOffsetStart; - bFirstRow = FALSE; + bFirstRow = false; } -BOOL ScHTMLLayoutParser::SeekOffset( ScHTMLColOffset* pOffset, USHORT nOffset, - SCCOL* pCol, USHORT nOffsetTol ) +sal_Bool ScHTMLLayoutParser::SeekOffset( ScHTMLColOffset* pOffset, sal_uInt16 nOffset, + SCCOL* pCol, sal_uInt16 nOffsetTol ) { DBG_ASSERT( pOffset, "ScHTMLLayoutParser::SeekOffset - illegal call" ); - USHORT nPos; - BOOL bFound = pOffset->Seek_Entry( nOffset, &nPos ); + sal_uInt16 nPos; + sal_Bool bFound = pOffset->Seek_Entry( nOffset, &nPos ); *pCol = static_cast<SCCOL>(nPos); if ( bFound ) - return TRUE; - USHORT nCount = pOffset->Count(); + return sal_True; + sal_uInt16 nCount = pOffset->Count(); if ( !nCount ) - return FALSE; + return false; // nPos ist Einfuegeposition, da liegt der Naechsthoehere (oder auch nicht) if ( nPos < nCount && (((*pOffset)[nPos] - nOffsetTol) <= nOffset) ) - return TRUE; + return sal_True; // nicht kleiner als alles andere? dann mit Naechstniedrigerem vergleichen else if ( nPos && (((*pOffset)[nPos-1] + nOffsetTol) >= nOffset) ) { (*pCol)--; - return TRUE; + return sal_True; } - return FALSE; + return false; } -void ScHTMLLayoutParser::MakeCol( ScHTMLColOffset* pOffset, USHORT& nOffset, - USHORT& nWidth, USHORT nOffsetTol, USHORT nWidthTol ) +void ScHTMLLayoutParser::MakeCol( ScHTMLColOffset* pOffset, sal_uInt16& nOffset, + sal_uInt16& nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol ) { DBG_ASSERT( pOffset, "ScHTMLLayoutParser::MakeCol - illegal call" ); SCCOL nPos; if ( SeekOffset( pOffset, nOffset, &nPos, nOffsetTol ) ) - nOffset = (USHORT)(*pOffset)[nPos]; + nOffset = (sal_uInt16)(*pOffset)[nPos]; else pOffset->Insert( nOffset ); if ( nWidth ) { if ( SeekOffset( pOffset, nOffset + nWidth, &nPos, nWidthTol ) ) - nWidth = (USHORT)(*pOffset)[nPos] - nOffset; + nWidth = (sal_uInt16)(*pOffset)[nPos] - nOffset; else pOffset->Insert( nOffset + nWidth ); } } -void ScHTMLLayoutParser::MakeColNoRef( ScHTMLColOffset* pOffset, USHORT nOffset, - USHORT nWidth, USHORT nOffsetTol, USHORT nWidthTol ) +void ScHTMLLayoutParser::MakeColNoRef( ScHTMLColOffset* pOffset, sal_uInt16 nOffset, + sal_uInt16 nWidth, sal_uInt16 nOffsetTol, sal_uInt16 nWidthTol ) { DBG_ASSERT( pOffset, "ScHTMLLayoutParser::MakeColNoRef - illegal call" ); SCCOL nPos; if ( SeekOffset( pOffset, nOffset, &nPos, nOffsetTol ) ) - nOffset = (USHORT)(*pOffset)[nPos]; + nOffset = (sal_uInt16)(*pOffset)[nPos]; else pOffset->Insert( nOffset ); if ( nWidth ) @@ -318,31 +318,31 @@ void ScHTMLLayoutParser::MakeColNoRef( ScHTMLColOffset* pOffset, USHORT nOffset, } -void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, USHORT& nOldOffset, - USHORT& nNewOffset, USHORT nOffsetTol ) +void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, sal_uInt16& nOldOffset, + sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol ) { DBG_ASSERT( pOffset, "ScHTMLLayoutParser::ModifyOffset - illegal call" ); SCCOL nPos; if ( !SeekOffset( pOffset, nOldOffset, &nPos, nOffsetTol ) ) { if ( SeekOffset( pOffset, nNewOffset, &nPos, nOffsetTol ) ) - nNewOffset = (USHORT)(*pOffset)[nPos]; + nNewOffset = (sal_uInt16)(*pOffset)[nPos]; else pOffset->Insert( nNewOffset ); return ; } - nOldOffset = (USHORT)(*pOffset)[nPos]; + nOldOffset = (sal_uInt16)(*pOffset)[nPos]; SCCOL nPos2; if ( SeekOffset( pOffset, nNewOffset, &nPos2, nOffsetTol ) ) { - nNewOffset = (USHORT)(*pOffset)[nPos2]; + nNewOffset = (sal_uInt16)(*pOffset)[nPos2]; return ; } - ULONG* pData = ((ULONG*) pOffset->GetData()) + nPos; //! QAD + sal_uLong* pData = ((sal_uLong*) pOffset->GetData()) + nPos; //! QAD long nDiff = nNewOffset - nOldOffset; if ( nDiff < 0 ) { - const ULONG* pStop = pOffset->GetData(); + const sal_uLong* pStop = pOffset->GetData(); do { *pData += nDiff; @@ -350,7 +350,7 @@ void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, USHORT& nOldOff } else { - const ULONG* pStop = pOffset->GetData() + pOffset->Count(); + const sal_uLong* pStop = pOffset->GetData() + pOffset->Count(); do { *pData += nDiff; @@ -359,17 +359,17 @@ void ScHTMLLayoutParser::ModifyOffset( ScHTMLColOffset* pOffset, USHORT& nOldOff } -void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, BOOL bJoin ) +void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, sal_Bool bJoin ) { if ( ValidCol(pE->nCol) ) { // wuerde sonst bei ScAddress falschen Wert erzeugen, evtl. Endlosschleife! - BOOL bBadCol = FALSE; - BOOL bAgain; + sal_Bool bBadCol = false; + sal_Bool bAgain; ScRange aRange( pE->nCol, pE->nRow, 0, pE->nCol + pE->nColOverlap - 1, pE->nRow + pE->nRowOverlap - 1, 0 ); do { - bAgain = FALSE; + bAgain = false; for ( size_t i = 0, nRanges = xLockedList->size(); i < nRanges; ++i ) { ScRange* pR = (*xLockedList)[i]; @@ -378,10 +378,10 @@ void ScHTMLLayoutParser::SkipLocked( ScEEParseEntry* pE, BOOL bJoin ) pE->nCol = pR->aEnd.Col() + 1; SCCOL nTmp = pE->nCol + pE->nColOverlap - 1; if ( pE->nCol > MAXCOL || nTmp > MAXCOL ) - bBadCol = TRUE; + bBadCol = sal_True; else { - bAgain = TRUE; + bAgain = sal_True; aRange.aStart.SetCol( pE->nCol ); aRange.aEnd.SetCol( nTmp ); } @@ -401,11 +401,11 @@ void ScHTMLLayoutParser::Adjust() ScHTMLAdjustStack aStack; ScHTMLAdjustStackEntry* pS; - USHORT nTab = 0; + sal_uInt16 nTab = 0; SCCOL nLastCol = SCCOL_MAX; SCROW nNextRow = 0; SCROW nCurRow = 0; - USHORT nPageWidth = (USHORT) aPageSize.Width(); + sal_uInt16 nPageWidth = (sal_uInt16) aPageSize.Width(); Table* pTab = NULL; for ( size_t i = 0, nListSize = maList.size(); i < nListSize; ++i ) { @@ -431,7 +431,7 @@ void ScHTMLLayoutParser::Adjust() else nCurRow = nNextRow = pE->nRow; SCROW nR; - if ( pTab && ((nR = (SCROW)(ULONG)pTab->Get( nCurRow )) != 0) ) + if ( pTab && ((nR = (SCROW)(sal_uLong)pTab->Get( nCurRow )) != 0) ) nNextRow += nR; else nNextRow++; @@ -447,7 +447,7 @@ void ScHTMLLayoutParser::Adjust() pTab = (pTables ? (Table*) pTables->Get( nTab ) : NULL); // neuer Zeilenabstand SCROW nR; - if ( pTab && ((nR = (SCROW)(ULONG)pTab->Get( nCurRow )) != 0) ) + if ( pTab && ((nR = (SCROW)(sal_uLong)pTab->Get( nCurRow )) != 0) ) nNextRow = nCurRow + nR; else nNextRow = nCurRow + 1; @@ -461,7 +461,7 @@ void ScHTMLLayoutParser::Adjust() SCROW nRowSpan = pE->nRowOverlap; for ( SCROW j=0; j < nRowSpan; j++ ) { // aus merged Zeilen resultierendes RowSpan - SCROW nRows = (SCROW)(ULONG)pTab->Get( nRow+j ); + SCROW nRows = (SCROW)(sal_uLong)pTab->Get( nRow+j ); if ( nRows > 1 ) { pE->nRowOverlap += nRows - 1; @@ -478,18 +478,18 @@ void ScHTMLLayoutParser::Adjust() // echte Col SeekOffset( pColOffset, pE->nOffset, &pE->nCol, nOffsetTolerance ); SCCOL nColBeforeSkip = pE->nCol; - SkipLocked( pE, FALSE ); + SkipLocked( pE, false ); if ( pE->nCol != nColBeforeSkip ) { SCCOL nCount = (SCCOL)pColOffset->Count(); if ( nCount <= pE->nCol ) { - pE->nOffset = (USHORT) (*pColOffset)[nCount-1]; + pE->nOffset = (sal_uInt16) (*pColOffset)[nCount-1]; MakeCol( pColOffset, pE->nOffset, pE->nWidth, nOffsetTolerance, nOffsetTolerance ); } else { - pE->nOffset = (USHORT) (*pColOffset)[pE->nCol]; + pE->nOffset = (sal_uInt16) (*pColOffset)[pE->nCol]; } } SCCOL nPos; @@ -515,7 +515,7 @@ void ScHTMLLayoutParser::Adjust() } -USHORT ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE ) +sal_uInt16 ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE ) { if ( pE->nWidth ) return pE->nWidth; @@ -523,7 +523,7 @@ USHORT ScHTMLLayoutParser::GetWidth( ScEEParseEntry* pE ) nColCntStart + pE->nColOverlap), static_cast<sal_Int32>( pLocalColOffset->Count() - 1)); SCCOL nPos = (nTmp < 0 ? 0 : static_cast<SCCOL>(nTmp)); - USHORT nOff2 = (USHORT) (*pLocalColOffset)[nPos]; + sal_uInt16 nOff2 = (sal_uInt16) (*pLocalColOffset)[nPos]; if ( pE->nOffset < nOff2 ) return nOff2 - pE->nOffset; return 0; @@ -535,26 +535,26 @@ void ScHTMLLayoutParser::SetWidths() ScEEParseEntry* pE; SCCOL nCol; if ( !nTableWidth ) - nTableWidth = (USHORT) aPageSize.Width(); + nTableWidth = (sal_uInt16) aPageSize.Width(); SCCOL nColsPerRow = nMaxCol - nColCntStart; if ( nColsPerRow <= 0 ) nColsPerRow = 1; if ( pLocalColOffset->Count() <= 2 ) { // nur PageSize, es gab keine Width-Angabe - USHORT nWidth = nTableWidth / static_cast<USHORT>(nColsPerRow); - USHORT nOff = nColOffsetStart; - pLocalColOffset->Remove( (USHORT)0, pLocalColOffset->Count() ); + sal_uInt16 nWidth = nTableWidth / static_cast<sal_uInt16>(nColsPerRow); + sal_uInt16 nOff = nColOffsetStart; + pLocalColOffset->Remove( (sal_uInt16)0, pLocalColOffset->Count() ); for ( nCol = 0; nCol <= nColsPerRow; ++nCol, nOff = nOff + nWidth ) { MakeColNoRef( pLocalColOffset, nOff, 0, 0, 0 ); } - nTableWidth = (USHORT)((*pLocalColOffset)[pLocalColOffset->Count() -1 ] - (*pLocalColOffset)[0]); + nTableWidth = (sal_uInt16)((*pLocalColOffset)[pLocalColOffset->Count() -1 ] - (*pLocalColOffset)[0]); for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i ) { pE = maList[ i ]; if ( pE->nTab == nTable ) { - pE->nOffset = (USHORT) (*pLocalColOffset)[pE->nCol - nColCntStart]; + pE->nOffset = (sal_uInt16) (*pLocalColOffset)[pE->nCol - nColCntStart]; pE->nWidth = 0; // to be recalculated later } } @@ -564,10 +564,10 @@ void ScHTMLLayoutParser::SetWidths() // wieso eigentlich kein pE ?!? if ( nFirstTableCell < maList.size() ) { - USHORT* pOffsets = new USHORT[ nColsPerRow+1 ]; - memset( pOffsets, 0, (nColsPerRow+1) * sizeof(USHORT) ); - USHORT* pWidths = new USHORT[ nColsPerRow ]; - memset( pWidths, 0, nColsPerRow * sizeof(USHORT) ); + sal_uInt16* pOffsets = new sal_uInt16[ nColsPerRow+1 ]; + memset( pOffsets, 0, (nColsPerRow+1) * sizeof(sal_uInt16) ); + sal_uInt16* pWidths = new sal_uInt16[ nColsPerRow ]; + memset( pWidths, 0, nColsPerRow * sizeof(sal_uInt16) ); pOffsets[0] = nColOffsetStart; for ( size_t i = nFirstTableCell, nListSize = maList.size(); i < nListSize; ++i ) { @@ -584,8 +584,8 @@ void ScHTMLLayoutParser::SetWidths() } else { // try to find a single undefined width - USHORT nTotal = 0; - BOOL bFound = FALSE; + sal_uInt16 nTotal = 0; + sal_Bool bFound = false; SCCOL nHere = 0; SCCOL nStop = Min( static_cast<SCCOL>(nCol + pE->nColOverlap), nColsPerRow ); for ( ; nCol < nStop; nCol++ ) @@ -596,10 +596,10 @@ void ScHTMLLayoutParser::SetWidths() { if ( bFound ) { - bFound = FALSE; + bFound = false; break; // for } - bFound = TRUE; + bFound = sal_True; nHere = nCol; } } @@ -609,8 +609,8 @@ void ScHTMLLayoutParser::SetWidths() } } } - USHORT nWidths = 0; - USHORT nUnknown = 0; + sal_uInt16 nWidths = 0; + sal_uInt16 nUnknown = 0; for ( nCol = 0; nCol < nColsPerRow; nCol++ ) { if ( pWidths[nCol] ) @@ -620,7 +620,7 @@ void ScHTMLLayoutParser::SetWidths() } if ( nUnknown ) { - USHORT nW = ((nWidths < nTableWidth) ? + sal_uInt16 nW = ((nWidths < nTableWidth) ? ((nTableWidth - nWidths) / nUnknown) : (nTableWidth / nUnknown)); for ( nCol = 0; nCol < nColsPerRow; nCol++ ) @@ -633,7 +633,7 @@ void ScHTMLLayoutParser::SetWidths() { pOffsets[nCol] = pOffsets[nCol-1] + pWidths[nCol-1]; } - pLocalColOffset->Remove( (USHORT)0, pLocalColOffset->Count() ); + pLocalColOffset->Remove( (sal_uInt16)0, pLocalColOffset->Count() ); for ( nCol = 0; nCol <= nColsPerRow; nCol++ ) { MakeColNoRef( pLocalColOffset, pOffsets[nCol], 0, 0, 0 ); @@ -664,7 +664,7 @@ void ScHTMLLayoutParser::SetWidths() } if ( pLocalColOffset->Count() ) { - USHORT nMax = (USHORT) (*pLocalColOffset)[pLocalColOffset->Count() - 1]; + sal_uInt16 nMax = (sal_uInt16) (*pLocalColOffset)[pLocalColOffset->Count() - 1]; if ( aPageSize.Width() < nMax ) aPageSize.Width() = nMax; } @@ -698,12 +698,12 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE ) nCol = pE->nCol - nColCntStart; SCCOL nCount = static_cast<SCCOL>(pLocalColOffset->Count()); if ( nCol < nCount ) - nColOffset = (USHORT) (*pLocalColOffset)[nCol]; + nColOffset = (sal_uInt16) (*pLocalColOffset)[nCol]; else - nColOffset = (USHORT) (*pLocalColOffset)[nCount - 1]; + nColOffset = (sal_uInt16) (*pLocalColOffset)[nCount - 1]; } pE->nOffset = nColOffset; - USHORT nWidth = GetWidth( pE ); + sal_uInt16 nWidth = GetWidth( pE ); MakeCol( pLocalColOffset, pE->nOffset, nWidth, nOffsetTolerance, nOffsetTolerance ); if ( pE->nWidth ) pE->nWidth = nWidth; @@ -715,10 +715,10 @@ void ScHTMLLayoutParser::Colonize( ScEEParseEntry* pE ) void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo ) { - bInCell = FALSE; + bInCell = false; if ( bTabInTabCell ) { // in TableOff vom Stack geholt - bTabInTabCell = FALSE; + bTabInTabCell = false; bool found = false; for ( size_t i = 0, nListSize = maList.size(); i < nListSize; ++i ) { @@ -734,7 +734,7 @@ void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo ) return ; } if ( pActEntry->nTab == 0 ) - pActEntry->nWidth = (USHORT) aPageSize.Width(); + pActEntry->nWidth = (sal_uInt16) aPageSize.Width(); Colonize( pActEntry ); nColCnt = pActEntry->nCol + pActEntry->nColOverlap; if ( nMaxCol < nColCnt ) @@ -759,7 +759,7 @@ void ScHTMLLayoutParser::CloseEntry( ImportInfo* pInfo ) rSel.nEndPara = rSel.nStartPara; } if ( rSel.HasRange() ) - pActEntry->aItemSet.Put( SfxBoolItem( ATTR_LINEBREAK, TRUE ) ); + pActEntry->aItemSet.Put( SfxBoolItem( ATTR_LINEBREAK, true ) ); maList.push_back( pActEntry ); NewActEntry( pActEntry ); // neuer freifliegender pActEntry } @@ -783,9 +783,9 @@ IMPL_LINK( ScHTMLLayoutParser, HTMLImportHdl, ImportInfo*, pInfo ) // If text remains: create paragraph, without calling CloseEntry(). if( bInCell ) // ...but only in opened table cells. { - bInCell = FALSE; + bInCell = false; NextRow( pInfo ); - bInCell = TRUE; + bInCell = sal_True; } CloseEntry( pInfo ); } @@ -848,11 +848,11 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo ) OSL_FAIL( "Dummbatz-Dok! <TH> oder <TD> ohne vorheriges <TABLE>" ); TableOn( pInfo ); } - bInCell = TRUE; - BOOL bHorJustifyCenterTH = (pInfo->nToken == HTML_TABLEHEADER_ON); + bInCell = sal_True; + sal_Bool bHorJustifyCenterTH = (pInfo->nToken == HTML_TABLEHEADER_ON); const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) @@ -869,7 +869,7 @@ void ScHTMLLayoutParser::TableDataOn( ImportInfo* pInfo ) break; case HTML_O_ALIGN: { - bHorJustifyCenterTH = FALSE; + bHorJustifyCenterTH = false; SvxCellHorJustify eVal; const String& rOptVal = pOption->GetString(); if ( rOptVal.CompareIgnoreCaseToAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) == COMPARE_EQUAL ) @@ -961,25 +961,25 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) if ( ++nTableLevel > 1 ) { // Table in Table - USHORT nTmpColOffset = nColOffset; // wird in Colonize noch angepasst + sal_uInt16 nTmpColOffset = nColOffset; // wird in Colonize noch angepasst Colonize( pActEntry ); aTableStack.Push( new ScHTMLTableStackEntry( pActEntry, xLockedList, pLocalColOffset, nFirstTableCell, nColCnt, nRowCnt, nColCntStart, nMaxCol, nTable, nTableWidth, nColOffset, nColOffsetStart, bFirstRow ) ); - USHORT nLastWidth = nTableWidth; + sal_uInt16 nLastWidth = nTableWidth; nTableWidth = GetWidth( pActEntry ); if ( nTableWidth == nLastWidth && nMaxCol - nColCntStart > 1 ) { // es muss mehr als einen geben, also kann dieser nicht alles sein - nTableWidth = nLastWidth / static_cast<USHORT>((nMaxCol - nColCntStart)); + nTableWidth = nLastWidth / static_cast<sal_uInt16>((nMaxCol - nColCntStart)); } nLastWidth = nTableWidth; if ( pInfo->nToken == HTML_TABLE_ON ) { // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) @@ -998,15 +998,15 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) } } } - bInCell = FALSE; + bInCell = false; if ( bTabInTabCell && !(nTableWidth < nLastWidth) ) { // mehrere Tabellen in einer Zelle, untereinander - bTabInTabCell = FALSE; + bTabInTabCell = false; NextRow( pInfo ); } else { // in dieser Zelle geht's los, oder nebeneinander - bTabInTabCell = FALSE; + bTabInTabCell = false; nColCntStart = nColCnt; nColOffset = nTmpColOffset; nColOffsetStart = nColOffset; @@ -1036,8 +1036,8 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) if ( pInfo->nToken == HTML_TABLE_ON ) { // es kann auch TD oder TH sein, wenn es vorher kein TABLE gab const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) @@ -1058,7 +1058,7 @@ void ScHTMLLayoutParser::TableOn( ImportInfo* pInfo ) } } nTable = ++nMaxTable; - bFirstRow = TRUE; + bFirstRow = true; nFirstTableCell = maList.size(); pLocalColOffset = new ScHTMLColOffset; @@ -1087,7 +1087,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) if ( nRows > 1 ) { // Groesse der Tabelle an dieser Position eintragen SCROW nRow = pS->nRowCnt; - USHORT nTab = pS->nTable; + sal_uInt16 nTab = pS->nTable; if ( !pTables ) pTables = new Table; // Hoehen der aeusseren Table @@ -1127,8 +1127,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) { // aussen for ( SCROW j=0; j < nRowSpan; j++ ) { - ULONG nRowKey = nRow + j; - SCROW nR = (SCROW)(ULONG)pTab1->Get( nRowKey ); + sal_uLong nRowKey = nRow + j; + SCROW nR = (SCROW)(sal_uLong)pTab1->Get( nRowKey ); if ( !nR ) pTab1->Insert( nRowKey, (void*)(sal_IntPtr)nRowsPerRow1 ); else if ( nRowsPerRow1 > nR ) @@ -1141,7 +1141,7 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) nR += nAdd; if ( (nR % nRows) == 0 ) { // nur wenn abbildbar - SCROW nR2 = (SCROW)(ULONG)pTab1->Get( nRowKey+1 ); + SCROW nR2 = (SCROW)(sal_uLong)pTab1->Get( nRowKey+1 ); if ( nR2 > nAdd ) { // nur wenn wirklich Platz pTab1->Replace( nRowKey, (void*)(sal_IntPtr)nR ); @@ -1161,8 +1161,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) } for ( SCROW j=0; j < nRows; j++ ) { - ULONG nRowKey = nRow + j; - SCROW nR = (SCROW)(ULONG)pTab2->Get( nRowKey ); + sal_uLong nRowKey = nRow + j; + SCROW nR = (SCROW)(sal_uLong)pTab2->Get( nRowKey ); if ( !nR ) pTab2->Insert( nRowKey, (void*)(sal_IntPtr)nRowsPerRow2 ); else if ( nRowsPerRow2 > nR ) @@ -1178,10 +1178,10 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) pE->nWidth = nTableWidth; else if ( pE->nWidth < nTableWidth ) { - USHORT nOldOffset = pE->nOffset + pE->nWidth; - USHORT nNewOffset = pE->nOffset + nTableWidth; + sal_uInt16 nOldOffset = pE->nOffset + pE->nWidth; + sal_uInt16 nNewOffset = pE->nOffset + nTableWidth; ModifyOffset( pS->pLocalColOffset, nOldOffset, nNewOffset, nOffsetTolerance ); - USHORT nTmp = nNewOffset - pE->nOffset - pE->nWidth; + sal_uInt16 nTmp = nNewOffset - pE->nOffset - pE->nWidth; pE->nWidth = nNewOffset - pE->nOffset; pS->nTableWidth = pS->nTableWidth + nTmp; if ( pS->nColOffset >= nOldOffset ) @@ -1209,8 +1209,8 @@ void ScHTMLLayoutParser::TableOff( ImportInfo* pInfo ) pActEntry = pE; delete pS; } - bTabInTabCell = TRUE; - bInCell = TRUE; + bTabInTabCell = sal_True; + bInCell = sal_True; } else { // einfache Table beendet @@ -1234,8 +1234,8 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) ScHTMLImage* pImage = new ScHTMLImage; pActEntry->maImageList.push_back( pImage ); const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) @@ -1283,7 +1283,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) return ; } - USHORT nFormat; + sal_uInt16 nFormat; Graphic* pGraphic = new Graphic; GraphicFilter* pFilter = GraphicFilter::GetGraphicFilter(); if ( GRFILTER_OK != GraphicFilter::LoadGraphic( pImage->aURL, pImage->aFilterName, @@ -1294,7 +1294,7 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) } if ( !pActEntry->bHasGraphic ) { // discard any ALT text in this cell if we have any image - pActEntry->bHasGraphic = TRUE; + pActEntry->bHasGraphic = sal_True; pActEntry->aAltText.Erase(); } pImage->aFilterName = pFilter->GetImportFormatName( nFormat ); @@ -1327,15 +1327,15 @@ void ScHTMLLayoutParser::Image( ImportInfo* pInfo ) void ScHTMLLayoutParser::ColOn( ImportInfo* pInfo ) { const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) { case HTML_O_WIDTH: { - USHORT nVal = GetWidthPixel( pOption ); + sal_uInt16 nVal = GetWidthPixel( pOption ); MakeCol( pLocalColOffset, nColOffset, nVal, 0, 0 ); nColOffset = nColOffset + nVal; } @@ -1345,13 +1345,13 @@ void ScHTMLLayoutParser::ColOn( ImportInfo* pInfo ) } -USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption ) +sal_uInt16 ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption ) { const String& rOptVal = pOption->GetString(); if ( rOptVal.Search('%') != STRING_NOTFOUND ) { // Prozent - USHORT nW = (nTableWidth ? nTableWidth : (USHORT) aPageSize.Width()); - return (USHORT)((pOption->GetNumber() * nW) / 100); + sal_uInt16 nW = (nTableWidth ? nTableWidth : (sal_uInt16) aPageSize.Width()); + return (sal_uInt16)((pOption->GetNumber() * nW) / 100); } else { @@ -1361,7 +1361,7 @@ USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption ) return 0; } else - return (USHORT)pOption->GetNumber(); // Pixel + return (sal_uInt16)pOption->GetNumber(); // Pixel } } @@ -1369,8 +1369,8 @@ USHORT ScHTMLLayoutParser::GetWidthPixel( const HTMLOption* pOption ) void ScHTMLLayoutParser::AnchorOn( ImportInfo* pInfo ) { const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) @@ -1385,7 +1385,7 @@ void ScHTMLLayoutParser::AnchorOn( ImportInfo* pInfo ) } -BOOL ScHTMLLayoutParser::IsAtBeginningOfText( ImportInfo* pInfo ) +sal_Bool ScHTMLLayoutParser::IsAtBeginningOfText( ImportInfo* pInfo ) { ESelection& rSel = pActEntry->aSel; return rSel.nStartPara == rSel.nEndPara && @@ -1399,8 +1399,8 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo ) if ( IsAtBeginningOfText( pInfo ) ) { // nur am Anfang des Textes, gilt dann fuer gesamte Zelle const HTMLOptions* pOptions = ((HTMLParser*)pInfo->pParser)->GetOptions(); - USHORT nArrLen = pOptions->Count(); - for ( USHORT i = 0; i < nArrLen; i++ ) + sal_uInt16 nArrLen = pOptions->Count(); + for ( sal_uInt16 i = 0; i < nArrLen; i++ ) { const HTMLOption* pOption = (*pOptions)[i]; switch( pOption->GetToken() ) @@ -1426,7 +1426,7 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo ) break; case HTML_O_SIZE : { - USHORT nSize = (USHORT) pOption->GetNumber(); + sal_uInt16 nSize = (sal_uInt16) pOption->GetNumber(); if ( nSize == 0 ) nSize = 1; else if ( nSize > SC_HTML_FONTSIZES ) @@ -1450,7 +1450,7 @@ void ScHTMLLayoutParser::FontOn( ImportInfo* pInfo ) void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) { - BOOL bSetLastToken = TRUE; + sal_Bool bSetLastToken = sal_True; switch ( pInfo->nToken ) { case HTML_META: @@ -1465,7 +1465,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) break; case HTML_TITLE_ON: { - bInTitle = TRUE; + bInTitle = sal_True; aString.Erase(); } break; @@ -1481,7 +1481,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) uno::UNO_QUERY_THROW); xDPS->getDocumentProperties()->setTitle(aString); } - bInTitle = FALSE; + bInTitle = false; } break; case HTML_TABLE_ON: @@ -1498,7 +1498,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) { if ( bInCell ) CloseEntry( pInfo ); - // bInCell nicht TRUE setzen, das macht TableDataOn + // bInCell nicht sal_True setzen, das macht TableDataOn pActEntry->aItemSet.Put( SvxWeightItem( WEIGHT_BOLD, ATTR_FONT_WEIGHT) ); } // fall thru @@ -1612,7 +1612,7 @@ void ScHTMLLayoutParser::ProcToken( ImportInfo* pInfo ) break; default: { // nLastToken nicht setzen! - bSetLastToken = FALSE; + bSetLastToken = false; } } if ( bSetLastToken ) @@ -2731,7 +2731,7 @@ ScHTMLQueryParser::~ScHTMLQueryParser() { } -ULONG ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL ) +sal_uLong ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL ) { SvKeyValueIteratorRef xValues; SvKeyValueIterator* pAttributes = 0; @@ -2759,7 +2759,7 @@ ULONG ScHTMLQueryParser::Read( SvStream& rStrm, const String& rBaseURL ) Link aOldLink = pEdit->GetImportHdl(); pEdit->SetImportHdl( LINK( this, ScHTMLQueryParser, HTMLImportHdl ) ); - ULONG nErr = pEdit->Read( rStrm, rBaseURL, EE_FORMAT_HTML, pAttributes ); + sal_uLong nErr = pEdit->Read( rStrm, rBaseURL, EE_FORMAT_HTML, pAttributes ); pEdit->SetImportHdl( aOldLink ); mxGlobTable->Recalc(); diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx index f908fb1d9668..29799635aa2b 100644 --- a/sc/source/filter/inc/XclExpChangeTrack.hxx +++ b/sc/source/filter/inc/XclExpChangeTrack.hxx @@ -58,7 +58,7 @@ public: inline const sal_uInt8* GetGUID() const { return aGUID; } - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -94,7 +94,7 @@ private: public: XclExpUsersViewBegin( const sal_uInt8* pGUID, sal_uInt32 nTab ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -107,7 +107,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -120,7 +120,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -133,7 +133,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -146,7 +146,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -159,7 +159,7 @@ private: virtual void SaveCont( XclExpStream& rStrm ); public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -169,13 +169,13 @@ public: class XclExpChTrEmpty : public ExcRecord { private: - UINT16 nRecNum; + sal_uInt16 nRecNum; public: - inline XclExpChTrEmpty( UINT16 nNum ) : nRecNum( nNum ) {} + inline XclExpChTrEmpty( sal_uInt16 nNum ) : nRecNum( nNum ) {} virtual ~XclExpChTrEmpty(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -190,7 +190,7 @@ private: public: virtual ~XclExpChTr0x0195(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -209,7 +209,7 @@ public: inline XclExpChTr0x0194( const ScChangeTrack& rChangeTrack ); virtual ~XclExpChTr0x0194(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -237,7 +237,7 @@ public: inline void SetGUID( const sal_uInt8* pGUID ) { memcpy( aGUID, pGUID, 16 ); } inline void SetCount( sal_uInt32 nNew ) { nCount = nNew; } - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -264,7 +264,7 @@ public: sal_Int32 nLogNumber ); virtual ~XclExpChTrInfo(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -344,7 +344,7 @@ public: void Copy( const XclExpChTrTabIdBuffer& rBuffer ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -504,7 +504,7 @@ public: const XclExpChTrTabIdBuffer& rTabIdBuffer ); virtual ~XclExpChTrCellContent(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -533,7 +533,7 @@ public: ScChangeTrack& rChangeTrack ); virtual ~XclExpChTrInsert(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -557,7 +557,7 @@ public: const XclExpChTrTabIdBuffer& rTabIdBuffer ); virtual ~XclExpChTrInsertTab(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -584,7 +584,7 @@ public: ScChangeTrack& rChangeTrack ); virtual ~XclExpChTrMoveRange(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -602,7 +602,7 @@ public: XclExpChTr0x014A( const XclExpChTrInsert& rAction ); virtual ~XclExpChTr0x014A(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetActionByteCount() const; virtual void SaveXml( XclExpXmlStream& rStrm ); diff --git a/sc/source/filter/inc/XclImpChangeTrack.hxx b/sc/source/filter/inc/XclImpChangeTrack.hxx index 402085eae6e7..029e334d79d2 100644 --- a/sc/source/filter/inc/XclImpChangeTrack.hxx +++ b/sc/source/filter/inc/XclImpChangeTrack.hxx @@ -174,7 +174,7 @@ class XclImpChTrFmlConverter : public ExcelToSc8 private: XclImpChangeTrack& rChangeTrack; - virtual bool Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ); + virtual bool Read3DTabReference( sal_uInt16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ); public: inline XclImpChTrFmlConverter( diff --git a/sc/source/filter/inc/decl.h b/sc/source/filter/inc/decl.h index c57446c8299d..91157cf9a9a8 100644 --- a/sc/source/filter/inc/decl.h +++ b/sc/source/filter/inc/decl.h @@ -39,7 +39,7 @@ typedef sal_Char STRING16[ 16 ]; typedef sal_Char STRING14[ 14 ]; typedef sal_Char STRING8[ 8 ]; typedef sal_Char STRING6[ 6 ]; -typedef USHORT USHORT4[ 4 ]; +typedef sal_uInt16 USHORT4[ 4 ]; //typedef unsigned short USHORT4[ 4 ]; #endif diff --git a/sc/source/filter/inc/dif.hxx b/sc/source/filter/inc/dif.hxx index 57627c1f7347..374ea301b976 100644 --- a/sc/source/filter/inc/dif.hxx +++ b/sc/source/filter/inc/dif.hxx @@ -72,41 +72,41 @@ class DifParser public: String aData; double fVal; - UINT32 nVector; - UINT32 nVal; - UINT32 nNumFormat; + sal_uInt32 nVector; + sal_uInt32 nVal; + sal_uInt32 nNumFormat; CharSet eCharSet; private: SvNumberFormatter* pNumFormatter; SvStream& rIn; - BOOL bPlain; + sal_Bool bPlain; String aLookAheadLine; bool ReadNextLine( String& rStr ); bool LookAhead(); DATASET GetNumberDataset( const sal_Unicode* pPossibleNumericData ); - static inline BOOL IsBOT( const sal_Unicode* pRef ); - static inline BOOL IsEOD( const sal_Unicode* pRef ); - static inline BOOL Is1_0( const sal_Unicode* pRef ); + static inline sal_Bool IsBOT( const sal_Unicode* pRef ); + static inline sal_Bool IsEOD( const sal_Unicode* pRef ); + static inline sal_Bool Is1_0( const sal_Unicode* pRef ); public: - DifParser( SvStream&, const UINT32 nOption, ScDocument&, CharSet ); + DifParser( SvStream&, const sal_uInt32 nOption, ScDocument&, CharSet ); TOPIC GetNextTopic( void ); DATASET GetNextDataset( void ); - const sal_Unicode* ScanIntVal( const sal_Unicode* pStart, UINT32& rRet ); - BOOL ScanFloatVal( const sal_Unicode* pStart ); + const sal_Unicode* ScanIntVal( const sal_Unicode* pStart, sal_uInt32& rRet ); + sal_Bool ScanFloatVal( const sal_Unicode* pStart ); - inline BOOL IsNumber( const sal_Unicode cChar ); - inline BOOL IsNumberEnding( const sal_Unicode cChar ); + inline sal_Bool IsNumber( const sal_Unicode cChar ); + inline sal_Bool IsNumberEnding( const sal_Unicode cChar ); - static inline BOOL IsV( const sal_Unicode* pRef ); + static inline sal_Bool IsV( const sal_Unicode* pRef ); - inline BOOL IsPlain( void ) const; + inline sal_Bool IsPlain( void ) const; }; -inline BOOL DifParser::IsBOT( const sal_Unicode* pRef ) +inline sal_Bool DifParser::IsBOT( const sal_Unicode* pRef ) { return ( pRef[ 0 ] == pKeyBOT[0] && pRef[ 1 ] == pKeyBOT[1] && @@ -114,7 +114,7 @@ inline BOOL DifParser::IsBOT( const sal_Unicode* pRef ) pRef[ 3 ] == pKeyBOT[3] ); } -inline BOOL DifParser::IsEOD( const sal_Unicode* pRef ) +inline sal_Bool DifParser::IsEOD( const sal_Unicode* pRef ) { return ( pRef[ 0 ] == pKeyEOD[0] && pRef[ 1 ] == pKeyEOD[1] && @@ -122,7 +122,7 @@ inline BOOL DifParser::IsEOD( const sal_Unicode* pRef ) pRef[ 3 ] == pKeyEOD[3] ); } -inline BOOL DifParser::Is1_0( const sal_Unicode* pRef ) +inline sal_Bool DifParser::Is1_0( const sal_Unicode* pRef ) { return ( pRef[ 0 ] == pKey1_0[0] && pRef[ 1 ] == pKey1_0[1] && @@ -130,23 +130,23 @@ inline BOOL DifParser::Is1_0( const sal_Unicode* pRef ) pRef[ 3 ] == pKey1_0[3] ); } -inline BOOL DifParser::IsV( const sal_Unicode* pRef ) +inline sal_Bool DifParser::IsV( const sal_Unicode* pRef ) { return ( pRef[ 0 ] == pKeyV[0] && pRef[ 1 ] == pKeyV[1] ); } -inline BOOL DifParser::IsNumber( const sal_Unicode cChar ) +inline sal_Bool DifParser::IsNumber( const sal_Unicode cChar ) { return ( cChar >= '0' && cChar <= '9' ); } -inline BOOL DifParser::IsNumberEnding( const sal_Unicode cChar ) +inline sal_Bool DifParser::IsNumberEnding( const sal_Unicode cChar ) { return ( cChar == 0x00 ); } -inline BOOL DifParser::IsPlain( void ) const +inline sal_Bool DifParser::IsPlain( void ) const { return bPlain; } @@ -157,7 +157,7 @@ class DifColumn struct ENTRY { - UINT32 nNumFormat; + sal_uInt32 nNumFormat; SCROW nStart; SCROW nEnd; }; @@ -169,9 +169,9 @@ class DifColumn void SetLogical( SCROW nRow ); - void SetNumFormat( SCROW nRow, const UINT32 nNumFormat ); + void SetNumFormat( SCROW nRow, const sal_uInt32 nNumFormat ); - void NewEntry( const SCROW nPos, const UINT32 nNumFormat ); + void NewEntry( const SCROW nPos, const sal_uInt32 nNumFormat ); void Apply( ScDocument&, const SCCOL nCol, const SCTAB nTab, const ScPatternAttr& ); @@ -182,20 +182,20 @@ class DifAttrCache { public: - DifAttrCache( const BOOL bPlain ); + DifAttrCache( const sal_Bool bPlain ); ~DifAttrCache(); void SetLogical( const SCCOL nCol, const SCROW nRow ); - void SetNumFormat( const SCCOL nCol, const SCROW nRow, const UINT32 nNumFormat ); + void SetNumFormat( const SCCOL nCol, const SCROW nRow, const sal_uInt32 nNumFormat ); void Apply( ScDocument&, SCTAB nTab ); private: DifColumn** ppCols; - BOOL bPlain; + sal_Bool bPlain; }; #endif diff --git a/sc/source/filter/inc/eeimport.hxx b/sc/source/filter/inc/eeimport.hxx index 2d1081c3debc..ed74cc22c140 100644 --- a/sc/source/filter/inc/eeimport.hxx +++ b/sc/source/filter/inc/eeimport.hxx @@ -50,7 +50,7 @@ protected: ScTabEditEngine* mpEngine; Table* mpRowHeights; - BOOL GraphicSize( SCCOL nCol, SCROW nRow, SCTAB nTab, + sal_Bool GraphicSize( SCCOL nCol, SCROW nRow, SCTAB nTab, ScEEParseEntry* ); void InsertGraphic( SCCOL nCol, SCROW nRow, SCTAB nTab, ScEEParseEntry* ); @@ -58,9 +58,9 @@ public: ScEEImport( ScDocument* pDoc, const ScRange& rRange ); virtual ~ScEEImport(); - virtual ULONG Read( SvStream& rStream, const String& rBaseURL ); + virtual sal_uLong Read( SvStream& rStream, const String& rBaseURL ); virtual ScRange GetRange() { return maRange; } - virtual void WriteToDocument( BOOL bSizeColsRows = FALSE, + virtual void WriteToDocument( sal_Bool bSizeColsRows = false, double nOutputFactor = 1.0, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ); diff --git a/sc/source/filter/inc/eeparser.hxx b/sc/source/filter/inc/eeparser.hxx index 45abeeab9051..0f5e2ddc627e 100644 --- a/sc/source/filter/inc/eeparser.hxx +++ b/sc/source/filter/inc/eeparser.hxx @@ -85,14 +85,14 @@ struct ScEEParseEntry pNumStr( NULL ), pName( NULL ), nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0), nColOverlap(1), nRowOverlap(1), - nOffset(0), nWidth(0), bHasGraphic(FALSE), bEntirePara(true) + nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true) {} ScEEParseEntry( const SfxItemSet& rItemSet ) : aItemSet( rItemSet ), pValStr( NULL ), pNumStr( NULL ), pName( NULL ), nCol(SCCOL_MAX), nRow(SCROW_MAX), nTab(0), nColOverlap(1), nRowOverlap(1), - nOffset(0), nWidth(0), bHasGraphic(FALSE), bEntirePara(true) + nOffset(0), nWidth(0), bHasGraphic(false), bEntirePara(true) {} ~ScEEParseEntry() { @@ -131,7 +131,7 @@ public: ScEEParser( EditEngine* ); virtual ~ScEEParser(); - virtual ULONG Read( SvStream&, const String& rBaseURL ) = 0; + virtual sal_uLong Read( SvStream&, const String& rBaseURL ) = 0; Table* GetColWidths() const { return pColWidths; } void GetDimensions( SCCOL& nCols, SCROW& nRows ) const diff --git a/sc/source/filter/inc/excdoc.hxx b/sc/source/filter/inc/excdoc.hxx index 3ba8b5e65936..75c0f2433569 100644 --- a/sc/source/filter/inc/excdoc.hxx +++ b/sc/source/filter/inc/excdoc.hxx @@ -62,9 +62,9 @@ private: XclExpCellTableRef mxCellTable; SCTAB mnScTab; // table number SC document - UINT16 nExcTab; // table number Excel document - UINT16 nAktRow; // fuer'n Iterator - UINT16 nAktCol; + sal_uInt16 nExcTab; // table number Excel document + sal_uInt16 nAktRow; // fuer'n Iterator + sal_uInt16 nAktCol; NameBuffer* pTabNames; diff --git a/sc/source/filter/inc/excform.hxx b/sc/source/filter/inc/excform.hxx index 9332f1ad502d..0744bdf52c64 100644 --- a/sc/source/filter/inc/excform.hxx +++ b/sc/source/filter/inc/excform.hxx @@ -44,9 +44,9 @@ protected: enum ExtensionType { EXTENSION_ARRAY, EXTENSION_NLR, EXTENSION_MEMAREA }; typedef ::std::vector< ExtensionType > ExtensionTypeVec; - BOOL bExternName; // wenn External Name gefunden wurde - static const UINT16 nRowMask; - static const UINT16 nLastInd; // letzter Index fuer Excel->SC- + sal_Bool bExternName; // wenn External Name gefunden wurde + static const sal_uInt16 nRowMask; + static const sal_uInt16 nLastInd; // letzter Index fuer Excel->SC- // Token Umsetzung XclFunctionProvider maFuncProv; const XclBiff meBiff; @@ -54,7 +54,7 @@ protected: // --------------------------------------------------------------- void DoMulArgs( DefTokenId eId, sal_uInt8 nNumArgs, sal_uInt8 mnMinParamCount = 0 ); - void ExcRelToScRel( UINT16 nRow, UINT8 nCol, ScSingleRefData&, const BOOL bName ); + void ExcRelToScRel( sal_uInt16 nRow, sal_uInt8 nCol, ScSingleRefData&, const sal_Bool bName ); public: ExcelToSc( const XclImpRoot& rRoot ); @@ -67,16 +67,16 @@ public: virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const String& rUrl, const ::std::vector<String>& rTabNames ); - virtual BOOL GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ); + virtual sal_Bool GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ); void GetDummy( const ScTokenArray*& ); const ScTokenArray* GetBoolErr( XclBoolError ); - BOOL GetShrFmla( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen ); + sal_Bool GetShrFmla( const ScTokenArray*&, XclImpStream& rStrm, sal_Size nFormulaLen ); static void SetError( ScFormulaCell& rCell, const ConvErr eErr ); - static inline BOOL IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 ); - static inline BOOL IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 ); + static inline sal_Bool IsComplColRange( const sal_uInt16 nCol1, const sal_uInt16 nCol2 ); + static inline sal_Bool IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 ); void SetComplCol( ScComplexRefData& ); void SetComplRow( ScComplexRefData& ); @@ -90,13 +90,13 @@ public: }; -inline BOOL ExcelToSc::IsComplColRange( const UINT16 nCol1, const UINT16 nCol2 ) +inline sal_Bool ExcelToSc::IsComplColRange( const sal_uInt16 nCol1, const sal_uInt16 nCol2 ) { return ( nCol1 == 0x00 ) && ( nCol2 == 0xFF ); } -inline BOOL ExcelToSc::IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 ) +inline sal_Bool ExcelToSc::IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 ) { return ( ( nRow1 & 0x3FFF ) == 0x0000 ) && ( ( nRow2 & 0x3FFF ) == 0x3FFF ); } @@ -121,12 +121,12 @@ public: private: const XclImpLinkManager& rLinkMan; - void ExcRelToScRel8( UINT16 nRow, UINT16 nCol, ScSingleRefData&, - const BOOL bName ); + void ExcRelToScRel8( sal_uInt16 nRow, sal_uInt16 nCol, ScSingleRefData&, + const sal_Bool bName ); - bool GetExternalFileIdFromXti( UINT16 nIxti, sal_uInt16& rFileId ) const; + bool GetExternalFileIdFromXti( sal_uInt16 nIxti, sal_uInt16& rFileId ) const; - virtual bool Read3DTabReference( UINT16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ); + virtual bool Read3DTabReference( sal_uInt16 nIxti, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ); public: ExcelToSc8( const XclImpRoot& rRoot ); @@ -139,13 +139,13 @@ public: virtual ConvErr ConvertExternName( const ScTokenArray*& rpArray, XclImpStream& rStrm, sal_Size nFormulaLen, const String& rUrl, const ::std::vector<String>& rTabNames ); - static inline BOOL IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 ); + static inline sal_Bool IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 ); - virtual BOOL GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ); + virtual sal_Bool GetAbsRefs( ScRangeList& rRangeList, XclImpStream& rStrm, sal_Size nLen ); }; -inline BOOL ExcelToSc8::IsComplRowRange( const UINT16 nRow1, const UINT16 nRow2 ) +inline sal_Bool ExcelToSc8::IsComplRowRange( const sal_uInt16 nRow1, const sal_uInt16 nRow2 ) { return ( nRow1 == 0x0000 ) && ( nRow2 == 0xFFFF ); } diff --git a/sc/source/filter/inc/excimp8.hxx b/sc/source/filter/inc/excimp8.hxx index 5d3679a73256..65adb65b16e6 100644 --- a/sc/source/filter/inc/excimp8.hxx +++ b/sc/source/filter/inc/excimp8.hxx @@ -77,7 +77,7 @@ protected: void Labelsst( void ); // 0xFD void Hlink( void ); // 0x01B8 - void Codename( BOOL bWBGlobals ); // 0x01BA + void Codename( sal_Bool bWBGlobals ); // 0x01BA void SheetProtection( void ); // 0x0867 virtual void EndSheet( void ); @@ -98,17 +98,17 @@ private: ScDBData* pCurrDBData; ScQueryParam aParam; SCSIZE nFirstEmpty; - BOOL bActive; - BOOL bHasConflict; - BOOL bCriteria; - BOOL bAutoOrAdvanced; + sal_Bool bActive; + sal_Bool bHasConflict; + sal_Bool bCriteria; + sal_Bool bAutoOrAdvanced; ScRange aCriteriaRange; String aFilterName; void CreateFromDouble( String& rStr, double fVal ); void SetCellAttribs(); void InsertQueryParam(); - void AmendAFName(const BOOL bUseUnNamed); + void AmendAFName(const sal_Bool bUseUnNamed); protected: public: @@ -127,12 +127,12 @@ public: void ReadAutoFilter( XclImpStream& rStrm ); - inline void Activate() { bActive = TRUE; } + inline void Activate() { bActive = sal_True; } void SetAdvancedRange( const ScRange* pRange ); void SetExtractPos( const ScAddress& rAddr ); - inline void SetAutoOrAdvanced() { bAutoOrAdvanced = TRUE; } - void Apply( const BOOL bUseUnNamed = FALSE ); - void CreateScDBData( const BOOL bUseUnNamed ); + inline void SetAutoOrAdvanced() { bAutoOrAdvanced = sal_True; } + void Apply( const sal_Bool bUseUnNamed = false ); + void CreateScDBData( const sal_Bool bUseUnNamed ); void EnableRemoveFilter(); }; @@ -142,7 +142,7 @@ class XclImpAutoFilterBuffer : private List private: using List::Insert; - UINT16 nAFActiveCount; + sal_uInt16 nAFActiveCount; inline XclImpAutoFilterData* _First() { return (XclImpAutoFilterData*) List::First(); } inline XclImpAutoFilterData* _Next() { return (XclImpAutoFilterData*) List::Next(); } @@ -162,7 +162,7 @@ public: XclImpAutoFilterData* GetByTab( SCTAB nTab ); inline void IncrementActiveAF() { nAFActiveCount++; } - inline BOOL UseUnNamed() { return nAFActiveCount == 1; } + inline sal_Bool UseUnNamed() { return nAFActiveCount == 1; } }; #endif diff --git a/sc/source/filter/inc/excrecds.hxx b/sc/source/filter/inc/excrecds.hxx index 7e1ce313c26b..b579b28e782e 100644 --- a/sc/source/filter/inc/excrecds.hxx +++ b/sc/source/filter/inc/excrecds.hxx @@ -76,7 +76,7 @@ public: virtual void Save( XclExpStream& rStrm ); virtual void SaveXml( XclExpXmlStream& rStrm ); - virtual UINT16 GetNum() const = 0; + virtual sal_uInt16 GetNum() const = 0; virtual sal_Size GetLen() const = 0; protected: @@ -96,7 +96,7 @@ private: protected: public: virtual void Save( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -116,7 +116,7 @@ public: inline ExcRecord* Next( void ) { return ( ExcRecord* ) List::Next(); } inline void Append( ExcRecord* pNew ) { if( pNew ) List::Insert( pNew, LIST_APPEND ); } - inline const ExcRecord* Get( UINT32 nNum ) const { return ( ExcRecord* ) List::GetObject( nNum ); } + inline const ExcRecord* Get( sal_uInt32 nNum ) const { return ( ExcRecord* ) List::GetObject( nNum ); } virtual void Save( XclExpStream& rStrm ); }; @@ -129,13 +129,13 @@ class ExcDummyRec : public ExcRecord protected: public: virtual void Save( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; - virtual const BYTE* GetData() const = 0; // byte data must contain header and body + virtual sal_uInt16 GetNum() const; + virtual const sal_uInt8* GetData() const = 0; // byte data must contain header and body }; //------------------------------------------------------- class ExcBoolRecord - -// stores BOOL as 16bit val ( 0x0000 | 0x0001 ) +// stores sal_Bool as 16bit val ( 0x0000 | 0x0001 ) class ExcBoolRecord : public ExcRecord { @@ -143,12 +143,12 @@ private: virtual void SaveCont( XclExpStream& rStrm ); protected: - BOOL bVal; + sal_Bool bVal; - inline ExcBoolRecord() : bVal( FALSE ) {} + inline ExcBoolRecord() : bVal( false ) {} public: - inline ExcBoolRecord( const BOOL bDefault ) : bVal( bDefault ) {} + inline ExcBoolRecord( const sal_Bool bDefault ) : bVal( bDefault ) {} virtual sal_Size GetLen( void ) const; }; @@ -160,10 +160,10 @@ class ExcBof_Base : public ExcRecord { private: protected: - UINT16 nDocType; - UINT16 nVers; - UINT16 nRupBuild; - UINT16 nRupYear; + sal_uInt16 nDocType; + sal_uInt16 nVers; + sal_uInt16 nRupBuild; + sal_uInt16 nRupYear; public: ExcBof_Base( void ); }; @@ -179,7 +179,7 @@ private: public: ExcBof( void ); - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual sal_Size GetLen( void ) const; }; @@ -194,7 +194,7 @@ private: public: ExcBofW( void ); - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual sal_Size GetLen( void ) const; }; @@ -205,7 +205,7 @@ class ExcEof : public ExcRecord { private: public: - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual sal_Size GetLen( void ) const; }; @@ -216,11 +216,11 @@ public: class ExcDummy_00 : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen( void ) const; - virtual const BYTE* GetData( void ) const; + virtual const sal_uInt8* GetData( void ) const; }; // EXC_ID_WINDOWPROTECTION @@ -259,11 +259,11 @@ private: class ExcDummy_040 : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen( void ) const; - virtual const BYTE* GetData( void ) const; + virtual const sal_uInt8* GetData( void ) const; }; @@ -271,11 +271,11 @@ public: class ExcDummy_041 : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen( void ) const; - virtual const BYTE* GetData( void ) const; + virtual const sal_uInt8* GetData( void ) const; }; @@ -285,11 +285,11 @@ class Exc1904 : public ExcBoolRecord { public: Exc1904( ScDocument& rDoc ); - virtual UINT16 GetNum( void ) const; + virtual sal_uInt16 GetNum( void ) const; virtual void SaveXml( XclExpXmlStream& rStrm ); private: - BOOL bDateCompatibility; + sal_Bool bDateCompatibility; }; @@ -300,7 +300,7 @@ class ExcBundlesheetBase : public ExcRecord protected: sal_Size nStrPos; sal_Size nOwnPos; // Position NACH # und Len - UINT16 nGrbit; + sal_uInt16 nGrbit; SCTAB nTab; ExcBundlesheetBase(); @@ -311,7 +311,7 @@ public: inline void SetStreamPos( sal_Size nNewStrPos ) { nStrPos = nNewStrPos; } void UpdateStreamPos( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; }; @@ -334,11 +334,11 @@ public: class ExcDummy_02a : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen( void ) const; - virtual const BYTE* GetData( void ) const; + virtual const sal_uInt8* GetData( void ) const; }; @@ -400,8 +400,8 @@ private: class ExcFilterCondition { private: - UINT8 nType; - UINT8 nOper; + sal_uInt8 nType; + sal_uInt8 nOper; double fVal; XclExpString* pText; @@ -410,11 +410,11 @@ public: ExcFilterCondition(); ~ExcFilterCondition(); - inline BOOL IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); } - inline BOOL HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); } - ULONG GetTextBytes() const; + inline sal_Bool IsEmpty() const { return (nType == EXC_AFTYPE_NOTUSED); } + inline sal_Bool HasEqual() const { return (nOper == EXC_AFOPER_EQUAL); } + sal_uLong GetTextBytes() const; - void SetCondition( UINT8 nTp, UINT8 nOp, double fV, String* pT ); + void SetCondition( sal_uInt8 nTp, sal_uInt8 nOp, double fV, String* pT ); void Save( XclExpStream& rStrm ); void SaveXml( XclExpXmlStream& rStrm ); @@ -426,25 +426,25 @@ public: class XclExpAutofilter : public XclExpRecord, protected XclExpRoot { private: - UINT16 nCol; - UINT16 nFlags; + sal_uInt16 nCol; + sal_uInt16 nFlags; ExcFilterCondition aCond[ 2 ]; - BOOL AddCondition( ScQueryConnect eConn, UINT8 nType, - UINT8 nOp, double fVal, String* pText, - BOOL bSimple = FALSE ); + sal_Bool AddCondition( ScQueryConnect eConn, sal_uInt8 nType, + sal_uInt8 nOp, double fVal, String* pText, + sal_Bool bSimple = false ); virtual void WriteBody( XclExpStream& rStrm ); protected: public: - XclExpAutofilter( const XclExpRoot& rRoot, UINT16 nC ); + XclExpAutofilter( const XclExpRoot& rRoot, sal_uInt16 nC ); - inline UINT16 GetCol() const { return nCol; } - inline BOOL HasCondition() const { return !aCond[ 0 ].IsEmpty(); } - inline BOOL HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); } + inline sal_uInt16 GetCol() const { return nCol; } + inline sal_Bool HasCondition() const { return !aCond[ 0 ].IsEmpty(); } + inline sal_Bool HasTop10() const { return ::get_flag( nFlags, EXC_AFFLAG_TOP10 ); } - BOOL AddEntry( const ScQueryEntry& rEntry ); + sal_Bool AddEntry( const ScQueryEntry& rEntry ); virtual void SaveXml( XclExpXmlStream& rStrm ); }; @@ -466,7 +466,7 @@ public: private: XclExpAutofilter* GetByCol( SCCOL nCol ); // always 0-based - BOOL IsFiltered( SCCOL nCol ); + sal_Bool IsFiltered( SCCOL nCol ); private: typedef XclExpRecordList< XclExpAutofilter > XclExpAutofilterList; diff --git a/sc/source/filter/inc/excscen.hxx b/sc/source/filter/inc/excscen.hxx index ccdec2eb143c..b1c671b956e6 100644 --- a/sc/source/filter/inc/excscen.hxx +++ b/sc/source/filter/inc/excscen.hxx @@ -44,8 +44,8 @@ class ExcScenarioCell private: String aValue; public: - const UINT16 nCol; - const UINT16 nRow; + const sal_uInt16 nCol; + const sal_uInt16 nRow; ExcScenarioCell( const UINT16 nC, const UINT16 nR ); @@ -62,7 +62,7 @@ public: ~ExcScenario(); - void Apply( const XclImpRoot& rRoot, const BOOL bLast = FALSE ); + void Apply( const XclImpRoot& rRoot, const sal_Bool bLast = false ); protected: diff --git a/sc/source/filter/inc/exp_op.hxx b/sc/source/filter/inc/exp_op.hxx index ff1f1f11bcb5..3dabe04e6070 100644 --- a/sc/source/filter/inc/exp_op.hxx +++ b/sc/source/filter/inc/exp_op.hxx @@ -64,7 +64,7 @@ public: class ExportWK1 : public ExportTyp { private: - BYTE GenFormByte( const ScPatternAttr& ); + sal_uInt8 GenFormByte( const ScPatternAttr& ); void Bof(); void Eof(); void Calcmode(); @@ -74,10 +74,10 @@ private: void Dimensions(); void Window1(); void Colw(); - void Blank( const UINT16 nC, const UINT16 nR, const ScPatternAttr& ); - void Number( const UINT16 nC, const UINT16 nR, const double f, const ScPatternAttr& ); - void Label( const UINT16 nC, const UINT16 nR, const String&, const ScPatternAttr& ); - void Formula( const UINT16 nC, const UINT16 nR, const ScFormulaCell*, const ScPatternAttr& ); + void Blank( const sal_uInt16 nC, const sal_uInt16 nR, const ScPatternAttr& ); + void Number( const sal_uInt16 nC, const sal_uInt16 nR, const double f, const ScPatternAttr& ); + void Label( const sal_uInt16 nC, const sal_uInt16 nR, const String&, const ScPatternAttr& ); + void Formula( const sal_uInt16 nC, const sal_uInt16 nR, const ScFormulaCell*, const ScPatternAttr& ); void Protect(); void Footer(); void Header(); @@ -85,14 +85,14 @@ private: void Labelfmt(); void Calccount(); void Cursorw12(); - void WKString( const UINT16 nC, const UINT16 nR, const ScFormulaCell*, const ScPatternAttr& ); + void WKString( const sal_uInt16 nC, const sal_uInt16 nR, const ScFormulaCell*, const ScPatternAttr& ); void Snrange(); void Hidcol(); void Cpi(); public: - static const USHORT WK1MAXCOL; - static const USHORT WK1MAXROW; + static const sal_uInt16 WK1MAXCOL; + static const sal_uInt16 WK1MAXROW; inline ExportWK1( SvStream& r, ScDocument* p, CharSet e ) : ExportTyp( r, p, e ) {}; diff --git a/sc/source/filter/inc/expbase.hxx b/sc/source/filter/inc/expbase.hxx index 807d83d02e4e..fe840674383a 100644 --- a/sc/source/filter/inc/expbase.hxx +++ b/sc/source/filter/inc/expbase.hxx @@ -60,19 +60,19 @@ public: virtual ~ScExportBase(); // Hidden Cols/Rows an den Raendern trimmen, - // return: TRUE wenn Bereich vorhanden + // return: sal_True wenn Bereich vorhanden // Start/End/Col/Row muessen gueltige Ausgangswerte sein - BOOL TrimDataArea( SCTAB nTab, SCCOL& nStartCol, + sal_Bool TrimDataArea( SCTAB nTab, SCCOL& nStartCol, SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const; // Ausgabebereich einer Tabelle ermitteln, // Hidden Cols/Rows an den Raendern beruecksichtigt, - // return: TRUE wenn Bereich vorhanden - BOOL GetDataArea( SCTAB nTab, SCCOL& nStartCol, + // return: sal_True wenn Bereich vorhanden + sal_Bool GetDataArea( SCTAB nTab, SCCOL& nStartCol, SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const; // Tabelle nicht vorhanden oder leer - BOOL IsEmptyTable( SCTAB nTab ) const; + sal_Bool IsEmptyTable( SCTAB nTab ) const; ScFieldEditEngine& GetEditEngine() const; diff --git a/sc/source/filter/inc/fapihelper.hxx b/sc/source/filter/inc/fapihelper.hxx index 9f091bb7c6cd..36b8c873f213 100644 --- a/sc/source/filter/inc/fapihelper.hxx +++ b/sc/source/filter/inc/fapihelper.hxx @@ -34,6 +34,7 @@ #include <com/sun/star/uno/Sequence.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> +#include <com/sun/star/beans/NamedValue.hpp> #include <tools/color.hxx> #include <comphelper/types.hxx> #include "ftools.hxx" @@ -101,9 +102,9 @@ public: const ::rtl::OUString& rServiceName, const UnoAnySequence& rArgs ); - /** Opens a password dialog and returns the entered password. - @return The entered password or an empty string on 'Cancel' or any error. */ - static String QueryPasswordForMedium( SfxMedium& rMedium, + /** Opens a password dialog and returns the encryption data. + @return The encryption data or an empty sequence on 'Cancel' or any error. */ + static ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > QueryEncryptionDataForMedium( SfxMedium& rMedium, ::comphelper::IDocPasswordVerifier& rVerifier, const ::std::vector< ::rtl::OUString >* pDefaultPasswords = 0 ); }; diff --git a/sc/source/filter/inc/filt_pch.hxx b/sc/source/filter/inc/filt_pch.hxx index 481413f39300..2943677712bd 100644 --- a/sc/source/filter/inc/filt_pch.hxx +++ b/sc/source/filter/inc/filt_pch.hxx @@ -122,7 +122,7 @@ #include <tools/fract.hxx> #include <vcl/bitmap.hxx> #include <vcl/mapmod.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include <vcl/region.hxx> #include <svl/lstner.hxx> #include <patattr.hxx> @@ -174,7 +174,7 @@ #include <vcl/window.hxx> #include <vcl/pointr.hxx> #include <vcl/ptrstyle.hxx> -#include <vcl/wintypes.hxx> +#include <tools/wintypes.hxx> #include <vcl/inputctx.hxx> #include <vcl/event.hxx> #include <tools/ownlist.hxx> @@ -244,7 +244,7 @@ #include <vcl/menu.hxx> #include <vcl/combobox.hxx> #include <vcl/combobox.h> -#include <vcl/fldunit.hxx> +#include <tools/fldunit.hxx> #include <com/sun/star/frame/XFrame.hpp> #include <com/sun/star/frame/XFrame.hdl> #include <com/sun/star/awt/XWindow.hpp> diff --git a/sc/source/filter/inc/formel.hxx b/sc/source/filter/inc/formel.hxx index 72984e77bf58..9cf88b17ac26 100644 --- a/sc/source/filter/inc/formel.hxx +++ b/sc/source/filter/inc/formel.hxx @@ -69,7 +69,7 @@ class _ScRangeListTabs iterator iterCur; }; - BOOL bHasRanges; + sal_Bool bHasRanges; _ScRangeList** ppTabLists; _ScRangeList* pAct; UINT16 nAct; @@ -80,8 +80,8 @@ public: ~_ScRangeListTabs(); - void Append( ScSingleRefData aSRD, SCsTAB nTab, const BOOL bLimit = TRUE ); - void Append( ScComplexRefData aCRD, SCsTAB nTab, const BOOL bLimit = TRUE ); + void Append( ScSingleRefData aSRD, SCsTAB nTab, const sal_Bool bLimit = true ); + void Append( ScComplexRefData aCRD, SCsTAB nTab, const sal_Bool bLimit = true ); const ScRange* First ( const UINT16 nTab = 0 ); const ScRange* Next (); @@ -99,9 +99,9 @@ protected: ScAddress aEingPos; ConvErr eStatus; sal_Char* pBuffer; // Universal-Puffer - UINT16 nBufferSize; // ...und seine Groesse + sal_uInt16 nBufferSize; // ...und seine Groesse - ConverterBase( UINT16 nNewBuffer ); + ConverterBase( sal_uInt16 nNewBuffer ); virtual ~ConverterBase(); void Reset(); @@ -118,7 +118,7 @@ public: class ExcelConverterBase : public ConverterBase { protected: - ExcelConverterBase( UINT16 nNewBuffer ); + ExcelConverterBase( sal_uInt16 nNewBuffer ); virtual ~ExcelConverterBase(); public: @@ -137,23 +137,23 @@ class LotusConverterBase : public ConverterBase { protected: SvStream& aIn; - INT32 nBytesLeft; + sal_Int32 nBytesLeft; inline void Ignore( const long nSeekRel ); inline void Read( sal_Char& nByte ); - inline void Read( BYTE& nByte ); - inline void Read( UINT16& nUINT16 ); - inline void Read( INT16& nINT16 ); + inline void Read( sal_uInt8& nByte ); + inline void Read( sal_uInt16& nUINT16 ); + inline void Read( sal_Int16& nINT16 ); inline void Read( double& fDouble ); - inline void Read( UINT32& nUINT32 ); + inline void Read( sal_uInt32& nUINT32 ); - LotusConverterBase( SvStream& rStr, UINT16 nNewBuffer ); + LotusConverterBase( SvStream& rStr, sal_uInt16 nNewBuffer ); virtual ~LotusConverterBase(); public: void Reset( const ScAddress& rEingPos ); - virtual ConvErr Convert( const ScTokenArray*& rpErg, INT32& nRest, + virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, const FORMULA_TYPE eFT = FT_CellFormula ) = 0; protected: @@ -173,19 +173,19 @@ inline void LotusConverterBase::Read( sal_Char& nByte ) nBytesLeft--; } -inline void LotusConverterBase::Read( BYTE& nByte ) +inline void LotusConverterBase::Read( sal_uInt8& nByte ) { aIn >> nByte; nBytesLeft--; } -inline void LotusConverterBase::Read( UINT16& nUINT16 ) +inline void LotusConverterBase::Read( sal_uInt16& nUINT16 ) { aIn >> nUINT16; nBytesLeft -= 2; } -inline void LotusConverterBase::Read( INT16& nINT16 ) +inline void LotusConverterBase::Read( sal_Int16& nINT16 ) { aIn >> nINT16; nBytesLeft -= 2; @@ -197,7 +197,7 @@ inline void LotusConverterBase::Read( double& fDouble ) nBytesLeft -= 8; } -inline void LotusConverterBase::Read( UINT32& nUINT32 ) +inline void LotusConverterBase::Read( sal_uInt32& nUINT32 ) { aIn >> nUINT32; nBytesLeft -= 4; diff --git a/sc/source/filter/inc/fprogressbar.hxx b/sc/source/filter/inc/fprogressbar.hxx index 3828327f3b92..cfcd872eff89 100644 --- a/sc/source/filter/inc/fprogressbar.hxx +++ b/sc/source/filter/inc/fprogressbar.hxx @@ -117,7 +117,7 @@ class ScfProgressBar : private boost::noncopyable { public: explicit ScfProgressBar( SfxObjectShell* pDocShell, const String& rText ); - explicit ScfProgressBar( SfxObjectShell* pDocShell, USHORT nResId ); + explicit ScfProgressBar( SfxObjectShell* pDocShell, sal_uInt16 nResId ); virtual ~ScfProgressBar(); /** Adds a new segment to the progress bar. @@ -202,7 +202,7 @@ class ScfSimpleProgressBar { public: explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, const String& rText ); - explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, USHORT nResId ); + explicit ScfSimpleProgressBar( sal_Size nSize, SfxObjectShell* pDocShell, sal_uInt16 nResId ); /** Set progress bar to the specified position. */ inline void ProgressAbs( sal_Size nPos ) { maProgress.ProgressAbs( nPos ); } @@ -223,7 +223,7 @@ private: class ScfStreamProgressBar { public: - explicit ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, USHORT nResId = STR_LOAD_DOC ); + explicit ScfStreamProgressBar( SvStream& rStrm, SfxObjectShell* pDocShell, sal_uInt16 nResId = STR_LOAD_DOC ); /** Sets the progress bar to the current stream position. */ void Progress(); diff --git a/sc/source/filter/inc/ftools.hxx b/sc/source/filter/inc/ftools.hxx index b9c32095fe56..cf15e543e0ee 100644 --- a/sc/source/filter/inc/ftools.hxx +++ b/sc/source/filter/inc/ftools.hxx @@ -193,11 +193,11 @@ public: /** Returns true, if the passed item set contains the item. @param bDeep true = Searches in parent item sets too. */ - static bool CheckItem( const SfxItemSet& rItemSet, USHORT nWhichId, bool bDeep ); + static bool CheckItem( const SfxItemSet& rItemSet, sal_uInt16 nWhichId, bool bDeep ); /** Returns true, if the passed item set contains at least one of the items. @param pnWhichIds Zero-terminated array of Which-IDs. @param bDeep true = Searches in parent item sets too. */ - static bool CheckItems( const SfxItemSet& rItemSet, const USHORT* pnWhichIds, bool bDeep ); + static bool CheckItems( const SfxItemSet& rItemSet, const sal_uInt16* pnWhichIds, bool bDeep ); /** Puts the item into the passed item set. @descr The item will be put into the item set, if bSkipPoolDef is false, @@ -208,7 +208,7 @@ public: @param bSkipPoolDef true = Do not put item if it is equal to pool default; false = Always put the item. */ static void PutItem( SfxItemSet& rItemSet, const SfxPoolItem& rItem, - USHORT nWhichId, bool bSkipPoolDef ); + sal_uInt16 nWhichId, bool bSkipPoolDef ); /** Puts the item into the passed item set. @descr The item will be put into the item set, if bSkipPoolDef is false, @@ -310,14 +310,14 @@ class ScFormatFilterPluginImpl : public ScFormatFilterPlugin { // eFormat == EIF_BIFF_LE4 -> nur Nicht-Storage-Dateien _koennen_ zum Erfolg fuehren virtual FltError ScImportStarCalc10( SvStream&, ScDocument* ); virtual FltError ScImportDif( SvStream&, ScDocument*, const ScAddress& rInsPos, - const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, UINT32 nDifOption = SC_DIFOPT_EXCEL ); + const CharSet eSrc = RTL_TEXTENCODING_DONTKNOW, sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ); virtual FltError ScImportRTF( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange ); virtual FltError ScImportHTML( SvStream&, const String& rBaseURL, ScDocument*, ScRange& rRange, - double nOutputFactor = 1.0, BOOL bCalcWidthHeight = TRUE, + double nOutputFactor = 1.0, sal_Bool bCalcWidthHeight = true, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ); virtual ScEEAbsImport *CreateRTFImport( ScDocument* pDoc, const ScRange& rRange ); - virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight ); + virtual ScEEAbsImport *CreateHTMLImport( ScDocument* pDocP, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight ); virtual String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ); // various export filters @@ -326,10 +326,10 @@ class ScFormatFilterPluginImpl : public ScFormatFilterPlugin { #endif virtual FltError ScExportExcel5( SfxMedium&, ScDocument*, ExportFormatExcel eFormat, CharSet eDest ); virtual FltError ScExportDif( SvStream&, ScDocument*, const ScAddress& rOutPos, const CharSet eDest, - UINT32 nDifOption = SC_DIFOPT_EXCEL ); + sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ); virtual FltError ScExportDif( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest, - UINT32 nDifOption = SC_DIFOPT_EXCEL ); - virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, BOOL bAll, + sal_uInt32 nDifOption = SC_DIFOPT_EXCEL ); + virtual FltError ScExportHTML( SvStream&, const String& rBaseURL, ScDocument*, const ScRange& rRange, const CharSet eDest, sal_Bool bAll, const String& rStreamPath, String& rNonConvertibleChars ); virtual FltError ScExportRTF( SvStream&, ScDocument*, const ScRange& rRange, const CharSet eDest ); }; diff --git a/sc/source/filter/inc/htmlexp.hxx b/sc/source/filter/inc/htmlexp.hxx index e4392944abdc..705d118178cf 100644 --- a/sc/source/filter/inc/htmlexp.hxx +++ b/sc/source/filter/inc/htmlexp.hxx @@ -53,10 +53,10 @@ struct ScHTMLStyle { // Defaults aus StyleSheet Color aBackgroundColor; String aFontFamilyName; - UINT32 nFontHeight; // Item-Value - USHORT nFontSizeNumber; // HTML value 1-7 - BYTE nDefaultScriptType; // Font values are valid for the default script type - BOOL bInitialized; + sal_uInt32 nFontHeight; // Item-Value + sal_uInt16 nFontSizeNumber; // HTML value 1-7 + sal_uInt8 nDefaultScriptType; // Font values are valid for the default script type + sal_Bool bInitialized; ScHTMLStyle() : nFontHeight(0), nFontSizeNumber(2), nDefaultScriptType(0), bInitialized(0) {} @@ -79,13 +79,13 @@ struct ScHTMLGraphEntry Size aSize; // Groesse in Pixeln Size aSpace; // Spacing in Pixeln SdrObject* pObject; - BOOL bInCell; // ob in Zelle ausgegeben wird - BOOL bWritten; + sal_Bool bInCell; // ob in Zelle ausgegeben wird + sal_Bool bWritten; ScHTMLGraphEntry( SdrObject* pObj, const ScRange& rRange, - const Size& rSize, BOOL bIn, const Size& rSpace ) : + const Size& rSize, sal_Bool bIn, const Size& rSpace ) : aRange( rRange ), aSize( rSize ), aSpace( rSpace ), - pObject( pObj ), bInCell( bIn ), bWritten( FALSE ) {} + pObject( pObj ), bInCell( bIn ), bWritten( false ) {} }; @@ -95,11 +95,11 @@ const short nIndentMax = 23; class ScHTMLExport : public ScExportBase { // default HtmlFontSz[1-7] - static const USHORT nDefaultFontSize[SC_HTML_FONTSIZES]; + static const sal_uInt16 nDefaultFontSize[SC_HTML_FONTSIZES]; // HtmlFontSz[1-7] in s*3.ini [user] - static USHORT nFontSize[SC_HTML_FONTSIZES]; + static sal_uInt16 nFontSize[SC_HTML_FONTSIZES]; static const char* pFontSizeCss[SC_HTML_FONTSIZES]; - static const USHORT nCellSpacing; + static const sal_uInt16 nCellSpacing; static const sal_Char sIndentSource[]; boost::ptr_vector< ScHTMLGraphEntry > aGraphList; @@ -115,13 +115,13 @@ class ScHTMLExport : public ScExportBase SCTAB nUsedTables; short nIndent; sal_Char sIndent[nIndentMax+1]; - BOOL bAll; // ganzes Dokument - BOOL bTabHasGraphics; - BOOL bTabAlignedLeft; - BOOL bCalcAsShown; - BOOL bCopyLocalFileToINet; - BOOL bTableDataWidth; - BOOL bTableDataHeight; + sal_Bool bAll; // ganzes Dokument + sal_Bool bTabHasGraphics; + sal_Bool bTabAlignedLeft; + sal_Bool bCalcAsShown; + sal_Bool bCopyLocalFileToINet; + sal_Bool bTableDataWidth; + sal_Bool bTableDataHeight; const SfxItemSet& PageDefaults( SCTAB nTab ); @@ -133,16 +133,16 @@ class ScHTMLExport : public ScExportBase void WriteGraphEntry( ScHTMLGraphEntry* ); void WriteImage( String& rLinkName, const Graphic&, const ByteString& rImgOptions, - ULONG nXOutFlags = 0 ); + sal_uLong nXOutFlags = 0 ); // nXOutFlags fuer XOutBitmap::WriteGraphic // write to stream if and only if URL fields in edit cell - BOOL WriteFieldText( const ScEditCell* pCell ); + sal_Bool WriteFieldText( const ScEditCell* pCell ); // kopiere ggfs. eine lokale Datei ins Internet - BOOL CopyLocalFileToINet( String& rFileNm, - const String& rTargetNm, BOOL bFileToFile = FALSE ); - BOOL HasCId() { return aCId.Len() > 0; } + sal_Bool CopyLocalFileToINet( String& rFileNm, + const String& rTargetNm, sal_Bool bFileToFile = false ); + sal_Bool HasCId() { return aCId.Len() > 0; } void MakeCIdURL( String& rURL ); void PrepareGraphics( ScDrawLayer*, SCTAB nTab, @@ -155,18 +155,18 @@ class ScHTMLExport : public ScExportBase void BorderToStyle( ByteString& rOut, const char* pBorderName, const SvxBorderLine* pLine, bool& bInsertSemicolon ); - USHORT GetFontSizeNumber( USHORT nHeight ); - const char* GetFontSizeCss( USHORT nHeight ); - USHORT ToPixel( USHORT nTwips ); + sal_uInt16 GetFontSizeNumber( sal_uInt16 nHeight ); + const char* GetFontSizeCss( sal_uInt16 nHeight ); + sal_uInt16 ToPixel( sal_uInt16 nTwips ); Size MMToPixel( const Size& r100thMMSize ); void IncIndent( short nVal ); const sal_Char* GetIndentStr() { return sIndent; } public: ScHTMLExport( SvStream&, const String&, ScDocument*, const ScRange&, - BOOL bAll, const String& aStreamPath ); + sal_Bool bAll, const String& aStreamPath ); virtual ~ScHTMLExport(); - ULONG Write(); + sal_uLong Write(); const String& GetNonConvertibleChars() const { return aNonConvertibleChars; } }; diff --git a/sc/source/filter/inc/htmlimp.hxx b/sc/source/filter/inc/htmlimp.hxx index 31c2dd0dbd2b..c79bf6d4f1e2 100644 --- a/sc/source/filter/inc/htmlimp.hxx +++ b/sc/source/filter/inc/htmlimp.hxx @@ -39,11 +39,11 @@ private: static void InsertRangeName( ScDocument* pDoc, const String& rName, const ScRange& rRange ); public: - ScHTMLImport( ScDocument* pDoc, const String& rBaseURL, const ScRange& rRange, BOOL bCalcWidthHeight = TRUE ); + ScHTMLImport( ScDocument* pDoc, const String& rBaseURL, const ScRange& rRange, sal_Bool bCalcWidthHeight = sal_True ); virtual ~ScHTMLImport(); const ScHTMLParser* GetParser() const { return (ScHTMLParser*)mpParser; } - virtual void WriteToDocument( BOOL bSizeColsRows = FALSE, double nOutputFactor = 1.0, + virtual void WriteToDocument( sal_Bool bSizeColsRows = false, double nOutputFactor = 1.0, SvNumberFormatter* pFormatter = NULL, bool bConvertDate = true ); static String GetHTMLRangeNameList( ScDocument* pDoc, const String& rOrigName ); diff --git a/sc/source/filter/inc/htmlpars.hxx b/sc/source/filter/inc/htmlpars.hxx index 84b0b04dcd2f..5548338e82f3 100644 --- a/sc/source/filter/inc/htmlpars.hxx +++ b/sc/source/filter/inc/htmlpars.hxx @@ -42,8 +42,8 @@ const sal_uInt32 SC_HTML_FONTSIZES = 7; // wie Export, HTML-Options // Pixel tolerance for SeekOffset and related. -const USHORT SC_HTML_OFFSET_TOLERANCE_SMALL = 1; // single table -const USHORT SC_HTML_OFFSET_TOLERANCE_LARGE = 10; // nested +const sal_uInt16 SC_HTML_OFFSET_TOLERANCE_SMALL = 1; // single table +const sal_uInt16 SC_HTML_OFFSET_TOLERANCE_LARGE = 10; // nested // ============================================================================ // BASE class for HTML parser classes @@ -62,7 +62,7 @@ public: explicit ScHTMLParser( EditEngine* pEditEngine, ScDocument* pDoc ); virtual ~ScHTMLParser(); - virtual ULONG Read( SvStream& rStrm, const String& rBaseURL ) = 0; + virtual sal_uLong Read( SvStream& rStrm, const String& rBaseURL ) = 0; /** Returns the "global table" which contains the entire HTML document. */ virtual const ScHTMLTable* GetGlobalTable() const = 0; @@ -71,30 +71,30 @@ public: // ============================================================================ -SV_DECL_VARARR_SORT( ScHTMLColOffset, ULONG, 16, 4) +SV_DECL_VARARR_SORT( ScHTMLColOffset, sal_uLong, 16, 4) struct ScHTMLTableStackEntry { ScRangeListRef xLockedList; ScEEParseEntry* pCellEntry; ScHTMLColOffset* pLocalColOffset; - ULONG nFirstTableCell; + sal_uLong nFirstTableCell; SCCOL nColCnt; SCROW nRowCnt; SCCOL nColCntStart; SCCOL nMaxCol; - USHORT nTable; - USHORT nTableWidth; - USHORT nColOffset; - USHORT nColOffsetStart; - BOOL bFirstRow; + sal_uInt16 nTable; + sal_uInt16 nTableWidth; + sal_uInt16 nColOffset; + sal_uInt16 nColOffsetStart; + sal_Bool bFirstRow; ScHTMLTableStackEntry( ScEEParseEntry* pE, const ScRangeListRef& rL, ScHTMLColOffset* pTO, - ULONG nFTC, + sal_uLong nFTC, SCCOL nCol, SCROW nRow, - SCCOL nStart, SCCOL nMax, USHORT nTab, - USHORT nTW, USHORT nCO, USHORT nCOS, - BOOL bFR ) + SCCOL nStart, SCCOL nMax, sal_uInt16 nTab, + sal_uInt16 nTW, sal_uInt16 nCO, sal_uInt16 nCOS, + sal_Bool bFR ) : xLockedList( rL ), pCellEntry( pE ), pLocalColOffset( pTO ), nFirstTableCell( nFTC ), @@ -139,23 +139,23 @@ private: Table* pTables; ScHTMLColOffset* pColOffset; ScHTMLColOffset* pLocalColOffset; // je Table - ULONG nFirstTableCell; // je Table + sal_uLong nFirstTableCell; // je Table short nTableLevel; - USHORT nTable; - USHORT nMaxTable; + sal_uInt16 nTable; + sal_uInt16 nMaxTable; SCCOL nColCntStart; // erste Col je Table SCCOL nMaxCol; // je Table - USHORT nTableWidth; // je Table - USHORT nColOffset; // aktuell, Pixel - USHORT nColOffsetStart; // Startwert je Table, in Pixel - USHORT nMetaCnt; // fuer ParseMetaOptions - USHORT nOffsetTolerance; // for use with SeekOffset and related - BOOL bCalcWidthHeight; // TRUE: calculate real column width + sal_uInt16 nTableWidth; // je Table + sal_uInt16 nColOffset; // aktuell, Pixel + sal_uInt16 nColOffsetStart; // Startwert je Table, in Pixel + sal_uInt16 nMetaCnt; // fuer ParseMetaOptions + sal_uInt16 nOffsetTolerance; // for use with SeekOffset and related + sal_Bool bCalcWidthHeight; // TRUE: calculate real column width // FALSE: 1 html-col = 1 sc-col - BOOL bTabInTabCell; - BOOL bFirstRow; // je Table, ob in erster Zeile - BOOL bInCell; - BOOL bInTitle; + sal_Bool bTabInTabCell; + sal_Bool bFirstRow; // je Table, ob in erster Zeile + sal_Bool bInCell; + sal_Bool bInTitle; DECL_LINK( HTMLImportHdl, ImportInfo* ); void NewActEntry( ScEEParseEntry* ); @@ -163,24 +163,24 @@ private: void ProcToken( ImportInfo* ); void CloseEntry( ImportInfo* ); void NextRow( ImportInfo* ); - void SkipLocked( ScEEParseEntry*, BOOL bJoin = TRUE ); - static BOOL SeekOffset( ScHTMLColOffset*, USHORT nOffset, - SCCOL* pCol, USHORT nOffsetTol ); - static void MakeCol( ScHTMLColOffset*, USHORT& nOffset, - USHORT& nWidth, USHORT nOffsetTol, - USHORT nWidthTol ); - static void MakeColNoRef( ScHTMLColOffset*, USHORT nOffset, - USHORT nWidth, USHORT nOffsetTol, - USHORT nWidthTol ); - static void ModifyOffset( ScHTMLColOffset*, USHORT& nOldOffset, - USHORT& nNewOffset, USHORT nOffsetTol ); + void SkipLocked( ScEEParseEntry*, sal_Bool bJoin = sal_True ); + static sal_Bool SeekOffset( ScHTMLColOffset*, sal_uInt16 nOffset, + SCCOL* pCol, sal_uInt16 nOffsetTol ); + static void MakeCol( ScHTMLColOffset*, sal_uInt16& nOffset, + sal_uInt16& nWidth, sal_uInt16 nOffsetTol, + sal_uInt16 nWidthTol ); + static void MakeColNoRef( ScHTMLColOffset*, sal_uInt16 nOffset, + sal_uInt16 nWidth, sal_uInt16 nOffsetTol, + sal_uInt16 nWidthTol ); + static void ModifyOffset( ScHTMLColOffset*, sal_uInt16& nOldOffset, + sal_uInt16& nNewOffset, sal_uInt16 nOffsetTol ); void Colonize( ScEEParseEntry* ); - USHORT GetWidth( ScEEParseEntry* ); + sal_uInt16 GetWidth( ScEEParseEntry* ); void SetWidths(); void Adjust(); - USHORT GetWidthPixel( const HTMLOption* ); - BOOL IsAtBeginningOfText( ImportInfo* ); + sal_uInt16 GetWidthPixel( const HTMLOption* ); + sal_Bool IsAtBeginningOfText( ImportInfo* ); void TableOn( ImportInfo* ); void ColOn( ImportInfo* ); @@ -196,7 +196,7 @@ private: public: ScHTMLLayoutParser( EditEngine*, const String& rBaseURL, const Size& aPageSize, ScDocument* ); virtual ~ScHTMLLayoutParser(); - virtual ULONG Read( SvStream&, const String& rBaseURL ); + virtual sal_uLong Read( SvStream&, const String& rBaseURL ); virtual const ScHTMLTable* GetGlobalTable() const; }; @@ -588,7 +588,7 @@ public: explicit ScHTMLQueryParser( EditEngine* pEditEngine, ScDocument* pDoc ); virtual ~ScHTMLQueryParser(); - virtual ULONG Read( SvStream& rStrm, const String& rBaseURL ); + virtual sal_uLong Read( SvStream& rStrm, const String& rBaseURL ); /** Returns the "global table" which contains the entire HTML document. */ virtual const ScHTMLTable* GetGlobalTable() const; diff --git a/sc/source/filter/inc/imp_op.hxx b/sc/source/filter/inc/imp_op.hxx index cad73ce95517..57a3374762a1 100644 --- a/sc/source/filter/inc/imp_op.hxx +++ b/sc/source/filter/inc/imp_op.hxx @@ -113,12 +113,12 @@ protected: XclImpOutlineListBuffer* pOutlineListBuffer; sal_Int16 mnLastRefIdx; - UINT16 nIxfeIndex; // merkt sich Angabe im IXFE-Record - UINT16 nLastXF; // letzter XF in Formula-Record + sal_uInt16 nIxfeIndex; // merkt sich Angabe im IXFE-Record + sal_uInt16 nLastXF; // letzter XF in Formula-Record SCTAB nBdshtTab; // Counter fuer Boundsheet ScFormulaCell* pLastFormCell; // fuer String-Records - BOOL bTabTruncated; // wenn Bereichsueberschreitung zum + sal_Bool bTabTruncated; // wenn Bereichsueberschreitung zum // Abschneiden von Zellen fuehrt // Record-Funktionen @@ -185,12 +185,12 @@ protected: // --------------------------------------------------------------- void Formula( const XclAddress& rXclPos, - UINT16 nXF, UINT16 nFormLen, double &rCurVal, BOOL bShrFmla ); + sal_uInt16 nXF, sal_uInt16 nFormLen, double &rCurVal, sal_Bool bShrFmla ); // -> excform.cxx virtual void EndSheet( void ); void NeueTabelle( void ); - const ScTokenArray* ErrorToFormula( BYTE bErrOrVal, BYTE nError, + const ScTokenArray* ErrorToFormula( sal_uInt8 bErrOrVal, sal_uInt8 nError, double& rVal ); virtual void AdjustRowHeight(); diff --git a/sc/source/filter/inc/lotattr.hxx b/sc/source/filter/inc/lotattr.hxx index 5fdcc8a6ecb9..eecd4c11916f 100644 --- a/sc/source/filter/inc/lotattr.hxx +++ b/sc/source/filter/inc/lotattr.hxx @@ -80,7 +80,7 @@ private: struct ENTRY { ScPatternAttr* pPattAttr; - UINT32 nHash0; + sal_uInt32 nHash0; ENTRY (const ScPatternAttr &r); @@ -90,10 +90,10 @@ private: inline bool operator == (const ENTRY &r) const { return nHash0 == r.nHash0; } - inline bool operator == (const UINT32 &r) const { return nHash0 == r; } + inline bool operator == (const sal_uInt32 &r) const { return nHash0 == r; } }; - inline static void MakeHash( const LotAttrWK3& rAttr, UINT32& rOut ) + inline static void MakeHash( const LotAttrWK3& rAttr, sal_uInt32& rOut ) { ( ( UINT8* ) &rOut )[ 0 ] = rAttr.nFont & 0x7F; ( ( UINT8* ) &rOut )[ 1 ] = rAttr.nLineStyle; @@ -122,7 +122,7 @@ public: void SetAttr (const SCROW nRow, const ScPatternAttr&); - void Apply (const SCCOL nCol, const SCTAB nTab, const BOOL bClear = TRUE); + void Apply (const SCCOL nCol, const SCTAB nTab, const sal_Bool bClear = true); void Clear (); diff --git a/sc/source/filter/inc/lotfntbf.hxx b/sc/source/filter/inc/lotfntbf.hxx index 0cbdda762bc4..cb90efc3fc3d 100644 --- a/sc/source/filter/inc/lotfntbf.hxx +++ b/sc/source/filter/inc/lotfntbf.hxx @@ -49,7 +49,7 @@ private: SvxFontItem* pFont; SvxFontHeightItem* pHeight; SvxColorItem* pColor; - INT32 nType; // < 0 -> undefiniert + sal_Int32 nType; // < 0 -> undefiniert inline ENTRY( void ) { pTmpName = NULL; @@ -94,17 +94,17 @@ private: delete pColor; pColor = &rNew; } - inline void Type( const UINT16 nNew ) { nType = nNew; } + inline void Type( const sal_uInt16 nNew ) { nType = nNew; } }; ENTRY pData[ 8 ]; - const static UINT16 nSize; + const static sal_uInt16 nSize; void MakeFont( ENTRY* pEntry ); public: - void Fill( const UINT8 nIndex, SfxItemSet& rItemSet ); - void SetName( const UINT16 nIndex, const String& rName ); - void SetHeight( const UINT16 nIndex, const UINT16 nHeight ); - void SetType( const UINT16 nIndex, const UINT16 nType ); + void Fill( const sal_uInt8 nIndex, SfxItemSet& rItemSet ); + void SetName( const sal_uInt16 nIndex, const String& rName ); + void SetHeight( const sal_uInt16 nIndex, const sal_uInt16 nHeight ); + void SetType( const sal_uInt16 nIndex, const sal_uInt16 nType ); }; diff --git a/sc/source/filter/inc/lotform.hxx b/sc/source/filter/inc/lotform.hxx index b9fac939192e..9d23abfaf887 100644 --- a/sc/source/filter/inc/lotform.hxx +++ b/sc/source/filter/inc/lotform.hxx @@ -79,18 +79,18 @@ private: TokenId nSubToken; // ~ TokenId n0Token; // '0.0'; // --------------------------------------------------------------- - static FUNC_TYPE IndexToType( BYTE ); - static DefTokenId IndexToToken( BYTE ); - static FUNC_TYPE IndexToTypeWK123( BYTE ); - static DefTokenId IndexToTokenWK123( BYTE ); - void DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtName ); - void LotusRelToScRel( UINT16 nCol, UINT16 nRow, + static FUNC_TYPE IndexToType( sal_uInt8 ); + static DefTokenId IndexToToken( sal_uInt8 ); + static FUNC_TYPE IndexToTypeWK123( sal_uInt8 ); + static DefTokenId IndexToTokenWK123( sal_uInt8 ); + void DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtName ); + void LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefData& rSRD ); - BOOL bWK3; // alternative Codeumsetzung statt fuer < WK1 - BOOL bWK123; // alternative for 123 + sal_Bool bWK3; // alternative Codeumsetzung statt fuer < WK1 + sal_Bool bWK123; // alternative for 123 // ------------------------------------------------------------------- - void ReadSRD( ScSingleRefData& rSRD, BYTE nFlags ); - inline void ReadCRD( ScComplexRefData& rCRD, BYTE nFlags ); + void ReadSRD( ScSingleRefData& rSRD, sal_uInt8 nFlags ); + inline void ReadCRD( ScComplexRefData& rCRD, sal_uInt8 nFlags ); void IncToken( TokenId &rParam ); // ACHTUNG: hier wird die aktuelle Token-Kette im Pool // mit '(<rParam>)+1' fortgeschrieben und mit @@ -100,8 +100,8 @@ private: void NegToken( TokenId& rParam ); // ACHTUNG: wie ~, nur wird '-(<rParam>)' gebildet public: - LotusToSc( SvStream& aStr, CharSet eSrc, BOOL b ); - virtual ConvErr Convert( const ScTokenArray*& rpErg, INT32& nRest, + LotusToSc( SvStream& aStr, CharSet eSrc, sal_Bool b ); + virtual ConvErr Convert( const ScTokenArray*& rpErg, sal_Int32& nRest, const FORMULA_TYPE eFT = FT_CellFormula ); void Reset( const ScAddress& rEingPos ); @@ -112,7 +112,7 @@ private: }; -inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, BYTE nRelBit ) +inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, sal_uInt8 nRelBit ) { // erster Teil ReadSRD( rCRD.Ref1, nRelBit ); @@ -124,7 +124,7 @@ inline void LotusToSc::ReadCRD( ScComplexRefData& rCRD, BYTE nRelBit ) inline void LotusToSc::SetWK3( void ) { - bWK3 = TRUE; + bWK3 = sal_True; } diff --git a/sc/source/filter/inc/lotimpop.hxx b/sc/source/filter/inc/lotimpop.hxx index 09efab80320a..8856f45cb4a9 100644 --- a/sc/source/filter/inc/lotimpop.hxx +++ b/sc/source/filter/inc/lotimpop.hxx @@ -48,45 +48,45 @@ private: SvStream* pIn; // benoetigt wegen multiplem Read()! LotusFontBuffer* pFontBuff; LotusToSc aConv; - UINT16 nTab; // z.Zt. bearbeitete Tabelle - INT32 nExtTab; + sal_uInt16 nTab; // z.Zt. bearbeitete Tabelle + sal_Int32 nExtTab; // ------------------------------------------------------------------- // in WK?-Datei void Bof( void ); // 0x0000 00 - BOOL BofFm3( void ); // 0x0000 00 - void Columnwidth( UINT16 nRecLen ); // 0x0007 07 - void Hiddencolumn( UINT16 nRecLen ); // 0x0008 08 + sal_Bool BofFm3( void ); // 0x0000 00 + void Columnwidth( sal_uInt16 nRecLen ); // 0x0007 07 + void Hiddencolumn( sal_uInt16 nRecLen ); // 0x0008 08 void Userrange( void ); // 0x0009 09 void Errcell( void ); // 0x0014 20 void Nacell( void ); // 0x0015 21 void Labelcell( void ); // 0x0016 22 void Numbercell( void ); // 0x0017 23 void Smallnumcell( void ); // 0x0018 24 - ScFormulaCell* Formulacell( UINT16 nRecLen ); // 0x0019 25 + ScFormulaCell* Formulacell( sal_uInt16 nRecLen ); // 0x0019 25 void Formulastring( ScFormulaCell& ); // 0x001a 26 // 0x001b 27 special void NamedSheet( void ); // 14000 - void RowPresentation( UINT16 nRecLen ); // 2007 + void RowPresentation( sal_uInt16 nRecLen ); // 2007 // ------------------------------------------------------------------- // in FM?-Datei void Font_Face( void ); // 174 void Font_Type( void ); // 176 void Font_Ysize( void ); // 177 - void _Row( const UINT16 nRecLen ); // 197 ? + void _Row( const sal_uInt16 nRecLen ); // 197 ? // ------------------------------------------------------------------- inline void Read( ScAddress& ); inline void Read( ScRange& ); // fuer Addresses/Ranges im Format Row(16)/Tab(8)/Col(8) inline void Read( sal_Char& ); - inline void Read( BYTE& ); - inline void Read( UINT16& ); - inline void Read( INT16& ); - inline void Read( UINT32& ); + inline void Read( sal_uInt8& ); + inline void Read( sal_uInt16& ); + inline void Read( sal_Int16& ); + inline void Read( sal_uInt32& ); inline void Read( double& ); // 10-Byte-IEEE lesen inline void Read( LotAttrWK3& ); void Read( String& ); // 0-terminierten String einlesen - inline void Skip( const UINT16 nNumBytes ); + inline void Skip( const sal_uInt16 nNumBytes ); // ------------------------------------------------------------------- public: ImportLotus( SvStream&, ScDocument*, CharSet eSrc ); @@ -100,10 +100,10 @@ public: inline void ImportLotus::Read( ScAddress& rAddr ) { - UINT16 nRow; + sal_uInt16 nRow; *pIn >> nRow; rAddr.SetRow( static_cast<SCROW>(nRow) ); - BYTE nByte; + sal_uInt8 nByte; *pIn >> nByte; rAddr.SetTab( static_cast<SCTAB>(nByte) ); *pIn >> nByte; @@ -124,25 +124,25 @@ inline void ImportLotus::Read( sal_Char& r ) } -inline void ImportLotus::Read( BYTE& r ) +inline void ImportLotus::Read( sal_uInt8& r ) { *pIn >> r; } -inline void ImportLotus::Read( UINT16& r ) +inline void ImportLotus::Read( sal_uInt16& r ) { *pIn >> r; } -inline void ImportLotus::Read( INT16& r ) +inline void ImportLotus::Read( sal_Int16& r ) { *pIn >> r; } -inline void ImportLotus::Read( UINT32& r ) +inline void ImportLotus::Read( sal_uInt32& r ) { *pIn >> r; } @@ -160,7 +160,7 @@ inline void ImportLotus::Read( LotAttrWK3& r ) } -inline void ImportLotus::Skip( const UINT16 n ) +inline void ImportLotus::Skip( const sal_uInt16 n ) { pIn->SeekRel( n ); } diff --git a/sc/source/filter/inc/lotrange.hxx b/sc/source/filter/inc/lotrange.hxx index 2f520deff2c9..2456a28f3a8b 100644 --- a/sc/source/filter/inc/lotrange.hxx +++ b/sc/source/filter/inc/lotrange.hxx @@ -36,14 +36,14 @@ class LotusRangeList; -typedef UINT16 LR_ID; +typedef sal_uInt16 LR_ID; #define ID_FAIL 0xFFFF class LotusRange { friend class LotusRangeList; private: - UINT32 nHash; + sal_uInt32 nHash; SCCOL nColStart; SCROW nRowStart; SCCOL nColEnd; @@ -57,9 +57,9 @@ public: LotusRange( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE ); LotusRange( const LotusRange& ); inline LotusRange &operator =( const LotusRange& ); - inline BOOL operator ==( const LotusRange& ) const; - inline BOOL operator !=( const LotusRange& ) const; - inline BOOL IsSingle( void ) const; + inline sal_Bool operator ==( const LotusRange& ) const; + inline sal_Bool operator !=( const LotusRange& ) const; + inline sal_Bool IsSingle( void ) const; }; @@ -85,7 +85,7 @@ inline LotusRange &LotusRange::operator =( const LotusRange& rCpy ) } -inline BOOL LotusRange::operator ==( const LotusRange& rRef ) const +inline sal_Bool LotusRange::operator ==( const LotusRange& rRef ) const { return ( nHash == rRef.nHash && nColStart == rRef.nColStart && nRowStart == rRef.nRowStart && nColEnd == rRef.nColEnd && @@ -93,7 +93,7 @@ inline BOOL LotusRange::operator ==( const LotusRange& rRef ) const } -inline BOOL LotusRange::operator !=( const LotusRange& rRef ) const +inline sal_Bool LotusRange::operator !=( const LotusRange& rRef ) const { return ( nHash != rRef.nHash || nColStart != rRef.nColStart || nRowStart != rRef.nRowStart || nColEnd != rRef.nColEnd || @@ -101,7 +101,7 @@ inline BOOL LotusRange::operator !=( const LotusRange& rRef ) const } -inline BOOL LotusRange::IsSingle( void ) const +inline sal_Bool LotusRange::IsSingle( void ) const { return ( nColStart == nColEnd && nRowStart == nRowEnd ); } @@ -120,9 +120,9 @@ private: public: LotusRangeList( void ); ~LotusRangeList( void ); - inline UINT16 GetIndex( SCCOL nCol, SCROW nRow ); - inline UINT16 GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE ); - UINT16 GetIndex( const LotusRange& ); + inline sal_uInt16 GetIndex( SCCOL nCol, SCROW nRow ); + inline sal_uInt16 GetIndex( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE ); + sal_uInt16 GetIndex( const LotusRange& ); inline void Append( SCCOL nCol, SCROW nRow, const String& ); inline void Append( SCCOL nColS, SCROW nRowS, SCCOL nColE, SCROW nRowE, const String& ); void Append( LotusRange* pLR, const String& rName ); diff --git a/sc/source/filter/inc/namebuff.hxx b/sc/source/filter/inc/namebuff.hxx index ccefd529f065..1a6619c73f9f 100644 --- a/sc/source/filter/inc/namebuff.hxx +++ b/sc/source/filter/inc/namebuff.hxx @@ -51,16 +51,16 @@ class StringHashEntry private: friend class NameBuffer; String aString; - UINT32 nHash; + sal_uInt32 nHash; - static UINT32 MakeHashCode( const String& ); + static sal_uInt32 MakeHashCode( const String& ); public: inline StringHashEntry( const String& ); inline StringHashEntry( void ); inline void operator =( const sal_Char* ); inline void operator =( const String& ); inline void operator =( const StringHashEntry& ); - inline BOOL operator ==( const StringHashEntry& ) const; + inline sal_Bool operator ==( const StringHashEntry& ) const; }; @@ -96,7 +96,7 @@ inline void StringHashEntry::operator =( const StringHashEntry& r ) } -inline BOOL StringHashEntry::operator ==( const StringHashEntry& r ) const +inline sal_Bool StringHashEntry::operator ==( const StringHashEntry& r ) const { return ( nHash == r.nHash && aString == r.aString ); } @@ -106,16 +106,16 @@ inline BOOL StringHashEntry::operator ==( const StringHashEntry& r ) const class NameBuffer : private List, public ExcRoot { private: - UINT16 nBase; // Index-Basis + sal_uInt16 nBase; // Index-Basis public: // inline NameBuffer( void ); //prevent empty rootdata inline NameBuffer( RootData* ); - inline NameBuffer( RootData*, UINT16 nNewBase ); + inline NameBuffer( RootData*, sal_uInt16 nNewBase ); virtual ~NameBuffer(); - inline const String* Get( UINT16 nIndex ); - inline UINT16 GetLastIndex( void ); - inline void SetBase( UINT16 nNewBase = 0 ); + inline const String* Get( sal_uInt16 nIndex ); + inline sal_uInt16 GetLastIndex( void ); + inline void SetBase( sal_uInt16 nNewBase = 0 ); void operator <<( const String& rNewString ); }; @@ -132,13 +132,13 @@ inline NameBuffer::NameBuffer( RootData* p ) : ExcRoot( p ) } -inline NameBuffer::NameBuffer( RootData* p, UINT16 nNewBase ) : ExcRoot( p ) +inline NameBuffer::NameBuffer( RootData* p, sal_uInt16 nNewBase ) : ExcRoot( p ) { nBase = nNewBase; } -inline const String* NameBuffer::Get( UINT16 n ) +inline const String* NameBuffer::Get( sal_uInt16 n ) { if( n < nBase ) return NULL; @@ -154,15 +154,15 @@ inline const String* NameBuffer::Get( UINT16 n ) } -inline UINT16 NameBuffer::GetLastIndex( void ) +inline sal_uInt16 NameBuffer::GetLastIndex( void ) { DBG_ASSERT( Count() + nBase <= 0xFFFF, "*NameBuffer::GetLastIndex(): Ich hab' die Nase voll!" ); - return ( UINT16 ) ( Count() + nBase ); + return ( sal_uInt16 ) ( Count() + nBase ); } -inline void NameBuffer::SetBase( UINT16 nNewBase ) +inline void NameBuffer::SetBase( sal_uInt16 nNewBase ) { nBase = nNewBase; } @@ -176,7 +176,7 @@ class ShrfmlaBuffer : public ExcRoot { size_t operator() (const ScAddress &addr) const; }; - typedef boost::unordered_map <ScAddress, USHORT, ScAddressHashFunc> ShrfmlaHash; + typedef boost::unordered_map <ScAddress, sal_uInt16, ScAddressHashFunc> ShrfmlaHash; typedef std::list <ScRange> ShrfmlaList; ShrfmlaHash index_hash; @@ -188,7 +188,7 @@ public: virtual ~ShrfmlaBuffer(); void Clear(); void Store( const ScRange& rRange, const ScTokenArray& ); - USHORT Find (const ScAddress & rAddress ) const; + sal_uInt16 Find (const ScAddress & rAddress ) const; static String CreateName( const ScRange& ); }; @@ -204,9 +204,9 @@ private: StringHashEntry aStrHashEntry; ScComplexRefData aScComplexRefDataRel; String aScAbsName; - UINT16 nAbsInd; // == 0 -> noch keine Abs-Name! - UINT16 nRelInd; - BOOL bSingleRef; + sal_uInt16 nAbsInd; // == 0 -> noch keine Abs-Name! + sal_uInt16 nRelInd; + sal_Bool bSingleRef; ENTRY( const String& rName, const String& rScName, const ScComplexRefData& rCRD ) : aStrHashEntry( rName ), aScComplexRefDataRel( rCRD ), @@ -218,14 +218,14 @@ private: }; ScTokenArray* pScTokenArray; - UINT16 nIntCount; + sal_uInt16 nIntCount; public: RangeNameBufferWK3( void ); virtual ~RangeNameBufferWK3(); void Add( const String& rName, const ScComplexRefData& rCRD ); inline void Add( const String& rName, const ScRange& aScRange ); - BOOL FindRel( const String& rRef, UINT16& rIndex ); - BOOL FindAbs( const String& rRef, UINT16& rIndex ); + sal_Bool FindRel( const String& rRef, sal_uInt16& rIndex ); + sal_Bool FindAbs( const String& rRef, sal_uInt16& rIndex ); }; @@ -237,27 +237,27 @@ inline void RangeNameBufferWK3::Add( const String& rName, const ScRange& aScRang pSRD = &aCRD.Ref1; pScAddr = &aScRange.aStart; - pSRD->SetFlag3D( TRUE ); + pSRD->SetFlag3D( sal_True ); pSRD->nCol = pScAddr->Col(); pSRD->nRow = pScAddr->Row(); pSRD->nTab = pScAddr->Tab(); // zunaechst ALLE Refs nur absolut - pSRD->SetColRel( FALSE ); - pSRD->SetRowRel( FALSE ); - pSRD->SetTabRel( FALSE ); + pSRD->SetColRel( false ); + pSRD->SetRowRel( false ); + pSRD->SetTabRel( false ); pSRD = &aCRD.Ref2; pScAddr = &aScRange.aEnd; - pSRD->SetFlag3D( TRUE ); + pSRD->SetFlag3D( sal_True ); pSRD->nCol = pScAddr->Col(); pSRD->nRow = pScAddr->Row(); pSRD->nTab = pScAddr->Tab(); // zunaechst ALLE Refs nur absolut - pSRD->SetColRel( FALSE ); - pSRD->SetRowRel( FALSE ); - pSRD->SetTabRel( FALSE ); + pSRD->SetColRel( false ); + pSRD->SetRowRel( false ); + pSRD->SetTabRel( false ); Add( rName, aCRD ); } @@ -272,26 +272,26 @@ private: { String aFile; String aTab; - UINT16 nTabNum; // 0xFFFF -> noch nicht angelegt + sal_uInt16 nTabNum; // 0xFFFF -> noch nicht angelegt // 0xFFFE -> versucht anzulegen, ging aber schief // 0xFFFD -> soll im selben Workbook sein, findet's aber nicht - BOOL bSWB; - BOOL bLink; + sal_Bool bSWB; + sal_Bool bLink; Cont( const String& rFilePathAndName, const String& rTabName ) : aFile( rFilePathAndName ), aTab( rTabName ) { nTabNum = 0xFFFF; // -> Tabelle noch nicht erzeugt - bSWB = bLink = FALSE; + bSWB = bLink = false; } Cont( const String& rFilePathAndName, const String& rTabName, - const BOOL bSameWB ) : + const sal_Bool bSameWB ) : aFile( rFilePathAndName ), aTab( rTabName ) { nTabNum = 0xFFFF; // -> Tabelle noch nicht erzeugt bSWB = bSameWB; - bLink = FALSE; + bLink = false; } }; public: @@ -299,11 +299,11 @@ public: virtual ~ExtSheetBuffer(); sal_Int16 Add( const String& rFilePathAndName, - const String& rTabName, const BOOL bSameWorkbook = FALSE ); + const String& rTabName, const sal_Bool bSameWorkbook = false ); - BOOL GetScTabIndex( UINT16 nExcSheetIndex, UINT16& rIn_LastTab_Out_ScIndex ); - BOOL IsLink( const UINT16 nExcSheetIndex ) const; - BOOL GetLink( const UINT16 nExcSheetIndex, String &rAppl, String &rDoc ) const; + sal_Bool GetScTabIndex( sal_uInt16 nExcSheetIndex, sal_uInt16& rIn_LastTab_Out_ScIndex ); + sal_Bool IsLink( const sal_uInt16 nExcSheetIndex ) const; + sal_Bool GetLink( const sal_uInt16 nExcSheetIndex, String &rAppl, String &rDoc ) const; void Reset( void ); }; @@ -319,13 +319,13 @@ inline ExtSheetBuffer::ExtSheetBuffer( RootData* p ) : ExcRoot( p ) struct ExtName { String aName; - UINT32 nStorageId; - UINT16 nFlags; + sal_uInt32 nStorageId; + sal_uInt16 nFlags; inline ExtName( const String& r, sal_uInt16 n ) : aName( r ), nStorageId( 0 ), nFlags( n ) {} - BOOL IsDDE( void ) const; - BOOL IsOLE( void ) const; + sal_Bool IsDDE( void ) const; + sal_Bool IsOLE( void ) const; }; @@ -337,7 +337,7 @@ public: explicit ExtNameBuff( const XclImpRoot& rRoot ); void AddDDE( const String& rName, sal_Int16 nRefIdx ); - void AddOLE( const String& rName, sal_Int16 nRefIdx, UINT32 nStorageId ); + void AddOLE( const String& rName, sal_Int16 nRefIdx, sal_uInt32 nStorageId ); void AddName( const String& rName, sal_Int16 nRefIdx ); const ExtName* GetNameByIndex( sal_Int16 nRefIdx, sal_uInt16 nNameIdx ) const; diff --git a/sc/source/filter/inc/op.h b/sc/source/filter/inc/op.h index d44053de2a44..42d3d747153d 100644 --- a/sc/source/filter/inc/op.h +++ b/sc/source/filter/inc/op.h @@ -34,37 +34,37 @@ // OP-Code-Funktionen class SvStream; -void NI( SvStream &aStream, USHORT nLaenge ); -void OP_BOF( SvStream &aStream, USHORT nLaenge ); -void OP_EOF( SvStream &aStream, USHORT nLaenge ); -void OP_Integer( SvStream &aStream, USHORT nLaenge ); -void OP_Number( SvStream &aStream, USHORT nLaenge ); -void OP_Label( SvStream &aStream, USHORT nLaenge ); -void OP_Integer3( SvStream &aStream, USHORT nLaenge ); // WK3 -void OP_Number3( SvStream &aStream, USHORT nLaenge ); // WK3 -void OP_Formula( SvStream &aStream, USHORT nLaenge ); -void OP_Formula3( SvStream &aStream, USHORT nLaenge ); // WK3 -void OP_ColumnWidth( SvStream &aStream, USHORT nLaenge ); -void OP_NamedRange( SvStream &aStream, USHORT nLaenge ); -void OP_SymphNamedRange( SvStream &aStream, USHORT nLaenge ); -void OP_Footer( SvStream &aStream, USHORT nLaenge ); -void OP_Header( SvStream &aStream, USHORT nLaenge ); -void OP_Margins( SvStream &aStream, USHORT nLaenge ); -void OP_HiddenCols( SvStream &aStream, USHORT nLaenge ); -void OP_Window1( SvStream &aStream, USHORT nLaenge ); -void OP_Blank( SvStream &aStream, USHORT nLaenge ); +void NI( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_BOF( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_EOF( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Integer( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Number( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Label( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Integer3( SvStream &aStream, sal_uInt16 nLaenge ); // WK3 +void OP_Number3( SvStream &aStream, sal_uInt16 nLaenge ); // WK3 +void OP_Formula( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Formula3( SvStream &aStream, sal_uInt16 nLaenge ); // WK3 +void OP_ColumnWidth( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_NamedRange( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_SymphNamedRange( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Footer( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Header( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Margins( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_HiddenCols( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Window1( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Blank( SvStream &aStream, sal_uInt16 nLaenge ); // Lotus 123 bits. -void OP_BOF123( SvStream &aStream, USHORT nLaenge ); -void OP_EOF123( SvStream &aStream, USHORT nLaenge ); -void OP_Number123( SvStream &aStream, USHORT nLaenge ); -void OP_Label123( SvStream &aStream, USHORT nLaenge ); -void OP_Formula123( SvStream &aStream, USHORT nLaenge ); -void OP_IEEENumber123(SvStream& r, UINT16 n); -void OP_Note123(SvStream &aStream, USHORT nLaenge); -void OP_CreatePattern123(SvStream &aStream, USHORT nLaenge); -void OP_SheetName123( SvStream &rStream, USHORT nLength ); -void OP_HorAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ ); -void OP_VerAlign123(BYTE nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ ); +void OP_BOF123( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_EOF123( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Number123( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Label123( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_Formula123( SvStream &aStream, sal_uInt16 nLaenge ); +void OP_IEEENumber123(SvStream& r, sal_uInt16 n); +void OP_Note123(SvStream &aStream, sal_uInt16 nLaenge); +void OP_CreatePattern123(SvStream &aStream, sal_uInt16 nLaenge); +void OP_SheetName123( SvStream &rStream, sal_uInt16 nLength ); +void OP_HorAlign123(sal_uInt8 nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ ); +void OP_VerAlign123(sal_uInt8 nAlignPattern, SfxItemSet& rPattern /* const ScPatternAttr& rPattern*/ ); void OP_ApplyPatternArea123(SvStream& r); #endif diff --git a/sc/source/filter/inc/optab.h b/sc/source/filter/inc/optab.h index f4fb22af08c1..f40065214270 100644 --- a/sc/source/filter/inc/optab.h +++ b/sc/source/filter/inc/optab.h @@ -29,7 +29,7 @@ #ifndef SC_OPTAB_H #define SC_OPTAB_H -typedef void ( *OPCODE_FKT )( SvStream &aStream, USHORT nLaenge ); +typedef void ( *OPCODE_FKT )( SvStream &aStream, sal_uInt16 nLaenge ); #define FKT_LIMIT 101 diff --git a/sc/source/filter/inc/rtfexp.hxx b/sc/source/filter/inc/rtfexp.hxx index c37e647f5ec5..e058afea4586 100644 --- a/sc/source/filter/inc/rtfexp.hxx +++ b/sc/source/filter/inc/rtfexp.hxx @@ -34,7 +34,7 @@ class ScRTFExport : public ScExportBase { - ULONG* pCellX; // kumulierte Zellbreiten einer Tabelle + sal_uLong* pCellX; // kumulierte Zellbreiten einer Tabelle void WriteTab( SCTAB nTab ); void WriteRow( SCTAB nTab, SCROW nRow ); @@ -45,7 +45,7 @@ public: ScRTFExport( SvStream&, ScDocument*, const ScRange& ); virtual ~ScRTFExport(); - ULONG Write(); + sal_uLong Write(); }; diff --git a/sc/source/filter/inc/rtfparse.hxx b/sc/source/filter/inc/rtfparse.hxx index 0d691ba9f874..021a0b585262 100644 --- a/sc/source/filter/inc/rtfparse.hxx +++ b/sc/source/filter/inc/rtfparse.hxx @@ -38,7 +38,7 @@ struct ScRTFCellDefault { SfxItemSet aItemSet; SCCOL nCol; - USHORT nTwips; // rechter Rand der Zelle + sal_uInt16 nTwips; // rechter Rand der Zelle SCCOL nColOverlap; // MergeCell wenn >1, merged cells wenn 0 ScRTFCellDefault( SfxItemPool* pPool ) : @@ -47,7 +47,7 @@ struct ScRTFCellDefault typedef boost::ptr_vector< ScRTFCellDefault > ScRTFDefaultList; // deswegen ULONG, typedef bringt's auch nicht :-( -SV_DECL_VARARR_SORT( ScRTFColTwips, ULONG, 16, 4) +SV_DECL_VARARR_SORT( ScRTFColTwips, sal_uLong, 16, 4) #else // SC_RTFPARSE_CXX @@ -68,22 +68,22 @@ private: ScRTFCellDefault* pInsDefault; ScRTFCellDefault* pActDefault; ScRTFCellDefault* pDefMerge; - ULONG nStartAdjust; - USHORT nLastWidth; - BOOL bNewDef; + sal_uLong nStartAdjust; + sal_uInt16 nLastWidth; + sal_Bool bNewDef; DECL_LINK( RTFImportHdl, ImportInfo* ); inline void NextRow(); void EntryEnd( ScEEParseEntry*, const ESelection& ); void ProcToken( ImportInfo* ); void ColAdjust(); - BOOL SeekTwips( USHORT nTwips, SCCOL* pCol ); + sal_Bool SeekTwips( sal_uInt16 nTwips, SCCOL* pCol ); void NewCellRow( ImportInfo* ); public: ScRTFParser( EditEngine* ); virtual ~ScRTFParser(); - virtual ULONG Read( SvStream&, const String& rBaseURL ); + virtual sal_uLong Read( SvStream&, const String& rBaseURL ); }; diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx index de8e342ac28d..e66ba12e0c00 100644 --- a/sc/source/filter/inc/scflt.hxx +++ b/sc/source/filter/inc/scflt.hxx @@ -188,37 +188,37 @@ // Datum/Uhrzeit struct Sc10DateTime { - USHORT Year; - USHORT Month; - USHORT Day; - USHORT Hour; - USHORT Min; - USHORT Sec; + sal_uInt16 Year; + sal_uInt16 Month; + sal_uInt16 Day; + sal_uInt16 Hour; + sal_uInt16 Min; + sal_uInt16 Sec; }; // ZahlenFormate struct Sc10ValueFormat { - BYTE Format; // Zahl, Waehrung, Prozent etc. - BYTE Info; // Anzahl Nachkommastellen, Anzahl Stellen, bzw. Datums/Zeitformat + sal_uInt8 Format; // Zahl, Waehrung, Prozent etc. + sal_uInt8 Info; // Anzahl Nachkommastellen, Anzahl Stellen, bzw. Datums/Zeitformat }; // Fontbeschreibung struct Sc10LogFont { - INT16 lfHeight; - INT16 lfWidth; - INT16 lfEscapement; - INT16 lfOrientation; - INT16 lfWeight; - BYTE lfItalic; - BYTE lfUnderline; - BYTE lfStrikeOut; - BYTE lfCharSet; - BYTE lfOutPrecision; - BYTE lfClipPrecision; - BYTE lfQuality; - BYTE lfPitchAndFamily; + sal_Int16 lfHeight; + sal_Int16 lfWidth; + sal_Int16 lfEscapement; + sal_Int16 lfOrientation; + sal_Int16 lfWeight; + sal_uInt8 lfItalic; + sal_uInt8 lfUnderline; + sal_uInt8 lfStrikeOut; + sal_uInt8 lfCharSet; + sal_uInt8 lfOutPrecision; + sal_uInt8 lfClipPrecision; + sal_uInt8 lfQuality; + sal_uInt8 lfPitchAndFamily; sal_Char lfFaceName[32]; int operator==( const Sc10LogFont& rData ) const; @@ -227,51 +227,51 @@ struct Sc10LogFont // RGB-Frabwerte struct Sc10Color { - BYTE Dummy; - BYTE Blue; - BYTE Green; - BYTE Red; + sal_uInt8 Dummy; + sal_uInt8 Blue; + sal_uInt8 Green; + sal_uInt8 Red; int operator==( const Sc10Color& rColor ) const; }; // Blockbeschreibung struct Sc10BlockRect { - INT16 x1; - INT16 y1; - INT16 x2; - INT16 y2; + sal_Int16 x1; + sal_Int16 y1; + sal_Int16 x2; + sal_Int16 y2; }; // Datenbank-Bereich struct Sc10DataBaseRec { sal_Char Name[32]; - INT16 Tab; + sal_Int16 Tab; Sc10BlockRect Block; - BYTE RowHeader; - INT16 SortField0; - BYTE SortUpOrder0; - INT16 SortField1; - BYTE SortUpOrder1; - INT16 SortField2; - BYTE SortUpOrder2; - BYTE IncludeFormat; - INT16 QueryField0; - INT16 QueryOp0; - BYTE QueryByString0; + sal_uInt8 RowHeader; + sal_Int16 SortField0; + sal_uInt8 SortUpOrder0; + sal_Int16 SortField1; + sal_uInt8 SortUpOrder1; + sal_Int16 SortField2; + sal_uInt8 SortUpOrder2; + sal_uInt8 IncludeFormat; + sal_Int16 QueryField0; + sal_Int16 QueryOp0; + sal_uInt8 QueryByString0; sal_Char QueryString0[64]; double QueryValue0; - INT16 QueryConnect1; - INT16 QueryField1; - INT16 QueryOp1; - BYTE QueryByString1; + sal_Int16 QueryConnect1; + sal_Int16 QueryField1; + sal_Int16 QueryOp1; + sal_uInt8 QueryByString1; sal_Char QueryString1[64]; double QueryValue1; - INT16 QueryConnect2; - INT16 QueryField2; - INT16 QueryOp2; - BYTE QueryByString2; + sal_Int16 QueryConnect2; + sal_Int16 QueryField2; + sal_Int16 QueryOp2; + sal_uInt8 QueryByString2; sal_Char QueryString2[64]; double QueryValue2; }; @@ -281,15 +281,15 @@ struct Sc10HeadFootLine { sal_Char Title[128]; Sc10LogFont LogFont; - BYTE HorJustify; - BYTE VerJustify; - USHORT Raster; - USHORT Frame; + sal_uInt8 HorJustify; + sal_uInt8 VerJustify; + sal_uInt16 Raster; + sal_uInt16 Frame; Sc10Color TextColor; Sc10Color BackColor; Sc10Color RasterColor; - USHORT FrameColor; // Nibble Codierte Farben link oben rechts unten - USHORT Reserved; + sal_uInt16 FrameColor; // Nibble Codierte Farben link oben rechts unten + sal_uInt16 Reserved; int operator==( const Sc10HeadFootLine& rData ) const; }; @@ -299,31 +299,31 @@ struct Sc10PageFormat { Sc10HeadFootLine HeadLine; Sc10HeadFootLine FootLine; - INT16 Orientation; - INT16 Width; - INT16 Height; - INT16 NonPrintableX; - INT16 NonPrintableY; - INT16 Left; - INT16 Top; - INT16 Right; - INT16 Bottom; - INT16 Head; - INT16 Foot; - BYTE HorCenter; - BYTE VerCenter; - BYTE PrintGrid; - BYTE PrintColRow; - BYTE PrintNote; - BYTE TopBottomDir; + sal_Int16 Orientation; + sal_Int16 Width; + sal_Int16 Height; + sal_Int16 NonPrintableX; + sal_Int16 NonPrintableY; + sal_Int16 Left; + sal_Int16 Top; + sal_Int16 Right; + sal_Int16 Bottom; + sal_Int16 Head; + sal_Int16 Foot; + sal_uInt8 HorCenter; + sal_uInt8 VerCenter; + sal_uInt8 PrintGrid; + sal_uInt8 PrintColRow; + sal_uInt8 PrintNote; + sal_uInt8 TopBottomDir; sal_Char PrintAreaName[32]; Sc10BlockRect PrintArea; sal_Char PrnZoom[6]; // Pascal 6 Byte Realzahl - USHORT FirstPageNo; - INT16 RowRepeatStart; - INT16 RowRepeatEnd; - INT16 ColRepeatStart; - INT16 ColRepeatEnd; + sal_uInt16 FirstPageNo; + sal_Int16 RowRepeatStart; + sal_Int16 RowRepeatEnd; + sal_Int16 ColRepeatStart; + sal_Int16 ColRepeatEnd; sal_Char Reserved[26]; int operator==( const Sc10PageFormat& rData ) const; @@ -333,23 +333,23 @@ struct Sc10PageFormat struct Sc10TableProtect { sal_Char PassWord[16]; - USHORT Flags; - BYTE Protect; + sal_uInt16 Flags; + sal_uInt8 Protect; }; // Documentschutz struct Sc10SheetProtect { sal_Char PassWord[16]; - USHORT Flags; - BYTE Protect; + sal_uInt16 Flags; + sal_uInt8 Protect; }; // Dateikopf StarCalc 1.0 Datei struct Sc10FileHeader { sal_Char CopyRight[30]; - USHORT Version; + sal_uInt16 Version; sal_Char Reserved[32]; }; @@ -391,29 +391,29 @@ struct Sc10FileInfo struct Sc10EditStateInfo { // Cursor Position - USHORT CarretX; - USHORT CarretY; - USHORT CarretZ; + sal_uInt16 CarretX; + sal_uInt16 CarretY; + sal_uInt16 CarretZ; // Linke obere Ecke der Tabelle im Fenster - USHORT DeltaX; - USHORT DeltaY; - USHORT DeltaZ; + sal_uInt16 DeltaX; + sal_uInt16 DeltaY; + sal_uInt16 DeltaZ; // Ueberfluessig in StarCalc 3.0 - BYTE DataBaseMode; + sal_uInt8 DataBaseMode; sal_Char Reserved[51]; }; // Attribut-Eintrag struct Sc10ColData { - USHORT Row; - USHORT Value; + sal_uInt16 Row; + sal_uInt16 Value; }; // ZellAttribut-Beschreibung struct Sc10ColAttr { - USHORT Count; + sal_uInt16 Count; Sc10ColData* pData; Sc10ColAttr() : pData(NULL) {} @@ -422,18 +422,18 @@ struct Sc10ColAttr // GraphHeader struct Sc10GraphHeader { - BYTE Typ; // Typ der Grafik (Ole-Objekt, Image (Bitmap oder MetaFile), Chart-Object) - INT16 CarretX; // ZellPosition der Grafik - INT16 CarretY; - INT16 CarretZ; - INT32 x; // x,y Abstand zum Zellrand in Pixel (Pixel weil ich Grafiken in Fenstern ablege) - INT32 y; - INT32 w; // w,h Breite und Hoehe in Pixel - INT32 h; - BYTE IsRelPos; // Ist die Position relativ zur Zelle oder absolute in der Tabelle - BYTE DoPrint; // Soll die Grafik ausgedruckt werden - USHORT FrameType; // Art der Umrandung um die Grafik (Keine, Einfach, Doppelt, Einfach Dick, Doppelt Dick) - BYTE IsTransparent; // Soll der Hintergrund gezeichnet werden + sal_uInt8 Typ; // Typ der Grafik (Ole-Objekt, Image (Bitmap oder MetaFile), Chart-Object) + sal_Int16 CarretX; // ZellPosition der Grafik + sal_Int16 CarretY; + sal_Int16 CarretZ; + sal_Int32 x; // x,y Abstand zum Zellrand in Pixel (Pixel weil ich Grafiken in Fenstern ablege) + sal_Int32 y; + sal_Int32 w; // w,h Breite und Hoehe in Pixel + sal_Int32 h; + sal_uInt8 IsRelPos; // Ist die Position relativ zur Zelle oder absolute in der Tabelle + sal_uInt8 DoPrint; // Soll die Grafik ausgedruckt werden + sal_uInt16 FrameType; // Art der Umrandung um die Grafik (Keine, Einfach, Doppelt, Einfach Dick, Doppelt Dick) + sal_uInt8 IsTransparent; // Soll der Hintergrund gezeichnet werden Sc10Color FrameColor; // Umrandungsfarbe als RGB-Wert Sc10Color BackColor; // Hintergrundfarbe als RGB-Wert sal_Char Reserved[32]; // Na was wohl @@ -443,50 +443,50 @@ struct Sc10GraphHeader struct Sc10ImageHeader { sal_Char FileName[128]; // Dateiname des urspruenglich eingefuegten Bildes - INT16 Typ; // Typ der Grafik (Bitmap oder Metafile) - BYTE Linked; // Kann nicht vorkommen - INT16 x1; // Urspruengliche Groesse der Grafik (nur fuer Metafiles) - INT16 y1; - INT16 x2; - INT16 y2; + sal_Int16 Typ; // Typ der Grafik (Bitmap oder Metafile) + sal_uInt8 Linked; // Kann nicht vorkommen + sal_Int16 x1; // Urspruengliche Groesse der Grafik (nur fuer Metafiles) + sal_Int16 y1; + sal_Int16 x2; + sal_Int16 y2; sal_uInt32 Size; // Groesse der Grafik in BYTES }; // ChartHeader struct Sc10ChartHeader { - INT16 MM; // Meatfile Struktur MapMode, Breite, Hoehe - INT16 xExt; - INT16 yExt; + sal_Int16 MM; // Meatfile Struktur MapMode, Breite, Hoehe + sal_Int16 xExt; + sal_Int16 yExt; sal_uInt32 Size; // Groesse der Grafik in BYTES }; // ChartSheetData struct Sc10ChartSheetData { - BYTE HasTitle; // Hat das Chart Daten aus der Tabell fuer einen Titel - INT16 TitleX; // Zellposition des Titels - INT16 TitleY; - BYTE HasSubTitle; // Hat das Chart Daten aus der Tabell fuer einen Untertitel - INT16 SubTitleX; // Zellposition des Untertitels - INT16 SubTitleY; - BYTE HasLeftTitle; // Hat das Chart Daten aus der Tabelle fuer einen Linken-Titel - INT16 LeftTitleX; // Zellposition des Linken-Titels - INT16 LeftTitleY; - BYTE HasLegend; // Hat das Chart Daten aus der Tabelle fuer eine Legende - INT16 LegendX1; // Zellen der Legende - INT16 LegendY1; - INT16 LegendX2; - INT16 LegendY2; - BYTE HasLabel; // Hat das Chart Daten aus der Tabelle fuer die Achsbeschriftung - INT16 LabelX1; // Zellen der Achsbeschriftung - INT16 LabelY1; - INT16 LabelX2; - INT16 LabelY2; - INT16 DataX1; // Zellen der Daten - INT16 DataY1; - INT16 DataX2; - INT16 DataY2; + sal_uInt8 HasTitle; // Hat das Chart Daten aus der Tabell fuer einen Titel + sal_Int16 TitleX; // Zellposition des Titels + sal_Int16 TitleY; + sal_uInt8 HasSubTitle; // Hat das Chart Daten aus der Tabell fuer einen Untertitel + sal_Int16 SubTitleX; // Zellposition des Untertitels + sal_Int16 SubTitleY; + sal_uInt8 HasLeftTitle; // Hat das Chart Daten aus der Tabelle fuer einen Linken-Titel + sal_Int16 LeftTitleX; // Zellposition des Linken-Titels + sal_Int16 LeftTitleY; + sal_uInt8 HasLegend; // Hat das Chart Daten aus der Tabelle fuer eine Legende + sal_Int16 LegendX1; // Zellen der Legende + sal_Int16 LegendY1; + sal_Int16 LegendX2; + sal_Int16 LegendY2; + sal_uInt8 HasLabel; // Hat das Chart Daten aus der Tabelle fuer die Achsbeschriftung + sal_Int16 LabelX1; // Zellen der Achsbeschriftung + sal_Int16 LabelY1; + sal_Int16 LabelX2; + sal_Int16 LabelY2; + sal_Int16 DataX1; // Zellen der Daten + sal_Int16 DataY1; + sal_Int16 DataX2; + sal_Int16 DataY2; sal_Char Reserved[64]; }; @@ -505,29 +505,29 @@ typedef sal_Char Sc10ChartText[30]; struct Sc10ChartTypeData { - INT16 NumSets; - INT16 NumPoints; - INT16 DrawMode; - INT16 GraphType; - INT16 GraphStyle; + sal_Int16 NumSets; + sal_Int16 NumPoints; + sal_Int16 DrawMode; + sal_Int16 GraphType; + sal_Int16 GraphStyle; sal_Char GraphTitle[80]; sal_Char BottomTitle[80]; - INT16 SymbolData[256]; - INT16 ColorData[256]; - INT16 ThickLines[256]; - INT16 PatternData[256]; - INT16 LinePatternData[256]; - INT16 NumGraphStyles[11]; - INT16 ShowLegend; + sal_Int16 SymbolData[256]; + sal_Int16 ColorData[256]; + sal_Int16 ThickLines[256]; + sal_Int16 PatternData[256]; + sal_Int16 LinePatternData[256]; + sal_Int16 NumGraphStyles[11]; + sal_Int16 ShowLegend; Sc10ChartText LegendText[256]; - INT16 ExplodePie; - INT16 FontUse; - INT16 FontFamily[5]; - INT16 FontStyle[5]; - INT16 FontSize[5]; - INT16 GridStyle; - INT16 Labels; - INT16 LabelEvery; + sal_Int16 ExplodePie; + sal_Int16 FontUse; + sal_Int16 FontFamily[5]; + sal_Int16 FontStyle[5]; + sal_Int16 FontSize[5]; + sal_Int16 GridStyle; + sal_Int16 Labels; + sal_Int16 LabelEvery; Sc10ChartText LabelText[50]; sal_Char LeftTitle[80]; sal_Char Reserved[4646]; @@ -538,9 +538,9 @@ struct Sc10ChartTypeData class Sc10FontData : public ScDataObject { public: - INT16 Height; - BYTE CharSet; - BYTE PitchAndFamily; + sal_Int16 Height; + sal_uInt8 CharSet; + sal_uInt8 PitchAndFamily; sal_Char FaceName[32]; Sc10FontData( const Sc10FontData& rData ) : @@ -561,11 +561,11 @@ public: class Sc10FontCollection : public ScCollection { protected: - ULONG nError; + sal_uLong nError; public: Sc10FontCollection( SvStream& rStream ); - ULONG GetError() { return nError; } - Sc10FontData* At(USHORT nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); } + sal_uLong GetError() { return nError; } + Sc10FontData* At(sal_uInt16 nIndex) { return (Sc10FontData*)ScCollection::At(nIndex); } private: using ScCollection::At; }; @@ -597,11 +597,11 @@ public : class Sc10NameCollection : public ScCollection { protected: - ULONG nError; + sal_uLong nError; public: Sc10NameCollection(SvStream& rStream); -ULONG GetError() { return nError; } -Sc10NameData* At(USHORT nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); } +sal_uLong GetError() { return nError; } +Sc10NameData* At(sal_uInt16 nIndex) { return (Sc10NameData*)ScCollection::At(nIndex); } private: using ScCollection::At; }; @@ -614,14 +614,14 @@ public: sal_Char Name[32]; Sc10ValueFormat ValueFormat; Sc10LogFont LogFont; - USHORT Attr; - USHORT Justify; - USHORT Frame; - USHORT Raster; - USHORT nColor; - USHORT FrameColor; - USHORT Flags; - USHORT FormatFlags; + sal_uInt16 Attr; + sal_uInt16 Justify; + sal_uInt16 Frame; + sal_uInt16 Raster; + sal_uInt16 nColor; + sal_uInt16 FrameColor; + sal_uInt16 Flags; + sal_uInt16 FormatFlags; sal_Char Reserved[8]; Sc10PatternData(const Sc10PatternData& rData) : @@ -650,11 +650,11 @@ virtual ScDataObject* Clone() const { return new Sc10PatternData(*this); } class Sc10PatternCollection : public ScCollection { protected: - ULONG nError; + sal_uLong nError; public: Sc10PatternCollection(SvStream& rStream); - ULONG GetError() { return nError; } - Sc10PatternData* At(USHORT nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); } + sal_uLong GetError() { return nError; } + Sc10PatternData* At(sal_uInt16 nIndex) { return (Sc10PatternData*)ScCollection::At(nIndex); } private: using ScCollection::At; }; @@ -680,12 +680,12 @@ virtual ScDataObject* Clone() const { return new Sc10DataBaseData(*this); class Sc10DataBaseCollection : public ScCollection { protected: - ULONG nError; + sal_uLong nError; sal_Char ActName[32]; public: Sc10DataBaseCollection(SvStream& rStream); - ULONG GetError() { return nError; } - Sc10DataBaseData* At(USHORT nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); } + sal_uLong GetError() { return nError; } + Sc10DataBaseData* At(sal_uInt16 nIndex) { return (Sc10DataBaseData*)ScCollection::At(nIndex); } private: using ScCollection::At; }; @@ -706,8 +706,8 @@ class Sc10PageCollection : public ScCollection { public: Sc10PageCollection() : ScCollection(1,1) {}; - Sc10PageData* At(USHORT nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); } - USHORT InsertFormat( const Sc10PageFormat& rData ); + Sc10PageData* At(sal_uInt16 nIndex) { return (Sc10PageData*)ScCollection::At(nIndex); } + sal_uInt16 InsertFormat( const Sc10PageFormat& rData ); void PutToDoc( ScDocument* pDoc ); private: using ScCollection::At; @@ -730,8 +730,8 @@ class Sc10Import Sc10NameCollection* pNameCollection; Sc10PatternCollection* pPatternCollection; Sc10DataBaseCollection* pDataBaseCollection; - ULONG nError; - INT16 TabCount; + sal_uLong nError; + sal_Int16 TabCount; SCTAB nShowTab; ScViewOptions aSc30ViewOpt; ScfStreamProgressBar* pPrgrsBar; @@ -740,7 +740,7 @@ public: Sc10Import( SvStream& rStr, ScDocument* pDocument ); ~Sc10Import(); - ULONG Import(); + sal_uLong Import(); void LoadFileHeader(); void LoadFileInfo(); void LoadEditStateInfo(); @@ -757,7 +757,7 @@ public: void LoadCol(SCCOL Col, SCTAB Tab); void LoadColAttr(SCCOL Col, SCTAB Tab); void LoadAttr(Sc10ColAttr& rAttr); - void ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey); + void ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey); void LoadObjects(); }; diff --git a/sc/source/filter/inc/scfobj.hxx b/sc/source/filter/inc/scfobj.hxx index a83c2ea0a1d5..c31106f16ebc 100644 --- a/sc/source/filter/inc/scfobj.hxx +++ b/sc/source/filter/inc/scfobj.hxx @@ -38,7 +38,7 @@ class Sc10InsertObject { public: static void InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect, - SCTAB nSrcTab, USHORT nX1, USHORT nY1, USHORT nX2, USHORT nY2 ); + SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 ); }; diff --git a/sc/source/filter/inc/scmem.h b/sc/source/filter/inc/scmem.h index 029351639f72..99222707b64d 100644 --- a/sc/source/filter/inc/scmem.h +++ b/sc/source/filter/inc/scmem.h @@ -31,7 +31,7 @@ #include <tools/solar.h> -BOOL MemNew( void ); +sal_Bool MemNew( void ); void MemDelete( void ); #endif diff --git a/sc/source/filter/inc/tokstack.hxx b/sc/source/filter/inc/tokstack.hxx index 0fc780bab344..8e84e6da647d 100644 --- a/sc/source/filter/inc/tokstack.hxx +++ b/sc/source/filter/inc/tokstack.hxx @@ -37,26 +37,26 @@ #include <vector> typedef OpCode DefTokenId; -// in PRODUCT version: ambiguity between OpCode (being USHORT) and UINT16 +// in PRODUCT version: ambiguity between OpCode (being sal_uInt16) and UINT16 // Unfortunately a typedef is just a dumb alias and not a real type ... -//typedef UINT16 TokenId; +//typedef sal_uInt16 TokenId; struct TokenId { - UINT16 nId; + sal_uInt16 nId; TokenId() : nId( 0 ) {} - TokenId( UINT16 n ) : nId( n ) {} + TokenId( sal_uInt16 n ) : nId( n ) {} TokenId( const TokenId& r ) : nId( r.nId ) {} inline TokenId& operator =( const TokenId& r ) { nId = r.nId; return *this; } - inline TokenId& operator =( UINT16 n ) { nId = n; return *this; } - inline operator UINT16&() { return nId; } - inline operator const UINT16&() const { return nId; } - inline BOOL operator <( UINT16 n ) const { return nId < n; } - inline BOOL operator >( UINT16 n ) const { return nId > n; } - inline BOOL operator <=( UINT16 n ) const { return nId <= n; } - inline BOOL operator >=( UINT16 n ) const { return nId >= n; } - inline BOOL operator ==( UINT16 n ) const { return nId == n; } - inline BOOL operator !=( UINT16 n ) const { return nId != n; } + inline TokenId& operator =( sal_uInt16 n ) { nId = n; return *this; } + inline operator sal_uInt16&() { return nId; } + inline operator const sal_uInt16&() const { return nId; } + inline sal_Bool operator <( sal_uInt16 n ) const { return nId < n; } + inline sal_Bool operator >( sal_uInt16 n ) const { return nId > n; } + inline sal_Bool operator <=( sal_uInt16 n ) const { return nId <= n; } + inline sal_Bool operator >=( sal_uInt16 n ) const { return nId >= n; } + inline sal_Bool operator ==( sal_uInt16 n ) const { return nId == n; } + inline sal_Bool operator !=( sal_uInt16 n ) const { return nId != n; } }; @@ -93,25 +93,25 @@ class TokenPool // Ausgabe Id = 0 -> Fehlerfall private: String** ppP_Str; // Pool fuer Strings - UINT16 nP_Str; // ...mit Groesse - UINT16 nP_StrAkt; // ...und Schreibmarke + sal_uInt16 nP_Str; // ...mit Groesse + sal_uInt16 nP_StrAkt; // ...und Schreibmarke double* pP_Dbl; // Pool fuer Doubles - UINT16 nP_Dbl; - UINT16 nP_DblAkt; + sal_uInt16 nP_Dbl; + sal_uInt16 nP_DblAkt; - USHORT* pP_Err; // Pool for error codes - UINT16 nP_Err; - UINT16 nP_ErrAkt; + sal_uInt16* pP_Err; // Pool for error codes + sal_uInt16 nP_Err; + sal_uInt16 nP_ErrAkt; ScSingleRefData** ppP_RefTr; // Pool fuer Referenzen - UINT16 nP_RefTr; - UINT16 nP_RefTrAkt; + sal_uInt16 nP_RefTr; + sal_uInt16 nP_RefTrAkt; - UINT16* pP_Id; // Pool fuer Id-Folgen - UINT16 nP_Id; - UINT16 nP_IdAkt; - UINT16 nP_IdLast; // letzter Folgen-Beginn + sal_uInt16* pP_Id; // Pool fuer Id-Folgen + sal_uInt16 nP_Id; + sal_uInt16 nP_IdAkt; + sal_uInt16 nP_IdLast; // letzter Folgen-Beginn struct EXTCONT { @@ -121,8 +121,8 @@ class TokenPool eId( e ), aText( r ){} }; EXTCONT** ppP_Ext; - UINT16 nP_Ext; - UINT16 nP_ExtAkt; + sal_uInt16 nP_Ext; + sal_uInt16 nP_ExtAkt; struct NLFCONT { @@ -130,12 +130,12 @@ class TokenPool NLFCONT( const ScSingleRefData& r ) : aRef( r ) {} }; NLFCONT** ppP_Nlf; - UINT16 nP_Nlf; - UINT16 nP_NlfAkt; + sal_uInt16 nP_Nlf; + sal_uInt16 nP_NlfAkt; ScMatrix** ppP_Matrix; // Pool fuer Matricies - UINT16 nP_Matrix; - UINT16 nP_MatrixAkt; + sal_uInt16 nP_Matrix; + sal_uInt16 nP_MatrixAkt; /** for storage of external names */ struct ExtName @@ -163,15 +163,15 @@ class TokenPool }; ::std::vector<ExtAreaRef> maExtAreaRefs; - UINT16* pElement; // Array mit Indizes fuer Elemente + sal_uInt16* pElement; // Array mit Indizes fuer Elemente E_TYPE* pType; // ...mit Typ-Info - UINT16* pSize; // ...mit Laengenangabe (Anz. UINT16) - UINT16 nElement; - UINT16 nElementAkt; + sal_uInt16* pSize; // ...mit Laengenangabe (Anz. sal_uInt16) + sal_uInt16 nElement; + sal_uInt16 nElementAkt; - static const UINT16 nScTokenOff;// Offset fuer SC-Token + static const sal_uInt16 nScTokenOff;// Offset fuer SC-Token #ifdef DBG_UTIL - UINT16 nRek; // Rekursionszaehler + sal_uInt16 nRek; // Rekursionszaehler #endif ScTokenArray* pScToken; // Tokenbastler @@ -183,8 +183,8 @@ class TokenPool void GrowExt( void ); void GrowNlf( void ); void GrowMatrix( void ); - void GetElement( const UINT16 nId ); - void GetElementRek( const UINT16 nId ); + void GetElement( const sal_uInt16 nId ); + void GetElementRek( const sal_uInt16 nId ); public: TokenPool( void ); ~TokenPool(); @@ -197,8 +197,8 @@ class TokenPool const TokenId Store( const double& rDouble ); // nur fuer Range-Names - const TokenId Store( const UINT16 nIndex ); - inline const TokenId Store( const INT16 nWert ); + const TokenId Store( const sal_uInt16 nIndex ); + inline const TokenId Store( const sal_Int16 nWert ); const TokenId Store( const String& rString ); const TokenId Store( const ScSingleRefData& rTr ); const TokenId Store( const ScComplexRefData& rTr ); @@ -215,7 +215,7 @@ class TokenPool inline const ScTokenArray* operator []( const TokenId nId ); void Reset( void ); inline E_TYPE GetType( const TokenId& nId ) const; - BOOL IsSingleOp( const TokenId& nId, const DefTokenId eId ) const; + sal_Bool IsSingleOp( const TokenId& nId, const DefTokenId eId ) const; const String* GetExternal( const TokenId& nId ) const; ScMatrix* GetMatrix( unsigned int n ) const; }; @@ -229,10 +229,10 @@ class TokenStack { private: TokenId* pStack; // Stack als Array - UINT16 nPos; // Schreibmarke - UINT16 nSize; // Erster Index ausserhalb des Stacks + sal_uInt16 nPos; // Schreibmarke + sal_uInt16 nSize; // Erster Index ausserhalb des Stacks public: - TokenStack( UINT16 nNewSize = 1024 ); + TokenStack( sal_uInt16 nNewSize = 1024 ); ~TokenStack(); inline TokenStack& operator <<( const TokenId nNewId ); inline void operator >>( TokenId &rId ); @@ -302,14 +302,14 @@ inline TokenPool& TokenPool::operator <<( const TokenId nId ) { // POST: nId's werden hintereinander im Pool unter einer neuen Id // abgelegt. Vorgang wird mit >> oder Store() abgeschlossen - // nId -> ( UINT16 ) nId - 1; - DBG_ASSERT( ( UINT16 ) nId < nScTokenOff, + // nId -> ( sal_uInt16 ) nId - 1; + DBG_ASSERT( ( sal_uInt16 ) nId < nScTokenOff, "-TokenPool::operator <<: TokenId im DefToken-Bereich!" ); if( nP_IdAkt >= nP_Id ) GrowId(); - pP_Id[ nP_IdAkt ] = ( ( UINT16 ) nId ) - 1; + pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) nId ) - 1; nP_IdAkt++; return *this; @@ -318,13 +318,13 @@ inline TokenPool& TokenPool::operator <<( const TokenId nId ) inline TokenPool& TokenPool::operator <<( const DefTokenId eId ) { - DBG_ASSERT( ( UINT32 ) eId + nScTokenOff < 0xFFFF, + DBG_ASSERT( ( sal_uInt32 ) eId + nScTokenOff < 0xFFFF, "-TokenPool::operator<<: enmum zu gross!" ); if( nP_IdAkt >= nP_Id ) GrowId(); - pP_Id[ nP_IdAkt ] = ( ( UINT16 ) eId ) + nScTokenOff; + pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) eId ) + nScTokenOff; nP_IdAkt++; return *this; @@ -336,7 +336,7 @@ inline TokenPool& TokenPool::operator <<( TokenStack& rStack ) if( nP_IdAkt >= nP_Id ) GrowId(); - pP_Id[ nP_IdAkt ] = ( ( UINT16 ) rStack.Get() ) - 1; + pP_Id[ nP_IdAkt ] = ( ( sal_uInt16 ) rStack.Get() ) - 1; nP_IdAkt++; return *this; @@ -359,7 +359,7 @@ inline const TokenId TokenPool::Store( void ) } -inline const TokenId TokenPool::Store( const INT16 nWert ) +inline const TokenId TokenPool::Store( const sal_Int16 nWert ) { return Store( ( double ) nWert ); } @@ -380,7 +380,7 @@ const inline ScTokenArray* TokenPool::operator []( const TokenId nId ) #ifdef DBG_UTIL nRek = 0; #endif - GetElement( ( UINT16 ) nId - 1 ); + GetElement( ( sal_uInt16 ) nId - 1 ); } return pScToken; @@ -391,7 +391,7 @@ inline E_TYPE TokenPool::GetType( const TokenId& rId ) const { E_TYPE nRet; - UINT16 nId = (UINT16) rId - 1; + sal_uInt16 nId = (sal_uInt16) rId - 1; if( nId < nElementAkt ) nRet = pType[ nId ] ; diff --git a/sc/source/filter/inc/tool.h b/sc/source/filter/inc/tool.h index c0c936798fa3..8b0aac6a05d8 100644 --- a/sc/source/filter/inc/tool.h +++ b/sc/source/filter/inc/tool.h @@ -33,22 +33,22 @@ #include <document.hxx> // Defaultwerte -const BYTE nDezStd = 0; // Dezimalstellen fuer Standard-Zellen -const BYTE nDezFloat = 2; // " " Float-Zellen +const sal_uInt8 nDezStd = 0; // Dezimalstellen fuer Standard-Zellen +const sal_uInt8 nDezFloat = 2; // " " Float-Zellen void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char *pString ); -void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, BYTE nFormat, BYTE nSt ); +void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt ); void InitPage( void ); String DosToSystem( sal_Char *pSource ); -double SnumToDouble( INT16 nVal ); +double SnumToDouble( sal_Int16 nVal ); -double Snum32ToDouble( UINT32 nValue ); +double Snum32ToDouble( sal_uInt32 nValue ); -typedef UINT16 StampTyp; +typedef sal_uInt16 StampTyp; #define MAKE_STAMP(nF,nS) ((nS&0x0F)+((nF&0x7F)*16)) // Bit 0...3 = Bit 0...3 von Stellenzahl @@ -66,24 +66,24 @@ public: pAttr = NULL; } - FormIdent( BYTE nFormat, BYTE nSt, SfxUInt32Item& rAttr ) + FormIdent( sal_uInt8 nFormat, sal_uInt8 nSt, SfxUInt32Item& rAttr ) { nStamp = MAKE_STAMP( nFormat, nSt ); pAttr = &rAttr; } - FormIdent( BYTE nFormat, BYTE nSt ) + FormIdent( sal_uInt8 nFormat, sal_uInt8 nSt ) { nStamp = MAKE_STAMP( nFormat, nSt ); pAttr = NULL; } - BOOL operator ==( const FormIdent& rComp ) const + sal_Bool operator ==( const FormIdent& rComp ) const { return ( nStamp == rComp.nStamp ); } - BOOL operator ==( const StampTyp& rStamp ) const + sal_Bool operator ==( const StampTyp& rStamp ) const { return ( nStamp == rStamp ); } @@ -98,7 +98,7 @@ public: return pAttr; } - void SetStamp( BYTE nFormat, BYTE nSt ) + void SetStamp( sal_uInt8 nFormat, sal_uInt8 nSt ) { nStamp = MAKE_STAMP( nFormat, nSt ); } @@ -114,27 +114,27 @@ class FormCache { private: FormIdent aIdents[ __nSize ]; //gepufferte Formate - BOOL bValid[ __nSize ]; + sal_Bool bValid[ __nSize ]; FormIdent aCompareIdent; // zum Vergleichen - BYTE nDefaultFormat; // Defaultformat der Datei + sal_uInt8 nDefaultFormat; // Defaultformat der Datei SvNumberFormatter* pFormTable; // Value-Format-Table-Anker StampTyp nIndex; LanguageType eLanguage; // Systemsprache - SfxUInt32Item* NewAttr( BYTE nFormat, BYTE nSt ); + SfxUInt32Item* NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ); public: - FormCache( ScDocument*, BYTE nNewDefaultFormat = 0xFF ); + FormCache( ScDocument*, sal_uInt8 nNewDefaultFormat = 0xFF ); ~FormCache(); - inline const SfxUInt32Item* GetAttr( BYTE nFormat, BYTE nSt ); - void SetDefaultFormat( BYTE nD = 0xFF ) + inline const SfxUInt32Item* GetAttr( sal_uInt8 nFormat, sal_uInt8 nSt ); + void SetDefaultFormat( sal_uInt8 nD = 0xFF ) { nDefaultFormat = nD; } }; -inline const SfxUInt32Item* FormCache::GetAttr( BYTE nFormat, BYTE nSt ) +inline const SfxUInt32Item* FormCache::GetAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) { // PREC: nFormat = Lotus-Format-Byte // nSt = Stellenzahl @@ -154,7 +154,7 @@ inline const SfxUInt32Item* FormCache::GetAttr( BYTE nFormat, BYTE nSt ) DBG_ASSERT( pAttr, "FormCache::GetAttr(): Nix Speicherus" ); aIdents[ nIndex ] = FormIdent( nFormat, nSt, *pAttr ); - bValid[ nIndex ] = TRUE; + bValid[ nIndex ] = sal_True; pRet = pAttr; } diff --git a/sc/source/filter/inc/xcl97dum.hxx b/sc/source/filter/inc/xcl97dum.hxx index 771a3edadfed..cc7acd23bd8a 100644 --- a/sc/source/filter/inc/xcl97dum.hxx +++ b/sc/source/filter/inc/xcl97dum.hxx @@ -36,55 +36,55 @@ class ExcDummy8_00a : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen() const; - virtual const BYTE* GetData() const; + virtual const sal_uInt8* GetData() const; }; class ExcDummy8_00b : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen() const; - virtual const BYTE* GetData() const; + virtual const sal_uInt8* GetData() const; }; class ExcDummy8_040 : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen() const; - virtual const BYTE* GetData() const; + virtual const sal_uInt8* GetData() const; }; class ExcDummy8_041 : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen() const; - virtual const BYTE* GetData() const; + virtual const sal_uInt8* GetData() const; }; class ExcDummy8_02 : public ExcDummyRec { private: - static const BYTE pMyData[]; + static const sal_uInt8 pMyData[]; static const sal_Size nMyLen; public: virtual sal_Size GetLen() const; - virtual const BYTE* GetData() const; + virtual const sal_uInt8* GetData() const; }; diff --git a/sc/source/filter/inc/xcl97esc.hxx b/sc/source/filter/inc/xcl97esc.hxx index d48933bdbb62..55f33b6033e4 100644 --- a/sc/source/filter/inc/xcl97esc.hxx +++ b/sc/source/filter/inc/xcl97esc.hxx @@ -114,7 +114,7 @@ public: virtual EscherExHostAppData* StartShape( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape>& rxShape, const Rectangle* pChildAnchor ); - virtual void EndShape( UINT16 nShapeType, UINT32 nShapeID ); + virtual void EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID ); virtual EscherExHostAppData* EnterAdditionalTextGroup(); /// Flush and merge PicStream into EscherStream @@ -152,7 +152,7 @@ private: XclEscherHostAppData* pCurrAppData; XclEscherClientData* pTheClientData; // always the same XclEscherClientTextbox* pAdditionalText; - USHORT nAdditionalText; + sal_uInt16 nAdditionalText; sal_uInt32 mnNextKey; bool mbIsRootDff; }; @@ -162,13 +162,13 @@ private: class XclEscherHostAppData : public EscherExHostAppData { private: - BOOL bStackedGroup; + sal_Bool bStackedGroup; public: - XclEscherHostAppData() : bStackedGroup( FALSE ) + XclEscherHostAppData() : bStackedGroup( false ) {} - inline void SetStackedGroup( BOOL b ) { bStackedGroup = b; } - inline BOOL IsStackedGroup() const { return bStackedGroup; } + inline void SetStackedGroup( sal_Bool b ) { bStackedGroup = b; } + inline sal_Bool IsStackedGroup() const { return bStackedGroup; } }; diff --git a/sc/source/filter/inc/xcl97rec.hxx b/sc/source/filter/inc/xcl97rec.hxx index f15ed6b635bb..b60e9ea4f178 100644 --- a/sc/source/filter/inc/xcl97rec.hxx +++ b/sc/source/filter/inc/xcl97rec.hxx @@ -50,7 +50,7 @@ public: /// return: 1-based ObjId ///! count>=0xFFFF: Obj will be deleted, return 0 - UINT16 Add( XclObj* ); + sal_uInt16 Add( XclObj* ); inline XclExpMsoDrawing* GetMsodrawingPerSheet() { return pMsodrawingPerSheet; } @@ -88,7 +88,7 @@ protected: UINT16 nObjId; UINT16 nGrbit; SCTAB mnScTab; - BOOL bFirstOnSheet; + sal_Bool bFirstOnSheet; bool mbOwnEscher; /// true = Escher part created on the fly. @@ -114,17 +114,17 @@ public: inline void SetTab( SCTAB nScTab ) { mnScTab = nScTab; } inline SCTAB GetTab() const { return mnScTab; } - inline void SetLocked( BOOL b ) + inline void SetLocked( sal_Bool b ) { b ? nGrbit |= 0x0001 : nGrbit &= ~0x0001; } - inline void SetPrintable( BOOL b ) + inline void SetPrintable( sal_Bool b ) { b ? nGrbit |= 0x0010 : nGrbit &= ~0x0010; } - inline void SetAutoFill( BOOL b ) + inline void SetAutoFill( sal_Bool b ) { b ? nGrbit |= 0x2000 : nGrbit &= ~0x2000; } - inline void SetAutoLine( BOOL b ) + inline void SetAutoLine( sal_Bool b ) { b ? nGrbit |= 0x4000 : nGrbit &= ~0x4000; } // set corresponding Excel object type in OBJ/ftCmo - void SetEscherShapeType( UINT16 nType ); + void SetEscherShapeType( sal_uInt16 nType ); inline void SetEscherShapeTypeGroup() { mnObjType = EXC_OBJTYPE_GROUP; } /** If set to true, this object has created its own escher data. @@ -177,13 +177,13 @@ public: class XclObjDropDown : public XclObj { private: - BOOL bIsFiltered; + sal_Bool bIsFiltered; virtual void WriteSubRecs( XclExpStream& rStrm ); protected: public: - XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, BOOL bFilt ); + XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, sal_Bool bFilt ); virtual ~XclObjDropDown(); }; @@ -204,7 +204,7 @@ public: virtual void Save( XclExpStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; private: @@ -269,15 +269,15 @@ private: class ExcBof8_Base : public ExcBof_Base { protected: - UINT32 nFileHistory; // bfh - UINT32 nLowestBiffVer; // sfo + sal_uInt32 nFileHistory; // bfh + sal_uInt32 nLowestBiffVer; // sfo virtual void SaveCont( XclExpStream& rStrm ); public: ExcBof8_Base(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -327,7 +327,7 @@ public: class XclObproj : public ExcRecord { public: - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -342,7 +342,7 @@ private: public: XclCodename( const String& ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -355,13 +355,13 @@ public: class ExcEScenarioCell { private: - UINT16 nCol; - UINT16 nRow; + sal_uInt16 nCol; + sal_uInt16 nRow; XclExpString sText; protected: public: - ExcEScenarioCell( UINT16 nC, UINT16 nR, const String& rTxt ); + ExcEScenarioCell( sal_uInt16 nC, sal_uInt16 nR, const String& rTxt ); inline sal_Size GetStringBytes() { return sText.GetSize(); } @@ -381,12 +381,12 @@ private: XclExpString sName; XclExpString sComment; XclExpString sUserName; - UINT8 nProtected; + sal_uInt8 nProtected; inline ExcEScenarioCell* _First() { return (ExcEScenarioCell*) List::First(); } inline ExcEScenarioCell* _Next() { return (ExcEScenarioCell*) List::Next(); } - BOOL Append( UINT16 nCol, UINT16 nRow, const String& rTxt ); + sal_Bool Append( sal_uInt16 nCol, sal_uInt16 nRow, const String& rTxt ); virtual void SaveCont( XclExpStream& rStrm ); @@ -395,7 +395,7 @@ public: ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ); virtual ~ExcEScenario(); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -406,7 +406,7 @@ public: class ExcEScenarioManager : public ExcRecord, private List { private: - UINT16 nActive; + sal_uInt16 nActive; inline ExcEScenario* _First() { return (ExcEScenario*) List::First(); } inline ExcEScenario* _Next() { return (ExcEScenario*) List::Next(); } @@ -424,7 +424,7 @@ public: virtual void Save( XclExpStream& rStrm ); virtual void SaveXml( XclExpXmlStream& rStrm ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; }; @@ -450,13 +450,13 @@ private: class XclCalccount : public ExcRecord { private: - UINT16 nCount; + sal_uInt16 nCount; protected: virtual void SaveCont( XclExpStream& rStrm ); public: XclCalccount( const ScDocument& ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -468,13 +468,13 @@ public: class XclIteration : public ExcRecord { private: - UINT16 nIter; + sal_uInt16 nIter; protected: virtual void SaveCont( XclExpStream& rStrm ); public: XclIteration( const ScDocument& ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -492,7 +492,7 @@ protected: public: XclDelta( const ScDocument& ); - virtual UINT16 GetNum() const; + virtual sal_uInt16 GetNum() const; virtual sal_Size GetLen() const; virtual void SaveXml( XclExpXmlStream& rStrm ); @@ -511,11 +511,11 @@ public: // ============================================================================ -class XclExpFilePass : public XclExpRecord +class XclExpFileEncryption : public XclExpRecord { public: - explicit XclExpFilePass( const XclExpRoot& rRoot ); - virtual ~XclExpFilePass(); + explicit XclExpFileEncryption( const XclExpRoot& rRoot ); + virtual ~XclExpFileEncryption(); private: virtual void WriteBody( XclExpStream& rStrm ); diff --git a/sc/source/filter/inc/xechart.hxx b/sc/source/filter/inc/xechart.hxx index 1981ca7b990b..373181f6c321 100644 --- a/sc/source/filter/inc/xechart.hxx +++ b/sc/source/filter/inc/xechart.hxx @@ -50,6 +50,10 @@ namespace com { namespace sun { namespace star { { class XModel; } + namespace chart + { + class XAxis; + } namespace chart2 { struct ScaleData; @@ -376,6 +380,8 @@ public: /** Converts frame formatting properties from the passed property set. */ void Convert( const ScfPropertySet& rPropSet ); + /** Sets the specified automatic flags. */ + void SetAutoFlags( bool bAutoPos, bool bAutoSize ); /** Returns true, if the frame object contains default formats. */ bool IsDefault() const; @@ -1011,18 +1017,21 @@ public: explicit XclExpChLabelRange( const XclExpChRoot& rRoot ); /** Converts category axis scaling settings. */ - void Convert( const ::com::sun::star::chart2::ScaleData& rScaleData, bool bMirrorOrient ); + void Convert( const ::com::sun::star::chart2::ScaleData& rScaleData, + const ScfPropertySet& rChart1Axis, bool bMirrorOrient ); /** Converts position settings of a crossing axis at this axis. */ void ConvertAxisPosition( const ScfPropertySet& rPropSet ); /** Sets flag for tickmark position between categories or on categories. */ inline void SetTicksBetweenCateg( bool bTicksBetween ) - { ::set_flag( maData.mnFlags, EXC_CHLABELRANGE_BETWEEN, bTicksBetween ); } + { ::set_flag( maLabelData.mnFlags, EXC_CHLABELRANGE_BETWEEN, bTicksBetween ); } private: + virtual void Save( XclExpStream& rStrm ); virtual void WriteBody( XclExpStream& rStrm ); private: - XclChLabelRange maData; /// Contents of the CHLABELRANGE record. + XclChLabelRange maLabelData; /// Contents of the CHLABELRANGE record. + XclChDateRange maDateData; /// Contents of the CHDATERANGE record. }; typedef boost::shared_ptr< XclExpChLabelRange > XclExpChLabelRangeRef; @@ -1085,6 +1094,7 @@ class XclExpChAxis : public XclExpChGroupBase, public XclExpChFontBase public: typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > XDiagramRef; typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > XAxisRef; + typedef ::com::sun::star::uno::Reference< ::com::sun::star::chart::XAxis > XChart1AxisRef; public: explicit XclExpChAxis( const XclExpChRoot& rRoot, sal_uInt16 nAxisType ); @@ -1095,7 +1105,8 @@ public: virtual void SetRotation( sal_uInt16 nRotation ); /** Converts formatting and scaling settings from the passed axis. */ - void Convert( XAxisRef xAxis, XAxisRef xCrossingAxis, const XclChExtTypeInfo& rTypeInfo ); + void Convert( XAxisRef xAxis, XAxisRef xCrossingAxis, + XChart1AxisRef xChart1Axis, const XclChExtTypeInfo& rTypeInfo ); /** Converts and writes 3D wall/floor properties from the passed diagram. */ void ConvertWall( XDiagramRef xDiagram ); diff --git a/sc/source/filter/inc/xecontent.hxx b/sc/source/filter/inc/xecontent.hxx index 41ceb8410b02..1e1b9f39b4a1 100644 --- a/sc/source/filter/inc/xecontent.hxx +++ b/sc/source/filter/inc/xecontent.hxx @@ -247,11 +247,11 @@ class ScValidationData; class XclExpDV : public XclExpRecord, protected XclExpRoot { public: - explicit XclExpDV( const XclExpRoot& rRoot, ULONG nScHandle ); + explicit XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ); virtual ~XclExpDV(); /** Returns the core handle of the validation data. */ - inline ULONG GetScHandle() const { return mnScHandle; } + inline sal_uLong GetScHandle() const { return mnScHandle; } /** Inserts a new cell range into the cell range list. */ void InsertCellRange( const ScRange& rPos ); @@ -278,7 +278,7 @@ private: XclTokenArrayRef mxTokArr2; /// Formula for second condition. ::rtl::OUString msFormula2; /// OOXML Formula for second condition. sal_uInt32 mnFlags; /// Miscellaneous flags. - ULONG mnScHandle; /// The core handle for quick list search. + sal_uLong mnScHandle; /// The core handle for quick list search. }; // ---------------------------------------------------------------------------- @@ -291,7 +291,7 @@ public: virtual ~XclExpDval(); /** Inserts the cell range into the range list of the DV record with the specified handle. */ - void InsertCellRange( const ScRange& rRange, ULONG nScHandle ); + void InsertCellRange( const ScRange& rRange, sal_uLong nScHandle ); /** Writes the DVAL record and the DV record list. */ virtual void Save( XclExpStream& rStrm ); @@ -299,7 +299,7 @@ public: private: /** Searches for or creates a XclExpDV record object with the specified handle. */ - XclExpDV& SearchOrCreateDv( ULONG nScHandle ); + XclExpDV& SearchOrCreateDv( sal_uLong nScHandle ); /** Writes the body of the DVAL record. */ virtual void WriteBody( XclExpStream& rStrm ); diff --git a/sc/source/filter/inc/xename.hxx b/sc/source/filter/inc/xename.hxx index 24371e19b4dd..f896d4bf48a2 100644 --- a/sc/source/filter/inc/xename.hxx +++ b/sc/source/filter/inc/xename.hxx @@ -51,9 +51,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, referring to the passed sheet range. */ sal_uInt16 InsertBuiltInName( sal_Unicode cBuiltIn, const ScRange& rRange ); diff --git a/sc/source/filter/inc/xerecord.hxx b/sc/source/filter/inc/xerecord.hxx index 17673e840d7b..4bfa6dbb0d0d 100644 --- a/sc/source/filter/inc/xerecord.hxx +++ b/sc/source/filter/inc/xerecord.hxx @@ -259,7 +259,7 @@ typedef XclExpValueRecord< double > XclExpDoubleRecord; // ---------------------------------------------------------------------------- /** Record which contains a Boolean value. - @descr The value is stored as 16-bit value: 0x0000 = FALSE, 0x0001 = TRUE. */ + @descr The value is stored as 16-bit value: 0x0000 = sal_False, 0x0001 = TRUE. */ class XclExpBoolRecord : public XclExpRecord { public: diff --git a/sc/source/filter/inc/xeroot.hxx b/sc/source/filter/inc/xeroot.hxx index dc8652ecbfe6..f27546eb219e 100644 --- a/sc/source/filter/inc/xeroot.hxx +++ b/sc/source/filter/inc/xeroot.hxx @@ -29,6 +29,8 @@ #ifndef SC_XEROOT_HXX #define SC_XEROOT_HXX +#include <com/sun/star/beans/NamedValue.hpp> + #include "xlroot.hxx" #include <boost/shared_ptr.hpp> @@ -160,7 +162,9 @@ public: bool IsDocumentEncrypted() const; - String GetPassword() const; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > GenerateEncryptionData( const ::rtl::OUString& aPass ) const; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > GetEncryptionData() const; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > GenerateDefaultEncryptionData() const; private: diff --git a/sc/source/filter/inc/xestream.hxx b/sc/source/filter/inc/xestream.hxx index 8ae34b1f58a7..8e18bf6e3644 100644 --- a/sc/source/filter/inc/xestream.hxx +++ b/sc/source/filter/inc/xestream.hxx @@ -31,11 +31,14 @@ #ifndef SC_XESTREAM_HXX #define SC_XESTREAM_HXX +#include <com/sun/star/beans/NamedValue.hpp> + #include <map> #include <stack> #include <string> #include <oox/core/xmlfilterbase.hxx> +#include <oox/token/tokens.hxx> #include <sax/fshelper.hxx> #include "xlstream.hxx" @@ -209,13 +212,14 @@ private: class XclExpBiff8Encrypter { public: - explicit XclExpBiff8Encrypter( const XclExpRoot& rRoot, const sal_uInt8 nDocId[16], - const sal_uInt8 nSalt[16] ); + explicit XclExpBiff8Encrypter( const XclExpRoot& rRoot ); ~XclExpBiff8Encrypter(); bool IsValid() const; - void GetSaltDigest( sal_uInt8 nSaltDigest[16] ) const; + void GetSaltDigest( sal_uInt8 pnSaltDigest[16] ) const; + void GetSalt( sal_uInt8 pnSalt[16] ) const; + void GetDocId( sal_uInt8 pnDocId[16] ) const; void Encrypt( SvStream& rStrm, sal_uInt8 nData ); void Encrypt( SvStream& rStrm, sal_uInt16 nData ); @@ -231,17 +235,16 @@ public: void EncryptBytes( SvStream& rStrm, ::std::vector<sal_uInt8>& aBytes ); private: - void Init( const String& aPass, const sal_uInt8 nDocId[16], - const sal_uInt8 nSalt[16] ); + void Init( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& aEncryptionData ); sal_uInt32 GetBlockPos( sal_Size nStrmPos ) const; sal_uInt16 GetOffsetInBlock( sal_Size nStrmPos ) const; private: ::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation. - sal_uInt16 mnPassw[16]; /// Cached password data for copy construction. - sal_uInt8 mnDocId[16]; /// Cached document ID for copy construction. - sal_uInt8 mnSaltDigest[16]; + sal_uInt8 mpnDocId[16]; + sal_uInt8 mpnSalt[16]; + sal_uInt8 mpnSaltDigest[16]; const XclExpRoot& mrRoot; sal_Size mnOldPos; /// Last known stream position @@ -340,6 +343,7 @@ public: virtual oox::drawingml::chart::ChartConverter& getChartConverter(); private: + virtual ::oox::ole::VbaProject* implCreateVbaProject() const; virtual ::rtl::OUString implGetImplementationName() const; ScDocShell *getDocShell(); diff --git a/sc/source/filter/inc/xestyle.hxx b/sc/source/filter/inc/xestyle.hxx index 37ec6a866baa..8f38b6f13352 100644 --- a/sc/source/filter/inc/xestyle.hxx +++ b/sc/source/filter/inc/xestyle.hxx @@ -277,10 +277,10 @@ private: /** Stores a core number format index with corresponding Excel format index. */ struct XclExpNumFmt { - ULONG mnScNumFmt; /// Core index of the number format. + sal_uLong mnScNumFmt; /// Core index of the number format. sal_uInt16 mnXclNumFmt; /// Resulting Excel format index. - inline explicit XclExpNumFmt( ULONG nScNumFmt, sal_uInt16 nXclNumFmt ) : + inline explicit XclExpNumFmt( sal_uLong nScNumFmt, sal_uInt16 nXclNumFmt ) : mnScNumFmt( nScNumFmt ), mnXclNumFmt( nXclNumFmt ) {} }; @@ -296,12 +296,12 @@ public: virtual ~XclExpNumFmtBuffer(); /** Returns the core index of the current standard number format. */ - inline ULONG GetStandardFormat() const { return mnStdFmt; } + inline sal_uLong GetStandardFormat() const { return mnStdFmt; } /** Inserts a number format into the format buffer. @param nScNumFmt The core index of the number format. @return The resulting Excel format index. */ - sal_uInt16 Insert( ULONG nScNumFmt ); + sal_uInt16 Insert( sal_uLong nScNumFmt ); /** Writes all FORMAT records contained in this buffer. */ virtual void Save( XclExpStream& rStrm ); @@ -322,7 +322,7 @@ private: SvNumberFormatterPtr mxFormatter; /// Special number formatter for conversion. XclExpNumFmtVec maFormatMap; /// Maps core formats to Excel indexes. NfKeywordTable* mpKeywordTable; /// Replacement table. - ULONG mnStdFmt; /// Key for standard number format. + sal_uLong mnStdFmt; /// Key for standard number format. sal_uInt16 mnXclOffset; /// Offset to first user defined format. }; @@ -454,7 +454,7 @@ public: const XclExpRoot& rRoot, const ScPatternAttr& rPattern, sal_Int16 nScript, - ULONG nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND, + sal_uLong nScForceNumFmt = NUMBERFORMAT_ENTRY_NOT_FOUND, sal_uInt16 nForceXclFont = EXC_FONT_NOTFOUND, bool bForceLineBreak = false ); /** Constructs a style XF record from the passed cell style sheet. */ @@ -475,7 +475,7 @@ public: @descr Searches for cell XFs only. */ bool Equals( const ScPatternAttr& rPattern, - ULONG nScForceNumFmt, + sal_uLong nScForceNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const; @@ -504,7 +504,7 @@ protected: // access for XclExpDefaultXF XclExpCellBorder maBorder; /// Border line style. XclExpCellArea maArea; /// Background area style. sal_uInt32 mnParentXFId; /// XF ID of parent XF record. - ULONG mnScNumFmt; /// Calc number format index. + sal_uLong mnScNumFmt; /// Calc number format index. sal_uInt16 mnXclFont; /// Excel font index. sal_uInt16 mnXclNumFmt; /// Excel number format index. sal_Int32 mnBorderId; /// OOXML Border Index @@ -520,7 +520,7 @@ private: void Init( const SfxItemSet& rItemSet, sal_Int16 nScript, - ULONG nForceScNumFmt, + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak, bool bDefStyle ); @@ -627,7 +627,7 @@ public: @return A unique XF record ID. */ sal_uInt32 InsertWithNumFmt( const ScPatternAttr* pPattern, sal_Int16 nScript, - ULONG nForceScNumFmt, + sal_uLong nForceScNumFmt, bool bForceLineBreak ); /** Inserts the passed cell style. Creates a style XF record and a STYLE record. @return A unique XF record ID. */ @@ -660,7 +660,7 @@ private: private: /** Returns the XF ID of the cell XF containing the passed format. */ - sal_uInt32 FindXF( const ScPatternAttr& rPattern, ULONG nForceScNumFmt, + sal_uInt32 FindXF( const ScPatternAttr& rPattern, sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ) const; /** Returns the XF ID of the style XF containing the passed style. */ sal_uInt32 FindXF( const SfxStyleSheetBase& rStyleSheet ) const; @@ -671,7 +671,7 @@ private: /** Tries to find the XF record containing the passed format or inserts a new record. @return The XF record ID. */ sal_uInt32 InsertCellXF( const ScPatternAttr* pPattern, sal_Int16 nScript, - ULONG nForceScNumFmt, + sal_uLong nForceScNumFmt, sal_uInt16 nForceXclFont, bool bForceLineBreak ); /** Inserts the passed cell style. Creates a style XF record and a STYLE record. @return The XF record ID. */ diff --git a/sc/source/filter/inc/xichart.hxx b/sc/source/filter/inc/xichart.hxx index 8e426e86f210..a9440ee6d8ea 100644 --- a/sc/source/filter/inc/xichart.hxx +++ b/sc/source/filter/inc/xichart.hxx @@ -137,6 +137,11 @@ public: /** Converts the passed rectangle from Excel chart units into 1/100 mm. */ ::com::sun::star::awt::Rectangle CalcHmmFromChartRect( const XclChRectangle& rRect ) const; + /** Converts the passed horizontal coordinate from 1/100 mm into a relative position. */ + double CalcRelativeFromHmmX( sal_Int32 nPosX ) const; + /** Converts the passed vertical coordinate from 1/100 mm into a relative position. */ + double CalcRelativeFromHmmY( sal_Int32 nPosY ) const; + /** Converts the passed horizontal coordinate from Excel chart units into a relative position. */ double CalcRelativeFromChartX( sal_Int32 nPosX ) const; /** Converts the passed vertical coordinate from Excel chart units into a relative position. */ @@ -1137,13 +1142,16 @@ public: explicit XclImpChLabelRange( const XclImpChRoot& rRoot ); /** Reads the CHLABELRANGE record (category axis scaling properties). */ void ReadChLabelRange( XclImpStream& rStrm ); + /** Reads the CHDATERANGE record (date axis scaling properties). */ + void ReadChDateRange( XclImpStream& rStrm ); /** Converts category axis scaling settings. */ void Convert( ScfPropertySet& rPropSet, ScaleData& rScaleData, bool bMirrorOrient ) const; /** Converts position settings of this axis at a crossing axis. */ void ConvertAxisPosition( ScfPropertySet& rPropSet, bool b3dChart ) const; private: - XclChLabelRange maData; /// Contents of the CHLABELRANGE record. + XclChLabelRange maLabelData; /// Contents of the CHLABELRANGE record. + XclChDateRange maDateData; /// Contents of the CHDATERANGE record. }; typedef boost::shared_ptr< XclImpChLabelRange > XclImpChLabelRangeRef; diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx index 667ba6305a06..be6a48f317bc 100644 --- a/sc/source/filter/inc/xiescher.hxx +++ b/sc/source/filter/inc/xiescher.hxx @@ -977,7 +977,7 @@ public: protected: /** Returns a color from the Excel color palette. */ - virtual bool GetColorFromPalette( USHORT nIndex, Color& rColor ) const; + virtual bool GetColorFromPalette( sal_uInt16 nIndex, Color& rColor ) const; }; // ---------------------------------------------------------------------------- @@ -1038,7 +1038,7 @@ private: Rectangle& rTextRect, SdrObject* pOldSdrObj = 0 ); /** Returns the BLIP stream position, based on the passed DFF stream position. */ - virtual ULONG Calc_nBLIPPos( ULONG nOrgVal, ULONG nStreamPos ) const; + virtual sal_uLong Calc_nBLIPPos( sal_uLong nOrgVal, sal_uLong nStreamPos ) const; // virtual functions of SvxMSConvertOCXControls @@ -1049,7 +1049,7 @@ private: const ::com::sun::star::awt::Size& rSize, ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >* pxShape, - BOOL bFloatingCtrl ); + sal_Bool bFloatingCtrl ); private: /** Data per registered drawing manager, will be stacked for recursive calls. */ diff --git a/sc/source/filter/inc/xihelper.hxx b/sc/source/filter/inc/xihelper.hxx index 084a8461a844..90b9d8c88c50 100644 --- a/sc/source/filter/inc/xihelper.hxx +++ b/sc/source/filter/inc/xihelper.hxx @@ -313,7 +313,7 @@ public: /** Returns the cached Calc error code, if this value has Error type, else 0. */ inline sal_uInt8 GetXclError() const { return (mnType == EXC_CACHEDVAL_ERROR) ? mnBoolErr : EXC_ERR_NA; } /** Returns the cached Calc error code, if this value has Error type, else 0. */ - USHORT GetScError() const; + sal_uInt16 GetScError() const; /** Returns the token array if this is a Boolean value or error value, else 0. */ inline const ScTokenArray* GetBoolErrFmla() const { return mxTokArr.get(); } diff --git a/sc/source/filter/inc/xistream.hxx b/sc/source/filter/inc/xistream.hxx index 9333474fca83..238997e7a000 100644 --- a/sc/source/filter/inc/xistream.hxx +++ b/sc/source/filter/inc/xistream.hxx @@ -66,10 +66,9 @@ public: /** Creates a (ref-counted) copy of this decrypter object. */ XclImpDecrypterRef Clone() const; - /** Implementation of the ::comphelper::IDocPasswordVerifier interface, - calls the new virtual function implVerify(). */ - virtual ::comphelper::DocPasswordVerifierResult - verifyPassword( const ::rtl::OUString& rPassword ); + /** Implementation of the ::comphelper::IDocPasswordVerifier interface */ + virtual ::comphelper::DocPasswordVerifierResult verifyPassword( const ::rtl::OUString& rPassword, ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& o_rEncryptionData ); + virtual ::comphelper::DocPasswordVerifierResult verifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData ); /** Updates the decrypter on start of a new record or after seeking stream. */ void Update( SvStream& rStrm, sal_uInt16 nRecSize ); @@ -86,7 +85,10 @@ private: virtual XclImpDecrypter* OnClone() const = 0; /** Derived classes implement password verification and initialization of the decoder. */ - virtual bool OnVerify( const ::rtl::OUString& rPassword ) = 0; + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > + OnVerifyPassword( const ::rtl::OUString& rPassword ) = 0; + virtual bool OnVerifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData ) = 0; + /** Implementation of updating the decrypter. */ virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ) = 0; /** Implementation of the decryption. */ @@ -113,7 +115,9 @@ private: /** Implementation of cloning this object. */ virtual XclImpBiff5Decrypter* OnClone() const; /** Implements password verification and initialization of the decoder. */ - virtual bool OnVerify( const ::rtl::OUString& rPassword ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > + OnVerifyPassword( const ::rtl::OUString& rPassword ); + virtual bool OnVerifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData ); /** Implementation of updating the decrypter. */ virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ); /** Implementation of the decryption. */ @@ -121,7 +125,7 @@ private: private: ::msfilter::MSCodec_XorXLS95 maCodec; /// Crypto algorithm implementation. - ::std::vector< sal_uInt8 > maPassword; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > maEncryptionData; sal_uInt16 mnKey; sal_uInt16 mnHash; }; @@ -142,7 +146,9 @@ private: /** Implementation of cloning this object. */ virtual XclImpBiff8Decrypter* OnClone() const; /** Implements password verification and initialization of the decoder. */ - virtual bool OnVerify( const ::rtl::OUString& rPassword ); + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > + OnVerifyPassword( const ::rtl::OUString& rPassword ); + virtual bool OnVerifyEncryptionData( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue >& rEncryptionData ); /** Implementation of updating the decrypter. */ virtual void OnUpdate( sal_Size nOldStrmPos, sal_Size nNewStrmPos, sal_uInt16 nRecSize ); /** Implementation of the decryption. */ @@ -155,7 +161,7 @@ private: private: ::msfilter::MSCodec_Std97 maCodec; /// Crypto algorithm implementation. - ::std::vector< sal_uInt16 > maPassword; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > maEncryptionData; ::std::vector< sal_uInt8 > maSalt; ::std::vector< sal_uInt8 > maVerifier; ::std::vector< sal_uInt8 > maVerifierHash; diff --git a/sc/source/filter/inc/xistyle.hxx b/sc/source/filter/inc/xistyle.hxx index 399f0027b155..5c74d82ee295 100644 --- a/sc/source/filter/inc/xistyle.hxx +++ b/sc/source/filter/inc/xistyle.hxx @@ -69,6 +69,9 @@ public: @return The color from current or default palette or COL_AUTO, if nothing else found. */ inline Color GetColor( sal_uInt16 nXclIndex ) const { return Color( GetColorData( nXclIndex ) ); } + /** Returns the palette colors as UNO sequence. */ + ::com::sun::star::uno::Sequence< sal_Int32 > + CreateColorSequence() const; /** Reads a PALETTE record. */ void ReadPalette( XclImpStream& rStrm ); @@ -232,7 +235,7 @@ public: void CreateScFormats(); /** Returns the format key with the passed Excel index or NUMBERFORMAT_ENTRY_NOT_FOUND on error. */ - ULONG GetScFormat( sal_uInt16 nXclNumFmt ) const; + sal_uLong GetScFormat( sal_uInt16 nXclNumFmt ) const; /** Fills an Excel number format to the passed item set. @param rItemSet The destination item set. @@ -246,11 +249,11 @@ public: @param nScNumFmt The Calc number formatter index of the format. @param bSkipPoolDefs true = Do not put items equal to pool default; false = Put all items. */ void FillScFmtToItemSet( - SfxItemSet& rItemSet, ULONG nScNumFmt, + SfxItemSet& rItemSet, sal_uLong nScNumFmt, bool bSkipPoolDefs = false ) const; private: - typedef ::std::map< sal_uInt16, ULONG > XclImpIndexMap; + typedef ::std::map< sal_uInt16, sal_uLong > XclImpIndexMap; XclImpIndexMap maIndexMap; /// Maps Excel format indexes to Calc formats. sal_uInt16 mnNextXclIdx; /// Index counter for BIFF2-BIFF4. @@ -592,16 +595,16 @@ private: void Find( XclImpXFRange*& rpPrevRange, XclImpXFRange*& rpNextRange, - ULONG& rnNextIndex, + sal_uLong& rnNextIndex, SCROW nScRow ); /** Tries to concatenate a range with its predecessor. @descr The ranges must have the same XF index and must not have a gap. The resulting range has the index nIndex-1. */ - void TryConcatPrev( ULONG nIndex ); + void TryConcatPrev( sal_uLong nIndex ); /** Insert a range into the list at the specified index. */ - void Insert(XclImpXFRange* pXFRange, ULONG nIndex); + void Insert(XclImpXFRange* pXFRange, sal_uLong nIndex); private: IndexList maIndexList; /// The list of XF index range. @@ -660,7 +663,7 @@ private: @param nLine BOX_LINE_RIGHT = copy most-right border of top row; BOX_LINE_BOTTOM = copy most-bottom border of first column. */ - void SetBorderLine( const ScRange& rRange, SCTAB nScTab, USHORT nLine ); + void SetBorderLine( const ScRange& rRange, SCTAB nScTab, sal_uInt16 nLine ); private: typedef boost::shared_ptr< XclImpXFRangeColumn > XclImpXFRangeColumnRef; diff --git a/sc/source/filter/inc/xlchart.hxx b/sc/source/filter/inc/xlchart.hxx index 6c4ced698745..51fe688a857e 100644 --- a/sc/source/filter/inc/xlchart.hxx +++ b/sc/source/filter/inc/xlchart.hxx @@ -103,6 +103,7 @@ class XclRoot; #define EXC_CHPROP_ERRORBARX CREATE_OUSTRING( "ErrorBarX" ) #define EXC_CHPROP_ERRORBARY CREATE_OUSTRING( "ErrorBarY" ) #define EXC_CHPROP_EXPANSION CREATE_OUSTRING( "Expansion" ) +#define EXC_CHPROP_EXPTIMEINCREMENT CREATE_OUSTRING( "ExplicitTimeIncrement" ) #define EXC_CHPROP_FILLBITMAPMODE CREATE_OUSTRING( "FillBitmapMode" ) #define EXC_CHPROP_FILLSTYLE CREATE_OUSTRING( "FillStyle" ) #define EXC_CHPROP_GAPWIDTHSEQ CREATE_OUSTRING( "GapwidthSequence" ) @@ -127,6 +128,7 @@ class XclRoot; #define EXC_CHPROP_PERSPECTIVE CREATE_OUSTRING( "Perspective" ) #define EXC_CHPROP_POSITIVEERROR CREATE_OUSTRING( "PositiveError" ) #define EXC_CHPROP_RELATIVEPOSITION CREATE_OUSTRING( "RelativePosition" ) +#define EXC_CHPROP_RELATIVESIZE CREATE_OUSTRING( "RelativeSize" ) #define EXC_CHPROP_RIGHTANGLEDAXES CREATE_OUSTRING( "RightAngledAxes" ) #define EXC_CHPROP_ROLE CREATE_OUSTRING( "Role" ) #define EXC_CHPROP_ROTATIONHORIZONTAL CREATE_OUSTRING( "RotationHorizontal" ) @@ -723,6 +725,23 @@ const sal_uInt8 EXC_CH3DDATAFORMAT_TRUNC = 2; /// Shart top, trunc const sal_uInt16 EXC_ID_CHPIEEXT = 0x1061; +// (0x1062) CHDATERANGE ------------------------------------------------------- + +const sal_uInt16 EXC_ID_CHDATERANGE = 0x1062; + +const sal_uInt16 EXC_CHDATERANGE_AUTOMIN = 0x0001; +const sal_uInt16 EXC_CHDATERANGE_AUTOMAX = 0x0002; +const sal_uInt16 EXC_CHDATERANGE_AUTOMAJOR = 0x0004; +const sal_uInt16 EXC_CHDATERANGE_AUTOMINOR = 0x0008; +const sal_uInt16 EXC_CHDATERANGE_DATEAXIS = 0x0010; +const sal_uInt16 EXC_CHDATERANGE_AUTOBASE = 0x0020; +const sal_uInt16 EXC_CHDATERANGE_AUTOCROSS = 0x0040; /// Other axis crosses at own maximum. +const sal_uInt16 EXC_CHDATERANGE_AUTODATE = 0x0080; /// Recognize date/text automatically. + +const sal_uInt16 EXC_CHDATERANGE_DAYS = 0; +const sal_uInt16 EXC_CHDATERANGE_MONTHS = 1; +const sal_uInt16 EXC_CHDATERANGE_YEARS = 2; + // (0x1066) CHESCHERFORMAT ---------------------------------------------------- const sal_uInt16 EXC_ID_CHESCHERFORMAT = 0x1066; @@ -1056,6 +1075,23 @@ struct XclChLabelRange // ---------------------------------------------------------------------------- +struct XclChDateRange +{ + sal_uInt16 mnMinDate; /// Minimum value on axis. + sal_uInt16 mnMaxDate; /// Maximum value on axis. + sal_uInt16 mnMajorStep; /// Distance for major grid lines. + sal_uInt16 mnMajorUnit; /// Time unit for major step. + sal_uInt16 mnMinorStep; /// Distance for minor grid lines. + sal_uInt16 mnMinorUnit; /// Time unit for minor step. + sal_uInt16 mnBaseUnit; /// Time unit for axis values. + sal_uInt16 mnCross; /// Crossing position of other axis. + sal_uInt16 mnFlags; /// Additional flags. + + explicit XclChDateRange(); +}; + +// ---------------------------------------------------------------------------- + struct XclChValueRange { double mfMin; /// Minimum value on axis. diff --git a/sc/source/filter/inc/xlconst.hxx b/sc/source/filter/inc/xlconst.hxx index 35e5ef5c948f..207d8cb392b8 100644 --- a/sc/source/filter/inc/xlconst.hxx +++ b/sc/source/filter/inc/xlconst.hxx @@ -140,6 +140,8 @@ const sal_Int32 EXC_RK_INT100 = EXC_RK_100FLAG | EXC_RK_INTFLAG; const sal_Int32 EXC_POINTS_PER_INCH = 72; const sal_Int32 EXC_TWIPS_PER_INCH = EXC_POINTS_PER_INCH * 20; +const double EXC_POINTS_PER_HMM = static_cast< double >( EXC_POINTS_PER_INCH ) / 2540.0; + const sal_uInt8 EXC_ORIENT_NONE = 0; /// Text orientation: not rotated. const sal_uInt8 EXC_ORIENT_STACKED = 1; /// Text orientation: vertically stacked. const sal_uInt8 EXC_ORIENT_90CCW = 2; /// Text orientation: 90 deg counterclockwise. diff --git a/sc/source/filter/inc/xlescher.hxx b/sc/source/filter/inc/xlescher.hxx index c81df26fa0c1..b0c41ff320ee 100644 --- a/sc/source/filter/inc/xlescher.hxx +++ b/sc/source/filter/inc/xlescher.hxx @@ -30,7 +30,7 @@ #define SC_XLESCHER_HXX #include <tools/gen.hxx> -#include <vcl/mapunit.hxx> +#include <tools/mapunit.hxx> #include "fapihelper.hxx" #include "xladdress.hxx" #include "xlstyle.hxx" diff --git a/sc/source/filter/inc/xlformula.hxx b/sc/source/filter/inc/xlformula.hxx index 520af6f1d69b..1f9cf30909e9 100644 --- a/sc/source/filter/inc/xlformula.hxx +++ b/sc/source/filter/inc/xlformula.hxx @@ -113,8 +113,8 @@ const sal_uInt8 EXC_TOKID_AREAERR3D = 0x1D; /// Deleted 3D area refe const sal_uInt16 EXC_TOK_STR_MAXLEN = 255; /// Maximum string length of a tStr token. -const sal_uInt8 EXC_TOK_BOOL_FALSE = 0; /// FALSE value of a tBool token. -const sal_uInt8 EXC_TOK_BOOL_TRUE = 1; /// TRUE value of a tBool token. +const sal_uInt8 EXC_TOK_BOOL_FALSE = 0; /// sal_False value of a tBool token. +const sal_uInt8 EXC_TOK_BOOL_TRUE = 1; /// sal_True value of a tBool token. const sal_uInt8 EXC_TOK_ATTR_VOLATILE = 0x01; /// Volatile function. const sal_uInt8 EXC_TOK_ATTR_IF = 0x02; /// Start of true condition in IF function. diff --git a/sc/source/filter/inc/xlpage.hxx b/sc/source/filter/inc/xlpage.hxx index f58f815edcbe..4c7412ab9171 100644 --- a/sc/source/filter/inc/xlpage.hxx +++ b/sc/source/filter/inc/xlpage.hxx @@ -153,7 +153,7 @@ struct XclPageData : private boost::noncopyable /** Returns the real paper size (twips) from the paper size index and paper orientation. */ Size GetScPaperSize() const; /** Sets the Excel paper size index and paper orientation from Calc paper size (twips). */ - void SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrict = sal_False ); + void SetScPaperSize( const Size& rSize, bool bPortrait, bool bStrict = false ); }; // ============================================================================ diff --git a/sc/source/filter/inc/xlpivot.hxx b/sc/source/filter/inc/xlpivot.hxx index 59934ac83ab9..560e18a19a2b 100644 --- a/sc/source/filter/inc/xlpivot.hxx +++ b/sc/source/filter/inc/xlpivot.hxx @@ -599,7 +599,7 @@ XclExpStream& operator<<( XclExpStream& rStrm, const XclPTItemInfo& rInfo ); // General field settings ===================================================== -typedef ::std::vector< USHORT > XclPTSubtotalVec; +typedef ::std::vector< sal_uInt16 > XclPTSubtotalVec; /** Contains data for a pivot table field (SXVD record). */ struct XclPTFieldInfo : public XclPTVisNameInfo diff --git a/sc/source/filter/inc/xlroot.hxx b/sc/source/filter/inc/xlroot.hxx index 5ca44d0b7726..53d9535c87b7 100644 --- a/sc/source/filter/inc/xlroot.hxx +++ b/sc/source/filter/inc/xlroot.hxx @@ -29,6 +29,8 @@ #ifndef SC_XLROOT_HXX #define SC_XLROOT_HXX +#include <com/sun/star/beans/NamedValue.hpp> + #include <i18npool/lang.h> #include <sot/storage.hxx> #include "xlconst.hxx" @@ -201,7 +203,8 @@ public: /** Returns the default password used for stream encryption. */ inline const String& GetDefaultPassword() const { return mrData.maDefPassword; } /** Requests and verifies a password from the medium or the user. */ - String RequestPassword( ::comphelper::IDocPasswordVerifier& rVerifier ) const; + ::com::sun::star::uno::Sequence< ::com::sun::star::beans::NamedValue > + RequestEncryptionData( ::comphelper::IDocPasswordVerifier& rVerifier ) const; /** Returns the OLE2 root storage of the imported/exported file. @return Pointer to root storage or 0, if the file is a simple stream. */ @@ -241,6 +244,8 @@ public: SvNumberFormatter& GetFormatter() const; /** Returns the null date of the current number formatter. */ DateTime GetNullDate() const; + /** Returns the base year depending on the current null date (1900 or 1904). */ + sal_uInt16 GetBaseYear() const; /** Converts a date/time value to a floating-point value. */ double GetDoubleFromDateTime( const DateTime& rDateTime ) const; /** Converts a floating-point value to a date/time value. */ diff --git a/sc/source/filter/inc/xlstyle.hxx b/sc/source/filter/inc/xlstyle.hxx index b9b1f1902b9e..793576339c2f 100644 --- a/sc/source/filter/inc/xlstyle.hxx +++ b/sc/source/filter/inc/xlstyle.hxx @@ -466,7 +466,7 @@ public: explicit XclNumFmtBuffer( const XclRoot& rRoot ); /** Returns the core index of the current standard number format. */ - inline ULONG GetStdScNumFmt() const { return mnStdScNumFmt; } + inline sal_uLong GetStdScNumFmt() const { return mnStdScNumFmt; } protected: typedef ::std::map< sal_uInt16, XclNumFmt > XclNumFmtMap; @@ -486,7 +486,7 @@ private: XclNumFmtMap maFmtMap; /// Map containing all default and user-defined formats. LanguageType meSysLang; /// Current system language. - ULONG mnStdScNumFmt; /// Calc format key for standard number format. + sal_uLong mnStdScNumFmt; /// Calc format key for standard number format. }; // Cell formatting data (XF) ================================================== diff --git a/sc/source/filter/inc/xltools.hxx b/sc/source/filter/inc/xltools.hxx index b34cd4c3b8cf..bfe284f198da 100644 --- a/sc/source/filter/inc/xltools.hxx +++ b/sc/source/filter/inc/xltools.hxx @@ -121,9 +121,9 @@ public: static sal_uInt8 GetXclOrientFromRot( sal_uInt16 nXclRot ); /** Converts a Calc error code to an Excel error code. */ - static sal_uInt8 GetXclErrorCode( USHORT nScError ); + static sal_uInt8 GetXclErrorCode( sal_uInt16 nScError ); /** Converts an Excel error code to a Calc error code. */ - static USHORT GetScErrorCode( sal_uInt8 nXclError ); + static sal_uInt16 GetScErrorCode( sal_uInt8 nXclError ); /** Converts the passed BIFF error to a double containing the respective Calc error code. */ static double ErrorToDouble( sal_uInt8 nXclError ); @@ -150,10 +150,10 @@ public: /** Returns the Calc column width (twips) for the passed Excel width. @param nScCharWidth Width of the '0' character in Calc (twips). */ - static USHORT GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth ); + static sal_uInt16 GetScColumnWidth( sal_uInt16 nXclWidth, long nScCharWidth ); /** Returns the Excel column width for the passed Calc width (twips). @param nScCharWidth Width of the '0' character in Calc (twips). */ - static sal_uInt16 GetXclColumnWidth( USHORT nScWidth, long nScCharWidth ); + static sal_uInt16 GetXclColumnWidth( sal_uInt16 nScWidth, long nScCharWidth ); /** Returns a correction value to convert column widths from/to default column widths. @param nXclDefFontHeight Excel height of application default font. */ diff --git a/sc/source/filter/inc/xlview.hxx b/sc/source/filter/inc/xlview.hxx index be84506a6fe8..f05a21594c45 100644 --- a/sc/source/filter/inc/xlview.hxx +++ b/sc/source/filter/inc/xlview.hxx @@ -154,7 +154,7 @@ struct XclTabViewData bool mbShowZeros; /// true = Show zero value zells. bool mbShowOutline; /// true = Show outlines. Color maTabBgColor; /// Tab Color default = (COL_AUTO ) - bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? TRUE : FALSE; }; + bool IsDefaultTabBgColor() const { return maTabBgColor == Color(COL_AUTO) ? sal_True : false; }; sal_uInt32 mnTabBgColorId; /// pallette color id explicit XclTabViewData(); diff --git a/sc/source/filter/lotus/expop.cxx b/sc/source/filter/lotus/expop.cxx index 33ecf7d87d07..e1bd599c29cd 100644 --- a/sc/source/filter/lotus/expop.cxx +++ b/sc/source/filter/lotus/expop.cxx @@ -42,10 +42,10 @@ #include "exp_op.hxx" #if ENABLE_LOTUS123_EXPORT -const USHORT ExportWK1::WK1MAXCOL = 255; -const USHORT ExportWK1::WK1MAXROW = 8191; +const sal_uInt16 ExportWK1::WK1MAXCOL = 255; +const sal_uInt16 ExportWK1::WK1MAXROW = 8191; -BYTE ExportWK1::GenFormByte( const ScPatternAttr& /*aAttr*/ ) +sal_uInt8 ExportWK1::GenFormByte( const ScPatternAttr& /*aAttr*/ ) { return 0xFF; } @@ -53,41 +53,41 @@ BYTE ExportWK1::GenFormByte( const ScPatternAttr& /*aAttr*/ ) inline void ExportWK1::Bof() { // (0x00) - aOut << ( USHORT ) 0x00 << ( USHORT ) 2 << ( USHORT ) 0x0406; // Version 1-2-3/2, Symhony/1.1 + aOut << ( sal_uInt16 ) 0x00 << ( sal_uInt16 ) 2 << ( sal_uInt16 ) 0x0406; // Version 1-2-3/2, Symhony/1.1 } inline void ExportWK1::Eof() { // (0x01) - aOut << ( USHORT ) 0x01 << ( USHORT ) 0; + aOut << ( sal_uInt16 ) 0x01 << ( sal_uInt16 ) 0; } inline void ExportWK1::Calcmode() { // (0x02) // Calculationmode = automatic - aOut << ( USHORT ) 0x02 << ( USHORT ) 1 << ( BYTE ) 0xFF; + aOut << ( sal_uInt16 ) 0x02 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0xFF; } inline void ExportWK1::Calcorder() { // (0x03) // order = natural - aOut << ( USHORT ) 0x03 << ( USHORT ) 1 << ( BYTE ) 0x00; + aOut << ( sal_uInt16 ) 0x03 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00; } inline void ExportWK1::Split() { // (0x04) // not split - aOut << ( USHORT ) 0x04 << ( USHORT ) 1 << ( BYTE ) 0x00; + aOut << ( sal_uInt16 ) 0x04 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00; } inline void ExportWK1::Sync() { // (0x05) // not synchronized - aOut << ( USHORT ) 0x05 << ( USHORT ) 1 << ( BYTE ) 0x00; + aOut << ( sal_uInt16 ) 0x05 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00; } @@ -95,13 +95,13 @@ inline void ExportWK1::Dimensions() { // (0x06) SCCOL nEndCol; SCROW nEndRow; - aOut << ( USHORT ) 0x06 << ( USHORT ) 8 << ( USHORT ) 0 << ( USHORT ) 0; // Starting Col/Row + aOut << ( sal_uInt16 ) 0x06 << ( sal_uInt16 ) 8 << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0; // Starting Col/Row pD->GetPrintArea( 0, nEndCol, nEndRow ); #if SC_ROWLIMIT_MORE_THAN_64K #error row limit 64k #endif - USHORT nCol = static_cast<USHORT>(nEndCol); - USHORT nRow = static_cast<USHORT>(nEndRow); + sal_uInt16 nCol = static_cast<sal_uInt16>(nEndCol); + sal_uInt16 nRow = static_cast<sal_uInt16>(nEndRow); DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Dimensions(): Col > WK1MAXCOL" ); DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Dimensions(): Row > WK1MAXROW" ); aOut << nCol << nRow; // Ending Col/Row @@ -110,57 +110,57 @@ inline void ExportWK1::Dimensions() inline void ExportWK1::Window1() { // (0x07) - aOut << ( USHORT ) 0x07 << ( USHORT ) 32 - << ( USHORT ) 0 << ( USHORT ) 0 // Cursor Col/Row - << ( BYTE ) 0xFF // Format: protected, special, default - << ( BYTE ) 0 // Dummy - << ( USHORT ) 9 // Default column width - << ( USHORT ) 8 << ( USHORT ) 14// Number of cols/rows on screen - << ( USHORT ) 0 << ( USHORT ) 0 // Left col / top row + aOut << ( sal_uInt16 ) 0x07 << ( sal_uInt16 ) 32 + << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Cursor Col/Row + << ( sal_uInt8 ) 0xFF // Format: protected, special, default + << ( sal_uInt8 ) 0 // Dummy + << ( sal_uInt16 ) 9 // Default column width + << ( sal_uInt16 ) 8 << ( sal_uInt16 ) 14// Number of cols/rows on screen + << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Left col / top row // Rest aus Doku-Beispiel - << ( USHORT ) 0 << ( USHORT ) 0 // Number of title cols / rows - << ( USHORT ) 0 << ( USHORT ) 0 // Left title col / top title row - << ( USHORT ) 0x0004 << ( USHORT ) 0x0004// Top-left col / row - << ( USHORT ) 0x0048 // Number of cols in window - << ( USHORT ) 0x00; // Dummy + << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Number of title cols / rows + << ( sal_uInt16 ) 0 << ( sal_uInt16 ) 0 // Left title col / top title row + << ( sal_uInt16 ) 0x0004 << ( sal_uInt16 ) 0x0004// Top-left col / row + << ( sal_uInt16 ) 0x0048 // Number of cols in window + << ( sal_uInt16 ) 0x00; // Dummy } inline void ExportWK1::Colw() { // (0x08) // ACHTUNG: muss nach Window1 und vor hidden cols record kommen! - USHORT nWidth; - BYTE nWidthSpaces; - for( USHORT nCol = 0 ; nCol < 256 ; nCol++ ) + sal_uInt16 nWidth; + sal_uInt8 nWidthSpaces; + for( sal_uInt16 nCol = 0 ; nCol < 256 ; nCol++ ) { nWidth = pD->GetColWidth( static_cast<SCCOL>(nCol), 0 ); - nWidthSpaces = ( BYTE ) ( nWidth / TWIPS_PER_CHAR ); - aOut << ( USHORT ) 0x08 << ( USHORT ) 3 << nCol << nWidthSpaces; + nWidthSpaces = ( sal_uInt8 ) ( nWidth / TWIPS_PER_CHAR ); + aOut << ( sal_uInt16 ) 0x08 << ( sal_uInt16 ) 3 << nCol << nWidthSpaces; } } -void ExportWK1::Blank( const USHORT nCol, const USHORT nRow, const ScPatternAttr& aAttr ) +void ExportWK1::Blank( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScPatternAttr& aAttr ) { // (0x0C) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Blank(): Col > WK1MAXCOL" ); DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Blank(): Row > WK1MAXROW" ); - aOut << ( USHORT ) 0x0C << ( USHORT ) 5 << GenFormByte( aAttr ) << nCol << nRow; + aOut << ( sal_uInt16 ) 0x0C << ( sal_uInt16 ) 5 << GenFormByte( aAttr ) << nCol << nRow; } -void ExportWK1::Number( const USHORT nCol, const USHORT nRow, const double fWert, const ScPatternAttr &aAttr ) +void ExportWK1::Number( const sal_uInt16 nCol, const sal_uInt16 nRow, const double fWert, const ScPatternAttr &aAttr ) { // (0x0E) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Number(): Col > WK1MAXCOL" ); DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Number(): Row > WK1MAXROW" ); - aOut << ( USHORT ) 0x0E << ( USHORT ) 13 << GenFormByte( aAttr ) << nCol << nRow << fWert; + aOut << ( sal_uInt16 ) 0x0E << ( sal_uInt16 ) 13 << GenFormByte( aAttr ) << nCol << nRow << fWert; } -void ExportWK1::Label( const USHORT nCol, const USHORT nRow, const String& rStr, const ScPatternAttr& aAttr ) +void ExportWK1::Label( const sal_uInt16 nCol, const sal_uInt16 nRow, const String& rStr, const ScPatternAttr& aAttr ) { // (0x0F) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); @@ -168,7 +168,7 @@ void ExportWK1::Label( const USHORT nCol, const USHORT nRow, const String& rStr, ByteString aStr( rStr, eZielChar ); - USHORT nLaenge = 7; // Anzahl Bytes vor String+Nullbyte am Ende + Alignment-Char + sal_uInt16 nLaenge = 7; // Anzahl Bytes vor String+Nullbyte am Ende + Alignment-Char xub_StrLen nAnz = aStr.Len(); @@ -176,24 +176,24 @@ void ExportWK1::Label( const USHORT nCol, const USHORT nRow, const String& rStr, if( nAnz > 240 ) // max. 240 Zeichen im String nAnz = 240; - nLaenge = nLaenge + ( USHORT ) nAnz; // + Stringlaenge + nLaenge = nLaenge + ( sal_uInt16 ) nAnz; // + Stringlaenge - aOut << ( USHORT ) 0x0F << nLaenge << GenFormByte( aAttr ) << nCol << nRow << ( sal_Char ) '\''; + aOut << ( sal_uInt16 ) 0x0F << nLaenge << GenFormByte( aAttr ) << nCol << nRow << ( sal_Char ) '\''; // ACHTUNG: ZUNAECHST NUR LEFT ALIGNMENT aOut.Write( aStr.GetBuffer(), nAnz ); - aOut << ( BYTE ) 0x00; // ...und Nullterminator anhaengen + aOut << ( sal_uInt8 ) 0x00; // ...und Nullterminator anhaengen } -void ExportWK1::Formula( const USHORT nCol, const USHORT nRow, const ScFormulaCell* pFC, const ScPatternAttr& aAttr ) +void ExportWK1::Formula( const sal_uInt16 nCol, const sal_uInt16 nRow, const ScFormulaCell* pFC, const ScPatternAttr& aAttr ) { // (0x10) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Formula(): Col > WK1MAXCOL" ); DBG_ASSERT( nRow <= WK1MAXROW, "ExportWK1::Formula(): Row > WK1MAXROW" ); - USHORT nLaenge = 15; // Bytes bis Formel + sal_uInt16 nLaenge = 15; // Bytes bis Formel double fErgebnis; // zunaechst nur Dummy-Angaben (Formel := Ergebnis der Berechnung ) @@ -201,72 +201,72 @@ void ExportWK1::Formula( const USHORT nCol, const USHORT nRow, const ScFormulaCe fErgebnis = ( ( ScFormulaCell* ) pFC )->GetValue(); - aOut << ( USHORT ) 0x10 << ( USHORT ) nLaenge + aOut << ( sal_uInt16 ) 0x10 << ( sal_uInt16 ) nLaenge << GenFormByte( aAttr ) << nCol << nRow << fErgebnis - << ( USHORT ) 9+1 // Dummy-Formula-Size - << ( BYTE ) 0x00 // constant, floating point + << ( sal_uInt16 ) 9+1 // Dummy-Formula-Size + << ( sal_uInt8 ) 0x00 // constant, floating point << fErgebnis - << ( BYTE ) 0x03; // return + << ( sal_uInt8 ) 0x03; // return } inline void ExportWK1::Protect() { // (0x24) //Global protection off - aOut << ( USHORT ) 0x24 << ( USHORT ) 1 << ( BYTE ) 0x00; + aOut << ( sal_uInt16 ) 0x24 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x00; } inline void ExportWK1::Footer() { // (0x25) // zunaechst nur leerer C-String - aOut << ( USHORT ) 0x25 << ( USHORT ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String + aOut << ( sal_uInt16 ) 0x25 << ( sal_uInt16 ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String for( short nLauf = 0 ; nLauf < 241 ; nLauf++ ) - aOut << ( BYTE ) 0x00; + aOut << ( sal_uInt8 ) 0x00; } inline void ExportWK1::Header() { // (0x26) // zunaechst nur leerer C-String - aOut << ( USHORT ) 0x26 << ( USHORT ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String + aOut << ( sal_uInt16 ) 0x26 << ( sal_uInt16 ) 242 << ( sal_Char ) '\''; // linksbuendiger leerer String for( short nLauf = 0 ; nLauf < 241 ; nLauf++ ) - aOut << ( BYTE ) 0x00; + aOut << ( sal_uInt8 ) 0x00; } inline void ExportWK1::Margins() { // (0x28) - aOut << ( USHORT ) 0x28 << ( USHORT ) 10 - << ( USHORT ) 4 << ( USHORT ) 76 // Left/right margin - << ( USHORT ) 66 // Page length - << ( USHORT ) 2 << ( USHORT ) 2; // Top/Bottom margin + aOut << ( sal_uInt16 ) 0x28 << ( sal_uInt16 ) 10 + << ( sal_uInt16 ) 4 << ( sal_uInt16 ) 76 // Left/right margin + << ( sal_uInt16 ) 66 // Page length + << ( sal_uInt16 ) 2 << ( sal_uInt16 ) 2; // Top/Bottom margin } inline void ExportWK1::Labelfmt() { // (0x29) // Global label alignment = left - aOut << ( USHORT ) 0x29 << ( USHORT ) 1 << ( BYTE ) 0x27; + aOut << ( sal_uInt16 ) 0x29 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 0x27; } inline void ExportWK1::Calccount() { // (0x2F) // Iteration count = 16 (oder so aehnlich) - aOut << ( USHORT ) 0x2F << ( USHORT ) 1 << ( BYTE ) 16; + aOut << ( sal_uInt16 ) 0x2F << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 16; } inline void ExportWK1::Cursorw12() { // (0x31) // Cursor location in window 1 - aOut << ( USHORT ) 0x31 << ( USHORT ) 1 << ( BYTE ) 1; + aOut << ( sal_uInt16 ) 0x31 << ( sal_uInt16 ) 1 << ( sal_uInt8 ) 1; } -void ExportWK1::WKString( const USHORT /*nCol*/, const USHORT /*nRow*/, const ScFormulaCell* /*pFC*/, const ScPatternAttr& /*aAttr*/ ) +void ExportWK1::WKString( const sal_uInt16 /*nCol*/, const sal_uInt16 /*nRow*/, const ScFormulaCell* /*pFC*/, const ScPatternAttr& /*aAttr*/ ) { // (0x33) // PREC: nCol <= WK1MAXCOL, nRow <= WK1MAXROW /* DBG_ASSERT( nCol <= WK1MAXCOL, "ExportWK1::Label(): Col > WK1MAXCOL" ); @@ -275,37 +275,37 @@ void ExportWK1::WKString( const USHORT /*nCol*/, const USHORT /*nRow*/, const Sc String aStr; ( ( ScFormulaCell * ) pFC )->GetString( aStr ); // Formeltext zunaechst so belassen - USHORT nLaenge = 6; // Anzahl Bytes vor String+Nullbyte am Ende + sal_uInt16 nLaenge = 6; // Anzahl Bytes vor String+Nullbyte am Ende - USHORT nAnz = aStr.Len(); + sal_uInt16 nAnz = aStr.Len(); if( nAnz > 240 ) // max. 240 Zeichen im String nAnz = 240; nLaenge += nAnz; // + Stringlaenge - aOut << ( USHORT ) 0x33 << nLaenge + aOut << ( sal_uInt16 ) 0x33 << nLaenge << GenFormByte( aAttr ) << nCol << nRow; // Zeichenweise String ausgeben - for( USHORT nLauf = 0 ; nLauf < nAnz ; nLauf++ ) + for( sal_uInt16 nLauf = 0 ; nLauf < nAnz ; nLauf++ ) aOut << aStr[ nLauf ]; - aOut << ( BYTE ) 0x00; // ...und Nullterminator anhaengen + aOut << ( sal_uInt8 ) 0x00; // ...und Nullterminator anhaengen */ } inline void ExportWK1::Snrange() { // (0x47) - //aOut << ( USHORT ) 0x47 << ( USHORT ) x + //aOut << ( sal_uInt16 ) 0x47 << ( sal_uInt16 ) x /* ScRangeName *pRanges = pD->GetRangeName(); ScRangeData *pData; String aName; - USHORT nAnz = pRanges->GetCount(); + sal_uInt16 nAnz = pRanges->GetCount(); - for( USHORT nLauf = 0 ; nLauf < nAnz ; nLauf++ ) + for( sal_uInt16 nLauf = 0 ; nLauf < nAnz ; nLauf++ ) { pData = pRanges[ nLauf ]; @@ -318,7 +318,7 @@ inline void ExportWK1::Hidcol() { // (0x64) sal_uInt32 nHide = 0x00000000; // ...niemand ist versteckt - aOut << ( USHORT ) 0x64 << ( USHORT ) 32; + aOut << ( sal_uInt16 ) 0x64 << ( sal_uInt16 ) 32; for( int nLauf = 0 ; nLauf < 8 ; nLauf++ ) aOut << nHide; // 8 * 32 Bits = 256 @@ -327,7 +327,7 @@ inline void ExportWK1::Hidcol() inline void ExportWK1::Cpi() { // (0x96) - //aOut << ( USHORT ) 0x96 << ( USHORT ) x; + //aOut << ( sal_uInt16 ) 0x96 << ( sal_uInt16 ) x; } @@ -355,7 +355,7 @@ FltError ExportWK1::Write() // Zellen-Bemachung ScDocumentIterator aIter( pD, 0, 0 ); ScBaseCell* pCell; - USHORT nCol, nRow; + sal_uInt16 nCol, nRow; SCTAB nTab; const ScPatternAttr* pPatAttr; @@ -370,8 +370,8 @@ FltError ExportWK1::Write() #if SC_ROWLIMIT_MORE_THAN_64K #error row limit 64k #endif - nCol = static_cast<USHORT>(nScCol); - nRow = static_cast<USHORT>(nScRow); + nCol = static_cast<sal_uInt16>(nScCol); + nRow = static_cast<sal_uInt16>(nScRow); switch( pCell->GetCellType() ) { @@ -399,7 +399,7 @@ FltError ExportWK1::Write() case CELLTYPE_NONE: break; default: - DBG_ASSERT( FALSE, "ExportWK1::Write(): unbekannter Celltype!" ); + DBG_ASSERT( false, "ExportWK1::Write(): unbekannter Celltype!" ); } } while( aIter.GetNext() ); diff --git a/sc/source/filter/lotus/filter.cxx b/sc/source/filter/lotus/filter.cxx index d521aec97315..c3f53b5eb615 100644 --- a/sc/source/filter/lotus/filter.cxx +++ b/sc/source/filter/lotus/filter.cxx @@ -54,7 +54,7 @@ #include "op.h" // Konstanten ------------------------------------------------------------ -const UINT16 nBOF = 0x0000; +const sal_uInt16 nBOF = 0x0000; @@ -62,8 +62,8 @@ const UINT16 nBOF = 0x0000; extern WKTYP eTyp; // Typ der gerade in bearbeitung befindlichen Datei WKTYP eTyp; -extern BOOL bEOF; // zeigt Ende der Datei -BOOL bEOF; +extern sal_Bool bEOF; // zeigt Ende der Datei +sal_Bool bEOF; extern CharSet eCharNach; // Zeichenkonvertierung von->nach CharSet eCharNach; @@ -88,7 +88,7 @@ extern long nDateiLaenge; // -> datei.cpp, ...der gerade offenen Datei LOTUS_ROOT* pLotusRoot = NULL; -std::map<UINT16, ScPatternAttr> aLotusPatternPool; +std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool; static FltError generate_Opcodes( SvStream& aStream, ScDocument& rDoc, @@ -119,12 +119,12 @@ generate_Opcodes( SvStream& aStream, ScDocument& rDoc, aStream.Seek( STREAM_SEEK_TO_BEGIN ); while( !bEOF && !aStream.IsEof() && (aStream.Tell() < nStrmSize) ) { - UINT16 nOpcode, nLength; + sal_uInt16 nOpcode, nLength; aStream >> nOpcode >> nLength; aPrgrsBar.Progress(); if( nOpcode == LOTUS_EOF ) - bEOF = TRUE; + bEOF = sal_True; else if( nOpcode == LOTUS_FILEPASSWD ) return eERR_FILEPASSWD; @@ -168,7 +168,7 @@ WKTYP ScanVersion( SvStream& aStream ) { // PREC: pWKDatei: Zeiger auf offene Datei // POST: return: Typ der Datei - UINT16 nOpcode, nVersNr, nRecLen; + sal_uInt16 nOpcode, nVersNr, nRecLen; // erstes Byte muss wegen BOF zwingend 0 sein! aStream >> nOpcode; @@ -225,7 +225,7 @@ FltError ScImportLotus123old( SvStream& aStream, ScDocument* pDocument, CharSet // Zeiger auf Dokument global machen pDoc = pDocument; - bEOF = FALSE; + bEOF = false; eCharVon = eSrc; diff --git a/sc/source/filter/lotus/lotattr.cxx b/sc/source/filter/lotus/lotattr.cxx index bbb6e7b5131d..928b06fe0378 100644 --- a/sc/source/filter/lotus/lotattr.cxx +++ b/sc/source/filter/lotus/lotattr.cxx @@ -101,7 +101,7 @@ LotAttrCache::~LotAttrCache() const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) { - UINT32 nRefHash; + sal_uInt32 nRefHash; MakeHash( rAttr, nRefHash ); boost::ptr_vector<ENTRY>::const_iterator iter = std::find_if(aEntries.begin(),aEntries.end(), @@ -120,7 +120,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) pLotusRoot->pFontBuff->Fill( rAttr.nFont, rItemSet ); - UINT8 nLine = rAttr.nLineStyle; + sal_uInt8 nLine = rAttr.nLineStyle; if( nLine ) { SvxBoxItem aBox( ATTR_BORDER ); @@ -142,7 +142,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) rItemSet.Put( aBox ); } - UINT8 nFontCol = rAttr.nFontCol & 0x07; + sal_uInt8 nFontCol = rAttr.nFontCol & 0x07; if( nFontCol ) { // nFontCol > 0 @@ -152,7 +152,7 @@ const ScPatternAttr& LotAttrCache::GetPattAttr( const LotAttrWK3& rAttr ) rItemSet.Put( *pWhite ); } - UINT8 nBack = rAttr.nBack & 0x1F; + sal_uInt8 nBack = rAttr.nBack & 0x1F; if( nBack ) rItemSet.Put( SvxBrushItem( GetColor( nBack & 0x07 ), ATTR_BACKGROUND ) ); @@ -235,7 +235,7 @@ void LotAttrCol::SetAttr( const SCROW nRow, const ScPatternAttr& rAttr ) } -void LotAttrCol::Apply( const SCCOL nColNum, const SCTAB nTabNum, const BOOL /*bClear*/ ) +void LotAttrCol::Apply( const SCCOL nColNum, const SCTAB nTabNum, const sal_Bool /*bClear*/ ) { ScDocument* pDoc = pLotusRoot->pDoc; diff --git a/sc/source/filter/lotus/lotform.cxx b/sc/source/filter/lotus/lotform.cxx index 2c060819fcbd..4284ac68b4c6 100644 --- a/sc/source/filter/lotus/lotform.cxx +++ b/sc/source/filter/lotus/lotform.cxx @@ -46,21 +46,21 @@ extern WKTYP eTyp; -static const sal_Char* GetAddInName( const UINT8 nIndex ); +static const sal_Char* GetAddInName( const sal_uInt8 nIndex ); static DefTokenId lcl_KnownAddIn( const ByteString& sTest ); -//extern double decipher_Number123( UINT32 nValue ); +//extern double decipher_Number123( sal_uInt32 nValue ); -void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString ) +void LotusToSc::DoFunc( DefTokenId eOc, sal_uInt8 nAnz, const sal_Char* pExtString ) { TokenId eParam[ 256 ]; - INT32 nLauf; + sal_Int32 nLauf; TokenId nMerk0, nMerk1; - BOOL bAddIn = FALSE; - BOOL bNeg = FALSE; + sal_Bool bAddIn = false; + sal_Bool bNeg = false; DBG_ASSERT( nAnz < 128, "-LotusToSc::DoFunc(): Neee! -so viel kann ich nicht!" ); @@ -89,7 +89,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString ) if( eOc == ocNoName ) { - bAddIn = TRUE; + bAddIn = sal_True; nMerk0 = aPool.Store( eOc, String( t, eSrcChar ) ); aPool << nMerk0; @@ -168,7 +168,7 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString ) { // ACHTUNG: 0 ist der letzte Parameter, nAnz-1 der erste - INT16 nLast = nAnz - 1; + sal_Int16 nLast = nAnz - 1; if( eOc == ocRMZ ) { // Extrawurst ocRMZ letzter Parameter negiert! @@ -223,12 +223,12 @@ void LotusToSc::DoFunc( DefTokenId eOc, BYTE nAnz, const sal_Char* pExtString ) } -void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD ) +void LotusToSc::LotusRelToScRel( sal_uInt16 nCol, sal_uInt16 nRow, ScSingleRefData& rSRD ) { // Col-Bemachung if( nCol & 0x8000 ) { - rSRD.SetColRel( TRUE ); + rSRD.SetColRel( sal_True ); if( nCol & 0x0080 ) nCol |= 0xFF00; else @@ -238,14 +238,14 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD } else { - rSRD.SetColRel( FALSE ); + rSRD.SetColRel( false ); rSRD.nCol = static_cast< SCsCOL >( nCol & 0x00FF ); } // Row-Bemachung if( nRow & 0x8000 ) { - rSRD.SetRowRel( TRUE ); + rSRD.SetRowRel( sal_True ); // vorzeichenrichtige Erweiterung switch( eTyp ) { @@ -272,7 +272,7 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD } else { - rSRD.SetRowRel( FALSE ); + rSRD.SetRowRel( false ); switch( eTyp ) { // 5432 1098 7654 3210 @@ -302,16 +302,16 @@ void LotusToSc::LotusRelToScRel( UINT16 nCol, UINT16 nRow, ScSingleRefData& rSRD } -void LotusToSc::ReadSRD( ScSingleRefData& rSRD, BYTE nRelBit ) +void LotusToSc::ReadSRD( ScSingleRefData& rSRD, sal_uInt8 nRelBit ) { - BYTE nTab, nCol; - UINT16 nRow; + sal_uInt8 nTab, nCol; + sal_uInt16 nRow; Read( nRow ); Read( nTab ); Read( nCol ); - BOOL b3D = ( static_cast< SCTAB >( nTab ) != aEingPos.Tab() ); + sal_Bool b3D = ( static_cast< SCTAB >( nTab ) != aEingPos.Tab() ); rSRD.SetColRel( ( nRelBit & 0x01 ) != 0 ); rSRD.nCol = static_cast< SCsCOL >( nCol ); @@ -365,27 +365,27 @@ void LotusToSc::Reset( const ScAddress& rEingPos ) } -LotusToSc::LotusToSc( SvStream &rStream, CharSet e, BOOL b ) : +LotusToSc::LotusToSc( SvStream &rStream, CharSet e, sal_Bool b ) : LotusConverterBase( rStream, 128 ) { eSrcChar = e; - bWK3 = FALSE; + bWK3 = false; bWK123 = b; } -typedef FUNC_TYPE ( FuncType1 ) ( BYTE ); -typedef DefTokenId ( FuncType2 ) ( BYTE ); +typedef FUNC_TYPE ( FuncType1 ) ( sal_uInt8 ); +typedef DefTokenId ( FuncType2 ) ( sal_uInt8 ); -ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, +ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, sal_Int32& rRest, const FORMULA_TYPE /*eFT*/ ) { - BYTE nOc; - BYTE nAnz; - BYTE nRelBits; - UINT16 nStrLen; - UINT16 nRngIndex; + sal_uInt8 nOc; + sal_uInt8 nAnz; + sal_uInt8 nRelBits; + sal_uInt16 nStrLen; + sal_uInt16 nRngIndex; FUNC_TYPE eType = FT_NOP; TokenId nMerk0; DefTokenId eOc; @@ -419,10 +419,10 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, pIndexToType = IndexToType; pIndexToToken = IndexToToken; - rR.SetTabRel( TRUE ); + rR.SetTabRel( sal_True ); rR.nTab = aEingPos.Tab(); rR.nRelTab = 0; - rR.SetFlag3D( FALSE ); + rR.SetFlag3D( false ); } aCRD.Ref2 = rR; @@ -480,7 +480,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, break; case FT_Variable: { - UINT16 nCol, nRow; + sal_uInt16 nCol, nRow; Read( nCol ); Read( nRow ); @@ -496,7 +496,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, // kein Range dazu nNewId = aPool.Store( rR ); else - nNewId = aPool.Store( ( UINT16 ) nId ); + nNewId = aPool.Store( ( sal_uInt16 ) nId ); } aStack << nNewId; @@ -504,7 +504,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, break; case FT_Range: { - UINT16 nColS, nRowS, nColE, nRowE; + sal_uInt16 nColS, nRowS, nColE, nRowE; Read( nColS ); Read( nRowS ); Read( nColE ); @@ -524,7 +524,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, // kein Range dazu nNewId = aPool.Store( aCRD ); else - nNewId = aPool.Store( ( UINT16 ) nId ); + nNewId = aPool.Store( ( sal_uInt16 ) nId ); } aStack << nNewId; @@ -536,7 +536,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, break; case FT_ConstInt: { - INT16 nVal; + sal_Int16 nVal; Read( nVal ); aStack << aPool.Store( ( double ) nVal ); } @@ -634,7 +634,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, case FT_Snum: if ( bWK123 ) { - UINT32 nValue; + sal_uInt32 nValue; Read( nValue ); double fValue = Snum32ToDouble( nValue ); @@ -642,7 +642,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, } else { - INT16 nVal; + sal_Int16 nVal; Read( nVal ); aStack << aPool.Store( SnumToDouble( nVal ) ); } @@ -666,7 +666,7 @@ ConvErr LotusToSc::Convert( const ScTokenArray*& rpErg, INT32& rRest, } -FUNC_TYPE LotusToSc::IndexToType( BYTE nIndex ) +FUNC_TYPE LotusToSc::IndexToType( sal_uInt8 nIndex ) { static const FUNC_TYPE pType[ 256 ] = { // Code Bezeichnung @@ -931,7 +931,7 @@ FUNC_TYPE LotusToSc::IndexToType( BYTE nIndex ) } -DefTokenId LotusToSc::IndexToToken( BYTE nIndex ) +DefTokenId LotusToSc::IndexToToken( sal_uInt8 nIndex ) { static const DefTokenId pToken[ 256 ] = { // Code Bezeichnung @@ -1197,7 +1197,7 @@ DefTokenId LotusToSc::IndexToToken( BYTE nIndex ) } -FUNC_TYPE LotusToSc::IndexToTypeWK123( BYTE nIndex ) +FUNC_TYPE LotusToSc::IndexToTypeWK123( sal_uInt8 nIndex ) { static const FUNC_TYPE pType[ 256 ] = { // Code Bezeichnung @@ -1462,7 +1462,7 @@ FUNC_TYPE LotusToSc::IndexToTypeWK123( BYTE nIndex ) } -DefTokenId LotusToSc::IndexToTokenWK123( BYTE nIndex ) +DefTokenId LotusToSc::IndexToTokenWK123( sal_uInt8 nIndex ) { static const DefTokenId pToken[ 256 ] = { // Code Bezeichnung @@ -1730,7 +1730,7 @@ DefTokenId LotusToSc::IndexToTokenWK123( BYTE nIndex ) -const sal_Char* GetAddInName( const UINT8 n ) +const sal_Char* GetAddInName( const sal_uInt8 n ) { static const sal_Char* pNames[ 256 ] = { diff --git a/sc/source/filter/lotus/lotimpop.cxx b/sc/source/filter/lotus/lotimpop.cxx index d5aad61a6054..150fee171646 100644 --- a/sc/source/filter/lotus/lotimpop.cxx +++ b/sc/source/filter/lotus/lotimpop.cxx @@ -55,7 +55,7 @@ static osl::Mutex aLotImpSemaphore; ImportLotus::ImportLotus( SvStream& aStream, ScDocument* pDoc, CharSet eQ ) : ImportTyp( pDoc, eQ ), pIn( &aStream ), - aConv( *pIn, eQ, FALSE ) + aConv( *pIn, eQ, false ) { // good point to start locking of import lotus aLotImpSemaphore.acquire(); @@ -92,8 +92,8 @@ ImportLotus::~ImportLotus() void ImportLotus::Bof( void ) { - UINT16 nFileCode, nFileSub, nSaveCnt; - BYTE nMajorId, nMinorId, nFlags; + sal_uInt16 nFileCode, nFileSub, nSaveCnt; + sal_uInt8 nMajorId, nMinorId, nFlags; Read( nFileCode ); Read( nFileSub ); @@ -118,9 +118,9 @@ void ImportLotus::Bof( void ) } -BOOL ImportLotus::BofFm3( void ) +sal_Bool ImportLotus::BofFm3( void ) { - UINT16 nFileCode, nFileSub; + sal_uInt16 nFileCode, nFileSub; Read( nFileCode ); Read( nFileSub ); @@ -129,12 +129,12 @@ BOOL ImportLotus::BofFm3( void ) } -void ImportLotus::Columnwidth( UINT16 nRecLen ) +void ImportLotus::Columnwidth( sal_uInt16 nRecLen ) { DBG_ASSERT( nRecLen >= 4, "*ImportLotus::Columnwidth(): Record zu kurz!" ); - BYTE nLTab, nWindow2; - UINT16 nCnt = ( nRecLen - 4 ) / 2; + sal_uInt8 nLTab, nWindow2; + sal_uInt16 nCnt = ( nRecLen - 4 ) / 2; Read( nLTab ); Read( nWindow2 ); @@ -146,14 +146,14 @@ void ImportLotus::Columnwidth( UINT16 nRecLen ) { Skip( 2 ); - BYTE nCol, nSpaces; + sal_uInt8 nCol, nSpaces; while( nCnt ) { Read( nCol ); Read( nSpaces ); // ACHTUNG: Korrekturfaktor nach 'Augenmass' ermittelt! - pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), ( UINT16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); + pD->SetColWidth( static_cast<SCCOL> (nCol), static_cast<SCTAB> (nLTab), ( sal_uInt16 ) ( TWIPS_PER_CHAR * 1.28 * nSpaces ) ); nCnt--; } @@ -161,12 +161,12 @@ void ImportLotus::Columnwidth( UINT16 nRecLen ) } -void ImportLotus::Hiddencolumn( UINT16 nRecLen ) +void ImportLotus::Hiddencolumn( sal_uInt16 nRecLen ) { DBG_ASSERT( nRecLen >= 4, "*ImportLotus::Hiddencolumn(): Record zu kurz!" ); - BYTE nLTab, nWindow2; - UINT16 nCnt = ( nRecLen - 4 ) / 2; + sal_uInt8 nLTab, nWindow2; + sal_uInt16 nCnt = ( nRecLen - 4 ) / 2; Read( nLTab ); Read( nWindow2 ); @@ -175,7 +175,7 @@ void ImportLotus::Hiddencolumn( UINT16 nRecLen ) { Skip( 2 ); - BYTE nCol; + sal_uInt8 nCol; while( nCnt ) { @@ -190,7 +190,7 @@ void ImportLotus::Hiddencolumn( UINT16 nRecLen ) void ImportLotus::Userrange( void ) { - UINT16 nRangeType; + sal_uInt16 nRangeType; ScRange aScRange; sal_Char* pBuffer = new sal_Char[ 32 ]; @@ -213,7 +213,7 @@ void ImportLotus::Errcell( void ) Read( aA ); - pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#ERR!" ) ), (BOOL)TRUE ); + pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#ERR!" ) ), (sal_Bool)sal_True ); } @@ -223,7 +223,7 @@ void ImportLotus::Nacell( void ) Read( aA ); - pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#NA!" ) ), (BOOL)TRUE ); + pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( CREATE_STRING( "#NA!" ) ), (sal_Bool)sal_True ); } @@ -239,7 +239,7 @@ void ImportLotus::Labelcell( void ) // aLabel.Convert( pLotusRoot->eCharsetQ ); - pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( aLabel ), (BOOL)TRUE ); + pD->PutCell( aA.Col(), aA.Row(), aA.Tab(), new ScStringCell( aLabel ), (sal_Bool)sal_True ); } @@ -252,24 +252,24 @@ void ImportLotus::Numbercell( void ) Read( fVal ); pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), - new ScValueCell( fVal ), (BOOL)TRUE ); + new ScValueCell( fVal ), (sal_Bool)sal_True ); } void ImportLotus::Smallnumcell( void ) { ScAddress aAddr; - INT16 nVal; + sal_Int16 nVal; Read( aAddr ); Read( nVal ); pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), - new ScValueCell( SnumToDouble( nVal ) ), ( BOOL ) TRUE ); + new ScValueCell( SnumToDouble( nVal ) ), ( sal_Bool ) sal_True ); } -ScFormulaCell *ImportLotus::Formulacell( UINT16 n ) +ScFormulaCell *ImportLotus::Formulacell( sal_uInt16 n ) { DBG_ASSERT( pIn, "-ImportLotus::Formulacell(): Null-Stream -> Rums!" ); @@ -281,7 +281,7 @@ ScFormulaCell *ImportLotus::Formulacell( UINT16 n ) n -= 14; const ScTokenArray* pErg; - INT32 nRest = n; + sal_Int32 nRest = n; aConv.Reset( aAddr ); aConv.SetWK3(); @@ -291,7 +291,7 @@ ScFormulaCell *ImportLotus::Formulacell( UINT16 n ) pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), pZelle, (BOOL)TRUE ); + pD->PutCell( aAddr.Col(), aAddr.Row(), aAddr.Tab(), pZelle, (sal_Bool)sal_True ); return NULL; } @@ -303,13 +303,13 @@ void ImportLotus::Read( String &r ) } -void ImportLotus::RowPresentation( UINT16 nRecLen ) +void ImportLotus::RowPresentation( sal_uInt16 nRecLen ) { DBG_ASSERT( nRecLen > 4, "*ImportLotus::RowPresentation(): Record zu kurz!" ); - BYTE nLTab, nFlags; - UINT16 nRow, nHeight; - UINT16 nCnt = ( nRecLen - 4 ) / 8; + sal_uInt8 nLTab, nFlags; + sal_uInt16 nRow, nHeight; + sal_uInt16 nCnt = ( nRecLen - 4 ) / 8; Read( nLTab ); Skip( 1 ); @@ -340,7 +340,7 @@ void ImportLotus::RowPresentation( UINT16 nRecLen ) void ImportLotus::NamedSheet( void ) { - UINT16 nLTab; + sal_uInt16 nLTab; String aName; Read( nLTab ); @@ -355,7 +355,7 @@ void ImportLotus::NamedSheet( void ) void ImportLotus::Font_Face( void ) { - BYTE nNum; + sal_uInt8 nNum; String aName; Read( nNum ); @@ -373,9 +373,9 @@ void ImportLotus::Font_Face( void ) void ImportLotus::Font_Type( void ) { - static const UINT16 nAnz = 8; - UINT16 nCnt; - UINT16 nType; + static const sal_uInt16 nAnz = 8; + sal_uInt16 nCnt; + sal_uInt16 nType; for( nCnt = 0 ; nCnt < nAnz ; nCnt++ ) { @@ -387,9 +387,9 @@ void ImportLotus::Font_Type( void ) void ImportLotus::Font_Ysize( void ) { - static const UINT16 nAnz = 8; - UINT16 nCnt; - UINT16 nSize; + static const sal_uInt16 nAnz = 8; + sal_uInt16 nCnt; + sal_uInt16 nSize; for( nCnt = 0 ; nCnt < nAnz ; nCnt++ ) { @@ -399,18 +399,18 @@ void ImportLotus::Font_Ysize( void ) } -void ImportLotus::_Row( const UINT16 nRecLen ) +void ImportLotus::_Row( const sal_uInt16 nRecLen ) { DBG_ASSERT( nExtTab >= 0, "*ImportLotus::_Row(): Kann hier nicht sein!" ); - UINT16 nRow; - UINT16 nHeight; - UINT16 nCntDwn = ( nRecLen - 4 ) / 5; + sal_uInt16 nRow; + sal_uInt16 nHeight; + sal_uInt16 nCntDwn = ( nRecLen - 4 ) / 5; SCCOL nColCnt = 0; - UINT8 nRepeats; + sal_uInt8 nRepeats; LotAttrWK3 aAttr; - BOOL bCenter = FALSE; + sal_Bool bCenter = false; SCCOL nCenterStart = 0, nCenterEnd = 0; Read( nRow ); @@ -446,7 +446,7 @@ void ImportLotus::_Row( const UINT16 nRecLen ) } else {// ganz neue Center - bCenter = TRUE; + bCenter = sal_True; nCenterStart = nColCnt; } nCenterEnd = nColCnt + static_cast<SCCOL>(nRepeats); @@ -456,7 +456,7 @@ void ImportLotus::_Row( const UINT16 nRecLen ) if( bCenter ) {// evtl. alte Center bemachen pD->DoMerge( static_cast<SCTAB> (nExtTab), nCenterStart, static_cast<SCROW> (nRow), nCenterEnd, static_cast<SCROW> (nRow) ); - bCenter = FALSE; + bCenter = false; } } diff --git a/sc/source/filter/lotus/lotread.cxx b/sc/source/filter/lotus/lotread.cxx index 2bc80630e9b5..84cb8df148ba 100644 --- a/sc/source/filter/lotus/lotread.cxx +++ b/sc/source/filter/lotus/lotread.cxx @@ -57,10 +57,10 @@ FltError ImportLotus::Read() S_END // Import finished }; - UINT16 nOp; - UINT16 nSubType; - UINT16 nRecLen; - UINT32 nNextRec = 0UL; + sal_uInt16 nOp; + sal_uInt16 nSubType; + sal_uInt16 nRecLen; + sal_uInt32 nNextRec = 0UL; FltError eRet = eERR_OK; // ScFormulaCell *pLastFormCell; @@ -246,10 +246,10 @@ FltError ImportLotus::Read( SvStream& rIn ) { pIn = &rIn; - BOOL bRead = TRUE; - UINT16 nOp; - UINT16 nRecLen; - UINT32 nNextRec = 0UL; + sal_Bool bRead = sal_True; + sal_uInt16 nOp; + sal_uInt16 nRecLen; + sal_uInt32 nNextRec = 0UL; FltError eRet = eERR_OK; nTab = 0; @@ -265,7 +265,7 @@ FltError ImportLotus::Read( SvStream& rIn ) *pIn >> nOp >> nRecLen; if( pIn->IsEof() ) - bRead = FALSE; + bRead = false; else { nNextRec += nRecLen + 4; @@ -275,13 +275,13 @@ FltError ImportLotus::Read( SvStream& rIn ) case 0x0000: // BOF if( nRecLen != 26 || !BofFm3() ) { - bRead = FALSE; + bRead = false; eRet = eERR_FORMAT; } break; case 0x0001: // EOF - bRead = FALSE; + bRead = false; DBG_ASSERT( nTab == 0, "-ImportLotus::Read( SvStream& ): Zweimal EOF nicht erlaubt" ); nTab++; diff --git a/sc/source/filter/lotus/lotus.cxx b/sc/source/filter/lotus/lotus.cxx index 8a9623057788..050ede83ff1f 100644 --- a/sc/source/filter/lotus/lotus.cxx +++ b/sc/source/filter/lotus/lotus.cxx @@ -46,7 +46,7 @@ extern FltError ScImportLotus123old( SvStream&, ScDocument*, CharSet eSrc ); FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocument* pDocument, CharSet eSrc ) { ScFilterOptions aFilterOpt; - BOOL bWithWK3 = aFilterOpt.GetWK3Flag(); + sal_Bool bWithWK3 = aFilterOpt.GetWK3Flag(); SvStream* pStream = rMedium.GetInStream(); @@ -87,7 +87,7 @@ FltError ScFormatFilterPluginImpl::ScImportLotus123( SfxMedium& rMedium, ScDocum {// versuchen *.FM3-File zu laden INetURLObject aURL( rMedium.GetURLObject() ); aURL.setExtension( CREATE_STRING( "FM3" ) ); - SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ, TRUE ); + SfxMedium aMedium( aURL.GetMainURL(INetURLObject::NO_DECODE), STREAM_STD_READ, sal_True ); pStream = aMedium.GetInStream(); if ( pStream ) { diff --git a/sc/source/filter/lotus/memory.cxx b/sc/source/filter/lotus/memory.cxx index 68b26befa1aa..439d2d010521 100644 --- a/sc/source/filter/lotus/memory.cxx +++ b/sc/source/filter/lotus/memory.cxx @@ -55,8 +55,8 @@ sal_Char* pPuffer; // -> flt_xxx.cxx sal_Char* pDummy1; // -> flt_xxx.cxx, ScanVersion() sal_Char* pDummy2; // -> tool.cxx, CreateTable() -extern BYTE* pFormelBuffer; // -> tool.cxx, fuer OP_Formula() -BYTE* pFormelBuffer; +extern sal_uInt8* pFormelBuffer; // -> tool.cxx, fuer OP_Formula() +sal_uInt8* pFormelBuffer; extern FormCache* pValueFormCache; // -> tool.cxx @@ -72,8 +72,8 @@ sal_Char* pAnsi; #endif sal_Char* pErgebnis; // -> op.cxx -extern BOOL bFormInit; // -> tool.cxx, fuer GetFormHandle() -BOOL bFormInit; +extern sal_Bool bFormInit; // -> tool.cxx, fuer GetFormHandle() +sal_Bool bFormInit; extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard; // -> tool.cxx, fuer GetFormAttr() @@ -81,7 +81,7 @@ extern ScProtectionAttr* pAttrUnprot; // -> tool.cxx, fuer PutFormString() -BOOL MemNew( void ) +sal_Bool MemNew( void ) { pPuffer = new sal_Char [ 32L*1024L ]; @@ -100,20 +100,20 @@ BOOL MemNew( void ) pPar = new sal_Char *[ nMaxPar ]; - pFormelBuffer = new BYTE[ 4096 ]; + pFormelBuffer = new sal_uInt8[ 4096 ]; pValueFormCache = new FormCache( pDoc ); // fuer tool.cxx::PutFormString() - pAttrUnprot = new ScProtectionAttr( TRUE ); + pAttrUnprot = new ScProtectionAttr( sal_True ); pAttrRight = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_RIGHT, ATTR_HOR_JUSTIFY ); pAttrLeft = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_LEFT, ATTR_HOR_JUSTIFY ); pAttrCenter = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_CENTER, ATTR_HOR_JUSTIFY ); pAttrRepeat = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_REPEAT, ATTR_HOR_JUSTIFY ); pAttrStandard = new SvxHorJustifyItem( SVX_HOR_JUSTIFY_STANDARD, ATTR_HOR_JUSTIFY ); - bFormInit = TRUE; + bFormInit = sal_True; - return TRUE; + return sal_True; } diff --git a/sc/source/filter/lotus/op.cxx b/sc/source/filter/lotus/op.cxx index 1a6603e5a30c..e5e780355eeb 100644 --- a/sc/source/filter/lotus/op.cxx +++ b/sc/source/filter/lotus/op.cxx @@ -74,64 +74,64 @@ #include <string.h> #include <math.h> #include <ctype.h> -#if defined( MAC ) || defined( ICC ) +#if defined( ICC ) #include <stdlib.h> #endif extern sal_Char* pAnsi; // -> memory.cxx, Puffer zum Umwandeln von OEM->ANSI extern sal_Char* pErgebnis; // -> memory.cxx, Ergebnispuffer extern WKTYP eTyp; // -> filter.cxx, aktueller Dateityp -extern BOOL bEOF; // -> filter.cxx, zeigt Dateiende an +extern sal_Bool bEOF; // -> filter.cxx, zeigt Dateiende an extern sal_Char* pPuffer0; // -> memory.cxx extern sal_Char* pPuffer1; -extern BYTE nDefaultFormat; // -> tool.cxx, Default-Zellenformat +extern sal_uInt8 nDefaultFormat; // -> tool.cxx, Default-Zellenformat extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff -extern BYTE* pFormelBuffer; // -> memory.cxx, fuer +extern sal_uInt8* pFormelBuffer; // -> memory.cxx, fuer extern CharSet eCharVon; // -> filter.cxx, character set specified -static UINT16 nDefWidth = ( UINT16 ) ( TWIPS_PER_CHAR * 10 ); +static sal_uInt16 nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * 10 ); -extern std::map<UINT16, ScPatternAttr> aLotusPatternPool; +extern std::map<sal_uInt16, ScPatternAttr> aLotusPatternPool; -void NI( SvStream& r, UINT16 n ) +void NI( SvStream& r, sal_uInt16 n ) { r.SeekRel( n ); } -void OP_BOF( SvStream& r, UINT16 /*n*/ ) +void OP_BOF( SvStream& r, sal_uInt16 /*n*/ ) { r.SeekRel( 2 ); // Versionsnummer ueberlesen } -void OP_EOF( SvStream& /*r*/, UINT16 /*n*/ ) +void OP_EOF( SvStream& /*r*/, sal_uInt16 /*n*/ ) { - bEOF = TRUE; + bEOF = sal_True; } -void OP_Integer( SvStream& r, UINT16 /*n*/ ) +void OP_Integer( SvStream& r, sal_uInt16 /*n*/ ) { - BYTE nFormat; - UINT16 nCol, nRow; + sal_uInt8 nFormat; + sal_uInt16 nCol, nRow; SCTAB nTab = 0; - INT16 nValue; + sal_Int16 nValue; r >> nFormat >> nCol >> nRow >> nValue; ScValueCell* pZelle = new ScValueCell( ( double ) nValue ); - pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); // 0 Stellen nach'm Komma! SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, 0 ); } -void OP_Number( SvStream& r, UINT16 /*n*/ ) +void OP_Number( SvStream& r, sal_uInt16 /*n*/ ) { - BYTE nFormat; - UINT16 nCol, nRow; + sal_uInt8 nFormat; + sal_uInt16 nCol, nRow; SCTAB nTab = 0; double fValue; @@ -139,16 +139,16 @@ void OP_Number( SvStream& r, UINT16 /*n*/ ) fValue = ::rtl::math::round( fValue, 15 ); ScValueCell* pZelle = new ScValueCell( fValue ); - pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat ); } -void OP_Label( SvStream& r, UINT16 n ) +void OP_Label( SvStream& r, sal_uInt16 n ) { - BYTE nFormat; - UINT16 nCol, nRow; + sal_uInt8 nFormat; + sal_uInt16 nCol, nRow; SCTAB nTab = 0; r >> nFormat >> nCol >> nRow; @@ -170,8 +170,8 @@ void OP_Label( SvStream& r, UINT16 n ) void OP_Formula( SvStream& r, UINT16 /*n*/ ) { - BYTE nFormat; - UINT16 nCol, nRow, nFormulaSize; + sal_uInt8 nFormat; + sal_uInt16 nCol, nRow, nFormulaSize; SCTAB nTab = 0; r >> nFormat >> nCol >> nRow; @@ -179,10 +179,10 @@ void OP_Formula( SvStream& r, UINT16 /*n*/ ) r >> nFormulaSize; const ScTokenArray* pErg; - INT32 nBytesLeft = nFormulaSize; + sal_Int32 nBytesLeft = nFormulaSize; ScAddress aAddress( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab ); - LotusToSc aConv( r, pLotusRoot->eCharsetQ, FALSE ); + LotusToSc aConv( r, pLotusRoot->eCharsetQ, false ); aConv.Reset( aAddress ); aConv.Convert( pErg, nBytesLeft ); @@ -190,24 +190,24 @@ void OP_Formula( SvStream& r, UINT16 /*n*/ ) pZelle->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, pZelle, ( sal_Bool ) sal_True ); // nFormat = Standard -> Nachkommastellen wie Float SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), nTab, nFormat, nDezFloat ); } -void OP_ColumnWidth( SvStream& r, UINT16 /*n*/ ) +void OP_ColumnWidth( SvStream& r, sal_uInt16 /*n*/ ) { - UINT16 nCol, nBreite; - BYTE nWidthSpaces; + sal_uInt16 nCol, nBreite; + sal_uInt8 nWidthSpaces; SCTAB nTab = 0; r >> nCol >> nWidthSpaces; if( nWidthSpaces ) // Annahme: 10cpi-Zeichensatz - nBreite = ( UINT16 ) ( TWIPS_PER_CHAR * nWidthSpaces ); + nBreite = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nWidthSpaces ); else { pDoc->SetColHidden(static_cast<SCCOL>(nCol), static_cast<SCCOL>(nCol), 0, true); @@ -218,10 +218,10 @@ void OP_ColumnWidth( SvStream& r, UINT16 /*n*/ ) } -void OP_NamedRange( SvStream& r, UINT16 /*n*/ ) +void OP_NamedRange( SvStream& r, sal_uInt16 /*n*/ ) { // POST: waren Koordinaten ungueltig, wird nicht gespeichert - UINT16 nColSt, nRowSt, nColEnd, nRowEnd; + sal_uInt16 nColSt, nRowSt, nColEnd, nRowEnd; sal_Char cPuffer[ 32 ]; r.Read( cPuffer, 16 ); @@ -251,11 +251,11 @@ void OP_NamedRange( SvStream& r, UINT16 /*n*/ ) } -void OP_SymphNamedRange( SvStream& r, UINT16 /*n*/ ) +void OP_SymphNamedRange( SvStream& r, sal_uInt16 /*n*/ ) { // POST: waren Koordinaten ungueltig, wird nicht gespeichert UINT16 nColSt, nRowSt, nColEnd, nRowEnd; - BYTE nType; + sal_uInt8 nType; sal_Char cPuffer[ 32 ]; r.Read( cPuffer, 16 ); @@ -285,29 +285,29 @@ void OP_SymphNamedRange( SvStream& r, UINT16 /*n*/ ) } -void OP_Footer( SvStream& r, UINT16 n ) +void OP_Footer( SvStream& r, sal_uInt16 n ) { r.SeekRel( n ); } -void OP_Header( SvStream& r, UINT16 n ) +void OP_Header( SvStream& r, sal_uInt16 n ) { r.SeekRel( n ); } -void OP_Margins( SvStream& r, UINT16 n ) +void OP_Margins( SvStream& r, sal_uInt16 n ) { r.SeekRel( n ); } -void OP_HiddenCols( SvStream& r, UINT16 /*n*/ ) +void OP_HiddenCols( SvStream& r, sal_uInt16 /*n*/ ) { - UINT16 nByte, nBit; + sal_uInt16 nByte, nBit; SCCOL nCount; - BYTE nAkt; + sal_uInt8 nAkt; nCount = 0; for( nByte = 0 ; nByte < 32 ; nByte++ ) // 32 Bytes mit ... @@ -326,7 +326,7 @@ void OP_HiddenCols( SvStream& r, UINT16 /*n*/ ) } -void OP_Window1( SvStream& r, UINT16 n ) +void OP_Window1( SvStream& r, sal_uInt16 n ) { r.SeekRel( 4 ); // Cursor Pos ueberspringen @@ -338,7 +338,7 @@ void OP_Window1( SvStream& r, UINT16 n ) r.SeekRel( n - 8 ); // und den Rest ueberspringen - nDefWidth = ( UINT16 ) ( TWIPS_PER_CHAR * nDefWidth ); + nDefWidth = ( sal_uInt16 ) ( TWIPS_PER_CHAR * nDefWidth ); // statt Defaulteinstellung in SC alle Cols zu Fuss setzen for( SCCOL nCol = 0 ; nCol <= MAXCOL ; nCol++ ) @@ -346,30 +346,30 @@ void OP_Window1( SvStream& r, UINT16 n ) } -void OP_Blank( SvStream& r, UINT16 /*n*/ ) +void OP_Blank( SvStream& r, sal_uInt16 /*n*/ ) { - UINT16 nCol, nRow; - BYTE nFormat; + sal_uInt16 nCol, nRow; + sal_uInt8 nFormat; r >> nFormat >> nCol >> nRow; SetFormat( static_cast<SCCOL> (nCol), static_cast<SCROW> (nRow), 0, nFormat, nDezFloat ); } -void OP_BOF123( SvStream& r, UINT16 /*n*/ ) +void OP_BOF123( SvStream& r, sal_uInt16 /*n*/ ) { r.SeekRel( 26 ); } -void OP_EOF123( SvStream& /*r*/, UINT16 /*n*/ ) +void OP_EOF123( SvStream& /*r*/, sal_uInt16 /*n*/ ) { - bEOF = TRUE; + bEOF = sal_True; } -void OP_Label123( SvStream& r, UINT16 n ) +void OP_Label123( SvStream& r, sal_uInt16 n ) { - BYTE nTab, nCol; - UINT16 nRow; + sal_uInt8 nTab, nCol; + sal_uInt16 nRow; r >> nRow >> nTab >> nCol; n -= 4; @@ -382,32 +382,32 @@ void OP_Label123( SvStream& r, UINT16 n ) delete []pText; } -void OP_Number123( SvStream& r, UINT16 /*n*/ ) +void OP_Number123( SvStream& r, sal_uInt16 /*n*/ ) { - BYTE nCol,nTab; - UINT16 nRow; - UINT32 nValue; + sal_uInt8 nCol,nTab; + sal_uInt16 nRow; + sal_uInt32 nValue; r >> nRow >> nTab >> nCol >> nValue; double fValue = Snum32ToDouble( nValue ); ScValueCell *pCell = new ScValueCell( fValue ); - pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (BOOL) TRUE ); + pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True ); } -void OP_Formula123( SvStream& r, UINT16 n ) +void OP_Formula123( SvStream& r, sal_uInt16 n ) { - BYTE nCol,nTab; - UINT16 nRow; + sal_uInt8 nCol,nTab; + sal_uInt16 nRow; r >> nRow >> nTab >> nCol; r.SeekRel( 8 ); // Result- jump over const ScTokenArray* pErg; - INT32 nBytesLeft = n - 12; + sal_Int32 nBytesLeft = n - 12; ScAddress aAddress( nCol, nRow, nTab ); - LotusToSc aConv( r, pLotusRoot->eCharsetQ, TRUE ); + LotusToSc aConv( r, pLotusRoot->eCharsetQ, sal_True ); aConv.Reset( aAddress ); aConv.Convert( pErg, nBytesLeft ); @@ -415,25 +415,25 @@ void OP_Formula123( SvStream& r, UINT16 n ) pCell->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); - pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (BOOL) TRUE ); + pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True ); } -void OP_IEEENumber123( SvStream& r, UINT16 /*n*/ ) +void OP_IEEENumber123( SvStream& r, sal_uInt16 /*n*/ ) { - BYTE nCol,nTab; - UINT16 nRow; + sal_uInt8 nCol,nTab; + sal_uInt16 nRow; double dValue; r >> nRow >> nTab >> nCol >> dValue; ScValueCell *pCell = new ScValueCell(dValue); - pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (BOOL) TRUE ); + pDoc->PutCell( static_cast<SCCOL>(nCol), static_cast<SCROW>(nRow), static_cast<SCTAB>(nTab), pCell, (sal_Bool) sal_True ); } -void OP_Note123( SvStream& r, UINT16 n) +void OP_Note123( SvStream& r, sal_uInt16 n) { - BYTE nTab, nCol; - UINT16 nRow; + sal_uInt8 nTab, nCol; + sal_uInt16 nRow; r >> nRow >> nTab >> nCol; n -= 4; @@ -448,7 +448,7 @@ void OP_Note123( SvStream& r, UINT16 n) ScNoteUtil::CreateNoteFromString( *pDoc, aPos, aNoteText, false, false ); } -void OP_HorAlign123( BYTE nAlignPattern, SfxItemSet& rPatternItemSet ) +void OP_HorAlign123( sal_uInt8 nAlignPattern, SfxItemSet& rPatternItemSet ) { // pre: Pattern is stored in the last 3 bites of the 21st byte // post: Appropriate Horizontal Alignement is set in rPattern according to the bit pattern. @@ -481,7 +481,7 @@ void OP_HorAlign123( BYTE nAlignPattern, SfxItemSet& rPatternItemSet ) } } -void OP_VerAlign123( BYTE nAlignPattern,SfxItemSet& rPatternItemSet ) +void OP_VerAlign123( sal_uInt8 nAlignPattern,SfxItemSet& rPatternItemSet ) { // pre: Pattern is stored in the last 3 bites of the 22nd byte // post: Appropriate Verticle Alignement is set in rPattern according to the bit pattern. @@ -510,9 +510,9 @@ void OP_VerAlign123( BYTE nAlignPattern,SfxItemSet& rPatternItemSet ) } } -void OP_CreatePattern123( SvStream& r, UINT16 n) +void OP_CreatePattern123( SvStream& r, sal_uInt16 n) { - UINT16 nCode,nPatternId; + sal_uInt16 nCode,nPatternId; ScPatternAttr aPattern(pDoc->GetPool()); SfxItemSet& rItemSet = aPattern.GetItemSet(); @@ -524,8 +524,8 @@ void OP_CreatePattern123( SvStream& r, UINT16 n) { r >> nPatternId; - BYTE Hor_Align, Ver_Align, temp; - BOOL bIsBold,bIsUnderLine,bIsItalics; + sal_uInt8 Hor_Align, Ver_Align, temp; + sal_Bool bIsBold,bIsUnderLine,bIsItalics; r.SeekRel(12); @@ -552,13 +552,13 @@ void OP_CreatePattern123( SvStream& r, UINT16 n) r >> Ver_Align; OP_VerAlign123( Ver_Align, rItemSet ); - aLotusPatternPool.insert( std::map<UINT16, ScPatternAttr>::value_type( nPatternId, aPattern ) ); + aLotusPatternPool.insert( std::map<sal_uInt16, ScPatternAttr>::value_type( nPatternId, aPattern ) ); n = n - 20; } r.SeekRel(n); } -void OP_SheetName123( SvStream& rStream, USHORT nLength ) +void OP_SheetName123( SvStream& rStream, sal_uInt16 nLength ) { if (nLength <= 4) { @@ -576,7 +576,7 @@ void OP_SheetName123( SvStream& rStream, USHORT nLength ) ::std::vector<sal_Char> sSheetName; sSheetName.reserve(nLength-4); - for (USHORT i = 4; i < nLength; ++i) + for (sal_uInt16 i = 4; i < nLength; ++i) { sal_Char c; rStream >> c; @@ -592,8 +592,8 @@ void OP_SheetName123( SvStream& rStream, USHORT nLength ) void OP_ApplyPatternArea123( SvStream& rStream ) { - UINT16 nOpcode, nLength; - UINT16 nCol = 0, nColCount = 0, nRow = 0, nRowCount = 0, nTab = 0, nData, nTabCount = 0, nLevel = 0; + sal_uInt16 nOpcode, nLength; + sal_uInt16 nCol = 0, nColCount = 0, nRow = 0, nRowCount = 0, nTab = 0, nData, nTabCount = 0, nLevel = 0; do { @@ -644,7 +644,7 @@ void OP_ApplyPatternArea123( SvStream& rStream ) rStream.SeekRel( nLength - 2 ); for( int i = 0; i < nTabCount; i++) { - std::map<UINT16, ScPatternAttr>::iterator loc = aLotusPatternPool.find( nData ); + std::map<sal_uInt16, ScPatternAttr>::iterator loc = aLotusPatternPool.find( nData ); // apparently, files with invalid index occur in the wild -> don't crash then DBG_ASSERT( loc != aLotusPatternPool.end(), "invalid format index" ); diff --git a/sc/source/filter/lotus/tool.cxx b/sc/source/filter/lotus/tool.cxx index 565904437a87..3688066fcb6a 100644 --- a/sc/source/filter/lotus/tool.cxx +++ b/sc/source/filter/lotus/tool.cxx @@ -62,10 +62,10 @@ extern sal_Char* pDummy2; // -> memory.cxx extern ScDocument* pDoc; // -> filter.cxx, Aufhaenger zum Dokumentzugriff extern CharSet eCharNach; // -> filter.cxx, Zeichenkonvertierung von->nach -extern BOOL bFormInit; // -> memory.cxx, fuer GetFormHandle() +extern sal_Bool bFormInit; // -> memory.cxx, fuer GetFormHandle() //--------------------------------------------------------- GLOBALE VARIABLEN - -BYTE nDefaultFormat; // -> op.cpp, Standard-Zellenformat +sal_uInt8 nDefaultFormat; // -> op.cpp, Standard-Zellenformat extern SvxHorJustifyItem *pAttrRight, *pAttrLeft, *pAttrCenter, *pAttrRepeat, *pAttrStandard; extern ScProtectionAttr* pAttrUnprot; @@ -123,14 +123,14 @@ void PutFormString( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_Char* pString ) { pDoc->ApplyAttr( nCol, nRow, nTab, *pJustify ); ScStringCell* pZelle = new ScStringCell( String( pString, pLotusRoot->eCharsetQ ) ); - pDoc->PutCell( nCol, nRow, nTab, pZelle, ( BOOL ) TRUE ); + pDoc->PutCell( nCol, nRow, nTab, pZelle, ( sal_Bool ) sal_True ); } } -void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, BYTE nFormat, BYTE nSt ) +void SetFormat( SCCOL nCol, SCROW nRow, SCTAB nTab, sal_uInt8 nFormat, sal_uInt8 nSt ) { // PREC: nSt = Standard-Dezimalstellenanzahl pDoc->ApplyAttr( nCol, nRow, nTab, *( pValueFormCache->GetAttr( nFormat, nSt ) ) ); @@ -148,7 +148,7 @@ void InitPage( void ) } -double SnumToDouble( INT16 nVal ) +double SnumToDouble( sal_Int16 nVal ) { const double pFacts[ 8 ] = { 5000.0, @@ -165,15 +165,15 @@ double SnumToDouble( INT16 nVal ) if( nVal & 0x0001 ) { fVal = pFacts[ ( nVal >> 1 ) & 0x0007 ]; - fVal *= ( INT16 ) ( nVal >> 4 ); + fVal *= ( sal_Int16 ) ( nVal >> 4 ); } else - fVal = ( INT16 ) ( nVal >> 1 ); + fVal = ( sal_Int16 ) ( nVal >> 1 ); return fVal; } -double Snum32ToDouble( UINT32 nValue ) +double Snum32ToDouble( sal_uInt32 nValue ) { double fValue, temp; @@ -193,36 +193,36 @@ double Snum32ToDouble( UINT32 nValue ) } -FormCache::FormCache( ScDocument* pDoc1, BYTE nNewDefaultFormat ) +FormCache::FormCache( ScDocument* pDoc1, sal_uInt8 nNewDefaultFormat ) { // Default-Format ist 'Default' nDefaultFormat = nNewDefaultFormat; pFormTable = pDoc1->GetFormatTable(); - for( UINT16 nC = 0 ; nC < __nSize ; nC++ ) - bValid[ nC ] = FALSE; + for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ ) + bValid[ nC ] = false; eLanguage = ScGlobal::eLnge; } FormCache::~FormCache() { - for( UINT16 nC = 0 ; nC < __nSize ; nC++ ) + for( sal_uInt16 nC = 0 ; nC < __nSize ; nC++ ) delete aIdents[ nC ].GetAttr(); } -SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) +SfxUInt32Item* FormCache::NewAttr( sal_uInt8 nFormat, sal_uInt8 nSt ) { // neues Format erzeugen - BYTE nL, nH; // Low-/High-Nibble - BYTE nForm = nFormat; + sal_uInt8 nL, nH; // Low-/High-Nibble + sal_uInt8 nForm = nFormat; String aFormString; const sal_Char* pFormString = 0; - INT16 eType = NUMBERFORMAT_ALL; - UINT32 nIndex1; - UINT32 nHandle; - BOOL bDefault = FALSE; + sal_Int16 eType = NUMBERFORMAT_ALL; + sal_uInt32 nIndex1; + sal_uInt32 nHandle; + sal_Bool bDefault = false; //void GenerateFormat( aFormString, eType, COUNTRY_SYSTEM, LANGUAGE_SYSTEM, - // BOOL bThousand, BOOL IsRed, UINT16 nPrecision, UINT16 nAnzLeading ); + // sal_Bool bThousand, sal_Bool IsRed, sal_uInt16 nPrecision, sal_uInt16 nAnzLeading ); if( nForm == 0xFF ) // Default-Format? nForm = nDefaultFormat; @@ -239,49 +239,49 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); break; case 0x01: // Exponentdarstellung (scientific notation) //fExponent;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_SCIENTIFIC, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); break; case 0x02: // Waehrungsdarstellung (currency) //fMoney;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_CURRENCY, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); break; case 0x03: // Prozent //fPercent;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_PERCENT, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); break; case 0x04: // Komma //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, TRUE, FALSE, nL, 1 ); + eLanguage, sal_True, false, nL, 1 ); break; case 0x05: // frei //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); break; case 0x06: // frei //fStandard;nL; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); nIndex1 = 0; break; case 0x07: // Spezialformat @@ -292,14 +292,14 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, TRUE, nSt, 1 ); + eLanguage, false, sal_True, nSt, 1 ); break; case 0x01: // generelles Format //fStandard;nSt; nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nSt, 1 ); + eLanguage, false, false, nSt, 1 ); break; case 0x02: // Datum: Tag, Monat, Jahr //fDate;dfDayMonthYearLong; @@ -322,7 +322,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) pFormString = "@"; break; case 0x06: // versteckt - //wFlag |= paHideAll;bSetFormat = FALSE; + //wFlag |= paHideAll;bSetFormat = sal_False; eType = NUMBERFORMAT_NUMBER; pFormString = ""; break; @@ -336,33 +336,33 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) eType = NUMBERFORMAT_TIME; pFormString = "HH:MM"; break; - case 0x09: // Date, intern INT32 1 + case 0x09: // Date, intern sal_Int32 1 //fDate;dfDayMonthYearLong; eType = NUMBERFORMAT_DATE; pFormString = "TT.MM.JJJJ"; break; - case 0x0A: // Date, intern INT32 2 + case 0x0A: // Date, intern sal_Int32 2 //fDate;dfDayMonthYearLong; eType = NUMBERFORMAT_DATE; pFormString = "TT.MM.JJJJ"; break; - case 0x0B: // Time, intern INT32 1 + case 0x0B: // Time, intern sal_Int32 1 //fTime;tfHourMinSec24; eType = NUMBERFORMAT_TIME; pFormString = "HH:MM:SS"; break; - case 0x0C: // Time, intern INT32 2 + case 0x0C: // Time, intern sal_Int32 2 //fTime;tfHourMinSec24; eType = NUMBERFORMAT_TIME; pFormString = "HH:MM:SS"; break; case 0x0F: // Standardeinstellung //fStandard;nSt; - bDefault = TRUE; + bDefault = sal_True; break; default: //fStandard;nSt; - bDefault = TRUE; + bDefault = sal_True; break; } break; @@ -371,7 +371,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) nIndex1 = pFormTable->GetStandardFormat( NUMBERFORMAT_NUMBER, eLanguage ); pFormTable->GenerateFormat( aFormString, nIndex1, - eLanguage, FALSE, FALSE, nL, 1 ); + eLanguage, false, false, nL, 1 ); nIndex1 = 0; break; } @@ -388,7 +388,7 @@ SfxUInt32Item* FormCache::NewAttr( BYTE nFormat, BYTE nSt ) pFormTable->PutEntry( aFormString, nDummy, eType, nHandle, eLanguage ); } - return new SfxUInt32Item( ATTR_VALUE_FORMAT, ( UINT32 ) nHandle ); + return new SfxUInt32Item( ATTR_VALUE_FORMAT, ( sal_uInt32 ) nHandle ); } @@ -402,10 +402,10 @@ void LotusRange::MakeHash( void ) // ******** nColE // **************** nRowS // **************** nRowE - nHash = static_cast<UINT32>(nColStart); - nHash += static_cast<UINT32>(nColEnd) << 6; - nHash += static_cast<UINT32>(nRowStart) << 12; - nHash += static_cast<UINT32>(nRowEnd ) << 16; + nHash = static_cast<sal_uInt32>(nColStart); + nHash += static_cast<sal_uInt32>(nColEnd) << 6; + nHash += static_cast<sal_uInt32>(nRowStart) << 12; + nHash += static_cast<sal_uInt32>(nRowEnd ) << 16; } @@ -447,17 +447,17 @@ LotusRangeList::LotusRangeList( void ) pSingRef = &aComplRef.Ref1; pSingRef->nTab = pSingRef->nRelTab = 0; - pSingRef->SetColRel( FALSE ); - pSingRef->SetRowRel( FALSE ); - pSingRef->SetTabRel( TRUE ); - pSingRef->SetFlag3D( FALSE ); + pSingRef->SetColRel( false ); + pSingRef->SetRowRel( false ); + pSingRef->SetTabRel( sal_True ); + pSingRef->SetFlag3D( false ); pSingRef = &aComplRef.Ref2; pSingRef->nTab = pSingRef->nRelTab = 0; - pSingRef->SetColRel( FALSE ); - pSingRef->SetRowRel( FALSE ); - pSingRef->SetTabRel( TRUE ); - pSingRef->SetFlag3D( FALSE ); + pSingRef->SetColRel( false ); + pSingRef->SetRowRel( false ); + pSingRef->SetTabRel( sal_True ); + pSingRef->SetFlag3D( false ); } @@ -561,12 +561,12 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rC if( rRef1.nCol == rRef2.nCol && rRef1.nRow == rRef2.nRow && rRef1.nTab == rRef2.nTab ) { pScTokenArray->AddSingleReference( rCRD.Ref1 ); - pInsert->bSingleRef = TRUE; + pInsert->bSingleRef = sal_True; } else { pScTokenArray->AddDoubleReference( rCRD ); - pInsert->bSingleRef = FALSE; + pInsert->bSingleRef = false; } ScRangeData* pData = new ScRangeData( pLotusRoot->pDoc, aScName, *pScTokenArray ); @@ -579,7 +579,7 @@ void RangeNameBufferWK3::Add( const String& rOrgName, const ScComplexRefData& rC } -BOOL RangeNameBufferWK3::FindRel( const String& rRef, UINT16& rIndex ) +sal_Bool RangeNameBufferWK3::FindRel( const String& rRef, sal_uInt16& rIndex ) { StringHashEntry aRef( rRef ); @@ -590,16 +590,16 @@ BOOL RangeNameBufferWK3::FindRel( const String& rRef, UINT16& rIndex ) if( aRef == pFind->aStrHashEntry ) { rIndex = pFind->nRelInd; - return TRUE; + return sal_True; } pFind = ( ENTRY* ) List::Next(); } - return FALSE; + return false; } -BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex ) +sal_Bool RangeNameBufferWK3::FindAbs( const String& rRef, sal_uInt16& rIndex ) { String aTmp( rRef ); StringHashEntry aRef( aTmp.Erase( 0, 1 ) ); // ohne '$' suchen! @@ -618,18 +618,18 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex ) ScSingleRefData* pRef = &pFind->aScComplexRefDataRel.Ref1; pScTokenArray->Clear(); - pRef->SetColRel( FALSE ); - pRef->SetRowRel( FALSE ); - pRef->SetTabRel( TRUE ); + pRef->SetColRel( false ); + pRef->SetRowRel( false ); + pRef->SetTabRel( sal_True ); if( pFind->bSingleRef ) pScTokenArray->AddSingleReference( *pRef ); else { pRef = &pFind->aScComplexRefDataRel.Ref2; - pRef->SetColRel( FALSE ); - pRef->SetRowRel( FALSE ); - pRef->SetTabRel( TRUE ); + pRef->SetColRel( false ); + pRef->SetRowRel( false ); + pRef->SetTabRel( sal_True ); pScTokenArray->AddDoubleReference( pFind->aScComplexRefDataRel ); } @@ -642,12 +642,12 @@ BOOL RangeNameBufferWK3::FindAbs( const String& rRef, UINT16& rIndex ) pLotusRoot->pScRangeName->insert( pData ); } - return TRUE; + return sal_True; } pFind = ( ENTRY* ) List::Next(); } - return FALSE; + return false; } diff --git a/sc/source/filter/qpro/qpro.cxx b/sc/source/filter/qpro/qpro.cxx index 31dff03cda65..9f170d1bf7ec 100644 --- a/sc/source/filter/qpro/qpro.cxx +++ b/sc/source/filter/qpro/qpro.cxx @@ -69,7 +69,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt readString( aLabel, getLength() - 7 ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell( nCol, nRow, nTab, ScBaseCell::CreateTextCell( aLabel, pDoc ), (BOOL) TRUE ); + pDoc->PutCell( nCol, nRow, nTab, ScBaseCell::CreateTextCell( aLabel, pDoc ), (sal_Bool) sal_True ); } break; @@ -89,7 +89,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt ScValueCell* pInteger = new ScValueCell( ( double ) nValue ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell(nCol ,nRow, nTab ,pInteger,(BOOL) TRUE); + pDoc->PutCell(nCol ,nRow, nTab ,pInteger,(sal_Bool) sal_True); } break; @@ -99,7 +99,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt ScValueCell* pFloat = new ScValueCell( nValue ); nStyle = nStyle >> 3; pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell( nCol, nRow, nTab, pFloat, (BOOL) TRUE ); + pDoc->PutCell( nCol, nRow, nTab, pFloat, (sal_Bool) sal_True ); } break; @@ -118,7 +118,7 @@ FltError ScQProReader::readSheet( SCTAB nTab, ScDocument* pDoc, ScQProStyle *pSt nStyle = nStyle >> 3; pFormula->AddRecalcMode( RECALCMODE_ONLOAD_ONCE ); pStyle->SetFormat( pDoc, nCol, nRow, nTab, nStyle ); - pDoc->PutCell( nCol, nRow, nTab, pFormula, ( BOOL ) TRUE ); + pDoc->PutCell( nCol, nRow, nTab, pFormula, ( sal_Bool ) sal_True ); } } break; @@ -146,7 +146,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) sal_uInt16 nVersion; sal_uInt16 i = 1, j = 1; SCTAB nTab = 0; - SetEof( FALSE ); + SetEof( false ); if( !recordsLeft() ) return eERR_OPEN; @@ -169,7 +169,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) String aName; aName.Append( sal_Unicode( 'A' + nTab ) ); if (!nTab) - pDoc->RenameTab( nTab, aName, FALSE, FALSE); + pDoc->RenameTab( nTab, aName, false, false); else pDoc->InsertTab( nTab, aName ); } @@ -179,7 +179,7 @@ FltError ScQProReader::import( ScDocument *pDoc ) break; case 0x0001: // End of file - SetEof( TRUE ); + SetEof( sal_True ); break; case 0x00ce:{ // Attribute cell diff --git a/sc/source/filter/qpro/qproform.cxx b/sc/source/filter/qpro/qproform.cxx index 0e39d2c7a919..7495199fb704 100644 --- a/sc/source/filter/qpro/qproform.cxx +++ b/sc/source/filter/qpro/qproform.cxx @@ -41,44 +41,44 @@ void QProToSc::ReadSRD( ScSingleRefData& rSRD, sal_Int8 nPage, sal_Int8 nCol, sal_uInt16 nRelBit ) { - UINT16 nTmp = nRelBit & 0x1fff; + sal_uInt16 nTmp = nRelBit & 0x1fff; rSRD.InitAddress( ScAddress( nCol, (~nTmp + 1), 0 ) ); if( nRelBit & 0x4000 ) { rSRD.nRelCol = nCol; - rSRD.SetColRel( TRUE ); + rSRD.SetColRel( sal_True ); } else { rSRD.nCol = nCol; - rSRD.SetColRel( FALSE ); + rSRD.SetColRel( false ); } if( nRelBit & 0x2000 ) { rSRD.nRelRow = (~nTmp + 1); - rSRD.nRelRow = (INT16)(nTmp << 3); + rSRD.nRelRow = (sal_Int16)(nTmp << 3); rSRD.nRelRow /= 8; - rSRD.SetRowRel( TRUE ); + rSRD.SetRowRel( sal_True ); } else { rSRD.nRow = nTmp; - rSRD.SetRowRel( FALSE ); + rSRD.SetRowRel( false ); } if( nRelBit & 0x8000 ) { rSRD.nRelTab = nPage; - rSRD.SetTabRel( TRUE ); + rSRD.SetTabRel( sal_True ); // absolute tab needed in caller for comparison in case of DoubleRef rSRD.nTab = aEingPos.Tab() + nPage; } else { rSRD.nTab = nPage; - rSRD.SetTabRel( FALSE ); + rSRD.SetTabRel( false ); } if (rSRD.nTab != aEingPos.Tab()) - rSRD.SetFlag3D( TRUE); + rSRD.SetFlag3D( sal_True); } QProToSc::QProToSc( SvStream& rStream, const ScAddress& rRefPos ) : @@ -91,15 +91,15 @@ QProToSc::QProToSc( SvStream& rStream, const ScAddress& rRefPos ) : void QProToSc::DoFunc( DefTokenId eOc, sal_uInt16 nArgs, const sal_Char* pExtString ) { TokenId eParam[ nBufSize ]; - INT32 nCount; + sal_Int32 nCount; TokenId nPush, nPush1; - BOOL bAddIn = FALSE; - BOOL bNeg = FALSE; + sal_Bool bAddIn = false; + sal_Bool bNeg = false; if( eOc == ocNoName ) { - bAddIn = TRUE; + bAddIn = sal_True; if( pExtString ) { ByteString s; @@ -327,7 +327,7 @@ ConvErr QProToSc::Convert( const ScTokenArray*& pArray, sal_uInt16 /*nLen*/, con // Sheet name of second corner is not displayed if identical if (aCRD.Ref1.IsFlag3D() && aCRD.Ref1.nTab == aCRD.Ref2.nTab && aCRD.Ref1.IsTabRel() == aCRD.Ref2.IsTabRel()) - aCRD.Ref2.SetFlag3D( FALSE); + aCRD.Ref2.SetFlag3D( false); aStack << aPool.Store( aCRD ); break; diff --git a/sc/source/filter/qpro/qprostyle.cxx b/sc/source/filter/qpro/qprostyle.cxx index 30625483cc54..364fabdb436c 100644 --- a/sc/source/filter/qpro/qprostyle.cxx +++ b/sc/source/filter/qpro/qprostyle.cxx @@ -139,13 +139,13 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, if( nTmp & 0x80 ) { SfxBoolItem aWrapItem( ATTR_LINEBREAK ); - aWrapItem.SetValue( TRUE ); + aWrapItem.SetValue( sal_True ); rItemSet.Put( aWrapItem ); } // Font Attributes sal_uInt16 nTmpFnt = maFontRecord[ maFont[ nStyle ] ]; - BOOL bIsBold, bIsItalic, bIsUnderLine; + sal_Bool bIsBold, bIsItalic, bIsUnderLine; bIsBold = ( nTmpFnt & 0x0001 ) != 0; bIsItalic = ( nTmpFnt & 0x0002 ) != 0; @@ -160,7 +160,7 @@ void ScQProStyle::SetFormat( ScDocument *pDoc, sal_uInt8 nCol, sal_uInt16 nRow, rItemSet.Put( SvxUnderlineItem( UNDERLINE_SINGLE, ATTR_FONT_UNDERLINE ) ); if (maFontHeight[ maFont [ nStyle ] ]) - rItemSet.Put( SvxFontHeightItem( (ULONG) (20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) ); + rItemSet.Put( SvxFontHeightItem( (sal_uLong) (20 * maFontHeight[ maFont[ nStyle ] ] ), 100, ATTR_FONT_HEIGHT ) ); String fntName = maFontType[ maFont[ nStyle ] ]; rItemSet.Put( SvxFontItem( FAMILY_SYSTEM, fntName, EMPTY_STRING, PITCH_DONTKNOW, RTL_TEXTENCODING_DONTKNOW, ATTR_FONT ) ); diff --git a/sc/source/filter/rtf/eeimpars.cxx b/sc/source/filter/rtf/eeimpars.cxx index 08502e94573d..ec01c82efce1 100644 --- a/sc/source/filter/rtf/eeimpars.cxx +++ b/sc/source/filter/rtf/eeimpars.cxx @@ -85,8 +85,8 @@ ScEEImport::ScEEImport( ScDocument* pDocP, const ScRange& rRange ) : const ScPatternAttr* pPattern = mpDoc->GetPattern( maRange.aStart.Col(), maRange.aStart.Row(), maRange.aStart.Tab() ); mpEngine = new ScTabEditEngine( *pPattern, mpDoc->GetEditPool() ); - mpEngine->SetUpdateMode( FALSE ); - mpEngine->EnableUndo( FALSE ); + mpEngine->SetUpdateMode( false ); + mpEngine->EnableUndo( false ); } @@ -99,9 +99,9 @@ ScEEImport::~ScEEImport() } -ULONG ScEEImport::Read( SvStream& rStream, const String& rBaseURL ) +sal_uLong ScEEImport::Read( SvStream& rStream, const String& rBaseURL ) { - ULONG nErr = mpParser->Read( rStream, rBaseURL ); + sal_uLong nErr = mpParser->Read( rStream, rBaseURL ); SCCOL nEndCol; SCROW nEndRow; @@ -128,11 +128,11 @@ ULONG ScEEImport::Read( SvStream& rStream, const String& rBaseURL ) } -void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate ) +void ScEEImport::WriteToDocument( sal_Bool bSizeColsRows, double nOutputFactor, SvNumberFormatter* pFormatter, bool bConvertDate ) { ScProgress* pProgress = new ScProgress( mpDoc->GetDocumentShell(), ScGlobal::GetRscString( STR_LOAD_DOC ), mpParser->ListSize() ); - ULONG nProgress = 0; + sal_uLong nProgress = 0; SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; @@ -147,7 +147,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu nOverlapRowMax = 0; nMergeColAdd = 0; nLastMergedRow = SCROW_MAX; - BOOL bHasGraphics = FALSE; + sal_Bool bHasGraphics = false; ScEEParseEntry* pE; if (!pFormatter) pFormatter = mpDoc->GetFormatTable(); @@ -193,28 +193,28 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu aSet.ClearItem( EE_PARA_JUST ); // Testen, ob einfacher String ohne gemischte Attribute - BOOL bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara ); - for (USHORT nId = EE_CHAR_START; nId <= EE_CHAR_END && bSimple; nId++) + sal_Bool bSimple = ( pE->aSel.nStartPara == pE->aSel.nEndPara ); + for (sal_uInt16 nId = EE_CHAR_START; nId <= EE_CHAR_END && bSimple; nId++) { const SfxPoolItem* pItem = 0; - SfxItemState eState = aSet.GetItemState( nId, TRUE, &pItem ); + SfxItemState eState = aSet.GetItemState( nId, sal_True, &pItem ); if (eState == SFX_ITEM_DONTCARE) - bSimple = FALSE; + bSimple = false; else if (eState == SFX_ITEM_SET) { if ( nId == EE_CHAR_ESCAPEMENT ) // Hoch-/Tiefstellen immer ueber EE { if ( (SvxEscapement)((const SvxEscapementItem*)pItem)->GetEnumValue() != SVX_ESCAPEMENT_OFF ) - bSimple = FALSE; + bSimple = false; } } } if ( bSimple ) { // Feldbefehle enthalten? - SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, FALSE ); + SfxItemState eFieldState = aSet.GetItemState( EE_FEATURE_FIELD, false ); if ( eFieldState == SFX_ITEM_DONTCARE || eFieldState == SFX_ITEM_SET ) - bSimple = FALSE; + bSimple = false; } // HTML @@ -244,43 +244,43 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu if ( rESet.Count() ) { const SfxPoolItem* pItem; - if ( rESet.GetItemState( ATTR_BACKGROUND, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_BACKGROUND, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_BORDER, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_BORDER, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_SHADOW, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_SHADOW, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); // HTML - if ( rESet.GetItemState( ATTR_HOR_JUSTIFY, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_HOR_JUSTIFY, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_VER_JUSTIFY, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_VER_JUSTIFY, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_LINEBREAK, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_LINEBREAK, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_FONT_COLOR, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_COLOR, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); - if ( rESet.GetItemState( ATTR_FONT_UNDERLINE, FALSE, &pItem) == SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_UNDERLINE, false, &pItem) == SFX_ITEM_SET ) rSet.Put( *pItem ); // HTML LATIN/CJK/CTL script type dependent const SfxPoolItem* pFont; - if ( rESet.GetItemState( ATTR_FONT, FALSE, &pFont) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT, false, &pFont) != SFX_ITEM_SET ) pFont = 0; const SfxPoolItem* pHeight; - if ( rESet.GetItemState( ATTR_FONT_HEIGHT, FALSE, &pHeight) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_HEIGHT, false, &pHeight) != SFX_ITEM_SET ) pHeight = 0; const SfxPoolItem* pWeight; - if ( rESet.GetItemState( ATTR_FONT_WEIGHT, FALSE, &pWeight) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_WEIGHT, false, &pWeight) != SFX_ITEM_SET ) pWeight = 0; const SfxPoolItem* pPosture; - if ( rESet.GetItemState( ATTR_FONT_POSTURE, FALSE, &pPosture) != SFX_ITEM_SET ) + if ( rESet.GetItemState( ATTR_FONT_POSTURE, false, &pPosture) != SFX_ITEM_SET ) pPosture = 0; if ( pFont || pHeight || pWeight || pPosture ) { String aStr( mpEngine->GetText( pE->aSel ) ); - BYTE nScriptType = mpDoc->GetStringScriptType( aStr ); - const BYTE nScripts[3] = { SCRIPTTYPE_LATIN, + sal_uInt8 nScriptType = mpDoc->GetStringScriptType( aStr ); + const sal_uInt8 nScripts[3] = { SCRIPTTYPE_LATIN, SCRIPTTYPE_ASIAN, SCRIPTTYPE_COMPLEX }; - for ( BYTE j=0; j<3; ++j ) + for ( sal_uInt8 j=0; j<3; ++j ) { if ( nScriptType & nScripts[j] ) { @@ -327,7 +327,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu const ScStyleSheet* pStyleSheet = mpDoc->GetPattern( nCol, nRow, nTab )->GetStyleSheet(); aAttr.SetStyleSheet( (ScStyleSheet*)pStyleSheet ); - mpDoc->SetPattern( nCol, nRow, nTab, aAttr, TRUE ); + mpDoc->SetPattern( nCol, nRow, nTab, aAttr, sal_True ); // Daten eintragen if (bSimple) @@ -424,7 +424,7 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu pProgress->SetState( nProgress, nEndCol - nStartCol + 1 ); for ( SCCOL nCol = nStartCol; nCol <= nEndCol; nCol++ ) { - USHORT nWidth = (USHORT)(ULONG) pColWidths->Get( nCol ); + sal_uInt16 nWidth = (sal_uInt16)(sal_uLong) pColWidths->Get( nCol ); if ( nWidth ) mpDoc->SetColWidth( nCol, nTab, nWidth ); pProgress->SetState( ++nProgress ); @@ -438,13 +438,13 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu double nPPTY = ScGlobal::nScreenPPTY * (double) aZoom; VirtualDevice aVirtDev; mpDoc->SetOptimalHeight( 0, nEndRow, 0, - static_cast< USHORT >( ScGlobal::nLastRowHeightExtra ), &aVirtDev, - nPPTX, nPPTY, aZoom, aZoom, FALSE ); + static_cast< sal_uInt16 >( ScGlobal::nLastRowHeightExtra ), &aVirtDev, + nPPTX, nPPTY, aZoom, aZoom, false ); if ( mpRowHeights->Count() ) { for ( SCROW nRow = nStartRow; nRow <= nEndRow; nRow++ ) { - USHORT nHeight = (USHORT)(ULONG) mpRowHeights->Get( nRow ); + sal_uInt16 nHeight = (sal_uInt16)(sal_uLong) mpRowHeights->Get( nRow ); if ( nHeight > mpDoc->GetRowHeight( nRow, nTab ) ) mpDoc->SetRowHeight( nRow, nTab, nHeight ); } @@ -470,11 +470,11 @@ void ScEEImport::WriteToDocument( BOOL bSizeColsRows, double nOutputFactor, SvNu } -BOOL ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE ) +sal_Bool ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseEntry* pE ) { if ( !pE->maImageList.size() ) - return FALSE; - BOOL bHasGraphics = FALSE; + return false; + sal_Bool bHasGraphics = false; OutputDevice* pDefaultDev = Application::GetDefaultDevice(); long nWidth, nHeight; nWidth = nHeight = 0; @@ -483,7 +483,7 @@ BOOL ScEEImport::GraphicSize( SCCOL nCol, SCROW nRow, SCTAB /*nTab*/, ScEEParseE { ScHTMLImage* pI = &pE->maImageList[ i ]; if ( pI->pGraphic ) - bHasGraphics = TRUE; + bHasGraphics = sal_True; Size aSizePix = pI->aSize; aSizePix.Width() += 2 * pI->aSpace.X(); aSizePix.Height() += 2 * pI->aSpace.Y(); diff --git a/sc/source/filter/rtf/expbase.cxx b/sc/source/filter/rtf/expbase.cxx index 5b7dd6d9bb4c..ee90ff1b4ec7 100644 --- a/sc/source/filter/rtf/expbase.cxx +++ b/sc/source/filter/rtf/expbase.cxx @@ -64,16 +64,16 @@ ScExportBase::~ScExportBase() } -BOOL ScExportBase::GetDataArea( SCTAB nTab, SCCOL& nStartCol, +sal_Bool ScExportBase::GetDataArea( SCTAB nTab, SCCOL& nStartCol, SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const { pDoc->GetDataStart( nTab, nStartCol, nStartRow ); - pDoc->GetPrintArea( nTab, nEndCol, nEndRow, TRUE ); + pDoc->GetPrintArea( nTab, nEndCol, nEndRow, sal_True ); return TrimDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ); } -BOOL ScExportBase::TrimDataArea( SCTAB nTab, SCCOL& nStartCol, +sal_Bool ScExportBase::TrimDataArea( SCTAB nTab, SCCOL& nStartCol, SCROW& nStartRow, SCCOL& nEndCol, SCROW& nEndRow ) const { while ( nStartCol <= nEndCol && pDoc->ColHidden(nStartCol, nTab)) @@ -87,10 +87,10 @@ BOOL ScExportBase::TrimDataArea( SCTAB nTab, SCCOL& nStartCol, } -BOOL ScExportBase::IsEmptyTable( SCTAB nTab ) const +sal_Bool ScExportBase::IsEmptyTable( SCTAB nTab ) const { if ( !pDoc->HasTable( nTab ) || !pDoc->IsVisible( nTab ) ) - return TRUE; + return sal_True; SCCOL nStartCol, nEndCol; SCROW nStartRow, nEndRow; return !GetDataArea( nTab, nStartCol, nStartRow, nEndCol, nEndRow ); diff --git a/sc/source/filter/rtf/rtfexp.cxx b/sc/source/filter/rtf/rtfexp.cxx index f03a37ecdf5b..8a81b6c97660 100644 --- a/sc/source/filter/rtf/rtfexp.cxx +++ b/sc/source/filter/rtf/rtfexp.cxx @@ -70,7 +70,7 @@ FltError ScFormatFilterPluginImpl::ScExportRTF( SvStream& rStrm, ScDocument* pDo ScRTFExport::ScRTFExport( SvStream& rStrmP, ScDocument* pDocP, const ScRange& rRangeP ) : ScExportBase( rStrmP, pDocP, rRangeP ), - pCellX( new ULONG[ MAXCOL+2 ] ) + pCellX( new sal_uLong[ MAXCOL+2 ] ) { } @@ -81,7 +81,7 @@ ScRTFExport::~ScRTFExport() } -ULONG ScRTFExport::Write() +sal_uLong ScRTFExport::Write() { rStrm << '{' << OOO_STRING_SVTOOLS_RTF_RTF; rStrm << OOO_STRING_SVTOOLS_RTF_ANSI << sNewLine; @@ -104,7 +104,7 @@ void ScRTFExport::WriteTab( SCTAB nTab ) rStrm << '{' << sNewLine; if ( pDoc->HasTable( nTab ) ) { - memset( &pCellX[0], 0, (MAXCOL+2) * sizeof(ULONG) ); + memset( &pCellX[0], 0, (MAXCOL+2) * sizeof(sal_uLong) ); SCCOL nCol; SCCOL nEndCol = aRange.aEnd.Col(); for ( nCol = aRange.aStart.Col(); nCol <= nEndCol; nCol++ ) @@ -162,7 +162,7 @@ void ScRTFExport::WriteRow( SCTAB nTab, SCROW nRow ) } rStrm << OOO_STRING_SVTOOLS_RTF_PARD << OOO_STRING_SVTOOLS_RTF_PLAIN << OOO_STRING_SVTOOLS_RTF_INTBL << sNewLine; - ULONG nStrmPos = rStrm.Tell(); + sal_uLong nStrmPos = rStrm.Tell(); for ( nCol = aRange.aStart.Col(); nCol <= nEndCol; nCol++ ) { WriteCell( nTab, nRow, nCol ); @@ -189,18 +189,18 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) ScBaseCell* pCell; pDoc->GetCell( nCol, nRow, nTab, pCell ); - BOOL bValueData; + sal_Bool bValueData; String aContent; if ( pCell ) { switch ( pCell->GetCellType() ) { case CELLTYPE_NOTE : - bValueData = FALSE; + bValueData = false; break; // nix case CELLTYPE_EDIT : { - bValueData = FALSE; + bValueData = false; EditEngine& rEngine = GetEditEngine(); const EditTextObject* pObj; ((const ScEditCell*)pCell)->GetData( pObj ); @@ -214,17 +214,17 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) default: { bValueData = pCell->HasValueData(); - ULONG nFormat = pAttr->GetNumberFormat( pFormatter ); + sal_uLong nFormat = pAttr->GetNumberFormat( pFormatter ); Color* pColor; ScCellFormat::GetString( pCell, nFormat, aContent, &pColor, *pFormatter ); } } } else - bValueData = FALSE; + bValueData = false; - BOOL bResetPar, bResetAttr; - bResetPar = bResetAttr = FALSE; + sal_Bool bResetPar, bResetAttr; + bResetPar = bResetAttr = false; const SvxHorJustifyItem& rHorJustifyItem = (const SvxHorJustifyItem&)pAttr->GetItem( ATTR_HOR_JUSTIFY ); const SvxWeightItem& rWeightItem = (const SvxWeightItem&) pAttr->GetItem( ATTR_FONT_WEIGHT ); @@ -249,17 +249,17 @@ void ScRTFExport::WriteCell( SCTAB nTab, SCROW nRow, SCCOL nCol ) if ( rWeightItem.GetWeight() >= WEIGHT_BOLD ) { // bold - bResetAttr = TRUE; + bResetAttr = sal_True; rStrm << OOO_STRING_SVTOOLS_RTF_B; } if ( rPostureItem.GetPosture() != ITALIC_NONE ) { // italic - bResetAttr = TRUE; + bResetAttr = sal_True; rStrm << OOO_STRING_SVTOOLS_RTF_I; } if ( rUnderlineItem.GetLineStyle() != UNDERLINE_NONE ) { // underline - bResetAttr = TRUE; + bResetAttr = sal_True; rStrm << OOO_STRING_SVTOOLS_RTF_UL; } diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx index d3db0458bc6a..39044ba2b201 100644 --- a/sc/source/filter/rtf/rtfparse.cxx +++ b/sc/source/filter/rtf/rtfparse.cxx @@ -53,7 +53,7 @@ -SV_IMPL_VARARR_SORT( ScRTFColTwips, ULONG ); +SV_IMPL_VARARR_SORT( ScRTFColTwips, sal_uLong ); @@ -63,9 +63,9 @@ ScRTFParser::ScRTFParser( EditEngine* pEditP ) : pColTwips( new ScRTFColTwips ), pActDefault( NULL ), pDefMerge( NULL ), - nStartAdjust( (ULONG)~0 ), + nStartAdjust( (sal_uLong)~0 ), nLastWidth(0), - bNewDef( FALSE ) + bNewDef( false ) { // RTF default FontSize 12Pt long nMM = OutputDevice::LogicToLogic( 12, MAP_POINT, MAP_100TH_MM ); @@ -84,11 +84,11 @@ ScRTFParser::~ScRTFParser() } -ULONG ScRTFParser::Read( SvStream& rStream, const String& rBaseURL ) +sal_uLong ScRTFParser::Read( SvStream& rStream, const String& rBaseURL ) { Link aOldLink = pEdit->GetImportHdl(); pEdit->SetImportHdl( LINK( this, ScRTFParser, RTFImportHdl ) ); - ULONG nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_RTF ); + sal_uLong nErr = pEdit->Read( rStream, rBaseURL, EE_FORMAT_RTF ); if ( nLastToken == RTF_PAR ) { if ( !maList.empty() ) @@ -132,33 +132,33 @@ inline void ScRTFParser::NextRow() } -BOOL ScRTFParser::SeekTwips( USHORT nTwips, SCCOL* pCol ) +sal_Bool ScRTFParser::SeekTwips( sal_uInt16 nTwips, SCCOL* pCol ) { - USHORT nPos; - BOOL bFound = pColTwips->Seek_Entry( nTwips, &nPos ); + sal_uInt16 nPos; + sal_Bool bFound = pColTwips->Seek_Entry( nTwips, &nPos ); *pCol = static_cast<SCCOL>(nPos); if ( bFound ) - return TRUE; - USHORT nCount = pColTwips->Count(); + return sal_True; + sal_uInt16 nCount = pColTwips->Count(); if ( !nCount ) - return FALSE; + return false; SCCOL nCol = *pCol; // nCol ist Einfuegeposition, da liegt der Naechsthoehere (oder auch nicht) if ( nCol < static_cast<SCCOL>(nCount) && (((*pColTwips)[nCol] - SC_RTFTWIPTOL) <= nTwips) ) - return TRUE; + return sal_True; // nicht kleiner als alles andere? dann mit Naechstniedrigerem vergleichen else if ( nCol != 0 && (((*pColTwips)[nCol-1] + SC_RTFTWIPTOL) >= nTwips) ) { (*pCol)--; - return TRUE; + return sal_True; } - return FALSE; + return false; } void ScRTFParser::ColAdjust() { - if ( nStartAdjust != (ULONG)~0 ) + if ( nStartAdjust != (sal_uLong)~0 ) { SCCOL nCol = 0; ScEEParseEntry* pE; @@ -180,8 +180,8 @@ void ScRTFParser::ColAdjust() if ( nCol > nColMax ) nColMax = nCol; } - nStartAdjust = (ULONG)~0; - pColTwips->Remove( (USHORT)0, pColTwips->Count() ); + nStartAdjust = (sal_uLong)~0; + pColTwips->Remove( (sal_uInt16)0, pColTwips->Count() ); } } @@ -237,7 +237,7 @@ void ScRTFParser::NewCellRow( ImportInfo* /*pInfo*/ ) if ( bNewDef ) { ScRTFCellDefault* pD; - bNewDef = FALSE; + bNewDef = false; // rechts nicht buendig? => neue Tabelle if ( nLastWidth && ( (pD = &(pDefaultList->back())) != 0 ) @@ -328,7 +328,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo ) break; case RTF_CELLX: // closes cell default { - bNewDef = TRUE; + bNewDef = sal_True; pInsDefault->nCol = nColCnt; pInsDefault->nTwips = pInfo->nTokenValue; // rechter Zellenrand pDefaultList->push_back( pInsDefault ); @@ -367,7 +367,7 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo ) pActEntry->aItemSet.Set( pActDefault->aItemSet ); EntryEnd( pActEntry, pInfo->aSelection ); - if ( nStartAdjust == (ULONG)~0 ) + if ( nStartAdjust == (sal_uLong)~0 ) nStartAdjust = maList.size(); maList.push_back( pActEntry ); NewActEntry( pActEntry ); // neuer freifliegender pActEntry @@ -417,11 +417,11 @@ void ScRTFParser::ProcToken( ImportInfo* pInfo ) { case RTF_SHADINGDEF: ((SvxRTFParser*)pInfo->pParser)->ReadBackgroundAttr( - pInfo->nToken, pInsDefault->aItemSet, TRUE ); + pInfo->nToken, pInsDefault->aItemSet, sal_True ); break; case RTF_BRDRDEF: ((SvxRTFParser*)pInfo->pParser)->ReadBorderAttr( - pInfo->nToken, pInsDefault->aItemSet, TRUE ); + pInfo->nToken, pInsDefault->aItemSet, sal_True ); break; } } diff --git a/sc/source/filter/starcalc/scflt.cxx b/sc/source/filter/starcalc/scflt.cxx index 81e219a1575b..fbb81b220ae0 100644 --- a/sc/source/filter/starcalc/scflt.cxx +++ b/sc/source/filter/starcalc/scflt.cxx @@ -125,7 +125,7 @@ void lcl_ReadRGB(SvStream& rStream, Sc10Color& rColor) void lcl_ReadPalette(SvStream& rStream, Sc10Color* pPalette) { - for (USHORT i = 0; i < 16; i++) + for (sal_uInt16 i = 0; i < 16; i++) lcl_ReadRGB(rStream, pPalette[i]); } @@ -294,7 +294,7 @@ void lcl_ReadChartTypeData(SvStream& rStream, Sc10ChartTypeData& rTypeData) rStream >> rTypeData.GraphStyle; rStream.Read(&rTypeData.GraphTitle, sizeof(rTypeData.GraphTitle)); rStream.Read(&rTypeData.BottomTitle, sizeof(rTypeData.BottomTitle)); - USHORT i; + sal_uInt16 i; for (i = 0; i < 256; i++) rStream >> rTypeData.SymbolData[i]; for (i = 0; i < 256; i++) @@ -348,7 +348,7 @@ double lcl_PascalToDouble(sal_Char* tp6) } -void lcl_ChangeColor( USHORT nIndex, Color& rColor ) +void lcl_ChangeColor( sal_uInt16 nIndex, Color& rColor ) { ColorData aCol; @@ -375,7 +375,7 @@ void lcl_ChangeColor( USHORT nIndex, Color& rColor ) rColor.SetColor( aCol ); } -String lcl_MakeOldPageStyleFormatName( USHORT i ) +String lcl_MakeOldPageStyleFormatName( sal_uInt16 i ) { String aName = ScGlobal::GetRscString( STR_PAGESTYLE ); aName.AppendAscii( " " ); @@ -393,7 +393,7 @@ Sc10FontData::Sc10FontData(SvStream& rStream) rStream >> Height; rStream >> CharSet; rStream >> PitchAndFamily; - USHORT nLen; + sal_uInt16 nLen; rStream >> nLen; rStream.Read(FaceName, nLen); } @@ -403,13 +403,13 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) : ScCollection (4, 4), nError (0) { - USHORT ID; + sal_uInt16 ID; rStream >> ID; if (ID == FontID) { - USHORT nAnz; + sal_uInt16 nAnz; rStream >> nAnz; - for (USHORT i=0; (i < nAnz) && (nError == 0); i++) + for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { Insert(new Sc10FontData(rStream)); nError = rStream.GetError(); @@ -428,7 +428,7 @@ Sc10FontCollection::Sc10FontCollection(SvStream& rStream) : Sc10NameData::Sc10NameData(SvStream& rStream) { - BYTE nLen; + sal_uInt8 nLen; rStream >> nLen; rStream.Read(Name, sizeof(Name) - 1); Name[nLen] = 0; @@ -444,13 +444,13 @@ Sc10NameCollection::Sc10NameCollection(SvStream& rStream) : ScCollection (4, 4), nError (0) { - USHORT ID; + sal_uInt16 ID; rStream >> ID; if (ID == NameID) { - USHORT nAnz; + sal_uInt16 nAnz; rStream >> nAnz; - for (USHORT i=0; (i < nAnz) && (nError == 0); i++) + for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { Insert(new Sc10NameData(rStream)); nError = rStream.GetError(); @@ -489,13 +489,13 @@ Sc10PatternCollection::Sc10PatternCollection(SvStream& rStream) : ScCollection (4, 4), nError (0) { - USHORT ID; + sal_uInt16 ID; rStream >> ID; if (ID == PatternID) { - USHORT nAnz; + sal_uInt16 nAnz; rStream >> nAnz; - for (USHORT i=0; (i < nAnz) && (nError == 0); i++) + for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { Insert(new Sc10PatternData(rStream)); nError = rStream.GetError(); @@ -552,14 +552,14 @@ Sc10DataBaseCollection::Sc10DataBaseCollection(SvStream& rStream) : ScCollection (4, 4), nError (0) { - USHORT ID; + sal_uInt16 ID; rStream >> ID; if (ID == DataBaseID) { rStream.Read(ActName, sizeof(ActName)); - USHORT nAnz; + sal_uInt16 nAnz; rStream >> nAnz; - for (USHORT i=0; (i < nAnz) && (nError == 0); i++) + for (sal_uInt16 i=0; (i < nAnz) && (nError == 0); i++) { Insert(new Sc10DataBaseData(rStream)); nError = rStream.GetError(); @@ -646,9 +646,9 @@ int Sc10PageFormat::operator==( const Sc10PageFormat& rData ) const } -USHORT Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData ) +sal_uInt16 Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData ) { - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) if (At(i)->aPageFormat == rData) return i; @@ -658,15 +658,15 @@ USHORT Sc10PageCollection::InsertFormat( const Sc10PageFormat& rData ) } -static inline UINT8 GetMixedCol( const UINT8 nB, const UINT8 nF, const UINT16 nFak ) +static inline sal_uInt8 GetMixedCol( const sal_uInt8 nB, const sal_uInt8 nF, const sal_uInt16 nFak ) { - INT32 nT = nB - nF; - nT *= ( INT32 ) nFak; + sal_Int32 nT = nB - nF; + nT *= ( sal_Int32 ) nFak; nT /= 0xFFFF; nT += nF; - return ( UINT8 ) nT; + return ( sal_uInt8 ) nT; } -static inline Color GetMixedColor( const Color& rFore, const Color& rBack, UINT16 nFact ) +static inline Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt16 nFact ) { return Color( GetMixedCol( rBack.GetRed(), rFore.GetRed(), nFact ), GetMixedCol( rBack.GetGreen(), rFore.GetGreen(), nFact ), @@ -680,7 +680,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) EditEngine aEditEngine( pDoc->GetEnginePool() ); EditTextObject* pEmptyObject = aEditEngine.CreateTextObject(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { Sc10PageFormat* pPage = &At(i)->aPageFormat; @@ -703,7 +703,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) SfxItemSet* pSet = &pSheet->GetItemSet(); - for (USHORT nHeadFoot=0; nHeadFoot<2; nHeadFoot++) + for (sal_uInt16 nHeadFoot=0; nHeadFoot<2; nHeadFoot++) { Sc10HeadFootLine* pHeadFootLine = nHeadFoot ? &pPage->FootLine : &pPage->HeadLine; @@ -778,11 +778,11 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) nColor = pHeadFootLine->RasterColor; Color aRColor( nColor.Red, nColor.Green, nColor.Blue ); - UINT16 nFact; - BOOL bSwapCol = FALSE; + sal_uInt16 nFact; + sal_Bool bSwapCol = false; switch (pHeadFootLine->Raster) { - case raNone: nFact = 0xffff; bSwapCol = TRUE; break; + case raNone: nFact = 0xffff; bSwapCol = sal_True; break; case raGray12: nFact = (0xffff / 100) * 12; break; case raGray25: nFact = (0xffff / 100) * 25; break; case raGray50: nFact = (0xffff / 100) * 50; break; @@ -796,14 +796,14 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) if (pHeadFootLine->Frame != 0) { - USHORT nLeft = 0; - USHORT nTop = 0; - USHORT nRight = 0; - USHORT nBottom = 0; - USHORT fLeft = (pHeadFootLine->Frame & 0x000F); - USHORT fTop = (pHeadFootLine->Frame & 0x00F0) / 0x0010; - USHORT fRight = (pHeadFootLine->Frame & 0x0F00) / 0x0100; - USHORT fBottom = (pHeadFootLine->Frame & 0xF000) / 0x1000; + sal_uInt16 nLeft = 0; + sal_uInt16 nTop = 0; + sal_uInt16 nRight = 0; + sal_uInt16 nBottom = 0; + sal_uInt16 fLeft = (pHeadFootLine->Frame & 0x000F); + sal_uInt16 fTop = (pHeadFootLine->Frame & 0x00F0) / 0x0010; + sal_uInt16 fRight = (pHeadFootLine->Frame & 0x0F00) / 0x0100; + sal_uInt16 fBottom = (pHeadFootLine->Frame & 0xF000) / 0x1000; if (fLeft > 1) nLeft = 50; else if (fLeft > 0) @@ -824,10 +824,10 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) Color ColorTop(COL_BLACK); Color ColorRight(COL_BLACK); Color ColorBottom(COL_BLACK); - USHORT cLeft = (pHeadFootLine->FrameColor & 0x000F); - USHORT cTop = (pHeadFootLine->FrameColor & 0x00F0) >> 4; - USHORT cRight = (pHeadFootLine->FrameColor & 0x0F00) >> 8; - USHORT cBottom = (pHeadFootLine->FrameColor & 0xF000) >> 12; + sal_uInt16 cLeft = (pHeadFootLine->FrameColor & 0x000F); + sal_uInt16 cTop = (pHeadFootLine->FrameColor & 0x00F0) >> 4; + sal_uInt16 cRight = (pHeadFootLine->FrameColor & 0x0F00) >> 8; + sal_uInt16 cBottom = (pHeadFootLine->FrameColor & 0xF000) >> 12; lcl_ChangeColor(cLeft, ColorLeft); lcl_ChangeColor(cTop, ColorTop); lcl_ChangeColor(cRight, ColorRight); @@ -857,9 +857,9 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) else aSetItemItemSet.Put( SvxSizeItem( ATTR_PAGE_SIZE, Size( 0, pPage->Bottom - pPage->Foot ) ) ); - aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_ON, TRUE )); - aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_DYNAMIC, FALSE )); - aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, TRUE )); + aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_ON, sal_True )); + aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_DYNAMIC, false )); + aSetItemItemSet.Put(SfxBoolItem( ATTR_PAGE_SHARED, sal_True )); pSet->Put( SvxSetItem( nHeadFoot ? ATTR_PAGE_FOOTERSET : ATTR_PAGE_HEADERSET, aSetItemItemSet ) ); @@ -917,7 +917,7 @@ void Sc10PageCollection::PutToDoc( ScDocument* pDoc ) pSet->Put( ScViewObjectModeItem( ATTR_PAGE_OBJECTS, VOBJ_MODE_SHOW ) ); pSet->Put( ScViewObjectModeItem( ATTR_PAGE_DRAWINGS, VOBJ_MODE_SHOW ) ); pSet->Put( SfxUInt16Item( ATTR_PAGE_SCALE, - (UINT16)( lcl_PascalToDouble( pPage->PrnZoom ) * 100 ) ) ); + (sal_uInt16)( lcl_PascalToDouble( pPage->PrnZoom ) * 100 ) ) ); pSet->Put( SfxUInt16Item( ATTR_PAGE_FIRSTPAGENO, 1 ) ); pSet->Put( SvxSizeItem( ATTR_PAGE_SIZE, Size( pPage->Width, pPage->Height ) ) ); @@ -967,7 +967,7 @@ Sc10Import::~Sc10Import() } -ULONG Sc10Import::Import() +sal_uLong Sc10Import::Import() { pPrgrsBar = new ScfStreamProgressBar( rStream, pDoc->GetDocumentShell() ); @@ -1066,10 +1066,10 @@ void Sc10Import::LoadProtect() void Sc10Import::LoadViewColRowBar() { - BYTE ViewColRowBar; + sal_uInt8 ViewColRowBar; rStream >> ViewColRowBar; nError = rStream.GetError(); - aSc30ViewOpt.SetOption( VOPT_HEADER, (BOOL)ViewColRowBar ); + aSc30ViewOpt.SetOption( VOPT_HEADER, (sal_Bool)ViewColRowBar ); } @@ -1109,7 +1109,7 @@ void Sc10Import::ImportNameCollection() { ScRangeName* pRN = pDoc->GetRangeName(); - for (USHORT i = 0; i < pNameCollection->GetCount(); i++) + for (sal_uInt16 i = 0; i < pNameCollection->GetCount(); i++) { Sc10NameData* pName = pNameCollection->At( i ); pRN->insert( @@ -1123,7 +1123,7 @@ void Sc10Import::LoadPatternCollection() { pPatternCollection = new Sc10PatternCollection( rStream ); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); - for( USHORT i = 0 ; i < pPatternCollection->GetCount() ; i++ ) + for( sal_uInt16 i = 0 ; i < pPatternCollection->GetCount() ; i++ ) { Sc10PatternData* pPattern = pPatternCollection->At( i ); String aName( pPattern->Name, DEFCHARSET ); @@ -1174,10 +1174,10 @@ void Sc10Import::LoadPatternCollection() // Ausrichtung if( ( pPattern->FormatFlags & pfJustify ) == pfJustify ) { - USHORT HorJustify = ( pPattern->Justify & 0x000F ); - USHORT VerJustify = ( pPattern->Justify & 0x00F0 ) >> 4; - USHORT OJustify = ( pPattern->Justify & 0x0F00 ) >> 8; - USHORT EJustify = ( pPattern->Justify & 0xF000 ) >> 12; + sal_uInt16 HorJustify = ( pPattern->Justify & 0x000F ); + sal_uInt16 VerJustify = ( pPattern->Justify & 0x00F0 ) >> 4; + sal_uInt16 OJustify = ( pPattern->Justify & 0x0F00 ) >> 8; + sal_uInt16 EJustify = ( pPattern->Justify & 0xF000 ) >> 12; if( HorJustify != 0 ) switch( HorJustify ) { @@ -1206,13 +1206,13 @@ void Sc10Import::LoadPatternCollection() } if( ( OJustify & ojWordBreak ) == ojWordBreak ) - rItemSet.Put( SfxBoolItem( TRUE ) ); + rItemSet.Put( SfxBoolItem( sal_True ) ); if( ( OJustify & ojBottomTop ) == ojBottomTop ) rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); else if( ( OJustify & ojTopBottom ) == ojTopBottom ) rItemSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); - INT16 Margin = Max( ( USHORT ) 20, ( USHORT ) ( EJustify * 20 ) ); + INT16 Margin = Max( ( sal_uInt16 ) 20, ( sal_uInt16 ) ( EJustify * 20 ) ); if( ( ( OJustify & ojBottomTop ) == ojBottomTop ) ) rItemSet.Put( SvxMarginItem( 20, Margin, 20, Margin, ATTR_MARGIN ) ); else @@ -1224,14 +1224,14 @@ void Sc10Import::LoadPatternCollection() { if( pPattern->Frame != 0 ) { - USHORT nLeft = 0; - USHORT nTop = 0; - USHORT nRight = 0; - USHORT nBottom = 0; - USHORT fLeft = ( pPattern->Frame & 0x000F ); - USHORT fTop = ( pPattern->Frame & 0x00F0 ) / 0x0010; - USHORT fRight = ( pPattern->Frame & 0x0F00 ) / 0x0100; - USHORT fBottom = ( pPattern->Frame & 0xF000 ) / 0x1000; + sal_uInt16 nLeft = 0; + sal_uInt16 nTop = 0; + sal_uInt16 nRight = 0; + sal_uInt16 nBottom = 0; + sal_uInt16 fLeft = ( pPattern->Frame & 0x000F ); + sal_uInt16 fTop = ( pPattern->Frame & 0x00F0 ) / 0x0010; + sal_uInt16 fRight = ( pPattern->Frame & 0x0F00 ) / 0x0100; + sal_uInt16 fBottom = ( pPattern->Frame & 0xF000 ) / 0x1000; if( fLeft > 1 ) nLeft = 50; @@ -1258,10 +1258,10 @@ void Sc10Import::LoadPatternCollection() Color ColorRight( COL_BLACK ); Color ColorBottom( COL_BLACK ); - USHORT cLeft = ( pPattern->FrameColor & 0x000F ); - USHORT cTop = ( pPattern->FrameColor & 0x00F0 ) >> 4; - USHORT cRight = ( pPattern->FrameColor & 0x0F00 ) >> 8; - USHORT cBottom = ( pPattern->FrameColor & 0xF000 ) >> 12; + sal_uInt16 cLeft = ( pPattern->FrameColor & 0x000F ); + sal_uInt16 cTop = ( pPattern->FrameColor & 0x00F0 ) >> 4; + sal_uInt16 cRight = ( pPattern->FrameColor & 0x0F00 ) >> 8; + sal_uInt16 cBottom = ( pPattern->FrameColor & 0xF000 ) >> 12; lcl_ChangeColor( cLeft, ColorLeft ); lcl_ChangeColor( cTop, ColorTop ); @@ -1291,8 +1291,8 @@ void Sc10Import::LoadPatternCollection() { if( pPattern->Raster != 0 ) { - USHORT nBColor = ( pPattern->nColor & 0x00F0 ) >> 4; - USHORT nRColor = ( pPattern->nColor & 0x0F00 ) >> 8; + sal_uInt16 nBColor = ( pPattern->nColor & 0x00F0 ) >> 4; + sal_uInt16 nRColor = ( pPattern->nColor & 0x0F00 ) >> 8; Color aBColor( COL_BLACK ); lcl_ChangeColor( nBColor, aBColor ); @@ -1304,12 +1304,12 @@ void Sc10Import::LoadPatternCollection() Color aRColor( COL_BLACK ); lcl_ChangeColor( nRColor, aRColor ); - UINT16 nFact; - BOOL bSwapCol = FALSE; - BOOL bSetItem = TRUE; + sal_uInt16 nFact; + sal_Bool bSwapCol = false; + sal_Bool bSetItem = sal_True; switch (pPattern->Raster) { - case raNone: nFact = 0xffff; bSwapCol = TRUE; bSetItem = (nBColor > 0); break; + case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break; case raGray12: nFact = (0xffff / 100) * 12; break; case raGray25: nFact = (0xffff / 100) * 25; break; case raGray50: nFact = (0xffff / 100) * 50; break; @@ -1329,19 +1329,19 @@ void Sc10Import::LoadPatternCollection() if( ( pPattern->ValueFormat.Format != 0 ) && ( ( pPattern->FormatFlags & pfValue ) == pfValue ) ) { - ULONG nKey = 0; + sal_uLong nKey = 0; ChangeFormat( pPattern->ValueFormat.Format, pPattern->ValueFormat.Info, nKey ); - rItemSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, ( UINT32 ) nKey ) ); + rItemSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, ( sal_uInt32 ) nKey ) ); } // Zellattribute (Schutz, Versteckt...) if( ( pPattern->Flags != 0 ) && ( ( pPattern->FormatFlags & pfProtection ) == pfProtection ) ) { - BOOL bProtect = ( ( pPattern->Flags & paProtect ) == paProtect ); - BOOL bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula ); - BOOL bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll ); - BOOL bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint ); + sal_Bool bProtect = ( ( pPattern->Flags & paProtect ) == paProtect ); + sal_Bool bHFormula = ( ( pPattern->Flags & paHideFormula ) == paHideFormula ); + sal_Bool bHCell = ( ( pPattern->Flags & paHideAll ) == paHideAll ); + sal_Bool bHPrint = ( ( pPattern->Flags & paHidePrint ) == paHidePrint ); rItemSet.Put( ScProtectionAttr( bProtect, bHFormula, bHCell, bHPrint ) ); } } // if Style != 0 @@ -1352,7 +1352,7 @@ void Sc10Import::LoadPatternCollection() void Sc10Import::LoadDataBaseCollection() { pDataBaseCollection = new Sc10DataBaseCollection(rStream); - for( USHORT i = 0 ; i < pDataBaseCollection->GetCount() ; i++ ) + for( sal_uInt16 i = 0 ; i < pDataBaseCollection->GetCount() ; i++ ) { Sc10DataBaseData* pOldData = pDataBaseCollection->At(i); ScDBData* pNewData = new ScDBData( SC10TOSTRING( pOldData->DataBaseRec.Name ), @@ -1361,8 +1361,8 @@ void Sc10Import::LoadDataBaseCollection() ( SCROW ) pOldData->DataBaseRec.Block.y1, ( SCCOL ) pOldData->DataBaseRec.Block.x2, ( SCROW ) pOldData->DataBaseRec.Block.y2, - TRUE, - ( BOOL) pOldData->DataBaseRec.RowHeader ); + sal_True, + ( sal_Bool) pOldData->DataBaseRec.RowHeader ); pDoc->GetDBCollection()->Insert( pNewData ); } } @@ -1372,30 +1372,30 @@ void Sc10Import::LoadTables() { Sc10PageCollection aPageCollection; - INT16 nTabCount; + sal_Int16 nTabCount; rStream >> nTabCount; - for (INT16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++) + for (sal_Int16 Tab = 0; (Tab < nTabCount) && (nError == 0); Tab++) { Sc10PageFormat PageFormat; - INT16 DataBaseIndex; + sal_Int16 DataBaseIndex; Sc10TableProtect TabProtect; - INT16 TabNo; + sal_Int16 TabNo; sal_Char TabName[128]; - USHORT Display; - BYTE Visible; - USHORT ID; - USHORT DataCount; - USHORT DataStart; - USHORT DataEnd; - USHORT DataValue; - USHORT Count; - USHORT i; + sal_uInt16 Display; + sal_uInt8 Visible; + sal_uInt16 ID; + sal_uInt16 DataCount; + sal_uInt16 DataStart; + sal_uInt16 DataEnd; + sal_uInt16 DataValue; + sal_uInt16 Count; + sal_uInt16 i; String aStr; // Universal-Konvertierungs-String lcl_ReadPageFormat(rStream, PageFormat); - USHORT nAt = aPageCollection.InsertFormat(PageFormat); + sal_uInt16 nAt = aPageCollection.InsertFormat(PageFormat); String aPageName = lcl_MakeOldPageStyleFormatName( nAt ); pPrgrsBar->Progress(); @@ -1411,7 +1411,7 @@ void Sc10Import::LoadTables() rStream >> TabNo; - BYTE nLen; + sal_uInt8 nLen; rStream >> nLen; rStream.Read(TabName, sizeof(TabName) - 1); TabName[nLen] = 0; @@ -1419,7 +1419,7 @@ void Sc10Import::LoadTables() //---------------------------------------------------------- rStream >> Display; - if ( Tab == (INT16)nShowTab ) + if ( Tab == (sal_Int16)nShowTab ) { ScVObjMode eObjMode = VOBJ_MODE_SHOW; @@ -1427,10 +1427,10 @@ void Sc10Import::LoadTables() aSc30ViewOpt.SetOption( VOPT_NULLVALS, IS_SET(dfZerro,Display) ); aSc30ViewOpt.SetOption( VOPT_SYNTAX, IS_SET(dfSyntax,Display) ); aSc30ViewOpt.SetOption( VOPT_NOTES, IS_SET(dfNoteMark,Display) ); - aSc30ViewOpt.SetOption( VOPT_VSCROLL, TRUE ); - aSc30ViewOpt.SetOption( VOPT_HSCROLL, TRUE ); - aSc30ViewOpt.SetOption( VOPT_TABCONTROLS, TRUE ); - aSc30ViewOpt.SetOption( VOPT_OUTLINER, TRUE ); + aSc30ViewOpt.SetOption( VOPT_VSCROLL, sal_True ); + aSc30ViewOpt.SetOption( VOPT_HSCROLL, sal_True ); + aSc30ViewOpt.SetOption( VOPT_TABCONTROLS, sal_True ); + aSc30ViewOpt.SetOption( VOPT_OUTLINER, sal_True ); aSc30ViewOpt.SetOption( VOPT_GRID, IS_SET(dfGrid,Display) ); // VOPT_HEADER wird in LoadViewColRowBar() gesetzt @@ -1454,13 +1454,13 @@ void Sc10Import::LoadTables() if (nError != 0) return; if (TabNo == 0) - pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), FALSE); + pDoc->RenameTab(static_cast<SCTAB> (TabNo), SC10TOSTRING( TabName ), false); else pDoc->InsertTab(SC_TAB_APPEND, SC10TOSTRING( TabName ) ); pDoc->SetPageStyle( static_cast<SCTAB>(Tab), aPageName ); - if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), FALSE); + if (Visible == 0) pDoc->SetVisible(static_cast<SCTAB> (TabNo), false); // ColWidth rStream >> ID; @@ -1588,13 +1588,13 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) { LoadColAttr(Col, Tab); - USHORT CellCount; - BYTE CellType; - USHORT Row; + sal_uInt16 CellCount; + sal_uInt8 CellType; + sal_uInt16 Row; rStream >> CellCount; SCROW nScCount = static_cast< SCROW >( CellCount ); if (nScCount > MAXROW) nError = errUnknownFormat; - for (USHORT i = 0; (i < CellCount) && (nError == 0); i++) + for (sal_uInt16 i = 0; (i < CellCount) && (nError == 0); i++) { rStream >> CellType; rStream >> Row; @@ -1606,7 +1606,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) case ctValue : { const SfxPoolItem* pValueFormat = pDoc->GetAttr(Col, static_cast<SCROW> (Row), Tab, ATTR_VALUE_FORMAT); - ULONG nFormat = ((SfxUInt32Item*)pValueFormat)->GetValue(); + sal_uLong nFormat = ((SfxUInt32Item*)pValueFormat)->GetValue(); double Value = ScfTools::ReadLongDouble(rStream); //rStream.Read(&Value, sizeof(Value)); @@ -1621,7 +1621,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) } case ctString : { - BYTE Len; + sal_uInt8 Len; sal_Char s[256]; rStream >> Len; rStream.Read(s, Len); @@ -1633,7 +1633,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) case ctFormula : { /*double Value =*/ ScfTools::ReadLongDouble(rStream); - BYTE Len; + sal_uInt8 Len; sal_Char s[256]; rStream >> Len; rStream.Read(&s[1], Len); @@ -1641,7 +1641,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) s[Len + 1] = 0; ScFormulaCell* pCell = new ScFormulaCell( pDoc, ScAddress( Col, static_cast<SCROW> (Row), Tab ) ); pCell->SetHybridFormula( SC10TOSTRING( s ),formula::FormulaGrammar::GRAM_NATIVE ); - pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (BOOL)TRUE ); + pDoc->PutCell( Col, static_cast<SCROW> (Row), Tab, pCell, (sal_Bool)sal_True ); break; } case ctNote : @@ -1650,7 +1650,7 @@ void Sc10Import::LoadCol(SCCOL Col, SCTAB Tab) nError = errUnknownFormat; break; } - USHORT NoteLen; + sal_uInt16 NoteLen; rStream >> NoteLen; if (NoteLen != 0) { @@ -1696,9 +1696,9 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) { SCROW nStart; SCROW nEnd; - USHORT i; - UINT16 nLimit; - UINT16 nValue1; + sal_uInt16 i; + sal_uInt16 nLimit; + sal_uInt16 nValue1; Sc10ColData *pColData; // Font (Name, Groesse) @@ -1788,10 +1788,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) if ((nStart <= nEnd) && (nValue1)) { ScPatternAttr aScPattern(pDoc->GetPool()); - USHORT HorJustify = (nValue1 & 0x000F); - USHORT VerJustify = (nValue1 & 0x00F0) >> 4; - USHORT OJustify = (nValue1 & 0x0F00) >> 8; - USHORT EJustify = (nValue1 & 0xF000) >> 12; + sal_uInt16 HorJustify = (nValue1 & 0x000F); + sal_uInt16 VerJustify = (nValue1 & 0x00F0) >> 4; + sal_uInt16 OJustify = (nValue1 & 0x0F00) >> 8; + sal_uInt16 EJustify = (nValue1 & 0xF000) >> 12; switch (HorJustify) { @@ -1820,13 +1820,13 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) } if (OJustify & ojWordBreak) - aScPattern.GetItemSet().Put(SfxBoolItem(TRUE)); + aScPattern.GetItemSet().Put(SfxBoolItem(sal_True)); if (OJustify & ojBottomTop) aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,9000)); else if (OJustify & ojTopBottom) aScPattern.GetItemSet().Put(SfxInt32Item(ATTR_ROTATE_VALUE,27000)); - INT16 Margin = Max((USHORT)20, (USHORT)(EJustify * 20)); + sal_Int16 Margin = Max((sal_uInt16)20, (sal_uInt16)(EJustify * 20)); if (((OJustify & ojBottomTop) == ojBottomTop) || ((OJustify & ojBottomTop) == ojBottomTop)) aScPattern.GetItemSet().Put(SvxMarginItem(20, Margin, 20, Margin, ATTR_MARGIN)); else @@ -1836,15 +1836,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nStart = nEnd + 1; } // Umrandung - BOOL bEnd = FALSE; - USHORT nColorIndex = 0; - USHORT nFrameIndex = 0; + sal_Bool bEnd = false; + sal_uInt16 nColorIndex = 0; + sal_uInt16 nFrameIndex = 0; // Special Fix... - const UINT32 nHelpMeStart = 100; - UINT32 nHelpMe = nHelpMeStart; - USHORT nColorIndexOld = nColorIndex; - USHORT nFrameIndexOld = nColorIndex; + const sal_uInt32 nHelpMeStart = 100; + sal_uInt32 nHelpMe = nHelpMeStart; + sal_uInt16 nColorIndexOld = nColorIndex; + sal_uInt16 nFrameIndexOld = nColorIndex; nEnd = 0; nStart = 0; @@ -1852,15 +1852,15 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) { pColData = &aFrame.pData[ nFrameIndex ]; - USHORT nValue = pColData->Value; - USHORT nLeft = 0; - USHORT nTop = 0; - USHORT nRight = 0; - USHORT nBottom = 0; - USHORT fLeft = ( nValue & 0x000F ); - USHORT fTop = ( nValue & 0x00F0 ) >> 4; - USHORT fRight = ( nValue & 0x0F00 ) >> 8; - USHORT fBottom = ( nValue & 0xF000 ) >> 12; + sal_uInt16 nValue = pColData->Value; + sal_uInt16 nLeft = 0; + sal_uInt16 nTop = 0; + sal_uInt16 nRight = 0; + sal_uInt16 nBottom = 0; + sal_uInt16 fLeft = ( nValue & 0x000F ); + sal_uInt16 fTop = ( nValue & 0x00F0 ) >> 4; + sal_uInt16 fRight = ( nValue & 0x0F00 ) >> 8; + sal_uInt16 fBottom = ( nValue & 0xF000 ) >> 12; if( fLeft > 1 ) nLeft = 50; @@ -1886,12 +1886,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) Color ColorTop( COL_BLACK ); Color ColorRight( COL_BLACK ); Color ColorBottom( COL_BLACK ); - USHORT nFrmColVal = aFrameColor.pData[ nColorIndex ].Value; + sal_uInt16 nFrmColVal = aFrameColor.pData[ nColorIndex ].Value; SCROW nFrmColRow = static_cast<SCROW>(aFrameColor.pData[ nColorIndex ].Row); - USHORT cLeft = ( nFrmColVal & 0x000F ); - USHORT cTop = ( nFrmColVal & 0x00F0 ) >> 4; - USHORT cRight = ( nFrmColVal & 0x0F00 ) >> 8; - USHORT cBottom = ( nFrmColVal & 0xF000 ) >> 12; + sal_uInt16 cLeft = ( nFrmColVal & 0x000F ); + sal_uInt16 cTop = ( nFrmColVal & 0x00F0 ) >> 4; + sal_uInt16 cRight = ( nFrmColVal & 0x0F00 ) >> 8; + sal_uInt16 cBottom = ( nFrmColVal & 0xF000 ) >> 12; lcl_ChangeColor( cLeft, ColorLeft ); lcl_ChangeColor( cTop, ColorTop ); @@ -1962,20 +1962,20 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) // ACHTUNG: Code bis hier ueberarbeitet ... jetzt hab' ich keinen Bock mehr! (GT) // Hintergrund (Farbe, Raster) - USHORT nRasterIndex = 0; - bEnd = FALSE; + sal_uInt16 nRasterIndex = 0; + bEnd = false; nColorIndex = 0; nEnd = 0; nStart = 0; // Special Fix... nHelpMe = nHelpMeStart; - USHORT nRasterIndexOld = nRasterIndex; + sal_uInt16 nRasterIndexOld = nRasterIndex; while( !bEnd && nHelpMe ) { - USHORT nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4; - USHORT nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8; + sal_uInt16 nBColor = ( aColor.pData[ nColorIndex ].Value & 0x00F0 ) >> 4; + sal_uInt16 nRColor = ( aColor.pData[ nColorIndex ].Value & 0x0F00 ) >> 8; Color aBColor( COL_BLACK ); lcl_ChangeColor( nBColor, aBColor ); @@ -1991,12 +1991,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) ScPatternAttr aScPattern( pDoc->GetPool() ); - UINT16 nFact; - BOOL bSwapCol = FALSE; - BOOL bSetItem = TRUE; + sal_uInt16 nFact; + sal_Bool bSwapCol = false; + sal_Bool bSetItem = sal_True; switch ( aRaster.pData[ nRasterIndex ].Value ) { - case raNone: nFact = 0xffff; bSwapCol = TRUE; bSetItem = (nBColor > 0); break; + case raNone: nFact = 0xffff; bSwapCol = sal_True; bSetItem = (nBColor > 0); break; case raGray12: nFact = (0xffff / 100) * 12; break; case raGray25: nFact = (0xffff / 100) * 25; break; case raGray50: nFact = (0xffff / 100) * 50; break; @@ -2060,12 +2060,12 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nValue1 = pColData->Value; if ((nStart <= nEnd) && (nValue1)) { - ULONG nKey = 0; - USHORT nFormat = (nValue1 & 0x00FF); - USHORT nInfo = (nValue1 & 0xFF00) >> 8; + sal_uLong nKey = 0; + sal_uInt16 nFormat = (nValue1 & 0x00FF); + sal_uInt16 nInfo = (nValue1 & 0xFF00) >> 8; ChangeFormat(nFormat, nInfo, nKey); ScPatternAttr aScPattern(pDoc->GetPool()); - aScPattern.GetItemSet().Put(SfxUInt32Item(ATTR_VALUE_FORMAT, (UINT32)nKey)); + aScPattern.GetItemSet().Put(SfxUInt32Item(ATTR_VALUE_FORMAT, (sal_uInt32)nKey)); pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern); } nStart = nEnd + 1; @@ -2079,10 +2079,10 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nEnd = static_cast<SCROW>(aFlag.pData[i].Row); if ((nStart <= nEnd) && (aFlag.pData[i].Value != 0)) { - BOOL bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect); - BOOL bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula); - BOOL bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll); - BOOL bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint); + sal_Bool bProtect = ((aFlag.pData[i].Value & paProtect) == paProtect); + sal_Bool bHFormula = ((aFlag.pData[i].Value & paHideFormula) == paHideFormula); + sal_Bool bHCell = ((aFlag.pData[i].Value & paHideAll) == paHideAll); + sal_Bool bHPrint = ((aFlag.pData[i].Value & paHidePrint) == paHidePrint); ScPatternAttr aScPattern(pDoc->GetPool()); aScPattern.GetItemSet().Put(ScProtectionAttr(bProtect, bHFormula, bHCell, bHPrint)); pDoc->ApplyPatternAreaTab(Col, nStart, Col, nEnd, Tab, aScPattern); @@ -2099,7 +2099,7 @@ void Sc10Import::LoadColAttr(SCCOL Col, SCTAB Tab) nEnd = static_cast<SCROW>(aPattern.pData[i].Row); if ((nStart <= nEnd) && (aPattern.pData[i].Value != 0)) { - USHORT nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1; + sal_uInt16 nPatternIndex = (aPattern.pData[i].Value & 0x00FF) - 1; Sc10PatternData* pPattern = pPatternCollection->At(nPatternIndex); if (pPattern != NULL) { @@ -2133,7 +2133,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr) rAttr.pData = new Sc10ColData[rAttr.Count]; if (rAttr.pData != NULL) { - for (USHORT i = 0; i < rAttr.Count; i++) + for (sal_uInt16 i = 0; i < rAttr.Count; i++) { rStream >> rAttr.pData[i].Row; rStream >> rAttr.pData[i].Value; @@ -2145,7 +2145,7 @@ void Sc10Import::LoadAttr(Sc10ColAttr& rAttr) } -void Sc10Import::ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey) +void Sc10Import::ChangeFormat(sal_uInt16 nFormat, sal_uInt16 nInfo, sal_uLong& nKey) { // Achtung: Die Formate werden nur auf die StarCalc 3.0 internen Formate gemappt // Korrekterweise muessten zum Teil neue Formate erzeugt werden (sollte Stephan sich ansehen) @@ -2290,22 +2290,22 @@ void Sc10Import::ChangeFormat(USHORT nFormat, USHORT nInfo, ULONG& nKey) void Sc10Import::LoadObjects() { - USHORT ID; + sal_uInt16 ID; rStream >> ID; if (rStream.IsEof()) return; if (ID == ObjectID) { - USHORT nAnz; + sal_uInt16 nAnz; rStream >> nAnz; sal_Char Reserved[32]; rStream.Read(Reserved, sizeof(Reserved)); nError = rStream.GetError(); if ((nAnz > 0) && (nError == 0)) { - BYTE ObjectType; + sal_uInt8 ObjectType; Sc10GraphHeader GraphHeader; - BOOL IsOleObject = FALSE; // Achtung dies ist nur ein Notnagel - for (USHORT i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++) + sal_Bool IsOleObject = false; // Achtung dies ist nur ein Notnagel + for (sal_uInt16 i = 0; (i < nAnz) && (nError == 0) && !rStream.IsEof() && !IsOleObject; i++) { rStream >> ObjectType; lcl_ReadGraphHeader(rStream, GraphHeader); @@ -2330,7 +2330,7 @@ void Sc10Import::LoadObjects() { case otOle : // Achtung hier muss sowas wie OleLoadFromStream passieren - IsOleObject = TRUE; + IsOleObject = sal_True; break; case otImage : { diff --git a/sc/source/filter/starcalc/scfobj.cxx b/sc/source/filter/starcalc/scfobj.cxx index 536f0fd5b816..e1fc11a68719 100644 --- a/sc/source/filter/starcalc/scfobj.cxx +++ b/sc/source/filter/starcalc/scfobj.cxx @@ -60,7 +60,7 @@ using namespace com::sun::star; //================================================================== void Sc10InsertObject::InsertChart( ScDocument* pDoc, SCTAB nDestTab, const Rectangle& rRect, - SCTAB nSrcTab, USHORT nX1, USHORT nY1, USHORT nX2, USHORT nY2 ) + SCTAB nSrcTab, sal_uInt16 nX1, sal_uInt16 nY1, sal_uInt16 nX2, sal_uInt16 nY2 ) { // wenn Chart nicht installiert ist, darf nicht auf SCH_MOD zugegriffen werden! if ( !SvtModuleOptions().IsChart() ) diff --git a/sc/source/filter/xcl97/XclExpChangeTrack.cxx b/sc/source/filter/xcl97/XclExpChangeTrack.cxx index 24997279b088..7168e46dd995 100644 --- a/sc/source/filter/xcl97/XclExpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclExpChangeTrack.cxx @@ -96,7 +96,7 @@ void lcl_WriteFixedString( XclExpStream& rStrm, const XclExpString& rString, sal inline void lcl_GenerateGUID( sal_uInt8* pGUID, sal_Bool& rValidGUID ) { - rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, sal_False ); + rtl_createUuid( pGUID, rValidGUID ? pGUID : NULL, false ); rValidGUID = sal_True; } @@ -133,7 +133,7 @@ void XclExpUserBView::SaveCont( XclExpStream& rStrm ) rStrm << sUsername; } -UINT16 XclExpUserBView::GetNum() const +sal_uInt16 XclExpUserBView::GetNum() const { return 0x01A9; } @@ -148,9 +148,9 @@ sal_Size XclExpUserBView::GetLen() const XclExpUserBViewList::XclExpUserBViewList( const ScChangeTrack& rChangeTrack ) { sal_uInt8 aGUID[ 16 ]; - sal_Bool bValidGUID = sal_False; + sal_Bool bValidGUID = false; const ScStrCollection& rStrColl = rChangeTrack.GetUserCollection(); - for( USHORT nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ ) + for( sal_uInt16 nIndex = 0; nIndex < rStrColl.GetCount(); nIndex++ ) { const StrData* pStrData = (const StrData*) rStrColl.At( nIndex ); lcl_GenerateGUID( aGUID, bValidGUID ); @@ -197,7 +197,7 @@ void XclExpUsersViewBegin::SaveCont( XclExpStream& rStrm ) << (sal_Int16) -1; } -UINT16 XclExpUsersViewBegin::GetNum() const +sal_uInt16 XclExpUsersViewBegin::GetNum() const { return 0x01AA; } @@ -214,7 +214,7 @@ void XclExpUsersViewEnd::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0001; } -UINT16 XclExpUsersViewEnd::GetNum() const +sal_uInt16 XclExpUsersViewEnd::GetNum() const { return 0x01AB; } @@ -231,7 +231,7 @@ void XclExpChTr0x0191::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0191::GetNum() const +sal_uInt16 XclExpChTr0x0191::GetNum() const { return 0x0191; } @@ -249,7 +249,7 @@ void XclExpChTr0x0198::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0198::GetNum() const +sal_uInt16 XclExpChTr0x0198::GetNum() const { return 0x0198; } @@ -267,7 +267,7 @@ void XclExpChTr0x0192::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 510 ); } -UINT16 XclExpChTr0x0192::GetNum() const +sal_uInt16 XclExpChTr0x0192::GetNum() const { return 0x0192; } @@ -284,7 +284,7 @@ void XclExpChTr0x0197::SaveCont( XclExpStream& rStrm ) rStrm << (sal_uInt16) 0x0000; } -UINT16 XclExpChTr0x0197::GetNum() const +sal_uInt16 XclExpChTr0x0197::GetNum() const { return 0x0197; } @@ -300,7 +300,7 @@ XclExpChTrEmpty::~XclExpChTrEmpty() { } -UINT16 XclExpChTrEmpty::GetNum() const +sal_uInt16 XclExpChTrEmpty::GetNum() const { return nRecNum; } @@ -321,7 +321,7 @@ void XclExpChTr0x0195::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 162 ); } -UINT16 XclExpChTr0x0195::GetNum() const +sal_uInt16 XclExpChTr0x0195::GetNum() const { return 0x0195; } @@ -345,7 +345,7 @@ void XclExpChTr0x0194::SaveCont( XclExpStream& rStrm ) lcl_WriteFixedString( rStrm, sUsername, 147 ); } -UINT16 XclExpChTr0x0194::GetNum() const +sal_uInt16 XclExpChTr0x0194::GetNum() const { return 0x0194; } @@ -374,7 +374,7 @@ void XclExpChTrHeader::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x001E; } -UINT16 XclExpChTrHeader::GetNum() const +sal_uInt16 XclExpChTrHeader::GetNum() const { return 0x0196; } @@ -424,7 +424,7 @@ void XclExpChTrInfo::SaveCont( XclExpStream& rStrm ) << (sal_uInt16) 0x0002; } -UINT16 XclExpChTrInfo::GetNum() const +sal_uInt16 XclExpChTrInfo::GetNum() const { return 0x0138; } @@ -575,7 +575,7 @@ void XclExpChTrTabId::SaveCont( XclExpStream& rStrm ) rStrm << nIndex; } -UINT16 XclExpChTrTabId::GetNum() const +sal_uInt16 XclExpChTrTabId::GetNum() const { return 0x013D; } @@ -640,7 +640,7 @@ XclExpChTrAction::XclExpChTrAction( rIdBuffer( rTabIdBuffer ), nLength( 0 ), nOpCode( nNewOpCode ), - bForceInfo( sal_False ) + bForceInfo( false ) { aDateTime.SetSec( 0 ); aDateTime.Set100Sec( 0 ); @@ -930,7 +930,7 @@ void XclExpChTrCellContent::SaveActionData( XclExpStream& rStrm ) const pNewData->Write( rStrm, rIdBuffer ); } -UINT16 XclExpChTrCellContent::GetNum() const +sal_uInt16 XclExpChTrCellContent::GetNum() const { return 0x013B; } @@ -1109,7 +1109,7 @@ void XclExpChTrInsert::CompleteSaveAction( XclExpStream& rStrm ) const XclExpChTrEmpty( 0x0151 ).Save( rStrm ); } -UINT16 XclExpChTrInsert::GetNum() const +sal_uInt16 XclExpChTrInsert::GetNum() const { return 0x0137; } @@ -1181,7 +1181,7 @@ void XclExpChTrInsertTab::SaveActionData( XclExpStream& rStrm ) const rStrm.WriteZeroBytes( 133 ); } -UINT16 XclExpChTrInsertTab::GetNum() const +sal_uInt16 XclExpChTrInsertTab::GetNum() const { return 0x014D; } @@ -1250,7 +1250,7 @@ void XclExpChTrMoveRange::CompleteSaveAction( XclExpStream& rStrm ) const XclExpChTrEmpty( 0x014F ).Save( rStrm ); } -UINT16 XclExpChTrMoveRange::GetNum() const +sal_uInt16 XclExpChTrMoveRange::GetNum() const { return 0x0140; } @@ -1304,7 +1304,7 @@ void XclExpChTr0x014A::SaveActionData( XclExpStream& rStrm ) const Write2DRange( rStrm, aRange ); } -UINT16 XclExpChTr0x014A::GetNum() const +sal_uInt16 XclExpChTr0x014A::GetNum() const { return 0x014A; } @@ -1469,7 +1469,7 @@ XclExpChangeTrack::XclExpChangeTrack( const XclExpRoot& rRoot ) : pTempDoc( NULL ), nNewAction( 1 ), pHeader( NULL ), - bValidGUID( sal_False ) + bValidGUID( false ) { DBG_ASSERT( GetOldRoot().pTabId, "XclExpChangeTrack::XclExpChangeTrack - root data incomplete" ); if( !GetOldRoot().pTabId ) @@ -1584,7 +1584,7 @@ ScChangeTrack* XclExpChangeTrack::CreateTempChangeTrack() DBG_ASSERT( nOrigCount == pTempDoc->GetTableCount(), "XclExpChangeTrack::CreateTempChangeTrack - table count mismatch" ); if( nOrigCount != pTempDoc->GetTableCount() ) - return sal_False; + return false; return pOrigChangeTrack->Clone(pTempDoc); } @@ -1626,7 +1626,7 @@ void XclExpChangeTrack::PushActionRecord( const ScChangeAction& rAction ) sal_Bool XclExpChangeTrack::WriteUserNamesStream() { - sal_Bool bRet = sal_False; + sal_Bool bRet = false; SotStorageStreamRef xSvStrm = OpenStream( EXC_STREAM_USERNAMES ); DBG_ASSERT( xSvStrm.Is(), "XclExpChangeTrack::WriteUserNamesStream - no stream" ); if( xSvStrm.Is() ) diff --git a/sc/source/filter/xcl97/XclImpChangeTrack.cxx b/sc/source/filter/xcl97/XclImpChangeTrack.cxx index cbadfd62b6f8..7cf584f317b0 100644 --- a/sc/source/filter/xcl97/XclImpChangeTrack.cxx +++ b/sc/source/filter/xcl97/XclImpChangeTrack.cxx @@ -50,7 +50,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea pChangeTrack( NULL ), pStrm( NULL ), nTabIdCount( 0 ), - bGlobExit( sal_False ), + bGlobExit( false ), eNestedMode( nmBase ) { // Verify that the User Names stream exists before going any further. Excel adds both @@ -64,7 +64,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea if( xInStrm.Is() ) { xInStrm->Seek( STREAM_SEEK_TO_END ); - ULONG nStreamLen = xInStrm->Tell(); + sal_uLong nStreamLen = xInStrm->Tell(); if( (xInStrm->GetErrorCode() == ERRCODE_NONE) && (nStreamLen != STREAM_SEEK_TO_END) ) { xInStrm->Seek( STREAM_SEEK_TO_BEGIN ); @@ -73,7 +73,7 @@ XclImpChangeTrack::XclImpChangeTrack( const XclImpRoot& rRoot, const XclImpStrea pChangeTrack = new ScChangeTrack( GetDocPtr() ); sOldUsername = pChangeTrack->GetUser(); - pChangeTrack->SetUseFixDateTime( TRUE ); + pChangeTrack->SetUseFixDateTime( sal_True ); ReadRecords(); } @@ -115,7 +115,7 @@ void XclImpChangeTrack::DoInsertRange( const ScRange& rRange ) void XclImpChangeTrack::DoDeleteRange( const ScRange& rRange ) { - ULONG nFirst, nLast; + sal_uLong nFirst, nLast; pChangeTrack->AppendDeleteRange( rRange, NULL, nFirst, nLast ); DoAcceptRejectAction( nFirst, nLast ); } @@ -147,7 +147,7 @@ sal_Bool XclImpChangeTrack::CheckRecord( sal_uInt16 nOpCode ) if( (nOpCode != EXC_CHTR_OP_UNKNOWN) && (aRecHeader.nOpCode != nOpCode) ) { OSL_FAIL( "XclImpChangeTrack::CheckRecord - unknown action" ); - return sal_False; + return false; } return aRecHeader.nIndex != 0; } @@ -208,7 +208,7 @@ void XclImpChangeTrack::ReadFormula( ScTokenArray*& rpTokenArray, const ScAddres // read the formula, 3D tab refs from extended data const ScTokenArray* pArray = NULL; aFmlConv.Reset( rPosition ); - BOOL bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This + sal_Bool bOK = (aFmlConv.Convert( pArray, aFmlaStrm, nFmlSize, false, FT_CellFormula) == ConvOK); // JEG : Check This rpTokenArray = (bOK && pArray) ? new ScTokenArray( *pArray ) : NULL; pStrm->Ignore( 1 ); } @@ -295,7 +295,7 @@ void XclImpChangeTrack::ReadChTrInsert() else aRange.aEnd.SetCol( MAXCOL ); - BOOL bValid = pStrm->IsValid(); + sal_Bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -397,7 +397,7 @@ void XclImpChangeTrack::ReadChTrMoveRange() aSourceRange.aStart.SetTab( ReadTabNum() ); aSourceRange.aEnd.SetTab( aSourceRange.aStart.Tab() ); - BOOL bValid = pStrm->IsValid(); + sal_Bool bValid = pStrm->IsValid(); if( FoundNestedMode() ) ReadNestedRecords(); @@ -450,7 +450,7 @@ sal_Bool XclImpChangeTrack::EndNestedMode() void XclImpChangeTrack::ReadRecords() { - sal_Bool bExitLoop = sal_False; + sal_Bool bExitLoop = false; while( !bExitLoop && !bGlobExit && pStrm->StartNextRecord() ) { @@ -476,13 +476,13 @@ void XclImpChangeTrack::Apply() if( pChangeTrack ) { pChangeTrack->SetUser( sOldUsername ); - pChangeTrack->SetUseFixDateTime( FALSE ); + pChangeTrack->SetUseFixDateTime( false ); GetDoc().SetChangeTrack( pChangeTrack ); pChangeTrack = NULL; ScChangeViewSettings aSettings; - aSettings.SetShowChanges( TRUE ); + aSettings.SetShowChanges( sal_True ); GetDoc().SetChangeViewSettings( aSettings ); } } @@ -495,7 +495,7 @@ XclImpChTrFmlConverter::~XclImpChTrFmlConverter() } // virtual, called from ExcToSc8::Convert() -bool XclImpChTrFmlConverter::Read3DTabReference( UINT16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab, +bool XclImpChTrFmlConverter::Read3DTabReference( sal_uInt16 /*nIxti*/, SCTAB& rFirstTab, SCTAB& rLastTab, ExternalTabInfo& rExtInfo ) { return rChangeTrack.Read3DTabRefInfo( rFirstTab, rLastTab, rExtInfo ); diff --git a/sc/source/filter/xcl97/xcl97dum.cxx b/sc/source/filter/xcl97/xcl97dum.cxx index 8340ce397ffa..1eafabf2fb73 100644 --- a/sc/source/filter/xcl97/xcl97dum.cxx +++ b/sc/source/filter/xcl97/xcl97dum.cxx @@ -39,7 +39,7 @@ // ... (8+) := neu in Biff8, ... (8*) := anders in Biff8 -const BYTE ExcDummy8_00a::pMyData[] = { +const sal_uInt8 ExcDummy8_00a::pMyData[] = { 0xe1, 0x00, 0x02, 0x00, 0xb0, 0x04, // INTERFACEHDR 0xc1, 0x00, 0x02, 0x00, 0x00, 0x00, // MMS 0xe2, 0x00, 0x00, 0x00, // INTERFACEEND @@ -65,13 +65,13 @@ const sal_Size ExcDummy8_00a::nMyLen = sizeof(ExcDummy8_00a::pMyData); // TABID (8+): ExcTabid -const BYTE ExcDummy8_00b::pMyData[] = { +const sal_uInt8 ExcDummy8_00b::pMyData[] = { 0x9c, 0x00, 0x02, 0x00, 0x0e, 0x00 // FNGROUPCOUNT }; const sal_Size ExcDummy8_00b::nMyLen = sizeof(ExcDummy8_00b::pMyData); -const BYTE ExcDummy8_040::pMyData[] = { +const sal_uInt8 ExcDummy8_040::pMyData[] = { 0xaf, 0x01, 0x02, 0x00, 0x00, 0x00, // PROT4REV (8+) 0xbc, 0x01, 0x02, 0x00, 0x00, 0x00, // PROT4REVPASS (8+) // 0x3d, 0x00, 0x12, 0x00, 0xe0, 0x01, 0x5a, 0x00, 0xcf, // WINDOW1 @@ -83,7 +83,7 @@ const BYTE ExcDummy8_040::pMyData[] = { const sal_Size ExcDummy8_040::nMyLen = sizeof(ExcDummy8_040::pMyData); -const BYTE ExcDummy8_041::pMyData[] = { +const sal_uInt8 ExcDummy8_041::pMyData[] = { 0xb7, 0x01, 0x02, 0x00, 0x00, 0x00, // REFRESHALL (8+) 0xda, 0x00, 0x02, 0x00, 0x00, 0x00 // BOOKBOOL }; @@ -91,7 +91,7 @@ const sal_Size ExcDummy8_041::nMyLen = sizeof(ExcDummy8_041::pMyData); -const BYTE ExcDummy8_02::pMyData[] = { +const sal_uInt8 ExcDummy8_02::pMyData[] = { 0x5f, 0x00, 0x02, 0x00, 0x01, 0x00 // SAVERECALC }; const sal_Size ExcDummy8_02::nMyLen = sizeof(ExcDummy8_02::pMyData); @@ -105,7 +105,7 @@ sal_Size ExcDummy8_00a::GetLen() const } -const BYTE* ExcDummy8_00a::GetData() const +const sal_uInt8* ExcDummy8_00a::GetData() const { return pMyData; } @@ -118,7 +118,7 @@ sal_Size ExcDummy8_00b::GetLen() const } -const BYTE* ExcDummy8_00b::GetData() const +const sal_uInt8* ExcDummy8_00b::GetData() const { return pMyData; } @@ -131,7 +131,7 @@ sal_Size ExcDummy8_040::GetLen() const } -const BYTE* ExcDummy8_040::GetData() const +const sal_uInt8* ExcDummy8_040::GetData() const { return pMyData; } @@ -144,7 +144,7 @@ sal_Size ExcDummy8_041::GetLen() const } -const BYTE* ExcDummy8_041::GetData() const +const sal_uInt8* ExcDummy8_041::GetData() const { return pMyData; } @@ -157,7 +157,7 @@ sal_Size ExcDummy8_02::GetLen() const } -const BYTE* ExcDummy8_02::GetData() const +const sal_uInt8* ExcDummy8_02::GetData() const { return pMyData; } diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx index cfd84edeec86..75bb0335f9d6 100644 --- a/sc/source/filter/xcl97/xcl97esc.cxx +++ b/sc/source/filter/xcl97/xcl97esc.cxx @@ -200,12 +200,12 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape { if ( nAdditionalText ) nAdditionalText++; - BOOL bInGroup = ( pCurrXclObj != NULL ); + sal_Bool bInGroup = ( pCurrXclObj != NULL ); if ( bInGroup ) { // stacked recursive group object if ( !pCurrAppData->IsStackedGroup() ) { //! UpdateDffFragmentEnd only once - pCurrAppData->SetStackedGroup( TRUE ); + pCurrAppData->SetStackedGroup( sal_True ); UpdateDffFragmentEnd(); } } @@ -312,12 +312,12 @@ EscherExHostAppData* XclEscherEx::StartShape( const Reference< XShape >& rxShape } } if ( !pCurrXclObj ) - pCurrAppData->SetDontWriteShape( TRUE ); + pCurrAppData->SetDontWriteShape( sal_True ); return pCurrAppData; } -void XclEscherEx::EndShape( UINT16 nShapeType, UINT32 nShapeID ) +void XclEscherEx::EndShape( sal_uInt16 nShapeType, sal_uInt32 nShapeID ) { // own escher data created? -> never delete such objects bool bOwnEscher = pCurrXclObj && pCurrXclObj->IsOwnEscher(); diff --git a/sc/source/filter/xcl97/xcl97rec.cxx b/sc/source/filter/xcl97/xcl97rec.cxx index a94e0e1fb91a..69ae4eadbaa9 100644 --- a/sc/source/filter/xcl97/xcl97rec.cxx +++ b/sc/source/filter/xcl97/xcl97rec.cxx @@ -123,13 +123,13 @@ XclExpObjList::~XclExpObjList() delete pSolverContainer; } -UINT16 XclExpObjList::Add( XclObj* pObj ) +sal_uInt16 XclExpObjList::Add( XclObj* pObj ) { DBG_ASSERT( Count() < 0xFFFF, "XclExpObjList::Add: too much for Xcl" ); if ( Count() < 0xFFFF ) { Insert( pObj, LIST_APPEND ); - UINT16 nCnt = (UINT16) Count(); + sal_uInt16 nCnt = (sal_uInt16) Count(); pObj->SetId( nCnt ); pObj->SetTab( mnScTab ); return nCnt; @@ -326,7 +326,7 @@ void XclObj::ImplWriteAnchor( const XclExpRoot& /*rRoot*/, const SdrObject* pSdr } } -void XclObj::SetEscherShapeType( UINT16 nType ) +void XclObj::SetEscherShapeType( sal_uInt16 nType ) { //2do: what about the other defined ot... types? switch ( nType ) @@ -459,7 +459,7 @@ static void lcl_FillProps( EscherPropertyContainer& rPropOpt, SdrObject* pCaptio // If the Colour is the same as the 'ToolTip' System colour then // use the default rather than the explicit colour value. This will // be incorrect where user has chosen to use this colour explicity. - Color aColor = Color( (BYTE)nValue, (BYTE)( nValue >> 8 ), (BYTE)( nValue >> 16 ) ); + Color aColor = Color( (sal_uInt8)nValue, (sal_uInt8)( nValue >> 8 ), (sal_uInt8)( nValue >> 16 ) ); const StyleSettings& rSett = Application::GetSettings().GetStyleSettings(); if( aColor == rSett.GetHelpColor().GetColor() ) { @@ -599,14 +599,14 @@ void XclObjComment::SaveXml( XclExpXmlStream& rStrm ) // --- class XclObjDropDown ------------------------------------------ -XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, BOOL bFilt ) : +XclObjDropDown::XclObjDropDown( XclExpObjectManager& rObjMgr, const ScAddress& rPos, sal_Bool bFilt ) : XclObj( rObjMgr, EXC_OBJTYPE_DROPDOWN, true ), bIsFiltered( bFilt ) { - SetLocked( TRUE ); - SetPrintable( FALSE ); - SetAutoFill( TRUE ); - SetAutoLine( FALSE ); + SetLocked( sal_True ); + SetPrintable( false ); + SetAutoFill( sal_True ); + SetAutoLine( false ); nGrbit |= 0x0100; // undocumented mrEscherEx.OpenContainer( ESCHER_SpContainer ); mrEscherEx.AddShape( ESCHER_ShpInst_HostControl, SHAPEFLAG_HAVEANCHOR | SHAPEFLAG_HAVESPT ); @@ -644,7 +644,7 @@ void XclObjDropDown::WriteSubRecs( XclExpStream& rStrm ) ::insert_value( nDropDownFlags, EXC_OBJ_DROPDOWN_SIMPLE, 0, 2 ); ::set_flag( nDropDownFlags, EXC_OBJ_DROPDOWN_FILTERED, bIsFiltered ); rStrm.StartRecord( EXC_ID_OBJLBSDATA, 16 ); - rStrm << (UINT32)0 << (UINT16)0 << (UINT16)0x0301 << (UINT16)0 + rStrm << (sal_uInt32)0 << (sal_uInt16)0 << (sal_uInt16)0x0301 << (sal_uInt16)0 << nDropDownFlags << sal_uInt16( 20 ) << sal_uInt16( 130 ); rStrm.EndRecord(); } @@ -735,7 +735,7 @@ XclTxo::XclTxo( const XclExpRoot& rRoot, const EditTextObject& rEditObj, SdrObje { SfxItemSet aSet( rEditObj.GetParaAttribs( 0)); const SfxPoolItem* pItem = NULL; - if( aSet.GetItemState( EE_PARA_JUST, TRUE, &pItem ) == SFX_ITEM_SET ) + if( aSet.GetItemState( EE_PARA_JUST, sal_True, &pItem ) == SFX_ITEM_SET ) { SvxAdjust eEEAlign = static_cast< const SvxAdjustItem& >( *pItem ).GetAdjust(); pCaption->SetMergedItem( SvxAdjustItem( eEEAlign, EE_PARA_JUST ) ); @@ -795,7 +795,7 @@ void XclTxo::Save( XclExpStream& rStrm ) } } -UINT16 XclTxo::GetNum() const +sal_uInt16 XclTxo::GetNum() const { return EXC_ID_TXO; } @@ -822,9 +822,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) { // write only as embedded, not linked String aStorageName( RTL_CONSTASCII_USTRINGPARAM( "MBD" ) ); - sal_Char aBuf[ sizeof(UINT32) * 2 + 1 ]; + sal_Char aBuf[ sizeof(sal_uInt32) * 2 + 1 ]; // FIXME Eeek! Is this just a way to get a unique id? - UINT32 nPictureId = UINT32(sal_uIntPtr(this) >> 2); + sal_uInt32 nPictureId = sal_uInt32(sal_uIntPtr(this) >> 2); sprintf( aBuf, "%08X", static_cast< unsigned int >( nPictureId ) ); aStorageName.AppendAscii( aBuf ); SotStorageRef xOleStg = pRootStorage->OpenSotStorage( aStorageName, @@ -836,7 +836,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) { // set version to "old" version, because it must be // saved in MS notation. - UINT32 nFl = 0; + sal_uInt32 nFl = 0; SvtFilterOptions* pFltOpts = SvtFilterOptions::Get(); if( pFltOpts ) { @@ -858,7 +858,7 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) // OBJCF subrecord, undocumented as usual rStrm.StartRecord( EXC_ID_OBJCF, 2 ); - rStrm << UINT16(0x0002); + rStrm << sal_uInt16(0x0002); rStrm.EndRecord(); // OBJFLAGS subrecord, undocumented as usual @@ -870,9 +870,9 @@ void XclObjOle::WriteSubRecs( XclExpStream& rStrm ) // OBJPICTFMLA subrecord, undocumented as usual XclExpString aName( xOleStg->GetUserName() ); - UINT16 nPadLen = (UINT16)(aName.GetSize() & 0x01); - UINT16 nFmlaLen = static_cast< sal_uInt16 >( 12 + aName.GetSize() + nPadLen ); - UINT16 nSubRecLen = nFmlaLen + 6; + sal_uInt16 nPadLen = (sal_uInt16)(aName.GetSize() & 0x01); + sal_uInt16 nFmlaLen = static_cast< sal_uInt16 >( 12 + aName.GetSize() + nPadLen ); + sal_uInt16 nSubRecLen = nFmlaLen + 6; rStrm.StartRecord( EXC_ID_OBJPICTFMLA, nSubRecLen ); rStrm << nFmlaLen @@ -909,7 +909,7 @@ void XclObjAny::WriteSubRecs( XclExpStream& rStrm ) { if( mnObjType == EXC_OBJTYPE_GROUP ) // ftGmo subrecord - rStrm << EXC_ID_OBJGMO << UINT16(2) << UINT16(0); + rStrm << EXC_ID_OBJGMO << sal_uInt16(2) << sal_uInt16(0); } void XclObjAny::Save( XclExpStream& rStrm ) @@ -1024,7 +1024,7 @@ void ExcBof8_Base::SaveCont( XclExpStream& rStrm ) } -UINT16 ExcBof8_Base::GetNum() const +sal_uInt16 ExcBof8_Base::GetNum() const { return 0x0809; } @@ -1114,7 +1114,7 @@ void ExcBundlesheet8::SaveXml( XclExpXmlStream& rStrm ) // --- class XclObproj ----------------------------------------------- -UINT16 XclObproj::GetNum() const +sal_uInt16 XclObproj::GetNum() const { return 0x00D3; } @@ -1139,7 +1139,7 @@ void XclCodename::SaveCont( XclExpStream& rStrm ) } -UINT16 XclCodename::GetNum() const +sal_uInt16 XclCodename::GetNum() const { return 0x01BA; } @@ -1154,7 +1154,7 @@ sal_Size XclCodename::GetLen() const // ---- Scenarios ---------------------------------------------------- -ExcEScenarioCell::ExcEScenarioCell( UINT16 nC, UINT16 nR, const String& rTxt ) : +ExcEScenarioCell::ExcEScenarioCell( sal_uInt16 nC, sal_uInt16 nR, const String& rTxt ) : nCol( nC ), nRow( nR ), sText( rTxt, EXC_STR_DEFAULT, 255 ) @@ -1190,7 +1190,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) String sTmpName; String sTmpComm; Color aDummyCol; - USHORT nFlags; + sal_uInt16 nFlags; ScDocument& rDoc = rRoot.GetDoc(); rDoc.GetName( nTab, sTmpName ); @@ -1210,7 +1210,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) if( !pRList ) return; - BOOL bContLoop = TRUE; + sal_Bool bContLoop = sal_True; SCROW nRow; SCCOL nCol; String sText; @@ -1229,7 +1229,7 @@ ExcEScenario::ExcEScenario( const XclExpRoot& rRoot, SCTAB nTab ) rtl_math_StringFormat_Automatic, rtl_math_DecimalPlaces_Max, ScGlobal::pLocaleData->getNumDecimalSep().GetChar(0), - TRUE ); + sal_True ); } else rDoc.GetString( nCol, nRow, nTab, sText ); @@ -1245,25 +1245,25 @@ ExcEScenario::~ExcEScenario() delete pCell; } -BOOL ExcEScenario::Append( UINT16 nCol, UINT16 nRow, const String& rTxt ) +sal_Bool ExcEScenario::Append( sal_uInt16 nCol, sal_uInt16 nRow, const String& rTxt ) { if( List::Count() == EXC_SCEN_MAXCELL ) - return FALSE; + return false; ExcEScenarioCell* pCell = new ExcEScenarioCell( nCol, nRow, rTxt ); List::Insert( pCell, LIST_APPEND ); nRecLen += 6 + pCell->GetStringBytes(); // 4 bytes address, 2 bytes ifmt - return TRUE; + return sal_True; } void ExcEScenario::SaveCont( XclExpStream& rStrm ) { - rStrm << (UINT16) List::Count() // number of cells + rStrm << (sal_uInt16) List::Count() // number of cells << nProtected // fProtection - << (UINT8) 0 // fHidden - << (UINT8) sName.Len() // length of scen name - << (UINT8) sComment.Len() // length of comment - << (UINT8) sUserName.Len(); // length of user name + << (sal_uInt8) 0 // fHidden + << (sal_uInt8) sName.Len() // length of scen name + << (sal_uInt8) sComment.Len() // length of comment + << (sal_uInt8) sUserName.Len(); // length of user name sName.WriteFlagField( rStrm ); sName.WriteBuffer( rStrm ); @@ -1281,7 +1281,7 @@ void ExcEScenario::SaveCont( XclExpStream& rStrm ) rStrm.WriteZeroBytes( 2 * List::Count() ); // date format } -UINT16 ExcEScenario::GetNum() const +sal_uInt16 ExcEScenario::GetNum() const { return 0x00AF; } @@ -1340,10 +1340,10 @@ ExcEScenarioManager::~ExcEScenarioManager() void ExcEScenarioManager::SaveCont( XclExpStream& rStrm ) { - rStrm << (UINT16) List::Count() // number of scenarios + rStrm << (sal_uInt16) List::Count() // number of scenarios << nActive // active scen << nActive // last displayed - << (UINT16) 0; // reference areas + << (sal_uInt16) 0; // reference areas } void ExcEScenarioManager::Save( XclExpStream& rStrm ) @@ -1373,7 +1373,7 @@ void ExcEScenarioManager::SaveXml( XclExpXmlStream& rStrm ) rWorkbook->endElement( XML_scenarios ); } -UINT16 ExcEScenarioManager::GetNum() const +sal_uInt16 ExcEScenarioManager::GetNum() const { return 0x00AE; } @@ -1466,7 +1466,7 @@ XclCalccount::XclCalccount( const ScDocument& rDoc ) } -UINT16 XclCalccount::GetNum() const +sal_uInt16 XclCalccount::GetNum() const { return 0x000C; } @@ -1500,7 +1500,7 @@ XclIteration::XclIteration( const ScDocument& rDoc ) } -UINT16 XclIteration::GetNum() const +sal_uInt16 XclIteration::GetNum() const { return 0x0011; } @@ -1535,7 +1535,7 @@ XclDelta::XclDelta( const ScDocument& rDoc ) } -UINT16 XclDelta::GetNum() const +sal_uInt16 XclDelta::GetNum() const { return 0x0010; } @@ -1556,27 +1556,18 @@ void XclDelta::SaveXml( XclExpXmlStream& rStrm ) // ============================================================================ -XclExpFilePass::XclExpFilePass( const XclExpRoot& rRoot ) : +XclExpFileEncryption::XclExpFileEncryption( const XclExpRoot& rRoot ) : XclExpRecord(0x002F, 54), mrRoot(rRoot) { } -XclExpFilePass::~XclExpFilePass() +XclExpFileEncryption::~XclExpFileEncryption() { } -void XclExpFilePass::WriteBody( XclExpStream& rStrm ) +void XclExpFileEncryption::WriteBody( XclExpStream& rStrm ) { - static const sal_uInt8 nDocId[] = { - 0x17, 0xf7, 0x01, 0x08, 0xea, 0xad, 0x30, 0x5c, - 0x1a, 0x95, 0xa5, 0x75, 0xd6, 0x79, 0xcd, 0x8d }; - - - static const sal_uInt8 nSalt[] = { - 0xa4, 0x5b, 0xf7, 0xe9, 0x9f, 0x55, 0x21, 0xc5, - 0xc5, 0x56, 0xa8, 0x0d, 0x39, 0x05, 0x3a, 0xb4 }; - // 0x0000 - neither standard nor strong encryption // 0x0001 - standard or strong encryption rStrm << static_cast<sal_uInt16>(0x0001); @@ -1586,13 +1577,17 @@ void XclExpFilePass::WriteBody( XclExpStream& rStrm ) sal_uInt16 nStdEnc = 0x0001; rStrm << nStdEnc << nStdEnc; - sal_uInt8 nSaltHash[16]; - XclExpEncrypterRef xEnc( new XclExpBiff8Encrypter(mrRoot, nDocId, nSalt) ); - xEnc->GetSaltDigest(nSaltHash); - - rStrm.Write(nDocId, 16); - rStrm.Write(nSalt, 16); - rStrm.Write(nSaltHash, 16); + sal_uInt8 pnDocId[16]; + sal_uInt8 pnSalt[16]; + sal_uInt8 pnSaltHash[16]; + XclExpEncrypterRef xEnc( new XclExpBiff8Encrypter(mrRoot) ); + xEnc->GetDocId(pnDocId); + xEnc->GetSalt(pnSalt); + xEnc->GetSaltDigest(pnSaltHash); + + rStrm.Write(pnDocId, 16); + rStrm.Write(pnSalt, 16); + rStrm.Write(pnSaltHash, 16); rStrm.SetEncrypter(xEnc); } diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx index cd4875a9079a..ac636249cf68 100644 --- a/sc/source/filter/xml/XMLCalculationSettingsContext.cxx +++ b/sc/source/filter/xml/XMLCalculationSettingsContext.cxx @@ -50,7 +50,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : @@ -58,9 +58,9 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r fIterationEpsilon(0.001), nIterationCount(100), nYear2000(1930), - bIsIterationEnabled(sal_False), - bCalcAsShown(sal_False), - bIgnoreCase(sal_False), + bIsIterationEnabled(false), + bCalcAsShown(false), + bIgnoreCase(false), bLookUpLabels(sal_True), bMatchWholeCell(sal_True), bUseRegularExpressions(sal_True) @@ -92,12 +92,12 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r else if (IsXMLToken(aLocalName, XML_SEARCH_CRITERIA_MUST_APPLY_TO_WHOLE_CELL)) { if (IsXMLToken(sValue, XML_FALSE)) - bMatchWholeCell = sal_False; + bMatchWholeCell = false; } else if (IsXMLToken(aLocalName, XML_AUTOMATIC_FIND_LABELS)) { if (IsXMLToken(sValue, XML_FALSE)) - bLookUpLabels = sal_False; + bLookUpLabels = false; } else if (IsXMLToken(aLocalName, XML_NULL_YEAR)) { @@ -108,7 +108,7 @@ ScXMLCalculationSettingsContext::ScXMLCalculationSettingsContext( ScXMLImport& r else if (IsXMLToken(aLocalName, XML_USE_REGULAR_EXPRESSIONS)) { if (IsXMLToken(sValue, XML_FALSE)) - bUseRegularExpressions = sal_False; + bUseRegularExpressions = false; } } } @@ -118,7 +118,7 @@ ScXMLCalculationSettingsContext::~ScXMLCalculationSettingsContext() { } -SvXMLImportContext *ScXMLCalculationSettingsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLCalculationSettingsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -167,7 +167,7 @@ void ScXMLCalculationSettingsContext::EndElement() } ScXMLNullDateContext::ScXMLNullDateContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -200,7 +200,7 @@ ScXMLNullDateContext::~ScXMLNullDateContext() { } -SvXMLImportContext *ScXMLNullDateContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLNullDateContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -215,7 +215,7 @@ void ScXMLNullDateContext::EndElement() } ScXMLIterationContext::ScXMLIterationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -258,7 +258,7 @@ ScXMLIterationContext::~ScXMLIterationContext() { } -SvXMLImportContext *ScXMLIterationContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLIterationContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx index 867c01a5d923..fb023bc0c740 100644 --- a/sc/source/filter/xml/XMLCalculationSettingsContext.hxx +++ b/sc/source/filter/xml/XMLCalculationSettingsContext.hxx @@ -50,14 +50,14 @@ class ScXMLCalculationSettingsContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLCalculationSettingsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLCalculationSettingsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLCalculationSettingsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -74,14 +74,14 @@ class ScXMLNullDateContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLNullDateContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLNullDateContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet); virtual ~ScXMLNullDateContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -94,14 +94,14 @@ class ScXMLIterationContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLIterationContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLIterationContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLCalculationSettingsContext* pCalcSet); virtual ~ScXMLIterationContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx index 6b9bed748fb6..b7a05b59053e 100644 --- a/sc/source/filter/xml/XMLCellRangeSourceContext.cxx +++ b/sc/source/filter/xml/XMLCellRangeSourceContext.cxx @@ -55,7 +55,7 @@ ScMyImpCellRangeSource::ScMyImpCellRangeSource() : ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, ScMyImpCellRangeSource* pCellRangeSource ) : @@ -71,7 +71,7 @@ ScXMLCellRangeSourceContext::ScXMLCellRangeSourceContext( const rtl::OUString& sAttrName(xAttrList->getNameByIndex( nIndex )); const OUString& sValue(xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); switch( rAttrTokenMap.Get( nPrefix, aLocalName ) ) { @@ -121,7 +121,7 @@ ScXMLCellRangeSourceContext::~ScXMLCellRangeSourceContext() } SvXMLImportContext *ScXMLCellRangeSourceContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ ) { diff --git a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx index 711e83c7ea55..58b9c7d10e95 100644 --- a/sc/source/filter/xml/XMLCellRangeSourceContext.hxx +++ b/sc/source/filter/xml/XMLCellRangeSourceContext.hxx @@ -61,7 +61,7 @@ private: public: ScXMLCellRangeSourceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ScMyImpCellRangeSource* pCellRangeSource @@ -69,7 +69,7 @@ public: virtual ~ScXMLCellRangeSourceContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); diff --git a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx index 7c271ef9b0a5..7db33e2c51fa 100644 --- a/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingExportHelper.cxx @@ -128,7 +128,7 @@ void ScChangeTrackingExportHelper::WriteChangeInfo(const ScChangeAction* pAction { SvXMLElementExport aCreatorElem( rExport, XML_NAMESPACE_DC, XML_CREATOR, sal_True, - sal_False ); + false ); rtl::OUString sAuthor(pAction->GetUser()); rExport.Characters(sAuthor); } @@ -138,14 +138,14 @@ void ScChangeTrackingExportHelper::WriteChangeInfo(const ScChangeAction* pAction ScXMLConverter::ConvertDateTimeToString(pAction->GetDateTimeUTC(), sDate); SvXMLElementExport aDateElem( rExport, XML_NAMESPACE_DC, XML_DATE, sal_True, - sal_False ); + false ); rExport.Characters(sDate.makeStringAndClear()); } rtl::OUString sComment(pAction->GetComment()); if (sComment.getLength()) { - SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); + SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false); sal_Bool bPrevCharWasSpace(sal_True); rExport.GetTextParagraphExport()->exportText(sComment, bPrevCharWasSpace); } @@ -238,7 +238,7 @@ void ScChangeTrackingExportHelper::WriteEmptyCell() void ScChangeTrackingExportHelper::SetValueAttributes(const double& fValue, const String& sValue) { - sal_Bool bSetAttributes(sal_False); + sal_Bool bSetAttributes(false); if (sValue.Len()) { sal_uInt32 nIndex; @@ -308,7 +308,7 @@ void ScChangeTrackingExportHelper::WriteStringCell(const ScBaseCell* pCell) SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, sal_True, sal_True); if (sOUString.getLength()) { - SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); + SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false); sal_Bool bPrevCharWasSpace(sal_True); rExport.GetTextParagraphExport()->exportText(sOUString, bPrevCharWasSpace); } @@ -333,7 +333,7 @@ void ScChangeTrackingExportHelper::WriteEditCell(const ScBaseCell* pCell) } pEditTextObj->SetText(*(pEditCell->GetData())); if (xText.is()) - rExport.GetTextParagraphExport()->exportText(xText, sal_False, sal_False); + rExport.GetTextParagraphExport()->exportText(xText, false, false); } } } @@ -373,12 +373,12 @@ void ScChangeTrackingExportHelper::WriteFormulaCell(const ScBaseCell* pCell, con rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MATRIX_COVERED, XML_TRUE); } rtl::OUString sMatrixFormula = sOUFormula.copy(1, sOUFormula.getLength() - 2); - rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sMatrixFormula, sal_False ); + rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sMatrixFormula, false ); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FORMULA, sQValue); } else { - rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sFormula, sal_False ); + rtl::OUString sQValue = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sFormula, false ); rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_FORMULA, sQValue); } if (pFormulaCell->IsValue()) @@ -395,7 +395,7 @@ void ScChangeTrackingExportHelper::WriteFormulaCell(const ScBaseCell* pCell, con SvXMLElementExport aElemC(rExport, XML_NAMESPACE_TABLE, XML_CHANGE_TRACK_TABLE_CELL, sal_True, sal_True); if (sOUValue.getLength()) { - SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); + SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false); sal_Bool bPrevCharWasSpace(sal_True); rExport.GetTextParagraphExport()->exportText(sOUValue, bPrevCharWasSpace); } @@ -570,7 +570,7 @@ void ScChangeTrackingExportHelper::AddDeletionAttributes(const ScChangeActionDel if (pDelAction->IsMultiDelete() && !pDelAction->GetDx() && !pDelAction->GetDy()) { const ScChangeAction* p = pDelAction->GetNext(); - sal_Bool bAll(sal_False); + sal_Bool bAll(false); sal_Int32 nSlavesCount (1); while (!bAll && p) { @@ -673,7 +673,7 @@ void ScChangeTrackingExportHelper::CollectCellAutoStyles(const ScBaseCell* pBase } pEditTextObj->SetText(*(pEditCell->GetData())); if (xText.is()) - rExport.GetTextParagraphExport()->collectTextAutoStyles(xText, sal_False, sal_False); + rExport.GetTextParagraphExport()->collectTextAutoStyles(xText, false, false); } } } diff --git a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx index d83e6d001d77..246e3eed3f20 100644 --- a/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx +++ b/sc/source/filter/xml/XMLChangeTrackingImportHelper.cxx @@ -212,7 +212,7 @@ ScXMLChangeTrackingImportHelper::ScXMLChangeTrackingImportHelper() sIDPrefix(RTL_CONSTASCII_USTRINGPARAM(SC_CHANGE_ID_PREFIX)), nMultiSpanned(0), nMultiSpannedSlaveCount(0), - bChangeTrack(sal_False) + bChangeTrack(false) { nPrefixLength = sIDPrefix.getLength(); } @@ -465,10 +465,10 @@ void ScXMLChangeTrackingImportHelper::ConvertInfo(const ScMyActionInfo& aInfo, S // old files didn't store 100th seconds, enable again if ( aInfo.aDateTime.HundredthSeconds ) - pTrack->SetTime100thSeconds( TRUE ); + pTrack->SetTime100thSeconds( sal_True ); StrData aStrData( aInfo.sUser ); - USHORT nPos; + sal_uInt16 nPos; if ( pTrack->GetUserCollection().Search( &aStrData, nPos ) ) { const StrData* pUser = static_cast<const StrData*>( pTrack->GetUserCollection().At( nPos ) ); @@ -836,7 +836,7 @@ void ScXMLChangeTrackingImportHelper::CreateChangeTrack(ScDocument* pTempDoc) { pTrack = new ScChangeTrack(pDoc, aUsers); // old files didn't store 100th seconds, disable until encountered - pTrack->SetTime100thSeconds( FALSE ); + pTrack->SetTime100thSeconds( false ); ScMyActions::iterator aItr(aActions.begin()); ScMyActions::iterator aEndItr(aActions.end()); diff --git a/sc/source/filter/xml/XMLCodeNameProvider.cxx b/sc/source/filter/xml/XMLCodeNameProvider.cxx index 454c71e549fe..0a0a825ceb31 100644 --- a/sc/source/filter/xml/XMLCodeNameProvider.cxx +++ b/sc/source/filter/xml/XMLCodeNameProvider.cxx @@ -42,7 +42,7 @@ sal_Bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, String& rCodeN { uno::Sequence<beans::PropertyValue> aProps; if( !(aAny >>= aProps) ) - return sal_False; + return false; OUString sCodeNameProp( RTL_CONSTASCII_USTRINGPARAM("CodeName") ); sal_Int32 nPropCount = aProps.getLength(); @@ -59,7 +59,7 @@ sal_Bool XMLCodeNameProvider::_getCodeName( const uno::Any& aAny, String& rCodeN } } - return sal_False; + return false; } @@ -92,7 +92,7 @@ XMLCodeNameProvider::~XMLCodeNameProvider() } } - return sal_False; + return false; } uno::Any SAL_CALL XMLCodeNameProvider::getByName( const OUString& aName ) @@ -176,7 +176,7 @@ uno::Type SAL_CALL XMLCodeNameProvider::getElementType( ) return sal_True; } - return sal_False; + return false; } void XMLCodeNameProvider::set( const uno::Reference< container::XNameAccess>& xNameAccess, ScDocument *pDoc ) diff --git a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx index 9d5004221ec2..858adcffeb6f 100644 --- a/sc/source/filter/xml/XMLColumnRowGroupExport.cxx +++ b/sc/source/filter/xml/XMLColumnRowGroupExport.cxx @@ -54,7 +54,7 @@ sal_Bool ScMyColumnRowGroup::operator<(const ScMyColumnRowGroup& rGroup) const if (rGroup.nField == nField && rGroup.nLevel > nLevel) return sal_True; else - return sal_False; + return false; } ScMyOpenCloseColumnRowGroup::ScMyOpenCloseColumnRowGroup(ScXMLExport& rTempExport, sal_uInt32 nToken) @@ -83,7 +83,7 @@ void ScMyOpenCloseColumnRowGroup::AddGroup(const ScMyColumnRowGroup& aGroup, con sal_Bool ScMyOpenCloseColumnRowGroup::IsGroupStart(const sal_Int32 nField) { - sal_Bool bGroupStart(sal_False); + sal_Bool bGroupStart(false); if (!aTableStart.empty()) { ScMyColumnRowGroupVec::iterator aItr(aTableStart.begin()); @@ -120,7 +120,7 @@ void ScMyOpenCloseColumnRowGroup::OpenGroups(const sal_Int32 nField) { ScMyColumnRowGroupVec::iterator aItr(aTableStart.begin()); ScMyColumnRowGroupVec::iterator aEndItr(aTableStart.end()); - sal_Bool bReady(sal_False); + sal_Bool bReady(false); while(!bReady && aItr != aEndItr) { if (aItr->nField == nField) @@ -135,7 +135,7 @@ void ScMyOpenCloseColumnRowGroup::OpenGroups(const sal_Int32 nField) sal_Bool ScMyOpenCloseColumnRowGroup::IsGroupEnd(const sal_Int32 nField) { - sal_Bool bGroupEnd(sal_False); + sal_Bool bGroupEnd(false); if (!aTableEnd.empty()) { if (*(aTableEnd.begin()) == nField) @@ -153,7 +153,7 @@ void ScMyOpenCloseColumnRowGroup::CloseGroups(const sal_Int32 nField) { ScMyFieldGroupVec::iterator aItr(aTableEnd.begin()); ScMyFieldGroupVec::iterator aEndItr(aTableEnd.end()); - sal_Bool bReady(sal_False); + sal_Bool bReady(false); while(!bReady && aItr != aEndItr) { if (*aItr == nField) diff --git a/sc/source/filter/xml/XMLConsolidationContext.cxx b/sc/source/filter/xml/XMLConsolidationContext.cxx index d28d8032e9bf..5f96bad52719 100644 --- a/sc/source/filter/xml/XMLConsolidationContext.cxx +++ b/sc/source/filter/xml/XMLConsolidationContext.cxx @@ -49,13 +49,13 @@ using namespace xmloff::token; ScXMLConsolidationContext::ScXMLConsolidationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), eFunction( SUBTOTAL_FUNC_NONE ), - bLinkToSource( sal_False ), - bTargetAddr(sal_False) + bLinkToSource( false ), + bTargetAddr(false) { ScXMLImport::MutexGuard aGuard(GetScImport()); if( !xAttrList.is() ) return; @@ -68,7 +68,7 @@ ScXMLConsolidationContext::ScXMLConsolidationContext( const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); switch( rAttrTokenMap.Get( nPrefix, aLocalName ) ) { @@ -100,7 +100,7 @@ ScXMLConsolidationContext::~ScXMLConsolidationContext() } SvXMLImportContext *ScXMLConsolidationContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ ) { @@ -117,12 +117,12 @@ void ScXMLConsolidationContext::EndElement() aConsParam.nTab = aTargetAddr.Tab(); aConsParam.eFunction = eFunction; - USHORT nCount = (USHORT) Min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF ); + sal_uInt16 nCount = (sal_uInt16) Min( ScRangeStringConverter::GetTokenCount( sSourceList ), (sal_Int32)0xFFFF ); ScArea** ppAreas = nCount ? new ScArea*[ nCount ] : NULL; if( ppAreas ) { sal_Int32 nOffset = 0; - USHORT nIndex; + sal_uInt16 nIndex; for( nIndex = 0; nIndex < nCount; ++nIndex ) { ppAreas[ nIndex ] = new ScArea; @@ -141,13 +141,13 @@ void ScXMLConsolidationContext::EndElement() delete[] ppAreas; } - aConsParam.bByCol = aConsParam.bByRow = FALSE; + aConsParam.bByCol = aConsParam.bByRow = false; if( IsXMLToken(sUseLabel, XML_COLUMN ) ) - aConsParam.bByCol = TRUE; + aConsParam.bByCol = sal_True; else if( IsXMLToken( sUseLabel, XML_ROW ) ) - aConsParam.bByRow = TRUE; + aConsParam.bByRow = sal_True; else if( IsXMLToken( sUseLabel, XML_BOTH ) ) - aConsParam.bByCol = aConsParam.bByRow = TRUE; + aConsParam.bByCol = aConsParam.bByRow = sal_True; aConsParam.bReferenceData = bLinkToSource; diff --git a/sc/source/filter/xml/XMLConsolidationContext.hxx b/sc/source/filter/xml/XMLConsolidationContext.hxx index a059c1309f04..eabf35031dbf 100644 --- a/sc/source/filter/xml/XMLConsolidationContext.hxx +++ b/sc/source/filter/xml/XMLConsolidationContext.hxx @@ -55,14 +55,14 @@ protected: public: ScXMLConsolidationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); virtual ~ScXMLConsolidationContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); diff --git a/sc/source/filter/xml/XMLConverter.cxx b/sc/source/filter/xml/XMLConverter.cxx index f18c26d3b188..5fafe505398a 100644 --- a/sc/source/filter/xml/XMLConverter.cxx +++ b/sc/source/filter/xml/XMLConverter.cxx @@ -251,7 +251,7 @@ sal_Bool ScXMLConverter::GetDetOpTypeFromString( ScDetOpType& rDetOpType, const else if( IsXMLToken(rString, XML_REMOVE_PRECEDENTS ) ) rDetOpType = SCDETOP_DELPRED; else - return sal_False; + return false; return sal_True; } @@ -316,8 +316,8 @@ void ScXMLConverter::GetStringFromDetOpType( void ScXMLConverter::ParseFormula(OUString& sFormula, const sal_Bool bIsFormula) { OUStringBuffer sBuffer(sFormula.getLength()); - sal_Bool bInQuotationMarks(sal_False); - sal_Bool bInDoubleQuotationMarks(sal_False); + sal_Bool bInQuotationMarks(false); + sal_Bool bInDoubleQuotationMarks(false); sal_Int16 nCountBraces(0); sal_Unicode chPrevious('='); for (sal_Int32 i = 0; i < sFormula.getLength(); ++i) diff --git a/sc/source/filter/xml/XMLConverter.hxx b/sc/source/filter/xml/XMLConverter.hxx index f8d6f40ef6d0..a661bc532d01 100644 --- a/sc/source/filter/xml/XMLConverter.hxx +++ b/sc/source/filter/xml/XMLConverter.hxx @@ -68,11 +68,11 @@ public: static void GetStringFromFunction( ::rtl::OUString& rString, const ::com::sun::star::sheet::GeneralFunction eFunction, - sal_Bool bAppendStr = sal_False ); + sal_Bool bAppendStr = false ); static void GetStringFromFunction( ::rtl::OUString& rString, const ScSubTotalFunc eFunction, - sal_Bool bAppendStr = sal_False ); + sal_Bool bAppendStr = false ); // IMPORT: DataPilotFieldOrientation static ::com::sun::star::sheet::DataPilotFieldOrientation @@ -83,7 +83,7 @@ public: static void GetStringFromOrientation( ::rtl::OUString& rString, const ::com::sun::star::sheet::DataPilotFieldOrientation eOrientation, - sal_Bool bAppendStr = sal_False ); + sal_Bool bAppendStr = false ); // IMPORT: Detective static ScDetectiveObjType @@ -97,11 +97,11 @@ public: static void GetStringFromDetObjType( ::rtl::OUString& rString, const ScDetectiveObjType eObjType, - sal_Bool bAppendStr = sal_False ); + sal_Bool bAppendStr = false ); static void GetStringFromDetOpType( ::rtl::OUString& rString, const ScDetOpType eOpType, - sal_Bool bAppendStr = sal_False ); + sal_Bool bAppendStr = false ); // IMPORT: Formulas static void ParseFormula( diff --git a/sc/source/filter/xml/XMLDDELinksContext.cxx b/sc/source/filter/xml/XMLDDELinksContext.cxx index 1ebfab3a212c..94cf98d39849 100644 --- a/sc/source/filter/xml/XMLDDELinksContext.cxx +++ b/sc/source/filter/xml/XMLDDELinksContext.cxx @@ -51,7 +51,7 @@ using rtl::OUString; //------------------------------------------------------------------ ScXMLDDELinksContext::ScXMLDDELinksContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -66,7 +66,7 @@ ScXMLDDELinksContext::~ScXMLDDELinksContext() GetScImport().UnlockSolarMutex(); } -SvXMLImportContext *ScXMLDDELinksContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDELinksContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -87,7 +87,7 @@ void ScXMLDDELinksContext::EndElement() } ScXMLDDELinkContext::ScXMLDDELinkContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -109,7 +109,7 @@ ScXMLDDELinkContext::~ScXMLDDELinkContext() { } -SvXMLImportContext *ScXMLDDELinkContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDELinkContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -205,12 +205,12 @@ void ScXMLDDELinkContext::EndElement() ++aItr; } - GetScImport().GetDocument()->SetDdeLinkResultMatrix( static_cast< USHORT >( nPosition ), pMatrix ); + GetScImport().GetDocument()->SetDdeLinkResultMatrix( static_cast< sal_uInt16 >( nPosition ), pMatrix ); } } ScXMLDDESourceContext::ScXMLDDESourceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -227,7 +227,7 @@ ScXMLDDESourceContext::ScXMLDDESourceContext( ScXMLImport& rImport, const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if (nPrefix == XML_NAMESPACE_OFFICE) { @@ -254,7 +254,7 @@ ScXMLDDESourceContext::~ScXMLDDESourceContext() { } -SvXMLImportContext *ScXMLDDESourceContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDESourceContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -270,7 +270,7 @@ void ScXMLDDESourceContext::EndElement() } ScXMLDDETableContext::ScXMLDDETableContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -285,7 +285,7 @@ ScXMLDDETableContext::~ScXMLDDETableContext() { } -SvXMLImportContext *ScXMLDDETableContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDETableContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -311,7 +311,7 @@ void ScXMLDDETableContext::EndElement() } ScXMLDDEColumnContext::ScXMLDDEColumnContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -329,7 +329,7 @@ ScXMLDDEColumnContext::ScXMLDDEColumnContext( ScXMLImport& rImport, const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if (nPrefix == XML_NAMESPACE_TABLE) if (IsXMLToken(aLocalName, XML_NUMBER_COLUMNS_REPEATED)) @@ -342,7 +342,7 @@ ScXMLDDEColumnContext::~ScXMLDDEColumnContext() { } -SvXMLImportContext *ScXMLDDEColumnContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDEColumnContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -357,7 +357,7 @@ void ScXMLDDEColumnContext::EndElement() } ScXMLDDERowContext::ScXMLDDERowContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -375,7 +375,7 @@ ScXMLDDERowContext::ScXMLDDERowContext( ScXMLImport& rImport, const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if (nPrefix == XML_NAMESPACE_TABLE) if (IsXMLToken(aLocalName, XML_NUMBER_ROWS_REPEATED)) @@ -388,7 +388,7 @@ ScXMLDDERowContext::~ScXMLDDERowContext() { } -SvXMLImportContext *ScXMLDDERowContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDERowContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -411,7 +411,7 @@ void ScXMLDDERowContext::EndElement() } ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -434,7 +434,7 @@ ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport, const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sTempValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if (nPrefix == XML_NAMESPACE_OFFICE) { @@ -443,19 +443,19 @@ ScXMLDDECellContext::ScXMLDDECellContext( ScXMLImport& rImport, if (IsXMLToken(sTempValue, XML_STRING)) bString = sal_True; else - bString = sal_False; + bString = false; } else if (IsXMLToken(aLocalName, XML_STRING_VALUE)) { sValue = sTempValue; - bEmpty = sal_False; + bEmpty = false; bString2 = sal_True; } else if (IsXMLToken(aLocalName, XML_VALUE)) { GetScImport().GetMM100UnitConverter().convertDouble(fValue, sTempValue); - bEmpty = sal_False; - bString2 = sal_False; + bEmpty = false; + bString2 = false; } } else if (nPrefix == XML_NAMESPACE_TABLE) @@ -470,7 +470,7 @@ ScXMLDDECellContext::~ScXMLDDECellContext() { } -SvXMLImportContext *ScXMLDDECellContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDDECellContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/XMLDDELinksContext.hxx b/sc/source/filter/xml/XMLDDELinksContext.hxx index d296df83be2c..2af8015d6476 100644 --- a/sc/source/filter/xml/XMLDDELinksContext.hxx +++ b/sc/source/filter/xml/XMLDDELinksContext.hxx @@ -40,14 +40,14 @@ class ScXMLDDELinksContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDELinksContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDELinksContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLDDELinksContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -80,14 +80,14 @@ class ScXMLDDELinkContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDELinkContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDELinkContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLDDELinkContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -112,7 +112,7 @@ class ScXMLDDESourceContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDESourceContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDESourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -120,7 +120,7 @@ public: virtual ~ScXMLDDESourceContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -135,7 +135,7 @@ class ScXMLDDETableContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDETableContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDETableContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -143,7 +143,7 @@ public: virtual ~ScXMLDDETableContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -158,7 +158,7 @@ class ScXMLDDEColumnContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDEColumnContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDEColumnContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -166,7 +166,7 @@ public: virtual ~ScXMLDDEColumnContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -182,7 +182,7 @@ class ScXMLDDERowContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDERowContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDERowContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -190,7 +190,7 @@ public: virtual ~ScXMLDDERowContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -212,7 +212,7 @@ class ScXMLDDECellContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDDECellContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDDECellContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -220,7 +220,7 @@ public: virtual ~ScXMLDDECellContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx index 3c52f96b558a..812b66b345f5 100644 --- a/sc/source/filter/xml/XMLDetectiveContext.cxx +++ b/sc/source/filter/xml/XMLDetectiveContext.cxx @@ -53,7 +53,7 @@ using namespace xmloff::token; ScMyImpDetectiveObj::ScMyImpDetectiveObj() : aSourceRange(), eObjType( SC_DETOBJ_NONE ), - bHasError( sal_False ) + bHasError( false ) { } @@ -72,7 +72,7 @@ void ScMyImpDetectiveOpArray::Sort() sal_Bool ScMyImpDetectiveOpArray::GetFirstOp( ScMyImpDetectiveOp& rDetOp ) { if( aDetectiveOpList.empty() ) - return sal_False; + return false; ScMyImpDetectiveOpList::iterator aItr = aDetectiveOpList.begin(); rDetOp = *aItr; aDetectiveOpList.erase( aItr ); @@ -84,7 +84,7 @@ sal_Bool ScMyImpDetectiveOpArray::GetFirstOp( ScMyImpDetectiveOp& rDetOp ) ScXMLDetectiveContext::ScXMLDetectiveContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, ScMyImpDetectiveObjVec* pNewDetectiveObjVec ) : SvXMLImportContext( rImport, nPrfx, rLName ), @@ -97,7 +97,7 @@ ScXMLDetectiveContext::~ScXMLDetectiveContext() } SvXMLImportContext *ScXMLDetectiveContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& xAttrList ) { @@ -128,14 +128,14 @@ void ScXMLDetectiveContext::EndElement() ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList, ScMyImpDetectiveObjVec* pNewDetectiveObjVec ): SvXMLImportContext( rImport, nPrfx, rLName ), pDetectiveObjVec( pNewDetectiveObjVec ), aDetectiveObj(), - bValid( sal_False ) + bValid( false ) { if( !xAttrList.is() ) return; @@ -147,7 +147,7 @@ ScXMLDetectiveHighlightedContext::ScXMLDetectiveHighlightedContext( const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); switch( rAttrTokenMap.Get( nPrefix, aLocalName ) ) { @@ -179,7 +179,7 @@ ScXMLDetectiveHighlightedContext::~ScXMLDetectiveHighlightedContext() } SvXMLImportContext *ScXMLDetectiveHighlightedContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ ) { @@ -198,7 +198,7 @@ void ScXMLDetectiveHighlightedContext::EndElement() bValid = sal_True; break; default: - bValid = sal_False; + bValid = false; } if( bValid ) pDetectiveObjVec->push_back( aDetectiveObj ); @@ -209,12 +209,12 @@ void ScXMLDetectiveHighlightedContext::EndElement() ScXMLDetectiveOperationContext::ScXMLDetectiveOperationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), aDetectiveOp(), - bHasType( sal_False ) + bHasType( false ) { if( !xAttrList.is() ) return; @@ -226,7 +226,7 @@ ScXMLDetectiveOperationContext::ScXMLDetectiveOperationContext( const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); switch( rAttrTokenMap.Get( nPrefix, aLocalName ) ) { @@ -250,7 +250,7 @@ ScXMLDetectiveOperationContext::~ScXMLDetectiveOperationContext() } SvXMLImportContext *ScXMLDetectiveOperationContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList>& /* xAttrList */ ) { diff --git a/sc/source/filter/xml/XMLDetectiveContext.hxx b/sc/source/filter/xml/XMLDetectiveContext.hxx index 4e2d6b402574..0e7c8c5a957f 100644 --- a/sc/source/filter/xml/XMLDetectiveContext.hxx +++ b/sc/source/filter/xml/XMLDetectiveContext.hxx @@ -97,14 +97,14 @@ private: public: ScXMLDetectiveContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, ScMyImpDetectiveObjVec* pNewDetectiveObjVec ); virtual ~ScXMLDetectiveContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -127,7 +127,7 @@ private: public: ScXMLDetectiveHighlightedContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList, ScMyImpDetectiveObjVec* pNewDetectiveObjVec @@ -135,7 +135,7 @@ public: virtual ~ScXMLDetectiveHighlightedContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); @@ -157,14 +157,14 @@ private: public: ScXMLDetectiveOperationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); virtual ~ScXMLDetectiveOperationContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList ); diff --git a/sc/source/filter/xml/XMLEmptyContext.cxx b/sc/source/filter/xml/XMLEmptyContext.cxx index 20bec1f097b2..0c38adc344d6 100644 --- a/sc/source/filter/xml/XMLEmptyContext.cxx +++ b/sc/source/filter/xml/XMLEmptyContext.cxx @@ -39,7 +39,7 @@ //------------------------------------------------------------------ ScXMLEmptyContext::ScXMLEmptyContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName) : SvXMLImportContext( rImport, nPrfx, rLName ) { @@ -49,7 +49,7 @@ ScXMLEmptyContext::~ScXMLEmptyContext() { } -SvXMLImportContext *ScXMLEmptyContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLEmptyContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/XMLEmptyContext.hxx b/sc/source/filter/xml/XMLEmptyContext.hxx index 1b090c719281..8c836d0aec96 100644 --- a/sc/source/filter/xml/XMLEmptyContext.hxx +++ b/sc/source/filter/xml/XMLEmptyContext.hxx @@ -42,12 +42,12 @@ class ScXMLEmptyContext : public SvXMLImportContext public: - ScXMLEmptyContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLEmptyContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName); virtual ~ScXMLEmptyContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/XMLExportDDELinks.cxx b/sc/source/filter/xml/XMLExportDDELinks.cxx index 810edc372ba3..70e83b284008 100644 --- a/sc/source/filter/xml/XMLExportDDELinks.cxx +++ b/sc/source/filter/xml/XMLExportDDELinks.cxx @@ -68,9 +68,9 @@ sal_Bool ScXMLExportDDELinks::CellsEqual(const sal_Bool bPrevEmpty, const sal_Bo else return (fPrevValue == fValue); else - return sal_False; + return false; else - return sal_False; + return false; } void ScXMLExportDDELinks::WriteCell(const ScMatrixValue& aVal, sal_Int32 nRepeat) @@ -109,7 +109,7 @@ void ScXMLExportDDELinks::WriteTable(const sal_Int32 nPos) if (!pDoc) return; - const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix(static_cast<USHORT>(nPos)); + const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix(static_cast<sal_uInt16>(nPos)); if (!pMatrix) return; @@ -171,7 +171,7 @@ void ScXMLExportDDELinks::WriteDDELinks(uno::Reference<sheet::XSpreadsheetDocume rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_DDE_TOPIC, xDDELink->getTopic()); rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_DDE_ITEM, xDDELink->getItem()); rExport.AddAttribute(XML_NAMESPACE_OFFICE, XML_AUTOMATIC_UPDATE, XML_TRUE); - BYTE nMode; + sal_uInt8 nMode; if (rExport.GetDocument() && rExport.GetDocument()->GetDdeLinkMode(nDDELink, nMode)) { diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx index 6ecdcfcf1549..968c37f0e1b5 100644 --- a/sc/source/filter/xml/XMLExportDataPilot.cxx +++ b/sc/source/filter/xml/XMLExportDataPilot.cxx @@ -152,8 +152,8 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam) SCSIZE nQueryEntryCount = aQueryParam.GetEntryCount(); if (nQueryEntryCount > 0) { - sal_Bool bAnd(sal_False); - sal_Bool bOr(sal_False); + sal_Bool bAnd(false); + sal_Bool bOr(false); sal_Bool bHasEntries(sal_True); SCSIZE nEntries(0); SCSIZE j; @@ -173,7 +173,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam) ++nEntries; } else - bHasEntries = sal_False; + bHasEntries = false; } nQueryEntryCount = nEntries; if (nQueryEntryCount) @@ -225,7 +225,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam) bOpenAndElement = sal_True; } else - bOpenAndElement = sal_False; + bOpenAndElement = false; for (j = 1; j < nQueryEntryCount; ++j) { if (aConnection != aQueryParam.GetEntry(j).eConnect) @@ -241,7 +241,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam) { WriteDPCondition(aPrevFilterField, aQueryParam.bCaseSens, aQueryParam.bRegExp); rExport.EndElement(aName, sal_True); - bOpenAndElement = sal_False; + bOpenAndElement = false; } } else @@ -251,7 +251,7 @@ void ScXMLExportDataPilot::WriteDPFilter(const ScQueryParam& aQueryParam) if (bOpenAndElement) { rExport.EndElement(aName, sal_True); - bOpenAndElement = sal_False; + bOpenAndElement = false; } if (j == nQueryEntryCount - 1) { diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx index 6c9abb9372fb..3e0ca1857bff 100644 --- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx +++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx @@ -130,7 +130,7 @@ void ScXMLExportDatabaseRanges::WriteImportDescriptor(const uno::Sequence <beans rtl::OUString sConRes; rtl::OUString sSourceObject; sheet::DataImportMode nSourceType = sheet::DataImportMode_NONE; - sal_Bool bNative = sal_False; + sal_Bool bNative = false; for (sal_Int16 i = 0; i < nProperties; ++i) { if (aImportDescriptor[i].Name == rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_DBNAME))) @@ -311,8 +311,8 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee rExport.CheckAttrList(); sal_Bool bIsCaseSensitive = ::cppu::any2bool(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_ISCASE)))); sal_Bool bUseRegularExpressions = ::cppu::any2bool(xPropertySet->getPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_USEREGEX)))); - sal_Bool bAnd = sal_False; - sal_Bool bOr = sal_False; + sal_Bool bAnd = false; + sal_Bool bOr = false; for (sal_Int32 i = 1; i < nTableFilterFields; ++i) { if (aTableFilterFields[i].Connection == sheet::FilterConnection_AND) @@ -353,7 +353,7 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee bOpenAndElement = sal_True; } else - bOpenAndElement = sal_False; + bOpenAndElement = false; for (sal_Int32 i = 1; i < nTableFilterFields; ++i) { if (aConnection != aTableFilterFields[i].Connection) @@ -369,7 +369,7 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee { WriteCondition(aPrevFilterField, bIsCaseSensitive, bUseRegularExpressions); rExport.EndElement(aName, sal_True); - bOpenAndElement = sal_False; + bOpenAndElement = false; } } else @@ -379,7 +379,7 @@ void ScXMLExportDatabaseRanges::WriteFilterDescriptor(const uno::Reference <shee if (bOpenAndElement) { rExport.EndElement(aName, sal_True); - bOpenAndElement = sal_False; + bOpenAndElement = false; } if (i == nTableFilterFields - 1) { @@ -406,8 +406,8 @@ void ScXMLExportDatabaseRanges::WriteSortDescriptor(const uno::Sequence <beans:: { uno::Sequence <table::TableSortField> aSortFields; sal_Bool bBindFormatsToContent (sal_True); - sal_Bool bCopyOutputData (sal_False); - sal_Bool bIsUserListEnabled (sal_False); + sal_Bool bCopyOutputData (false); + sal_Bool bIsUserListEnabled (false); table::CellAddress aOutputPosition; sal_Int32 nUserListIndex = 0; sal_Int32 nProperties = aSortProperties.getLength(); @@ -627,7 +627,7 @@ void ScXMLExportDatabaseRanges::WriteDatabaseRanges(const com::sun::star::uno::R rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_CONTAINS_HEADER, XML_FALSE); sal_Bool bSortColumns(sal_True); - sal_Bool bFound(sal_False); + sal_Bool bFound(false); sal_Int32 nProperty(0); while (!bFound && (nProperty < aSortProperties.getLength())) { diff --git a/sc/source/filter/xml/XMLExportIterator.cxx b/sc/source/filter/xml/XMLExportIterator.cxx index 0edf54a7e71d..d990bf035038 100644 --- a/sc/source/filter/xml/XMLExportIterator.cxx +++ b/sc/source/filter/xml/XMLExportIterator.cxx @@ -109,7 +109,7 @@ sal_Bool ScMyShapesContainer::GetFirstAddress( table::CellAddress& rCellAddress ScUnoConversion::FillApiAddress( rCellAddress, aShapeList.begin()->aAddress ); return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyShapesContainer::SetCellData( ScMyCell& rMyCell ) @@ -172,7 +172,7 @@ sal_Bool ScMyNoteShapesContainer::GetFirstAddress( table::CellAddress& rCellAddr ScUnoConversion::FillApiAddress( rCellAddress, aNoteShapeList.begin()->aPos ); return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyNoteShapesContainer::SetCellData( ScMyCell& rMyCell ) @@ -235,7 +235,7 @@ void ScMyMergedRangesContainer::AddRange(const table::CellRangeAddress aMergedRa aRange.nRows = nEndRow - nStartRow + 1; aRangeList.push_back( aRange ); - aRange.bIsFirst = sal_False; + aRange.bIsFirst = false; aRange.nRows = 0; for( sal_Int32 nRow = nStartRow + 1; nRow <= nEndRow; ++nRow ) { @@ -252,12 +252,12 @@ sal_Bool ScMyMergedRangesContainer::GetFirstAddress( table::CellAddress& rCellAd ScUnoConversion::FillApiStartAddress( rCellAddress, aRangeList.begin()->aCellRange ); return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyMergedRangesContainer::SetCellData( ScMyCell& rMyCell ) { - rMyCell.bIsMergedBase = rMyCell.bIsCovered = sal_False; + rMyCell.bIsMergedBase = rMyCell.bIsCovered = false; ScMyMergedRangeList::iterator aItr(aRangeList.begin()); if( aItr != aRangeList.end() ) { @@ -273,7 +273,7 @@ void ScMyMergedRangesContainer::SetCellData( ScMyCell& rMyCell ) if( aItr->aCellRange.StartColumn < aItr->aCellRange.EndColumn ) { ++(aItr->aCellRange.StartColumn); - aItr->bIsFirst = sal_False; + aItr->bIsFirst = false; } else aRangeList.erase(aItr); @@ -331,12 +331,12 @@ sal_Bool ScMyAreaLinksContainer::GetFirstAddress( table::CellAddress& rCellAddre ScUnoConversion::FillApiStartAddress( rCellAddress, aAreaLinkList.begin()->aDestRange ); return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyAreaLinksContainer::SetCellData( ScMyCell& rMyCell ) { - rMyCell.bHasAreaLink = sal_False; + rMyCell.bHasAreaLink = false; ScMyAreaLinkList::iterator aItr(aAreaLinkList.begin()); if( aItr != aAreaLinkList.end() ) { @@ -357,7 +357,7 @@ void ScMyAreaLinksContainer::SetCellData( ScMyCell& rMyCell ) aItr = aAreaLinkList.erase( aItr ); } else - bFound = sal_False; + bFound = false; } } } @@ -421,12 +421,12 @@ sal_Bool ScMyEmptyDatabaseRangesContainer::GetFirstAddress( table::CellAddress& ScUnoConversion::FillApiStartAddress( rCellAddress, *(aDatabaseList.begin()) ); return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyEmptyDatabaseRangesContainer::SetCellData( ScMyCell& rMyCell ) { - rMyCell.bHasEmptyDatabase = sal_False; + rMyCell.bHasEmptyDatabase = false; ScMyEmptyDatabaseRangeList::iterator aItr(aDatabaseList.begin()); if( aItr != aDatabaseList.end() ) { @@ -515,7 +515,7 @@ sal_Bool ScMyDetectiveObjContainer::GetFirstAddress( table::CellAddress& rCellAd rCellAddress = aDetectiveObjList.begin()->aPosition; return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyDetectiveObjContainer::SetCellData( ScMyCell& rMyCell ) @@ -581,7 +581,7 @@ sal_Bool ScMyDetectiveOpContainer::GetFirstAddress( table::CellAddress& rCellAdd rCellAddress = aDetectiveOpList.begin()->aPosition; return (nTable == rCellAddress.Sheet); } - return sal_False; + return false; } void ScMyDetectiveOpContainer::SetCellData( ScMyCell& rMyCell ) @@ -617,22 +617,22 @@ ScMyCell::ScMyCell() : fValue(0.0), nValidationIndex(-1), pBaseCell(NULL), - bIsAutoStyle( sal_False ), - bHasShape( sal_False ), - bIsMergedBase( sal_False ), - bIsCovered( sal_False ), - bHasAreaLink( sal_False ), - bHasEmptyDatabase( sal_False ), - bHasDetectiveObj( sal_False ), - bHasDetectiveOp( sal_False ), - bIsEditCell( sal_False ), - bKnowWhetherIsEditCell( sal_False ), - bHasStringValue( sal_False ), - bHasDoubleValue( sal_False ), - bHasXText( sal_False ), - bIsMatrixBase( sal_False ), - bIsMatrixCovered( sal_False ), - bHasAnnotation( sal_False ) + bIsAutoStyle( false ), + bHasShape( false ), + bIsMergedBase( false ), + bIsCovered( false ), + bHasAreaLink( false ), + bHasEmptyDatabase( false ), + bHasDetectiveObj( false ), + bHasDetectiveOp( false ), + bIsEditCell( false ), + bKnowWhetherIsEditCell( false ), + bHasStringValue( false ), + bHasDoubleValue( false ), + bHasXText( false ), + bIsMatrixBase( false ), + bIsMatrixCovered( false ), + bHasAnnotation( false ) { } @@ -702,21 +702,21 @@ void ScMyNotEmptyCellsIterator::UpdateAddress( table::CellAddress& rAddress ) void ScMyNotEmptyCellsIterator::SetCellData( ScMyCell& rMyCell, table::CellAddress& rAddress ) { rMyCell.aCellAddress = rAddress; - rMyCell.bHasStringValue = sal_False; - rMyCell.bHasDoubleValue = sal_False; - rMyCell.bHasXText = sal_False; - rMyCell.bKnowWhetherIsEditCell = sal_False; - rMyCell.bIsEditCell = sal_False; + rMyCell.bHasStringValue = false; + rMyCell.bHasDoubleValue = false; + rMyCell.bHasXText = false; + rMyCell.bKnowWhetherIsEditCell = false; + rMyCell.bIsEditCell = false; if( (nCellCol == rAddress.Column) && (nCellRow == rAddress.Row) ) pCellItr->GetNext( nCellCol, nCellRow ); } void ScMyNotEmptyCellsIterator::SetMatrixCellData( ScMyCell& rMyCell ) { - rMyCell.bIsMatrixCovered = sal_False; - rMyCell.bIsMatrixBase = sal_False; + rMyCell.bIsMatrixCovered = false; + rMyCell.bIsMatrixBase = false; - sal_Bool bIsMatrixBase(sal_False); + sal_Bool bIsMatrixBase(false); ScAddress aScAddress; ScUnoConversion::FillScAddress( aScAddress, rMyCell.aCellAddress ); @@ -747,7 +747,7 @@ void ScMyNotEmptyCellsIterator::SetMatrixCellData( ScMyCell& rMyCell ) void ScMyNotEmptyCellsIterator::HasAnnotation(ScMyCell& aCell) { - aCell.bHasAnnotation = sal_False; + aCell.bHasAnnotation = false; if (!aAnnotations.empty()) { ScMyExportAnnotationList::iterator aItr(aAnnotations.begin()); diff --git a/sc/source/filter/xml/XMLExportSharedData.cxx b/sc/source/filter/xml/XMLExportSharedData.cxx index 1e7b3e506cc5..7849b64efe9c 100644 --- a/sc/source/filter/xml/XMLExportSharedData.cxx +++ b/sc/source/filter/xml/XMLExportSharedData.cxx @@ -109,7 +109,7 @@ uno::Reference<drawing::XDrawPage> ScMySharedData::GetDrawPage(const sal_Int32 n sal_Bool ScMySharedData::HasForm(const sal_Int32 nTable, uno::Reference<drawing::XDrawPage>& xDrawPage) { - sal_Bool bResult(sal_False); + sal_Bool bResult(false); if (pDrawPages) { if ((*pDrawPages)[nTable].bHasForms) diff --git a/sc/source/filter/xml/XMLExportSharedData.hxx b/sc/source/filter/xml/XMLExportSharedData.hxx index e12a7111fd9e..3c131f5925fe 100644 --- a/sc/source/filter/xml/XMLExportSharedData.hxx +++ b/sc/source/filter/xml/XMLExportSharedData.hxx @@ -40,7 +40,7 @@ struct ScMyDrawPage com::sun::star::uno::Reference<com::sun::star::drawing::XDrawPage> xDrawPage; sal_Bool bHasForms; - ScMyDrawPage() : bHasForms(sal_False) {} + ScMyDrawPage() : bHasForms(false) {} }; typedef std::list< com::sun::star::uno::Reference<com::sun::star::drawing::XShape> > ScMyTableXShapes; diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx index 8e37136af94b..c3685941c736 100644 --- a/sc/source/filter/xml/XMLStylesExportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx @@ -63,9 +63,9 @@ ScMyValidation::ScMyValidation() sImputTitle(), sFormula1(), sFormula2(), - bShowErrorMessage(sal_False), - bShowImputMessage(sal_False), - bIgnoreBlanks(sal_False) + bShowErrorMessage(false), + bShowImputMessage(false), + bIgnoreBlanks(false) { } @@ -92,7 +92,7 @@ sal_Bool ScMyValidation::IsEqual(const ScMyValidation& aVal) const aVal.sFormula2 == sFormula2) return sal_True; else - return sal_False; + return false; } ScMyValidationsContainer::ScMyValidationsContainer() @@ -124,7 +124,7 @@ ScMyValidationsContainer::~ScMyValidationsContainer() sal_Bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny, sal_Int32& nValidationIndex) { - sal_Bool bAdded(sal_False); + sal_Bool bAdded(false); uno::Reference<beans::XPropertySet> xPropertySet(aTempAny, uno::UNO_QUERY); if (xPropertySet.is()) { @@ -163,7 +163,7 @@ sal_Bool ScMyValidationsContainer::AddValidation(const uno::Any& aTempAny, aValidation.aBaseCell = xCondition->getSourcePosition(); } //ScMyValidationRange aValidationRange; - sal_Bool bEqualFound(sal_False); + sal_Bool bEqualFound(false); sal_Int32 i(0); sal_Int32 nCount(aValidationVec.size()); while (i < nCount && !bEqualFound) @@ -299,7 +299,7 @@ rtl::OUString ScMyValidationsContainer::GetCondition(ScXMLExport& rExport, const { const formula::FormulaGrammar::Grammar eGrammar = rExport.GetDocument()->GetStorageGrammar(); sal_uInt16 nNamespacePrefix = (eGrammar == formula::FormulaGrammar::GRAM_ODFF ? XML_NAMESPACE_OF : XML_NAMESPACE_OOOC); - sCondition = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sCondition, sal_False ); + sCondition = rExport.GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sCondition, false ); } return sCondition; @@ -338,7 +338,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport, { if ((sText[i] == '\n')) { - SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); + SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false); rExport.GetTextParagraphExport()->exportText(sTemp.makeStringAndClear(), bPrevCharWasSpace); } else @@ -347,7 +347,7 @@ void ScMyValidationsContainer::WriteMessage(ScXMLExport& rExport, } if (sTemp.getLength()) { - SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); + SvXMLElementExport aElemP(rExport, XML_NAMESPACE_TEXT, XML_P, sal_True, false); rExport.GetTextParagraphExport()->exportText(sTemp.makeStringAndClear(), bPrevCharWasSpace); } } @@ -404,19 +404,19 @@ void ScMyValidationsContainer::WriteValidations(ScXMLExport& rExport) case sheet::ValidationAlertStyle_INFO : { rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MESSAGE_TYPE, XML_INFORMATION); - WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, sal_False); + WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, false); } break; case sheet::ValidationAlertStyle_WARNING : { rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MESSAGE_TYPE, XML_WARNING); - WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, sal_False); + WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, false); } break; case sheet::ValidationAlertStyle_STOP : { rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_MESSAGE_TYPE, XML_STOP); - WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, sal_False); + WriteMessage(rExport, aItr->sErrorTitle, aItr->sErrorMessage, aItr->bShowErrorMessage, false); } break; case sheet::ValidationAlertStyle_MACRO : @@ -501,7 +501,7 @@ void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable, pDefaults = pColDefaults; nLast = nLastCol; } - sal_Bool bPrevAutoStyle(sal_False); + sal_Bool bPrevAutoStyle(false); sal_Bool bIsAutoStyle; sal_Bool bResult; sal_Int32 nPrevIndex(0); @@ -584,7 +584,7 @@ void ScMyDefaultStyles::FillDefaultStyles(const sal_Int32 nTable, if (pColDefaults) delete pColDefaults; pColDefaults = new ScMyDefaultStyleList(nLastCol + 1); - FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, sal_False); + FillDefaultStyles(nTable, nLastRow, nLastCol, pCellStyles, pDoc, false); } ScMyDefaultStyles::~ScMyDefaultStyles() @@ -644,7 +644,7 @@ void ScRowFormatRanges::AddRange(const sal_Int32 nPrevStartCol, const sal_Int32 (bPrevAutoStyle != rFormatRange.bIsAutoStyle)) nIndex = rFormatRange.nIndex; - sal_Bool bInserted(sal_False); + sal_Bool bInserted(false); if (!aRowFormatRanges.empty()) { ScMyRowFormatRange* pRange(&aRowFormatRanges.back()); @@ -685,7 +685,7 @@ void ScRowFormatRanges::AddRange(ScMyRowFormatRange& rFormatRange, sal_Int32 nPrevIndex((*pRowDefaults)[nRow].nIndex); sal_Bool bPrevAutoStyle((*pRowDefaults)[nRow].bIsAutoStyle); sal_uInt32 i(nRow + 1); - sal_Bool bReady(sal_False); + sal_Bool bReady(false); while ((i < nEnd) && !bReady && (i < pRowDefaults->size())) { if ((nPrevIndex != (*pRowDefaults)[i].nIndex) || @@ -743,7 +743,7 @@ sal_Bool ScRowFormatRanges::GetNext(ScMyRowFormatRange& aFormatRange) --nSize; return sal_True; } - return sal_False; + return false; } sal_Int32 ScRowFormatRanges::GetMaxRows() const @@ -793,7 +793,7 @@ sal_Bool ScMyFormatRange::operator<(const ScMyFormatRange& rRange) const if (aRangeAddress.StartRow == rRange.aRangeAddress.StartRow) return (aRangeAddress.StartColumn < rRange.aRangeAddress.StartColumn); else - return sal_False; + return false; } ScFormatRangeStyles::ScFormatRangeStyles() @@ -850,7 +850,7 @@ sal_Bool ScFormatRangeStyles::AddStyleName(rtl::OUString* rpString, sal_Int32& r else { sal_Int32 nCount(aStyleNames.size()); - sal_Bool bFound(sal_False); + sal_Bool bFound(false); sal_Int32 i(nCount - 1); while ((i >= 0) && (!bFound)) { @@ -862,7 +862,7 @@ sal_Bool ScFormatRangeStyles::AddStyleName(rtl::OUString* rpString, sal_Int32& r if (bFound) { rIndex = i; - return sal_False; + return false; } else { @@ -886,7 +886,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const rtl::OUString& rString, else { sal_Int32 i(0); - sal_Bool bFound(sal_False); + sal_Bool bFound(false); while (!bFound && static_cast<size_t>(i) < aStyleNames.size()) { if (aStyleNames[i]->equals(rString)) @@ -896,7 +896,7 @@ sal_Int32 ScFormatRangeStyles::GetIndexOfStyleName(const rtl::OUString& rString, } if (bFound) { - bIsAutoStyle = sal_False; + bIsAutoStyle = false; return i; } else @@ -1116,7 +1116,7 @@ sal_Int32 ScColumnRowStylesBase::GetIndexOfStyleName(const rtl::OUString& rStrin else { sal_Int32 i(0); - sal_Bool bFound(sal_False); + sal_Bool bFound(false); while (!bFound && static_cast<size_t>(i) < aStyleNames.size()) { if (aStyleNames.at(i)->equals(rString)) diff --git a/sc/source/filter/xml/XMLStylesImportHelper.cxx b/sc/source/filter/xml/XMLStylesImportHelper.cxx index 14b5e3c001bd..1087a6840e8d 100644 --- a/sc/source/filter/xml/XMLStylesImportHelper.cxx +++ b/sc/source/filter/xml/XMLStylesImportHelper.cxx @@ -476,7 +476,7 @@ void ScMyStylesImportHelper::AddRange(const ScRange& rRange) { if (!bPrevRangeAdded) { - sal_Bool bAddRange(sal_False); + sal_Bool bAddRange(false); if (nCellType == nPrevCellType && IsEqual(pStyleName, pPrevStyleName) && IsEqual(pCurrency, pPrevCurrency)) @@ -515,7 +515,7 @@ void ScMyStylesImportHelper::AddRange(const ScRange& rRange) { aPrevRange = rRange; ResetAttributes(); - bPrevRangeAdded = sal_False; + bPrevRangeAdded = false; } } diff --git a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx index 07c983e90180..7e21651685e1 100644 --- a/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx +++ b/sc/source/filter/xml/XMLTableHeaderFooterContext.cxx @@ -64,9 +64,9 @@ XMLTableHeaderFooterContext::XMLTableHeaderFooterContext( SvXMLImport& rImport, bDisplay( sal_True ), bInsertContent( sal_True ), bLeft( bLft ), - bContainsLeft(sal_False), - bContainsRight(sal_False), - bContainsCenter(sal_False) + bContainsLeft(false), + bContainsRight(false), + bContainsCenter(false) { sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); for( sal_Int16 i=0; i < nAttrCount; ++i ) @@ -91,7 +91,7 @@ XMLTableHeaderFooterContext::XMLTableHeaderFooterContext( SvXMLImport& rImport, { if( ::cppu::any2bool(xPropSet->getPropertyValue( sShareContent )) ) // Don't share headers any longer - xPropSet->setPropertyValue( sShareContent, uno::makeAny(sal_False) ); + xPropSet->setPropertyValue( sShareContent, uno::makeAny(false) ); } else { diff --git a/sc/source/filter/xml/XMLTableMasterPageExport.cxx b/sc/source/filter/xml/XMLTableMasterPageExport.cxx index aeb0444ae2a5..4b145b9df1d3 100644 --- a/sc/source/filter/xml/XMLTableMasterPageExport.cxx +++ b/sc/source/filter/xml/XMLTableMasterPageExport.cxx @@ -63,11 +63,11 @@ void XMLTableMasterPageExport::exportHeaderFooterContent( if( bAutoStyles ) GetExport().GetTextParagraphExport() - ->collectTextAutoStyles( rText, bProgress, sal_False ); + ->collectTextAutoStyles( rText, bProgress, false ); else { GetExport().GetTextParagraphExport()->exportTextDeclarations( rText ); - GetExport().GetTextParagraphExport()->exportText( rText, bProgress, sal_False ); + GetExport().GetTextParagraphExport()->exportText( rText, bProgress, false ); } } @@ -92,26 +92,26 @@ void XMLTableMasterPageExport::exportHeaderFooter(const com::sun::star::uno::Ref SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_STYLE, aName, sal_True, sal_True ); if (sCenter.getLength() && !sLeft.getLength() && !sRight.getLength()) - exportHeaderFooterContent( xCenter, sal_False, sal_False ); + exportHeaderFooterContent( xCenter, false, false ); else { if (sLeft.getLength()) { SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE, XML_REGION_LEFT, sal_True, sal_True ); - exportHeaderFooterContent( xLeft, sal_False, sal_False ); + exportHeaderFooterContent( xLeft, false, false ); } if (sCenter.getLength()) { SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE, XML_REGION_CENTER, sal_True, sal_True ); - exportHeaderFooterContent( xCenter, sal_False, sal_False ); + exportHeaderFooterContent( xCenter, false, false ); } if (sRight.getLength()) { SvXMLElementExport aSubElem( GetExport(), XML_NAMESPACE_STYLE, XML_REGION_RIGHT, sal_True, sal_True ); - exportHeaderFooterContent( xRight, sal_False, sal_False ); + exportHeaderFooterContent( xRight, false, false ); } } } @@ -134,27 +134,27 @@ void XMLTableMasterPageExport::exportMasterPageContent( { if( xHeader.is() ) { - exportHeaderFooterContent( xHeader->getCenterText(), sal_True, sal_False ); - exportHeaderFooterContent( xHeader->getLeftText(), sal_True, sal_False ); - exportHeaderFooterContent( xHeader->getRightText(), sal_True, sal_False ); + exportHeaderFooterContent( xHeader->getCenterText(), sal_True, false ); + exportHeaderFooterContent( xHeader->getLeftText(), sal_True, false ); + exportHeaderFooterContent( xHeader->getRightText(), sal_True, false ); } if( xHeaderLeft.is()) { - exportHeaderFooterContent( xHeaderLeft->getCenterText(), sal_True, sal_False ); - exportHeaderFooterContent( xHeaderLeft->getLeftText(), sal_True, sal_False ); - exportHeaderFooterContent( xHeaderLeft->getRightText(), sal_True, sal_False ); + exportHeaderFooterContent( xHeaderLeft->getCenterText(), sal_True, false ); + exportHeaderFooterContent( xHeaderLeft->getLeftText(), sal_True, false ); + exportHeaderFooterContent( xHeaderLeft->getRightText(), sal_True, false ); } if( xFooter.is() ) { - exportHeaderFooterContent( xFooter->getCenterText(), sal_True, sal_False ); - exportHeaderFooterContent( xFooter->getLeftText(), sal_True, sal_False ); - exportHeaderFooterContent( xFooter->getRightText(), sal_True, sal_False ); + exportHeaderFooterContent( xFooter->getCenterText(), sal_True, false ); + exportHeaderFooterContent( xFooter->getLeftText(), sal_True, false ); + exportHeaderFooterContent( xFooter->getRightText(), sal_True, false ); } if( xFooterLeft.is()) { - exportHeaderFooterContent( xFooterLeft->getCenterText(), sal_True, sal_False ); - exportHeaderFooterContent( xFooterLeft->getLeftText(), sal_True, sal_False ); - exportHeaderFooterContent( xFooterLeft->getRightText(), sal_True, sal_False ); + exportHeaderFooterContent( xFooterLeft->getCenterText(), sal_True, false ); + exportHeaderFooterContent( xFooterLeft->getLeftText(), sal_True, false ); + exportHeaderFooterContent( xFooterLeft->getRightText(), sal_True, false ); } } else diff --git a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx index 519e5e66ef2a..27c9cb701a27 100644 --- a/sc/source/filter/xml/XMLTableShapeImportHelper.cxx +++ b/sc/source/filter/xml/XMLTableShapeImportHelper.cxx @@ -58,7 +58,7 @@ XMLTableShapeImportHelper::XMLTableShapeImportHelper( ScXMLImport& rImp, SvXMLImportPropertyMapper *pImpMapper ) : XMLShapeImportHelper(rImp, rImp.GetModel(), pImpMapper ), pAnnotationContext(NULL), - bOnTable(sal_False) + bOnTable(false) { } diff --git a/sc/source/filter/xml/XMLTableShapeResizer.cxx b/sc/source/filter/xml/XMLTableShapeResizer.cxx index 8851e6434638..e5281f43cb88 100644 --- a/sc/source/filter/xml/XMLTableShapeResizer.cxx +++ b/sc/source/filter/xml/XMLTableShapeResizer.cxx @@ -103,7 +103,7 @@ void ScMyOLEFixer::CreateChartListener(ScDocument* pDoc, //if we have the flat filter we need to set the dirty flag thus the visible charts get repainted //otherwise the charts keep their first visual representation which was created at a moment where the calc itself was not loaded completly and is incorect therefor if( (rImport.getImportFlags() & IMPORT_ALL) == IMPORT_ALL ) - pCL->SetDirty( TRUE ); + pCL->SetDirty( sal_True ); else { // #i104899# If a formula cell is already dirty, further changes aren't propagated. diff --git a/sc/source/filter/xml/XMLTableShapesContext.cxx b/sc/source/filter/xml/XMLTableShapesContext.cxx index 2421bb785870..6a995fe9f052 100644 --- a/sc/source/filter/xml/XMLTableShapesContext.cxx +++ b/sc/source/filter/xml/XMLTableShapesContext.cxx @@ -43,7 +43,7 @@ using namespace com::sun::star; //------------------------------------------------------------------ ScXMLTableShapesContext::ScXMLTableShapesContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -56,7 +56,7 @@ ScXMLTableShapesContext::~ScXMLTableShapesContext() { } -SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableShapesContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) diff --git a/sc/source/filter/xml/XMLTableShapesContext.hxx b/sc/source/filter/xml/XMLTableShapesContext.hxx index 168e7538ed0f..ba92335aae26 100644 --- a/sc/source/filter/xml/XMLTableShapesContext.hxx +++ b/sc/source/filter/xml/XMLTableShapesContext.hxx @@ -38,14 +38,14 @@ class ScXMLTableShapesContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLTableShapesContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableShapesContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLTableShapesContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/XMLTableSourceContext.cxx b/sc/source/filter/xml/XMLTableSourceContext.cxx index d3607a2ab279..303b4eb684c2 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.cxx +++ b/sc/source/filter/xml/XMLTableSourceContext.cxx @@ -49,7 +49,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLTableSourceContext::ScXMLTableSourceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : @@ -101,7 +101,7 @@ ScXMLTableSourceContext::~ScXMLTableSourceContext() { } -SvXMLImportContext *ScXMLTableSourceContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableSourceContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -119,7 +119,7 @@ void ScXMLTableSourceContext::EndElement() { ScXMLImport::MutexGuard aGuard(GetScImport()); if (pDoc->RenameTab( static_cast<SCTAB>(GetScImport().GetTables().GetCurrentSheet()), - GetScImport().GetTables().GetCurrentSheetName(), sal_False, sal_True)) + GetScImport().GetTables().GetCurrentSheetName(), false, sal_True)) { String aFileString(sLink); String aFilterString(sFilterName); @@ -128,9 +128,9 @@ void ScXMLTableSourceContext::EndElement() aFileString = ScGlobal::GetAbsDocName( aFileString, pDoc->GetDocumentShell() ); if ( !aFilterString.Len() ) - ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, FALSE, FALSE ); + ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, false, false ); - BYTE nLinkMode = SC_LINK_NONE; + sal_uInt8 nLinkMode = SC_LINK_NONE; if ( nMode == sheet::SheetLinkMode_NORMAL ) nLinkMode = SC_LINK_NORMAL; else if ( nMode == sheet::SheetLinkMode_VALUE ) diff --git a/sc/source/filter/xml/XMLTableSourceContext.hxx b/sc/source/filter/xml/XMLTableSourceContext.hxx index 00985a721bb1..8edc8551b121 100644 --- a/sc/source/filter/xml/XMLTableSourceContext.hxx +++ b/sc/source/filter/xml/XMLTableSourceContext.hxx @@ -46,14 +46,14 @@ class ScXMLTableSourceContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLTableSourceContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableSourceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLTableSourceContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/XMLTextPContext.cxx b/sc/source/filter/xml/XMLTextPContext.cxx index 724a87a65626..8251da5dfa0b 100644 --- a/sc/source/filter/xml/XMLTextPContext.cxx +++ b/sc/source/filter/xml/XMLTextPContext.cxx @@ -49,7 +49,7 @@ class ScXMLTextTContext : public SvXMLImportContext const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLTextTContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTextTContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -60,7 +60,7 @@ public: ScXMLTextTContext::ScXMLTextTContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -92,7 +92,7 @@ ScXMLTextTContext::~ScXMLTextTContext() //------------------------------------------------------------------ ScXMLTextPContext::ScXMLTextPContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xTempAttrList, @@ -129,7 +129,7 @@ void ScXMLTextPContext::AddSpaces(sal_Int32 nSpaceCount) pContentBuffer->appendAscii(pChars, nSpaceCount); } -SvXMLImportContext *ScXMLTextPContext::CreateChildContext( USHORT nTempPrefix, +SvXMLImportContext *ScXMLTextPContext::CreateChildContext( sal_uInt16 nTempPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xTempAttrList ) diff --git a/sc/source/filter/xml/XMLTextPContext.hxx b/sc/source/filter/xml/XMLTextPContext.hxx index e2f3e9446b2e..20dda85322c3 100644 --- a/sc/source/filter/xml/XMLTextPContext.hxx +++ b/sc/source/filter/xml/XMLTextPContext.hxx @@ -43,14 +43,14 @@ class ScXMLTextPContext : public SvXMLImportContext rtl::OUString sLName; rtl::OUString sSimpleContent; // copy of the first Character call's argument rtl::OUStringBuffer* pContentBuffer; // used if there's more than one string - USHORT nPrefix; + sal_uInt16 nPrefix; sal_Bool bIsOwn; const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLTextPContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTextPContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -58,7 +58,7 @@ public: virtual ~ScXMLTextPContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.cxx b/sc/source/filter/xml/XMLTrackedChangesContext.cxx index 60184f7281a1..be365f4b1041 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.cxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.cxx @@ -65,13 +65,13 @@ class ScXMLChangeInfoContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLChangeInfoContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLChangeInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLChangeInfoContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -89,13 +89,13 @@ class ScXMLBigRangeContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLBigRangeContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLBigRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScBigRange& rBigRange); virtual ~ScXMLBigRangeContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -128,13 +128,13 @@ class ScXMLCellContentDeletionContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLCellContentDeletionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLCellContentDeletionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLCellContentDeletionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -152,13 +152,13 @@ class ScXMLDependenceContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDependenceContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLDependenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLDependenceContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -176,13 +176,13 @@ class ScXMLDependingsContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDependingsContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLDependingsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLDependingsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -200,13 +200,13 @@ class ScXMLChangeDeletionContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLChangeDeletionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLChangeDeletionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLChangeDeletionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -224,13 +224,13 @@ class ScXMLDeletionsContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDeletionsContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLDeletionsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLDeletionsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -249,14 +249,14 @@ class ScXMLChangeTextPContext : public SvXMLImportContext rtl::OUStringBuffer sText; ScXMLChangeCellContext* pChangeCellContext; SvXMLImportContext* pTextPContext; - USHORT nPrefix; + sal_uInt16 nPrefix; const ScXMLImport& GetScImport() const { return (const ScXMLImport&)GetImport(); } ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLChangeTextPContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLChangeTextPContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -264,7 +264,7 @@ public: virtual ~ScXMLChangeTextPContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -294,7 +294,7 @@ class ScXMLChangeCellContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLChangeCellContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLChangeCellContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScBaseCell*& rOldCell, rtl::OUString& sAddress, @@ -304,7 +304,7 @@ public: sal_uInt8& nMatrixFlag, sal_Int32& nMatrixCols, sal_Int32& nMatrixRows); virtual ~ScXMLChangeCellContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -338,13 +338,13 @@ class ScXMLPreviousContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLPreviousContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLPreviousContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLPreviousContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -363,13 +363,13 @@ class ScXMLContentChangeContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLContentChangeContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLContentChangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLContentChangeContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -386,13 +386,13 @@ class ScXMLInsertionContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLInsertionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLInsertionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLInsertionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -409,13 +409,13 @@ class ScXMLInsertionCutOffContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLInsertionCutOffContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLInsertionCutOffContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLInsertionCutOffContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -432,13 +432,13 @@ class ScXMLMovementCutOffContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLMovementCutOffContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLMovementCutOffContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLMovementCutOffContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -455,13 +455,13 @@ class ScXMLCutOffsContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLCutOffsContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLCutOffsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLCutOffsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -478,13 +478,13 @@ class ScXMLDeletionContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLDeletionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLDeletionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLDeletionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -503,13 +503,13 @@ class ScXMLMovementContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLMovementContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLMovementContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLMovementContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -526,13 +526,13 @@ class ScXMLRejectionContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLRejectionContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLRejectionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLRejectionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -542,7 +542,7 @@ public: //------------------------------------------------------------------ ScXMLTrackedChangesContext::ScXMLTrackedChangesContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -580,7 +580,7 @@ ScXMLTrackedChangesContext::~ScXMLTrackedChangesContext() GetScImport().UnlockSolarMutex(); } -SvXMLImportContext *ScXMLTrackedChangesContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTrackedChangesContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -622,7 +622,7 @@ void ScXMLTrackedChangesContext::EndElement() } ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -636,7 +636,7 @@ ScXMLChangeInfoContext::ScXMLChangeInfoContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -658,7 +658,7 @@ ScXMLChangeInfoContext::~ScXMLChangeInfoContext() { } -SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLChangeInfoContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -697,16 +697,16 @@ void ScXMLChangeInfoContext::EndElement() } ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScBigRange& rTempBigRange ) : SvXMLImportContext( rImport, nPrfx, rLName ), rBigRange(rTempBigRange) { - sal_Bool bColumn(sal_False); - sal_Bool bRow(sal_False); - sal_Bool bTable(sal_False); + sal_Bool bColumn(false); + sal_Bool bRow(false); + sal_Bool bTable(false); sal_Int32 nColumn(0); sal_Int32 nRow(0); sal_Int32 nTable(0); @@ -721,7 +721,7 @@ ScXMLBigRangeContext::ScXMLBigRangeContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -770,7 +770,7 @@ ScXMLBigRangeContext::~ScXMLBigRangeContext() { } -SvXMLImportContext *ScXMLBigRangeContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLBigRangeContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -783,7 +783,7 @@ void ScXMLBigRangeContext::EndElement() } ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper) : @@ -795,15 +795,15 @@ ScXMLCellContentDeletionContext::ScXMLCellContentDeletionContext( ScXMLImport& nMatrixRows(0), nType(NUMBERFORMAT_ALL), nMatrixFlag(MM_NONE), - bBigRange(sal_False), - bContainsCell(sal_False) + bBigRange(false), + bContainsCell(false) { sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); for( sal_Int16 i=0; i < nAttrCount; ++i ) { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -819,7 +819,7 @@ ScXMLCellContentDeletionContext::~ScXMLCellContentDeletionContext() { } -SvXMLImportContext *ScXMLCellContentDeletionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLCellContentDeletionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -859,7 +859,7 @@ void ScXMLCellContentDeletionContext::EndElement() } ScXMLDependenceContext::ScXMLDependenceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -872,7 +872,7 @@ ScXMLDependenceContext::ScXMLDependenceContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -889,7 +889,7 @@ ScXMLDependenceContext::~ScXMLDependenceContext() { } -SvXMLImportContext *ScXMLDependenceContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDependenceContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -902,7 +902,7 @@ void ScXMLDependenceContext::EndElement() } ScXMLDependingsContext::ScXMLDependingsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -916,7 +916,7 @@ ScXMLDependingsContext::~ScXMLDependingsContext() { } -SvXMLImportContext *ScXMLDependingsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDependingsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -941,7 +941,7 @@ void ScXMLDependingsContext::EndElement() } ScXMLChangeDeletionContext::ScXMLChangeDeletionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -954,7 +954,7 @@ ScXMLChangeDeletionContext::ScXMLChangeDeletionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -971,7 +971,7 @@ ScXMLChangeDeletionContext::~ScXMLChangeDeletionContext() { } -SvXMLImportContext *ScXMLChangeDeletionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLChangeDeletionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -984,7 +984,7 @@ void ScXMLChangeDeletionContext::EndElement() } ScXMLDeletionsContext::ScXMLDeletionsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -998,7 +998,7 @@ ScXMLDeletionsContext::~ScXMLDeletionsContext() { } -SvXMLImportContext *ScXMLDeletionsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDeletionsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1024,7 +1024,7 @@ void ScXMLDeletionsContext::EndElement() } ScXMLChangeTextPContext::ScXMLChangeTextPContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xTempAttrList, @@ -1046,7 +1046,7 @@ ScXMLChangeTextPContext::~ScXMLChangeTextPContext() delete pTextPContext; } -SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( USHORT nTempPrefix, +SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( sal_uInt16 nTempPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xTempAttrList ) @@ -1062,7 +1062,7 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( USHORT nTempPre const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); rtl::OUString aLocalName; - USHORT nPrfx(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrfx(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); if ((nPrfx == XML_NAMESPACE_TEXT) && (IsXMLToken(aLocalName, XML_C))) nRepeat = sValue.toInt32(); @@ -1076,11 +1076,11 @@ SvXMLImportContext *ScXMLChangeTextPContext::CreateChildContext( USHORT nTempPre else { if (!pChangeCellContext->IsEditCell()) - pChangeCellContext->CreateTextPContext(sal_False); + pChangeCellContext->CreateTextPContext(false); sal_Bool bWasContext (sal_True); if (!pTextPContext) { - bWasContext = sal_False; + bWasContext = false; pTextPContext = GetScImport().GetTextImport()->CreateTextChildContext( GetScImport(), nPrefix, sLName, xAttrList); } @@ -1113,7 +1113,7 @@ void ScXMLChangeTextPContext::EndElement() } ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScBaseCell*& rTempOldCell, rtl::OUString& rAddress, @@ -1130,16 +1130,16 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, bEmpty(sal_True), bFirstParagraph(sal_True), bString(sal_True), - bFormula(sal_False) + bFormula(false) { - sal_Bool bIsMatrix(sal_False); - sal_Bool bIsCoveredMatrix(sal_False); + sal_Bool bIsMatrix(false); + sal_Bool bIsCoveredMatrix(false); sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); for( sal_Int16 i=0; i < nAttrCount; ++i ) { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1147,7 +1147,7 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, { if (IsXMLToken(aLocalName, XML_FORMULA)) { - bEmpty = sal_False; + bEmpty = false; GetScImport().ExtractFormulaNamespaceGrammar( rFormula, rFormulaNmsp, rGrammar, sValue ); bFormula = sal_True; } @@ -1175,33 +1175,33 @@ ScXMLChangeCellContext::ScXMLChangeCellContext( ScXMLImport& rImport, if (IsXMLToken(aLocalName, XML_VALUE_TYPE)) { if (IsXMLToken(sValue, XML_FLOAT)) - bString = sal_False; + bString = false; else if (IsXMLToken(sValue, XML_DATE)) { rType = NUMBERFORMAT_DATE; - bString = sal_False; + bString = false; } else if (IsXMLToken(sValue, XML_TIME)) { rType = NUMBERFORMAT_TIME; - bString = sal_False; + bString = false; } } else if (IsXMLToken(aLocalName, XML_VALUE)) { SvXMLUnitConverter::convertDouble(fValue, sValue); - bEmpty = sal_False; + bEmpty = false; } else if (IsXMLToken(aLocalName, XML_DATE_VALUE)) { - bEmpty = sal_False; + bEmpty = false; if (GetScImport().GetMM100UnitConverter().setNullDate(GetScImport().GetModel())) GetScImport().GetMM100UnitConverter().convertDateTime(rDateTimeValue, sValue); fValue = rDateTimeValue; } else if (IsXMLToken(aLocalName, XML_TIME_VALUE)) { - bEmpty = sal_False; + bEmpty = false; GetScImport().GetMM100UnitConverter().convertTime(rDateTimeValue, sValue); fValue = rDateTimeValue; } @@ -1217,7 +1217,7 @@ ScXMLChangeCellContext::~ScXMLChangeCellContext() { } -SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1226,11 +1226,11 @@ SvXMLImportContext *ScXMLChangeCellContext::CreateChildContext( USHORT nPrefix, if ((nPrefix == XML_NAMESPACE_TEXT) && (IsXMLToken(rLocalName, XML_P))) { - bEmpty = sal_False; + bEmpty = false; if (bFirstParagraph) { pContext = new ScXMLChangeTextPContext(GetScImport(), nPrefix, rLocalName, xAttrList, this); - bFirstParagraph = sal_False; + bFirstParagraph = false; } else { @@ -1261,10 +1261,10 @@ void ScXMLChangeCellContext::CreateTextPContext(sal_Bool bIsNewParagraph) if (bIsNewParagraph) { xText->setString(sText); - xTextCursor->gotoEnd(sal_False); + xTextCursor->gotoEnd(false); uno::Reference < text::XTextRange > xTextRange (xTextCursor, uno::UNO_QUERY); if (xTextRange.is()) - xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, sal_False); + xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, false); } GetScImport().GetTextImport()->SetCursor(xTextCursor); } @@ -1311,7 +1311,7 @@ void ScXMLChangeCellContext::EndElement() } ScXMLPreviousContext::ScXMLPreviousContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1330,7 +1330,7 @@ ScXMLPreviousContext::ScXMLPreviousContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1346,7 +1346,7 @@ ScXMLPreviousContext::~ScXMLPreviousContext() { } -SvXMLImportContext *ScXMLPreviousContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLPreviousContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1370,7 +1370,7 @@ void ScXMLPreviousContext::EndElement() } ScXMLContentChangeContext::ScXMLContentChangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1386,7 +1386,7 @@ ScXMLContentChangeContext::ScXMLContentChangeContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1420,7 +1420,7 @@ ScXMLContentChangeContext::~ScXMLContentChangeContext() { } -SvXMLImportContext *ScXMLContentChangeContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLContentChangeContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1462,7 +1462,7 @@ void ScXMLContentChangeContext::EndElement() } ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1482,7 +1482,7 @@ ScXMLInsertionContext::ScXMLInsertionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1536,7 +1536,7 @@ ScXMLInsertionContext::~ScXMLInsertionContext() { } -SvXMLImportContext *ScXMLInsertionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLInsertionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1567,7 +1567,7 @@ void ScXMLInsertionContext::EndElement() } ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1581,7 +1581,7 @@ ScXMLInsertionCutOffContext::ScXMLInsertionCutOffContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1604,7 +1604,7 @@ ScXMLInsertionCutOffContext::~ScXMLInsertionCutOffContext() { } -SvXMLImportContext *ScXMLInsertionCutOffContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLInsertionCutOffContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -1617,7 +1617,7 @@ void ScXMLInsertionCutOffContext::EndElement() } ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1628,13 +1628,13 @@ ScXMLMovementCutOffContext::ScXMLMovementCutOffContext( ScXMLImport& rImport, sal_Int32 nPosition(0); sal_Int32 nStartPosition(0); sal_Int32 nEndPosition(0); - sal_Bool bPosition(sal_False); + sal_Bool bPosition(false); sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); for( sal_Int16 i=0; i < nAttrCount; ++i ) { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1668,7 +1668,7 @@ ScXMLMovementCutOffContext::~ScXMLMovementCutOffContext() { } -SvXMLImportContext *ScXMLMovementCutOffContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLMovementCutOffContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -1681,7 +1681,7 @@ void ScXMLMovementCutOffContext::EndElement() } ScXMLCutOffsContext::ScXMLCutOffsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1695,7 +1695,7 @@ ScXMLCutOffsContext::~ScXMLCutOffsContext() { } -SvXMLImportContext *ScXMLCutOffsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLCutOffsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1721,7 +1721,7 @@ void ScXMLCutOffsContext::EndElement() } ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1741,7 +1741,7 @@ ScXMLDeletionContext::ScXMLDeletionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1800,7 +1800,7 @@ ScXMLDeletionContext::~ScXMLDeletionContext() { } -SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDeletionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1837,7 +1837,7 @@ void ScXMLDeletionContext::EndElement() } ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1853,7 +1853,7 @@ ScXMLMovementContext::ScXMLMovementContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1887,7 +1887,7 @@ ScXMLMovementContext::~ScXMLMovementContext() { } -SvXMLImportContext *ScXMLMovementContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLMovementContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1923,7 +1923,7 @@ void ScXMLMovementContext::EndElement() } ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pTempChangeTrackingImportHelper ) : @@ -1939,7 +1939,7 @@ ScXMLRejectionContext::ScXMLRejectionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1973,7 +1973,7 @@ ScXMLRejectionContext::~ScXMLRejectionContext() { } -SvXMLImportContext *ScXMLRejectionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLRejectionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) diff --git a/sc/source/filter/xml/XMLTrackedChangesContext.hxx b/sc/source/filter/xml/XMLTrackedChangesContext.hxx index 82753f25e5c0..853f7a1484c6 100644 --- a/sc/source/filter/xml/XMLTrackedChangesContext.hxx +++ b/sc/source/filter/xml/XMLTrackedChangesContext.hxx @@ -46,13 +46,13 @@ class ScXMLTrackedChangesContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLTrackedChangesContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLTrackedChangesContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLChangeTrackingImportHelper* pChangeTrackingImportHelper); virtual ~ScXMLTrackedChangesContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlannoi.cxx b/sc/source/filter/xml/xmlannoi.cxx index 43e5d8b021fa..f38f442ef8bb 100644 --- a/sc/source/filter/xml/xmlannoi.cxx +++ b/sc/source/filter/xml/xmlannoi.cxx @@ -59,7 +59,7 @@ ScXMLAnnotationData::~ScXMLAnnotationData() //------------------------------------------------------------------ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLAnnotationData& rAnnotationData, @@ -67,7 +67,7 @@ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), mrAnnotationData( rAnnotationData ), nParagraphCount(0), - bHasTextP(sal_False), + bHasTextP(false), pCellContext(pTempCellContext), pShapeContext(NULL) { @@ -87,7 +87,7 @@ ScXMLAnnotationContext::ScXMLAnnotationContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -137,7 +137,7 @@ void ScXMLAnnotationContext::StartElement(const com::sun::star::uno::Reference< pShapeContext->StartElement(xAttrList); } -SvXMLImportContext *ScXMLAnnotationContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLAnnotationContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) diff --git a/sc/source/filter/xml/xmlannoi.hxx b/sc/source/filter/xml/xmlannoi.hxx index de0f61e9820e..d343a715955c 100644 --- a/sc/source/filter/xml/xmlannoi.hxx +++ b/sc/source/filter/xml/xmlannoi.hxx @@ -76,7 +76,7 @@ class ScXMLAnnotationContext : public SvXMLImportContext { public: - ScXMLAnnotationContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLAnnotationContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -85,7 +85,7 @@ public: virtual ~ScXMLAnnotationContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlbodyi.cxx b/sc/source/filter/xml/xmlbodyi.cxx index 3f8539d9b37c..a24b232fb1f9 100644 --- a/sc/source/filter/xml/xmlbodyi.cxx +++ b/sc/source/filter/xml/xmlbodyi.cxx @@ -73,15 +73,15 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), sPassword(), meHash1(PASSHASH_SHA1), meHash2(PASSHASH_UNSPECIFIED), - bProtected(sal_False), - bHadCalculationSettings(sal_False), + bProtected(false), + bHadCalculationSettings(false), pChangeTrackingImportHelper(NULL) { ScDocument* pDoc = GetScImport().GetDocument(); @@ -115,7 +115,7 @@ ScXMLBodyContext::ScXMLBodyContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -137,7 +137,7 @@ ScXMLBodyContext::~ScXMLBodyContext() { } -SvXMLImportContext *ScXMLBodyContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLBodyContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -158,13 +158,13 @@ SvXMLImportContext *ScXMLBodyContext::CreateChildContext( USHORT nPrefix, switch( rTokenMap.Get( nPrefix, rLocalName ) ) { // case XML_TOK_TEXT_H: -// bHeading = TRUE; +// bHeading = sal_True; // case XML_TOK_TEXT_P: // pContext = new SwXMLParaContext( GetSwImport(),nPrefix, rLocalName, // xAttrList, bHeading ); // break; // case XML_TOK_TEXT_ORDERED_LIST: -// bOrdered = TRUE; +// bOrdered = sal_True; // case XML_TOK_TEXT_UNORDERED_LIST: // pContext = new SwXMLListBlockContext( GetSwImport(),nPrefix, rLocalName, // xAttrList, bOrdered ); diff --git a/sc/source/filter/xml/xmlbodyi.hxx b/sc/source/filter/xml/xmlbodyi.hxx index 7e643221b934..61db1ae58924 100644 --- a/sc/source/filter/xml/xmlbodyi.hxx +++ b/sc/source/filter/xml/xmlbodyi.hxx @@ -50,11 +50,11 @@ class ScXMLBodyContext : public SvXMLImportContext ScXMLImport& GetScImport() { return (ScXMLImport&)GetImport(); } public: - ScXMLBodyContext( ScXMLImport& rImport, USHORT nPrfx, const ::rtl::OUString& rLName, + ScXMLBodyContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLBodyContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx index 47416acaf6ca..06214774a91e 100644 --- a/sc/source/filter/xml/xmlcelli.cxx +++ b/sc/source/filter/xml/xmlcelli.cxx @@ -102,7 +102,7 @@ using rtl::OUString; //------------------------------------------------------------------ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -120,17 +120,17 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, rXMLImport((ScXMLImport&)rImport), eGrammar( formula::FormulaGrammar::GRAM_STORAGE_DEFAULT), nCellType(util::NumberFormat::TEXT), - bIsMerged(sal_False), - bIsMatrix(sal_False), - bHasSubTable(sal_False), + bIsMerged(false), + bIsMatrix(false), + bHasSubTable(false), bIsCovered(bTempIsCovered), bIsEmpty(sal_True), - bHasTextImport(sal_False), - bIsFirstTextImport(sal_False), - bSolarMutexLocked(sal_False), - bFormulaTextResult(sal_False) + bHasTextImport(false), + bIsFirstTextImport(false), + bSolarMutexLocked(false), + bFormulaTextResult(false) { - rXMLImport.SetRemoveLastChar(sal_False); + rXMLImport.SetRemoveLastChar(false); rXMLImport.GetTables().AddColumn(bTempIsCovered); const sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; rtl::OUString aLocalName; @@ -174,14 +174,14 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, break; case XML_TOK_TABLE_ROW_CELL_ATTR_VALUE_TYPE: nCellType = GetScImport().GetCellType(sValue); - bIsEmpty = sal_False; + bIsEmpty = false; break; case XML_TOK_TABLE_ROW_CELL_ATTR_VALUE: { if (sValue.getLength()) { rXMLImport.GetMM100UnitConverter().convertDouble(fValue, sValue); - bIsEmpty = sal_False; + bIsEmpty = false; } } break; @@ -190,7 +190,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, if (sValue.getLength() && rXMLImport.SetNullDateOnUnitConverter()) { rXMLImport.GetMM100UnitConverter().convertDateTime(fValue, sValue); - bIsEmpty = sal_False; + bIsEmpty = false; } } break; @@ -199,7 +199,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, if (sValue.getLength()) { rXMLImport.GetMM100UnitConverter().convertTime(fValue, sValue); - bIsEmpty = sal_False; + bIsEmpty = false; } } break; @@ -209,7 +209,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, { DBG_ASSERT(!pOUTextValue, "here should be only one string value"); pOUTextValue.reset(sValue); - bIsEmpty = sal_False; + bIsEmpty = false; } } break; @@ -223,7 +223,7 @@ ScXMLTableRowCellContext::ScXMLTableRowCellContext( ScXMLImport& rImport, fValue = 0.0; else rXMLImport.GetMM100UnitConverter().convertDouble(fValue, sValue); - bIsEmpty = sal_False; + bIsEmpty = false; } } break; @@ -278,7 +278,7 @@ void ScXMLTableRowCellContext::UnlockSolarMutex() if (bSolarMutexLocked) { GetScImport().UnlockSolarMutex(); - bSolarMutexLocked = sal_False; + bSolarMutexLocked = false; } } @@ -303,7 +303,7 @@ void ScXMLTableRowCellContext::SetCursorOnTextImport(const rtl::OUString& rOUTem if (xTextCursor.is()) { xTextCursor->setString(rOUTempText); - xTextCursor->gotoEnd(sal_False); + xTextCursor->gotoEnd(false); rXMLImport.GetTextImport()->SetCursor(xTextCursor); } } @@ -316,7 +316,7 @@ void ScXMLTableRowCellContext::SetCursorOnTextImport(const rtl::OUString& rOUTem } } -SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -324,12 +324,12 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix SvXMLImportContext *pContext = 0; const SvXMLTokenMap& rTokenMap = rXMLImport.GetTableRowCellElemTokenMap(); - sal_Bool bTextP(sal_False); + sal_Bool bTextP(false); switch( rTokenMap.Get( nPrefix, rLName ) ) { case XML_TOK_TABLE_ROW_CELL_P: { - bIsEmpty = sal_False; + bIsEmpty = false; bTextP = sal_True; com::sun::star::table::CellAddress aCellPos = rXMLImport.GetTables().GetRealCellPos(); if (((nCellType == util::NumberFormat::TEXT) || bFormulaTextResult) && @@ -362,12 +362,12 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix uno::Reference < text::XText > xText (xTextCursor->getText()); uno::Reference < text::XTextRange > xTextRange (xTextCursor, uno::UNO_QUERY); if (xText.is() && xTextRange.is()) - xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, sal_False); + xText->insertControlCharacter(xTextRange, text::ControlCharacter::PARAGRAPH_BREAK, false); } } pContext = rXMLImport.GetTextImport()->CreateTextChildContext( rXMLImport, nPrefix, rLName, xAttrList); - bIsFirstTextImport = sal_False; + bIsFirstTextImport = false; } } } @@ -392,12 +392,12 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix rLName, xAttrList, sal_True, nMergedCols); nMergedCols = 1; - bIsMerged = sal_False; + bIsMerged = false; } break; case XML_TOK_TABLE_ROW_CELL_ANNOTATION: { - bIsEmpty = sal_False; + bIsEmpty = false; DBG_ASSERT( !mxAnnotationData.get(), "ScXMLTableRowCellContext::CreateChildContext - multiple annotations in one cell" ); mxAnnotationData.reset( new ScXMLAnnotationData ); pContext = new ScXMLAnnotationContext( rXMLImport, nPrefix, rLName, @@ -406,7 +406,7 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix break; case XML_TOK_TABLE_ROW_CELL_DETECTIVE: { - bIsEmpty = sal_False; + bIsEmpty = false; if (!pDetectiveObjVec) pDetectiveObjVec = new ScMyImpDetectiveObjVec(); pContext = new ScXMLDetectiveContext( @@ -415,7 +415,7 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix break; case XML_TOK_TABLE_ROW_CELL_CELL_RANGE_SOURCE: { - bIsEmpty = sal_False; + bIsEmpty = false; if (!pCellRangeSource) pCellRangeSource = new ScMyImpCellRangeSource(); pContext = new ScXMLCellRangeSourceContext( @@ -435,14 +435,14 @@ SvXMLImportContext *ScXMLTableRowCellContext::CreateChildContext( USHORT nPrefix if (aCellPos.Row > MAXROW) aCellPos.Row = MAXROW; XMLTableShapeImportHelper* pTableShapeImport = (XMLTableShapeImportHelper*)rXMLImport.GetShapeImport().get(); - pTableShapeImport->SetOnTable(sal_False); + pTableShapeImport->SetOnTable(false); pTableShapeImport->SetCell(aCellPos); pContext = rXMLImport.GetShapeImport()->CreateGroupChildContext( rXMLImport, nPrefix, rLName, xAttrList, xShapes); if (pContext) { - bIsEmpty = sal_False; - rXMLImport.ProgressBarIncrement(sal_False); + bIsEmpty = false; + rXMLImport.ProgressBarIncrement(false); } } } @@ -473,13 +473,13 @@ sal_Bool ScXMLTableRowCellContext::IsMerged (const uno::Reference <table::XCellR aCellAddress = xMergeCellAddress->getRangeAddress(); if (aCellAddress.StartColumn == nCol && aCellAddress.EndColumn == nCol && aCellAddress.StartRow == nRow && aCellAddress.EndRow == nRow) - return sal_False; + return false; else return sal_True; } } } - return sal_False; + return false; } void ScXMLTableRowCellContext::DoMerge(const com::sun::star::table::CellAddress& aCellPos, @@ -502,7 +502,7 @@ void ScXMLTableRowCellContext::DoMerge(const com::sun::star::table::CellAddress& uno::Reference <util::XMergeable> xMergeable (xCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); if (xMergeable.is()) - xMergeable->merge(sal_False); + xMergeable->merge(false); } //merge @@ -831,14 +831,14 @@ void ScXMLTableRowCellContext::EndElement() table::CellAddress aCurrentPos( aCellPos ); if ((pContentValidationName && pContentValidationName->getLength()) || mxAnnotationData.get() || pDetectiveObjVec || pCellRangeSource) - bIsEmpty = sal_False; + bIsEmpty = false; ScMyTables& rTables = rXMLImport.GetTables(); for (sal_Int32 i = 0; i < nCellsRepeated; ++i) { aCurrentPos.Column = aCellPos.Column + i; if (i > 0) - rTables.AddColumn(sal_False); + rTables.AddColumn(false); if (!bIsEmpty) { for (sal_Int32 j = 0; j < nRepeatedRows; ++j) @@ -847,7 +847,7 @@ void ScXMLTableRowCellContext::EndElement() if ((aCurrentPos.Column == 0) && (j > 0)) { rTables.AddRow(); - rTables.AddColumn(sal_False); + rTables.AddColumn(false); } if (CellExists(aCurrentPos)) { @@ -909,7 +909,7 @@ void ScXMLTableRowCellContext::EndElement() else if ( i > 0 && pOUText && pOUText->getLength() ) pFCell->SetHybridString( *pOUText ); else - bDoIncrement = sal_False; + bDoIncrement = false; } } else @@ -950,9 +950,9 @@ void ScXMLTableRowCellContext::EndElement() // #i56027# This is about setting simple text, not edit cells, // so ProgressBarIncrement must be called with bEditCell = FALSE. // Formatted text that is put into the cell by the child context - // is handled below (bIsEmpty is TRUE then). + // is handled below (bIsEmpty is sal_True then). if (bDoIncrement || bHasTextImport) - rXMLImport.ProgressBarIncrement(sal_False); + rXMLImport.ProgressBarIncrement(false); } break; case util::NumberFormat::NUMBER: @@ -995,7 +995,7 @@ void ScXMLTableRowCellContext::EndElement() sal::static_int_cast<SCTAB>( aCurrentPos.Sheet ), pNewCell ); } - rXMLImport.ProgressBarIncrement(sal_False); + rXMLImport.ProgressBarIncrement(false); } break; default: @@ -1025,7 +1025,7 @@ void ScXMLTableRowCellContext::EndElement() else { // #i56027# If the child context put formatted text into the cell, - // bIsEmpty is TRUE and ProgressBarIncrement has to be called + // bIsEmpty is sal_True and ProgressBarIncrement has to be called // with bEditCell = TRUE. if (bHasTextImport) rXMLImport.ProgressBarIncrement(sal_True); @@ -1033,7 +1033,7 @@ void ScXMLTableRowCellContext::EndElement() for (sal_Int32 j = 1; j < nRepeatedRows; ++j) { rTables.AddRow(); - rTables.AddColumn(sal_False); + rTables.AddColumn(false); } } } @@ -1107,7 +1107,7 @@ void ScXMLTableRowCellContext::EndElement() SetAnnotation( aCellPos ); SetDetectiveObj( aCellPos ); SetCellRangeSource( aCellPos ); - rXMLImport.ProgressBarIncrement(sal_False); + rXMLImport.ProgressBarIncrement(false); } } else @@ -1122,8 +1122,8 @@ void ScXMLTableRowCellContext::EndElement() } UnlockSolarMutex(); } - bIsMerged = sal_False; - bHasSubTable = sal_False; + bIsMerged = false; + bHasSubTable = false; nMergedCols = 1; nMergedRows = 1; nCellsRepeated = 1; diff --git a/sc/source/filter/xml/xmlcelli.hxx b/sc/source/filter/xml/xmlcelli.hxx index 7bfe5c932796..53387ebc5c14 100644 --- a/sc/source/filter/xml/xmlcelli.hxx +++ b/sc/source/filter/xml/xmlcelli.hxx @@ -104,7 +104,7 @@ class ScXMLTableRowCellContext : public SvXMLImportContext public: - ScXMLTableRowCellContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableRowCellContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -112,7 +112,7 @@ public: virtual ~ScXMLTableRowCellContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx index 3abfd93c4ce9..9029d5a63a0d 100644 --- a/sc/source/filter/xml/xmlcoli.cxx +++ b/sc/source/filter/xml/xmlcoli.cxx @@ -56,7 +56,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) : @@ -105,7 +105,7 @@ ScXMLTableColContext::~ScXMLTableColContext() { } -SvXMLImportContext *ScXMLTableColContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableColContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -160,7 +160,7 @@ void ScXMLTableColContext::EndElement() rtl::OUString sVisible(RTL_CONSTASCII_USTRINGPARAM(SC_UNONAME_CELLVIS)); sal_Bool bValue(sal_True); if (!IsXMLToken(sVisibility, XML_VISIBLE)) - bValue = sal_False; + bValue = false; xColumnProperties->setPropertyValue(sVisible, uno::makeAny(bValue)); } } @@ -176,7 +176,7 @@ void ScXMLTableColContext::EndElement() } ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -208,7 +208,7 @@ ScXMLTableColsContext::ScXMLTableColsContext( ScXMLImport& rImport, if (nPrefix == XML_NAMESPACE_TABLE && IsXMLToken(aLocalName, XML_DISPLAY)) { if (IsXMLToken(sValue, XML_FALSE)) - bGroupDisplay = sal_False; + bGroupDisplay = false; } } } @@ -218,7 +218,7 @@ ScXMLTableColsContext::~ScXMLTableColsContext() { } -SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -231,17 +231,17 @@ SvXMLImportContext *ScXMLTableColsContext::CreateChildContext( USHORT nPrefix, case XML_TOK_TABLE_COLS_COL_GROUP: pContext = new ScXMLTableColsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_True ); + false, sal_True ); break; case XML_TOK_TABLE_COLS_HEADER_COLS: pContext = new ScXMLTableColsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_True, sal_False ); + sal_True, false ); break; case XML_TOK_TABLE_COLS_COLS: pContext = new ScXMLTableColsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_False ); + false, false ); break; case XML_TOK_TABLE_COLS_COL: pContext = new ScXMLTableColContext( GetScImport(), nPrefix, diff --git a/sc/source/filter/xml/xmlcoli.hxx b/sc/source/filter/xml/xmlcoli.hxx index 295f1ba41278..6c958bc673bd 100644 --- a/sc/source/filter/xml/xmlcoli.hxx +++ b/sc/source/filter/xml/xmlcoli.hxx @@ -45,14 +45,14 @@ class ScXMLTableColContext : public SvXMLImportContext public: - ScXMLTableColContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableColContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLTableColContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -75,7 +75,7 @@ class ScXMLTableColsContext : public SvXMLImportContext public: - ScXMLTableColsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableColsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -83,7 +83,7 @@ public: virtual ~ScXMLTableColsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlconti.cxx b/sc/source/filter/xml/xmlconti.cxx index dfb34beab24c..2b752f7aec83 100644 --- a/sc/source/filter/xml/xmlconti.cxx +++ b/sc/source/filter/xml/xmlconti.cxx @@ -48,7 +48,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLContentContext::ScXMLContentContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -63,7 +63,7 @@ ScXMLContentContext::~ScXMLContentContext() { } -SvXMLImportContext *ScXMLContentContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLContentContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -79,7 +79,7 @@ SvXMLImportContext *ScXMLContentContext::CreateChildContext( USHORT nPrefix, const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); const rtl::OUString& sAttrValue(xAttrList->getValueByIndex( i )); rtl::OUString aLocalName; - USHORT nPrfx = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrfx = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); if ((nPrfx == XML_NAMESPACE_TEXT) && IsXMLToken(aLocalName, XML_C)) nRepeat = sAttrValue.toInt32(); diff --git a/sc/source/filter/xml/xmlconti.hxx b/sc/source/filter/xml/xmlconti.hxx index ffde3d98e51a..d350f0f2f89e 100644 --- a/sc/source/filter/xml/xmlconti.hxx +++ b/sc/source/filter/xml/xmlconti.hxx @@ -43,7 +43,7 @@ class ScXMLContentContext : public SvXMLImportContext public: - ScXMLContentContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLContentContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -51,7 +51,7 @@ public: virtual ~ScXMLContentContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlcvali.cxx b/sc/source/filter/xml/xmlcvali.cxx index 978b8e840569..25d16d999fb0 100644 --- a/sc/source/filter/xml/xmlcvali.cxx +++ b/sc/source/filter/xml/xmlcvali.cxx @@ -79,14 +79,14 @@ class ScXMLContentValidationContext : public SvXMLImportContext public: - ScXMLContentValidationContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLContentValidationContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLContentValidationContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -112,7 +112,7 @@ class ScXMLHelpMessageContext : public SvXMLImportContext public: - ScXMLHelpMessageContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLHelpMessageContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -120,7 +120,7 @@ public: virtual ~ScXMLHelpMessageContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -143,7 +143,7 @@ class ScXMLErrorMessageContext : public SvXMLImportContext public: - ScXMLErrorMessageContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLErrorMessageContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -151,7 +151,7 @@ public: virtual ~ScXMLErrorMessageContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -171,7 +171,7 @@ class ScXMLErrorMacroContext : public SvXMLImportContext public: - ScXMLErrorMacroContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLErrorMacroContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -179,7 +179,7 @@ public: virtual ~ScXMLErrorMacroContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -189,7 +189,7 @@ public: //------------------------------------------------------------------ ScXMLContentValidationsContext::ScXMLContentValidationsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -202,7 +202,7 @@ ScXMLContentValidationsContext::~ScXMLContentValidationsContext() { } -SvXMLImportContext *ScXMLContentValidationsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLContentValidationsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -228,15 +228,15 @@ void ScXMLContentValidationsContext::EndElement() } ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : SvXMLImportContext( rImport, nPrfx, rLName ), nShowList(sheet::TableValidationVisibility::UNSORTED), bAllowEmptyCell(sal_True), - bDisplayHelp(sal_False), - bDisplayError(sal_False) + bDisplayHelp(false), + bDisplayError(false) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetContentValidationAttrTokenMap(); @@ -244,7 +244,7 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -261,7 +261,7 @@ ScXMLContentValidationContext::ScXMLContentValidationContext( ScXMLImport& rImpo break; case XML_TOK_CONTENT_VALIDATION_ALLOW_EMPTY_CELL: if (IsXMLToken(sValue, XML_FALSE)) - bAllowEmptyCell = sal_False; + bAllowEmptyCell = false; break; case XML_TOK_CONTENT_VALIDATION_DISPLAY_LIST: { @@ -287,7 +287,7 @@ ScXMLContentValidationContext::~ScXMLContentValidationContext() { } -SvXMLImportContext *ScXMLContentValidationContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLContentValidationContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -494,7 +494,7 @@ void ScXMLContentValidationContext::SetErrorMacro(const sal_Bool bExecute) } ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -503,7 +503,7 @@ ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport, sTitle(), sMessage(), nParagraphCount(0), - bDisplay(sal_False) + bDisplay(false) { pValidationContext = pTempValidationContext; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -512,7 +512,7 @@ ScXMLHelpMessageContext::ScXMLHelpMessageContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -532,7 +532,7 @@ ScXMLHelpMessageContext::~ScXMLHelpMessageContext() { } -SvXMLImportContext *ScXMLHelpMessageContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLHelpMessageContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -564,7 +564,7 @@ void ScXMLHelpMessageContext::EndElement() } ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -574,7 +574,7 @@ ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport, sMessage(), sMessageType(), nParagraphCount(0), - bDisplay(sal_False) + bDisplay(false) { pValidationContext = pTempValidationContext; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -583,7 +583,7 @@ ScXMLErrorMessageContext::ScXMLErrorMessageContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -606,7 +606,7 @@ ScXMLErrorMessageContext::~ScXMLErrorMessageContext() { } -SvXMLImportContext *ScXMLErrorMessageContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLErrorMessageContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -638,14 +638,14 @@ void ScXMLErrorMessageContext::EndElement() } ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLContentValidationContext* pTempValidationContext) : SvXMLImportContext( rImport, nPrfx, rLName ), sName(), - bExecute(sal_False) + bExecute(false) { pValidationContext = pTempValidationContext; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -654,7 +654,7 @@ ScXMLErrorMacroContext::ScXMLErrorMacroContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -674,7 +674,7 @@ ScXMLErrorMacroContext::~ScXMLErrorMacroContext() { } -SvXMLImportContext *ScXMLErrorMacroContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLErrorMacroContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/xmlcvali.hxx b/sc/source/filter/xml/xmlcvali.hxx index 2328a0ff7844..b2c433c4696e 100644 --- a/sc/source/filter/xml/xmlcvali.hxx +++ b/sc/source/filter/xml/xmlcvali.hxx @@ -44,14 +44,14 @@ class ScXMLContentValidationsContext : public SvXMLImportContext public: - ScXMLContentValidationsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLContentValidationsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLContentValidationsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx index 244e0cddc36f..210a6f5dc7ee 100644 --- a/sc/source/filter/xml/xmldpimp.cxx +++ b/sc/source/filter/xml/xmldpimp.cxx @@ -71,7 +71,7 @@ using rtl::OUString; //------------------------------------------------------------------ ScXMLDataPilotTablesContext::ScXMLDataPilotTablesContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -86,7 +86,7 @@ ScXMLDataPilotTablesContext::~ScXMLDataPilotTablesContext() GetScImport().UnlockSolarMutex(); } -SvXMLImportContext *ScXMLDataPilotTablesContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotTablesContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -118,7 +118,7 @@ ScXMLDataPilotTableContext::GrandTotalItem::GrandTotalItem() : mbVisible(true) {} ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : @@ -135,13 +135,13 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, mnPageFieldCount(0), mnDataFieldCount(0), bIsNative(sal_True), - bIgnoreEmptyRows(sal_False), - bIdentifyCategories(sal_False), - bTargetRangeAddress(sal_False), - bSourceCellRange(sal_False), + bIgnoreEmptyRows(false), + bIdentifyCategories(false), + bTargetRangeAddress(false), + bSourceCellRange(false), bShowFilter(sal_True), bDrillDown(sal_True), - bHeaderGridLayout(sal_False) + bHeaderGridLayout(false) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotTableAttrTokenMap(); @@ -149,7 +149,7 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -238,7 +238,7 @@ ScXMLDataPilotTableContext::~ScXMLDataPilotTableContext() delete pDPDimSaveData; } -SvXMLImportContext *ScXMLDataPilotTableContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotTableContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -344,7 +344,7 @@ void ScXMLDataPilotTableContext::AddDimension(ScDPSaveDimension* pDim, bool bHas // mark the new one as duplicate if ( !pDim->IsDataLayout() && pDPSave->GetExistingDimensionByName(pDim->GetName()) ) - pDim->SetDupFlag( TRUE ); + pDim->SetDupFlag( sal_True ); if (!pDim->IsDataLayout()) { @@ -513,7 +513,7 @@ void ScXMLDataPilotTableContext::SetGrandTotal( } ScXMLDPSourceSQLContext::ScXMLDPSourceSQLContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -527,7 +527,7 @@ ScXMLDPSourceSQLContext::ScXMLDPSourceSQLContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -556,7 +556,7 @@ ScXMLDPSourceSQLContext::~ScXMLDPSourceSQLContext() { } -SvXMLImportContext *ScXMLDPSourceSQLContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPSourceSQLContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -574,7 +574,7 @@ void ScXMLDPSourceSQLContext::EndElement() } ScXMLDPSourceTableContext::ScXMLDPSourceTableContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -588,7 +588,7 @@ ScXMLDPSourceTableContext::ScXMLDPSourceTableContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -612,7 +612,7 @@ ScXMLDPSourceTableContext::~ScXMLDPSourceTableContext() { } -SvXMLImportContext *ScXMLDPSourceTableContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPSourceTableContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -630,7 +630,7 @@ void ScXMLDPSourceTableContext::EndElement() } ScXMLDPSourceQueryContext::ScXMLDPSourceQueryContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -644,7 +644,7 @@ ScXMLDPSourceQueryContext::ScXMLDPSourceQueryContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -668,7 +668,7 @@ ScXMLDPSourceQueryContext::~ScXMLDPSourceQueryContext() { } -SvXMLImportContext *ScXMLDPSourceQueryContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPSourceQueryContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -686,7 +686,7 @@ void ScXMLDPSourceQueryContext::EndElement() } ScXMLSourceServiceContext::ScXMLSourceServiceContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -700,7 +700,7 @@ ScXMLSourceServiceContext::ScXMLSourceServiceContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -739,7 +739,7 @@ ScXMLSourceServiceContext::~ScXMLSourceServiceContext() { } -SvXMLImportContext *ScXMLSourceServiceContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSourceServiceContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -762,7 +762,7 @@ ScXMLImport& ScXMLDataPilotGrandTotalContext::GetScImport() } ScXMLDataPilotGrandTotalContext::ScXMLDataPilotGrandTotalContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList, ScXMLDataPilotTableContext* pTableContext ) : SvXMLImportContext( rImport, nPrefix, rLName ), mpTableContext(pTableContext), @@ -777,7 +777,7 @@ ScXMLDataPilotGrandTotalContext::ScXMLDataPilotGrandTotalContext( const OUString& rAttrValue = xAttrList->getValueByIndex(i); OUString aLocalName; - USHORT nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(rAttrName, &aLocalName); + sal_uInt16 nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName(rAttrName, &aLocalName); switch (rAttrTokenMap.Get(nLocalPrefix, aLocalName)) { case XML_TOK_DATA_PILOT_GRAND_TOTAL_ATTR_DISPLAY: @@ -806,7 +806,7 @@ ScXMLDataPilotGrandTotalContext::~ScXMLDataPilotGrandTotalContext() } SvXMLImportContext* ScXMLDataPilotGrandTotalContext::CreateChildContext( - USHORT /*nPrefix*/, const ::rtl::OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ ) + sal_uInt16 /*nPrefix*/, const ::rtl::OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ ) { return NULL; } @@ -832,7 +832,7 @@ void ScXMLDataPilotGrandTotalContext::EndElement() } ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -846,7 +846,7 @@ ScXMLSourceCellRangeContext::ScXMLSourceCellRangeContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -871,7 +871,7 @@ ScXMLSourceCellRangeContext::~ScXMLSourceCellRangeContext() { } -SvXMLImportContext *ScXMLSourceCellRangeContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSourceCellRangeContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -897,7 +897,7 @@ void ScXMLSourceCellRangeContext::EndElement() } ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -910,15 +910,15 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport, fStep(0.0), nUsedHierarchy(1), nGroupPart(0), - bSelectedPage(sal_False), - bIsGroupField(sal_False), - bDateValue(sal_False), - bAutoStart(sal_False), - bAutoEnd(sal_False), + bSelectedPage(false), + bIsGroupField(false), + bDateValue(false), + bAutoStart(false), + bAutoEnd(false), mbHasHiddenMember(false) { - sal_Bool bHasName(sal_False); - sal_Bool bDataLayout(sal_False); + sal_Bool bHasName(false); + sal_Bool bDataLayout(false); OUString aDisplayName; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotFieldAttrTokenMap(); @@ -926,7 +926,7 @@ ScXMLDataPilotFieldContext::ScXMLDataPilotFieldContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -984,7 +984,7 @@ ScXMLDataPilotFieldContext::~ScXMLDataPilotFieldContext() { } -SvXMLImportContext *ScXMLDataPilotFieldContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotFieldContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1093,7 +1093,7 @@ void ScXMLDataPilotFieldContext::EndElement() } } -ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList, ScXMLDataPilotFieldContext* pDataPilotField) : @@ -1106,7 +1106,7 @@ ScXMLDataPilotFieldReferenceContext::ScXMLDataPilotFieldReferenceContext( ScXMLI { rtl::OUString sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue(xAttrList->getValueByIndex( i )); @@ -1160,7 +1160,7 @@ ScXMLDataPilotFieldReferenceContext::~ScXMLDataPilotFieldReferenceContext() } ScXMLDataPilotLevelContext::ScXMLDataPilotLevelContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1174,7 +1174,7 @@ ScXMLDataPilotLevelContext::ScXMLDataPilotLevelContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1193,7 +1193,7 @@ ScXMLDataPilotLevelContext::~ScXMLDataPilotLevelContext() { } -SvXMLImportContext *ScXMLDataPilotLevelContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotLevelContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1230,7 +1230,7 @@ void ScXMLDataPilotLevelContext::EndElement() { } -ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1244,7 +1244,7 @@ ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& { rtl::OUString sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue(xAttrList->getValueByIndex( i )); @@ -1255,7 +1255,7 @@ ScXMLDataPilotDisplayInfoContext::ScXMLDataPilotDisplayInfoContext( ScXMLImport& if (IsXMLToken(sValue, XML_TRUE)) aInfo.IsEnabled = sal_True; else - aInfo.IsEnabled = sal_False; + aInfo.IsEnabled = false; } else if (IsXMLToken(aLocalName, XML_DISPLAY_MEMBER_MODE)) { @@ -1281,7 +1281,7 @@ ScXMLDataPilotDisplayInfoContext::~ScXMLDataPilotDisplayInfoContext() { } -ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1295,7 +1295,7 @@ ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImpo { rtl::OUString sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue(xAttrList->getValueByIndex( i )); @@ -1306,7 +1306,7 @@ ScXMLDataPilotSortInfoContext::ScXMLDataPilotSortInfoContext( ScXMLImport& rImpo if (IsXMLToken(sValue, XML_ASCENDING)) aInfo.IsAscending = sal_True; else if (IsXMLToken(sValue, XML_DESCENDING)) - aInfo.IsAscending = sal_False; + aInfo.IsAscending = false; } else if (IsXMLToken(aLocalName, XML_SORT_MODE)) { @@ -1330,7 +1330,7 @@ ScXMLDataPilotSortInfoContext::~ScXMLDataPilotSortInfoContext() { } -ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1344,7 +1344,7 @@ ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& r { rtl::OUString sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue(xAttrList->getValueByIndex( i )); @@ -1355,7 +1355,7 @@ ScXMLDataPilotLayoutInfoContext::ScXMLDataPilotLayoutInfoContext( ScXMLImport& r if (IsXMLToken(sValue, XML_TRUE)) aInfo.AddEmptyLines = sal_True; else - aInfo.AddEmptyLines = sal_False; + aInfo.AddEmptyLines = false; } else if (IsXMLToken(aLocalName, XML_LAYOUT_MODE)) { @@ -1375,7 +1375,7 @@ ScXMLDataPilotLayoutInfoContext::~ScXMLDataPilotLayoutInfoContext() } ScXMLDataPilotSubTotalsContext::ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -1393,7 +1393,7 @@ ScXMLDataPilotSubTotalsContext::~ScXMLDataPilotSubTotalsContext() { } -SvXMLImportContext *ScXMLDataPilotSubTotalsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotSubTotalsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1447,7 +1447,7 @@ void ScXMLDataPilotSubTotalsContext::SetDisplayName(const OUString& rName) } ScXMLDataPilotSubTotalContext::ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1461,7 +1461,7 @@ ScXMLDataPilotSubTotalContext::ScXMLDataPilotSubTotalContext( ScXMLImport& rImpo { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1485,7 +1485,7 @@ ScXMLDataPilotSubTotalContext::~ScXMLDataPilotSubTotalContext() { } -SvXMLImportContext *ScXMLDataPilotSubTotalContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotSubTotalContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -1503,7 +1503,7 @@ void ScXMLDataPilotSubTotalContext::EndElement() } ScXMLDataPilotMembersContext::ScXMLDataPilotMembersContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -1518,7 +1518,7 @@ ScXMLDataPilotMembersContext::~ScXMLDataPilotMembersContext() { } -SvXMLImportContext *ScXMLDataPilotMembersContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotMembersContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1544,7 +1544,7 @@ void ScXMLDataPilotMembersContext::EndElement() } ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1553,7 +1553,7 @@ ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport, pDataPilotField(pTempDataPilotField), bDisplay( sal_True ), bDisplayDetails( sal_True ), - bHasName( sal_False ) + bHasName( false ) { sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; const SvXMLTokenMap& rAttrTokenMap = GetScImport().GetDataPilotMemberAttrTokenMap(); @@ -1561,7 +1561,7 @@ ScXMLDataPilotMemberContext::ScXMLDataPilotMemberContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -1596,7 +1596,7 @@ ScXMLDataPilotMemberContext::~ScXMLDataPilotMemberContext() { } -SvXMLImportContext *ScXMLDataPilotMemberContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotMemberContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -1623,7 +1623,7 @@ void ScXMLDataPilotMemberContext::EndElement() } ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1636,7 +1636,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, double fEnd(0.0); double fStep(0.0); sal_Int32 nGroupPart(0); - sal_Bool bDateValue(sal_False); + sal_Bool bDateValue(false); sal_Bool bAutoStart(sal_True); sal_Bool bAutoEnd(sal_True); @@ -1645,7 +1645,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue = xAttrList->getValueByIndex( i ); @@ -1661,7 +1661,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, else { GetScImport().GetMM100UnitConverter().convertDateTime(fStart, sValue); - bAutoStart = sal_False; + bAutoStart = false; } } else if (IsXMLToken(aLocalName, XML_DATE_END)) @@ -1672,7 +1672,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, else { GetScImport().GetMM100UnitConverter().convertDateTime(fEnd, sValue); - bAutoEnd = sal_False; + bAutoEnd = false; } } else if (IsXMLToken(aLocalName, XML_START)) @@ -1682,7 +1682,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, else { GetScImport().GetMM100UnitConverter().convertDouble(fStart, sValue); - bAutoStart = sal_False; + bAutoStart = false; } } else if (IsXMLToken(aLocalName, XML_END)) @@ -1692,7 +1692,7 @@ ScXMLDataPilotGroupsContext::ScXMLDataPilotGroupsContext( ScXMLImport& rImport, else { GetScImport().GetMM100UnitConverter().convertDouble(fEnd, sValue); - bAutoEnd = sal_False; + bAutoEnd = false; } } else if (IsXMLToken(aLocalName, XML_STEP)) @@ -1722,7 +1722,7 @@ ScXMLDataPilotGroupsContext::~ScXMLDataPilotGroupsContext() { } -SvXMLImportContext *ScXMLDataPilotGroupsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotGroupsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1746,7 +1746,7 @@ void ScXMLDataPilotGroupsContext::EndElement() } ScXMLDataPilotGroupContext::ScXMLDataPilotGroupContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1759,7 +1759,7 @@ ScXMLDataPilotGroupContext::ScXMLDataPilotGroupContext( ScXMLImport& rImport, { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue = xAttrList->getValueByIndex( i ); @@ -1775,7 +1775,7 @@ ScXMLDataPilotGroupContext::~ScXMLDataPilotGroupContext() { } -SvXMLImportContext *ScXMLDataPilotGroupContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotGroupContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -1800,7 +1800,7 @@ void ScXMLDataPilotGroupContext::EndElement() } ScXMLDataPilotGroupMemberContext::ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -1813,7 +1813,7 @@ ScXMLDataPilotGroupMemberContext::ScXMLDataPilotGroupMemberContext( ScXMLImport& { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue = xAttrList->getValueByIndex( i ); @@ -1829,7 +1829,7 @@ ScXMLDataPilotGroupMemberContext::~ScXMLDataPilotGroupMemberContext() { } -SvXMLImportContext *ScXMLDataPilotGroupMemberContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDataPilotGroupMemberContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx index 97308926c66c..3ea89be0b68c 100644 --- a/sc/source/filter/xml/xmldpimp.hxx +++ b/sc/source/filter/xml/xmldpimp.hxx @@ -63,14 +63,14 @@ class ScXMLDataPilotTablesContext : public SvXMLImportContext public: - ScXMLDataPilotTablesContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotTablesContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLDataPilotTablesContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -135,14 +135,14 @@ class ScXMLDataPilotTableContext : public SvXMLImportContext public: - ScXMLDataPilotTableContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLDataPilotTableContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -182,7 +182,7 @@ class ScXMLDPSourceSQLContext : public SvXMLImportContext public: - ScXMLDPSourceSQLContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPSourceSQLContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -190,7 +190,7 @@ public: virtual ~ScXMLDPSourceSQLContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -207,7 +207,7 @@ class ScXMLDPSourceTableContext : public SvXMLImportContext public: - ScXMLDPSourceTableContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPSourceTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -215,7 +215,7 @@ public: virtual ~ScXMLDPSourceTableContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -232,7 +232,7 @@ class ScXMLDPSourceQueryContext : public SvXMLImportContext public: - ScXMLDPSourceQueryContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPSourceQueryContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -240,7 +240,7 @@ public: virtual ~ScXMLDPSourceQueryContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -257,7 +257,7 @@ class ScXMLSourceServiceContext : public SvXMLImportContext public: - ScXMLSourceServiceContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSourceServiceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -265,7 +265,7 @@ public: virtual ~ScXMLSourceServiceContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -286,14 +286,14 @@ class ScXMLDataPilotGrandTotalContext : public SvXMLImportContext public: ScXMLDataPilotGrandTotalContext( - ScXMLImport& rImport, USHORT nPrefix, const ::rtl::OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLDataPilotTableContext* pTableContext ); virtual ~ScXMLDataPilotGrandTotalContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -310,7 +310,7 @@ class ScXMLSourceCellRangeContext : public SvXMLImportContext public: - ScXMLSourceCellRangeContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSourceCellRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -318,7 +318,7 @@ public: virtual ~ScXMLSourceCellRangeContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -361,7 +361,7 @@ class ScXMLDataPilotFieldContext : public SvXMLImportContext public: - ScXMLDataPilotFieldContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotFieldContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -369,7 +369,7 @@ public: virtual ~ScXMLDataPilotFieldContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -409,7 +409,7 @@ class ScXMLDataPilotFieldReferenceContext : public SvXMLImportContext public: - ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotFieldReferenceContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -427,7 +427,7 @@ class ScXMLDataPilotLevelContext : public SvXMLImportContext public: - ScXMLDataPilotLevelContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotLevelContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -435,7 +435,7 @@ public: virtual ~ScXMLDataPilotLevelContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -452,7 +452,7 @@ class ScXMLDataPilotDisplayInfoContext : public SvXMLImportContext public: - ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotDisplayInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -470,7 +470,7 @@ class ScXMLDataPilotSortInfoContext : public SvXMLImportContext public: - ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotSortInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -488,7 +488,7 @@ class ScXMLDataPilotLayoutInfoContext : public SvXMLImportContext public: - ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotLayoutInfoContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -512,7 +512,7 @@ public: ScXMLDataPilotFieldContext* GetDataPilotField() { return pDataPilotField; } - ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotSubTotalsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -520,7 +520,7 @@ public: virtual ~ScXMLDataPilotSubTotalsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -539,7 +539,7 @@ class ScXMLDataPilotSubTotalContext : public SvXMLImportContext public: - ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotSubTotalContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -547,7 +547,7 @@ public: virtual ~ScXMLDataPilotSubTotalContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -564,7 +564,7 @@ class ScXMLDataPilotMembersContext : public SvXMLImportContext public: - ScXMLDataPilotMembersContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotMembersContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -572,7 +572,7 @@ public: virtual ~ScXMLDataPilotMembersContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -595,7 +595,7 @@ class ScXMLDataPilotMemberContext : public SvXMLImportContext public: - ScXMLDataPilotMemberContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -603,7 +603,7 @@ public: virtual ~ScXMLDataPilotMemberContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -620,7 +620,7 @@ class ScXMLDataPilotGroupsContext : public SvXMLImportContext public: - ScXMLDataPilotGroupsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotGroupsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -628,7 +628,7 @@ public: virtual ~ScXMLDataPilotGroupsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -648,7 +648,7 @@ class ScXMLDataPilotGroupContext : public SvXMLImportContext public: - ScXMLDataPilotGroupContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotGroupContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -656,7 +656,7 @@ public: virtual ~ScXMLDataPilotGroupContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -677,7 +677,7 @@ class ScXMLDataPilotGroupMemberContext : public SvXMLImportContext public: - ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDataPilotGroupMemberContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -685,7 +685,7 @@ public: virtual ~ScXMLDataPilotGroupMemberContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx index 33c19be9a824..1a791879d0c6 100644 --- a/sc/source/filter/xml/xmldrani.cxx +++ b/sc/source/filter/xml/xmldrani.cxx @@ -72,7 +72,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLDatabaseRangesContext::ScXMLDatabaseRangesContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -87,7 +87,7 @@ ScXMLDatabaseRangesContext::~ScXMLDatabaseRangesContext() GetScImport().UnlockSolarMutex(); } -SvXMLImportContext *ScXMLDatabaseRangesContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDatabaseRangesContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -116,7 +116,7 @@ void ScXMLDatabaseRangesContext::EndElement() } ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : @@ -126,26 +126,26 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport, eOrientation(table::TableOrientation_ROWS), nRefresh(0), nSubTotalsUserListIndex(0), - bContainsSort(sal_False), - bContainsSubTotal(sal_False), + bContainsSort(false), + bContainsSubTotal(false), bNative(sal_True), - bIsSelection(sal_False), - bKeepFormats(sal_False), - bMoveCells(sal_False), - bStripData(sal_False), + bIsSelection(false), + bKeepFormats(false), + bMoveCells(false), + bStripData(false), bContainsHeader(sal_True), - bAutoFilter(sal_False), - bSubTotalsBindFormatsToContent(sal_False), - bSubTotalsIsCaseSensitive(sal_False), - bSubTotalsInsertPageBreaks(sal_False), - bSubTotalsSortGroups(sal_False), - bSubTotalsEnabledUserList(sal_False), + bAutoFilter(false), + bSubTotalsBindFormatsToContent(false), + bSubTotalsIsCaseSensitive(false), + bSubTotalsInsertPageBreaks(false), + bSubTotalsSortGroups(false), + bSubTotalsEnabledUserList(false), bSubTotalsAscending(sal_True), - bFilterCopyOutputData(sal_False), - bFilterIsCaseSensitive(sal_False), - bFilterSkipDuplicates(sal_False), - bFilterUseRegularExpressions(sal_False), - bFilterConditionSourceRange(sal_False) + bFilterCopyOutputData(false), + bFilterIsCaseSensitive(false), + bFilterSkipDuplicates(false), + bFilterUseRegularExpressions(false), + bFilterConditionSourceRange(false) { nSourceType = sheet::DataImportMode_NONE; sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0; @@ -154,7 +154,7 @@ ScXMLDatabaseRangeContext::ScXMLDatabaseRangeContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -221,7 +221,7 @@ ScXMLDatabaseRangeContext::~ScXMLDatabaseRangeContext() { } -SvXMLImportContext *ScXMLDatabaseRangeContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDatabaseRangeContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -299,7 +299,7 @@ void ScXMLDatabaseRangeContext::EndElement() } catch ( uno::RuntimeException& rRuntimeException ) { - bInsert = sal_False; + bInsert = false; rtl::OUString sErrorMessage(RTL_CONSTASCII_USTRINGPARAM("DatabaseRange ")); sErrorMessage += sDatabaseRangeName; sErrorMessage += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(" could not be created with the range ")); @@ -446,7 +446,7 @@ void ScXMLDatabaseRangeContext::EndElement() } ScXMLSourceSQLContext::ScXMLSourceSQLContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -460,7 +460,7 @@ ScXMLSourceSQLContext::ScXMLSourceSQLContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -490,7 +490,7 @@ ScXMLSourceSQLContext::~ScXMLSourceSQLContext() { } -SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSourceSQLContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -519,7 +519,7 @@ void ScXMLSourceSQLContext::EndElement() } ScXMLSourceTableContext::ScXMLSourceTableContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -533,7 +533,7 @@ ScXMLSourceTableContext::ScXMLSourceTableContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -558,7 +558,7 @@ ScXMLSourceTableContext::~ScXMLSourceTableContext() { } -SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSourceTableContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -587,7 +587,7 @@ void ScXMLSourceTableContext::EndElement() } ScXMLSourceQueryContext::ScXMLSourceQueryContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -601,7 +601,7 @@ ScXMLSourceQueryContext::ScXMLSourceQueryContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -626,7 +626,7 @@ ScXMLSourceQueryContext::~ScXMLSourceQueryContext() { } -SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSourceQueryContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -655,7 +655,7 @@ void ScXMLSourceQueryContext::EndElement() } ScXMLConResContext::ScXMLConResContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -669,7 +669,7 @@ ScXMLConResContext::ScXMLConResContext( ScXMLImport& rImport, { rtl::OUString sAttrName = xAttrList->getNameByIndex( i ); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); rtl::OUString sValue = xAttrList->getValueByIndex( i ); @@ -687,7 +687,7 @@ ScXMLConResContext::~ScXMLConResContext() { } -SvXMLImportContext *ScXMLConResContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLConResContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -705,7 +705,7 @@ void ScXMLConResContext::EndElement() } ScXMLSubTotalRulesContext::ScXMLSubTotalRulesContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -719,7 +719,7 @@ ScXMLSubTotalRulesContext::ScXMLSubTotalRulesContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -748,7 +748,7 @@ ScXMLSubTotalRulesContext::~ScXMLSubTotalRulesContext() { } -SvXMLImportContext *ScXMLSubTotalRulesContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSubTotalRulesContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -783,7 +783,7 @@ void ScXMLSubTotalRulesContext::EndElement() } ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -798,7 +798,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -838,7 +838,7 @@ ScXMLSortGroupsContext::ScXMLSortGroupsContext( ScXMLImport& rImport, if (IsXMLToken(sValue, XML_ASCENDING)) pDatabaseRangeContext->SetSubTotalsAscending(sal_True); else - pDatabaseRangeContext->SetSubTotalsAscending(sal_False); + pDatabaseRangeContext->SetSubTotalsAscending(false); } break; } @@ -849,7 +849,7 @@ ScXMLSortGroupsContext::~ScXMLSortGroupsContext() { } -SvXMLImportContext *ScXMLSortGroupsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSortGroupsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -867,7 +867,7 @@ void ScXMLSortGroupsContext::EndElement() } ScXMLSubTotalRuleContext::ScXMLSubTotalRuleContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -881,7 +881,7 @@ ScXMLSubTotalRuleContext::ScXMLSubTotalRuleContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -900,7 +900,7 @@ ScXMLSubTotalRuleContext::~ScXMLSubTotalRuleContext() { } -SvXMLImportContext *ScXMLSubTotalRuleContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSubTotalRuleContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -931,7 +931,7 @@ void ScXMLSubTotalRuleContext::EndElement() } ScXMLSubTotalFieldContext::ScXMLSubTotalFieldContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -945,7 +945,7 @@ ScXMLSubTotalFieldContext::ScXMLSubTotalFieldContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -969,7 +969,7 @@ ScXMLSubTotalFieldContext::~ScXMLSubTotalFieldContext() { } -SvXMLImportContext *ScXMLSubTotalFieldContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSubTotalFieldContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/xmldrani.hxx b/sc/source/filter/xml/xmldrani.hxx index 7d2d5b2292eb..07268e2aa5dc 100644 --- a/sc/source/filter/xml/xmldrani.hxx +++ b/sc/source/filter/xml/xmldrani.hxx @@ -48,14 +48,14 @@ class ScXMLDatabaseRangesContext : public SvXMLImportContext public: - ScXMLDatabaseRangesContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDatabaseRangesContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLDatabaseRangesContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -112,14 +112,14 @@ class ScXMLDatabaseRangeContext : public SvXMLImportContext public: - ScXMLDatabaseRangeContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDatabaseRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLDatabaseRangeContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -160,7 +160,7 @@ class ScXMLSourceSQLContext : public SvXMLImportContext public: - ScXMLSourceSQLContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSourceSQLContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -168,7 +168,7 @@ public: virtual ~ScXMLSourceSQLContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -186,7 +186,7 @@ class ScXMLSourceTableContext : public SvXMLImportContext public: - ScXMLSourceTableContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSourceTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -194,7 +194,7 @@ public: virtual ~ScXMLSourceTableContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -212,7 +212,7 @@ class ScXMLSourceQueryContext : public SvXMLImportContext public: - ScXMLSourceQueryContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSourceQueryContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -220,7 +220,7 @@ public: virtual ~ScXMLSourceQueryContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -237,7 +237,7 @@ class ScXMLConResContext : public SvXMLImportContext public: - ScXMLConResContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLConResContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -245,7 +245,7 @@ public: virtual ~ScXMLConResContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -262,7 +262,7 @@ class ScXMLSubTotalRulesContext : public SvXMLImportContext public: - ScXMLSubTotalRulesContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSubTotalRulesContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -270,7 +270,7 @@ public: virtual ~ScXMLSubTotalRulesContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -287,7 +287,7 @@ class ScXMLSortGroupsContext : public SvXMLImportContext public: - ScXMLSortGroupsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSortGroupsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -295,7 +295,7 @@ public: virtual ~ScXMLSortGroupsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -313,7 +313,7 @@ class ScXMLSubTotalRuleContext : public SvXMLImportContext public: - ScXMLSubTotalRuleContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSubTotalRuleContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -321,7 +321,7 @@ public: virtual ~ScXMLSubTotalRuleContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -344,7 +344,7 @@ class ScXMLSubTotalFieldContext : public SvXMLImportContext public: - ScXMLSubTotalFieldContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSubTotalFieldContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -352,7 +352,7 @@ public: virtual ~ScXMLSubTotalFieldContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlexprt.cxx b/sc/source/filter/xml/xmlexprt.cxx index 77e3907fa8a0..4cb9915ac186 100644 --- a/sc/source/filter/xml/xmlexprt.cxx +++ b/sc/source/filter/xml/xmlexprt.cxx @@ -475,9 +475,9 @@ ScXMLExport::ScXMLExport( nOpenRow(-1), nProgressCount(0), nCurrentTable(0), - bHasRowHeader(sal_False), - bRowHeaderOpen(sal_False), - mbShowProgress( sal_False ) + bHasRowHeader(false), + bRowHeaderOpen(false), + mbShowProgress( false ) { if (getExportFlags() & EXPORT_CONTENT) { @@ -649,7 +649,7 @@ void ScXMLExport::CollectSharedData(sal_Int32& nTableCount, sal_Int32& nShapesCo { uno::Reference<drawing::XDrawPage> xDrawPage(xDrawPageSupplier->getDrawPage()); ScMyDrawPage aDrawPage; - aDrawPage.bHasForms = sal_False; + aDrawPage.bHasForms = false; aDrawPage.xDrawPage.set(xDrawPage); pSharedData->AddDrawPage(aDrawPage, nTable); uno::Reference<container::XIndexAccess> xShapesIndex (xDrawPage, uno::UNO_QUERY); @@ -750,7 +750,7 @@ void ScXMLExport::CollectShapesAutoStyles(const sal_Int32 nTableCount) while (aItr != aEndItr) { GetShapeExport()->collectShapeAutoStyles(*aItr); - IncrementProgressBar(sal_False); + IncrementProgressBar(false); ++aItr; } } @@ -760,7 +760,7 @@ void ScXMLExport::CollectShapesAutoStyles(const sal_Int32 nTableCount) while (aShapeItr != aEndItr && (static_cast<sal_Int32>(aShapeItr->aAddress.Tab()) == nTable)) { GetShapeExport()->collectShapeAutoStyles(aShapeItr->xShape); - IncrementProgressBar(sal_False); + IncrementProgressBar(false); ++aShapeItr; } } @@ -889,7 +889,7 @@ void ScXMLExport::GetDetectiveOpList( ScMyDetectiveOpContainer& rDetOp ) sal_uInt32 nCount(pOpList->Count()); for( sal_uInt32 nIndex = 0; nIndex < nCount; ++nIndex ) { - ScDetOpData* pDetData(pOpList->GetObject( static_cast<USHORT>(nIndex) )); + ScDetOpData* pDetData(pOpList->GetObject( static_cast<sal_uInt16>(nIndex) )); if( pDetData ) { const ScAddress& rDetPos = pDetData->GetPos(); @@ -965,8 +965,8 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd sal_Int32 nIndex; sal_Int32 nPrevColumn(0); sal_Bool bPrevIsVisible (sal_True); - sal_Bool bWasHeader (sal_False); - sal_Bool bIsHeader (sal_False); + sal_Bool bWasHeader (false); + sal_Bool bIsHeader (false); sal_Bool bIsClosed (sal_True); sal_Int32 nPrevIndex (-1); sal_Int32 nColumn; @@ -995,7 +995,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd pGroupColumns->OpenGroups(nColumn); OpenHeaderColumn(); bWasHeader = sal_True; - bIsClosed = sal_False; + bIsClosed = false; } else { @@ -1009,7 +1009,7 @@ void ScXMLExport::ExportColumns(const sal_Int32 nTable, const table::CellRangeAd nPrevIndex = nIndex; nPrevColumn = nColumn; nColsRepeated = 1; - bWasHeader = sal_False; + bWasHeader = false; bIsClosed = sal_True; } } @@ -1129,7 +1129,7 @@ void ScXMLExport::WriteRowContent() nPrevValidationIndex = aRange.nValidationIndex; bIsAutoStyle = aRange.bIsAutoStyle; nCols = aRange.nRepeatColumns; - bIsFirst = sal_False; + bIsFirst = false; #ifdef DBG_UTIL nPrevCol = aRange.nStartColumn; #endif @@ -1349,7 +1349,7 @@ void ScXMLExport::CloseRow(const sal_Int32 nRow) if (bHasRowHeader && nRow == aRowHeaderRange.EndRow) { CloseHeaderRows(); - bRowHeaderOpen = sal_False; + bRowHeaderOpen = false; } if (pGroupRows->IsGroupEnd(nRow)) { @@ -1465,11 +1465,11 @@ void ScXMLExport::FillFieldGroup(ScOutlineArray* pFields, ScMyOpenCloseColumnRow sal_Int32 nDepth(pFields->GetDepth()); for(sal_Int32 i = 0; i < nDepth; ++i) { - sal_Int32 nFields = pFields->GetCount(static_cast<USHORT>(i)); + sal_Int32 nFields = pFields->GetCount(static_cast<sal_uInt16>(i)); for (sal_Int32 j = 0; j < nFields; ++j) { ScMyColumnRowGroup aGroup; - ScOutlineEntry* pEntry(pFields->GetEntry(static_cast<USHORT>(i), static_cast<USHORT>(j))); + ScOutlineEntry* pEntry(pFields->GetEntry(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j))); aGroup.nField = pEntry->GetStart(); aGroup.nLevel = static_cast<sal_Int16>(i); aGroup.bDisplay = !(pEntry->IsHidden()); @@ -1484,7 +1484,7 @@ void ScXMLExport::FillColumnRowGroups() { if (pDoc) { - ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable( static_cast<SCTAB>(nCurrentTable), sal_False ); + ScOutlineTable* pOutlineTable = pDoc->GetOutlineTable( static_cast<SCTAB>(nCurrentTable), false ); if(pOutlineTable) { ScOutlineArray* pCols(pOutlineTable->GetColArray()); @@ -1834,7 +1834,7 @@ void ScXMLExport::_ExportContent() FillColumnRowGroups(); if (bHasColumnHeader) pSharedData->SetLastColumn(nTable, aColumnHeaderRange.EndColumn); - bRowHeaderOpen = sal_False; + bRowHeaderOpen = false; if (bHasRowHeader) pSharedData->SetLastRow(nTable, aRowHeaderRange.EndRow); pDefaults->FillDefaultStyles(nTable, pSharedData->GetLastRow(nTable), @@ -1854,7 +1854,7 @@ void ScXMLExport::_ExportContent() { ExportFormatRanges(0, 0, aCell.aCellAddress.Column - 1, aCell.aCellAddress.Row, nTable); aPrevCell = aCell; - bIsFirst = sal_False; + bIsFirst = false; } else { @@ -1896,7 +1896,7 @@ void ScXMLExport::_ExportContent() } } } - IncrementProgressBar(sal_False); + IncrementProgressBar(false); } } WriteExternalRefCaches(); @@ -1962,7 +1962,7 @@ void ScXMLExport::_ExportStyles( sal_Bool bUsed ) exportDataStyles(); aStylesExp.exportStyleFamily(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("CellStyles")), - rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME)), xCellStylesExportPropertySetMapper, FALSE, XML_STYLE_FAMILY_TABLE_CELL); + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(XML_STYLE_FAMILY_TABLE_CELL_STYLES_NAME)), xCellStylesExportPropertySetMapper, false, XML_STYLE_FAMILY_TABLE_CELL); SvXMLExport::_ExportStyles(bUsed); } @@ -2081,7 +2081,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x { rtl::OUString* pTemp(new rtl::OUString(EncodeStyleName(sStyleName))); sal_Int32 nIndex(0); - if (!pCellStyles->AddStyleName(pTemp, nIndex, sal_False)) + if (!pCellStyles->AddStyleName(pTemp, nIndex, false)) { delete pTemp; pTemp = NULL; @@ -2095,7 +2095,7 @@ void ScXMLExport::AddStyleFromCells(const uno::Reference<beans::XPropertySet>& x { if (bGetMerge) bGetMerge = GetMerged(pAddresses, xTable); - pCellStyles->AddRangeStyleName(*pAddresses, nIndex, sal_False, nValidationIndex, nNumberFormat); + pCellStyles->AddRangeStyleName(*pAddresses, nIndex, false, nValidationIndex, nNumberFormat); if (!sStyleName.equalsAsciiL("Default", 7) || nValidationIndex != -1) { pSharedData->SetLastColumn(nTable, pAddresses->EndColumn); @@ -2496,7 +2496,7 @@ void ScXMLExport::_ExportAutoStyles() sal_Int32 nTableCount(xIndex->getCount()); pCellStyles->AddNewTable(nTableCount - 1); CollectShapesAutoStyles(nTableCount); - for (sal_Int32 nTable = 0; nTable < nTableCount; ++nTable, IncrementProgressBar(sal_False)) + for (sal_Int32 nTable = 0; nTable < nTableCount; ++nTable, IncrementProgressBar(false)) { bool bUseStream = pSheetData && pDoc && pDoc->IsStreamValid((SCTAB)nTable) && pSheetData->HasStreamPos(nTable) && xSourceStream.is(); @@ -2540,7 +2540,7 @@ void ScXMLExport::_ExportAutoStyles() if (xProperties.is()) { AddStyleFromCells(xProperties, xTable, nTable, NULL); - IncrementProgressBar(sal_False); + IncrementProgressBar(false); } } } @@ -2645,9 +2645,9 @@ void ScXMLExport::_ExportAutoStyles() { Reference<text::XText> xText(xCells->nextElement(), uno::UNO_QUERY); if (xText.is()) - GetTextParagraphExport()->collectTextAutoStyles(xText, sal_False, sal_False); + GetTextParagraphExport()->collectTextAutoStyles(xText, false, false); ++nCount2; - IncrementProgressBar(sal_False); + IncrementProgressBar(false); } if(nCount2 > nCount) GetProgressBarHelper()->SetReference(GetProgressBarHelper()->GetReference() + nCount2 - nCount); @@ -2741,7 +2741,7 @@ void ScXMLExport::CollectInternalShape( uno::Reference< drawing::XShape > xShape sal_Bool ScXMLExport::GetMerged (const table::CellRangeAddress* pCellAddress, const uno::Reference <sheet::XSpreadsheet>& xTable) { - sal_Bool bReady(sal_False); + sal_Bool bReady(false); sal_Int32 nRow(pCellAddress->StartRow); sal_Int32 nCol(pCellAddress->StartColumn); sal_Int32 nEndRow(pCellAddress->EndRow); @@ -2786,7 +2786,7 @@ sal_Bool ScXMLExport::GetMerged (const table::CellRangeAddress* pCellAddress, sal_Bool ScXMLExport::IsMatrix (const ScAddress& aCell, table::CellRangeAddress& aCellAddress, sal_Bool& bIsFirst) const { - bIsFirst = sal_False; + bIsFirst = false; ScRange aMatrixRange; @@ -2809,7 +2809,7 @@ sal_Bool ScXMLExport::IsMatrix (const ScAddress& aCell, } } - return sal_False; + return false; } sal_Bool ScXMLExport::GetCellText (ScMyCell& rMyCell, const ScAddress& aPos) const @@ -2845,7 +2845,7 @@ void ScXMLExport::WriteCell (ScMyCell& aCell) AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_MATRIX_COLUMNS_SPANNED, sColumns.makeStringAndClear()); AddAttribute(XML_NAMESPACE_TABLE, XML_NUMBER_MATRIX_ROWS_SPANNED, sRows.makeStringAndClear()); } - sal_Bool bIsEmpty(sal_False); + sal_Bool bIsEmpty(false); switch (aCell.nType) { case table::CellContentType_EMPTY : @@ -2889,11 +2889,11 @@ void ScXMLExport::WriteCell (ScMyCell& aCell) rtl::OUString sOUFormula(sFormula.makeStringAndClear()); if (!bIsMatrix) { - AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula, sal_False )); + AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula, false )); } else { - AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula.copy(1, sOUFormula.getLength() - 2), sal_False )); + AddAttribute(sAttrFormula, GetNamespaceMap().GetQNameByKey( nNamespacePrefix, sOUFormula.copy(1, sOUFormula.getLength() - 2), false )); } } if (pFormulaCell->IsValue()) @@ -2957,7 +2957,7 @@ void ScXMLExport::WriteCell (ScMyCell& aCell) WriteAnnotation(aCell); WriteDetective(aCell); - sal_Bool bEditCell = sal_False; + sal_Bool bEditCell = false; if (!bIsEmpty) { @@ -2967,11 +2967,11 @@ void ScXMLExport::WriteCell (ScMyCell& aCell) bEditCell = sal_True; uno::Reference<text::XText> xText(xCurrentTableCellRange->getCellByPosition(aCell.aCellAddress.Column, aCell.aCellAddress.Row), uno::UNO_QUERY); if ( xText.is()) - GetTextParagraphExport()->exportText(xText, sal_False, sal_False); + GetTextParagraphExport()->exportText(xText, false, false); } else { - SvXMLElementExport aElemP(*this, sElemP, sal_True, sal_False); + SvXMLElementExport aElemP(*this, sElemP, sal_True, false); sal_Bool bPrevCharWasSpace(sal_True); if (GetCellText(aCell, aCellPos)) GetTextParagraphExport()->exportText(aCell.sStringValue, bPrevCharWasSpace); @@ -3014,7 +3014,7 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, xShapeProps->getPropertyValue( sPersistName ) >>= aChartName; ScRange aEmptyRange; ScChartListener aSearcher( aChartName, pDoc, aEmptyRange ); - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection(); if ( pCollection && pCollection->Search( &aSearcher, nIndex ) ) { @@ -3098,14 +3098,14 @@ void ScXMLExport::ExportShape(const uno::Reference < drawing::XShape >& xShape, // Add Hlink AddAttribute( XML_NAMESPACE_XLINK, XML_TYPE, XML_SIMPLE ); AddAttribute( XML_NAMESPACE_XLINK, XML_HREF, sHlink); - pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, sal_False, sal_False ) ); + pDrawA.reset( new SvXMLElementExport( *this, XML_NAMESPACE_DRAW, XML_A, false, false ) ); // Attribute list has been cleared by previous operation // re-add pre-loaded attributes AddAttributeList( xSaveAttribs ); } GetShapeExport()->exportShape(xShape, SEF_DEFAULT, pPoint); } - IncrementProgressBar(sal_False); + IncrementProgressBar(false); } void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) @@ -3115,7 +3115,7 @@ void ScXMLExport::WriteShapes(const ScMyCell& rMyCell) awt::Point aPoint; Rectangle aRec = pDoc->GetMMRect(static_cast<SCCOL>(rMyCell.aCellAddress.Column), static_cast<SCROW>(rMyCell.aCellAddress.Row), static_cast<SCCOL>(rMyCell.aCellAddress.Column), static_cast<SCROW>(rMyCell.aCellAddress.Row), static_cast<SCTAB>(rMyCell.aCellAddress.Sheet)); - BOOL bNegativePage(pDoc->IsNegativePage(rMyCell.aCellAddress.Sheet)); + sal_Bool bNegativePage(pDoc->IsNegativePage(rMyCell.aCellAddress.Sheet)); if (bNegativePage) aPoint.X = aRec.Right(); else @@ -3155,7 +3155,7 @@ void ScXMLExport::WriteTableShapes() if (pTableShapes && !(*pTableShapes)[nCurrentTable].empty()) { DBG_ASSERT(pTableShapes->size() > static_cast<size_t>(nCurrentTable), "wrong Table"); - SvXMLElementExport aShapesElem(*this, XML_NAMESPACE_TABLE, XML_SHAPES, sal_True, sal_False); + SvXMLElementExport aShapesElem(*this, XML_NAMESPACE_TABLE, XML_SHAPES, sal_True, false); ScMyTableXShapes::iterator aItr((*pTableShapes)[nCurrentTable].begin()); ScMyTableXShapes::iterator aEndItr((*pTableShapes)[nCurrentTable].end()); while (aItr != aEndItr) @@ -3212,7 +3212,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape > { SvXMLElementExport aCreatorElem( *this, XML_NAMESPACE_DC, XML_CREATOR, sal_True, - sal_False ); + false ); Characters(sAuthor); } @@ -3228,14 +3228,14 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape > GetMM100UnitConverter().convertDateTime(sBuf, fDate,sal_True); SvXMLElementExport aDateElem( *this, XML_NAMESPACE_DC, XML_DATE, sal_True, - sal_False ); + false ); Characters(sBuf.makeStringAndClear()); } else { SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META, XML_DATE_STRING, sal_True, - sal_False ); + false ); Characters(rtl::OUString(aDate)); } } @@ -3243,7 +3243,7 @@ void ScXMLExport::exportAnnotationMeta( const uno::Reference < drawing::XShape > { SvXMLElementExport aDateElem( *this, XML_NAMESPACE_META, XML_DATE_STRING, sal_True, - sal_False ); + false ); Characters(rtl::OUString(aDate)); } } @@ -3325,7 +3325,7 @@ void ScXMLExport::SetRepeatAttribute (const sal_Int32 nEqualCellCount) sal_Int32 nTemp(nEqualCellCount + 1); OUString sOUEqualCellCount(OUString::valueOf(nTemp)); AddAttribute(sAttrColumnsRepeated, sOUEqualCellCount); - IncrementProgressBar(sal_False, nEqualCellCount); + IncrementProgressBar(false, nEqualCellCount); } } @@ -3345,7 +3345,7 @@ sal_Bool ScXMLExport::IsEditCell(const com::sun::star::table::CellAddress& aAddr if (pBaseCell) return (pBaseCell->GetCellType() == CELLTYPE_EDIT); - return sal_False; + return false; } sal_Bool ScXMLExport::IsEditCell(ScMyCell& rCell) const @@ -3390,7 +3390,7 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) ScUnoConversion::FillScAddress( aCellPos1, aCell1.aCellAddress ); ScAddress aCellPos2; ScUnoConversion::FillScAddress( aCellPos2, aCell2.aCellAddress ); - sal_Bool bIsEqual = sal_False; + sal_Bool bIsEqual = false; if( !aCell1.bIsMergedBase && !aCell2.bIsMergedBase && aCell1.bIsCovered == aCell2.bIsCovered && !aCell1.bIsMatrixBase && !aCell2.bIsMatrixBase && @@ -3406,7 +3406,7 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) aCell1.aAreaLink.Compare( aCell2.aAreaLink ) ) || !aCell1.bHasAreaLink ) { - if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && sal_False/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable + if (!aCell1.bHasAnnotation || (aCell1.bHasAnnotation && false/*IsAnnotationEqual(aCell1.xCell, aCell2.xCell)*/)) // no longer compareable { if ((((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.bIsAutoStyle == aCell2.bIsAutoStyle)) || ((aCell1.nStyleIndex == aCell2.nStyleIndex) && (aCell1.nStyleIndex == -1))) && @@ -3441,7 +3441,7 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) case table::CellContentType_TEXT : { if (IsEditCell(aCell1) || IsEditCell(aCell2)) - bIsEqual = sal_False; + bIsEqual = false; else { if (GetCellText(aCell1, aCellPos1) && GetCellText(aCell2, aCellPos2)) @@ -3450,18 +3450,18 @@ sal_Bool ScXMLExport::IsCellEqual (ScMyCell& aCell1, ScMyCell& aCell2) (lcl_GetRawString(pDoc, aCellPos1) == lcl_GetRawString(pDoc, aCellPos2)); } else - bIsEqual = sal_False; + bIsEqual = false; } } break; case table::CellContentType_FORMULA : { - bIsEqual = sal_False; + bIsEqual = false; } break; default : { - bIsEqual = sal_False; + bIsEqual = false; } break; } @@ -3559,7 +3559,7 @@ void ScXMLExport::WriteTableSource() sal_Int32 nCount(xIndex->getCount()); if (nCount) { - sal_Bool bFound(sal_False); + sal_Bool bFound(false); uno::Reference <beans::XPropertySet> xLinkProps; for (sal_Int32 i = 0; (i < nCount) && !bFound; ++i) { @@ -3660,7 +3660,7 @@ void ScXMLExport::WriteTheLabelRanges( const uno::Reference< sheet::XSpreadsheet { SvXMLElementExport aElem( *this, XML_NAMESPACE_TABLE, XML_LABEL_RANGES, sal_True, sal_True ); WriteLabelRanges( xColRangesIAccess, sal_True ); - WriteLabelRanges( xRowRangesIAccess, sal_False ); + WriteLabelRanges( xRowRangesIAccess, false ); } } @@ -3720,7 +3720,7 @@ void ScXMLExport::WriteNamedExpressions(const com::sun::star::uno::Reference <co OUString sOUBaseCellAddress; ScRangeStringConverter::GetStringFromAddress( sOUBaseCellAddress, - xNamedRange->getReferencePosition(), pDoc, FormulaGrammar::CONV_OOO, ' ', sal_False, SCA_ABS_3D ); + xNamedRange->getReferencePosition(), pDoc, FormulaGrammar::CONV_OOO, ' ', false, SCA_ABS_3D ); AddAttribute(XML_NAMESPACE_TABLE, XML_BASE_CELL_ADDRESS, sOUBaseCellAddress); const ScRangeData* pNamedRange = pNamedRanges->findByName(sOUName); @@ -3971,7 +3971,7 @@ void ScXMLExport::WriteExternalRefCaches() } } SvXMLElementExport aElemCell(*this, XML_NAMESPACE_TABLE, XML_TABLE_CELL, sal_True, sal_True); - SvXMLElementExport aElemText(*this, XML_NAMESPACE_TEXT, XML_P, sal_True, sal_False); + SvXMLElementExport aElemText(*this, XML_NAMESPACE_TEXT, XML_P, sal_True, false); Characters(aStrVal); nLastCol = nCol; @@ -4137,15 +4137,20 @@ void ScXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>& ++nPropsToAdd; } + bool bVBACompat = false; uno::Reference <container::XNameAccess> xCodeNameAccess; DBG_ASSERT( pDoc, "ScXMLExport::GetConfigurationSettings - no ScDocument!" ); if( pDoc && pDoc->IsInVBAMode() ) { + // VBA compatibility mode + bVBACompat = true; + ++nPropsToAdd; + // code names xCodeNameAccess = new XMLCodeNameProvider( pDoc ); - if( xCodeNameAccess.is() && xCodeNameAccess->hasElements() ) + if( xCodeNameAccess->hasElements() ) ++nPropsToAdd; else - xCodeNameAccess = 0; + xCodeNameAccess.clear(); } if( nPropsToAdd > 0 ) @@ -4158,10 +4163,17 @@ void ScXMLExport::GetConfigurationSettings(uno::Sequence<beans::PropertyValue>& rProps[nCount].Value <<= aTrackedChangesKey.makeStringAndClear(); ++nCount; } + if( bVBACompat ) + { + rProps[nCount].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("VBACompatibilityMode")); + rProps[nCount].Value <<= bVBACompat; + ++nCount; + } if( xCodeNameAccess.is() ) { rProps[nCount].Name = rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ScriptConfiguration")); rProps[nCount].Value <<= xCodeNameAccess; + ++nCount; } } } @@ -4188,10 +4200,10 @@ XMLNumberFormatAttributesExportHelper* ScXMLExport::GetNumberFormatAttributesExp void ScXMLExport::CollectUserDefinedNamespaces(const SfxItemPool* pPool, sal_uInt16 nAttrib) { const SfxPoolItem* pItem; - sal_uInt16 nItems(pPool->GetItemCount( nAttrib )); - for( sal_uInt16 i = 0; i < nItems; ++i ) + sal_uInt32 nItems(pPool->GetItemCount2( nAttrib )); + for( sal_uInt32 i = 0; i < nItems; ++i ) { - if( 0 != (pItem = pPool->GetItem( nAttrib, i ) ) ) + if( 0 != (pItem = pPool->GetItem2( nAttrib, i ) ) ) { const SvXMLAttrContainerItem *pUnknown((const SvXMLAttrContainerItem *)pItem); if( (pUnknown->GetAttrCount() > 0) ) @@ -4306,10 +4318,10 @@ sal_Bool SAL_CALL ScXMLExport::filter( const ::com::sun::star::uno::Sequence< :: { SolarMutexGuard aGuard; if (pDoc) - pDoc->DisableIdle(TRUE); + pDoc->DisableIdle(sal_True); sal_Bool bReturn(SvXMLExport::filter(aDescriptor)); if (pDoc) - pDoc->DisableIdle(FALSE); + pDoc->DisableIdle(false); return bReturn; } @@ -4318,7 +4330,7 @@ void SAL_CALL ScXMLExport::cancel() { SolarMutexGuard aGuard; if (pDoc) - pDoc->DisableIdle(FALSE); + pDoc->DisableIdle(false); SvXMLExport::cancel(); } diff --git a/sc/source/filter/xml/xmlexternaltabi.cxx b/sc/source/filter/xml/xmlexternaltabi.cxx index 73c00cdc136b..1e2277465c2a 100644 --- a/sc/source/filter/xml/xmlexternaltabi.cxx +++ b/sc/source/filter/xml/xmlexternaltabi.cxx @@ -56,7 +56,7 @@ using ::com::sun::star::xml::sax::XAttributeList; // ============================================================================ ScXMLExternalRefTabSourceContext::ScXMLExternalRefTabSourceContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -93,7 +93,7 @@ ScXMLExternalRefTabSourceContext::~ScXMLExternalRefTabSourceContext() } SvXMLImportContext* ScXMLExternalRefTabSourceContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ ) { return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } @@ -139,7 +139,7 @@ void ScXMLExternalRefTabSourceContext::EndElement() // ============================================================================ ScXMLExternalRefRowsContext::ScXMLExternalRefRowsContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& /* xAttrList */, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -152,7 +152,7 @@ ScXMLExternalRefRowsContext::~ScXMLExternalRefRowsContext() } SvXMLImportContext* ScXMLExternalRefRowsContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) { // #i101319# row elements inside group, rows or header-rows // are treated like row elements directly in the table element @@ -182,7 +182,7 @@ void ScXMLExternalRefRowsContext::EndElement() // ============================================================================ ScXMLExternalRefRowContext::ScXMLExternalRefRowContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -216,7 +216,7 @@ ScXMLExternalRefRowContext::~ScXMLExternalRefRowContext() } SvXMLImportContext* ScXMLExternalRefRowContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) { const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName); @@ -259,7 +259,7 @@ void ScXMLExternalRefRowContext::EndElement() // ============================================================================ ScXMLExternalRefCellContext::ScXMLExternalRefCellContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList, ScXMLExternalTabData& rRefInfo ) : SvXMLImportContext( rImport, nPrefix, rLName ), mrScImport(rImport), @@ -366,7 +366,7 @@ ScXMLExternalRefCellContext::~ScXMLExternalRefCellContext() } SvXMLImportContext* ScXMLExternalRefCellContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& xAttrList ) { const SvXMLTokenMap& rTokenMap = mrScImport.GetTableRowCellElemTokenMap(); sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLocalName); @@ -408,7 +408,7 @@ void ScXMLExternalRefCellContext::SetCellString(const OUString& rStr) // ============================================================================ ScXMLExternalRefCellTextContext::ScXMLExternalRefCellTextContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& /*xAttrList*/, ScXMLExternalRefCellContext& rParent ) : SvXMLImportContext( rImport, nPrefix, rLName ), @@ -422,7 +422,7 @@ ScXMLExternalRefCellTextContext::~ScXMLExternalRefCellTextContext() } SvXMLImportContext* ScXMLExternalRefCellTextContext::CreateChildContext( - USHORT nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ ) + sal_uInt16 nPrefix, const OUString& rLocalName, const Reference<XAttributeList>& /*xAttrList*/ ) { return new SvXMLImportContext(GetImport(), nPrefix, rLocalName); } diff --git a/sc/source/filter/xml/xmlexternaltabi.hxx b/sc/source/filter/xml/xmlexternaltabi.hxx index 065933ce8108..1d3d1c836fe7 100644 --- a/sc/source/filter/xml/xmlexternaltabi.hxx +++ b/sc/source/filter/xml/xmlexternaltabi.hxx @@ -38,7 +38,7 @@ struct ScXMLExternalTabData; class ScXMLExternalRefTabSourceContext : public SvXMLImportContext { public: - ScXMLExternalRefTabSourceContext( ScXMLImport& rImport, USHORT nPrefix, + ScXMLExternalRefTabSourceContext( ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -46,7 +46,7 @@ public: virtual ~ScXMLExternalRefTabSourceContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -67,7 +67,7 @@ private: class ScXMLExternalRefRowsContext : public SvXMLImportContext { public: - ScXMLExternalRefRowsContext( ScXMLImport& rImport, USHORT nPrefix, + ScXMLExternalRefRowsContext( ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -75,7 +75,7 @@ public: virtual ~ScXMLExternalRefRowsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -91,7 +91,7 @@ private: class ScXMLExternalRefRowContext : public SvXMLImportContext { public: - ScXMLExternalRefRowContext( ScXMLImport& rImport, USHORT nPrefix, + ScXMLExternalRefRowContext( ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -99,7 +99,7 @@ public: virtual ~ScXMLExternalRefRowContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -116,7 +116,7 @@ private: class ScXMLExternalRefCellContext : public SvXMLImportContext { public: - ScXMLExternalRefCellContext( ScXMLImport& rImport, USHORT nPrefix, + ScXMLExternalRefCellContext( ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -124,7 +124,7 @@ public: virtual ~ScXMLExternalRefCellContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -150,7 +150,7 @@ private: class ScXMLExternalRefCellTextContext : public SvXMLImportContext { public: - ScXMLExternalRefCellTextContext( ScXMLImport& rImport, USHORT nPrefix, + ScXMLExternalRefCellTextContext( ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -158,7 +158,7 @@ public: virtual ~ScXMLExternalRefCellTextContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx index f30c4a87c5e7..c350916ad898 100644 --- a/sc/source/filter/xml/xmlfilti.cxx +++ b/sc/source/filter/xml/xmlfilti.cxx @@ -49,7 +49,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -57,12 +57,12 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), pDatabaseRangeContext(pTempDatabaseRangeContext), aFilterFields(), - bSkipDuplicates(sal_False), - bCopyOutputData(sal_False), - bUseRegularExpressions(sal_False), + bSkipDuplicates(false), + bCopyOutputData(false), + bUseRegularExpressions(false), bConnectionOr(sal_True), bNextConnectionOr(sal_True), - bConditionSourceRange(sal_False) + bConditionSourceRange(false) { ScDocument* pDoc(GetScImport().GetDocument()); @@ -72,7 +72,7 @@ ScXMLFilterContext::ScXMLFilterContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -114,7 +114,7 @@ ScXMLFilterContext::~ScXMLFilterContext() { } -SvXMLImportContext *ScXMLFilterContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLFilterContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -159,7 +159,7 @@ void ScXMLFilterContext::EndElement() pDatabaseRangeContext->SetFilterCopyOutputData(bCopyOutputData); } else - pDatabaseRangeContext->SetFilterCopyOutputData(sal_False); + pDatabaseRangeContext->SetFilterCopyOutputData(false); pDatabaseRangeContext->SetFilterIsCaseSensitive(bIsCaseSensitive); pDatabaseRangeContext->SetFilterSkipDuplicates(bSkipDuplicates); pDatabaseRangeContext->SetFilterFields(aFilterFields); @@ -168,7 +168,7 @@ void ScXMLFilterContext::EndElement() } ScXMLAndContext::ScXMLAndContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -176,14 +176,14 @@ ScXMLAndContext::ScXMLAndContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), pFilterContext(pTempFilterContext) { - pFilterContext->OpenConnection(sal_False); + pFilterContext->OpenConnection(false); } ScXMLAndContext::~ScXMLAndContext() { } -SvXMLImportContext *ScXMLAndContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLAndContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -218,7 +218,7 @@ void ScXMLAndContext::EndElement() } ScXMLOrContext::ScXMLOrContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -233,7 +233,7 @@ ScXMLOrContext::~ScXMLOrContext() { } -SvXMLImportContext *ScXMLOrContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLOrContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -269,14 +269,14 @@ void ScXMLOrContext::EndElement() } ScXMLConditionContext::ScXMLConditionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, ScXMLFilterContext* pTempFilterContext) : SvXMLImportContext( rImport, nPrfx, rLName ), pFilterContext(pTempFilterContext), - bIsCaseSensitive(sal_False) + bIsCaseSensitive(false) { sDataType = GetXMLToken(XML_TEXT); @@ -286,7 +286,7 @@ ScXMLConditionContext::ScXMLConditionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName ); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -325,7 +325,7 @@ ScXMLConditionContext::~ScXMLConditionContext() { } -SvXMLImportContext *ScXMLConditionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLConditionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -335,7 +335,7 @@ SvXMLImportContext *ScXMLConditionContext::CreateChildContext( USHORT nPrefix, void ScXMLConditionContext::getOperatorXML(const rtl::OUString sTempOperator, sal_Int32& aFilterOperator, sal_Bool& bUseRegularExpressions) const { - bUseRegularExpressions = sal_False; + bUseRegularExpressions = false; if (IsXMLToken(sTempOperator, XML_MATCH)) { bUseRegularExpressions = sal_True; @@ -404,7 +404,7 @@ void ScXMLConditionContext::EndElement() else { aFilterField.StringValue = sConditionValue; - aFilterField.IsNumeric = sal_False; + aFilterField.IsNumeric = false; } pFilterContext->AddFilterField(aFilterField); } @@ -412,7 +412,7 @@ void ScXMLConditionContext::EndElement() //========================================================================== ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -421,12 +421,12 @@ ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport, pDataPilotTable(pTempDataPilotTableContext), aFilterFields(), nFilterFieldCount(0), - bSkipDuplicates(sal_False), - bCopyOutputData(sal_False), - bUseRegularExpressions(sal_False), + bSkipDuplicates(false), + bCopyOutputData(false), + bUseRegularExpressions(false), bConnectionOr(sal_True), bNextConnectionOr(sal_True), - bConditionSourceRange(sal_False) + bConditionSourceRange(false) { ScDocument* pDoc(GetScImport().GetDocument()); @@ -436,7 +436,7 @@ ScXMLDPFilterContext::ScXMLDPFilterContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -478,7 +478,7 @@ ScXMLDPFilterContext::~ScXMLDPFilterContext() { } -SvXMLImportContext *ScXMLDPFilterContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPFilterContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -526,7 +526,7 @@ void ScXMLDPFilterContext::EndElement() pDataPilotTable->SetFilterCopyOutputData(bCopyOutputData); } else - pDataPilotTable->SetFilterCopyOutputData(sal_False); + pDataPilotTable->SetFilterCopyOutputData(false); // pDataPilotTable->SetFilterIsCaseSensitive(bIsCaseSensitive); // pDataPilotTable->SetFilterSkipDuplicates(bSkipDuplicates); pDataPilotTable->SetSourceQueryParam(aFilterFields); @@ -544,7 +544,7 @@ void ScXMLDPFilterContext::AddFilterField (const ScQueryEntry& aFilterField) } ScXMLDPAndContext::ScXMLDPAndContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -552,14 +552,14 @@ ScXMLDPAndContext::ScXMLDPAndContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ) { pFilterContext = pTempFilterContext; - pFilterContext->OpenConnection(sal_False); + pFilterContext->OpenConnection(false); } ScXMLDPAndContext::~ScXMLDPAndContext() { } -SvXMLImportContext *ScXMLDPAndContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPAndContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -594,7 +594,7 @@ void ScXMLDPAndContext::EndElement() } ScXMLDPOrContext::ScXMLDPOrContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */, @@ -609,7 +609,7 @@ ScXMLDPOrContext::~ScXMLDPOrContext() { } -SvXMLImportContext *ScXMLDPOrContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPOrContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -645,7 +645,7 @@ void ScXMLDPOrContext::EndElement() } ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -653,7 +653,7 @@ ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), pFilterContext(pTempFilterContext), sDataType(GetXMLToken(XML_TEXT)), - bIsCaseSensitive(sal_False) + bIsCaseSensitive(false) { sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); @@ -662,7 +662,7 @@ ScXMLDPConditionContext::ScXMLDPConditionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -701,7 +701,7 @@ ScXMLDPConditionContext::~ScXMLDPConditionContext() { } -SvXMLImportContext *ScXMLDPConditionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDPConditionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -712,7 +712,7 @@ SvXMLImportContext *ScXMLDPConditionContext::CreateChildContext( USHORT nPrefix, void ScXMLDPConditionContext::getOperatorXML(const rtl::OUString sTempOperator, ScQueryOp& aFilterOperator, sal_Bool& bUseRegularExpressions, double& dVal) const { - bUseRegularExpressions = sal_False; + bUseRegularExpressions = false; if (IsXMLToken(sTempOperator, XML_MATCH)) { bUseRegularExpressions = sal_True; @@ -766,7 +766,7 @@ void ScXMLDPConditionContext::EndElement() { aFilterField.nVal = sConditionValue.toDouble(); *aFilterField.pStr = sConditionValue; - aFilterField.bQueryByString = sal_False; + aFilterField.bQueryByString = false; if (dVal != 0.0) { aFilterField.nVal = dVal; diff --git a/sc/source/filter/xml/xmlfilti.hxx b/sc/source/filter/xml/xmlfilti.hxx index 7bd5c1f331d3..4d0495ba341f 100644 --- a/sc/source/filter/xml/xmlfilti.hxx +++ b/sc/source/filter/xml/xmlfilti.hxx @@ -66,7 +66,7 @@ class ScXMLFilterContext : public SvXMLImportContext public: - ScXMLFilterContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLFilterContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -74,7 +74,7 @@ public: virtual ~ScXMLFilterContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -101,7 +101,7 @@ class ScXMLAndContext : public SvXMLImportContext public: - ScXMLAndContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLAndContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -109,7 +109,7 @@ public: virtual ~ScXMLAndContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -126,7 +126,7 @@ class ScXMLOrContext : public SvXMLImportContext public: - ScXMLOrContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLOrContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -134,7 +134,7 @@ public: virtual ~ScXMLOrContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -157,7 +157,7 @@ class ScXMLConditionContext : public SvXMLImportContext public: - ScXMLConditionContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLConditionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -165,7 +165,7 @@ public: virtual ~ScXMLConditionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -200,7 +200,7 @@ class ScXMLDPFilterContext : public SvXMLImportContext public: - ScXMLDPFilterContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPFilterContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -208,7 +208,7 @@ public: virtual ~ScXMLDPFilterContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -234,7 +234,7 @@ class ScXMLDPAndContext : public SvXMLImportContext public: - ScXMLDPAndContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPAndContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -242,7 +242,7 @@ public: virtual ~ScXMLDPAndContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -259,7 +259,7 @@ class ScXMLDPOrContext : public SvXMLImportContext public: - ScXMLDPOrContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPOrContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -267,7 +267,7 @@ public: virtual ~ScXMLDPOrContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -290,7 +290,7 @@ class ScXMLDPConditionContext : public SvXMLImportContext public: - ScXMLDPConditionContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLDPConditionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -298,7 +298,7 @@ public: virtual ~ScXMLDPConditionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlfonte.cxx b/sc/source/filter/xml/xmlfonte.cxx index ec9715c7131a..388952a75701 100644 --- a/sc/source/filter/xml/xmlfonte.cxx +++ b/sc/source/filter/xml/xmlfonte.cxx @@ -71,10 +71,10 @@ void ScXMLFontAutoStylePool_Impl::AddFontItems(sal_uInt16* pWhichIds, sal_uInt8 sal::static_int_cast<sal_Int16>(pFont->GetPitch()), pFont->GetCharSet() ); } - sal_uInt16 nItems(pItemPool->GetItemCount( nWhichId )); - for( sal_uInt16 j = 0; j < nItems; ++j ) + sal_uInt32 nItems(pItemPool->GetItemCount2( nWhichId )); + for( sal_uInt32 j = 0; j < nItems; ++j ) { - if( 0 != (pItem = pItemPool->GetItem( nWhichId, j ) ) ) + if( 0 != (pItem = pItemPool->GetItem2( nWhichId, j ) ) ) { const SvxFontItem *pFont((const SvxFontItem *)pItem); Add( pFont->GetFamilyName(), pFont->GetStyleName(), @@ -100,7 +100,7 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl( const SfxItemPool* pItemPool(rExportP.GetDocument() ? rExportP.GetDocument()->GetPool() : NULL); AddFontItems(aWhichIds, 3, pItemPool, sal_True); const SfxItemPool* pEditPool(rExportP.GetDocument()->GetEditPool()); - AddFontItems(aEditWhichIds, 3, pEditPool, sal_False); + AddFontItems(aEditWhichIds, 3, pEditPool, false); SfxStyleSheetIterator* pItr(rExportP.GetDocument() ? rExportP.GetDocument()->GetStyleSheetPool()->CreateIterator(SFX_STYLE_FAMILY_PAGE, 0xFFFF) : NULL); if(pItr) @@ -114,29 +114,29 @@ ScXMLFontAutoStylePool_Impl::ScXMLFontAutoStylePool_Impl( for (sal_uInt8 j = 0; j < 4; ++j) { sal_uInt16 nPageWhichId(aPageWhichIds[j]); - sal_uInt16 nPageHFItems(rPagePool.GetItemCount(nPageWhichId)); + sal_uInt32 nPageHFItems(rPagePool.GetItemCount2(nPageWhichId)); const ScPageHFItem* pPageItem; - for (sal_uInt16 k = 0; k < nPageHFItems; ++k) + for (sal_uInt32 k = 0; k < nPageHFItems; ++k) { - if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem(nPageWhichId, k)))) + if (0 != (pPageItem = static_cast<const ScPageHFItem*>(rPagePool.GetItem2(nPageWhichId, k)))) { const EditTextObject* pLeftArea(pPageItem->GetLeftArea()); if (pLeftArea) { aEditEngine.SetText(*pLeftArea); - AddFontItems(aEditWhichIds, 3, pPageEditPool, sal_False); + AddFontItems(aEditWhichIds, 3, pPageEditPool, false); } const EditTextObject* pCenterArea(pPageItem->GetCenterArea()); if (pCenterArea) { aEditEngine.SetText(*pCenterArea); - AddFontItems(aEditWhichIds, 3, pPageEditPool, sal_False); + AddFontItems(aEditWhichIds, 3, pPageEditPool, false); } const EditTextObject* pRightArea(pPageItem->GetRightArea()); if (pRightArea) { aEditEngine.SetText(*pRightArea); - AddFontItems(aEditWhichIds, 3, pPageEditPool, sal_False); + AddFontItems(aEditWhichIds, 3, pPageEditPool, false); } } } diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx index 6bb16ba75892..929b4acd83a0 100644 --- a/sc/source/filter/xml/xmlimprt.cxx +++ b/sc/source/filter/xml/xmlimprt.cxx @@ -267,17 +267,17 @@ protected: public: ScXMLDocContext_Impl( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLDocContext_Impl(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ); }; -ScXMLDocContext_Impl::ScXMLDocContext_Impl( ScXMLImport& rImport, USHORT nPrfx, +ScXMLDocContext_Impl::ScXMLDocContext_Impl( ScXMLImport& rImport, sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference<xml::sax::XAttributeList>& /* xAttrList */ ) : SvXMLImportContext( rImport, nPrfx, rLName ) @@ -295,7 +295,7 @@ class ScXMLFlatDocContext_Impl { public: ScXMLFlatDocContext_Impl( ScXMLImport& i_rImport, - USHORT i_nPrefix, const OUString & i_rLName, + sal_uInt16 i_nPrefix, const OUString & i_rLName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList, const uno::Reference<document::XDocumentProperties>& i_xDocProps, const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder); @@ -303,12 +303,12 @@ public: virtual ~ScXMLFlatDocContext_Impl(); virtual SvXMLImportContext *CreateChildContext( - USHORT i_nPrefix, const OUString& i_rLocalName, + sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList); }; ScXMLFlatDocContext_Impl::ScXMLFlatDocContext_Impl( ScXMLImport& i_rImport, - USHORT i_nPrefix, const OUString & i_rLName, + sal_uInt16 i_nPrefix, const OUString & i_rLName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList, const uno::Reference<document::XDocumentProperties>& i_xDocProps, const uno::Reference<xml::sax::XDocumentHandler>& i_xDocBuilder) : @@ -323,7 +323,7 @@ ScXMLFlatDocContext_Impl::~ScXMLFlatDocContext_Impl() { } SvXMLImportContext *ScXMLFlatDocContext_Impl::CreateChildContext( - USHORT i_nPrefix, const OUString& i_rLocalName, + sal_uInt16 i_nPrefix, const OUString& i_rLocalName, const uno::Reference<xml::sax::XAttributeList>& i_xAttrList) { // behave like meta base class iff we encounter office:meta @@ -374,7 +374,7 @@ SvXMLImportContext *ScXMLBodyContext_Impl::CreateChildContext( return GetScImport().CreateBodyContext( rLocalName, xAttrList ); } -SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( sal_uInt16 nPrefix, const rtl::OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { @@ -389,7 +389,7 @@ SvXMLImportContext *ScXMLDocContext_Impl::CreateChildContext( USHORT nPrefix, break; case XML_TOK_DOC_STYLES: if (GetScImport().getImportFlags() & IMPORT_STYLES) - pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, sal_False); + pContext = GetScImport().CreateStylesContext( rLocalName, xAttrList, false); break; case XML_TOK_DOC_AUTOSTYLES: if (GetScImport().getImportFlags() & IMPORT_AUTOSTYLES) @@ -1625,7 +1625,7 @@ const SvXMLTokenMap& ScXMLImport::GetConsolidationAttrTokenMap() } -SvXMLImportContext *ScXMLImport::CreateContext( USHORT nPrefix, +SvXMLImportContext *ScXMLImport::CreateContext( sal_uInt16 nPrefix, const OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList ) { @@ -1756,11 +1756,11 @@ ScXMLImport::ScXMLImport( nStyleFamilyMask( 0 ), nPrevCellType(0), bLoadDoc( sal_True ), - bRemoveLastChar(sal_False), - bNullDateSetted(sal_False), - bSelfImportingXMLSet(sal_False), - bLatinDefaultStyle(sal_False), - bFromWrapper(sal_False) + bRemoveLastChar(false), + bNullDateSetted(false), + bSelfImportingXMLSet(false), + bLatinDefaultStyle(false), + bFromWrapper(false) { pStylesImportHelper = new ScMyStylesImportHelper(*this); @@ -1892,7 +1892,7 @@ ScXMLImport::~ScXMLImport() throw() // --------------------------------------------------------------------- -SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const USHORT nPrefix, const ::rtl::OUString& rLocalName, +SvXMLImportContext *ScXMLImport::CreateFontDeclsContext(const sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const uno::Reference<xml::sax::XAttributeList>& xAttrList) { XMLFontStylesContext *pFSContext = new XMLFontStylesContext( @@ -2013,7 +2013,7 @@ sal_Bool ScXMLImport::GetValidation(const rtl::OUString& sName, ScMyImportValida { if (pValidations) { - sal_Bool bFound(sal_False); + sal_Bool bFound(false); ScMyImportValidations::iterator aItr(pValidations->begin()); ScMyImportValidations::iterator aEndItr(pValidations->end()); while(aItr != aEndItr && !bFound) @@ -2032,7 +2032,7 @@ sal_Bool ScXMLImport::GetValidation(const rtl::OUString& sName, ScMyImportValida aValidation = *aItr; return bFound; } - return sal_False; + return false; } ScXMLChangeTrackingImportHelper* ScXMLImport::GetChangeTrackingImportHelper() @@ -2080,7 +2080,7 @@ void ScXMLImport::ExamineDefaultStyle() aDecSep = aLocaleData.getNumDecimalSep(); } - BYTE nScript = pDoc->GetStringScriptType( aDecSep ); + sal_uInt8 nScript = pDoc->GetStringScriptType( aDecSep ); if ( nScript == 0 || nScript == SCRIPTTYPE_LATIN ) bLatinDefaultStyle = sal_True; } @@ -2231,6 +2231,7 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa { sal_Int32 nCount(aConfigProps.getLength()); rtl::OUString sCTName(RTL_CONSTASCII_USTRINGPARAM("TrackedChangesProtectionKey")); + rtl::OUString sVBName(RTL_CONSTASCII_USTRINGPARAM("VBACompatibilityMode")); rtl::OUString sSCName(RTL_CONSTASCII_USTRINGPARAM("ScriptConfiguration")); for (sal_Int32 i = nCount - 1; i >= 0; --i) { @@ -2255,26 +2256,15 @@ void ScXMLImport::SetConfigurationSettings(const uno::Sequence<beans::PropertyVa } } } - else if (aConfigProps[i].Name == sSCName) + // store the following items for later use (after document is loaded) + else if ((aConfigProps[i].Name == sVBName) || (aConfigProps[i].Name == sSCName)) { - uno::Type aType = aConfigProps[i].Value.getValueType(); - uno::Reference<beans::XPropertySet> xImportInfo = - getImportInfo(); - - if (xImportInfo.is() && - (aType.equals(getCppuType( - (uno::Reference<container::XNameContainer> *)0 ) ) || - aType.equals(getCppuType( - (uno::Reference<container::XNameAccess> *)0 ) ) ) ) + uno::Reference< beans::XPropertySet > xImportInfo = getImportInfo(); + if (xImportInfo.is()) { - uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = - xImportInfo->getPropertySetInfo(); - if (xPropertySetInfo.is() && - xPropertySetInfo->hasPropertyByName(sSCName) ) - { - xImportInfo->setPropertyValue(sSCName, - aConfigProps[i].Value ); - } + uno::Reference< beans::XPropertySetInfo > xPropertySetInfo = xImportInfo->getPropertySetInfo(); + if (xPropertySetInfo.is() && xPropertySetInfo->hasPropertyByName(aConfigProps[i].Name)) + xImportInfo->setPropertyValue( aConfigProps[i].Name, aConfigProps[i].Value ); } } } @@ -2379,7 +2369,7 @@ sal_Bool ScXMLImport::IsCurrencySymbol(const sal_Int32 nNumberFormat, const rtl: } } } - return sal_False; + return false; } void ScXMLImport::SetType(uno::Reference <beans::XPropertySet>& rProperties, @@ -2462,7 +2452,7 @@ void ScXMLImport::AddStyleRange(const table::CellRangeAddress& rCellRange) DBG_ASSERT(xSheetCellRanges.is(), "didn't get SheetCellRanges"); } - xSheetCellRanges->addRangeAddress(rCellRange, sal_False); + xSheetCellRanges->addRangeAddress(rCellRange, false); } void ScXMLImport::SetStyleToRanges() @@ -2740,7 +2730,7 @@ public: mxPropSet(xPropSet), maPropName(RTL_CONSTASCII_USTRINGPARAM(SC_UNO_MODIFY_BROADCAST)) { uno::Any any; - any <<= sal_False; + any <<= false; mxPropSet->setPropertyValue(maPropName, any); } @@ -2915,7 +2905,7 @@ throw( ::com::sun::star::xml::sax::SAXException, ::com::sun::star::uno::RuntimeE SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; ++nTab) if (!pSheetData->IsSheetBlocked( nTab )) - pDoc->SetStreamValid( nTab, TRUE ); + pDoc->SetStreamValid( nTab, sal_True ); } aTables.UpdateRowHeights(); @@ -3059,7 +3049,7 @@ void ScXMLImport::ExtractFormulaNamespaceGrammar( { // parse the attribute value, extract namespace ID, literal namespace, and formula string rFormulaNmsp = OUString(); - sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, 0, &rFormula, &rFormulaNmsp, sal_False ); + sal_uInt16 nNsId = GetNamespaceMap()._GetKeyByAttrName( rAttrValue, 0, &rFormula, &rFormulaNmsp, false ); // check if we have an ODF formula namespace if( !bRestrictToExternalNmsp ) switch( nNsId ) diff --git a/sc/source/filter/xml/xmlimprt.hxx b/sc/source/filter/xml/xmlimprt.hxx index 0793a2adb841..5198f72c8b36 100644 --- a/sc/source/filter/xml/xmlimprt.hxx +++ b/sc/source/filter/xml/xmlimprt.hxx @@ -793,7 +793,7 @@ protected: // This method is called after the namespace map has been updated, but // before a context for the current element has been pushed. - virtual SvXMLImportContext *CreateContext(USHORT nPrefix, + virtual SvXMLImportContext *CreateContext(sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -812,7 +812,7 @@ public: // the root element (i.e. office:document-meta) SvXMLImportContext *CreateMetaContext( const ::rtl::OUString& rLocalName ); - SvXMLImportContext *CreateFontDeclsContext(const USHORT nPrefix, const ::rtl::OUString& rLocalName, + SvXMLImportContext *CreateFontDeclsContext(const sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const com::sun::star::uno::Reference<com::sun::star::xml::sax::XAttributeList>& xAttrList); SvXMLImportContext *CreateScriptContext( const ::rtl::OUString& rLocalName ); @@ -1030,7 +1030,7 @@ public: The value of the processed formula attribute. @param bRestrictToExternalNmsp - If set to TRUE, only namespaces of external formula grammars will + If set to sal_True, only namespaces of external formula grammars will be recognized. Internal namespace prefixes (e.g. 'oooc:' or 'of:' will be considered to be part of the formula, e.g. an expression with range operator. diff --git a/sc/source/filter/xml/xmllabri.cxx b/sc/source/filter/xml/xmllabri.cxx index 8ba63c32d308..e0aadfc9a384 100644 --- a/sc/source/filter/xml/xmllabri.cxx +++ b/sc/source/filter/xml/xmllabri.cxx @@ -45,7 +45,7 @@ using namespace xmloff::token; ScXMLLabelRangesContext::ScXMLLabelRangesContext( ScXMLImport& rImport, - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ ): SvXMLImportContext( rImport, nPrefix, rLName ) @@ -59,7 +59,7 @@ ScXMLLabelRangesContext::~ScXMLLabelRangesContext() } SvXMLImportContext* ScXMLLabelRangesContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) { @@ -87,11 +87,11 @@ void ScXMLLabelRangesContext::EndElement() ScXMLLabelRangeContext::ScXMLLabelRangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), - bColumnOrientation( sal_False ) + bColumnOrientation( false ) { sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); const SvXMLTokenMap& rAttrTokenMap(GetScImport().GetLabelRangeAttrTokenMap()); @@ -101,7 +101,7 @@ ScXMLLabelRangeContext::ScXMLLabelRangeContext( const rtl::OUString& sAttrName (xAttrList->getNameByIndex( nIndex )); const rtl::OUString& sValue (xAttrList->getValueByIndex( nIndex )); OUString aLocalName; - USHORT nPrefix (GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); + sal_uInt16 nPrefix (GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); switch( rAttrTokenMap.Get( nPrefix, aLocalName ) ) { @@ -123,7 +123,7 @@ ScXMLLabelRangeContext::~ScXMLLabelRangeContext() } SvXMLImportContext* ScXMLLabelRangeContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ ) { diff --git a/sc/source/filter/xml/xmllabri.hxx b/sc/source/filter/xml/xmllabri.hxx index 2876da98b871..7e325b93eb3c 100644 --- a/sc/source/filter/xml/xmllabri.hxx +++ b/sc/source/filter/xml/xmllabri.hxx @@ -44,14 +44,14 @@ private: public: ScXMLLabelRangesContext( ScXMLImport& rImport, - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLLabelRangesContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -74,14 +74,14 @@ private: public: ScXMLLabelRangeContext( ScXMLImport& rImport, - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLLabelRangeContext(); virtual SvXMLImportContext* CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlnexpi.cxx b/sc/source/filter/xml/xmlnexpi.cxx index 9748058e4be1..d3b2f5ace852 100644 --- a/sc/source/filter/xml/xmlnexpi.cxx +++ b/sc/source/filter/xml/xmlnexpi.cxx @@ -48,7 +48,7 @@ using namespace com::sun::star; //------------------------------------------------------------------ ScXMLNamedExpressionsContext::ScXMLNamedExpressionsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) : @@ -62,7 +62,7 @@ ScXMLNamedExpressionsContext::~ScXMLNamedExpressionsContext() GetScImport().UnlockSolarMutex(); } -SvXMLImportContext *ScXMLNamedExpressionsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLNamedExpressionsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -99,7 +99,7 @@ void ScXMLNamedExpressionsContext::EndElement() } ScXMLNamedRangeContext::ScXMLNamedRangeContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : @@ -117,7 +117,7 @@ ScXMLNamedRangeContext::ScXMLNamedRangeContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -145,7 +145,7 @@ ScXMLNamedRangeContext::ScXMLNamedRangeContext( ScXMLImport& rImport, break; } } - pNamedExpression->bIsExpression = sal_False; + pNamedExpression->bIsExpression = false; GetScImport().AddNamedExpression(pNamedExpression); } @@ -153,7 +153,7 @@ ScXMLNamedRangeContext::~ScXMLNamedRangeContext() { } -SvXMLImportContext *ScXMLNamedRangeContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLNamedRangeContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) @@ -166,7 +166,7 @@ void ScXMLNamedRangeContext::EndElement() } ScXMLNamedExpressionContext::ScXMLNamedExpressionContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList) : @@ -179,7 +179,7 @@ ScXMLNamedExpressionContext::ScXMLNamedExpressionContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -212,7 +212,7 @@ ScXMLNamedExpressionContext::~ScXMLNamedExpressionContext() { } -SvXMLImportContext *ScXMLNamedExpressionContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLNamedExpressionContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/xmlnexpi.hxx b/sc/source/filter/xml/xmlnexpi.hxx index 2e66030d44c5..4f0a68e321e1 100644 --- a/sc/source/filter/xml/xmlnexpi.hxx +++ b/sc/source/filter/xml/xmlnexpi.hxx @@ -40,14 +40,14 @@ class ScXMLNamedExpressionsContext : public SvXMLImportContext public: - ScXMLNamedExpressionsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLNamedExpressionsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLNamedExpressionsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -62,14 +62,14 @@ class ScXMLNamedRangeContext : public SvXMLImportContext public: - ScXMLNamedRangeContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLNamedRangeContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLNamedRangeContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -84,14 +84,14 @@ class ScXMLNamedExpressionContext : public SvXMLImportContext public: - ScXMLNamedExpressionContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLNamedExpressionContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList); virtual ~ScXMLNamedExpressionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlrowi.cxx b/sc/source/filter/xml/xmlrowi.cxx index aa0e0e367326..b36b2f812d46 100644 --- a/sc/source/filter/xml/xmlrowi.cxx +++ b/sc/source/filter/xml/xmlrowi.cxx @@ -65,14 +65,14 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLTableRowContext::ScXMLTableRowContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) : SvXMLImportContext( rImport, nPrfx, rLName ), sVisibility(GetXMLToken(XML_VISIBLE)), nRepeatedRows(1), - bHasCell(sal_False) + bHasCell(false) { rtl::OUString sCellStyleName; sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); @@ -122,7 +122,7 @@ ScXMLTableRowContext::~ScXMLTableRowContext() { } -SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -137,7 +137,7 @@ SvXMLImportContext *ScXMLTableRowContext::CreateChildContext( USHORT nPrefix, { bHasCell = sal_True; pContext = new ScXMLTableRowCellContext( GetScImport(), nPrefix, - rLName, xAttrList, sal_False, nRepeatedRows + rLName, xAttrList, false, nRepeatedRows //this ); } @@ -209,14 +209,14 @@ void ScXMLTableRowContext::EndElement() } } sal_Bool bVisible (sal_True); - sal_Bool bFiltered (sal_False); + sal_Bool bFiltered (false); if (IsXMLToken(sVisibility, XML_COLLAPSE)) { - bVisible = sal_False; + bVisible = false; } else if (IsXMLToken(sVisibility, XML_FILTER)) { - bVisible = sal_False; + bVisible = false; bFiltered = sal_True; } if (!bVisible) @@ -230,7 +230,7 @@ void ScXMLTableRowContext::EndElement() } ScXMLTableRowsContext::ScXMLTableRowsContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -273,7 +273,7 @@ ScXMLTableRowsContext::~ScXMLTableRowsContext() { } -SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -286,17 +286,17 @@ SvXMLImportContext *ScXMLTableRowsContext::CreateChildContext( USHORT nPrefix, case XML_TOK_TABLE_ROWS_ROW_GROUP: pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_True ); + false, sal_True ); break; case XML_TOK_TABLE_ROWS_HEADER_ROWS: pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_True, sal_False ); + sal_True, false ); break; case XML_TOK_TABLE_ROWS_ROWS: pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_False ); + false, false ); break; case XML_TOK_TABLE_ROWS_ROW: pContext = new ScXMLTableRowContext( GetScImport(), nPrefix, diff --git a/sc/source/filter/xml/xmlrowi.hxx b/sc/source/filter/xml/xmlrowi.hxx index f72618d0e9ef..c41644bcf041 100644 --- a/sc/source/filter/xml/xmlrowi.hxx +++ b/sc/source/filter/xml/xmlrowi.hxx @@ -45,14 +45,14 @@ class ScXMLTableRowContext : public SvXMLImportContext public: - ScXMLTableRowContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableRowContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLTableRowContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -75,7 +75,7 @@ class ScXMLTableRowsContext : public SvXMLImportContext public: - ScXMLTableRowsContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableRowsContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -83,7 +83,7 @@ public: virtual ~ScXMLTableRowsContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlsceni.cxx b/sc/source/filter/xml/xmlsceni.cxx index f8ae7c9d64fb..b20d60bc74f5 100644 --- a/sc/source/filter/xml/xmlsceni.cxx +++ b/sc/source/filter/xml/xmlsceni.cxx @@ -56,7 +56,7 @@ using rtl::OUString; ScXMLTableScenarioContext::ScXMLTableScenarioContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& xAttrList ): SvXMLImportContext( rImport, nPrfx, rLName ), @@ -65,8 +65,8 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext( bCopyBack( sal_True ), bCopyStyles( sal_True ), bCopyFormulas( sal_True ), - bIsActive( sal_False ), - bProtected( sal_False ) + bIsActive( false ), + bProtected( false ) { rImport.LockSolarMutex(); sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); @@ -75,7 +75,7 @@ ScXMLTableScenarioContext::ScXMLTableScenarioContext( { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -137,7 +137,7 @@ ScXMLTableScenarioContext::~ScXMLTableScenarioContext() } SvXMLImportContext *ScXMLTableScenarioContext::CreateChildContext( - USHORT nPrefix, + sal_uInt16 nPrefix, const OUString& rLName, const uno::Reference< xml::sax::XAttributeList >& /* xAttrList */ ) { @@ -150,8 +150,8 @@ void ScXMLTableScenarioContext::EndElement() ScDocument* pDoc(GetScImport().GetDocument()); if (pDoc) { - pDoc->SetScenario( nCurrTable, TRUE ); - USHORT nFlags( 0 ); + pDoc->SetScenario( nCurrTable, sal_True ); + sal_uInt16 nFlags( 0 ); if( bDisplayBorder ) nFlags |= SC_SCENARIO_SHOWFRAME; if( bCopyBack ) diff --git a/sc/source/filter/xml/xmlsceni.hxx b/sc/source/filter/xml/xmlsceni.hxx index bec95988d72d..f6dd8d74b09b 100644 --- a/sc/source/filter/xml/xmlsceni.hxx +++ b/sc/source/filter/xml/xmlsceni.hxx @@ -53,14 +53,14 @@ private: public: - ScXMLTableScenarioContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableScenarioContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLTableScenarioContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlsorti.cxx b/sc/source/filter/xml/xmlsorti.cxx index c71e4c38c40c..0826b58313b1 100644 --- a/sc/source/filter/xml/xmlsorti.cxx +++ b/sc/source/filter/xml/xmlsorti.cxx @@ -54,7 +54,7 @@ using namespace xmloff::token; //------------------------------------------------------------------ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -65,10 +65,10 @@ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport, sLanguage(), sAlgorithm(), nUserListIndex(0), - bCopyOutputData(sal_False), + bCopyOutputData(false), bBindFormatsToContent(sal_True), - bIsCaseSensitive(sal_False), - bEnabledUserList(sal_False) + bIsCaseSensitive(false), + bEnabledUserList(false) { sal_Int16 nAttrCount(xAttrList.is() ? xAttrList->getLength() : 0); const SvXMLTokenMap& rAttrTokenMap(GetScImport().GetSortAttrTokenMap()); @@ -76,7 +76,7 @@ ScXMLSortContext::ScXMLSortContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -120,7 +120,7 @@ ScXMLSortContext::~ScXMLSortContext() { } -SvXMLImportContext *ScXMLSortContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSortContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -192,7 +192,7 @@ void ScXMLSortContext::AddSortField(const rtl::OUString& sFieldNumber, const rtl if (IsXMLToken(sOrder, XML_ASCENDING)) aSortField.SortAscending = sal_True; else - aSortField.SortAscending = sal_False; + aSortField.SortAscending = false; if (sDataType.getLength() > 8) { rtl::OUString sTemp = sDataType.copy(0, 8); @@ -220,7 +220,7 @@ void ScXMLSortContext::AddSortField(const rtl::OUString& sFieldNumber, const rtl } ScXMLSortByContext::ScXMLSortByContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -236,7 +236,7 @@ ScXMLSortByContext::ScXMLSortByContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -265,7 +265,7 @@ ScXMLSortByContext::~ScXMLSortByContext() { } -SvXMLImportContext *ScXMLSortByContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLSortByContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& /* xAttrList */ ) diff --git a/sc/source/filter/xml/xmlsorti.hxx b/sc/source/filter/xml/xmlsorti.hxx index 27ec77c89226..7ccc82053905 100644 --- a/sc/source/filter/xml/xmlsorti.hxx +++ b/sc/source/filter/xml/xmlsorti.hxx @@ -57,7 +57,7 @@ class ScXMLSortContext : public SvXMLImportContext public: - ScXMLSortContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSortContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -65,7 +65,7 @@ public: virtual ~ScXMLSortContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -88,7 +88,7 @@ class ScXMLSortByContext : public SvXMLImportContext public: - ScXMLSortByContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLSortByContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -96,7 +96,7 @@ public: virtual ~ScXMLSortByContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlstyle.cxx b/sc/source/filter/xml/xmlstyle.cxx index cb6c4f88c63d..57ab9747228a 100644 --- a/sc/source/filter/xml/xmlstyle.cxx +++ b/sc/source/filter/xml/xmlstyle.cxx @@ -942,7 +942,7 @@ bool XmlScPropHdl_CellProtection::equals( (aCellProtection1.IsLocked == aCellProtection2.IsLocked) && (aCellProtection1.IsFormulaHidden == aCellProtection2.IsFormulaHidden)); } - return sal_False; + return false; } sal_Bool XmlScPropHdl_CellProtection::importXML( @@ -950,16 +950,16 @@ sal_Bool XmlScPropHdl_CellProtection::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); util::CellProtection aCellProtection; - sal_Bool bDefault(sal_False); + sal_Bool bDefault(false); if (!rValue.hasValue()) { - aCellProtection.IsHidden = sal_False; + aCellProtection.IsHidden = false; aCellProtection.IsLocked = sal_True; - aCellProtection.IsFormulaHidden = sal_False; - aCellProtection.IsPrintHidden = sal_False; + aCellProtection.IsFormulaHidden = false; + aCellProtection.IsPrintHidden = false; bDefault = sal_True; } if ((rValue >>= aCellProtection) || bDefault) @@ -977,9 +977,9 @@ sal_Bool XmlScPropHdl_CellProtection::importXML( ++i; rtl::OUString sFirst(rStrImpValue.copy(0, i)); rtl::OUString sSecond(rStrImpValue.copy(i + 1)); - aCellProtection.IsFormulaHidden = sal_False; - aCellProtection.IsHidden = sal_False; - aCellProtection.IsLocked = sal_False; + aCellProtection.IsFormulaHidden = false; + aCellProtection.IsHidden = false; + aCellProtection.IsLocked = false; if ((IsXMLToken(sFirst, XML_PROTECTED)) || (IsXMLToken(sSecond, XML_PROTECTED))) aCellProtection.IsLocked = sal_True; if ((IsXMLToken(sFirst, XML_FORMULA_HIDDEN)) || (IsXMLToken(sSecond, XML_FORMULA_HIDDEN))) @@ -990,16 +990,16 @@ sal_Bool XmlScPropHdl_CellProtection::importXML( else { aCellProtection.IsFormulaHidden = sal_True; - aCellProtection.IsHidden = sal_False; - aCellProtection.IsLocked = sal_False; + aCellProtection.IsHidden = false; + aCellProtection.IsLocked = false; rValue <<= aCellProtection; bRetval = sal_True; } } else { - aCellProtection.IsFormulaHidden = sal_False; - aCellProtection.IsHidden = sal_False; + aCellProtection.IsFormulaHidden = false; + aCellProtection.IsHidden = false; aCellProtection.IsLocked = sal_True; rValue <<= aCellProtection; bRetval = sal_True; @@ -1016,9 +1016,9 @@ sal_Bool XmlScPropHdl_CellProtection::importXML( } else { - aCellProtection.IsFormulaHidden = sal_False; - aCellProtection.IsHidden = sal_False; - aCellProtection.IsLocked = sal_False; + aCellProtection.IsFormulaHidden = false; + aCellProtection.IsHidden = false; + aCellProtection.IsLocked = false; rValue <<= aCellProtection; bRetval = sal_True; } @@ -1032,7 +1032,7 @@ sal_Bool XmlScPropHdl_CellProtection::exportXML( const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); util::CellProtection aCellProtection; if(rValue >>= aCellProtection) @@ -1085,7 +1085,7 @@ bool XmlScPropHdl_PrintContent::equals( { return (aCellProtection1.IsPrintHidden == aCellProtection2.IsPrintHidden); } - return sal_False; + return false; } sal_Bool XmlScPropHdl_PrintContent::importXML( @@ -1093,15 +1093,15 @@ sal_Bool XmlScPropHdl_PrintContent::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); util::CellProtection aCellProtection; - sal_Bool bDefault(sal_False); + sal_Bool bDefault(false); if (!rValue.hasValue()) { - aCellProtection.IsHidden = sal_False; + aCellProtection.IsHidden = false; aCellProtection.IsLocked = sal_True; - aCellProtection.IsFormulaHidden = sal_False; - aCellProtection.IsPrintHidden = sal_False; + aCellProtection.IsFormulaHidden = false; + aCellProtection.IsPrintHidden = false; bDefault = sal_True; } if ((rValue >>= aCellProtection) || bDefault) @@ -1123,7 +1123,7 @@ sal_Bool XmlScPropHdl_PrintContent::exportXML( const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); util::CellProtection aCellProtection; if(rValue >>= aCellProtection) @@ -1150,7 +1150,7 @@ bool XmlScPropHdl_JustifyMethod::equals( if((r1 >>= nVal1) && (r2 >>= nVal2)) return (nVal1 == nVal2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_JustifyMethod::importXML( @@ -1224,7 +1224,7 @@ bool XmlScPropHdl_HoriJustify::equals( if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2)) return (aHoriJustify1 == aHoriJustify2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_HoriJustify::importXML( @@ -1232,7 +1232,7 @@ sal_Bool XmlScPropHdl_HoriJustify::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); table::CellHoriJustify nValue = table::CellHoriJustify_LEFT; rValue >>= nValue; @@ -1275,7 +1275,7 @@ sal_Bool XmlScPropHdl_HoriJustify::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { table::CellHoriJustify nVal; - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1328,7 +1328,7 @@ bool XmlScPropHdl_HoriJustifySource::equals( if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2)) return (aHoriJustify1 == aHoriJustify2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_HoriJustifySource::importXML( @@ -1336,7 +1336,7 @@ sal_Bool XmlScPropHdl_HoriJustifySource::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if (IsXMLToken(rStrImpValue, XML_FIX)) { @@ -1358,7 +1358,7 @@ sal_Bool XmlScPropHdl_HoriJustifySource::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { table::CellHoriJustify nVal; - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1389,7 +1389,7 @@ bool XmlScPropHdl_HoriJustifyRepeat::equals( if((r1 >>= aHoriJustify1) && (r2 >>= aHoriJustify2)) return (aHoriJustify1 == aHoriJustify2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_HoriJustifyRepeat::importXML( @@ -1397,7 +1397,7 @@ sal_Bool XmlScPropHdl_HoriJustifyRepeat::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if (IsXMLToken(rStrImpValue, XML_FALSE)) { @@ -1419,7 +1419,7 @@ sal_Bool XmlScPropHdl_HoriJustifyRepeat::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { table::CellHoriJustify nVal; - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1450,7 +1450,7 @@ bool XmlScPropHdl_Orientation::equals( if((r1 >>= aOrientation1) && (r2 >>= aOrientation2)) return (aOrientation1 == aOrientation2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_Orientation::importXML( @@ -1458,7 +1458,7 @@ sal_Bool XmlScPropHdl_Orientation::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); table::CellOrientation nValue; if (IsXMLToken(rStrImpValue, XML_LTR)) @@ -1483,7 +1483,7 @@ sal_Bool XmlScPropHdl_Orientation::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { table::CellOrientation nVal; - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1519,7 +1519,7 @@ bool XmlScPropHdl_RotateAngle::equals( if((r1 >>= aAngle1) && (r2 >>= aAngle2)) return (aAngle1 == aAngle2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_RotateAngle::importXML( @@ -1527,7 +1527,7 @@ sal_Bool XmlScPropHdl_RotateAngle::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); sal_Int32 nValue; if (SvXMLUnitConverter::convertNumber(nValue, rStrImpValue)) @@ -1546,7 +1546,7 @@ sal_Bool XmlScPropHdl_RotateAngle::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { sal_Int32 nVal = 0; - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1571,7 +1571,7 @@ bool XmlScPropHdl_RotateReference::equals( if((r1 >>= aReference1) && (r2 >>= aReference2)) return (aReference1 == aReference2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_RotateReference::importXML( @@ -1579,7 +1579,7 @@ sal_Bool XmlScPropHdl_RotateReference::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); sal_Int32 nValue; if (IsXMLToken(rStrImpValue, XML_NONE)) @@ -1616,7 +1616,7 @@ sal_Bool XmlScPropHdl_RotateReference::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { sal_Int32 nVal(0); - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1668,7 +1668,7 @@ bool XmlScPropHdl_VertJustify::equals( if((r1 >>= aReference1) && (r2 >>= aReference2)) return (aReference1 == aReference2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_VertJustify::importXML( @@ -1676,7 +1676,7 @@ sal_Bool XmlScPropHdl_VertJustify::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); sal_Int32 nValue; if (IsXMLToken(rStrImpValue, XML_AUTOMATIC)) @@ -1719,7 +1719,7 @@ sal_Bool XmlScPropHdl_VertJustify::exportXML( const SvXMLUnitConverter& /* rUnitConverter */ ) const { sal_Int32 nVal(0); - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(rValue >>= nVal) { @@ -1777,7 +1777,7 @@ bool XmlScPropHdl_BreakBefore::equals( if((r1 >>= aBreak1) && (r2 >>= aBreak2)) return (aBreak1 == aBreak2); - return sal_False; + return false; } sal_Bool XmlScPropHdl_BreakBefore::importXML( @@ -1785,12 +1785,12 @@ sal_Bool XmlScPropHdl_BreakBefore::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); sal_Bool bValue; if (IsXMLToken(rStrImpValue, XML_AUTO)) { - bValue = sal_False; + bValue = false; rValue = ::cppu::bool2any(bValue); bRetval = sal_True; } @@ -1809,7 +1809,7 @@ sal_Bool XmlScPropHdl_BreakBefore::exportXML( const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if(::cppu::any2bool(rValue)) { @@ -1841,7 +1841,7 @@ sal_Bool XmlScPropHdl_IsTextWrapped::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if (IsXMLToken(rStrImpValue, XML_WRAP)) { @@ -1850,7 +1850,7 @@ sal_Bool XmlScPropHdl_IsTextWrapped::importXML( } else if (IsXMLToken(rStrImpValue, XML_NO_WRAP)) { - rValue = ::cppu::bool2any(sal_False); + rValue = ::cppu::bool2any(false); bRetval = sal_True; } @@ -1862,7 +1862,7 @@ sal_Bool XmlScPropHdl_IsTextWrapped::exportXML( const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if (::cppu::any2bool(rValue)) { @@ -1883,7 +1883,7 @@ sal_Bool XmlScPropHdl_IsEqual::importXML( const ::rtl::OUString& /* rStrImpValue const SvXMLUnitConverter& /* rUnitConverter */ ) const { OSL_FAIL("should never be called"); - return sal_False; + return false; } sal_Bool XmlScPropHdl_IsEqual::exportXML( ::rtl::OUString& /* rStrExpValue */, @@ -1891,7 +1891,7 @@ sal_Bool XmlScPropHdl_IsEqual::exportXML( ::rtl::OUString& /* rStrExpValue */, const SvXMLUnitConverter& /* rUnitConverter */ ) const { OSL_FAIL("should never be called"); - return sal_False; + return false; } XmlScPropHdl_Vertical::~XmlScPropHdl_Vertical() @@ -1910,7 +1910,7 @@ sal_Bool XmlScPropHdl_Vertical::importXML( ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if (IsXMLToken(rStrImpValue, XML_AUTO)) { @@ -1919,7 +1919,7 @@ sal_Bool XmlScPropHdl_Vertical::importXML( } else if (IsXMLToken(rStrImpValue, XML_0)) { - rValue = ::cppu::bool2any(sal_False); + rValue = ::cppu::bool2any(false); bRetval = sal_True; } @@ -1931,7 +1931,7 @@ sal_Bool XmlScPropHdl_Vertical::exportXML( const ::com::sun::star::uno::Any& rValue, const SvXMLUnitConverter& /* rUnitConverter */ ) const { - sal_Bool bRetval(sal_False); + sal_Bool bRetval(false); if (::cppu::any2bool(rValue)) { diff --git a/sc/source/filter/xml/xmlstyli.cxx b/sc/source/filter/xml/xmlstyli.cxx index 796e63f9688d..2c7b753afc15 100644 --- a/sc/source/filter/xml/xmlstyli.cxx +++ b/sc/source/filter/xml/xmlstyli.cxx @@ -276,7 +276,7 @@ void ScXMLRowImportPropertyMapper::finished(::std::vector< XMLPropertyState >& r } else if (pHeight) { - rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), ::cppu::bool2any( sal_False ))); + rProperties.push_back(XMLPropertyState(maPropMapper->FindEntryIndex(CTF_SC_ROWOPTIMALHEIGHT), ::cppu::bool2any( false ))); } // don't access pointers to rProperties elements after push_back! } @@ -477,8 +477,8 @@ XMLTableStyleContext::XMLTableStyleContext( ScXMLImport& rImport, pStyles(&rStyles), nNumberFormat(-1), nLastSheet(-1), - bConditionalFormatCreated(sal_False), - bParentSet(sal_False) + bConditionalFormatCreated(false), + bParentSet(false) { } @@ -969,8 +969,8 @@ ScMasterPageContext::ScMasterPageContext( SvXMLImport& rImport, const uno::Reference< XAttributeList > & xAttrList, sal_Bool bOverwrite ) : XMLTextMasterPageContext( rImport, nPrfx, rLName, xAttrList, bOverwrite ), - bContainsRightHeader(sal_False), - bContainsRightFooter(sal_False) + bContainsRightHeader(false), + bContainsRightFooter(false) { } diff --git a/sc/source/filter/xml/xmlstyli.hxx b/sc/source/filter/xml/xmlstyli.hxx index f483e7734f25..9f69acca9d51 100644 --- a/sc/source/filter/xml/xmlstyli.hxx +++ b/sc/source/filter/xml/xmlstyli.hxx @@ -142,7 +142,7 @@ public: XMLTableStyleContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, - SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle = sal_False ); + SvXMLStylesContext& rStyles, sal_uInt16 nFamily, sal_Bool bDefaultStyle = false ); virtual ~XMLTableStyleContext(); virtual SvXMLImportContext *CreateChildContext( @@ -316,7 +316,7 @@ public: const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList > & xAttrList, SvXMLStylesContext& rStyles, sal_uInt16 nFamily, - sal_Bool bDefaultStyle = sal_False ); + sal_Bool bDefaultStyle = false ); virtual ~ScCellTextStyleContext(); // overload FillPropertySet to store style information diff --git a/sc/source/filter/xml/xmlsubti.cxx b/sc/source/filter/xml/xmlsubti.cxx index 4e06948ece4f..0e7f7b221152 100644 --- a/sc/source/filter/xml/xmlsubti.cxx +++ b/sc/source/filter/xml/xmlsubti.cxx @@ -293,13 +293,13 @@ sal_Bool ScMyTables::IsMerged (const uno::Reference <table::XCellRange>& xCellRa aCellAddress = xMergeCellAddress->getRangeAddress(); if (aCellAddress.StartColumn == nCol && aCellAddress.EndColumn == nCol && aCellAddress.StartRow == nRow && aCellAddress.EndRow == nRow) - return sal_False; + return false; else return sal_True; } } } - return sal_False; + return false; } void ScMyTables::UnMerge() @@ -313,7 +313,7 @@ void ScMyTables::UnMerge() uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); if (xMergeable.is()) - xMergeable->merge(sal_False); + xMergeable->merge(false); } } } @@ -329,7 +329,7 @@ void ScMyTables::DoMerge(sal_Int32 nCount) uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); if (xMergeable.is()) - xMergeable->merge(sal_False); + xMergeable->merge(false); } //merge @@ -371,7 +371,7 @@ void ScMyTables::InsertRow() uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); if (xMergeable.is()) - xMergeable->merge(sal_False); + xMergeable->merge(false); } //merge @@ -445,7 +445,7 @@ void ScMyTables::InsertColumn() uno::Reference <util::XMergeable> xMergeable (xCurrentCellRange->getCellRangeByPosition(aCellAddress.StartColumn, aCellAddress.StartRow, aCellAddress.EndColumn, aCellAddress.EndRow), uno::UNO_QUERY); if (xMergeable.is()) - xMergeable->merge(sal_False); + xMergeable->merge(false); aTempCellAddress = aCellAddress; aTempCellAddress.StartColumn = aTempCellAddress.EndColumn + 1; aTempCellAddress.EndColumn = aTempCellAddress.StartColumn; @@ -615,9 +615,9 @@ void ScMyTables::UpdateRowHeights() { const SdrPage* pPage = pDrawLayer ? pDrawLayer->GetPage(nTab) : NULL; if ( nTab == nVisible || ( pPage && pPage->GetObjCount() != 0 ) ) - aUpdateSheets.SelectTable( nTab, TRUE ); + aUpdateSheets.SelectTable( nTab, sal_True ); else - pDoc->SetPendingRowHeights( nTab, TRUE ); + pDoc->SetPendingRowHeights( nTab, sal_True ); } if (aUpdateSheets.GetSelectCount()) @@ -680,7 +680,7 @@ void ScMyTables::DeleteTable() if (sCurrentName != sCurrentSheetName && rImport.GetDocument()) { rImport.GetDocument()->RenameTab( static_cast<SCTAB>(nCurrentSheet), - sCurrentSheetName, sal_False, sal_True); + sCurrentSheetName, false, sal_True); } } } @@ -776,12 +776,12 @@ void ScMyTables::AddMatrixRange( sal_Bool ScMyTables::IsPartOfMatrix(sal_Int32 nColumn, sal_Int32 nRow) { - sal_Bool bResult(sal_False); + sal_Bool bResult(false); if (!aMatrixRangeList.empty()) { ScMyMatrixRangeList::iterator aItr(aMatrixRangeList.begin()); ScMyMatrixRangeList::iterator aEndItr(aMatrixRangeList.end()); - sal_Bool bReady(sal_False); + sal_Bool bReady(false); while(!bReady && aItr != aEndItr) { if (nCurrentSheet > aItr->aRange.Sheet) diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx index a80093e5a0e0..cd78b8733d36 100644 --- a/sc/source/filter/xml/xmltabi.cxx +++ b/sc/source/filter/xml/xmltabi.cxx @@ -150,7 +150,7 @@ ScXMLExternalTabData::ScXMLExternalTabData() : //------------------------------------------------------------------ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport, - USHORT nPrfx, + sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, @@ -159,7 +159,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport, SvXMLImportContext( rImport, nPrfx, rLName ), pExternalRefInfo(NULL), nStartOffset(-1), - bStartFormPage(sal_False), + bStartFormPage(false), bPrintEntireSheet(sal_True) { // get start offset in file (if available) @@ -176,7 +176,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport, { const rtl::OUString& sAttrName(xAttrList->getNameByIndex( i )); rtl::OUString aLocalName; - USHORT nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nPrefix(GetScImport().GetNamespaceMap().GetKeyByAttrName( sAttrName, &aLocalName )); const rtl::OUString& sValue(xAttrList->getValueByIndex( i )); @@ -206,7 +206,7 @@ ScXMLTableContext::ScXMLTableContext( ScXMLImport& rImport, case XML_TOK_TABLE_PRINT: { if (IsXMLToken(sValue, XML_FALSE)) - bPrintEntireSheet = sal_False; + bPrintEntireSheet = false; } break; } @@ -243,7 +243,7 @@ ScXMLTableContext::~ScXMLTableContext() { } -SvXMLImportContext *ScXMLTableContext::CreateChildContext( USHORT nPrefix, +SvXMLImportContext *ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ) @@ -282,17 +282,17 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( USHORT nPrefix, case XML_TOK_TABLE_COL_GROUP: pContext = new ScXMLTableColsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_True ); + false, sal_True ); break; case XML_TOK_TABLE_HEADER_COLS: pContext = new ScXMLTableColsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_True, sal_False ); + sal_True, false ); break; case XML_TOK_TABLE_COLS: pContext = new ScXMLTableColsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_False ); + false, false ); break; case XML_TOK_TABLE_COL: pContext = new ScXMLTableColContext( GetScImport(), nPrefix, @@ -304,17 +304,17 @@ SvXMLImportContext *ScXMLTableContext::CreateChildContext( USHORT nPrefix, case XML_TOK_TABLE_ROW_GROUP: pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_True ); + false, sal_True ); break; case XML_TOK_TABLE_HEADER_ROWS: pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_True, sal_False ); + sal_True, false ); break; case XML_TOK_TABLE_ROWS: pContext = new ScXMLTableRowsContext( GetScImport(), nPrefix, rLName, xAttrList, - sal_False, sal_False ); + false, false ); break; case XML_TOK_TABLE_ROW: pContext = new ScXMLTableRowContext( GetScImport(), nPrefix, @@ -381,7 +381,7 @@ void ScXMLTableContext::EndElement() // Sheet has "print entire sheet" option by default. Remove it. pDoc->ClearPrintRanges(nCurTab); - ScOutlineTable* pOutlineTable(pDoc->GetOutlineTable(nCurTab, sal_False)); + ScOutlineTable* pOutlineTable(pDoc->GetOutlineTable(nCurTab, false)); if (pOutlineTable) { ScOutlineArray* pColArray(pOutlineTable->GetColArray()); @@ -389,24 +389,24 @@ void ScXMLTableContext::EndElement() sal_Int32 i; for (i = 0; i < nDepth; ++i) { - sal_Int32 nCount(pColArray->GetCount(static_cast<USHORT>(i))); + sal_Int32 nCount(pColArray->GetCount(static_cast<sal_uInt16>(i))); for (sal_Int32 j = 0; j < nCount; ++j) { - ScOutlineEntry* pEntry(pColArray->GetEntry(static_cast<USHORT>(i), static_cast<USHORT>(j))); + ScOutlineEntry* pEntry(pColArray->GetEntry(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j))); if (pEntry->IsHidden()) - pColArray->SetVisibleBelow(static_cast<USHORT>(i), static_cast<USHORT>(j), sal_False); + pColArray->SetVisibleBelow(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j), false); } } ScOutlineArray* pRowArray(pOutlineTable->GetRowArray()); nDepth = pRowArray->GetDepth(); for (i = 0; i < nDepth; ++i) { - sal_Int32 nCount(pRowArray->GetCount(static_cast<USHORT>(i))); + sal_Int32 nCount(pRowArray->GetCount(static_cast<sal_uInt16>(i))); for (sal_Int32 j = 0; j < nCount; ++j) { - ScOutlineEntry* pEntry(pRowArray->GetEntry(static_cast<USHORT>(i), static_cast<USHORT>(j))); + ScOutlineEntry* pEntry(pRowArray->GetEntry(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j))); if (pEntry->IsHidden()) - pRowArray->SetVisibleBelow(static_cast<USHORT>(i), static_cast<USHORT>(j), sal_False); + pRowArray->SetVisibleBelow(static_cast<sal_uInt16>(i), static_cast<sal_uInt16>(j), false); } } } @@ -423,7 +423,7 @@ void ScXMLTableContext::EndElement() } GetScImport().GetTables().DeleteTable(); - GetScImport().ProgressBarIncrement(sal_False); + GetScImport().ProgressBarIncrement(false); // store stream positions if (!pExternalRefInfo.get() && nStartOffset >= 0 /* && nEndOffset >= 0 */) @@ -443,7 +443,7 @@ ScXMLImport& ScXMLTableProtectionContext::GetScImport() } ScXMLTableProtectionContext::ScXMLTableProtectionContext( - ScXMLImport& rImport, USHORT nPrefix, const OUString& rLName, + ScXMLImport& rImport, sal_uInt16 nPrefix, const OUString& rLName, const Reference<XAttributeList>& xAttrList ) : SvXMLImportContext( rImport, nPrefix, rLName ) { @@ -459,7 +459,7 @@ ScXMLTableProtectionContext::ScXMLTableProtectionContext( const OUString aValue = xAttrList->getValueByIndex(i); OUString aLocalName; - USHORT nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( + sal_uInt16 nLocalPrefix = GetScImport().GetNamespaceMap().GetKeyByAttrName( aAttrName, &aLocalName); switch (rAttrTokenMap.Get(nLocalPrefix, aLocalName)) @@ -485,7 +485,7 @@ ScXMLTableProtectionContext::~ScXMLTableProtectionContext() } SvXMLImportContext* ScXMLTableProtectionContext::CreateChildContext( - USHORT /*nPrefix*/, const OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ ) + sal_uInt16 /*nPrefix*/, const OUString& /*rLocalName*/, const Reference<XAttributeList>& /*xAttrList*/ ) { return NULL; } diff --git a/sc/source/filter/xml/xmltabi.hxx b/sc/source/filter/xml/xmltabi.hxx index db60f90c0c33..d3d7303d3203 100644 --- a/sc/source/filter/xml/xmltabi.hxx +++ b/sc/source/filter/xml/xmltabi.hxx @@ -59,16 +59,16 @@ class ScXMLTableContext : public SvXMLImportContext public: - ScXMLTableContext( ScXMLImport& rImport, USHORT nPrfx, + ScXMLTableContext( ScXMLImport& rImport, sal_uInt16 nPrfx, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList, - const sal_Bool bTempIsSubTable = sal_False, + const sal_Bool bTempIsSubTable = false, const sal_Int32 nSpannedCols = 0); virtual ~ScXMLTableContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); @@ -83,14 +83,14 @@ class ScXMLTableProtectionContext : public SvXMLImportContext ScXMLImport& GetScImport(); public: - ScXMLTableProtectionContext( ScXMLImport& rImport, USHORT nPrefix, + ScXMLTableProtectionContext( ScXMLImport& rImport, sal_uInt16 nPrefix, const ::rtl::OUString& rLName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); virtual ~ScXMLTableProtectionContext(); - virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix, + virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix, const ::rtl::OUString& rLocalName, const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList>& xAttrList ); diff --git a/sc/source/filter/xml/xmlwrap.cxx b/sc/source/filter/xml/xmlwrap.cxx index b3c052d9c05f..2bed48ed5d81 100644 --- a/sc/source/filter/xml/xmlwrap.cxx +++ b/sc/source/filter/xml/xmlwrap.cxx @@ -62,6 +62,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/packages/zip/ZipIOException.hpp> #include <com/sun/star/embed/ElementModes.hpp> +#include <com/sun/star/script/vba/XVBACompatibility.hpp> #include <svx/xmleohlp.hxx> #include <rtl/logfile.hxx> @@ -123,7 +124,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe if ( !xStorage.is() && pMedium ) xStorage = pMedium->GetStorage(); - sal_Bool bEncrypted = sal_False; + sal_Bool bEncrypted = false; rtl::OUString sStream(sDocName); if( xStorage.is() ) { @@ -138,7 +139,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe sStream = sOldDocName; } else - return sal_False; + return false; aParserInput.aInputStream = xDocStream->getInputStream(); uno::Reference < beans::XPropertySet > xSet( xDocStream, uno::UNO_QUERY ); @@ -207,7 +208,7 @@ sal_uInt32 ScXMLImportWrapper::ImportFromComponent(uno::Reference<lang::XMultiSe if ( aSaxEx.WrappedException >>= aTmp ) aSaxEx = aTmp; else - bTryChild = sal_False; + bTryChild = false; } packages::zip::ZipIOException aBrokenPackage; @@ -321,7 +322,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) comphelper::getProcessServiceFactory(); DBG_ASSERT( xServiceFactory.is(), "got no service manager" ); if( !xServiceFactory.is() ) - return sal_False; + return false; xml::sax::InputSource aParserInput; if (pMedium) @@ -336,7 +337,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Parser" )) )); DBG_ASSERT( xXMLParser.is(), "com.sun.star.xml.sax.Parser service missing" ); if( !xXMLParser.is() ) - return sal_False; + return false; // get filter SfxObjectShell* pObjSh = rDoc.GetDocumentShell(); @@ -357,6 +358,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) { MAP_LEN( "StreamRelPath" ), 0, &::getCppuType( (rtl::OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, { MAP_LEN( "StreamName" ), 0, &::getCppuType( (rtl::OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, { MAP_LEN( "BuildId" ), 0, &::getCppuType( (OUString *)0 ), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, + { MAP_LEN( "VBACompatibilityMode" ), 0, &::getBooleanCppuType(), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0 }, { MAP_LEN( "ScriptConfiguration" ), 0, &::getCppuType((uno::Reference<container::XNameAccess> *)0), ::com::sun::star::beans::PropertyAttribute::MAYBEVOID, 0}, { NULL, 0, 0, NULL, 0, 0 } @@ -433,7 +435,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLMetaImporter")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("meta.xml")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Meta.xml")), aMetaArgs, - sal_False); + false); RTL_LOGFILE_CONTEXT_TRACE( aLog, "meta import end" ); } @@ -451,7 +453,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) if( pObjSh ) { - pObjectHelper = SvXMLEmbeddedObjectHelper::Create(xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_READ, sal_False ); + pObjectHelper = SvXMLEmbeddedObjectHelper::Create(xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_READ, false ); xObjectResolver = pObjectHelper; } } @@ -478,7 +480,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) bOasis ? rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisSettingsImporter")) : rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLSettingsImporter")), rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("settings.xml")), - sEmpty, aSettingsArgs, sal_False); + sEmpty, aSettingsArgs, false); RTL_LOGFILE_CONTEXT_TRACE( aLog, "settings import end" ); } @@ -526,7 +528,7 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) if (xStatusIndicator.is()) xStatusIndicator->end(); - sal_Bool bRet(sal_False); + sal_Bool bRet(false); if (bStylesOnly) { if (nStylesRetval) @@ -574,12 +576,30 @@ sal_Bool ScXMLImportWrapper::Import(sal_Bool bStylesOnly, ErrCode& nError) uno::Reference <container::XNameAccess> xCodeNameAccess; if( aAny >>= xCodeNameAccess ) XMLCodeNameProvider::set( xCodeNameAccess, &rDoc ); + + // VBA compatibility + bool bVBACompat = false; + if ( (xInfoSet->getPropertyValue(OUString(RTL_CONSTASCII_USTRINGPARAM("VBACompatibilityMode"))) >>= bVBACompat) && bVBACompat ) + { + /* Set library container to VBA compatibility mode, this + forces loading the Basic project, which in turn creates the + VBA Globals object and does all related initialization. */ + if ( xModelSet.is() ) try + { + uno::Reference< script::vba::XVBACompatibility > xVBACompat( xModelSet->getPropertyValue( + OUString( RTL_CONSTASCII_USTRINGPARAM( "BasicLibraries" ) ) ), uno::UNO_QUERY_THROW ); + xVBACompat->setVBACompatibilityMode( sal_True ); + } + catch( uno::Exception& ) + { + } + } } // Don't test bStylesRetval and bMetaRetval, because it could be an older file which not contain such streams return bRet;//!bStylesOnly ? bDocRetval : bStylesRetval; } - return sal_False; + return false; } bool lcl_HasValidStream(ScDocument& rDoc) @@ -607,7 +627,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic const rtl::OUString& sMediaType, const rtl::OUString& sComponentName, const sal_Bool bPlainText, uno::Sequence<uno::Any>& aArgs, ScMySharedData*& pSharedData) { - sal_Bool bRet(sal_False); + sal_Bool bRet(false); uno::Reference<io::XOutputStream> xOut; uno::Reference<io::XStream> xStream; @@ -627,7 +647,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic xSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("MediaType")), uno::makeAny(sMediaType)); OUString aUseCommonPassPropName( RTL_CONSTASCII_USTRINGPARAM("UseCommonStoragePasswordEncryption") ); if (bPlainText) - xSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny(sal_False)); + xSet->setPropertyValue(rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("Compressed")), uno::makeAny(false)); // even plain stream should be encrypted in encrypted documents xSet->setPropertyValue( aUseCommonPassPropName, uno::makeAny(sal_True) ); @@ -706,7 +726,7 @@ sal_Bool ScXMLImportWrapper::ExportToComponent(uno::Reference<lang::XMultiServic SCTAB nTabCount = rDoc.GetTableCount(); for (SCTAB nTab=0; nTab<nTabCount; nTab++) if (rDoc.IsStreamValid(nTab)) - rDoc.SetStreamValid(nTab, FALSE); + rDoc.SetStreamValid(nTab, false); } } else @@ -725,13 +745,13 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) uno::Reference<lang::XMultiServiceFactory> xServiceFactory(comphelper::getProcessServiceFactory()); DBG_ASSERT( xServiceFactory.is(), "got no service manager" ); if( !xServiceFactory.is() ) - return sal_False; + return false; uno::Reference<uno::XInterface> xWriter(xServiceFactory->createInstance( OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.xml.sax.Writer" )) )); DBG_ASSERT( xWriter.is(), "com.sun.star.xml.sax.Writer service missing" ); if(!xWriter.is()) - return sal_False; + return false; if ( !xStorage.is() && pMedium ) xStorage = pMedium->GetOutputStorage(); @@ -809,9 +829,9 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) } sal_Bool bMetaRet(pObjSh->GetCreateMode() == SFX_CREATE_MODE_EMBEDDED); - sal_Bool bStylesRet (sal_False); - sal_Bool bDocRet(sal_False); - sal_Bool bSettingsRet(sal_False); + sal_Bool bStylesRet (false); + sal_Bool bDocRet(false); + sal_Bool bSettingsRet(false); ScMySharedData* pSharedData = NULL; sal_Bool bOasis = ( SotStorage::GetVersion( xStorage ) > SOFFICE_FILEFORMAT_60 ); @@ -845,13 +865,13 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) if( xStorage.is() ) { - pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_WRITE, FALSE ); + pGraphicHelper = SvXMLGraphicHelper::Create( xStorage, GRAPHICHELPER_MODE_WRITE, false ); xGrfContainer = pGraphicHelper; } if( pObjSh ) { - pObjectHelper = SvXMLEmbeddedObjectHelper::Create( xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_WRITE, sal_False ); + pObjectHelper = SvXMLEmbeddedObjectHelper::Create( xStorage, *pObjSh, EMBEDDEDOBJECTHELPER_MODE_WRITE, false ); xObjectResolver = pObjectHelper; } @@ -873,7 +893,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) sTextMediaType, bOasis ? rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisStylesExporter")) : rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLStylesExporter")), - sal_False, aStylesArgs, pSharedData); + false, aStylesArgs, pSharedData); RTL_LOGFILE_CONTEXT_TRACE( aLog, "styles export end" ); } @@ -897,7 +917,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) sTextMediaType, bOasis ? rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisContentExporter")) : rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLContentExporter")), - sal_False, aDocArgs, pSharedData); + false, aDocArgs, pSharedData); RTL_LOGFILE_CONTEXT_TRACE( aLog, "content export end" ); } @@ -925,7 +945,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) sTextMediaType, bOasis ? rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLOasisSettingsExporter")) : rtl::OUString (RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.Calc.XMLSettingsExporter")), - sal_False, aSettingsArgs, pSharedData); + false, aSettingsArgs, pSharedData); RTL_LOGFILE_CONTEXT_TRACE( aLog, "settings export end" ); } @@ -940,7 +960,7 @@ sal_Bool ScXMLImportWrapper::Export(sal_Bool bStylesOnly) // later: give string descriptor as parameter for doc type - return sal_False; + return false; } |