diff options
Diffstat (limited to 'sc/source/ui/unoobj')
29 files changed, 1242 insertions, 1207 deletions
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx index 9b3ce8e3d4bc..e54c47b6bd64 100644 --- a/sc/source/ui/unoobj/addruno.cxx +++ b/sc/source/ui/unoobj/addruno.cxx @@ -78,7 +78,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formu sal_Bool bSuccess = sal_False; if ( bIsRange ) { - USHORT nResult = aRange.ParseAny( rUIString, pDoc, eConv ); + sal_uInt16 nResult = aRange.ParseAny( rUIString, pDoc, eConv ); if ( nResult & SCA_VALID ) { if ( ( nResult & SCA_TAB_3D ) == 0 ) @@ -92,7 +92,7 @@ sal_Bool ScAddressConversionObj::ParseUIString( const String& rUIString, ::formu } else { - USHORT nResult = aRange.aStart.Parse( rUIString, pDoc, eConv ); + sal_uInt16 nResult = aRange.aStart.Parse( rUIString, pDoc, eConv ); if ( nResult & SCA_VALID ) { if ( ( nResult & SCA_TAB_3D ) == 0 ) @@ -261,7 +261,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString& { // generate UI representation string - include sheet only if different from ref sheet String aFormatStr; - USHORT nFlags = SCA_VALID; + sal_uInt16 nFlags = SCA_VALID; if ( aRange.aStart.Tab() != nRefSheet ) nFlags |= SCA_TAB_3D; if ( bIsRange ) @@ -283,7 +283,7 @@ uno::Any SAL_CALL ScAddressConversionObj::getPropertyValue( const rtl::OUString& // manually concatenate range so both parts always have the sheet name aFormatStr.Append( (sal_Unicode) ':' ); String aSecond; - USHORT nFlags = SCA_VALID; + sal_uInt16 nFlags = SCA_VALID; if( eConv != ::formula::FormulaGrammar::CONV_XL_A1 ) nFlags |= SCA_TAB_3D; aRange.aEnd.Format( aSecond, nFlags, pDoc, eConv ); diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx index 481c611773ed..2fa106a26744 100644 --- a/sc/source/ui/unoobj/afmtuno.cxx +++ b/sc/source/ui/unoobj/afmtuno.cxx @@ -756,18 +756,18 @@ void SAL_CALL ScAutoFormatFieldObj::setPropertyValue( switch( eOrient ) { case table::CellOrientation_STANDARD: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_False ) ); break; case table::CellOrientation_TOPBOTTOM: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_False ) ); pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); break; case table::CellOrientation_BOTTOMTOP: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, FALSE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_False ) ); pData->PutItem( nFieldIndex, SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); break; case table::CellOrientation_STACKED: - pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, TRUE ) ); + pData->PutItem( nFieldIndex, SfxBoolItem( ATTR_STACKED, sal_True ) ); break; default: { @@ -840,7 +840,7 @@ uno::Any SAL_CALL ScAutoFormatFieldObj::getPropertyValue( const rtl::OUString& a { const SfxInt32Item* pRotItem = (const SfxInt32Item*)pData->GetItem( nFieldIndex, ATTR_ROTATE_VALUE ); sal_Int32 nRot = pRotItem ? pRotItem->GetValue() : 0; - BOOL bStacked = ((const SfxBoolItem*)pItem)->GetValue(); + sal_Bool bStacked = ((const SfxBoolItem*)pItem)->GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aVal ); } break; diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx index 437c220ba1c3..6a6d473f78c0 100644 --- a/sc/source/ui/unoobj/appluno.cxx +++ b/sc/source/ui/unoobj/appluno.cxx @@ -418,74 +418,74 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( ScModule* pScMod = SC_MOD(); ScAppOptions aAppOpt(pScMod->GetAppOptions()); ScInputOptions aInpOpt(pScMod->GetInputOptions()); - BOOL bSaveApp = FALSE; - BOOL bSaveInp = FALSE; + sal_Bool bSaveApp = sal_False; + sal_Bool bSaveInp = sal_False; // print options aren't loaded until needed if (aString.EqualsAscii( SC_UNONAME_DOAUTOCP )) { aAppOpt.SetAutoComplete( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_ENTERED )) { aInpOpt.SetEnterEdit( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_EXPREF )) { aInpOpt.SetExpandRefs( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_EXTFMT )) { aInpOpt.SetExtendFormat( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_LINKUPD )) { aAppOpt.SetLinkMode( (ScLkUpdMode) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MARKHDR )) { aInpOpt.SetMarkHeader( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MOVESEL )) { aInpOpt.SetMoveSelection( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_RANGEFIN )) { aInpOpt.SetRangeFinder( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_USETABCOL )) { aInpOpt.SetUseTabCol( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_PRMETRICS )) { aInpOpt.SetTextWysiwyg( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_REPLWARN )) { aInpOpt.SetReplaceCellsWarn( ScUnoHelpFunctions::GetBoolFromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_METRIC )) { aAppOpt.SetAppMetric( (FieldUnit) ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_MOVEDIR )) { aInpOpt.SetMoveDir( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveInp = TRUE; + bSaveInp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_SCALE )) { @@ -506,12 +506,12 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( aAppOpt.SetZoom( nVal ); aAppOpt.SetZoomType( SVX_ZOOM_PERCENT ); } - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) { aAppOpt.SetStatusFunc( ScUnoHelpFunctions::GetInt16FromAny( aValue ) ); - bSaveApp = TRUE; + bSaveApp = sal_True; } else if (aString.EqualsAscii( SC_UNONAME_ULISTS )) { @@ -523,16 +523,16 @@ void SAL_CALL ScSpreadsheetSettings::setPropertyValue( // mehr tut ScGlobal::SetUserList auch nicht pUserList->FreeAll(); // alle Eintraege raus - USHORT nCount = (USHORT)aSeq.getLength(); + sal_uInt16 nCount = (sal_uInt16)aSeq.getLength(); const rtl::OUString* pAry = aSeq.getConstArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { String aEntry = pAry[i]; ScUserListData* pData = new ScUserListData(aEntry); if (!pUserList->Insert(pData)) // hinten anhaengen delete pData; // sollte nicht vorkommen } - bSaveApp = TRUE; // Liste wird mit den App-Optionen gespeichert + bSaveApp = sal_True; // Liste wird mit den App-Optionen gespeichert } } else if (aString.EqualsAscii( SC_UNONAME_PRALLSH )) @@ -584,7 +584,7 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString& else if (aString.EqualsAscii( SC_UNONAME_STBFUNC )) aRet <<= (sal_Int16) aAppOpt.GetStatusFunc(); else if (aString.EqualsAscii( SC_UNONAME_SCALE )) { - INT16 nZoomVal = 0; + sal_Int16 nZoomVal = 0; switch ( aAppOpt.GetZoomType() ) { case SVX_ZOOM_PERCENT: nZoomVal = aAppOpt.GetZoom(); break; @@ -603,10 +603,10 @@ uno::Any SAL_CALL ScSpreadsheetSettings::getPropertyValue( const rtl::OUString& ScUserList* pUserList = ScGlobal::GetUserList(); if (pUserList) { - USHORT nCount = pUserList->GetCount(); + sal_uInt16 nCount = pUserList->GetCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { String aEntry((*pUserList)[i]->GetString()); pAry[i] = aEntry; @@ -665,13 +665,13 @@ uno::Sequence<sal_Int32> SAL_CALL ScRecentFunctionsObj::getRecentFunctionIds() { ScUnoGuard aGuard; const ScAppOptions& rOpt = SC_MOD()->GetAppOptions(); - USHORT nCount = rOpt.GetLRUFuncListCount(); - const USHORT* pFuncs = rOpt.GetLRUFuncList(); + sal_uInt16 nCount = rOpt.GetLRUFuncListCount(); + const sal_uInt16* pFuncs = rOpt.GetLRUFuncList(); if (pFuncs) { uno::Sequence<sal_Int32> aSeq(nCount); sal_Int32* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) pAry[i] = pFuncs[i]; return aSeq; } @@ -683,12 +683,12 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = (USHORT) Min( aRecentFunctionIds.getLength(), (INT32) LRU_MAX ); - const INT32* pAry = aRecentFunctionIds.getConstArray(); + sal_uInt16 nCount = (sal_uInt16) Min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX ); + const sal_Int32* pAry = aRecentFunctionIds.getConstArray(); - USHORT* pFuncs = nCount ? new USHORT[nCount] : NULL; - for (USHORT i=0; i<nCount; i++) - pFuncs[i] = (USHORT)pAry[i]; //! auf gueltige Werte testen? + sal_uInt16* pFuncs = nCount ? new sal_uInt16[nCount] : NULL; + for (sal_uInt16 i=0; i<nCount; i++) + pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen? ScModule* pScMod = SC_MOD(); ScAppOptions aNewOpts(pScMod->GetAppOptions()); @@ -765,10 +765,10 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co pArray[4].Name = rtl::OUString::createFromAscii( SC_UNONAME_ARGUMENTS ); if (rDesc.ppDefArgNames && rDesc.ppDefArgDescs && rDesc.pDefArgFlags ) { - USHORT nCount = rDesc.nArgCount; + sal_uInt16 nCount = rDesc.nArgCount; if (nCount >= VAR_ARGS) nCount -= VAR_ARGS - 1; - USHORT nSeqCount = rDesc.GetSuppressedArgCount(); + sal_uInt16 nSeqCount = rDesc.GetSuppressedArgCount(); if (nSeqCount >= VAR_ARGS) nSeqCount -= VAR_ARGS - 1; @@ -776,7 +776,7 @@ static void lcl_FillSequence( uno::Sequence<beans::PropertyValue>& rSequence, co { uno::Sequence<sheet::FunctionArgument> aArgSeq(nSeqCount); sheet::FunctionArgument* pArgAry = aArgSeq.getArray(); - for (USHORT i=0, j=0; i<nCount; i++) + for (sal_uInt16 i=0, j=0; i<nCount; i++) { if (!rDesc.pDefArgFlags[i].bSuppress) { @@ -805,8 +805,8 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScFunctionListObj::getById( sal_Int const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); if ( pDesc && pDesc->nFIndex == nId ) @@ -836,8 +836,8 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName ) const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); //! Case-insensitiv ??? @@ -862,10 +862,10 @@ uno::Any SAL_CALL ScFunctionListObj::getByName( const rtl::OUString& aName ) sal_Int32 SAL_CALL ScFunctionListObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = 0; + sal_uInt16 nCount = 0; const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) - nCount = (USHORT)pFuncList->GetCount(); + nCount = (sal_uInt16)pFuncList->GetCount(); return nCount; } @@ -925,10 +925,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScFunctionListObj::getElementNames() throw const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); if ( pDesc && pDesc->pFuncName ) @@ -947,16 +947,16 @@ sal_Bool SAL_CALL ScFunctionListObj::hasByName( const rtl::OUString& aName ) const ScFunctionList* pFuncList = ScGlobal::GetStarCalcFunctionList(); if ( pFuncList ) { - USHORT nCount = (USHORT)pFuncList->GetCount(); - for (USHORT nIndex=0; nIndex<nCount; nIndex++) + sal_uInt16 nCount = (sal_uInt16)pFuncList->GetCount(); + for (sal_uInt16 nIndex=0; nIndex<nCount; nIndex++) { const ScFuncDesc* pDesc = pFuncList->GetFunction(nIndex); //! Case-insensitiv ??? if ( pDesc && pDesc->pFuncName && aNameStr == *pDesc->pFuncName ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx index cb3ab775ccb4..f5a94df0bfba 100644 --- a/sc/source/ui/unoobj/cellsuno.cxx +++ b/sc/source/ui/unoobj/cellsuno.cxx @@ -854,8 +854,8 @@ void lcl_CopyProperties( beans::XPropertySet& rDest, beans::XPropertySet& rSourc { uno::Sequence<beans::Property> aSeq(xInfo->getProperties()); const beans::Property* pAry = aSeq.getConstArray(); - ULONG nCount = aSeq.getLength(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aSeq.getLength(); + for (sal_uLong i=0; i<nCount; i++) { rtl::OUString aName(pAry[i].Name); rDest.setPropertyValue( aName, rSource.getPropertyValue( aName ) ); @@ -873,16 +873,16 @@ SCTAB lcl_FirstTab( const ScRangeList& rRanges ) return 0; // soll nicht sein } -BOOL lcl_WholeSheet( const ScRangeList& rRanges ) +sal_Bool lcl_WholeSheet( const ScRangeList& rRanges ) { if ( rRanges.Count() == 1 ) { ScRange* pRange = rRanges.GetObject(0); if ( pRange && pRange->aStart.Col() == 0 && pRange->aEnd.Col() == MAXCOL && pRange->aStart.Row() == 0 && pRange->aEnd.Row() == MAXROW ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -941,9 +941,9 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con { // Calc braucht Twips, im Uno-Struct sind 1/100mm - rLine.SetOutWidth( (USHORT)HMMToTwips( rStruct.OuterLineWidth ) ); - rLine.SetInWidth( (USHORT)HMMToTwips( rStruct.InnerLineWidth ) ); - rLine.SetDistance( (USHORT)HMMToTwips( rStruct.LineDistance ) ); + rLine.SetOutWidth( (sal_uInt16)HMMToTwips( rStruct.OuterLineWidth ) ); + rLine.SetInWidth( (sal_uInt16)HMMToTwips( rStruct.InnerLineWidth ) ); + rLine.SetDistance( (sal_uInt16)HMMToTwips( rStruct.LineDistance ) ); rLine.SetColor( ColorData( rStruct.Color ) ); if ( rLine.GetOutWidth() || rLine.GetInWidth() || rLine.GetDistance() ) @@ -955,7 +955,7 @@ const SvxBorderLine* ScHelperFunctions::GetBorderLine( SvxBorderLine& rLine, con void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner, const table::TableBorder& rBorder ) { SvxBorderLine aLine; - rOuter.SetDistance( (USHORT)HMMToTwips( rBorder.Distance ) ); + rOuter.SetDistance( (sal_uInt16)HMMToTwips( rBorder.Distance ) ); rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.TopLine ), BOX_LINE_TOP ); rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.BottomLine ), BOX_LINE_BOTTOM ); rOuter.SetLine( ScHelperFunctions::GetBorderLine( aLine, rBorder.LeftLine ), BOX_LINE_LEFT ); @@ -969,7 +969,7 @@ void ScHelperFunctions::FillBoxItems( SvxBoxItem& rOuter, SvxBoxInfoItem& rInner rInner.SetValid( VALID_HORI, rBorder.IsHorizontalLineValid ); rInner.SetValid( VALID_VERT, rBorder.IsVerticalLineValid ); rInner.SetValid( VALID_DISTANCE, rBorder.IsDistanceValid ); - rInner.SetTable( TRUE ); + rInner.SetTable( sal_True ); } void ScHelperFunctions::FillBorderLine( table::BorderLine& rStruct, const SvxBorderLine* pLine ) @@ -1014,12 +1014,12 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r const SvxBoxItem& rOuter, const SvxBoxInfoItem& rInner ) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); ScDocument* pUndoDoc = NULL; if (bUndo) pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - ULONG nCount = rRanges.Count(); - ULONG i; + sal_uLong nCount = rRanges.Count(); + sal_uLong i; for (i=0; i<nCount; i++) { ScRange aRange(*rRanges.GetObject(i)); @@ -1031,12 +1031,12 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r pUndoDoc->InitUndo( pDoc, nTab, nTab ); else pUndoDoc->AddUndoTab( nTab, nTab ); - pDoc->CopyToDocument( aRange, IDF_ATTRIB, FALSE, pUndoDoc ); + pDoc->CopyToDocument( aRange, IDF_ATTRIB, sal_False, pUndoDoc ); } ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( nTab, TRUE ); + aMark.SelectTable( nTab, sal_True ); pDoc->ApplySelectionFrame( aMark, &rOuter, &rInner ); // RowHeight bei Umrandung alleine nicht noetig @@ -1057,10 +1057,10 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r //! move lcl_PutDataArray to docfunc? //! merge loop with ScFunctionAccess::callFunction -BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, +sal_Bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, const uno::Sequence< uno::Sequence<uno::Any> >& aData ) { -// BOOL bApi = TRUE; +// sal_Bool bApi = sal_True; ScDocument* pDoc = rDocShell.GetDocument(); SCTAB nTab = rRange.aStart.Tab(); @@ -1068,12 +1068,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); SCROW nEndRow = rRange.aEnd.Row(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) ) { //! error message - return FALSE; + return sal_False; } long nCols = 0; @@ -1085,7 +1085,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 ) { //! error message? - return FALSE; + return sal_False; } ScDocument* pUndoDoc = NULL; @@ -1093,12 +1093,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( rRange, IDF_CONTENTS|IDF_NOCAPTIONS, sal_False, pUndoDoc ); } pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS ); - BOOL bError = FALSE; + sal_Bool bError = sal_False; SCROW nDocRow = nStartRow; for (long nRow=0; nRow<nRows; nRow++) { @@ -1169,12 +1169,12 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, } } else - bError = TRUE; // wrong size + bError = sal_True; // wrong size ++nDocRow; } - BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); + sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); if ( pUndoDoc ) { @@ -1183,7 +1183,7 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, rDocShell.GetUndoManager()->AddUndoAction( new ScUndoPaste( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark, - pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) ); + pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, sal_False ) ); } if (!bHeight) @@ -1194,11 +1194,11 @@ BOOL lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange, return !bError; } -BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, +sal_Bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, const uno::Sequence< uno::Sequence<rtl::OUString> >& aData, const ::rtl::OUString& rFormulaNmsp, const formula::FormulaGrammar::Grammar eGrammar ) { -// BOOL bApi = TRUE; +// sal_Bool bApi = sal_True; ScDocument* pDoc = rDocShell.GetDocument(); SCTAB nTab = rRange.aStart.Tab(); @@ -1206,12 +1206,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, SCROW nStartRow = rRange.aStart.Row(); SCCOL nEndCol = rRange.aEnd.Col(); SCROW nEndRow = rRange.aEnd.Row(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if ( !pDoc->IsBlockEditable( nTab, nStartCol,nStartRow, nEndCol,nEndRow ) ) { //! error message - return FALSE; + return sal_False; } long nCols = 0; @@ -1223,7 +1223,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, if ( nCols != nEndCol-nStartCol+1 || nRows != nEndRow-nStartRow+1 ) { //! error message? - return FALSE; + return sal_False; } ScDocument* pUndoDoc = NULL; @@ -1231,14 +1231,14 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, { pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); pUndoDoc->InitUndo( pDoc, nTab, nTab ); - pDoc->CopyToDocument( rRange, IDF_CONTENTS, FALSE, pUndoDoc ); + pDoc->CopyToDocument( rRange, IDF_CONTENTS, sal_False, pUndoDoc ); } pDoc->DeleteAreaTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, IDF_CONTENTS ); ScDocFunc aFunc( rDocShell ); // for InterpretEnglishString - BOOL bError = FALSE; + sal_Bool bError = sal_False; SCROW nDocRow = nStartRow; for (long nRow=0; nRow<nRows; nRow++) { @@ -1258,12 +1258,12 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, } } else - bError = TRUE; // wrong size + bError = sal_True; // wrong size ++nDocRow; } - BOOL bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); + sal_Bool bHeight = rDocShell.AdjustRowHeight( nStartRow, nEndRow, nTab ); if ( pUndoDoc ) { @@ -1272,7 +1272,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, rDocShell.GetUndoManager()->AddUndoAction( new ScUndoPaste( &rDocShell, nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab, aDestMark, - pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, FALSE ) ); + pUndoDoc, NULL, IDF_CONTENTS, NULL,NULL,NULL,NULL, sal_False ) ); } if (!bHeight) @@ -1284,7 +1284,7 @@ BOOL lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange, } // used in ScCellRangeObj::getFormulaArray and ScCellObj::GetInputString_Impl -String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, BOOL bEnglish ) +String lcl_GetInputString( ScDocument* pDoc, const ScAddress& rPosition, sal_Bool bEnglish ) { String aVal; if ( pDoc ) @@ -1359,10 +1359,10 @@ ScCellRangesBase::ScCellRangesBase() : pNoDfltCurrentDataSet( NULL ), pMarkData( NULL ), nObjectId( 0 ), - bChartColAsHdr( FALSE ), - bChartRowAsHdr( FALSE ), - bCursorOnly( FALSE ), - bGotDataChangedHint( FALSE ), + bChartColAsHdr( sal_False ), + bChartRowAsHdr( sal_False ), + bCursorOnly( sal_False ), + bGotDataChangedHint( sal_False ), aValueListeners( 0 ) { } @@ -1377,10 +1377,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) : pNoDfltCurrentDataSet( NULL ), pMarkData( NULL ), nObjectId( 0 ), - bChartColAsHdr( FALSE ), - bChartRowAsHdr( FALSE ), - bCursorOnly( FALSE ), - bGotDataChangedHint( FALSE ), + bChartColAsHdr( sal_False ), + bChartRowAsHdr( sal_False ), + bCursorOnly( sal_False ), + bGotDataChangedHint( sal_False ), aValueListeners( 0 ) { ScRange aCellRange(rR); @@ -1406,10 +1406,10 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) : pMarkData( NULL ), aRanges( rR ), nObjectId( 0 ), - bChartColAsHdr( FALSE ), - bChartRowAsHdr( FALSE ), - bCursorOnly( FALSE ), - bGotDataChangedHint( FALSE ), + bChartColAsHdr( sal_False ), + bChartRowAsHdr( sal_False ), + bCursorOnly( sal_False ), + bGotDataChangedHint( sal_False ), aValueListeners( 0 ) { if (pDocShell) // Null if created with createInstance @@ -1464,7 +1464,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat() if ( !pCurrentFlat && pDocShell ) { ScDocument* pDoc = pDocShell->GetDocument(); - pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), FALSE ); + pCurrentFlat = pDoc->CreateSelectionPattern( *GetMarkData(), sal_False ); } return pCurrentFlat; } @@ -1476,7 +1476,7 @@ const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsDeep() if ( !pCurrentDeep && pDocShell ) { ScDocument* pDoc = pDocShell->GetDocument(); - pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), TRUE ); + pCurrentDeep = pDoc->CreateSelectionPattern( *GetMarkData(), sal_True ); } return pCurrentDeep; } @@ -1502,7 +1502,7 @@ const ScMarkData* ScCellRangesBase::GetMarkData() if (!pMarkData) { pMarkData = new ScMarkData(); - pMarkData->MarkFromRangeList( aRanges, FALSE ); + pMarkData->MarkFromRangeList( aRanges, sal_False ); } return pMarkData; } @@ -1539,7 +1539,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // #129050# any change of the range address is broadcast to value (modify) listeners if ( aValueListeners.Count() ) - bGotDataChangedHint = TRUE; + bGotDataChangedHint = sal_True; if ( pUndoRanges ) pDoc->AddUnoRefChange( nObjectId, *pUndoRanges ); @@ -1549,7 +1549,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { ForgetCurrentAttrs(); @@ -1561,7 +1561,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) lang::EventObject aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aValueListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ ) (*aValueListeners[n])->disposing( aEvent ); aValueListeners.DeleteAndDestroy( 0, aValueListeners.Count() ); @@ -1591,10 +1591,10 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // the EventObject holds a Ref to this object until after the listener calls ScDocument* pDoc = pDocShell->GetDocument(); - for ( USHORT n=0; n<aValueListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aValueListeners.Count(); n++ ) pDoc->AddUnoListenerCall( *aValueListeners[n], aEvent ); - bGotDataChangedHint = FALSE; + bGotDataChangedHint = sal_False; } } else if ( nId == SC_HINT_CALCALL ) @@ -1603,7 +1603,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) // (SFX_HINT_DATACHANGED follows separately) if ( aValueListeners.Count() ) - bGotDataChangedHint = TRUE; + bGotDataChangedHint = sal_True; } } else if ( rHint.ISA( ScUnoRefUndoHint ) ) @@ -1617,7 +1617,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) RefChanged(); if ( aValueListeners.Count() ) - bGotDataChangedHint = TRUE; // need to broadcast the undo, too + bGotDataChangedHint = sal_True; // need to broadcast the undo, too } } } @@ -1631,8 +1631,8 @@ void ScCellRangesBase::RefChanged() pValueListener->EndListeningAll(); ScDocument* pDoc = pDocShell->GetDocument(); - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) pDoc->StartListeningArea( *aRanges.GetObject(i), pValueListener ); } @@ -1690,7 +1690,7 @@ void ScCellRangesBase::SetNewRanges(const ScRangeList& rNew) RefChanged(); } -void ScCellRangesBase::SetCursorOnly( BOOL bSet ) +void ScCellRangesBase::SetCursorOnly( sal_Bool bSet ) { // set for a selection object that is created from the cursor position // without anything selected (may contain several sheets) @@ -1769,10 +1769,10 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellRangesBase::getImplementationId() // --- -void ScCellRangesBase::PaintRanges_Impl( USHORT nPart ) +void ScCellRangesBase::PaintRanges_Impl( sal_uInt16 nPart ) { - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) pDocShell->PostPaint( *aRanges.GetObject(i), nPart ); } @@ -1785,7 +1785,7 @@ double SAL_CALL ScCellRangesBase::computeFunction( sheet::GeneralFunction nFunct ScMarkData aMark(*GetMarkData()); aMark.MarkToSimple(); if (!aMark.IsMarked()) - aMark.SetMarkNegative(TRUE); // um Dummy Position angeben zu koennen + aMark.SetMarkNegative(sal_True); // um Dummy Position angeben zu koennen ScAddress aDummy; // wenn nicht Marked, ignoriert wegen Negative double fVal; @@ -1805,12 +1805,12 @@ void SAL_CALL ScCellRangesBase::clearContents( sal_Int32 nContentFlags ) throw(u if ( aRanges.Count() ) { // only for clearContents: EDITATTR is only used if no contents are deleted - USHORT nDelFlags = static_cast< USHORT >( nContentFlags & IDF_ALL ); + sal_uInt16 nDelFlags = static_cast< sal_uInt16 >( nContentFlags & IDF_ALL ); if ( ( nContentFlags & IDF_EDITATTR ) && ( nContentFlags & IDF_CONTENTS ) == 0 ) nDelFlags |= IDF_EDITATTR; ScDocFunc aFunc(*pDocShell); - aFunc.DeleteContents( *GetMarkData(), nDelFlags, TRUE, TRUE ); + aFunc.DeleteContents( *GetMarkData(), nDelFlags, sal_True, sal_True ); } // sonst ist nichts zu tun } @@ -1823,7 +1823,7 @@ const SfxItemPropertyMap* ScCellRangesBase::GetItemPropertyMap() } void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry, - USHORT& rItemWhich ) + sal_uInt16& rItemWhich ) { // Which-ID des betroffenen Items, auch wenn das Item die Property // nicht alleine behandeln kann @@ -1852,7 +1852,7 @@ void lcl_GetPropertyWhich( const SfxItemPropertySimpleEntry* pEntry, } -beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, const SfxItemPropertySimpleEntry* pEntry ) +beans::PropertyState ScCellRangesBase::GetOnePropertyState( sal_uInt16 nItemWhich, const SfxItemPropertySimpleEntry* pEntry ) { beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE; if ( nItemWhich ) // item wid (from map or special case) @@ -1864,15 +1864,15 @@ beans::PropertyState ScCellRangesBase::GetOnePropertyState( USHORT nItemWhich, c const ScPatternAttr* pPattern = GetCurrentAttrsFlat(); if ( pPattern ) { - SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, FALSE ); + SfxItemState eState = pPattern->GetItemSet().GetItemState( nItemWhich, sal_False ); // // if no rotate value is set, look at orientation // //! also for a fixed value of 0 (in case orientation is ambiguous)? // if ( nItemWhich == ATTR_ROTATE_VALUE && eState == SFX_ITEM_DEFAULT ) -// eState = pPattern->GetItemSet().GetItemState( ATTR_ORIENTATION, FALSE ); +// eState = pPattern->GetItemSet().GetItemState( ATTR_ORIENTATION, sal_False ); if ( nItemWhich == ATTR_VALUE_FORMAT && eState == SFX_ITEM_DEFAULT ) - eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, FALSE ); + eState = pPattern->GetItemSet().GetItemState( ATTR_LANGUAGE_FORMAT, sal_False ); if ( eState == SFX_ITEM_SET ) eRet = beans::PropertyState_DIRECT_VALUE; @@ -1913,7 +1913,7 @@ beans::PropertyState SAL_CALL ScCellRangesBase::getPropertyState( const rtl::OUS throw uno::RuntimeException(); const SfxItemPropertyMap* pMap = GetItemPropertyMap(); // from derived class - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; const SfxItemPropertySimpleEntry* pEntry = pMap->getByName( aPropertyName ); lcl_GetPropertyWhich( pEntry, nItemWhich ); return GetOnePropertyState( nItemWhich, pEntry ); @@ -1929,9 +1929,9 @@ uno::Sequence<beans::PropertyState> SAL_CALL ScCellRangesBase::getPropertyStates uno::Sequence<beans::PropertyState> aRet(aPropertyNames.getLength()); beans::PropertyState* pStates = aRet.getArray(); - for(INT32 i = 0; i < aPropertyNames.getLength(); i++) + for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++) { - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); lcl_GetPropertyWhich( pEntry, nItemWhich ); pStates[i] = GetOnePropertyState(nItemWhich, pEntry); @@ -1946,7 +1946,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp if ( pDocShell ) { const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyName ); lcl_GetPropertyWhich( pEntry, nItemWhich ); if ( nItemWhich ) // item wid (from map or special case) @@ -1960,7 +1960,7 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp // //! for ATTR_ROTATE_VALUE, also reset ATTR_ORIENTATION? - USHORT aWIDs[3]; + sal_uInt16 aWIDs[3]; aWIDs[0] = nItemWhich; if ( nItemWhich == ATTR_VALUE_FORMAT ) { @@ -1969,19 +1969,19 @@ void SAL_CALL ScCellRangesBase::setPropertyToDefault( const rtl::OUString& aProp } else aWIDs[1] = 0; - aFunc.ClearItems( *GetMarkData(), aWIDs, TRUE ); + aFunc.ClearItems( *GetMarkData(), aWIDs, sal_True ); } } else if ( pEntry ) { if ( pEntry->nWID == SC_WID_UNO_CHCOLHDR ) - bChartColAsHdr = FALSE; + bChartColAsHdr = sal_False; else if ( pEntry->nWID == SC_WID_UNO_CHROWHDR ) - bChartRowAsHdr = FALSE; + bChartRowAsHdr = sal_False; else if ( pEntry->nWID == SC_WID_UNO_CELLSTYL ) { ScDocFunc aFunc(*pDocShell); - aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), TRUE, TRUE ); + aFunc.ApplyStyle( *GetMarkData(), ScGlobal::GetRscString(STR_STYLENAME_STANDARD), sal_True, sal_True ); } } } @@ -2030,7 +2030,7 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr { case SC_WID_UNO_CHCOLHDR: case SC_WID_UNO_CHROWHDR: - ScUnoHelpFunctions::SetBoolInAny( aAny, FALSE ); + ScUnoHelpFunctions::SetBoolInAny( aAny, sal_False ); break; case SC_WID_UNO_CELLSTYL: aAny <<= rtl::OUString( ScStyleNameConversion::DisplayToProgrammaticName( @@ -2053,8 +2053,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr case SC_WID_UNO_CONDLOC: case SC_WID_UNO_CONDXML: { - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2067,8 +2067,8 @@ uno::Any SAL_CALL ScCellRangesBase::getPropertyDefault( const rtl::OUString& aPr case SC_WID_UNO_VALILOC: case SC_WID_UNO_VALIXML: { - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); @@ -2103,7 +2103,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScCellRangesBase::getPropertySe void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::Any& rValue, ScPatternAttr& rPattern, ScDocument* pDoc, - USHORT& rFirstItemId, USHORT& rSecondItemId ) + sal_uInt16& rFirstItemId, sal_uInt16& rSecondItemId ) { rFirstItemId = rEntry.nWID; rSecondItemId = 0; @@ -2115,14 +2115,14 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A { // #67847# language for number formats SvNumberFormatter* pFormatter = pDoc->GetFormatTable(); - ULONG nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue(); + sal_uLong nOldFormat = ((const SfxUInt32Item&)rSet.Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&)rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); nOldFormat = pFormatter->GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang ); sal_Int32 nIntVal = 0; if ( rValue >>= nIntVal ) { - ULONG nNewFormat = (ULONG)nIntVal; + sal_uLong nNewFormat = (sal_uLong)nIntVal; rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); const SvNumberformat* pNewEntry = pFormatter->GetEntry( nNewFormat ); @@ -2134,7 +2134,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A // #40606# if only language is changed, // don't touch number format attribute - ULONG nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET; + sal_uLong nNewMod = nNewFormat % SV_COUNTRY_LANGUAGE_OFFSET; if ( nNewMod == ( nOldFormat % SV_COUNTRY_LANGUAGE_OFFSET ) && nNewMod <= SV_MAX_ANZ_STANDARD_FORMATE ) { @@ -2152,7 +2152,7 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A { sal_Int16 nIntVal = 0; if ( rValue >>= nIntVal ) - rSet.Put( SfxUInt16Item( rEntry.nWID, (USHORT)HMMToTwips(nIntVal) ) ); + rSet.Put( SfxUInt16Item( rEntry.nWID, (sal_uInt16)HMMToTwips(nIntVal) ) ); else throw lang::IllegalArgumentException(); } @@ -2181,20 +2181,20 @@ void lcl_SetCellProperty( const SfxItemPropertySimpleEntry& rEntry, const uno::A switch( eOrient ) { case table::CellOrientation_STANDARD: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); break; case table::CellOrientation_TOPBOTTOM: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); rSecondItemId = ATTR_ROTATE_VALUE; break; case table::CellOrientation_BOTTOMTOP: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); rSecondItemId = ATTR_ROTATE_VALUE; break; case table::CellOrientation_STACKED: - rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) ); break; default: { @@ -2253,14 +2253,14 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE SfxItemSet& rSet = aPattern.GetItemSet(); rSet.ClearInvalidItems(); - USHORT nFirstItem, nSecondItem; + sal_uInt16 nFirstItem, nSecondItem; lcl_SetCellProperty( *pEntry, aValue, aPattern, pDoc, nFirstItem, nSecondItem ); - for (USHORT nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++) + for (sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; nWhich++) if ( nWhich != nFirstItem && nWhich != nSecondItem ) rSet.ClearItem(nWhich); - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } else // implemented here @@ -2280,7 +2280,7 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aStrVal, SFX_STYLE_FAMILY_PARA )); ScDocFunc aFunc(*pDocShell); - aFunc.ApplyStyle( *GetMarkData(), aString, TRUE, TRUE ); + aFunc.ApplyStyle( *GetMarkData(), aString, sal_True, sal_True ); } break; case SC_WID_UNO_TBLBORD: @@ -2308,21 +2308,21 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if (pFormat) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); ScConditionalFormat aNew( 0, pDoc ); // Index wird beim Einfuegen gesetzt pFormat->FillFormat( aNew, pDoc, eGrammar ); - ULONG nIndex = pDoc->AddCondFormat( aNew ); + sal_uLong nIndex = pDoc->AddCondFormat( aNew ); ScDocFunc aFunc(*pDocShell); ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_CONDITIONAL, nIndex ) ); - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } } @@ -2339,22 +2339,22 @@ void ScCellRangesBase::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if (pValidObj) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? formula::FormulaGrammar::GRAM_UNSPECIFIED : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); ScValidationData* pNewData = pValidObj->CreateValidationData( pDoc, eGrammar ); - ULONG nIndex = pDoc->AddValidationEntry( *pNewData ); + sal_uLong nIndex = pDoc->AddValidationEntry( *pNewData ); delete pNewData; ScDocFunc aFunc(*pDocShell); ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALIDDATA, nIndex ) ); - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } } @@ -2400,7 +2400,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE { ScDocument* pDoc = pDocShell->GetDocument(); - ULONG nOldFormat = ((const SfxUInt32Item&) + sal_uLong nOldFormat = ((const SfxUInt32Item&) pDataSet->Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&) pDataSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); @@ -2416,7 +2416,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE case ATTR_STACKED: { sal_Int32 nRot = ((const SfxInt32Item&)pDataSet->Get(ATTR_ROTATE_VALUE)).GetValue(); - BOOL bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue(); + sal_Bool bStacked = ((const SfxBoolItem&)pDataSet->Get(pEntry->nWID)).GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( rAny ); } break; @@ -2456,7 +2456,7 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE ScDocument* pDoc = pDocShell->GetDocument(); ScMarkData aMark; aMark.SetMarkArea( *pFirst ); - aMark.SelectTable( pFirst->aStart.Tab(), TRUE ); + aMark.SelectTable( pFirst->aStart.Tab(), sal_True ); pDoc->GetSelectionFrame( aMark, aOuter, aInner ); table::TableBorder aBorder; @@ -2473,12 +2473,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pPattern ) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_CONDLOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_CONDXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); - ULONG nIndex = ((const SfxUInt32Item&) + sal_uLong nIndex = ((const SfxUInt32Item&) pPattern->GetItem(ATTR_CONDITIONAL)).GetValue(); rAny <<= uno::Reference<sheet::XSheetConditionalEntries>( new ScTableConditionalFormat( pDoc, nIndex, eGrammar )); @@ -2493,12 +2493,12 @@ void ScCellRangesBase::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pPattern ) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); - BOOL bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); + sal_Bool bEnglish = ( pEntry->nWID != SC_WID_UNO_VALILOC ); + sal_Bool bXML = ( pEntry->nWID == SC_WID_UNO_VALIXML ); formula::FormulaGrammar::Grammar eGrammar = (bXML ? pDoc->GetStorageGrammar() : formula::FormulaGrammar::mapAPItoGrammar( bEnglish, bXML)); - ULONG nIndex = ((const SfxUInt32Item&) + sal_uLong nIndex = ((const SfxUInt32Item&) pPattern->GetItem(ATTR_VALIDDATA)).GetValue(); rAny <<= uno::Reference<beans::XPropertySet>( new ScTableValidationObj( pDoc, nIndex, eGrammar )); @@ -2631,7 +2631,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS // collect items in pNewPattern, apply with one call after the loop - USHORT nFirstItem, nSecondItem; + sal_uInt16 nFirstItem, nSecondItem; lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem ); // put only affected items into new set @@ -2651,7 +2651,7 @@ void SAL_CALL ScCellRangesBase::setPropertyValues( const uno::Sequence< rtl::OUS if ( pNewPattern && aRanges.Count() ) { ScDocFunc aFunc(*pDocShell); - aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True ); } delete pNewPattern; @@ -2670,7 +2670,7 @@ uno::Sequence<uno::Any> SAL_CALL ScCellRangesBase::getPropertyValues( uno::Sequence<uno::Any> aRet(aPropertyNames.getLength()); uno::Any* pProperties = aRet.getArray(); - for(INT32 i = 0; i < aPropertyNames.getLength(); i++) + for(sal_Int32 i = 0; i < aPropertyNames.getLength(); i++) { const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); GetOnePropertyValue( pEntry, pProperties[i] ); @@ -2707,7 +2707,7 @@ IMPL_LINK( ScCellRangesBase, ValueListenerHdl, SfxHint*, pHint ) // in the range are notified. So only a flag is set that is checked when // SFX_HINT_DATACHANGED is received. - bGotDataChangedHint = TRUE; + bGotDataChangedHint = sal_True; } return 0; } @@ -2782,7 +2782,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set // collect items in pNewPattern, apply with one call after the loop - USHORT nFirstItem, nSecondItem; + sal_uInt16 nFirstItem, nSecondItem; try { lcl_SetCellProperty( *pEntry, pValues[i], *pOldPattern, pDoc, nFirstItem, nSecondItem ); @@ -2826,7 +2826,7 @@ uno::Sequence< beans::SetPropertyTolerantFailed > SAL_CALL ScCellRangesBase::set if ( pNewPattern && aRanges.Count() ) { ScDocFunc aFunc(*pDocShell); - aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), *pNewPattern, sal_True, sal_True ); } delete pNewPattern; @@ -2851,7 +2851,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class - for(INT32 i = 0; i < nCount; i++) + for(sal_Int32 i = 0; i < nCount; i++) { const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); if (!pEntry) @@ -2860,7 +2860,7 @@ uno::Sequence< beans::GetPropertyTolerantResult > SAL_CALL ScCellRangesBase::get } else { - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; lcl_GetPropertyWhich( pEntry, nItemWhich ); pReturns[i].State = GetOnePropertyState( nItemWhich, pEntry ); GetOnePropertyValue( pEntry, pReturns[i].Value ); @@ -2881,8 +2881,8 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas const SfxItemPropertyMap* pPropertyMap = GetItemPropertyMap(); // from derived class - INT32 j = 0; - for(INT32 i = 0; i < nCount; i++) + sal_Int32 j = 0; + for(sal_Int32 i = 0; i < nCount; i++) { const SfxItemPropertySimpleEntry* pEntry = pPropertyMap->getByName( aPropertyNames[i] ); if (!pEntry) @@ -2891,7 +2891,7 @@ uno::Sequence< beans::GetDirectPropertyTolerantResult > SAL_CALL ScCellRangesBas } else { - USHORT nItemWhich = 0; + sal_uInt16 nItemWhich = 0; lcl_GetPropertyWhich( pEntry, nItemWhich ); pReturns[j].State = GetOnePropertyState( nItemWhich, pEntry ); if (pReturns[j].State == beans::PropertyState_DIRECT_VALUE) @@ -2919,7 +2919,7 @@ void SAL_CALL ScCellRangesBase::decrementIndent() throw(::com::sun::star::uno::R //#97041#; put only MultiMarked ScMarkData in ChangeIndent ScMarkData aMarkData(*GetMarkData()); aMarkData.MarkToMulti(); - aFunc.ChangeIndent( aMarkData, FALSE, TRUE ); + aFunc.ChangeIndent( aMarkData, sal_False, sal_True ); } } @@ -2932,7 +2932,7 @@ void SAL_CALL ScCellRangesBase::incrementIndent() throw(::com::sun::star::uno::R //#97041#; put only MultiMarked ScMarkData in ChangeIndent ScMarkData aMarkData(*GetMarkData()); aMarkData.MarkToMulti(); - aFunc.ChangeIndent( aMarkData, TRUE, TRUE ); + aFunc.ChangeIndent( aMarkData, sal_True, sal_True ); } } @@ -3053,7 +3053,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; long nRowCount = aData.getLength(); long nColCount = nRowCount ? aData[0].getLength() : 0; ScRangeListRef xChartRanges = GetLimitedChartRanges_Impl( nColCount, nRowCount ); @@ -3093,7 +3093,7 @@ void SAL_CALL ScCellRangesBase::setData( const uno::Sequence< uno::Sequence<doub PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = TRUE; + bDone = sal_True; } } } @@ -3126,7 +3126,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions( throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bChartColAsHdr ) { long nRowCount = aRowDescriptions.getLength(); @@ -3160,7 +3160,7 @@ void SAL_CALL ScCellRangesBase::setRowDescriptions( PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = TRUE; + bDone = sal_True; } } } @@ -3194,7 +3194,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions( throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( bChartRowAsHdr ) { long nColCount = aColumnDescriptions.getLength(); @@ -3228,7 +3228,7 @@ void SAL_CALL ScCellRangesBase::setColumnDescriptions( PaintRanges_Impl( PAINT_GRID ); pDocShell->SetDocumentModified(); ForceChartListener_Impl(); // call listeners for this object synchronously - bDone = TRUE; + bDone = sal_True; } } } @@ -3248,8 +3248,8 @@ void ScCellRangesBase::ForceChartListener_Impl() ScChartListenerCollection* pColl = pDocShell->GetDocument()->GetChartListenerCollection(); if ( pColl ) { - USHORT nCollCount = pColl->GetCount(); - for ( USHORT nIndex = 0; nIndex < nCollCount; nIndex++ ) + sal_uInt16 nCollCount = pColl->GetCount(); + for ( sal_uInt16 nIndex = 0; nIndex < nCollCount; nIndex++ ) { ScChartListener* pChartListener = (ScChartListener*)pColl->At(nIndex); if ( pChartListener && @@ -3264,16 +3264,16 @@ void ScCellRangesBase::ForceChartListener_Impl() String lcl_UniqueName( ScStrCollection& rColl, const String& rPrefix ) { long nNumber = 1; - USHORT nCollCount = rColl.GetCount(); - while (TRUE) + sal_uInt16 nCollCount = rColl.GetCount(); + while (sal_True) { String aName(rPrefix); aName += String::CreateFromInt32( nNumber ); - BOOL bFound = FALSE; - for (USHORT i=0; i<nCollCount; i++) + sal_Bool bFound = sal_False; + for (sal_uInt16 i=0; i<nCollCount; i++) if ( rColl[i]->GetString() == aName ) { - bFound = TRUE; + bFound = sal_True; break; } if (!bFound) @@ -3347,8 +3347,8 @@ void SAL_CALL ScCellRangesBase::addModifyListener( const uno::Reference<util::XM pValueListener = new ScLinkListener( LINK( this, ScCellRangesBase, ValueListenerHdl ) ); ScDocument* pDoc = pDocShell->GetDocument(); - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) pDoc->StartListeningArea( *aRanges.GetObject(i), pValueListener ); acquire(); // don't lose this object (one ref for all listeners) @@ -3365,8 +3365,8 @@ void SAL_CALL ScCellRangesBase::removeModifyListener( const uno::Reference<util: acquire(); // in case the listeners have the last ref - released below - USHORT nCount = aValueListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aValueListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XModifyListener> *pObj = aValueListeners[n]; if ( *pObj == aListener ) @@ -3423,7 +3423,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC } ScRangeList aNewRanges; - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); } @@ -3441,8 +3441,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel ScMarkData aMarkData(*GetMarkData()); // belegte Zellen wegmarkieren - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); @@ -3454,7 +3454,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel if ( !pCell->IsBlank() ) aMarkData.SetMultiMarkArea( ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ), - FALSE ); + sal_False ); pCell = aIter.GetNext(); } @@ -3463,7 +3463,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel ScRangeList aNewRanges; // IsMultiMarked reicht hier nicht (wird beim deselektieren nicht zurueckgesetzt) if (aMarkData.HasAnyMultiMarks()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3483,8 +3483,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC ScMarkData aMarkData; // passende Zellen selektieren - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); @@ -3492,33 +3492,33 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC ScBaseCell* pCell = aIter.GetFirst(); while (pCell) { - BOOL bAdd = FALSE; + sal_Bool bAdd = sal_False; if ( pCell->HasNote() && ( nContentFlags & sheet::CellFlags::ANNOTATION ) ) - bAdd = TRUE; + bAdd = sal_True; else switch ( pCell->GetCellType() ) { case CELLTYPE_STRING: if ( nContentFlags & sheet::CellFlags::STRING ) - bAdd = TRUE; + bAdd = sal_True; break; case CELLTYPE_EDIT: if ( (nContentFlags & sheet::CellFlags::STRING) || (nContentFlags & sheet::CellFlags::FORMATTED) ) - bAdd = TRUE; + bAdd = sal_True; break; case CELLTYPE_FORMULA: if ( nContentFlags & sheet::CellFlags::FORMULA ) - bAdd = TRUE; + bAdd = sal_True; break; case CELLTYPE_VALUE: if ( (nContentFlags & (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME)) == (sheet::CellFlags::VALUE|sheet::CellFlags::DATETIME) ) - bAdd = TRUE; + bAdd = sal_True; else { // Date/Time Erkennung - ULONG nIndex = (ULONG)((SfxUInt32Item*)pDoc->GetAttr( + sal_uLong nIndex = (sal_uLong)((SfxUInt32Item*)pDoc->GetAttr( aIter.GetCol(), aIter.GetRow(), aIter.GetTab(), ATTR_VALUE_FORMAT ))->GetValue(); short nTyp = pDoc->GetFormatTable()->GetType(nIndex); @@ -3526,12 +3526,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC (nTyp == NUMBERFORMAT_DATETIME)) { if ( nContentFlags & sheet::CellFlags::DATETIME ) - bAdd = TRUE; + bAdd = sal_True; } else { if ( nContentFlags & sheet::CellFlags::VALUE ) - bAdd = TRUE; + bAdd = sal_True; } } break; @@ -3544,7 +3544,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC if (bAdd) aMarkData.SetMultiMarkArea( ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ), - TRUE ); + sal_True ); pCell = aIter.GetNext(); } @@ -3552,7 +3552,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC ScRangeList aNewRanges; if (aMarkData.IsMultiMarked()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3572,8 +3572,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC ScMarkData aMarkData; // passende Zellen selektieren - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aRange = *aRanges.GetObject(i); @@ -3584,27 +3584,27 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC if (pCell->GetCellType() == CELLTYPE_FORMULA) { ScFormulaCell* pFCell = (ScFormulaCell*)pCell; - BOOL bAdd = FALSE; + sal_Bool bAdd = sal_False; if (pFCell->GetErrCode()) { if ( nResultFlags & sheet::FormulaResult::ERROR ) - bAdd = TRUE; + bAdd = sal_True; } else if (pFCell->IsValue()) { if ( nResultFlags & sheet::FormulaResult::VALUE ) - bAdd = TRUE; + bAdd = sal_True; } else // String { if ( nResultFlags & sheet::FormulaResult::STRING ) - bAdd = TRUE; + bAdd = sal_True; } if (bAdd) aMarkData.SetMultiMarkArea( ScRange( aIter.GetCol(), aIter.GetRow(), aIter.GetTab() ), - TRUE ); + sal_True ); } pCell = aIter.GetNext(); @@ -3613,7 +3613,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC ScRangeList aNewRanges; if (aMarkData.IsMultiMarked()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3622,12 +3622,12 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC } uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( - const table::CellAddress& aCompare, BOOL bColumnDiff) + const table::CellAddress& aCompare, sal_Bool bColumnDiff) { if (pDocShell) { - ULONG nRangeCount = aRanges.Count(); - ULONG i; + sal_uLong nRangeCount = aRanges.Count(); + sal_uLong i; ScDocument* pDoc = pDocShell->GetDocument(); ScMarkData aMarkData; @@ -3699,7 +3699,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( if ( !ScBaseCell::CellEqual( pCell, pOtherCell ) ) aMarkData.SetMultiMarkArea( aOneRange ); else - aMarkData.SetMultiMarkArea( aOneRange, FALSE ); // deselect + aMarkData.SetMultiMarkArea( aOneRange, sal_False ); // deselect pCell = aIter.GetNext(); } @@ -3707,7 +3707,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl( ScRangeList aNewRanges; if (aMarkData.IsMultiMarked()) - aMarkData.FillRangeListWithMarks( &aNewRanges, FALSE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_False ); return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein } @@ -3718,14 +3718,14 @@ uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnD const table::CellAddress& aCompare ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - return QueryDifferences_Impl( aCompare, TRUE ); + return QueryDifferences_Impl( aCompare, sal_True ); } uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryRowDifferences( const table::CellAddress& aCompare ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - return QueryDifferences_Impl( aCompare, FALSE ); + return QueryDifferences_Impl( aCompare, sal_False ); } uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersection( @@ -3736,8 +3736,8 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryIntersec (SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet ); ScRangeList aNew; - ULONG nCount = aRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = aRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { ScRange aTemp(*aRanges.GetObject(i)); if ( aTemp.Intersects( aMask ) ) @@ -3763,18 +3763,18 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden ScDocument* pDoc = pDocShell->GetDocument(); ScRangeList aNewRanges(aRanges); - BOOL bFound; + sal_Bool bFound; do { - bFound = FALSE; + bFound = sal_False; // #97205# aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used ScMarkData aMarkData; - aMarkData.MarkFromRangeList( aNewRanges, FALSE ); + aMarkData.MarkFromRangeList( aNewRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked - ULONG nCount = aNewRanges.Count(); - for (ULONG nR=0; nR<nCount; nR++) + sal_uLong nCount = aNewRanges.Count(); + for (sal_uLong nR=0; nR<nCount; nR++) { ScRange aRange(*aNewRanges.GetObject(nR)); ScCellIterator aIter( pDoc, aRange ); @@ -3790,15 +3790,15 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden while ( aRefIter.GetNextRef( aRefRange) ) { if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aRefRange ) ) - bFound = TRUE; - aMarkData.SetMultiMarkArea( aRefRange, TRUE ); + bFound = sal_True; + aMarkData.SetMultiMarkArea( aRefRange, sal_True ); } } pCell = aIter.GetNext(); } } - aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True ); } while ( bRecursive && bFound ); @@ -3817,15 +3817,15 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen ScDocument* pDoc = pDocShell->GetDocument(); ScRangeList aNewRanges(aRanges); - BOOL bFound; + sal_Bool bFound; do { - bFound = FALSE; - ULONG nRangesCount = aNewRanges.Count(); + bFound = sal_False; + sal_uLong nRangesCount = aNewRanges.Count(); // #97205# aMarkData uses aNewRanges, not aRanges, so GetMarkData can't be used ScMarkData aMarkData; - aMarkData.MarkFromRangeList( aNewRanges, FALSE ); + aMarkData.MarkFromRangeList( aNewRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked SCTAB nTab = lcl_FirstTab(aNewRanges); //! alle Tabellen @@ -3836,16 +3836,16 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen { if (pCell->GetCellType() == CELLTYPE_FORMULA) { - BOOL bMark = FALSE; + sal_Bool bMark = sal_False; ScDetectiveRefIter aIter( (ScFormulaCell*) pCell ); ScRange aRefRange; while ( aIter.GetNextRef( aRefRange) ) { - for (ULONG nR=0; nR<nRangesCount; nR++) + for (sal_uLong nR=0; nR<nRangesCount; nR++) { ScRange aRange(*aNewRanges.GetObject(nR)); if (aRange.Intersects(aRefRange)) - bMark = TRUE; // von Teil des Ranges abhaengig + bMark = sal_True; // von Teil des Ranges abhaengig } } if (bMark) @@ -3854,14 +3854,14 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen aCellIter.GetRow(), aCellIter.GetTab() ); if ( bRecursive && !bFound && !aMarkData.IsAllMarked( aCellRange ) ) - bFound = TRUE; - aMarkData.SetMultiMarkArea( aCellRange, TRUE ); + bFound = sal_True; + aMarkData.SetMultiMarkArea( aCellRange, sal_True ); } } pCell = aCellIter.GetNext(); } - aMarkData.FillRangeListWithMarks( &aNewRanges, TRUE ); + aMarkData.FillRangeListWithMarks( &aNewRanges, sal_True ); } while ( bRecursive && bFound ); @@ -3905,12 +3905,12 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangesBase::findAll( SCCOL nCol = 0; SCROW nRow = 0; SCTAB nTab = 0; - BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, + sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, aMark, aDummyUndo, NULL ); if (bFound) { ScRangeList aNewRanges; - aMark.FillRangeListWithMarks( &aNewRanges, TRUE ); + aMark.FillRangeListWithMarks( &aNewRanges, sal_True ); // bei findAll immer CellRanges, egal wieviel gefunden wurde xRet.set(new ScCellRangesObj( pDocShell, aNewRanges )); } @@ -3952,7 +3952,7 @@ uno::Reference<uno::XInterface> ScCellRangesBase::Find_Impl( } String aDummyUndo; - BOOL bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, + sal_Bool bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, aMark, aDummyUndo, NULL ); if (bFound) { @@ -4008,7 +4008,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nReplaced = 0; + sal_Int32 nReplaced = 0; if ( pDocShell && xDesc.is() ) { ScCellSearchObj* pSearch = ScCellSearchObj::getImplementation( xDesc ); @@ -4018,7 +4018,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea if (pSearchItem) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); pSearchItem->SetCommand( SVX_SEARCHCMD_REPLACE_ALL ); // immer nur innerhalb dieses Objekts pSearchItem->SetSelection( !lcl_WholeSheet(aRanges) ); @@ -4026,10 +4026,10 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea ScMarkData aMark(*GetMarkData()); SCTAB nTabCount = pDoc->GetTableCount(); - BOOL bProtected = !pDocShell->IsEditable(); + sal_Bool bProtected = !pDocShell->IsEditable(); for (SCTAB i=0; i<nTabCount; i++) if ( aMark.GetTableSelect(i) && pDoc->IsTabProtected(i) ) - bProtected = TRUE; + bProtected = sal_True; if (bProtected) { //! Exception, oder was? @@ -4054,7 +4054,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea if (bUndo) pUndoMark = new ScMarkData(aMark); - BOOL bFound(FALSE); + sal_Bool bFound(sal_False); if (bUndo) bFound = pDoc->SearchAndReplace( *pSearchItem, nCol, nRow, nTab, aMark, aUndoStr, pUndoDoc ); @@ -4223,7 +4223,7 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddress ScUnoGuard aGuard; ScDocShell* pDocSh = GetDocShell(); const ScRangeList& rRanges = GetRangeList(); - ULONG nCount = rRanges.Count(); + sal_uLong nCount = rRanges.Count(); if ( pDocSh && nCount ) { table::CellRangeAddress aRangeAddress; @@ -4287,8 +4287,8 @@ void SAL_CALL ScCellRangesObj::addRangeAddress( const table::CellRangeAddress& r void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange ) { - USHORT nCount = rNamedEntries.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = rNamedEntries.Count(); + for ( sal_uInt16 n=nCount; n--; ) if ( rNamedEntries[n]->GetRange() == rRange ) rNamedEntries.DeleteAndDestroy( n ); } @@ -4314,7 +4314,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress } } ScMarkData aMarkData; - aMarkData.MarkFromRangeList( aSheetRanges, FALSE ); + aMarkData.MarkFromRangeList( aSheetRanges, sal_False ); ScRange aRange(static_cast<SCCOL>(rRange.StartColumn), static_cast<SCROW>(rRange.StartRow), static_cast<SCTAB>(rRange.Sheet), @@ -4326,7 +4326,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress aMarkData.MarkToMulti(); if (aMarkData.IsAllMarked( aRange ) ) { - aMarkData.SetMultiMarkArea( aRange, FALSE ); + aMarkData.SetMultiMarkArea( aRange, sal_False ); lcl_RemoveNamedEntry(aNamedEntries, aRange); } else @@ -4334,7 +4334,7 @@ void SAL_CALL ScCellRangesObj::removeRangeAddress( const table::CellRangeAddress } SetNewRanges(aNotSheetRanges); ScRangeList aNew; - aMarkData.FillRangeListWithMarks( &aNew, FALSE ); + aMarkData.FillRangeListWithMarks( &aNew, sal_False ); for (sal_uInt32 j = 0; j < aNew.Count(); ++j) { AddRange(*aNew.GetObject(j), sal_False); @@ -4387,8 +4387,8 @@ void SAL_CALL ScCellRangesObj::removeRangeAddresses( const uno::Sequence<table:: void lcl_RemoveNamedEntry( ScNamedEntryArr_Impl& rNamedEntries, const String& rName ) { - USHORT nCount = rNamedEntries.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = rNamedEntries.Count(); + for ( sal_uInt16 n=nCount; n--; ) if ( rNamedEntries[n]->GetName() == rName ) rNamedEntries.DeleteAndDestroy( n ); } @@ -4399,7 +4399,7 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u { ScUnoGuard aGuard; ScDocShell* pDocSh = GetDocShell(); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; //! Type of aElement can be some specific interface instead of XInterface @@ -4414,19 +4414,19 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u String aNamStr(aName); if ( aNamStr.Len() ) { - USHORT nNamedCount = aNamedEntries.Count(); - for (USHORT n=0; n<nNamedCount; n++) + sal_uInt16 nNamedCount = aNamedEntries.Count(); + for (sal_uInt16 n=0; n<nNamedCount; n++) if ( aNamedEntries[n]->GetName() == aNamStr ) throw container::ElementExistException(); } ScRangeList aNew(GetRangeList()); const ScRangeList& rAddRanges = pRangesImp->GetRangeList(); - ULONG nAddCount = rAddRanges.Count(); - for (ULONG i=0; i<nAddCount; i++) + sal_uLong nAddCount = rAddRanges.Count(); + for (sal_uLong i=0; i<nAddCount; i++) aNew.Join( *rAddRanges.GetObject(i) ); SetNewRanges(aNew); - bDone = TRUE; + bDone = sal_True; if ( aName.getLength() && nAddCount == 1 ) { @@ -4447,53 +4447,53 @@ void SAL_CALL ScCellRangesObj::insertByName( const rtl::OUString& aName, const u } } -BOOL lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh, - const String& rName, ULONG& rIndex ) +sal_Bool lcl_FindRangeByName( const ScRangeList& rRanges, ScDocShell* pDocSh, + const String& rName, sal_uLong& rIndex ) { if (pDocSh) { String aRangeStr; ScDocument* pDoc = pDocSh->GetDocument(); - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { rRanges.GetObject(i)->Format( aRangeStr, SCA_VALID | SCA_TAB_3D, pDoc ); if ( aRangeStr == rName ) { rIndex = i; - return TRUE; + return sal_True; } } } - return FALSE; // nicht gefunden + return sal_False; // nicht gefunden } -BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, +sal_Bool lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, const ScRangeList& rRanges, ScDocShell* pDocSh, const String& rName, ScRange& rFound ) { // exact range in list? - ULONG nIndex = 0; + sal_uLong nIndex = 0; if ( lcl_FindRangeByName( rRanges, pDocSh, rName, nIndex ) ) { rFound = *rRanges.GetObject(nIndex); - return TRUE; + return sal_True; } // range contained in selection? (sheet must be specified) ScRange aCellRange; - USHORT nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() ); + sal_uInt16 nParse = aCellRange.ParseAny( rName, pDocSh->GetDocument() ); if ( ( nParse & ( SCA_VALID | SCA_TAB_3D ) ) == ( SCA_VALID | SCA_TAB_3D ) ) { ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked if ( aMarkData.IsAllMarked( aCellRange ) ) { rFound = aCellRange; - return TRUE; + return sal_True; } } @@ -4501,24 +4501,24 @@ BOOL lcl_FindRangeOrEntry( const ScNamedEntryArr_Impl& rNamedEntries, if ( rNamedEntries.Count() ) { - for ( USHORT n=0; n<rNamedEntries.Count(); n++ ) + for ( sal_uInt16 n=0; n<rNamedEntries.Count(); n++ ) if ( rNamedEntries[n]->GetName() == rName ) { // test if named entry is contained in rRanges const ScRange& rComp = rNamedEntries[n]->GetRange(); ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); aMarkData.MarkToMulti(); // needed for IsAllMarked if ( aMarkData.IsAllMarked( rComp ) ) { rFound = rComp; - return TRUE; + return sal_True; } } } - return FALSE; // not found + return sal_False; // not found } void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName ) @@ -4526,56 +4526,56 @@ void SAL_CALL ScCellRangesObj::removeByName( const rtl::OUString& aName ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; String aNameStr(aName); ScDocShell* pDocSh = GetDocShell(); const ScRangeList& rRanges = GetRangeList(); - ULONG nIndex = 0; + sal_uLong nIndex = 0; if ( lcl_FindRangeByName( rRanges, pDocSh, aNameStr, nIndex ) ) { // einzelnen Range weglassen ScRangeList aNew; - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) if (i != nIndex) aNew.Append( *rRanges.GetObject(i) ); SetNewRanges(aNew); - bDone = TRUE; + bDone = sal_True; } else if (pDocSh) { // deselect any ranges (parsed or named entry) ScRangeList aDiff; - BOOL bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0; + sal_Bool bValid = ( aDiff.Parse( aNameStr, pDocSh->GetDocument() ) & SCA_VALID ) != 0; if ( !bValid && aNamedEntries.Count() ) { - USHORT nCount = aNamedEntries.Count(); - for (USHORT n=0; n<nCount && !bValid; n++) + sal_uInt16 nCount = aNamedEntries.Count(); + for (sal_uInt16 n=0; n<nCount && !bValid; n++) if (aNamedEntries[n]->GetName() == aNameStr) { aDiff.RemoveAll(); aDiff.Append( aNamedEntries[n]->GetRange() ); - bValid = TRUE; + bValid = sal_True; } } if ( bValid ) { ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); - ULONG nDiffCount = aDiff.Count(); - for (ULONG i=0; i<nDiffCount; i++) + sal_uLong nDiffCount = aDiff.Count(); + for (sal_uLong i=0; i<nDiffCount; i++) { ScRange* pDiffRange = aDiff.GetObject(i); if (aMarkData.GetTableSelect( pDiffRange->aStart.Tab() )) - aMarkData.SetMultiMarkArea( *pDiffRange, FALSE ); + aMarkData.SetMultiMarkArea( *pDiffRange, sal_False ); } ScRangeList aNew; - aMarkData.FillRangeListWithMarks( &aNew, FALSE ); + aMarkData.FillRangeListWithMarks( &aNew, sal_False ); SetNewRanges(aNew); - bDone = TRUE; //! error if range was not selected before? + bDone = sal_True; //! error if range was not selected before? } } @@ -4625,17 +4625,17 @@ uno::Any SAL_CALL ScCellRangesObj::getByName( const rtl::OUString& aName ) return aRet; } -BOOL lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, +sal_Bool lcl_FindEntryName( const ScNamedEntryArr_Impl& rNamedEntries, const ScRange& rRange, String& rName ) { - USHORT nCount = rNamedEntries.Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = rNamedEntries.Count(); + for (sal_uInt16 i=0; i<nCount; i++) if (rNamedEntries[i]->GetRange() == rRange) { rName = rNamedEntries[i]->GetName(); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames() @@ -4649,11 +4649,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellRangesObj::getElementNames() { String aRangeStr; ScDocument* pDoc = pDocSh->GetDocument(); - ULONG nCount = rRanges.Count(); + sal_uLong nCount = rRanges.Count(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (ULONG i=0; i<nCount; i++) + for (sal_uLong i=0; i<nCount; i++) { // use given name if for exactly this range, otherwise just format ScRange aRange = *rRanges.GetObject(i); @@ -4961,9 +4961,9 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName( SCTAB nTab = aRange.aStart.Tab(); ScRange aCellRange; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; String aString(aName); - USHORT nParse = aCellRange.ParseAny( aString, pDoc, rDetails ); + sal_uInt16 nParse = aCellRange.ParseAny( aString, pDoc, rDetails ); if ( nParse & SCA_VALID ) { if ( !(nParse & SCA_TAB_3D) ) // keine Tabelle angegeben -> auf dieser Tabelle @@ -4971,20 +4971,20 @@ uno::Reference<table::XCellRange> ScCellRangeObj::getCellRangeByName( aCellRange.aStart.SetTab(nTab); aCellRange.aEnd.SetTab(nTab); } - bFound = TRUE; + bFound = sal_True; } else { ScRangeUtil aRangeUtil; if ( aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_NAMES ) || aRangeUtil.MakeRangeFromName( aString, pDoc, nTab, aCellRange, RUTL_DBASE ) ) - bFound = TRUE; + bFound = sal_True; } if (bFound) // valid only if within this object's range { if (!aRange.In(aCellRange)) - bFound = FALSE; + bFound = sal_False; } if (bFound) @@ -5099,15 +5099,15 @@ void ScCellRangeObj::SetArrayFormula_Impl( const rtl::OUString& rFormula, throw uno::RuntimeException(); } - aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, TRUE, TRUE, rFormulaNmsp, eGrammar ); + aFunc.EnterMatrix( aRange, NULL, NULL, rFormula, sal_True, sal_True, rFormulaNmsp, eGrammar ); } else { // empty string -> erase array formula ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( aRange.aStart.Tab(), TRUE ); - aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE ); + aMark.SelectTable( aRange.aStart.Tab(), sal_True ); + aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True ); } } } @@ -5184,15 +5184,15 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula // Actually GRAM_PODF_A1 is a don't-care here because of the token // array being set, it fits with other API compatibility grammars // though. - aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, TRUE, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + aFunc.EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_STRING, sal_True, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } else { // empty sequence -> erase array formula ScMarkData aMark; aMark.SetMarkArea( aRange ); - aMark.SelectTable( aRange.aStart.Tab(), TRUE ); - aFunc.DeleteContents( aMark, IDF_CONTENTS, TRUE, TRUE ); + aMark.SelectTable( aRange.aStart.Tab(), sal_True ); + aFunc.DeleteContents( aMark, IDF_CONTENTS, sal_True, sal_True ); } } } @@ -5215,7 +5215,7 @@ uno::Sequence< uno::Sequence<uno::Any> > SAL_CALL ScCellRangeObj::getDataArray() { uno::Any aAny; // bAllowNV = TRUE: errors as void - if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, TRUE ) ) + if ( ScRangeToSequence::FillMixedArray( aAny, pDocSh->GetDocument(), aRange, sal_True ) ) { uno::Sequence< uno::Sequence<uno::Any> > aSeq; if ( aAny >>= aSeq ) @@ -5233,7 +5233,7 @@ void SAL_CALL ScCellRangeObj::setDataArray( { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -5277,7 +5277,7 @@ uno::Sequence< uno::Sequence<rtl::OUString> > SAL_CALL ScCellRangeObj::getFormul rtl::OUString* pColAry = aColSeq.getArray(); for (SCCOL nColIndex = 0; nColIndex < nColCount; nColIndex++) pColAry[nColIndex] = lcl_GetInputString( pDocSh->GetDocument(), - ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), TRUE ); + ScAddress( nStartCol+nColIndex, nStartRow+nRowIndex, nTab ), sal_True ); pRowAry[nRowIndex] = aColSeq; } @@ -5295,7 +5295,7 @@ void SAL_CALL ScCellRangeObj::setFormulaArray( { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -5321,20 +5321,20 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress& ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { - BOOL bError = FALSE; + sal_Bool bError = sal_False; ScTabOpParam aParam; aParam.aRefFormulaCell = ScRefAddress( (SCCOL)aFormulaRange.StartColumn, (SCROW)aFormulaRange.StartRow, aFormulaRange.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); aParam.aRefFormulaEnd = ScRefAddress( (SCCOL)aFormulaRange.EndColumn, (SCROW)aFormulaRange.EndRow, aFormulaRange.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); aParam.aRefRowCell = ScRefAddress( (SCCOL)aRowCell.Column, (SCROW)aRowCell.Row, aRowCell.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); aParam.aRefColCell = ScRefAddress( (SCCOL)aColumnCell.Column, (SCROW)aColumnCell.Row, aColumnCell.Sheet, - FALSE, FALSE, FALSE ); + sal_False, sal_False, sal_False ); switch (nMode) { case sheet::TableOperationMode_COLUMN: @@ -5347,13 +5347,13 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress& aParam.nMode = 2; break; default: - bError = TRUE; + bError = sal_True; } if (!bError) { ScDocFunc aFunc(*pDocSh); - aFunc.TabOp( aRange, NULL, aParam, TRUE, TRUE ); + aFunc.TabOp( aRange, NULL, aParam, sal_True, sal_True ); } } } @@ -5368,9 +5368,9 @@ void SAL_CALL ScCellRangeObj::merge( sal_Bool bMerge ) throw(uno::RuntimeExcepti { ScDocFunc aFunc(*pDocSh); if ( bMerge ) - aFunc.MergeCells( aRange, FALSE, TRUE, TRUE ); + aFunc.MergeCells( aRange, sal_False, sal_True, sal_True ); else - aFunc.UnmergeCells( aRange, TRUE, TRUE ); + aFunc.UnmergeCells( aRange, sal_True, sal_True ); //! Fehler abfangen? } @@ -5393,7 +5393,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bError = FALSE; + sal_Bool bError = sal_False; FillDir eDir = FILL_TO_BOTTOM; switch (nFillDirection) @@ -5411,7 +5411,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eDir = FILL_TO_LEFT; break; default: - bError = TRUE; + bError = sal_True; } FillCmd eCmd = FILL_SIMPLE; @@ -5433,7 +5433,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eCmd = FILL_AUTO; break; default: - bError = TRUE; + bError = sal_True; } FillDateCmd eDateCmd = FILL_DAY; @@ -5452,14 +5452,14 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection, eDateCmd = FILL_YEAR; break; default: - bError = TRUE; + bError = sal_True; } if (!bError) { ScDocFunc aFunc(*pDocSh); aFunc.FillSeries( aRange, NULL, eDir, eCmd, eDateCmd, - MAXDOUBLE, fStep, fEndValue, TRUE, TRUE ); + MAXDOUBLE, fStep, fEndValue, sal_True, sal_True ); } } } @@ -5474,7 +5474,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, ScRange aSourceRange(aRange); SCsCOLROW nCount = 0; // "Dest-Count" FillDir eDir = FILL_TO_BOTTOM; - BOOL bError = FALSE; + sal_Bool bError = sal_False; switch (nFillDirection) { case sheet::FillDirection_TO_BOTTOM: @@ -5498,15 +5498,15 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection, eDir = FILL_TO_LEFT; break; default: - bError = TRUE; + bError = sal_True; } if (nCount < 0 || nCount > MAXROW) // overflow - bError = TRUE; + bError = sal_True; if (!bError) { ScDocFunc aFunc(*pDocSh); - aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, TRUE, TRUE ); + aFunc.FillAuto( aSourceRange, NULL, eDir, nCount, sal_True, sal_True ); } } } @@ -5522,8 +5522,8 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName ) if ( pDocSh && pAutoFormat ) { String aNameString(aName); - USHORT nCount = pAutoFormat->GetCount(); - USHORT nIndex; + sal_uInt16 nCount = pAutoFormat->GetCount(); + sal_uInt16 nIndex; String aCompare; for (nIndex=0; nIndex<nCount; nIndex++) { @@ -5534,7 +5534,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const rtl::OUString& aName ) if (nIndex<nCount) { ScDocFunc aFunc(*pDocSh); - aFunc.AutoFormat( aRange, NULL, nIndex, TRUE, TRUE ); + aFunc.AutoFormat( aRange, NULL, nIndex, sal_True, sal_True ); } else throw lang::IllegalArgumentException(); @@ -5563,7 +5563,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScCellRangeObj::createSortDescripto SCCOLROW nFieldStart = aParam.bByRow ? static_cast<SCCOLROW>(aDBRange.aStart.Col()) : static_cast<SCCOLROW>(aDBRange.aStart.Row()); - for (USHORT i=0; i<MAXSORT; i++) + for (sal_uInt16 i=0; i<MAXSORT; i++) if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart ) aParam.nField[i] -= nFieldStart; } @@ -5581,7 +5581,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { - USHORT i; + sal_uInt16 i; ScSortParam aParam; ScDBData* pData = pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen if (pData) @@ -5615,7 +5615,7 @@ void SAL_CALL ScCellRangeObj::sort( const uno::Sequence<beans::PropertyValue>& a pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein - aFunc.Sort( nTab, aParam, TRUE, TRUE, TRUE ); + aFunc.Sort( nTab, aParam, sal_True, sal_True, sal_True ); } } @@ -5718,7 +5718,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe //! if created by createFilterDescriptorByObject ??? ScDBDocFunc aFunc(*pDocSh); - aFunc.Query( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein + aFunc.Query( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein } } @@ -5743,10 +5743,10 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil //! Test, ob xObject im selben Dokument ist ScFilterDescriptor* pNew = new ScFilterDescriptor(pDocSh); //! stattdessen vom Objekt? - //XSheetFilterDescriptorRef xNew = xObject->createFilterDescriptor(TRUE); + //XSheetFilterDescriptorRef xNew = xObject->createFilterDescriptor(sal_True); ScQueryParam aParam = pNew->GetParam(); - aParam.bHasHeader = TRUE; + aParam.bHasHeader = sal_True; table::CellRangeAddress aDataAddress(xAddr->getRangeAddress()); aParam.nCol1 = (SCCOL)aDataAddress.StartColumn; @@ -5756,7 +5756,7 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil aParam.nTab = aDataAddress.Sheet; ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bOk = pDoc->CreateQueryParam( + sal_Bool bOk = pDoc->CreateQueryParam( aRange.aStart.Col(), aRange.aStart.Row(), aRange.aEnd.Col(), aRange.aEnd.Row(), aRange.aStart.Tab(), aParam ); @@ -5808,7 +5808,7 @@ uno::Reference<sheet::XSubTotalDescriptor> SAL_CALL ScCellRangeObj::createSubTot ScRange aDBRange; pData->GetArea(aDBRange); SCCOL nFieldStart = aDBRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( aParam.bGroupActive[i] ) { @@ -5844,7 +5844,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals( // im SubTotalDescriptor sind die Fields innerhalb des Bereichs gezaehlt SCCOL nFieldStart = aRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( aParam.bGroupActive[i] ) { @@ -5865,7 +5865,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals( pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); - aFunc.DoSubTotals( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein + aFunc.DoSubTotals( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein } } @@ -5881,7 +5881,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException) if (pData) pData->GetSubTotalParam(aParam); // auch bei Remove die Feld-Eintraege behalten - aParam.bRemoveOnly = TRUE; + aParam.bRemoveOnly = sal_True; SCTAB nTab = aRange.aStart.Tab(); aParam.nCol1 = aRange.aStart.Col(); @@ -5892,7 +5892,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException) pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); - aFunc.DoSubTotals( nTab, aParam, NULL, TRUE, TRUE ); // Bereich muss angelegt sein + aFunc.DoSubTotals( nTab, aParam, NULL, sal_True, sal_True ); // Bereich muss angelegt sein } } @@ -5936,7 +5936,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein - aFunc.DoImport( nTab, aParam, NULL, TRUE ); //! Api-Flag as parameter + aFunc.DoImport( nTab, aParam, NULL, sal_True ); //! Api-Flag as parameter } } @@ -6181,7 +6181,7 @@ uno::Sequence<sal_Int8> SAL_CALL ScCellObj::getImplementationId() throw(uno::Run // Hilfsfunktionen -String ScCellObj::GetInputString_Impl(BOOL bEnglish) const // fuer getFormula / FormulaLocal +String ScCellObj::GetInputString_Impl(sal_Bool bEnglish) const // fuer getFormula / FormulaLocal { if (GetDocShell()) return lcl_GetInputString( GetDocShell()->GetDocument(), aCellPos, bEnglish ); @@ -6214,7 +6214,7 @@ String ScCellObj::GetOutputString_Impl(ScDocument* pDoc, const ScAddress& aCellP { // wie in GetString am Dokument (column) Color* pColor; - ULONG nNumFmt = pDoc->GetNumberFormat( aCellPos ); + sal_uLong nNumFmt = pDoc->GetNumberFormat( aCellPos ); ScCellFormat::GetString( pCell, nNumFmt, aVal, &pColor, *pDoc->GetFormatTable() ); } } @@ -6231,14 +6231,14 @@ String ScCellObj::GetOutputString_Impl() const return aVal; } -void ScCellObj::SetString_Impl(const String& rString, BOOL bInterpret, BOOL bEnglish) +void ScCellObj::SetString_Impl(const String& rString, sal_Bool bInterpret, sal_Bool bEnglish) { ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { ScDocFunc aFunc(*pDocSh); // GRAM_PODF_A1 for API compatibility. - (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, TRUE, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); + (void)aFunc.SetCellText( aCellPos, rString, bInterpret, bEnglish, sal_True, EMPTY_STRING, formula::FormulaGrammar::GRAM_PODF_A1 ); } } @@ -6257,7 +6257,7 @@ void ScCellObj::SetValue_Impl(double fValue) if ( pDocSh ) { ScDocFunc aFunc(*pDocSh); - (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), TRUE ); + (void)aFunc.PutCell( aCellPos, new ScValueCell(fValue), sal_True ); } } @@ -6292,7 +6292,7 @@ void ScCellObj::SetFormulaWithGrammar( const ::rtl::OUString& rFormula, if ( pDocSh ) { ScDocFunc aFunc(*pDocSh); - aFunc.SetCellText( aCellPos, rFormula, TRUE, TRUE, TRUE, rFormulaNmsp, eGrammar); + aFunc.SetCellText( aCellPos, rFormula, sal_True, sal_True, sal_True, rFormulaNmsp, eGrammar); } } @@ -6311,7 +6311,7 @@ void ScCellObj::InputEnglishString( const ::rtl::OUString& rText ) sal_uInt32 nOldFormat = pDoc->GetNumberFormat( aCellPos ); if ( pFormatter->GetType( nOldFormat ) == NUMBERFORMAT_TEXT ) { - SetString_Impl(aString, FALSE, FALSE); // text cell + SetString_Impl(aString, sal_False, sal_False); // text cell } else { @@ -6330,15 +6330,15 @@ void ScCellObj::InputEnglishString( const ::rtl::OUString& rText ) ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); // ATTR_LANGUAGE_FORMAT remains unchanged - aFunc.ApplyAttributes( *GetMarkData(), aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( *GetMarkData(), aPattern, sal_True, sal_True ); } } // put the cell into the document // (after applying the format, so possible formula recalculation already uses the new format) - (void)aFunc.PutCell( aCellPos, pNewCell, TRUE ); + (void)aFunc.PutCell( aCellPos, pNewCell, sal_True ); } else - SetString_Impl(aString, FALSE, FALSE); // no cell from InterpretEnglishString, probably empty string + SetString_Impl(aString, sal_False, sal_False); // no cell from InterpretEnglishString, probably empty string } } } @@ -6385,7 +6385,7 @@ void SAL_CALL ScCellObj::setString( const rtl::OUString& aText ) throw(uno::Runt { ScUnoGuard aGuard; String aString(aText); - SetString_Impl(aString, FALSE, FALSE); // immer Text + SetString_Impl(aString, sal_False, sal_False); // immer Text // don't create pUnoText here if not there if (pUnoText) @@ -6455,7 +6455,7 @@ void SAL_CALL ScCellObj::insertTextContent( const uno::Reference<text::XTextRang aSelection.nEndPos = aSelection.nStartPos + 1; pCellField->InitDoc( pDocSh, aCellPos, aSelection ); - // #91431# for bAbsorb=FALSE, the new selection must be behind the inserted content + // #91431# for bAbsorb=sal_False, the new selection must be behind the inserted content // (the xml filter relies on this) if (!bAbsorb) aSelection.nStartPos = aSelection.nEndPos; @@ -6527,15 +6527,15 @@ sal_Bool SAL_CALL ScCellObj::hasElements() throw(uno::RuntimeException) rtl::OUString SAL_CALL ScCellObj::getFormula() throw(uno::RuntimeException) { ScUnoGuard aGuard; - // TRUE = englisch - return GetInputString_Impl(TRUE); + // sal_True = englisch + return GetInputString_Impl(sal_True); } void SAL_CALL ScCellObj::setFormula( const rtl::OUString& aFormula ) throw(uno::RuntimeException) { ScUnoGuard aGuard; String aString(aFormula); - SetString_Impl(aString, TRUE, TRUE); // englisch interpretieren + SetString_Impl(aString, sal_True, sal_True); // englisch interpretieren } double SAL_CALL ScCellObj::getValue() throw(uno::RuntimeException) @@ -6590,7 +6590,7 @@ table::CellContentType ScCellObj::GetResultType_Impl() ScBaseCell* pCell = pDocSh->GetDocument()->GetCell(aCellPos); if ( pCell && pCell->GetCellType() == CELLTYPE_FORMULA ) { - BOOL bValue = ((ScFormulaCell*)pCell)->IsValue(); + sal_Bool bValue = ((ScFormulaCell*)pCell)->IsValue(); return bValue ? table::CellContentType_VALUE : table::CellContentType_TEXT; } } @@ -6600,7 +6600,7 @@ table::CellContentType ScCellObj::GetResultType_Impl() sal_Int32 SAL_CALL ScCellObj::getError() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nError = 0; + sal_uInt16 nError = 0; ScDocShell* pDocSh = GetDocShell(); if (pDocSh) { @@ -6650,7 +6650,7 @@ void SAL_CALL ScCellObj::setTokens( const uno::Sequence<sheet::FormulaToken>& rT ScDocFunc aFunc( *pDocSh ); ScBaseCell* pNewCell = new ScFormulaCell( pDoc, aCellPos, &aTokenArray ); - (void)aFunc.PutCell( aCellPos, pNewCell, TRUE ); + (void)aFunc.PutCell( aCellPos, pNewCell, sal_True ); } } @@ -6721,7 +6721,7 @@ void ScCellObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, c rtl::OUString aStrVal; aValue >>= aStrVal; String aString(aStrVal); - SetString_Impl(aString, TRUE, FALSE); // lokal interpretieren + SetString_Impl(aString, sal_True, sal_False); // lokal interpretieren } else if ( pEntry->nWID == SC_WID_UNO_FORMRT ) { @@ -6741,8 +6741,8 @@ void ScCellObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntry, { if ( pEntry->nWID == SC_WID_UNO_FORMLOC ) { - // FALSE = lokal - rAny <<= rtl::OUString( GetInputString_Impl(FALSE) ); + // sal_False = lokal + rAny <<= rtl::OUString( GetInputString_Impl(sal_False) ); } else if ( pEntry->nWID == SC_WID_UNO_FORMRT ) { @@ -6865,7 +6865,7 @@ void SAL_CALL ScCellObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeExc sal_Int16 SAL_CALL ScCellObj::resetActionLocks() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nRet(nActionLockCount); + sal_uInt16 nRet(nActionLockCount); if (pUnoText) { ScSharedCellEditSource* pEditSource = @@ -7138,7 +7138,7 @@ uno::Sequence<sheet::TablePageBreakData> SAL_CALL ScTableSheetObj::getColumnPage sheet::TablePageBreakData aData; uno::Sequence<sheet::TablePageBreakData> aSeq(nCount); sheet::TablePageBreakData* pAry = aSeq.getArray(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; for (nCol=0; nCol<=MAXCOL; nCol++) { ScBreakType nBreak = pDoc->HasColBreak(nCol, nTab); @@ -7188,14 +7188,14 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc //! docfunc Funktion, auch fuer ScViewFunc::RemoveManualBreaks ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo (pDoc->IsUndoEnabled()); + sal_Bool bUndo (pDoc->IsUndoEnabled()); SCTAB nTab = GetTab_Impl(); if (bUndo) { ScDocument* pUndoDoc = new ScDocument( SCDOCMODE_UNDO ); - pUndoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE ); - pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pUndoDoc ); + pUndoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True ); + pDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, sal_False, pUndoDoc ); pDocSh->GetUndoManager()->AddUndoAction( new ScUndoRemoveBreaks( pDocSh, nTab, pUndoDoc ) ); } @@ -7203,7 +7203,7 @@ void SAL_CALL ScTableSheetObj::removeAllManualPageBreaks() throw(uno::RuntimeExc pDoc->RemoveManualBreaks(nTab); pDoc->UpdatePageBreaks(nTab); - //? UpdatePageBreakData( TRUE ); + //? UpdatePageBreakData( sal_True ); pDocSh->SetDocumentModified(); pDocSh->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID ); } @@ -7230,7 +7230,7 @@ void SAL_CALL ScTableSheetObj::setName( const rtl::OUString& aNewName ) { String aString(aNewName); ScDocFunc aFunc( *pDocSh ); - aFunc.RenameTable( GetTab_Impl(), aString, TRUE, TRUE ); + aFunc.RenameTable( GetTab_Impl(), aString, sal_True, sal_True ); } } @@ -7267,18 +7267,18 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; InsCellCmd eCmd = INS_NONE; switch (nMode) { - case sheet::CellInsertMode_NONE: bDo = FALSE; break; + case sheet::CellInsertMode_NONE: bDo = sal_False; break; case sheet::CellInsertMode_DOWN: eCmd = INS_CELLSDOWN; break; case sheet::CellInsertMode_RIGHT: eCmd = INS_CELLSRIGHT; break; case sheet::CellInsertMode_ROWS: eCmd = INS_INSROWS; break; case sheet::CellInsertMode_COLUMNS: eCmd = INS_INSCOLS; break; default: DBG_ERROR("insertCells: falscher Mode"); - bDo = FALSE; + bDo = sal_False; } if (bDo) @@ -7287,7 +7287,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang ScRange aScRange; ScUnoConversion::FillScRange( aScRange, rRangeAddress ); ScDocFunc aFunc(*pDocSh); - aFunc.InsertCells( aScRange, NULL, eCmd, TRUE, TRUE ); + aFunc.InsertCells( aScRange, NULL, eCmd, sal_True, sal_True ); } } } @@ -7299,18 +7299,18 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; DelCellCmd eCmd = DEL_NONE; switch (nMode) { - case sheet::CellDeleteMode_NONE: bDo = FALSE; break; + case sheet::CellDeleteMode_NONE: bDo = sal_False; break; case sheet::CellDeleteMode_UP: eCmd = DEL_CELLSUP; break; case sheet::CellDeleteMode_LEFT: eCmd = DEL_CELLSLEFT; break; case sheet::CellDeleteMode_ROWS: eCmd = DEL_DELROWS; break; case sheet::CellDeleteMode_COLUMNS: eCmd = DEL_DELCOLS; break; default: DBG_ERROR("deleteCells: falscher Mode"); - bDo = FALSE; + bDo = sal_False; } if (bDo) @@ -7319,7 +7319,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang ScRange aScRange; ScUnoConversion::FillScRange( aScRange, rRangeAddress ); ScDocFunc aFunc(*pDocSh); - aFunc.DeleteCells( aScRange, NULL, eCmd, TRUE, TRUE ); + aFunc.DeleteCells( aScRange, NULL, eCmd, sal_True, sal_True ); } } } @@ -7337,7 +7337,7 @@ void SAL_CALL ScTableSheetObj::moveRange( const table::CellAddress& aDestination ScUnoConversion::FillScRange( aSourceRange, aSource ); ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet ); ScDocFunc aFunc(*pDocSh); - aFunc.MoveBlock( aSourceRange, aDestPos, TRUE, TRUE, TRUE, TRUE ); + aFunc.MoveBlock( aSourceRange, aDestPos, sal_True, sal_True, sal_True, sal_True ); } } @@ -7354,7 +7354,7 @@ void SAL_CALL ScTableSheetObj::copyRange( const table::CellAddress& aDestination ScUnoConversion::FillScRange( aSourceRange, aSource ); ScAddress aDestPos( (SCCOL)aDestination.Column, (SCROW)aDestination.Row, aDestination.Sheet ); ScDocFunc aFunc(*pDocSh); - aFunc.MoveBlock( aSourceRange, aDestPos, FALSE, TRUE, TRUE, TRUE ); + aFunc.MoveBlock( aSourceRange, aDestPos, sal_False, sal_True, sal_True, sal_True ); } } @@ -7368,7 +7368,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges ) if ( pDocSh ) { ScDocument* pDoc = pDocSh->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); SCTAB nTab = GetTab_Impl(); ScPrintRangeSaver* pNewRanges = pDoc->CreatePrintRangeSaver(); @@ -7399,12 +7399,12 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScTableSheetObj::getPrintAreas() { ScDocument* pDoc = pDocSh->GetDocument(); SCTAB nTab = GetTab_Impl(); - USHORT nCount = pDoc->GetPrintRangeCount( nTab ); + sal_uInt16 nCount = pDoc->GetPrintRangeCount( nTab ); table::CellRangeAddress aRangeAddress; uno::Sequence<table::CellRangeAddress> aSeq(nCount); table::CellRangeAddress* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { const ScRange* pRange = pDoc->GetPrintRange( nTab, i ); DBG_ASSERT(pRange,"wo ist der Druckbereich"); @@ -7433,13 +7433,13 @@ void SAL_CALL ScTableSheetObj::setPrintAreas( ScPrintRangeSaver* pOldRanges = pDoc->CreatePrintRangeSaver(); - USHORT nCount = (USHORT) aPrintAreas.getLength(); + sal_uInt16 nCount = (sal_uInt16) aPrintAreas.getLength(); pDoc->ClearPrintRanges( nTab ); if (nCount) { ScRange aPrintRange; const table::CellRangeAddress* pAry = aPrintAreas.getConstArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScUnoConversion::FillScRange( aPrintRange, pAry[i] ); pDoc->AddPrintRange( nTab, aPrintRange ); @@ -7460,7 +7460,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce SCTAB nTab = GetTab_Impl(); return ( pDoc->GetRepeatColRange(nTab) != NULL ); } - return FALSE; + return sal_False; } void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns ) @@ -7541,7 +7541,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti SCTAB nTab = GetTab_Impl(); return ( pDoc->GetRepeatRowRange(nTab) != NULL ); } - return FALSE; + return sal_False; } void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows ) @@ -7621,7 +7621,7 @@ sheet::SheetLinkMode SAL_CALL ScTableSheetObj::getLinkMode() throw(uno::RuntimeE ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BYTE nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() ); + sal_uInt8 nMode = pDocSh->GetDocument()->GetLinkMode( GetTab_Impl() ); if ( nMode == SC_LINK_NORMAL ) eRet = sheet::SheetLinkMode_NORMAL; else if ( nMode == SC_LINK_VALUE ) @@ -7710,19 +7710,19 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr aFileString = ScGlobal::GetAbsDocName( aFileString, pDocSh ); if ( !aFilterString.Len() ) - ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, TRUE, FALSE ); + ScDocumentLoader::GetFilterName( aFileString, aFilterString, aOptString, sal_True, sal_False ); // remove application prefix from filter name here, so the filter options // aren't reset when the filter name is changed in ScTableLink::DataChanged ScDocumentLoader::RemoveAppPrefix( aFilterString ); - 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 ) nLinkMode = SC_LINK_VALUE; - ULONG nRefresh = 0; + sal_uLong nRefresh = 0; pDoc->SetLink( nTab, nLinkMode, aFileString, aFilterString, aOptString, aSheetString, nRefresh ); pDocSh->UpdateLinks(); // ggf. Link eintragen oder loeschen @@ -7738,8 +7738,8 @@ void SAL_CALL ScTableSheetObj::link( const rtl::OUString& aUrl, const rtl::OUStr //! Update nur fuer die betroffene Tabelle??? sfx2::LinkManager* pLinkManager = pDoc->GetLinkManager(); - USHORT nCount = pLinkManager->GetLinks().Count(); - for ( USHORT i=0; i<nCount; i++ ) + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for ( sal_uInt16 i=0; i<nCount; i++ ) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) @@ -7772,7 +7772,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hideDependents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveDelSucc( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPosition ) @@ -7788,7 +7788,7 @@ sal_Bool SAL_CALL ScTableSheetObj::hidePrecedents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveDelPred( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPosition ) @@ -7804,7 +7804,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showDependents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveAddSucc( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPosition ) @@ -7820,7 +7820,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showPrecedents( const table::CellAddress& aPo ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveAddPred( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPosition ) @@ -7836,7 +7836,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showErrors( const table::CellAddress& aPositi ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveAddError( aPos ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException) @@ -7848,7 +7848,7 @@ sal_Bool SAL_CALL ScTableSheetObj::showInvalid() throw(uno::RuntimeException) ScDocFunc aFunc(*pDocSh); return aFunc.DetectiveMarkInvalid( GetTab_Impl() ); } - return FALSE; + return sal_False; } void SAL_CALL ScTableSheetObj::clearArrows() throw(uno::RuntimeException) @@ -7872,11 +7872,11 @@ void SAL_CALL ScTableSheetObj::group( const table::CellRangeAddress& rGroupRange ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); ScRange aGroupRange; ScUnoConversion::FillScRange( aGroupRange, rGroupRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.MakeOutline( aGroupRange, bColumns, TRUE, TRUE ); + aFunc.MakeOutline( aGroupRange, bColumns, sal_True, sal_True ); } } @@ -7888,11 +7888,11 @@ void SAL_CALL ScTableSheetObj::ungroup( const table::CellRangeAddress& rGroupRan ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); ScRange aGroupRange; ScUnoConversion::FillScRange( aGroupRange, rGroupRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.RemoveOutline( aGroupRange, bColumns, TRUE, TRUE ); + aFunc.RemoveOutline( aGroupRange, bColumns, sal_True, sal_True ); } } @@ -7906,7 +7906,7 @@ void SAL_CALL ScTableSheetObj::autoOutline( const table::CellRangeAddress& rCell ScRange aFormulaRange; ScUnoConversion::FillScRange( aFormulaRange, rCellRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.AutoOutline( aFormulaRange, TRUE, TRUE ); + aFunc.AutoOutline( aFormulaRange, sal_True, sal_True ); } } @@ -7918,7 +7918,7 @@ void SAL_CALL ScTableSheetObj::clearOutline() throw(uno::RuntimeException) { SCTAB nTab = GetTab_Impl(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.RemoveAllOutlines( nTab, TRUE, TRUE ); + aFunc.RemoveAllOutlines( nTab, sal_True, sal_True ); } } @@ -7932,7 +7932,7 @@ void SAL_CALL ScTableSheetObj::hideDetail( const table::CellRangeAddress& rCellR ScRange aMarkRange; ScUnoConversion::FillScRange( aMarkRange, rCellRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.HideMarkedOutlines( aMarkRange, TRUE, TRUE ); + aFunc.HideMarkedOutlines( aMarkRange, sal_True, sal_True ); } } @@ -7946,7 +7946,7 @@ void SAL_CALL ScTableSheetObj::showDetail( const table::CellRangeAddress& rCellR ScRange aMarkRange; ScUnoConversion::FillScRange( aMarkRange, rCellRange ); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.ShowMarkedOutlines( aMarkRange, TRUE, TRUE ); + aFunc.ShowMarkedOutlines( aMarkRange, sal_True, sal_True ); } } @@ -7957,10 +7957,10 @@ void SAL_CALL ScTableSheetObj::showLevel( sal_Int16 nLevel, table::TableOrientat ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) { - BOOL bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); + sal_Bool bColumns = ( nOrientation == table::TableOrientation_COLUMNS ); SCTAB nTab = GetTab_Impl(); ScOutlineDocFunc aFunc(*pDocSh); - aFunc.SelectLevel( nTab, bColumns, nLevel, TRUE, TRUE, TRUE ); + aFunc.SelectLevel( nTab, bColumns, nLevel, sal_True, sal_True, sal_True ); } } @@ -7976,7 +7976,7 @@ void SAL_CALL ScTableSheetObj::protect( const rtl::OUString& aPassword ) { String aString(aPassword); ScDocFunc aFunc(*pDocSh); - aFunc.Protect( GetTab_Impl(), aString, TRUE ); + aFunc.Protect( GetTab_Impl(), aString, sal_True ); } } @@ -7989,7 +7989,7 @@ void SAL_CALL ScTableSheetObj::unprotect( const rtl::OUString& aPassword ) { String aString(aPassword); ScDocFunc aFunc(*pDocSh); - BOOL bDone = aFunc.Unprotect( GetTab_Impl(), aString, TRUE ); + sal_Bool bDone = aFunc.Unprotect( GetTab_Impl(), aString, sal_True ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -8003,7 +8003,7 @@ sal_Bool SAL_CALL ScTableSheetObj::isProtected() throw(uno::RuntimeException) return pDocSh->GetDocument()->IsTabProtected( GetTab_Impl() ); DBG_ERROR("keine DocShell"); //! Exception oder so? - return FALSE; + return sal_False; } // XScenario @@ -8015,7 +8015,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getIsScenario() throw(uno::RuntimeException) if ( pDocSh ) return pDocSh->GetDocument()->IsScenario( GetTab_Impl() ); - return FALSE; + return sal_False; } rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeException) @@ -8026,7 +8026,7 @@ rtl::OUString SAL_CALL ScTableSheetObj::getScenarioComment() throw(uno::RuntimeE { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDocSh->GetDocument()->GetScenarioData( GetTab_Impl(), aComment, aColor, nFlags ); return aComment; } @@ -8046,7 +8046,7 @@ void SAL_CALL ScTableSheetObj::setScenarioComment( const rtl::OUString& aScenari String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8069,13 +8069,13 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd if (pDoc->IsScenario(nTab)) { ScMarkData aMarkData; - aMarkData.SelectTable( nTab, TRUE ); + aMarkData.SelectTable( nTab, sal_True ); - USHORT nRangeCount = (USHORT)rScenRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)rScenRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = rScenRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" ); ScRange aOneRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab, @@ -8088,51 +8088,51 @@ void SAL_CALL ScTableSheetObj::addRanges( const uno::Sequence<table::CellRangeAd // Szenario-Ranges sind durch Attribut gekennzeichnet ScPatternAttr aPattern( pDoc->GetPool() ); aPattern.GetItemSet().Put( ScMergeFlagAttr( SC_MF_SCENARIO ) ); - aPattern.GetItemSet().Put( ScProtectionAttr( TRUE ) ); + aPattern.GetItemSet().Put( ScProtectionAttr( sal_True ) ); ScDocFunc aFunc(*pDocSh); - aFunc.ApplyAttributes( aMarkData, aPattern, TRUE, TRUE ); + aFunc.ApplyAttributes( aMarkData, aPattern, sal_True, sal_True ); } // don't use. We should use therefor a private interface, so we can also set the flags. /* else if (nTab > 0 && pDoc->IsImportingXML()) // make this sheet as an scenario and only if it is not the first sheet and only if it is ImportingXML, // because than no UNDO and repaint is necessary. { - USHORT nRangeCount = (USHORT)rScenRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)rScenRanges.getLength(); if (nRangeCount) { - pDoc->SetScenario( nTab, TRUE ); + pDoc->SetScenario( nTab, sal_True ); // default flags Color aColor( COL_LIGHTGRAY ); // Default - USHORT nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY; + sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY; String aComment; pDoc->SetScenarioData( nTab, aComment, aColor, nFlags ); const table::CellRangeAddress* pAry = rScenRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { DBG_ASSERT( pAry[i].Sheet == nTab, "addRanges mit falscher Tab" ); - pDoc->ApplyFlagsTab( (USHORT)pAry[i].StartColumn, (USHORT)pAry[i].StartRow, - (USHORT)pAry[i].EndColumn, (USHORT)pAry[i].EndRow, nTab, SC_MF_SCENARIO ); + pDoc->ApplyFlagsTab( (sal_uInt16)pAry[i].StartColumn, (sal_uInt16)pAry[i].StartRow, + (sal_uInt16)pAry[i].EndColumn, (sal_uInt16)pAry[i].EndRow, nTab, SC_MF_SCENARIO ); } - pDoc->SetActiveScenario( nTab, TRUE ); + pDoc->SetActiveScenario( nTab, sal_True ); // set to next visible tab - USHORT j = nTab - 1; - BOOL bFinished = FALSE; + sal_uInt16 j = nTab - 1; + sal_Bool bFinished = sal_False; while (j < nTab && !bFinished) { if (pDoc->IsVisible(j)) { pDoc->SetVisibleTab(j); - bFinished = TRUE; + bFinished = sal_True; } else --j; } ScDocFunc aFunc(*pDocSh); - aFunc.SetTableVisible( nTab, FALSE, TRUE ); + aFunc.SetTableVisible( nTab, sal_False, sal_True ); } }*/ } @@ -8208,7 +8208,7 @@ void ScTableSheetObj::setExternalName( const ::rtl::OUString& aUrl, const ::rtl: const SCTAB nTab = GetTab_Impl(); const String aAbsDocName( ScGlobal::GetAbsDocName( aUrl, pDocSh ) ); const String aDocTabName( ScGlobal::GetDocTabName( aAbsDocName, aSheetName ) ); - if ( !pDoc->RenameTab( nTab, aDocTabName, FALSE /*bUpdateRef*/, TRUE /*bExternalDocument*/ ) ) + if ( !pDoc->RenameTab( nTab, aDocTabName, sal_False /*bUpdateRef*/, sal_True /*bExternalDocument*/ ) ) { throw container::ElementExistException( ::rtl::OUString(), *this ); } @@ -8291,8 +8291,8 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); - aFunc.SetTableVisible( nTab, bVis, TRUE ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + aFunc.SetTableVisible( nTab, bVis, sal_True ); } else if ( pEntry->nWID == SC_WID_UNO_ISACTIVE ) { @@ -8309,7 +8309,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); @@ -8326,7 +8326,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8359,7 +8359,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8392,7 +8392,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8425,7 +8425,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8458,7 +8458,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8491,7 +8491,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn String aName; String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetName( nTab, aName ); pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); sal_Bool bModify(sal_False); @@ -8530,7 +8530,7 @@ void ScTableSheetObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) { - BOOL bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bAutoPrint = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bAutoPrint) pDoc->SetPrintEntireSheet( nTab ); // clears all print ranges else @@ -8580,7 +8580,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = pDoc->IsVisible( nTab ); + sal_Bool bVis = pDoc->IsVisible( nTab ); ScUnoHelpFunctions::SetBoolInAny( rAny, bVis ); } else if ( pEntry->nWID == SC_WID_UNO_LINKDISPBIT ) @@ -8604,7 +8604,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); rAny <<= static_cast<sal_Int32>(aColor.GetColor()); @@ -8616,7 +8616,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PROTECT) != 0 ); @@ -8628,7 +8628,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_SHOWFRAME) != 0 ); @@ -8640,7 +8640,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_PRINTFRAME) != 0 ); @@ -8652,7 +8652,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_TWOWAY) != 0 ); @@ -8664,7 +8664,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, (nFlags & SC_SCENARIO_ATTRIB) != 0 ); @@ -8676,7 +8676,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn { String aComment; Color aColor; - USHORT nFlags; + sal_uInt16 nFlags; pDoc->GetScenarioData( nTab, aComment, aColor, nFlags ); ScUnoHelpFunctions::SetBoolInAny( rAny, !(nFlags & SC_SCENARIO_VALUE)); @@ -8691,7 +8691,7 @@ void ScTableSheetObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEn } else if ( pEntry->nWID == SC_WID_UNO_AUTOPRINT ) { - BOOL bAutoPrint = pDoc->IsPrintEntireSheet( nTab ); + sal_Bool bAutoPrint = pDoc->IsPrintEntireSheet( nTab ); ScUnoHelpFunctions::SetBoolInAny( rAny, bAutoPrint ); } else if ( pEntry->nWID == SC_WID_UNO_TABCOLOR ) @@ -8915,32 +8915,32 @@ void ScTableColumnObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pE { // property is 1/100mm, column width is twips nNewWidth = HMMToTwips(nNewWidth); - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)nNewWidth, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)nNewWidth, sal_True, sal_True ); } } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, - SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE ); - // FALSE bei Spalten momentan ohne Auswirkung + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, + SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True ); + // sal_False bei Spalten momentan ohne Auswirkung } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) - aFunc.InsertPageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( TRUE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_True, rRange.aStart, sal_True, sal_True, sal_True ); } else ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID @@ -8966,9 +8966,9 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE if ( pEntry->nWID == SC_WID_UNO_CELLWID ) { // for hidden column, return original height - USHORT nWidth = pDoc->GetOriginalWidth( nCol, nTab ); + sal_uInt16 nWidth = pDoc->GetOriginalWidth( nCol, nTab ); // property is 1/100mm, column width is twips - nWidth = (USHORT) TwipsToHMM(nWidth); + nWidth = (sal_uInt16) TwipsToHMM(nWidth); rAny <<= (sal_Int32)( nWidth ); } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) @@ -8980,7 +8980,7 @@ void ScTableColumnObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pE else if ( pEntry->nWID == SC_WID_UNO_OWIDTH ) { //! momentan immer gesetzt ??!?! - BOOL bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetColFlags( nCol, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt ); } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) @@ -9060,44 +9060,44 @@ void ScTableRowObj::SetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr { // property is 1/100mm, row height is twips nNewHeight = HMMToTwips(nNewHeight); - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)nNewHeight, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)nNewHeight, sal_True, sal_True ); } } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus } else if ( pEntry->nWID == SC_WID_UNO_CELLFILT ) { - BOOL bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bFil = ScUnoHelpFunctions::GetBoolFromAny( aValue ); // ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; -// aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE ); +// aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT mit Groesse 0 blendet aus pDoc->SetRowFiltered(nRow, nRow, nTab, bFil); } else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT ) { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True ); else { // set current height again manually - USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab ); - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, TRUE, TRUE ); + sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, nHeight, sal_True, sal_True ); } } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE || pEntry->nWID == SC_WID_UNO_MANPAGE ) { - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bSet) - aFunc.InsertPageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_False, rRange.aStart, sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( FALSE, rRange.aStart, TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_False, rRange.aStart, sal_True, sal_True, sal_True ); } else ScCellRangeObj::SetOnePropertyValue(pEntry, aValue); // base class, no Item WID @@ -9122,9 +9122,9 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr if ( pEntry->nWID == SC_WID_UNO_CELLHGT ) { // for hidden row, return original height - USHORT nHeight = pDoc->GetOriginalHeight( nRow, nTab ); + sal_uInt16 nHeight = pDoc->GetOriginalHeight( nRow, nTab ); // property is 1/100mm, row height is twips - nHeight = (USHORT) TwipsToHMM(nHeight); + nHeight = (sal_uInt16) TwipsToHMM(nHeight); rAny <<= (sal_Int32)( nHeight ); } else if ( pEntry->nWID == SC_WID_UNO_CELLVIS ) @@ -9140,7 +9140,7 @@ void ScTableRowObj::GetOnePropertyValue( const SfxItemPropertySimpleEntry* pEntr } else if ( pEntry->nWID == SC_WID_UNO_OHEIGHT ) { - BOOL bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetRowFlags( nRow, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( rAny, bOpt ); } else if ( pEntry->nWID == SC_WID_UNO_NEWPAGE ) @@ -9213,7 +9213,7 @@ uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException) sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bHas = FALSE; + sal_Bool bHas = sal_False; if ( pDocShell ) { //! schneller selber testen? @@ -9230,13 +9230,13 @@ ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR pDocShell( pDocSh ), aRanges( rR ), pMark( NULL ), - bAtEnd( FALSE ) + bAtEnd( sal_False ) { ScDocument* pDoc = pDocShell->GetDocument(); pDoc->AddUnoObject(*this); if ( aRanges.Count() == 0 ) - bAtEnd = TRUE; + bAtEnd = sal_True; else { SCTAB nTab = 0; @@ -9252,7 +9252,7 @@ void ScCellsEnumeration::CheckPos_Impl() { if (pDocShell) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; ScDocument* pDoc = pDocShell->GetDocument(); ScBaseCell* pCell = pDoc->GetCell(aPos); if ( pCell && pCell->GetCellType() != CELLTYPE_NOTE ) @@ -9260,7 +9260,7 @@ void ScCellsEnumeration::CheckPos_Impl() if (!pMark) { pMark = new ScMarkData; - pMark->MarkFromRangeList( aRanges, FALSE ); + pMark->MarkFromRangeList( aRanges, sal_False ); pMark->MarkToMulti(); // needed for GetNextMarkedCell } bFound = pMark->IsCellMarked( aPos.Col(), aPos.Row() ); @@ -9283,18 +9283,18 @@ void ScCellsEnumeration::Advance_Impl() if (!pMark) { pMark = new ScMarkData; - pMark->MarkFromRangeList( aRanges, FALSE ); + pMark->MarkFromRangeList( aRanges, sal_False ); pMark->MarkToMulti(); // needed for GetNextMarkedCell } SCCOL nCol = aPos.Col(); SCROW nRow = aPos.Row(); SCTAB nTab = aPos.Tab(); - BOOL bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark ); + sal_Bool bFound = pDocShell->GetDocument()->GetNextMarkedCell( nCol, nRow, nTab, *pMark ); if (bFound) aPos.Set( nCol, nRow, nTab ); else - bAtEnd = TRUE; // kommt nix mehr + bAtEnd = sal_True; // kommt nix mehr } void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) @@ -9485,8 +9485,8 @@ ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScR pDocShell( pDocSh ), nTab( rRange.aStart.Tab() ), pIter( NULL ), - bAtEnd( FALSE ), - bDirty( FALSE ) + bAtEnd( sal_False ), + bDirty( sal_False ) { ScDocument* pDoc = pDocShell->GetDocument(); pDoc->AddUnoObject(*this); @@ -9516,7 +9516,7 @@ void ScCellFormatsEnumeration::Advance_Impl() if ( bDirty ) { pIter->DataChanged(); // AttrArray-Index neu suchen - bDirty = FALSE; + bDirty = sal_False; } SCCOL nCol1, nCol2; @@ -9524,10 +9524,10 @@ void ScCellFormatsEnumeration::Advance_Impl() if ( pIter->GetNext( nCol1, nCol2, nRow1, nRow2 ) ) aNext = ScRange( nCol1, nRow1, nTab, nCol2, nRow2, nTab ); else - bAtEnd = TRUE; // kommt nix mehr + bAtEnd = sal_True; // kommt nix mehr } else - bAtEnd = TRUE; // Dok weggekommen oder so + bAtEnd = sal_True; // Dok weggekommen oder so } ScCellRangeObj* ScCellFormatsEnumeration::NextObject_Impl() @@ -9552,7 +9552,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // ungueltig geworden @@ -9561,7 +9561,7 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( nId == SFX_HINT_DATACHANGED ) { - bDirty = TRUE; // AttrArray-Index evtl. ungueltig geworden + bDirty = sal_True; // AttrArray-Index evtl. ungueltig geworden } } } @@ -9615,7 +9615,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) pDocShell = NULL; // ungueltig geworden } @@ -9882,7 +9882,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) pDocShell = NULL; // ungueltig geworden } diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx index 8a8081e412d3..835959e68e3d 100644 --- a/sc/source/ui/unoobj/chart2uno.cxx +++ b/sc/source/ui/unoobj/chart2uno.cxx @@ -1099,7 +1099,7 @@ bool lcl_addUpperLeftCornerIfMissing(vector<ScSharedTokenRef>& rRefTokens, SCROW nMaxRow = 0; SCTAB nTab = 0; - USHORT nFileId = 0; + sal_uInt16 nFileId = 0; String aExtTabName; bool bExternal = false; @@ -2617,7 +2617,7 @@ void ScChart2DataSequence::BuildDataCache() case CELLTYPE_FORMULA: { ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); - USHORT nErr = pFCell->GetErrCode(); + sal_uInt16 nErr = pFCell->GetErrCode(); if (nErr) break; @@ -2834,7 +2834,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); + sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId(); if ( nId ==SFX_HINT_DYING ) { m_pDocument = NULL; @@ -2851,7 +2851,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint if( m_pDocument ) { - for ( USHORT n=0; n<m_aValueListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<m_aValueListeners.Count(); n++ ) m_pDocument->AddUnoListenerCall( *m_aValueListeners[n], aEvent ); } @@ -3409,8 +3409,8 @@ void SAL_CALL ScChart2DataSequence::removeModifyListener( const uno::Reference< acquire(); // in case the listeners have the last ref - released below - USHORT nCount = m_aValueListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = m_aValueListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XModifyListener> *pObj = m_aValueListeners[n]; if ( *pObj == aListener ) diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index 86f59d66a7a4..f0d77a8157b2 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -208,11 +208,11 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, } ScRangeList* pList = new ScRangeList; - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet, static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet ); @@ -232,7 +232,8 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, // Rechteck anpassen //! Fehler/Exception, wenn leer/ungueltig ??? Point aRectPos( aRect.X, aRect.Y ); - if (aRectPos.X() < 0) aRectPos.X() = 0; + bool bLayoutRTL = pDoc->IsLayoutRTL( nTab ); + if ( ( aRectPos.X() < 0 && !bLayoutRTL ) || ( aRectPos.X() > 0 && bLayoutRTL ) ) aRectPos.X() = 0; if (aRectPos.Y() < 0) aRectPos.Y() = 0; Size aRectSize( aRect.Width, aRect.Height ); if (aRectSize.Width() <= 0) aRectSize.Width() = 5000; // Default-Groesse @@ -298,7 +299,7 @@ void SAL_CALL ScChartsObj::addNewByName( const rtl::OUString& aName, xObj->setVisualAreaSize( nAspect, aSz ); pPage->InsertObject( pObj ); - pModel->AddUndo( new SdrUndoInsertObj( *pObj ) ); //! Undo-Kommentar? + pModel->AddUndo( new SdrUndoNewObj( *pObj ) ); // Dies veranlaesst Chart zum sofortigen Update //SvData aEmpty; @@ -318,7 +319,7 @@ void SAL_CALL ScChartsObj::removeByName( const rtl::OUString& aName ) ScDrawLayer* pModel = pDoc->GetDrawLayer(); // ist nicht 0 SdrPage* pPage = pModel->GetPage(static_cast<sal_uInt16>(nTab)); // ist nicht 0 - pModel->AddUndo( new SdrUndoRemoveObj( *pObj ) ); //! Undo-Kommentar? + pModel->AddUndo( new SdrUndoDelObj( *pObj ) ); pPage->RemoveObject( pObj->GetOrdNum() ); //! Notify etc.??? @@ -339,7 +340,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScChartsObj::createEnumeration( sal_Int32 SAL_CALL ScChartsObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nCount = 0; + sal_Int32 nCount = 0; if ( pDocShell ) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -553,14 +554,14 @@ void ScChartObj::Update_Impl( const ScRangeListRef& rRanges, bool bColHeaders, b if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); - BOOL bUndo(pDoc->IsUndoEnabled()); + sal_Bool bUndo(pDoc->IsUndoEnabled()); if (bUndo) { pDocShell->GetUndoManager()->AddUndoAction( - new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ) ); + new ScUndoChartData( pDocShell, aChartName, rRanges, bColHeaders, bRowHeaders, sal_False ) ); } - pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, FALSE ); + pDoc->UpdateChartArea( aChartName, rRanges, bColHeaders, bRowHeaders, sal_False ); } } @@ -616,7 +617,7 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con if ( pDoc ) { ScRange aEmptyRange; - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; ScChartListener aSearcher( aChartName, pDoc, aEmptyRange ); ScChartListenerCollection* pCollection = pDoc->GetChartListenerCollection(); if ( pCollection && pCollection->Search( &aSearcher, nIndex ) ) @@ -627,10 +628,10 @@ void ScChartObj::getFastPropertyValue( uno::Any& rValue, sal_Int32 nHandle ) con const ScRangeListRef& rRangeList = pListener->GetRangeList(); if ( rRangeList.Is() ) { - ULONG nCount = rRangeList->Count(); + sal_uLong nCount = rRangeList->Count(); uno::Sequence< table::CellRangeAddress > aCellRanges( nCount ); table::CellRangeAddress* pCellRanges = aCellRanges.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { ScRange aRange( *rRangeList->GetObject( i ) ); table::CellRangeAddress aCellRange; @@ -725,12 +726,12 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScChartObj::getRanges() throw(un GetData_Impl( xRanges, bColHeaders, bRowHeaders ); if ( xRanges.Is() ) { - ULONG nCount = xRanges->Count(); + sal_uLong nCount = xRanges->Count(); table::CellRangeAddress aRangeAddress; uno::Sequence<table::CellRangeAddress> aSeq(nCount); table::CellRangeAddress* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScRange aRange(*xRanges->GetObject(i)); @@ -758,11 +759,11 @@ void SAL_CALL ScChartObj::setRanges( const uno::Sequence<table::CellRangeAddress GetData_Impl( xOldRanges, bColHeaders, bRowHeaders ); ScRangeList* pList = new ScRangeList; - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { ScRange aRange( static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, pAry[i].Sheet, static_cast<SCCOL>(pAry[i].EndColumn), pAry[i].EndRow, pAry[i].Sheet ); diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx index a680185a1d1c..fb3d5e42e345 100644 --- a/sc/source/ui/unoobj/confuno.cxx +++ b/sc/source/ui/unoobj/confuno.cxx @@ -244,7 +244,7 @@ void SAL_CALL ScDocumentConfiguration::setPropertyValue( { // Int16 contains CharacterCompressionType values sal_Int16 nUno = ScUnoHelpFunctions::GetInt16FromAny( aValue ); - pDoc->SetAsianCompression( (BYTE) nUno ); + pDoc->SetAsianCompression( (sal_uInt8) nUno ); bUpdateHeights = sal_True; } else if ( aPropertyName.compareToAscii( SC_UNO_ASIANKERN ) == 0 ) @@ -379,7 +379,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString { // #i75610# don't create the printer, return empty string if no printer created yet // (as in SwXDocumentSettings) - SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE ); + SfxPrinter* pPrinter = pDoc->GetPrinter( sal_False ); if (pPrinter) aRet <<= rtl::OUString ( pPrinter->GetName()); else @@ -389,7 +389,7 @@ uno::Any SAL_CALL ScDocumentConfiguration::getPropertyValue( const rtl::OUString { // #i75610# don't create the printer, return empty sequence if no printer created yet // (as in SwXDocumentSettings) - SfxPrinter* pPrinter = pDoc->GetPrinter( FALSE ); + SfxPrinter* pPrinter = pDoc->GetPrinter( sal_False ); if (pPrinter) { SvMemoryStream aStream; diff --git a/sc/source/ui/unoobj/cursuno.cxx b/sc/source/ui/unoobj/cursuno.cxx index daf075964a3a..d163dcee643e 100644 --- a/sc/source/ui/unoobj/cursuno.cxx +++ b/sc/source/ui/unoobj/cursuno.cxx @@ -133,7 +133,7 @@ void SAL_CALL ScCellCursorObj::collapseToCurrentRegion() throw(uno::RuntimeExcep SCTAB nTab = aOneRange.aStart.Tab(); pDocSh->GetDocument()->GetDataArea( - nTab, nStartCol, nStartRow, nEndCol, nEndRow, TRUE, false ); + nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_True, false ); ScRange aNew( nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab ); SetNewRange( aNew ); @@ -331,7 +331,7 @@ void SAL_CALL ScCellCursorObj::gotoStart() throw(uno::RuntimeException) SCTAB nTab = aOneRange.aStart.Tab(); pDocSh->GetDocument()->GetDataArea( - nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false ); + nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_False, false ); ScRange aNew( nStartCol, nStartRow, nTab ); SetNewRange( aNew ); @@ -359,7 +359,7 @@ void SAL_CALL ScCellCursorObj::gotoEnd() throw(uno::RuntimeException) SCTAB nTab = aOneRange.aStart.Tab(); pDocSh->GetDocument()->GetDataArea( - nTab, nStartCol, nStartRow, nEndCol, nEndRow, FALSE, false ); + nTab, nStartCol, nStartRow, nEndCol, nEndRow, sal_False, false ); ScRange aNew( nEndCol, nEndRow, nTab ); SetNewRange( aNew ); @@ -382,7 +382,7 @@ void SAL_CALL ScCellCursorObj::gotoNext() throw(uno::RuntimeException) SCTAB nTab = aCursor.Tab(); ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) - pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, FALSE,TRUE, aMark ); + pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, 1,0, sal_False,sal_True, aMark ); //! sonst Exception oder so SetNewRange( ScRange( nNewX, nNewY, nTab ) ); @@ -404,7 +404,7 @@ void SAL_CALL ScCellCursorObj::gotoPrevious() throw(uno::RuntimeException) SCTAB nTab = aCursor.Tab(); ScDocShell* pDocSh = GetDocShell(); if ( pDocSh ) - pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, FALSE,TRUE, aMark ); + pDocSh->GetDocument()->GetNextPos( nNewX,nNewY, nTab, -1,0, sal_False,sal_True, aMark ); //! sonst Exception oder so SetNewRange( ScRange( nNewX, nNewY, nTab ) ); diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx index a19d251699eb..42ed9179e6aa 100644 --- a/sc/source/ui/unoobj/dapiuno.cxx +++ b/sc/source/ui/unoobj/dapiuno.cxx @@ -203,7 +203,7 @@ SC_SIMPLE_SERVICE_INFO( ScDataPilotFieldGroupItemObj, "ScDataPilotFieldGroupItem //------------------------------------------------------------------------ -GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits ) +GeneralFunction ScDataPilotConversion::FirstFunc( sal_uInt16 nBits ) { if ( nBits & PIVOT_FUNC_SUM ) return GeneralFunction_SUM; if ( nBits & PIVOT_FUNC_COUNT ) return GeneralFunction_COUNT; @@ -220,9 +220,9 @@ GeneralFunction ScDataPilotConversion::FirstFunc( USHORT nBits ) return GeneralFunction_NONE; } -USHORT ScDataPilotConversion::FunctionBit( GeneralFunction eFunc ) +sal_uInt16 ScDataPilotConversion::FunctionBit( GeneralFunction eFunc ) { - USHORT nRet = PIVOT_FUNC_NONE; // 0 + sal_uInt16 nRet = PIVOT_FUNC_NONE; // 0 switch (eFunc) { case GeneralFunction_SUM: nRet = PIVOT_FUNC_SUM; break; @@ -265,8 +265,8 @@ ScDPObject* lcl_GetDPObject( ScDocShell* pDocShell, SCTAB nTab, const String& rN ScDPCollection* pColl = pDoc->GetDPCollection(); if ( pColl ) { - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab && @@ -298,7 +298,7 @@ sal_Int32 lcl_GetObjectIndex( ScDPObject* pDPObj, const ScFieldIdentifier& rFiel sal_Int32 nCount = pDPObj->GetDimCount(); for ( sal_Int32 nDim = 0; nDim < nCount; ++nDim ) { - BOOL bIsDataLayout = FALSE; + sal_Bool bIsDataLayout = sal_False; OUString aDimName( pDPObj->GetDimName( nDim, bIsDataLayout ) ); if ( rFieldId.mbDataLayout ? bIsDataLayout : (aDimName == rFieldId.maFieldName) ) return nDim; @@ -345,8 +345,8 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd { // count tables on this sheet sal_Int32 nFound = 0; - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -429,7 +429,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, if ( aNewName.getLength() && hasByName( aNewName ) ) throw RuntimeException(); // no other exceptions specified - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; ScDataPilotDescriptorBase* pImp = ScDataPilotDescriptorBase::getImplementation( xDescriptor ); if ( pDocShell && pImp ) { @@ -450,7 +450,7 @@ void SAL_CALL ScDataPilotTablesObj::insertNewByName( const OUString& aNewName, // todo: handle double fields (for more information see ScDPObject ScDBDocFunc aFunc(*pDocShell); - bDone = aFunc.DataPilotUpdate( NULL, pNewObj, TRUE, TRUE ); + bDone = aFunc.DataPilotUpdate( NULL, pNewObj, sal_True, sal_True ); } } @@ -467,7 +467,7 @@ void SAL_CALL ScDataPilotTablesObj::removeByName( const OUString& aName ) if (pDPObj && pDocShell) { ScDBDocFunc aFunc(*pDocShell); - aFunc.DataPilotUpdate( pDPObj, NULL, TRUE, TRUE ); // remove - incl. undo etc. + aFunc.DataPilotUpdate( pDPObj, NULL, sal_True, sal_True ); // remove - incl. undo etc. } else throw RuntimeException(); // no other exceptions specified @@ -494,9 +494,9 @@ sal_Int32 SAL_CALL ScDataPilotTablesObj::getCount() throw(RuntimeException) { // count tables on this sheet - USHORT nFound = 0; - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nFound = 0; + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab ) @@ -555,9 +555,9 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() { // count tables on this sheet - USHORT nFound = 0; - USHORT nCount = pColl->GetCount(); - USHORT i; + sal_uInt16 nFound = 0; + sal_uInt16 nCount = pColl->GetCount(); + sal_uInt16 i; for (i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; @@ -565,7 +565,7 @@ Sequence<OUString> SAL_CALL ScDataPilotTablesObj::getElementNames() ++nFound; } - USHORT nPos = 0; + sal_uInt16 nPos = 0; Sequence<OUString> aSeq(nFound); OUString* pAry = aSeq.getArray(); for (i=0; i<nCount; i++) @@ -592,17 +592,17 @@ sal_Bool SAL_CALL ScDataPilotTablesObj::hasByName( const OUString& aName ) if ( pColl ) { String aNamStr(aName); - USHORT nCount = pColl->GetCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pColl->GetCount(); + for (sal_uInt16 i=0; i<nCount; i++) { ScDPObject* pDPObj = (*pColl)[i]; if ( pDPObj->GetOutRange().aStart.Tab() == nTab && pDPObj->GetName() == aNamStr ) - return TRUE; + return sal_True; } } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -836,7 +836,7 @@ void SAL_CALL ScDataPilotDescriptorBase::setPropertyValue( const OUString& aProp ScImportParam aParam; ScImportDescriptor::FillImportParam( aParam, aArgSeq ); - USHORT nNewType = sheet::DataImportMode_NONE; + sal_uInt16 nNewType = sheet::DataImportMode_NONE; if ( aParam.bImport ) { if ( aParam.bSql ) @@ -983,7 +983,7 @@ Any SAL_CALL ScDataPilotDescriptorBase::getPropertyValue( const OUString& aPrope aParam.aStatement = pImportDesc->aObject; aParam.bNative = pImportDesc->bNative; aParam.bSql = ( pImportDesc->nType == sheet::DataImportMode_SQL ); - aParam.nType = static_cast<BYTE>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable); + aParam.nType = static_cast<sal_uInt8>(( pImportDesc->nType == sheet::DataImportMode_QUERY ) ? ScDbQuery : ScDbTable); uno::Sequence<beans::PropertyValue> aSeq( ScImportDescriptor::GetPropertyCount() ); ScImportDescriptor::FillProperties( aSeq, aParam ); @@ -1202,7 +1202,7 @@ void ScDataPilotTableObj::SetDPObject( ScDPObject* pDPObject ) if ( pDPObj && pDocSh ) { ScDBDocFunc aFunc(*pDocSh); - aFunc.DataPilotUpdate( pDPObj, pDPObject, TRUE, TRUE ); + aFunc.DataPilotUpdate( pDPObj, pDPObject, sal_True, sal_True ); } } @@ -1278,18 +1278,18 @@ CellRangeAddress SAL_CALL ScDataPilotTableObj::getOutputRange() throw(RuntimeExc return aRet; } -ULONG RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, BOOL bRecord, BOOL bApi ); +sal_uLong RefreshDPObject( ScDPObject *pDPObj, ScDocument *pDoc, ScDocShell *pDocSh, sal_Bool bRecord, sal_Bool bApi ); void SAL_CALL ScDataPilotTableObj::refresh() throw(RuntimeException) { ScUnoGuard aGuard; if( ScDPObject* pDPObj = lcl_GetDPObject(GetDocShell(), nTab, aName) ) - RefreshDPObject( pDPObj, NULL, GetDocShell(), TRUE, TRUE ); + RefreshDPObject( pDPObj, NULL, GetDocShell(), sal_True, sal_True ); //if (pDPObj) //{ // ScDPObject* pNew = new ScDPObject(*pDPObj); // ScDBDocFunc aFunc(*GetDocShell()); - // aFunc.DataPilotUpdate( pDPObj, pNew, TRUE, TRUE ); + // aFunc.DataPilotUpdate( pDPObj, pNew, sal_True, sal_True ); // delete pNew; // DataPilotUpdate copies settings from "new" object //} @@ -1371,8 +1371,8 @@ void SAL_CALL ScDataPilotTableObj::removeModifyListener( const uno::Reference<ut acquire(); // in case the listeners have the last ref - released below - USHORT nCount = aModifyListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aModifyListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XModifyListener> *pObj = aModifyListeners[n]; if ( *pObj == aListener ) @@ -1398,6 +1398,23 @@ void ScDataPilotTableObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) { Refreshed_Impl(); } + else if ( rHint.ISA( ScUpdateRefHint ) ) + { + ScRange aRange( 0, 0, nTab ); + ScRangeList aRanges; + aRanges.Append( aRange ); + const ScUpdateRefHint& rRef = static_cast< const ScUpdateRefHint& >( rHint ); + if ( aRanges.UpdateReference( rRef.GetMode(), GetDocShell()->GetDocument(), rRef.GetRange(), + rRef.GetDx(), rRef.GetDy(), rRef.GetDz() ) && + aRanges.Count() == 1 ) + { + const ScRange* pRange = aRanges.GetObject( 0 ); + if ( pRange ) + { + nTab = pRange->aStart.Tab(); + } + } + } ScDataPilotDescriptorBase::Notify( rBC, rHint ); } @@ -1410,7 +1427,7 @@ void ScDataPilotTableObj::Refreshed_Impl() // the EventObject holds a Ref to this object until after the listener calls ScDocument* pDoc = GetDocShell()->GetDocument(); - for ( USHORT n=0; n<aModifyListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aModifyListeners.Count(); n++ ) pDoc->AddUnoListenerCall( *aModifyListeners[n], aEvent ); } @@ -1527,9 +1544,9 @@ ScDPSaveDimension* ScDataPilotChildObjBase::GetDPDimension( ScDPObject** ppDPObj // find dimension with specified index (search in duplicated dimensions) String aFieldName = maFieldId.maFieldName; // needed for comparison const List& rDimensions = pSaveData->GetDimensions(); - ULONG nDimCount = rDimensions.Count(); + sal_uLong nDimCount = rDimensions.Count(); sal_Int32 nFoundIdx = 0; - for( ULONG nDim = 0; nDim < nDimCount; ++nDim ) + for( sal_uLong nDim = 0; nDim < nDimCount; ++nDim ) { ScDPSaveDimension* pDim = static_cast< ScDPSaveDimension* >( rDimensions.GetObject( nDim ) ); if( !pDim->IsDataLayout() && (pDim->GetName() == aFieldName) ) @@ -1615,10 +1632,10 @@ sal_Int32 lcl_GetFieldCount( const Reference<XDimensionsSupplier>& rSource, cons return nRet; } -BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, +sal_Bool lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, const Any& rOrient, SCSIZE nIndex, ScFieldIdentifier& rFieldId ) { - BOOL bOk = FALSE; + sal_Bool bOk = sal_False; SCSIZE nPos = 0; sal_Int32 nDimIndex = 0; @@ -1699,7 +1716,7 @@ BOOL lcl_GetFieldDataByIndex( const Reference<XDimensionsSupplier>& rSource, return bOk; } -BOOL lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId ) +sal_Bool lcl_GetFieldDataByName( ScDPObject* pDPObj, const OUString& rFieldName, ScFieldIdentifier& rFieldId ) { // "By name" is always the first match. // The name "Data" always refers to the data layout field. @@ -2111,7 +2128,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew) pDim = pNewDim; } - pDim->SetOrientation(sal::static_int_cast<USHORT>(eNew)); + pDim->SetOrientation(sal::static_int_cast<sal_uInt16>(eNew)); // move changed field behind all other fields (make it the last field in dimension) pSaveData->SetPosition( pDim, pSaveData->GetDimensions().Count() ); @@ -2155,12 +2172,12 @@ void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc) pDim->SetSubTotals( 0, NULL ); else { - USHORT nFunc = sal::static_int_cast<USHORT>( eNewFunc ); + sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( eNewFunc ); pDim->SetSubTotals( 1, &nFunc ); } } else - pDim->SetFunction( sal::static_int_cast<USHORT>( eNewFunc ) ); + pDim->SetFunction( sal::static_int_cast<sal_uInt16>( eNewFunc ) ); SetDPObject( pDPObj ); } } @@ -2202,21 +2219,21 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt pDim->SetSubTotals( 0, NULL ); else { - USHORT nFunc = sal::static_int_cast<USHORT>( rSubtotals[ 0 ] ); + sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( rSubtotals[ 0 ] ); pDim->SetSubTotals( 1, &nFunc ); } } else if( nCount > 1 ) { // set multiple functions, ignore NONE and AUTO in this case - ::std::vector< USHORT > aSubt; + ::std::vector< sal_uInt16 > aSubt; for( sal_Int32 nIdx = 0; nIdx < nCount; ++nIdx ) { GeneralFunction eFunc = rSubtotals[ nIdx ]; if( (eFunc != GeneralFunction_NONE) && (eFunc != GeneralFunction_AUTO) ) { // do not insert functions twice - USHORT nFunc = static_cast< USHORT >( eFunc ); + sal_uInt16 nFunc = static_cast< sal_uInt16 >( eFunc ); if( ::std::find( aSubt.begin(), aSubt.end(), nFunc ) == aSubt.end() ) aSubt.push_back( nFunc ); } diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx index 7a367a71977a..10edb4f9d1aa 100644 --- a/sc/source/ui/unoobj/datauno.cxx +++ b/sc/source/ui/unoobj/datauno.cxx @@ -286,25 +286,25 @@ void ScImportDescriptor::FillImportParam( ScImportParam& rParam, const uno::Sequ switch (eMode) { case sheet::DataImportMode_NONE: - rParam.bImport = FALSE; + rParam.bImport = sal_False; break; case sheet::DataImportMode_SQL: - rParam.bImport = TRUE; - rParam.bSql = TRUE; + rParam.bImport = sal_True; + rParam.bSql = sal_True; break; case sheet::DataImportMode_TABLE: - rParam.bImport = TRUE; - rParam.bSql = FALSE; + rParam.bImport = sal_True; + rParam.bSql = sal_False; rParam.nType = ScDbTable; break; case sheet::DataImportMode_QUERY: - rParam.bImport = TRUE; - rParam.bSql = FALSE; + rParam.bImport = sal_True; + rParam.bSql = sal_False; rParam.nType = ScDbQuery; break; default: DBG_ERROR("falscher Mode"); - rParam.bImport = FALSE; + rParam.bImport = sal_False; } } } @@ -334,7 +334,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq aOutPos.Column = rParam.nDestCol; aOutPos.Row = rParam.nDestRow; - USHORT nSortCount = 0; + sal_uInt16 nSortCount = 0; while ( nSortCount < MAXSORT && rParam.bDoSort[nSortCount] ) ++nSortCount; @@ -342,7 +342,7 @@ void ScSortDescriptor::FillProperties( uno::Sequence<beans::PropertyValue>& rSeq if (nSortCount) { table::TableSortField* pFieldArray = aFields.getArray(); - for (USHORT i=0; i<nSortCount; i++) + for (sal_uInt16 i=0; i<nSortCount; i++) { pFieldArray[i].Field = rParam.nField[i]; pFieldArray[i].IsAscending = rParam.bAscending[i]; @@ -425,8 +425,8 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b if ( rProp.Value >>= aSeq ) { bOldSortDescriptor = sal_True; - INT32 nCount = aSeq.getLength(); - INT32 i; + sal_Int32 nCount = aSeq.getLength(); + sal_Int32 i; if ( nCount > MAXSORT ) { DBG_ERROR("Zu viele Sortierfelder"); @@ -439,16 +439,16 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b rParam.bAscending[i] = pFieldArray[i].SortAscending; // FieldType wird ignoriert - rParam.bDoSort[i] = TRUE; + rParam.bDoSort[i] = sal_True; } for (i=nCount; i<MAXSORT; i++) - rParam.bDoSort[i] = FALSE; + rParam.bDoSort[i] = sal_False; } else if ( rProp.Value >>= aNewSeq ) { bNewSortDescriptor = sal_True; - INT32 nCount = aNewSeq.getLength(); - INT32 i; + sal_Int32 nCount = aNewSeq.getLength(); + sal_Int32 i; if ( nCount > MAXSORT ) { DBG_ERROR("Zu viele Sortierfelder"); @@ -466,10 +466,10 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b rParam.aCollatorAlgorithm = pFieldArray[i].CollatorAlgorithm; // FieldType wird ignoriert - rParam.bDoSort[i] = TRUE; + rParam.bDoSort[i] = sal_True; } for (i=nCount; i<MAXSORT; i++) - rParam.bDoSort[i] = FALSE; + rParam.bDoSort[i] = sal_False; } } else if (aPropName.EqualsAscii( SC_UNONAME_ISCASE )) @@ -497,7 +497,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b { sal_Int32 nVal = 0; if ( rProp.Value >>= nVal ) - rParam.nUserIndex = (USHORT)nVal; + rParam.nUserIndex = (sal_uInt16)nVal; } else if (aPropName.EqualsAscii( SC_UNONAME_COLLLOC )) { @@ -516,7 +516,7 @@ void ScSortDescriptor::FillSortParam( ScSortParam& rParam, const uno::Sequence<b //------------------------------------------------------------------------ -ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, USHORT nP ) : +ScSubTotalFieldObj::ScSubTotalFieldObj( ScSubTotalDescriptorBase* pDesc, sal_uInt16 nP ) : xRef( pDesc ), // Objekt festhalten rParent( *pDesc ), nPos( nP ) @@ -577,8 +577,8 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns( ScSubTotalParam aParam; rParent.GetData(aParam); - UINT32 nColCount = aSubTotalColumns.getLength(); - if ( nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) ) + sal_uInt32 nColCount = aSubTotalColumns.getLength(); + if ( nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) ) { SCCOL nCount = static_cast<SCCOL>(nColCount); aParam.nSubTotals[nPos] = nCount; @@ -631,7 +631,7 @@ void ScSubTotalDescriptorBase::PutData( const ScSubTotalParam& /* rParam */ ) // XSubTotalDesctiptor -ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(USHORT nIndex) +ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 nIndex) { if ( nIndex < getCount() ) return new ScSubTotalFieldObj( this, nIndex ); @@ -644,8 +644,8 @@ void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException) ScSubTotalParam aParam; GetData(aParam); - for (USHORT i=0; i<MAXSUBTOTAL; i++) - aParam.bGroupActive[i] = FALSE; + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) + aParam.bGroupActive[i] = sal_False; //! Notify oder so fuer die Field-Objekte??? @@ -660,15 +660,15 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew( ScSubTotalParam aParam; GetData(aParam); - USHORT nPos = 0; + sal_uInt16 nPos = 0; while ( nPos < MAXSUBTOTAL && aParam.bGroupActive[nPos] ) ++nPos; - UINT32 nColCount = aSubTotalColumns.getLength(); + sal_uInt32 nColCount = aSubTotalColumns.getLength(); - if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<UINT32>(SCCOL_MAX) ) + if ( nPos < MAXSUBTOTAL && nColCount <= sal::static_int_cast<sal_uInt32>(SCCOL_MAX) ) { - aParam.bGroupActive[nPos] = TRUE; + aParam.bGroupActive[nPos] = sal_True; aParam.nField[nPos] = static_cast<SCCOL>(nGroupColumn); delete aParam.pSubTotals[nPos]; @@ -720,7 +720,7 @@ sal_Int32 SAL_CALL ScSubTotalDescriptorBase::getCount() throw(uno::RuntimeExcept ScSubTotalParam aParam; GetData(aParam); - USHORT nCount = 0; + sal_uInt16 nCount = 0; while ( nCount < MAXSUBTOTAL && aParam.bGroupActive[nCount] ) ++nCount; return nCount; @@ -731,7 +731,7 @@ uno::Any SAL_CALL ScSubTotalDescriptorBase::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XSubTotalField> xField(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xField.is()) return uno::makeAny(xField); else @@ -792,7 +792,7 @@ void SAL_CALL ScSubTotalDescriptorBase::setPropertyValue( { sal_Int32 nVal = 0; if ( aValue >>= nVal ) - aParam.nUserIndex = (USHORT)nVal; + aParam.nUserIndex = (sal_uInt16)nVal; } else if (aString.EqualsAscii( SC_UNONAME_MAXFLD )) { @@ -969,13 +969,13 @@ uno::Sequence<table::CellRangeAddress> SAL_CALL ScConsolidationDescriptor::getSo throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aParam.nDataAreaCount; + sal_uInt16 nCount = aParam.nDataAreaCount; if (!aParam.ppDataAreas) nCount = 0; table::CellRangeAddress aRange; uno::Sequence<table::CellRangeAddress> aSeq(nCount); table::CellRangeAddress* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { ScArea* pArea = aParam.ppDataAreas[i]; if (pArea) @@ -996,12 +996,12 @@ void SAL_CALL ScConsolidationDescriptor::setSources( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = (USHORT)aSources.getLength(); + sal_uInt16 nCount = (sal_uInt16)aSources.getLength(); if (nCount) { const table::CellRangeAddress* pAry = aSources.getConstArray(); ScArea** pNew = new ScArea*[nCount]; - USHORT i; + sal_uInt16 i; for (i=0; i<nCount; i++) pNew[i] = new ScArea( pAry[i].Sheet, static_cast<SCCOL>(pAry[i].StartColumn), pAry[i].StartRow, @@ -1097,7 +1097,7 @@ void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint ) { if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocSh = NULL; // invalid @@ -1271,7 +1271,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( if (!rEntry.pStr) rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein) - rEntry.bDoQuery = TRUE; + rEntry.bDoQuery = sal_True; rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR; rEntry.nField = pAry[i].Field; rEntry.bQueryByString = !pAry[i].IsNumeric; @@ -1299,7 +1299,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1307,7 +1307,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1319,7 +1319,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields( SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized for (i=nCount; i<nParamCount; i++) - aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen + aParam.GetEntry(i).bDoQuery = sal_False; // ueberzaehlige Felder zuruecksetzen PutData(aParam); } @@ -1345,7 +1345,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( if (!rEntry.pStr) rEntry.pStr = new String; // sollte nicht sein (soll immer initialisiert sein) - rEntry.bDoQuery = TRUE; + rEntry.bDoQuery = sal_True; rEntry.eConnect = (pAry[i].Connection == sheet::FilterConnection_AND) ? SC_AND : SC_OR; rEntry.nField = pAry[i].Field; rEntry.bQueryByString = !pAry[i].IsNumeric; @@ -1379,7 +1379,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_EMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1387,7 +1387,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( { rEntry.eOp = SC_EQUAL; rEntry.nVal = SC_NONEMPTYFIELDS; - rEntry.bQueryByString = FALSE; + rEntry.bQueryByString = sal_False; *rEntry.pStr = EMPTY_STRING; } break; @@ -1399,7 +1399,7 @@ void SAL_CALL ScFilterDescriptorBase::setFilterFields2( SCSIZE nParamCount = aParam.GetEntryCount(); // Param wird nicht unter 8 resized for (i=nCount; i<nParamCount; i++) - aParam.GetEntry(i).bDoQuery = FALSE; // ueberzaehlige Felder zuruecksetzen + aParam.GetEntry(i).bDoQuery = sal_False; // ueberzaehlige Felder zuruecksetzen PutData(aParam); } @@ -1654,7 +1654,7 @@ ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection(); if (pNames) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pNames->SearchName( aName, nPos )) pRet = (*pNames)[nPos]; } @@ -1678,7 +1678,7 @@ void SAL_CALL ScDatabaseRangeObj::setName( const rtl::OUString& aNewName ) { ScDBDocFunc aFunc(*pDocShell); String aNewStr(aNewName); - BOOL bOk = aFunc.RenameDBRange( aName, aNewStr, TRUE ); + sal_Bool bOk = aFunc.RenameDBRange( aName, aNewStr, sal_True ); if (bOk) aName = aNewStr; } @@ -1716,7 +1716,7 @@ void SAL_CALL ScDatabaseRangeObj::setDataArea( const table::CellRangeAddress& aD aNewData.SetArea( aDataArea.Sheet, (SCCOL)aDataArea.StartColumn, (SCROW)aDataArea.StartRow, (SCCOL)aDataArea.EndColumn, (SCROW)aDataArea.EndRow ); ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } @@ -1734,7 +1734,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScDatabaseRangeObj::getSortDescript ScRange aDBRange; pData->GetArea(aDBRange); SCCOLROW nFieldStart = aParam.bByRow ? static_cast<SCCOLROW>(aDBRange.aStart.Col()) : static_cast<SCCOLROW>(aDBRange.aStart.Row()); - for (USHORT i=0; i<MAXSORT; i++) + for (sal_uInt16 i=0; i<MAXSORT; i++) if ( aParam.bDoSort[i] && aParam.nField[i] >= nFieldStart ) aParam.nField[i] -= nFieldStart; } @@ -1788,7 +1788,7 @@ void ScDatabaseRangeObj::SetQueryParam(const ScQueryParam& rQueryParam) aNewData.SetQueryParam(aParam); aNewData.SetHeader(aParam.bHasHeader); // not in ScDBData::SetQueryParam ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } @@ -1810,7 +1810,7 @@ void ScDatabaseRangeObj::GetSubTotalParam(ScSubTotalParam& rSubTotalParam) const ScRange aDBRange; pData->GetArea(aDBRange); SCCOL nFieldStart = aDBRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( rSubTotalParam.bGroupActive[i] ) { @@ -1835,7 +1835,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam) ScRange aDBRange; pData->GetArea(aDBRange); SCCOL nFieldStart = aDBRange.aStart.Col(); - for (USHORT i=0; i<MAXSUBTOTAL; i++) + for (sal_uInt16 i=0; i<MAXSUBTOTAL; i++) { if ( aParam.bGroupActive[i] ) { @@ -1848,7 +1848,7 @@ void ScDatabaseRangeObj::SetSubTotalParam(const ScSubTotalParam& rSubTotalParam) ScDBData aNewData( *pData ); aNewData.SetSubTotalParam(aParam); ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } @@ -1884,7 +1884,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException) ScDBDocFunc aFunc(*pDocShell); // Import zu wiederholen? - BOOL bContinue = TRUE; + sal_Bool bContinue = sal_True; ScImportParam aImportParam; pData->GetImportParam( aImportParam ); if (aImportParam.bImport && !pData->HasImportSelection()) @@ -1893,12 +1893,12 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException) SCCOL nDummyCol; SCROW nDummyRow; pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow ); - bContinue = aFunc.DoImport( nTab, aImportParam, NULL, TRUE ); //! Api-Flag as parameter + bContinue = aFunc.DoImport( nTab, aImportParam, NULL, sal_True ); //! Api-Flag as parameter } // interne Operationen (sort, query, subtotal) nur, wenn kein Fehler if (bContinue) - aFunc.RepeatDB( pData->GetName(), TRUE, TRUE ); + aFunc.RepeatDB( pData->GetName(), sal_True, sal_True ); } } @@ -1921,8 +1921,8 @@ void SAL_CALL ScDatabaseRangeObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -1939,7 +1939,7 @@ void ScDatabaseRangeObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source = (cppu::OWeakObject*)this; - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -1986,7 +1986,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue( if ( pDocShell && pData ) { ScDBData aNewData( *pData ); - BOOL bDo = TRUE; + sal_Bool bDo = sal_True; String aString(aPropertyName); if ( aString.EqualsAscii( SC_UNONAME_KEEPFORM ) ) @@ -2058,12 +2058,12 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue( { } else - bDo = FALSE; + bDo = sal_False; if (bDo) { ScDBDocFunc aFunc(*pDocShell); - aFunc.ModifyDBData(aNewData, TRUE); + aFunc.ModifyDBData(aNewData, sal_True); } } } @@ -2194,7 +2194,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XDatabaseRanges -ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(USHORT nIndex) +ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) { if (pDocShell) { @@ -2221,7 +2221,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName, throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDBDocFunc aFunc(*pDocShell); @@ -2229,7 +2229,7 @@ void SAL_CALL ScDatabaseRangesObj::addNewByName( const rtl::OUString& aName, String aString(aName); ScRange aNameRange( (SCCOL)aRange.StartColumn, (SCROW)aRange.StartRow, aRange.Sheet, (SCCOL)aRange.EndColumn, (SCROW)aRange.EndRow, aRange.Sheet ); - bDone = aFunc.AddDBRange( aString, aNameRange, TRUE ); + bDone = aFunc.AddDBRange( aString, aNameRange, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2239,12 +2239,12 @@ void SAL_CALL ScDatabaseRangesObj::removeByName( const rtl::OUString& aName ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDBDocFunc aFunc(*pDocShell); String aString(aName); - bDone = aFunc.DeleteDBRange( aString, TRUE ); + bDone = aFunc.DeleteDBRange( aString, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2281,7 +2281,7 @@ uno::Any SAL_CALL ScDatabaseRangesObj::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XDatabaseRange> xRange(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xRange.is()) return uno::makeAny(xRange); else @@ -2328,11 +2328,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDatabaseRangesObj::getElementNames() ScDBCollection* pNames = pDocShell->GetDocument()->GetDBCollection(); if (pNames) { - USHORT nCount = pNames->GetCount(); + sal_uInt16 nCount = pNames->GetCount(); String aName; uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) pAry[i] = (*pNames)[i]->GetName(); return aSeq; @@ -2354,12 +2354,12 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const rtl::OUString& aName ) if (pNames) { String aString(aName); - USHORT nPos = 0; + sal_uInt16 nPos = 0; if (pNames->SearchName( aString, nPos )) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx index c0faf59fa51b..2ddcb60309af 100644 --- a/sc/source/ui/unoobj/defltuno.cxx +++ b/sc/source/ui/unoobj/defltuno.cxx @@ -302,7 +302,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const rtl::OUS beans::PropertyState eRet = beans::PropertyState_DEFAULT_VALUE; - USHORT nWID = pEntry->nWID; + sal_uInt16 nWID = pEntry->nWID; if ( nWID == ATTR_FONT || nWID == ATTR_CJK_FONT || nWID == ATTR_CTL_FONT || !nWID ) { // static default for font is system-dependent, diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx index 6c82871d02da..272c9e95b9c3 100644 --- a/sc/source/ui/unoobj/dispuno.cxx +++ b/sc/source/ui/unoobj/dispuno.cxx @@ -215,7 +215,7 @@ void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject& ScDispatch::ScDispatch(ScTabViewShell* pViewSh) : pViewShell( pViewSh ), - bListeningToView( FALSE ) + bListeningToView( sal_False ) { if (pViewShell) StartListening(*pViewShell); @@ -249,7 +249,7 @@ void SAL_CALL ScDispatch::dispatch( const util::URL& aURL, { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pViewShell && !aURL.Complete.compareToAscii(cURLInsertColumns) ) { ScViewData* pViewData = pViewShell->GetViewData(); @@ -321,7 +321,7 @@ void SAL_CALL ScDispatch::addStatusListener( bListeningToView = sal_True; } - ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD); + ScDBData* pDBData = pViewShell->GetDBData(sal_False,SC_DB_OLD); if ( pDBData ) pDBData->GetImportParam( aLastImport ); lcl_FillDataSource( aEvent, aLastImport ); // modifies State, IsEnabled @@ -340,8 +340,8 @@ void SAL_CALL ScDispatch::removeStatusListener( if ( !aURL.Complete.compareToAscii(cURLDocDataSource) ) { - USHORT nCount = aDataSourceListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aDataSourceListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<frame::XStatusListener> *pObj = aDataSourceListeners[n]; if ( *pObj == xListener ) @@ -371,7 +371,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO if ( pViewShell ) { ScImportParam aNewImport; - ScDBData* pDBData = pViewShell->GetDBData(FALSE,SC_DB_OLD); + ScDBData* pDBData = pViewShell->GetDBData(sal_False,SC_DB_OLD); if ( pDBData ) pDBData->GetImportParam( aNewImport ); @@ -388,7 +388,7 @@ void SAL_CALL ScDispatch::selectionChanged( const ::com::sun::star::lang::EventO lcl_FillDataSource( aEvent, aNewImport ); // modifies State, IsEnabled - for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ ) (*aDataSourceListeners[n])->statusChanged( aEvent ); aLastImport = aNewImport; @@ -407,7 +407,7 @@ void SAL_CALL ScDispatch::disposing( const ::com::sun::star::lang::EventObject& lang::EventObject aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aDataSourceListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aDataSourceListeners.Count(); n++ ) (*aDataSourceListeners[n])->disposing( aEvent ); pViewShell = NULL; diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index f53d2e52a09e..1fabd891551f 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -561,7 +561,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // has become invalid @@ -603,7 +603,7 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) } else if ( rHint.ISA( ScPointerChangedHint ) ) { - USHORT nFlags = ((const ScPointerChangedHint&)rHint).GetFlags(); + sal_uInt16 nFlags = ((const ScPointerChangedHint&)rHint).GetFlags(); if (nFlags & SC_POINTERCHANGED_NUMFMT) { // NumberFormatter-Pointer am Uno-Objekt neu setzen @@ -754,7 +754,7 @@ bool lcl_ParseTarget( const String& rTarget, ScRange& rTargetRange, Rectangle& r return bRangeValid; } -BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, +sal_Bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection, const uno::Sequence< beans::PropertyValue >& rOptions, ScMarkData& rMark, ScPrintSelectionStatus& rStatus, String& rPagesStr ) const @@ -762,7 +762,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, DBG_ASSERT( !rMark.IsMarked() && !rMark.IsMultiMarked(), "FillRenderMarkData: MarkData must be empty" ); DBG_ASSERT( pDocShell, "FillRenderMarkData: DocShell must be set" ); - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; uno::Reference<frame::XController> xView; @@ -815,11 +815,11 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY ); if ( pSelObj && pSelObj->GetDocShell() == pDocShell ) { - BOOL bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL ); - BOOL bCursor = pSelObj->IsCursorOnly(); + sal_Bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL ); + sal_Bool bCursor = pSelObj->IsCursorOnly(); const ScRangeList& rRanges = pSelObj->GetRangeList(); - rMark.MarkFromRangeList( rRanges, FALSE ); + rMark.MarkFromRangeList( rRanges, sal_False ); rMark.MarkToSimple(); if ( rMark.IsMultiMarked() ) @@ -845,7 +845,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, rStatus.SetMode( SC_PRINTSEL_RANGE ); rStatus.SetRanges( rRanges ); - bDone = TRUE; + bDone = sal_True; } // multi selection isn't supported } @@ -874,7 +874,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, if( rMark.IsMarked() && !rMark.IsMultiMarked() ) { rStatus.SetMode( SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS ); - bDone = TRUE; + bDone = sal_True; } } } @@ -888,9 +888,9 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); for (SCTAB nTab = 0; nTab < nTabCount; nTab++) - rMark.SelectTable( nTab, TRUE ); + rMark.SelectTable( nTab, sal_True ); rStatus.SetMode( SC_PRINTSEL_DOCUMENT ); - bDone = TRUE; + bDone = sal_True; } // other selection types aren't supported } @@ -918,7 +918,7 @@ BOOL ScModelObj::FillRenderMarkData( const uno::Any& aSelection, SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount(); for (SCTAB nTab = 0; nTab < nTabCount; nTab++) if (!rViewMark.GetTableSelect(nTab)) - rMark.SelectTable( nTab, FALSE ); + rMark.SelectTable( nTab, sal_False ); } } } @@ -1053,7 +1053,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 } ScPrintFunc aFunc( pDocShell, pDocShell->GetPrinter(), nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() ); - aFunc.SetRenderFlag( TRUE ); + aFunc.SetRenderFlag( sal_True ); Range aPageRange( nRenderer+1, nRenderer+1 ); MultiSelection aPage( aPageRange ); @@ -1063,10 +1063,10 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32 long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab ); long nTabStart = pPrintFuncCache->GetTabStart( nTab ); - (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, FALSE, NULL ); + (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_False, NULL ); ScRange aCellRange; - BOOL bWasCellRange = aFunc.GetLastSourceRange( aCellRange ); + sal_Bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange ); Size aTwips = aFunc.GetPageSize(); awt::Size aPageSize( TwipsToHMM( aTwips.Width() ), TwipsToHMM( aTwips.Height() ) ); @@ -1136,7 +1136,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec { pDrawView = new FmFormView( pModel, pDev ); pDrawView->ShowSdrPage(pDrawView->GetModel()->GetPage(nTab)); - pDrawView->SetPrintPreview( TRUE ); + pDrawView->SetPrintPreview( sal_True ); } ScRange aRange; @@ -1152,7 +1152,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec ScPrintFunc aFunc( pDev, pDocShell, nTab, pPrintFuncCache->GetFirstAttr(nTab), nTotalPages, pSelRange, &aStatus.GetOptions() ); aFunc.SetDrawView( pDrawView ); - aFunc.SetRenderFlag( TRUE ); + aFunc.SetRenderFlag( sal_True ); if( aStatus.GetMode() == SC_PRINTSEL_RANGE_EXCLUSIVELY_OLE_AND_DRAW_OBJECTS ) aFunc.SetExclusivelyDrawOleAndDrawObjects(); @@ -1192,7 +1192,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec //<---i56629 } - (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, TRUE, NULL ); + (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_True, NULL ); // resolve the hyperlinks for PDF export @@ -1307,7 +1307,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno sal_Bool SAL_CALL ScModelObj::isActionLocked() throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bLocked = FALSE; + sal_Bool bLocked = sal_False; if (pDocShell) bLocked = ( pDocShell->GetLockCount() != 0 ); return bLocked; @@ -1337,7 +1337,7 @@ void SAL_CALL ScModelObj::setActionLocks( sal_Int16 nLock ) throw(uno::RuntimeEx sal_Int16 SAL_CALL ScModelObj::resetActionLocks() throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nRet = 0; + sal_uInt16 nRet = 0; if (pDocShell) { nRet = pDocShell->GetLockCount(); @@ -1371,7 +1371,7 @@ void SAL_CALL ScModelObj::calculate() throw(uno::RuntimeException) { ScUnoGuard aGuard; if (pDocShell) - pDocShell->DoRecalc(TRUE); + pDocShell->DoRecalc(sal_True); else { DBG_ERROR("keine DocShell"); //! Exception oder so? @@ -1382,7 +1382,7 @@ void SAL_CALL ScModelObj::calculateAll() throw(uno::RuntimeException) { ScUnoGuard aGuard; if (pDocShell) - pDocShell->DoHardRecalc(TRUE); + pDocShell->DoHardRecalc(sal_True); else { DBG_ERROR("keine DocShell"); //! Exception oder so? @@ -1396,7 +1396,7 @@ sal_Bool SAL_CALL ScModelObj::isAutomaticCalculationEnabled() throw(uno::Runtime return pDocShell->GetDocument()->GetAutoCalc(); DBG_ERROR("keine DocShell"); //! Exception oder so? - return FALSE; + return sal_False; } void SAL_CALL ScModelObj::enableAutomaticCalculation( sal_Bool bEnabled ) @@ -1429,7 +1429,7 @@ void SAL_CALL ScModelObj::protect( const rtl::OUString& aPassword ) throw(uno::R String aString(aPassword); ScDocFunc aFunc(*pDocShell); - aFunc.Protect( TABLEID_DOC, aString, TRUE ); + aFunc.Protect( TABLEID_DOC, aString, sal_True ); } } @@ -1442,7 +1442,7 @@ void SAL_CALL ScModelObj::unprotect( const rtl::OUString& aPassword ) String aString(aPassword); ScDocFunc aFunc(*pDocShell); - BOOL bDone = aFunc.Unprotect( TABLEID_DOC, aString, TRUE ); + sal_Bool bDone = aFunc.Unprotect( TABLEID_DOC, aString, sal_True ); if (!bDone) throw lang::IllegalArgumentException(); } @@ -1455,7 +1455,7 @@ sal_Bool SAL_CALL ScModelObj::isProtected() throw(uno::RuntimeException) return pDocShell->GetDocument()->IsDocProtected(); DBG_ERROR("keine DocShell"); //! Exception oder so? - return FALSE; + return sal_False; } // XDrawPagesSupplier @@ -1542,7 +1542,7 @@ sheet::GoalResult SAL_CALL ScModelObj::seekGoal( String aGoalString(aGoalValue); ScDocument* pDoc = pDocShell->GetDocument(); double fValue = 0.0; - BOOL bFound = pDoc->Solver( + sal_Bool bFound = pDoc->Solver( (SCCOL)aFormulaPosition.Column, (SCROW)aFormulaPosition.Row, aFormulaPosition.Sheet, (SCCOL)aVariablePosition.Column, (SCROW)aVariablePosition.Row, aVariablePosition.Sheet, aGoalString, fValue ); @@ -1591,7 +1591,7 @@ void SAL_CALL ScModelObj::consolidate( if (pDocShell) { const ScConsolidateParam& rParam = aImpl.GetParam(); - pDocShell->DoConsolidate( rParam, TRUE ); + pDocShell->DoConsolidate( rParam, sal_True ); pDocShell->GetDocument()->SetConsolidateDlgData( &rParam ); } } @@ -1667,7 +1667,7 @@ void SAL_CALL ScModelObj::setPropertyValue( const ScDocOptions& rOldOpt = pDoc->GetDocOptions(); ScDocOptions aNewOpt = rOldOpt; - BOOL bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue ); + sal_Bool bOpt = ScDocOptionsHelper::setPropertyValue( aNewOpt, *aPropSet.getPropertyMap(), aPropertyName, aValue ); if (bOpt) { // done... @@ -1737,10 +1737,10 @@ void SAL_CALL ScModelObj::setPropertyValue( } else if ( aString.EqualsAscii( SC_UNO_ISUNDOENABLED ) ) { - BOOL bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bUndoEnabled = ScUnoHelpFunctions::GetBoolFromAny( aValue ); pDoc->EnableUndo( bUndoEnabled ); - USHORT nCount = ( bUndoEnabled ? - static_cast< USHORT >( SvtUndoOptions().GetUndoCount() ) : 0 ); + sal_uInt16 nCount = ( bUndoEnabled ? + static_cast< sal_uInt16 >( SvtUndoOptions().GetUndoCount() ) : 0 ); pDocShell->GetUndoManager()->SetMaxUndoActionCount( nCount ); } else if ( aString.EqualsAscii( SC_UNO_ISADJUSTHEIGHTENABLED ) ) @@ -1781,7 +1781,7 @@ void SAL_CALL ScModelObj::setPropertyValue( // Recalculation after loading is handled separately. //! Recalc only for options that need it? if ( !pDoc->IsImportingXML() ) - pDocShell->DoHardRecalc( TRUE ); + pDocShell->DoHardRecalc( sal_True ); pDocShell->SetDocumentModified(); } } @@ -1847,11 +1847,11 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const rtl::OUString& aPropertyNa } else if ( aString.EqualsAscii( SC_UNO_COLLABELRNG ) ) { - aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, TRUE )); + aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, sal_True )); } else if ( aString.EqualsAscii( SC_UNO_ROWLABELRNG ) ) { - aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, FALSE )); + aRet <<= uno::Reference<sheet::XLabelRanges>(new ScLabelRangesObj( pDocShell, sal_False )); } else if ( aString.EqualsAscii( SC_UNO_AREALINKS ) ) { @@ -1957,7 +1957,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance( ScUnoGuard aGuard; uno::Reference<uno::XInterface> xRet; String aNameStr(aServiceSpecifier); - USHORT nType = ScServiceProvider::GetProviderType(aNameStr); + sal_uInt16 nType = ScServiceProvider::GetProviderType(aNameStr); if ( nType != SC_SERVICE_INVALID ) { // drawing layer tables must be kept as long as the model is alive @@ -2194,9 +2194,9 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange aEvent.Source.set( static_cast< cppu::OWeakObject* >( this ) ); aEvent.Base <<= aEvent.Source; - ULONG nRangeCount = rRanges.Count(); + sal_uLong nRangeCount = rRanges.Count(); aEvent.Changes.realloc( static_cast< sal_Int32 >( nRangeCount ) ); - for ( ULONG nIndex = 0; nIndex < nRangeCount; ++nIndex ) + for ( sal_uLong nIndex = 0; nIndex < nRangeCount; ++nIndex ) { uno::Reference< table::XCellRange > xRangeObj; @@ -2234,7 +2234,7 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange if ( rOperation.compareToAscii("cell-change") == 0 && pDocShell ) { ScMarkData aMarkData; - aMarkData.MarkFromRangeList( rRanges, FALSE ); + aMarkData.MarkFromRangeList( rRanges, sal_False ); ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); for (SCTAB nTab = 0; nTab < nTabCount; nTab++) @@ -2247,14 +2247,14 @@ void ScModelObj::NotifyChanges( const ::rtl::OUString& rOperation, const ScRange if (pScript) { ScRangeList aTabRanges; // collect ranges on this sheet - ULONG nRangeCount = rRanges.Count(); - for ( ULONG nIndex = 0; nIndex < nRangeCount; ++nIndex ) + sal_uLong nRangeCount = rRanges.Count(); + for ( sal_uLong nIndex = 0; nIndex < nRangeCount; ++nIndex ) { ScRange aRange( *rRanges.GetObject( nIndex ) ); if ( aRange.aStart.Tab() == nTab ) aTabRanges.Append( aRange ); } - ULONG nTabRangeCount = aTabRanges.Count(); + sal_uLong nTabRangeCount = aTabRanges.Count(); if ( nTabRangeCount > 0 ) { uno::Reference<uno::XInterface> xTarget; @@ -2352,7 +2352,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) } } -uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 nIndex) const +uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const { if (pDocShell) { @@ -2360,7 +2360,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(INT32 n DBG_ASSERT(pDrawLayer,"kann Draw-Layer nicht anlegen"); if ( pDrawLayer && nIndex >= 0 && nIndex < pDocShell->GetDocument()->GetTableCount() ) { - SdrPage* pPage = pDrawLayer->GetPage((USHORT)nIndex); + SdrPage* pPage = pDrawLayer->GetPage((sal_uInt16)nIndex); DBG_ASSERT(pPage,"Draw-Page nicht gefunden"); if (pPage) { @@ -2383,7 +2383,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScDrawPagesObj::insertNewByIndex( sa String aNewName; pDocShell->GetDocument()->CreateValidTabName(aNewName); ScDocFunc aFunc(*pDocShell); - if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, TRUE, TRUE ) ) + if ( aFunc.InsertTable( (SCTAB)nPos, aNewName, sal_True, sal_True ) ) xRet.set(GetObjectByIndex_Impl( nPos )); } return xRet; @@ -2401,7 +2401,7 @@ void SAL_CALL ScDrawPagesObj::remove( const uno::Reference<drawing::XDrawPage>& { SCTAB nPageNum = static_cast<SCTAB>(pPage->GetPageNum()); ScDocFunc aFunc(*pDocShell); - aFunc.DeleteTable( nPageNum, TRUE, TRUE ); + aFunc.DeleteTable( nPageNum, sal_True, sal_True ); } } } @@ -2492,12 +2492,12 @@ void SAL_CALL ScTableSheetsObj::insertNewByName( const rtl::OUString& aName, sal throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { String aNamStr(aName); ScDocFunc aFunc(*pDocShell); - bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE ); + bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2507,13 +2507,13 @@ void SAL_CALL ScTableSheetsObj::moveByName( const rtl::OUString& aName, sal_Int1 throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { String aNamStr(aName); SCTAB nSource; if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) ) - bDone = pDocShell->MoveTable( nSource, nDestination, FALSE, TRUE ); + bDone = pDocShell->MoveTable( nSource, nDestination, sal_False, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2524,7 +2524,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName, throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { String aNamStr(aName); @@ -2532,7 +2532,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName, SCTAB nSource; if ( pDocShell->GetDocument()->GetTable( aNamStr, nSource ) ) { - bDone = pDocShell->MoveTable( nSource, nDestination, TRUE, TRUE ); + bDone = pDocShell->MoveTable( nSource, nDestination, sal_True, sal_True ); if (bDone) { // #i92477# any index past the last sheet means "append" in MoveTable @@ -2542,7 +2542,7 @@ void SAL_CALL ScTableSheetsObj::copyByName( const rtl::OUString& aName, nResultTab = nTabCount - 1; ScDocFunc aFunc(*pDocShell); - bDone = aFunc.RenameTable( nResultTab, aNewStr, TRUE, TRUE ); + bDone = aFunc.RenameTable( nResultTab, aNewStr, sal_True, sal_True ); } } } @@ -2555,8 +2555,8 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; - BOOL bIllArg = FALSE; + sal_Bool bDone = sal_False; + sal_Bool bIllArg = sal_False; //! Type of aElement can be some specific interface instead of XInterface @@ -2580,17 +2580,17 @@ void SAL_CALL ScTableSheetsObj::insertByName( const rtl::OUString& aName, const { SCTAB nPosition = pDoc->GetTableCount(); ScDocFunc aFunc(*pDocShell); - bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE ); + bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True ); if (bDone) pSheetObj->InitInsertSheet( pDocShell, nPosition ); // Dokument und neuen Range am Objekt setzen } } else - bIllArg = TRUE; + bIllArg = sal_True; } else - bIllArg = TRUE; + bIllArg = sal_True; } if (!bDone) @@ -2607,8 +2607,8 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; - BOOL bIllArg = FALSE; + sal_Bool bDone = sal_False; + sal_Bool bIllArg = sal_False; //! Type of aElement can be some specific interface instead of XInterface @@ -2625,10 +2625,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const if ( pDocShell->GetDocument()->GetTable( aNamStr, nPosition ) ) { ScDocFunc aFunc(*pDocShell); - if ( aFunc.DeleteTable( nPosition, TRUE, TRUE ) ) + if ( aFunc.DeleteTable( nPosition, sal_True, sal_True ) ) { // InsertTable kann jetzt eigentlich nicht schiefgehen... - bDone = aFunc.InsertTable( nPosition, aNamStr, TRUE, TRUE ); + bDone = aFunc.InsertTable( nPosition, aNamStr, sal_True, sal_True ); if (bDone) pSheetObj->InitInsertSheet( pDocShell, nPosition ); } @@ -2640,10 +2640,10 @@ void SAL_CALL ScTableSheetsObj::replaceByName( const rtl::OUString& aName, const } } else - bIllArg = TRUE; + bIllArg = sal_True; } else - bIllArg = TRUE; + bIllArg = sal_True; } if (!bDone) @@ -2660,7 +2660,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { SCTAB nIndex; @@ -2668,7 +2668,7 @@ void SAL_CALL ScTableSheetsObj::removeByName( const rtl::OUString& aName ) if ( pDocShell->GetDocument()->GetTable( aString, nIndex ) ) { ScDocFunc aFunc(*pDocShell); - bDone = aFunc.DeleteTable( nIndex, TRUE, TRUE ); + bDone = aFunc.DeleteTable( nIndex, sal_True, sal_True ); } else { @@ -2687,7 +2687,7 @@ uno::Reference< table::XCell > SAL_CALL ScTableSheetsObj::getCellByPosition( sal throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet))); + uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet))); if (! xSheet.is()) throw lang::IndexOutOfBoundsException(); @@ -2698,7 +2698,7 @@ uno::Reference< table::XCellRange > SAL_CALL ScTableSheetsObj::getCellRangeByPos throw (lang::IndexOutOfBoundsException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((USHORT)nSheet))); + uno::Reference<table::XCellRange> xSheet(static_cast<ScCellRangeObj*>(GetObjectByIndex_Impl((sal_uInt16)nSheet))); if (! xSheet.is()) throw lang::IndexOutOfBoundsException(); @@ -2822,9 +2822,9 @@ sal_Bool SAL_CALL ScTableSheetsObj::hasByName( const rtl::OUString& aName ) { SCTAB nIndex; if ( pDocShell->GetDocument()->GetTable( String(aName), nIndex ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } //------------------------------------------------------------------------ @@ -2885,14 +2885,14 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartCol+nPosition <= nEndCol && nStartCol+nPosition+nCount-1 <= MAXCOL ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab, (SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab ); - bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, TRUE, TRUE ); + bDone = aFunc.InsertCells( aRange, NULL, INS_INSCOLS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2902,14 +2902,14 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Der zu loeschende Bereich muss innerhalb des Objekts liegen if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartCol+nIndex+nCount-1 <= nEndCol ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab, (SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab ); - bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, TRUE, TRUE ); + bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELCOLS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -2991,9 +2991,9 @@ sal_Bool SAL_CALL ScTableColumnsObj::hasByName( const rtl::OUString& aName ) String aString(aName); if ( ::AlphaToCol( nCol, aString) ) if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol ) - return TRUE; + return sal_True; - return FALSE; // nicht gefunden + return sal_False; // nicht gefunden } // XPropertySet @@ -3027,33 +3027,33 @@ void SAL_CALL ScTableColumnsObj::setPropertyValue( { sal_Int32 nNewWidth = 0; if ( aValue >>= nNewWidth ) - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)HMMToTwips(nNewWidth), TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)HMMToTwips(nNewWidth), sal_True, sal_True ); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) ) { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( TRUE, 1, nColArr, nTab, - SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, TRUE, TRUE ); - // FALSE for columns currently has no effect + aFunc.SetWidthOrHeight( sal_True, 1, nColArr, nTab, + SC_SIZE_OPTIMAL, STD_EXTRA_WIDTH, sal_True, sal_True ); + // sal_False for columns currently has no effect } else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE ) ) { //! single function to set/remove all breaks? - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCCOL nCol=nStartCol; nCol<=nEndCol; nCol++) if (bSet) - aFunc.InsertPageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( TRUE, ScAddress(nCol,0,nTab), TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_True, ScAddress(nCol,0,nTab), sal_True, sal_True, sal_True ); } } @@ -3074,7 +3074,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro if ( aNameString.EqualsAscii( SC_UNONAME_CELLWID ) ) { // for hidden column, return original height - USHORT nWidth = pDoc->GetOriginalWidth( nStartCol, nTab ); + sal_uInt16 nWidth = pDoc->GetOriginalWidth( nStartCol, nTab ); aAny <<= (sal_Int32)TwipsToHMM(nWidth); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) @@ -3085,7 +3085,7 @@ uno::Any SAL_CALL ScTableColumnsObj::getPropertyValue( const rtl::OUString& aPro } else if ( aNameString.EqualsAscii( SC_UNONAME_OWIDTH ) ) { - BOOL bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetColFlags( nStartCol, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt ); } else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) ) @@ -3151,14 +3151,14 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if ( pDocShell && nCount > 0 && nPosition >= 0 && nStartRow+nPosition <= nEndRow && nStartRow+nPosition+nCount-1 <= MAXROW ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab, MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab ); - bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, TRUE, TRUE ); + bDone = aFunc.InsertCells( aRange, NULL, INS_INSROWS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -3168,14 +3168,14 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; // Der zu loeschende Bereich muss innerhalb des Objekts liegen if ( pDocShell && nCount > 0 && nIndex >= 0 && nStartRow+nIndex+nCount-1 <= nEndRow ) { ScDocFunc aFunc(*pDocShell); ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab, MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab ); - bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, TRUE, TRUE ); + bDone = aFunc.DeleteCells( aRange, NULL, DEL_DELROWS, sal_True, sal_True ); } if (!bDone) throw uno::RuntimeException(); // no other exceptions specified @@ -3260,13 +3260,13 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( // TODO: It's probably cleaner to use a different property name // for this. - pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (USHORT)HMMToTwips(nNewHeight) ); + pDoc->SetRowHeightOnly( nStartRow, nEndRow, nTab, (sal_uInt16)HMMToTwips(nNewHeight) ); } else { - BOOL bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bOpt = ScUnoHelpFunctions::GetBoolFromAny( aValue ); if (bOpt) - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_OPTIMAL, 0, sal_True, sal_True ); else { //! manually set old heights again? @@ -3277,14 +3277,14 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( { sal_Int32 nNewHeight = 0; if ( aValue >>= nNewHeight ) - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, - (USHORT)HMMToTwips(nNewHeight), TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, SC_SIZE_ORIGINAL, + (sal_uInt16)HMMToTwips(nNewHeight), sal_True, sal_True ); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) { - BOOL bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bVis = ScUnoHelpFunctions::GetBoolFromAny( aValue ); ScSizeMode eMode = bVis ? SC_SIZE_SHOW : SC_SIZE_DIRECT; - aFunc.SetWidthOrHeight( FALSE, 1, nRowArr, nTab, eMode, 0, TRUE, TRUE ); + aFunc.SetWidthOrHeight( sal_False, 1, nRowArr, nTab, eMode, 0, sal_True, sal_True ); // SC_SIZE_DIRECT with size 0: hide } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLFILT ) ) @@ -3298,12 +3298,12 @@ void SAL_CALL ScTableRowsObj::setPropertyValue( else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE) || aNameString.EqualsAscii( SC_UNONAME_MANPAGE) ) { //! single function to set/remove all breaks? - BOOL bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); + sal_Bool bSet = ScUnoHelpFunctions::GetBoolFromAny( aValue ); for (SCROW nRow=nStartRow; nRow<=nEndRow; nRow++) if (bSet) - aFunc.InsertPageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE ); + aFunc.InsertPageBreak( sal_False, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True ); else - aFunc.RemovePageBreak( FALSE, ScAddress(0,nRow,nTab), TRUE, TRUE, TRUE ); + aFunc.RemovePageBreak( sal_False, ScAddress(0,nRow,nTab), sal_True, sal_True, sal_True ); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLBACK ) || aNameString.EqualsAscii( SC_UNONAME_CELLTRAN ) ) { @@ -3336,7 +3336,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper if ( aNameString.EqualsAscii( SC_UNONAME_CELLHGT ) ) { // for hidden row, return original height - USHORT nHeight = pDoc->GetOriginalHeight( nStartRow, nTab ); + sal_uInt16 nHeight = pDoc->GetOriginalHeight( nStartRow, nTab ); aAny <<= (sal_Int32)TwipsToHMM(nHeight); } else if ( aNameString.EqualsAscii( SC_UNONAME_CELLVIS ) ) @@ -3352,7 +3352,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const rtl::OUString& aProper } else if ( aNameString.EqualsAscii( SC_UNONAME_OHEIGHT ) ) { - BOOL bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE); + sal_Bool bOpt = !(pDoc->GetRowFlags( nStartRow, nTab ) & CR_MANUALSIZE); ScUnoHelpFunctions::SetBoolInAny( aAny, bOpt ); } else if ( aNameString.EqualsAscii( SC_UNONAME_NEWPAGE ) ) @@ -3506,7 +3506,7 @@ void SAL_CALL ScAnnotationsObj::insertNew( ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab ); ScDocFunc aFunc( *pDocShell ); - aFunc.ReplaceNote( aPos, rText, 0, 0, TRUE ); + aFunc.ReplaceNote( aPos, rText, 0, 0, sal_True ); } } @@ -3519,11 +3519,11 @@ void SAL_CALL ScAnnotationsObj::removeByIndex( sal_Int32 nIndex ) throw(uno::Run if ( GetAddressByIndex_Impl( nIndex, aPos ) ) { ScMarkData aMarkData; - aMarkData.SelectTable( aPos.Tab(), TRUE ); + aMarkData.SelectTable( aPos.Tab(), sal_True ); aMarkData.SetMultiMarkArea( ScRange(aPos) ); ScDocFunc aFunc(*pDocShell); - aFunc.DeleteContents( aMarkData, IDF_NOTE, TRUE, TRUE ); + aFunc.DeleteContents( aMarkData, IDF_NOTE, sal_True, sal_True ); } } } @@ -3544,7 +3544,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAnnotationsObj::createEnumera sal_Int32 SAL_CALL ScAnnotationsObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - ULONG nCount = 0; + sal_uLong nCount = 0; if (pDocShell) { ScCellIterator aCellIter( pDocShell->GetDocument(), 0,0, nTab, MAXCOL,MAXROW, nTab ); @@ -3612,7 +3612,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XScenarios -BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex ) +sal_Bool ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& rIndex ) { //! Case-insensitiv ???? @@ -3628,16 +3628,16 @@ BOOL ScScenariosObj::GetScenarioIndex_Impl( const rtl::OUString& rName, SCTAB& r if ( aTabName == aString ) { rIndex = i; - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { - USHORT nCount = (USHORT)getCount(); + sal_uInt16 nCount = (sal_uInt16)getCount(); if ( pDocShell && nIndex >= 0 && nIndex < nCount ) return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 ); @@ -3662,13 +3662,13 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName, if ( pDocShell ) { ScMarkData aMarkData; - aMarkData.SelectTable( nTab, TRUE ); + aMarkData.SelectTable( nTab, sal_True ); - USHORT nRangeCount = (USHORT)aRanges.getLength(); + sal_uInt16 nRangeCount = (sal_uInt16)aRanges.getLength(); if (nRangeCount) { const table::CellRangeAddress* pAry = aRanges.getConstArray(); - for (USHORT i=0; i<nRangeCount; i++) + for (sal_uInt16 i=0; i<nRangeCount; i++) { DBG_ASSERT( pAry[i].Sheet == nTab, "addScenario mit falscher Tab" ); ScRange aRange( (SCCOL)pAry[i].StartColumn, (SCROW)pAry[i].StartRow, nTab, @@ -3682,7 +3682,7 @@ void SAL_CALL ScScenariosObj::addNewByName( const rtl::OUString& aName, String aCommStr(aComment); Color aColor( COL_LIGHTGRAY ); // Default - USHORT nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT; + sal_uInt16 nFlags = SC_SCENARIO_SHOWFRAME | SC_SCENARIO_PRINTFRAME | SC_SCENARIO_TWOWAY | SC_SCENARIO_PROTECT; pDocShell->MakeScenario( nTab, aNameStr, aCommStr, aColor, nFlags, aMarkData ); } @@ -3696,7 +3696,7 @@ void SAL_CALL ScScenariosObj::removeByName( const rtl::OUString& aName ) if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) ) { ScDocFunc aFunc(*pDocShell); - aFunc.DeleteTable( nTab+nIndex+1, TRUE, TRUE ); + aFunc.DeleteTable( nTab+nIndex+1, sal_True, sal_True ); } } diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx index 7febe374d0d9..b9548335ac03 100644 --- a/sc/source/ui/unoobj/editsrc.cxx +++ b/sc/source/ui/unoobj/editsrc.cxx @@ -55,7 +55,7 @@ TYPEINIT1( ScHeaderFooterChangedHint, SfxHint ); -ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(USHORT nP) : +ScHeaderFooterChangedHint::ScHeaderFooterChangedHint(sal_uInt16 nP) : nPart( nP ) { } @@ -103,13 +103,13 @@ ScEditEngineDefaulter* ScSharedHeaderFooterEditSource::GetEditEngine() // each ScHeaderFooterEditSource object has its own ScHeaderFooterTextData ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj* pContent, - USHORT nP ) : + sal_uInt16 nP ) : ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( *pContent, nP ) ) { } ScHeaderFooterEditSource::ScHeaderFooterEditSource( ScHeaderFooterContentObj& rContent, - USHORT nP ) : + sal_uInt16 nP ) : ScSharedHeaderFooterEditSource( new ScHeaderFooterTextData( rContent, nP ) ) { } @@ -196,7 +196,7 @@ ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddre aCellPos( rP ), pEditEngine( NULL ), pForwarder( NULL ), - bDataValid( FALSE ) + bDataValid( sal_False ) { if (pDocShell) pDocShell->GetDocument()->AddUnoObject(*this); @@ -237,7 +237,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScEditEngineDefaulter( pEnginePool, TRUE ); + pEditEngine = new ScEditEngineDefaulter( pEnginePool, sal_True ); } pForwarder = new SvxEditEngineForwarder(*pEditEngine); } @@ -250,7 +250,7 @@ SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder() if ( const EditTextObject* pEditObj = pNote->GetEditTextObject() ) pEditEngine->SetText( *pEditObj ); // incl. Umbrueche - bDataValid = TRUE; + bDataValid = sal_True; return pForwarder; } @@ -288,7 +288,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // ungueltig geworden @@ -297,7 +297,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint ) DELETEZ( pEditEngine ); // EditEngine uses document's pool } else if ( nId == SFX_HINT_DATACHANGED ) - bDataValid = FALSE; // Text muss neu geholt werden + bDataValid = sal_False; // Text muss neu geholt werden } } diff --git a/sc/source/ui/unoobj/fielduno.cxx b/sc/source/ui/unoobj/fielduno.cxx index 8e3e39d07ef4..13fed28a0646 100644 --- a/sc/source/ui/unoobj/fielduno.cxx +++ b/sc/source/ui/unoobj/fielduno.cxx @@ -126,26 +126,26 @@ enum ScUnoCollectMode class ScUnoEditEngine : public ScEditEngineDefaulter { ScUnoCollectMode eMode; - USHORT nFieldCount; + sal_uInt16 nFieldCount; TypeId aFieldType; SvxFieldData* pFound; // lokale Kopie - USHORT nFieldPar; + sal_uInt16 nFieldPar; xub_StrLen nFieldPos; - USHORT nFieldIndex; + sal_uInt16 nFieldIndex; public: ScUnoEditEngine(ScEditEngineDefaulter* pSource); ~ScUnoEditEngine(); //! nPos should be xub_StrLen - virtual String CalcFieldValue( const SvxFieldItem& rField, USHORT nPara, USHORT nPos, + virtual String CalcFieldValue( const SvxFieldItem& rField, sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ); - USHORT CountFields(TypeId aType); - SvxFieldData* FindByIndex(USHORT nIndex, TypeId aType); - SvxFieldData* FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType); + sal_uInt16 CountFields(TypeId aType); + SvxFieldData* FindByIndex(sal_uInt16 nIndex, TypeId aType); + SvxFieldData* FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType); - USHORT GetFieldPar() const { return nFieldPar; } + sal_uInt16 GetFieldPar() const { return nFieldPar; } xub_StrLen GetFieldPos() const { return nFieldPos; } }; @@ -170,7 +170,7 @@ ScUnoEditEngine::~ScUnoEditEngine() } String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField, - USHORT nPara, USHORT nPos, Color*& rTxtColor, Color*& rFldColor ) + sal_uInt16 nPara, sal_uInt16 nPos, Color*& rTxtColor, Color*& rFldColor ) { String aRet(EditEngine::CalcFieldValue( rField, nPara, nPos, rTxtColor, rFldColor )); if (eMode != SC_UNO_COLLECT_NONE) @@ -199,7 +199,7 @@ String ScUnoEditEngine::CalcFieldValue( const SvxFieldItem& rField, return aRet; } -USHORT ScUnoEditEngine::CountFields(TypeId aType) +sal_uInt16 ScUnoEditEngine::CountFields(TypeId aType) { eMode = SC_UNO_COLLECT_COUNT; aFieldType = aType; @@ -211,7 +211,7 @@ USHORT ScUnoEditEngine::CountFields(TypeId aType) return nFieldCount; } -SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType) +SvxFieldData* ScUnoEditEngine::FindByIndex(sal_uInt16 nIndex, TypeId aType) { eMode = SC_UNO_COLLECT_FINDINDEX; nFieldIndex = nIndex; @@ -224,7 +224,7 @@ SvxFieldData* ScUnoEditEngine::FindByIndex(USHORT nIndex, TypeId aType) return pFound; } -SvxFieldData* ScUnoEditEngine::FindByPos(USHORT nPar, xub_StrLen nPos, TypeId aType) +SvxFieldData* ScUnoEditEngine::FindByPos(sal_uInt16 nPar, xub_StrLen nPos, TypeId aType) { eMode = SC_UNO_COLLECT_FINDPOS; nFieldPar = nPar; @@ -291,15 +291,15 @@ void ScCellFieldsObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XIndexAccess (via XTextFields) -ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(INT32 Index) const +ScCellFieldObj* ScCellFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const { //! Feld-Funktionen muessen an den Forwarder !!! ScEditEngineDefaulter* pEditEngine = ((ScCellEditSource*)pEditSource)->GetEditEngine(); ScUnoEditEngine aTempEngine(pEditEngine); - if ( aTempEngine.FindByIndex( (USHORT)Index, NULL ) ) // in der Zelle ist der Typ egal + if ( aTempEngine.FindByIndex( (sal_uInt16)Index, NULL ) ) // in der Zelle ist der Typ egal { - USHORT nPar = aTempEngine.GetFieldPar(); + sal_uInt16 nPar = aTempEngine.GetFieldPar(); xub_StrLen nPos = aTempEngine.GetFieldPos(); ESelection aSelection( nPar, nPos, nPar, nPos+1 ); // Feld ist 1 Zeichen return new ScCellFieldObj( pDocShell, aCellPos, aSelection ); @@ -634,7 +634,7 @@ void SAL_CALL ScCellFieldObj::attach( const uno::Reference<text::XTextRange>& xT uno::Reference<text::XText> xText(xTextRange->getText()); if (xText.is()) { - xText->insertTextContent( xTextRange, this, TRUE ); + xText->insertTextContent( xTextRange, this, sal_True ); } } } @@ -700,7 +700,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue( { SvxURLField* pURL = (SvxURLField*)pField; // ist eine Kopie in der ScUnoEditEngine - BOOL bOk = TRUE; + sal_Bool bOk = sal_True; if ( aNameString.EqualsAscii( SC_UNONAME_URL ) ) { if (aValue >>= aStrVal) @@ -717,7 +717,7 @@ void SAL_CALL ScCellFieldObj::setPropertyValue( pURL->SetTargetFrame( aStrVal ); } else - bOk = FALSE; + bOk = sal_False; if (bOk) { @@ -870,7 +870,7 @@ uno::Sequence<rtl::OUString> SAL_CALL ScCellFieldObj::getSupportedServiceNames() //------------------------------------------------------------------------ -ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, USHORT nP, USHORT nT) : +ScHeaderFieldsObj::ScHeaderFieldsObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, sal_uInt16 nT) : pContentObj( pContent ), nPart( nP ), nType( nT ), @@ -911,7 +911,7 @@ ScHeaderFieldsObj::~ScHeaderFieldsObj() // XIndexAccess (via XTextFields) -ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const +ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(sal_Int32 Index) const { //! Feld-Funktionen muessen an den Forwarder !!! ScEditEngineDefaulter* pEditEngine = ((ScHeaderFooterEditSource*)pEditSource)->GetEditEngine(); @@ -929,13 +929,13 @@ ScHeaderFieldObj* ScHeaderFieldsObj::GetObjectByIndex_Impl(INT32 Index) const case SC_SERVICE_SHEETFIELD: aTypeId = TYPE(SvxTableField); break; // bei SC_SERVICE_INVALID bleibt TypeId Null } - SvxFieldData* pData = aTempEngine.FindByIndex( (USHORT)Index, aTypeId ); + SvxFieldData* pData = aTempEngine.FindByIndex( (sal_uInt16)Index, aTypeId ); if ( pData ) { - USHORT nPar = aTempEngine.GetFieldPar(); + sal_uInt16 nPar = aTempEngine.GetFieldPar(); xub_StrLen nPos = aTempEngine.GetFieldPos(); - USHORT nFieldType = nType; + sal_uInt16 nFieldType = nType; if ( nFieldType == SC_SERVICE_INVALID ) { if ( pData->ISA( SvxPageField ) ) nFieldType = SC_SERVICE_PAGEFIELD; @@ -1125,8 +1125,8 @@ sal_Int16 lcl_SvxToUnoFileFormat( SvxFileFormat nSvxValue ) //UNUSED2008-05 pEditSource = NULL; //UNUSED2008-05 } -ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, USHORT nP, - USHORT nT, const ESelection& rSel) : +ScHeaderFieldObj::ScHeaderFieldObj(ScHeaderFooterContentObj* pContent, sal_uInt16 nP, + sal_uInt16 nT, const ESelection& rSel) : OComponentHelper( getMutex() ), pPropSet( (nT == SC_SERVICE_FILEFIELD) ? lcl_GetFileFieldPropertySet() : lcl_GetHeaderFieldPropertySet() ), pContentObj( pContent ), @@ -1208,7 +1208,7 @@ void SAL_CALL ScHeaderFieldObj::release() throw() OComponentHelper::release(); } -void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, USHORT nP, +void ScHeaderFieldObj::InitDoc( ScHeaderFooterContentObj* pContent, sal_uInt16 nP, const ESelection& rSel ) { if ( pContent && !pEditSource ) @@ -1328,7 +1328,7 @@ void SAL_CALL ScHeaderFieldObj::attach( const uno::Reference<text::XTextRange>& uno::Reference<text::XText> xText(xTextRange->getText()); if (xText.is()) { - xText->insertTextContent( xTextRange, this, TRUE ); + xText->insertTextContent( xTextRange, this, sal_True ); } } } diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx index 6da02cf9e4e3..544f433b6564 100644 --- a/sc/source/ui/unoobj/fmtuno.cxx +++ b/sc/source/ui/unoobj/fmtuno.cxx @@ -137,7 +137,7 @@ ScCondFormatEntryItem::ScCondFormatEntryItem() : //------------------------------------------------------------------------ ScTableConditionalFormat::ScTableConditionalFormat( - ScDocument* pDoc, ULONG nKey, FormulaGrammar::Grammar eGrammar) + ScDocument* pDoc, sal_uLong nKey, FormulaGrammar::Grammar eGrammar) { // Eintrag aus dem Dokument lesen... @@ -153,8 +153,8 @@ ScTableConditionalFormat::ScTableConditionalFormat( if (pDoc->IsInExternalReferenceMarking()) pFormat->MarkUsedExternalReferences(); - USHORT nEntryCount = pFormat->Count(); - for (USHORT i=0; i<nEntryCount; i++) + sal_uInt16 nEntryCount = pFormat->Count(); + for (sal_uInt16 i=0; i<nEntryCount; i++) { ScCondFormatEntryItem aItem; const ScCondFormatEntry* pFormatEntry = pFormat->GetEntry(i); @@ -190,8 +190,8 @@ void ScTableConditionalFormat::FillFormat( ScConditionalFormat& rFormat, // ScConditionalFormat = Core-Struktur, muss leer sein DBG_ASSERT( rFormat.IsEmpty(), "FillFormat: Format nicht leer" ); - USHORT nCount = (USHORT)aEntries.Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = (sal_uInt16)aEntries.Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ScTableConditionalEntry* pEntry = (ScTableConditionalEntry*)aEntries.GetObject(i); if ( !pEntry ) @@ -243,7 +243,7 @@ void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry // XSheetConditionalFormat -ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(USHORT nIndex) const +ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const { return (ScTableConditionalEntry*)aEntries.GetObject(nIndex); } @@ -388,7 +388,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XSheetConditionalEntry> xEntry(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xEntry.is()) return uno::makeAny(xEntry); else @@ -429,7 +429,7 @@ uno::Any SAL_CALL ScTableConditionalFormat::getByName( const rtl::OUString& aNam for (long i=0; i<nCount; i++) if ( aName == lcl_GetEntryNameFromIndex(i) ) { - xEntry.set(GetObjectByIndex_Impl((USHORT)i)); + xEntry.set(GetObjectByIndex_Impl((sal_uInt16)i)); break; } @@ -462,9 +462,9 @@ sal_Bool SAL_CALL ScTableConditionalFormat::hasByName( const rtl::OUString& aNam long nCount = aEntries.Count(); for (long i=0; i<nCount; i++) if ( aName == lcl_GetEntryNameFromIndex(i) ) - return TRUE; + return sal_True; - return FALSE; + return sal_False; } // XUnoTunnel @@ -607,30 +607,30 @@ void SAL_CALL ScTableConditionalEntry::setStyleName( const rtl::OUString& aStyle //------------------------------------------------------------------------ -ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey, +ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, sal_uLong nKey, const formula::FormulaGrammar::Grammar eGrammar) : aPropSet( lcl_GetValidatePropertyMap() ) { // Eintrag aus dem Dokument lesen... - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( pDoc && nKey ) { const ScValidationData* pData = pDoc->GetValidationEntry( nKey ); if (pData) { - nMode = sal::static_int_cast<USHORT>( pData->GetOperation() ); + nMode = sal::static_int_cast<sal_uInt16>( pData->GetOperation() ); aSrcPos = pData->GetValidSrcPos(); // #b4974740# valid pos for expressions aExpr1 = pData->GetExpression( aSrcPos, 0, 0, eGrammar ); aExpr2 = pData->GetExpression( aSrcPos, 1, 0, eGrammar ); meGrammar1 = meGrammar2 = eGrammar; - nValMode = sal::static_int_cast<USHORT>( pData->GetDataMode() ); + nValMode = sal::static_int_cast<sal_uInt16>( pData->GetDataMode() ); bIgnoreBlank = pData->IsIgnoreBlank(); nShowList = pData->GetListType(); bShowInput = pData->GetInput( aInputTitle, aInputMessage ); ScValidErrorStyle eStyle; bShowError = pData->GetErrMsg( aErrorTitle, aErrorMessage, eStyle ); - nErrorStyle = sal::static_int_cast<USHORT>( eStyle ); + nErrorStyle = sal::static_int_cast<sal_uInt16>( eStyle ); // During save to XML, sheet::ValidationType_ANY formulas are not // saved, even if in the list, see @@ -639,7 +639,7 @@ ScTableValidationObj::ScTableValidationObj(ScDocument* pDoc, ULONG nKey, if (nValMode != SC_VALID_ANY && pDoc->IsInExternalReferenceMarking()) pData->MarkUsedExternalReferences(); - bFound = TRUE; + bFound = sal_True; } } if (!bFound) @@ -694,10 +694,10 @@ void ScTableValidationObj::ClearData_Impl() { nMode = SC_COND_NONE; nValMode = SC_VALID_ANY; - bIgnoreBlank = TRUE; + bIgnoreBlank = sal_True; nShowList = sheet::TableValidationVisibility::UNSORTED; - bShowInput = FALSE; - bShowError = FALSE; + bShowInput = sal_False; + bShowError = sal_False; nErrorStyle = SC_VALERR_STOP; aSrcPos.Set(0,0,0); aExpr1.Erase(); @@ -728,7 +728,7 @@ void SAL_CALL ScTableValidationObj::setOperator( sheet::ConditionOperator nOpera throw(uno::RuntimeException) { ScUnoGuard aGuard; - nMode = sal::static_int_cast<USHORT>( lcl_ConditionOperatorToMode( nOperator ) ); + nMode = sal::static_int_cast<sal_uInt16>( lcl_ConditionOperatorToMode( nOperator ) ); } rtl::OUString SAL_CALL ScTableValidationObj::getFormula1() throw(uno::RuntimeException) diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx index 7012b477050c..63288e891551 100644 --- a/sc/source/ui/unoobj/funcuno.cxx +++ b/sc/source/ui/unoobj/funcuno.cxx @@ -105,7 +105,7 @@ ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) : pTempDoc = CreateDocument(); else { - rCache.SetInUse( TRUE ); + rCache.SetInUse( sal_True ); if ( !rCache.GetDocument() ) rCache.SetDocument( CreateDocument() ); } @@ -116,7 +116,7 @@ ScTempDocSource::~ScTempDocSource() if ( pTempDoc ) delete pTempDoc; else - rCache.SetInUse( FALSE ); + rCache.SetInUse( sal_False ); } ScDocument* ScTempDocSource::GetDocument() @@ -131,7 +131,7 @@ ScDocument* ScTempDocSource::GetDocument() ScTempDocCache::ScTempDocCache() : pDoc( NULL ), - bInUse( FALSE ) + bInUse( sal_False ) { } @@ -160,7 +160,7 @@ void ScTempDocCache::Clear() //! merge this with ScAreaLink::Refresh //! copy directly without a clipboard document? -BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, +sal_Bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, ScDocument* pDestDoc, const ScAddress& rDestPos ) { SCTAB nSrcTab = rSrcRange.aStart.Tab(); @@ -200,7 +200,7 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, if ( (nFormat % SV_COUNTRY_LANGUAGE_OFFSET) == 0 ) { ScFormulaCell* pFCell = static_cast<ScFormulaCell*>(pCell); - USHORT nErrCode = pFCell->GetErrCode(); + sal_uInt16 nErrCode = pFCell->GetErrCode(); if ( nErrCode == 0 && pFCell->IsValue() ) { sal_uInt32 nNewFormat = pFCell->GetStandardFormat( *pClipDoc->GetFormatTable(), nFormat ); @@ -216,10 +216,10 @@ BOOL lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange, ScMarkData aDestMark; aDestMark.SelectOneTable( nDestTab ); aDestMark.SetMarkArea( aNewRange ); - pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, FALSE ); + pDestDoc->CopyFromClip( aNewRange, aDestMark, IDF_ALL & ~IDF_FORMULA, NULL, pClipDoc, sal_False ); delete pClipDoc; - return TRUE; + return sal_True; } //------------------------------------------------------------------------ @@ -329,7 +329,7 @@ void SAL_CALL ScFunctionAccess::setPropertyValue( // options aren't initialized from configuration - always get the same default behaviour - BOOL bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue ); + sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( *pOptions, aPropertyMap, aPropertyName, aValue ); if (!bDone) throw beans::UnknownPropertyException(); } @@ -356,7 +356,7 @@ SC_IMPL_DUMMY_PROPERTY_LISTENER( ScFunctionAccess ) // XFunctionAccess -BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler ) +sal_Bool lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,const ScCompiler& rCompiler ) { // function names are always case-insensitive String aUpper( ScGlobal::pCharClass->upper( rName ) ); @@ -368,28 +368,28 @@ BOOL lcl_AddFunctionToken( ScTokenArray& rArray, const rtl::OUString& rName,cons if ( eOp != ocNone ) { rArray.AddOpCode( eOp ); - return TRUE; + return sal_True; } // 2. old add in functions - USHORT nIndex; + sal_uInt16 nIndex; if ( ScGlobal::GetFuncCollection()->SearchFunc( aUpper, nIndex ) ) { rArray.AddExternal( aUpper.GetBuffer() ); - return TRUE; + return sal_True; } // 3. new (uno) add in functions - String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, FALSE )); + String aIntName(ScGlobal::GetAddInCollection()->FindFunction( aUpper, sal_False )); if (aIntName.Len()) { rArray.AddExternal( aIntName.GetBuffer() ); // international name - return TRUE; + return sal_True; } - return FALSE; // no valid function name + return sal_False; // no valid function name } void lcl_AddRef( ScTokenArray& rArray, long nStartRow, long nColCount, long nRowCount ) @@ -521,7 +521,7 @@ class ArrayOfArrayProc { public: static void processSequences( ScDocument* pDoc, const uno::Any& rArg, ScTokenArray& rTokenArr, - long& rDocRow, BOOL& rArgErr, BOOL& rOverflow ) + long& rDocRow, sal_Bool& rArgErr, sal_Bool& rOverflow ) { SequencesContainer< T > aContainer( rArg, rTokenArr, rDocRow, pDoc ); aContainer.process(); @@ -579,8 +579,8 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, // add arguments to token array // - BOOL bArgErr = FALSE; - BOOL bOverflow = FALSE; + sal_Bool bArgErr = sal_False; + sal_Bool bOverflow = sal_False; long nDocRow = 0; long nArgCount = aArguments.getLength(); const uno::Any* pArgArr = aArguments.getConstArray(); @@ -656,12 +656,12 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, long nRowCount = aSrcRange.aEnd.Row() - aSrcRange.aStart.Row() + 1; if ( nStartRow + nRowCount > MAXROWCOUNT ) - bOverflow = TRUE; + bOverflow = sal_True; else { // copy data if ( !lcl_CopyData( pSrcDoc, aSrcRange, pDoc, ScAddress( 0, (SCROW)nDocRow, 0 ) ) ) - bOverflow = TRUE; + bOverflow = sal_True; } nDocRow += nRowCount; @@ -669,13 +669,13 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, lcl_AddRef( aTokenArr, nStartRow, nColCount, nRowCount ); } else - bArgErr = TRUE; + bArgErr = sal_True; } else - bArgErr = TRUE; + bArgErr = sal_True; } else - bArgErr = TRUE; // invalid type + bArgErr = sal_True; // invalid type } aTokenArr.AddOpCode(ocClose); aTokenArr.AddOpCode(ocStop); @@ -691,14 +691,14 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, // GRAM_PODF_A1 doesn't really matter for the token array but fits with // other API compatibility grammars. ScFormulaCell* pFormula = new ScFormulaCell( pDoc, aFormulaPos, - &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (BYTE)(mbArray ? MM_FORMULA : MM_NONE) ); + &aTokenArr, formula::FormulaGrammar::GRAM_PODF_A1, (sal_uInt8)(mbArray ? MM_FORMULA : MM_NONE) ); pDoc->PutCell( aFormulaPos, pFormula ); //! necessary? // call GetMatrix before GetErrCode because GetMatrix always recalculates // if there is no matrix result const ScMatrix* pMat = mbArray ? pFormula->GetMatrix() : 0; - USHORT nErrCode = pFormula->GetErrCode(); + sal_uInt16 nErrCode = pFormula->GetErrCode(); if ( nErrCode == 0 ) { if ( pMat ) @@ -726,7 +726,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const rtl::OUString& aName, else { // any other error: IllegalArgumentException - bArgErr = TRUE; + bArgErr = sal_True; } pDoc->DeleteAreaTab( 0, 0, MAXCOL, MAXROW, 0, IDF_ALL ); diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx index a119eda13a32..ee6c3ff1988a 100644 --- a/sc/source/ui/unoobj/linkuno.cxx +++ b/sc/source/ui/unoobj/linkuno.cxx @@ -129,8 +129,8 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - USHORT nCount = pLinkManager->GetLinks().Count(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 i=0; i<nCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScTableLink)) @@ -187,8 +187,8 @@ void SAL_CALL ScSheetLinkObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -205,7 +205,7 @@ void ScSheetLinkObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -213,7 +213,7 @@ void ScSheetLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh ) { ScTableLink* pLink = GetLink_Impl(); if( pLink ) - pLink->SetRefreshDelay( (ULONG) nRefresh ); + pLink->SetRefreshDelay( (sal_uLong) nRefresh ); } // XPropertySet @@ -417,11 +417,11 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XSheetLinks -ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(INT32 nIndex) +ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { if (pDocShell) { - INT32 nCount = 0; + sal_Int32 nCount = 0; ScStrCollection aNames; // um doppelte wegzulassen ScDocument* pDoc = pDocShell->GetDocument(); SCTAB nTabCount = pDoc->GetTableCount(); @@ -480,7 +480,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScSheetLinksObj::createEnumerat sal_Int32 SAL_CALL ScSheetLinksObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nCount = 0; + sal_Int32 nCount = 0; if (pDocShell) { ScStrCollection aNames; // um doppelte wegzulassen @@ -556,10 +556,10 @@ sal_Bool SAL_CALL ScSheetLinksObj::hasByName( const rtl::OUString& aName ) //! case-insensitiv ??? String aLinkDoc(pDoc->GetLinkDoc( nTab )); if ( aLinkDoc == aNameStr ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(uno::RuntimeException) @@ -574,10 +574,10 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u SCTAB nTabCount = pDoc->GetTableCount(); String aName; - INT32 nLinkCount = getCount(); + sal_Int32 nLinkCount = getCount(); uno::Sequence<rtl::OUString> aSeq(nLinkCount); rtl::OUString* pAry = aSeq.getArray(); - USHORT nPos = 0; + sal_uInt16 nPos = 0; for (SCTAB nTab=0; nTab<nTabCount; nTab++) { if (pDoc->IsLinked(nTab)) @@ -598,14 +598,14 @@ uno::Sequence<rtl::OUString> SAL_CALL ScSheetLinksObj::getElementNames() throw(u //------------------------------------------------------------------------ -ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos ) +ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, sal_uInt16 nPos ) { if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - USHORT nTotalCount = pLinkManager->GetLinks().Count(); - USHORT nAreaCount = 0; - for (USHORT i=0; i<nTotalCount; i++) + sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count(); + sal_uInt16 nAreaCount = 0; + for (sal_uInt16 i=0; i<nTotalCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScAreaLink)) @@ -619,7 +619,7 @@ ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, USHORT nPos ) return NULL; // nicht gefunden } -ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, USHORT nP) : +ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, sal_uInt16 nP) : aPropSet( lcl_GetSheetLinkMap() ), pDocShell( pDocSh ), nPos( nP ) @@ -670,7 +670,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr String aOptions (pLink->GetOptions()); String aSource (pLink->GetSource()); ScRange aDest (pLink->GetDestArea()); - ULONG nRefresh = pLink->GetRefreshDelay(); + sal_uLong nRefresh = pLink->GetRefreshDelay(); //! Undo fuer Loeschen //! Undo zusammenfassen @@ -679,7 +679,7 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr pLinkManager->Remove( pLink ); pLink = NULL; // bei Remove geloescht - BOOL bFitBlock = TRUE; // verschieben, wenn durch Update Groesse geaendert + sal_Bool bFitBlock = sal_True; // verschieben, wenn durch Update Groesse geaendert if (pNewFile) { aFile = String( *pNewFile ); @@ -694,11 +694,11 @@ void ScAreaLinkObj::Modify_Impl( const rtl::OUString* pNewFile, const rtl::OUStr if (pNewDest) { ScUnoConversion::FillScRange( aDest, *pNewDest ); - bFitBlock = FALSE; // neuer Bereich angegeben -> keine Inhalte verschieben + bFitBlock = sal_False; // neuer Bereich angegeben -> keine Inhalte verschieben } ScDocFunc aFunc(*pDocShell); - aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, TRUE ); + aFunc.InsertAreaLink( aFile, aFilter, aOptions, aSource, aDest, nRefresh, bFitBlock, sal_True ); } } @@ -706,7 +706,7 @@ void ScAreaLinkObj::ModifyRefreshDelay_Impl( sal_Int32 nRefresh ) { ScAreaLink* pLink = lcl_GetAreaLink( pDocShell, nPos ); if( pLink ) - pLink->SetRefreshDelay( (ULONG) nRefresh ); + pLink->SetRefreshDelay( (sal_uLong) nRefresh ); } // XRefreshable @@ -738,8 +738,8 @@ void SAL_CALL ScAreaLinkObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -756,7 +756,7 @@ void ScAreaLinkObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -960,10 +960,10 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XAreaLinks -ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(INT32 nIndex) +ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { if ( pDocShell && nIndex >= 0 && nIndex < getCount() ) - return new ScAreaLinkObj( pDocShell, (USHORT)nIndex ); + return new ScAreaLinkObj( pDocShell, (sal_uInt16)nIndex ); return NULL; // nicht gefunden } @@ -989,14 +989,14 @@ void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestP ScDocFunc aFunc(*pDocShell); aFunc.InsertAreaLink( aFileStr, aFilterStr, aOptionStr, aSourceStr, ScRange(aDestAddr), - 0, FALSE, TRUE ); // keine Inhalte verschieben + 0, sal_False, sal_True ); // keine Inhalte verschieben } } void SAL_CALL ScAreaLinksObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (USHORT)nIndex); + ScAreaLink* pLink = lcl_GetAreaLink(pDocShell, (sal_uInt16)nIndex); if (pLink) { //! SetAddUndo oder so @@ -1020,12 +1020,12 @@ uno::Reference<container::XEnumeration> SAL_CALL ScAreaLinksObj::createEnumerati sal_Int32 SAL_CALL ScAreaLinksObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nAreaCount = 0; + sal_Int32 nAreaCount = 0; if (pDocShell) { sfx2::LinkManager* pLinkManager = pDocShell->GetDocument()->GetLinkManager(); - USHORT nTotalCount = pLinkManager->GetLinks().Count(); - for (USHORT i=0; i<nTotalCount; i++) + sal_uInt16 nTotalCount = pLinkManager->GetLinks().Count(); + for (sal_uInt16 i=0; i<nTotalCount; i++) { ::sfx2::SvBaseLink* pBase = *pLinkManager->GetLinks()[i]; if (pBase->ISA(ScAreaLink)) @@ -1182,8 +1182,8 @@ void SAL_CALL ScDDELinkObj::removeRefreshListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRefreshListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRefreshListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<util::XRefreshListener>* pObj = aRefreshListeners[n]; if ( *pObj == xListener ) @@ -1210,7 +1210,7 @@ uno::Sequence< uno::Sequence< uno::Any > > ScDDELinkObj::getResults( ) ScDocument* pDoc = pDocShell->GetDocument(); if ( pDoc ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) ) { const ScMatrix* pMatrix = pDoc->GetDdeLinkResultMatrix( nPos ); @@ -1248,7 +1248,7 @@ void ScDDELinkObj::setResults( const uno::Sequence< uno::Sequence< uno::Any > >& ScDocument* pDoc = pDocShell->GetDocument(); if ( pDoc ) { - USHORT nPos = 0; + sal_uInt16 nPos = 0; if ( pDoc->FindDdeLink( aAppl, aTopic, aItem, SC_DDE_IGNOREMODE, nPos ) ) { uno::Any aAny; @@ -1271,7 +1271,7 @@ void ScDDELinkObj::Refreshed_Impl() { lang::EventObject aEvent; aEvent.Source.set((cppu::OWeakObject*)this); - for ( USHORT n=0; n<aRefreshListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRefreshListeners.Count(); n++ ) (*aRefreshListeners[n])->refreshed( aEvent ); } @@ -1302,13 +1302,13 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XDDELinks -ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(INT32 nIndex) +ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex) { if (pDocShell) { String aAppl, aTopic, aItem; if ( nIndex <= USHRT_MAX && - pDocShell->GetDocument()->GetDdeLinkData( (USHORT)nIndex, aAppl, aTopic, aItem ) ) + pDocShell->GetDocument()->GetDdeLinkData( (sal_uInt16)nIndex, aAppl, aTopic, aItem ) ) return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem ); } return NULL; @@ -1322,8 +1322,8 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const rtl::OUString& aName) String aAppl, aTopic, aItem; ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nCount = pDoc->GetDdeLinkCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pDoc->GetDdeLinkCount(); + for (sal_uInt16 i=0; i<nCount; i++) { pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem ); if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr ) @@ -1347,7 +1347,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScDDELinksObj::createEnumeratio sal_Int32 SAL_CALL ScDDELinksObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; - INT32 nAreaCount = 0; + sal_Int32 nAreaCount = 0; if (pDocShell) nAreaCount = pDocShell->GetDocument()->GetDdeLinkCount(); return nAreaCount; @@ -1399,11 +1399,11 @@ uno::Sequence<rtl::OUString> SAL_CALL ScDDELinksObj::getElementNames() throw(uno String aAppl, aTopic, aItem; ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nCount = pDoc->GetDdeLinkCount(); + sal_uInt16 nCount = pDoc->GetDdeLinkCount(); uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); - for (USHORT i=0; i<nCount; i++) + for (sal_uInt16 i=0; i<nCount; i++) { pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem ); pAry[i] = lcl_BuildDDEName(aAppl, aTopic, aItem); @@ -1423,15 +1423,15 @@ sal_Bool SAL_CALL ScDDELinksObj::hasByName( const rtl::OUString& aName ) String aAppl, aTopic, aItem; ScDocument* pDoc = pDocShell->GetDocument(); - USHORT nCount = pDoc->GetDdeLinkCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pDoc->GetDdeLinkCount(); + for (sal_uInt16 i=0; i<nCount; i++) { pDoc->GetDdeLinkData( i, aAppl, aTopic, aItem ); if ( lcl_BuildDDEName(aAppl, aTopic, aItem) == aNamStr ) - return TRUE; + return sal_True; } } - return FALSE; + return sal_False; } // XDDELinks @@ -1449,7 +1449,7 @@ uno::Reference< sheet::XDDELink > ScDDELinksObj::addDDELink( ScDocument* pDoc = pDocShell->GetDocument(); if ( pDoc ) { - BYTE nMod = SC_DDE_DEFAULT; + sal_uInt8 nMod = SC_DDE_DEFAULT; switch ( nMode ) { case sheet::DDELinkMode_DEFAULT: diff --git a/sc/source/ui/unoobj/miscuno.cxx b/sc/source/ui/unoobj/miscuno.cxx index 4fdac0288796..3e10dfa837be 100644 --- a/sc/source/ui/unoobj/miscuno.cxx +++ b/sc/source/ui/unoobj/miscuno.cxx @@ -162,7 +162,7 @@ sal_Bool ScUnoHelpFunctions::GetBoolFromAny( const uno::Any& aAny ) { if ( aAny.getValueTypeClass() == uno::TypeClass_BOOLEAN ) return *(sal_Bool*)aAny.getValue(); - return FALSE; + return sal_False; } // static @@ -301,7 +301,7 @@ sal_Bool SAL_CALL ScIndexEnumeration::supportsService( const ::rtl::OUString& Se //UNUSED2008-05 //UNUSED2008-05 sal_Bool SAL_CALL ScEmptyEnumerationAccess::hasElements() throw(uno::RuntimeException) //UNUSED2008-05 { -//UNUSED2008-05 return FALSE; +//UNUSED2008-05 return sal_False; //UNUSED2008-05 } //------------------------------------------------------------------------ @@ -319,7 +319,7 @@ sal_Bool SAL_CALL ScIndexEnumeration::supportsService( const ::rtl::OUString& Se //UNUSED2008-05 sal_Bool SAL_CALL ScEmptyEnumeration::hasMoreElements() throw(uno::RuntimeException) //UNUSED2008-05 { //UNUSED2008-05 ScUnoGuard aGuard; -//UNUSED2008-05 return FALSE; +//UNUSED2008-05 return sal_False; //UNUSED2008-05 } //UNUSED2008-05 //UNUSED2008-05 uno::Any SAL_CALL ScEmptyEnumeration::nextElement() throw(container::NoSuchElementException, diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx index 75686df460d6..efc5b779d8b4 100644 --- a/sc/source/ui/unoobj/nameuno.cxx +++ b/sc/source/ui/unoobj/nameuno.cxx @@ -548,12 +548,12 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName, if ( nUnoType & sheet::NamedRangeFlag::COLUMN_HEADER ) nNewType |= RT_COLHEADER; if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); ScRangeName* pNames = pDoc->GetRangeName(); - USHORT nIndex = 0; + sal_uInt16 nIndex = 0; if (pNames && !pNames->SearchName(aNameStr, nIndex)) { ScRangeName* pNewRanges = new ScRangeName( *pNames ); @@ -564,7 +564,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const rtl::OUString& aName, { ScDocFunc aFunc(*pDocShell); aFunc.SetNewRangeNames( pNewRanges, sal_True ); - bDone = TRUE; + bDone = sal_True; } else { @@ -609,7 +609,7 @@ void SAL_CALL ScNamedRangesObj::removeByName( const rtl::OUString& aName ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScRangeName* pNames = pDocShell->GetDocument()->GetRangeName(); @@ -624,7 +624,7 @@ void SAL_CALL ScNamedRangesObj::removeByName( const rtl::OUString& aName ) pNewRanges->AtFree(nPos); ScDocFunc aFunc(*pDocShell); aFunc.SetNewRangeNames( pNewRanges, sal_True ); - bDone = TRUE; + bDone = sal_True; } } } @@ -761,13 +761,13 @@ sal_Bool SAL_CALL ScNamedRangesObj::hasByName( const rtl::OUString& aName ) /** called from the XActionLockable interface methods on initial locking */ void ScNamedRangesObj::lock() { - pDocShell->GetDocument()->CompileNameFormula( TRUE ); // CreateFormulaString + pDocShell->GetDocument()->CompileNameFormula( sal_True ); // CreateFormulaString } /** called from the XActionLockable interface methods on final unlock */ void ScNamedRangesObj::unlock() { - pDocShell->GetDocument()->CompileNameFormula( FALSE ); // CompileFormulaString + pDocShell->GetDocument()->CompileNameFormula( sal_False ); // CompileFormulaString } // document::XActionLockable @@ -1041,7 +1041,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) throw(uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bDone = FALSE; + sal_Bool bDone = sal_False; if (pDocShell) { ScDocument* pDoc = pDocShell->GetDocument(); @@ -1065,7 +1065,7 @@ void SAL_CALL ScLabelRangesObj::removeByIndex( sal_Int32 nIndex ) pDoc->CompileColRowNameFormula(); pDocShell->PostPaint( 0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_GRID ); pDocShell->SetDocumentModified(); - bDone = TRUE; + bDone = sal_True; //! Undo ?!?! (hier und aus Dialog) } diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx index 0d277fdb19fe..a23ad8fe4793 100644 --- a/sc/source/ui/unoobj/optuno.cxx +++ b/sc/source/ui/unoobj/optuno.cxx @@ -97,7 +97,7 @@ sal_Bool ScDocOptionsHelper::setPropertyValue( ScDocOptions& rOptions, { sal_Int32 nIntVal = 0; if ( aValue >>= nIntVal ) - rOptions.SetIterCount( (USHORT)nIntVal ); + rOptions.SetIterCount( (sal_uInt16)nIntVal ); } break; case PROP_UNO_ITEREPSILON : @@ -176,7 +176,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue( break; case PROP_UNO_NULLDATE: { - USHORT nD, nM, nY; + sal_uInt16 nD, nM, nY; rOptions.GetDate( nD, nM, nY ); util::Date aDate( nD, nM, nY ); aRet <<= aDate; @@ -216,7 +216,7 @@ void SAL_CALL ScDocOptionsObj::setPropertyValue( { ScUnoGuard aGuard; - BOOL bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue ); + sal_Bool bDone = ScDocOptionsHelper::setPropertyValue( aOptions, *GetPropertySet().getPropertyMap(), aPropertyName, aValue ); if (!bDone) ScModelObj::setPropertyValue( aPropertyName, aValue ); diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx index affedff83c7b..1407c12e2618 100644 --- a/sc/source/ui/unoobj/scdetect.cxx +++ b/sc/source/ui/unoobj/scdetect.cxx @@ -125,7 +125,7 @@ static const sal_Char __FAR_DATA pFilterHtmlWeb[] = "calc_HTML_WebQuery"; static const sal_Char __FAR_DATA pFilterRtf[] = "Rich Text Format (StarCalc)"; -static BOOL lcl_MayBeAscii( SvStream& rStream ) +static sal_Bool lcl_MayBeAscii( SvStream& rStream ) { // ASCII/CSV is considered possible if there are no null bytes, or a Byte // Order Mark is present, or if, for Unicode UCS2/UTF-16, all null bytes @@ -136,12 +136,12 @@ static BOOL lcl_MayBeAscii( SvStream& rStream ) const size_t nBufSize = 2048; sal_uInt16 aBuffer[ nBufSize ]; sal_uInt8* pByte = reinterpret_cast<sal_uInt8*>(aBuffer); - ULONG nBytesRead = rStream.Read( pByte, nBufSize*2); + sal_uLong nBytesRead = rStream.Read( pByte, nBufSize*2); if ( nBytesRead >= 2 && (aBuffer[0] == 0xfffe || aBuffer[0] == 0xfeff) ) { // Unicode BOM file may contain null bytes. - return TRUE; + return sal_True; } const sal_uInt16* p = aBuffer; @@ -159,13 +159,13 @@ static BOOL lcl_MayBeAscii( SvStream& rStream ) return nMask != 0; } -static BOOL lcl_MayBeDBase( SvStream& rStream ) +static sal_Bool lcl_MayBeDBase( SvStream& rStream ) { // Look for dbf marker, see connectivity/source/inc/dbase/DTable.hxx // DBFType for values. - const BYTE nValidMarks[] = { + const sal_uInt8 nValidMarks[] = { 0x03, 0x04, 0x05, 0x30, 0x43, 0xB3, 0x83, 0x8b, 0x8e, 0xf5 }; - BYTE nMark; + sal_uInt8 nMark; rStream.Seek(STREAM_SEEK_TO_BEGIN); rStream >> nMark; bool bValidMark = false; @@ -175,24 +175,24 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) bValidMark = true; } if ( !bValidMark ) - return FALSE; + return sal_False; const size_t nHeaderBlockSize = 32; // Empty dbf is >= 32*2+1 bytes in size. const size_t nEmptyDbf = nHeaderBlockSize * 2 + 1; rStream.Seek(STREAM_SEEK_TO_END); - ULONG nSize = rStream.Tell(); + sal_uLong nSize = rStream.Tell(); if ( nSize < nEmptyDbf ) - return FALSE; + return sal_False; // length of header starts at 8 rStream.Seek(8); - USHORT nHeaderLen; + sal_uInt16 nHeaderLen; rStream >> nHeaderLen; if ( nHeaderLen < nEmptyDbf || nSize < nHeaderLen ) - return FALSE; + return sal_False; // Last byte of header must be 0x0d, this is how it's specified. // #i9581#,#i26407# but some applications don't follow the specification @@ -200,8 +200,8 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) // even boundary. Some (#i88577# ) even pad more or pad using a 0x1a ^Z // control character (#i8857#). This results in: // Last byte of header must be 0x0d on 32 bytes boundary. - USHORT nBlocks = (nHeaderLen - 1) / nHeaderBlockSize; - BYTE nEndFlag = 0; + sal_uInt16 nBlocks = (nHeaderLen - 1) / nHeaderBlockSize; + sal_uInt8 nEndFlag = 0; while ( nBlocks > 1 && nEndFlag != 0x0d ) { rStream.Seek( nBlocks-- * nHeaderBlockSize ); rStream >> nEndFlag; @@ -211,12 +211,12 @@ static BOOL lcl_MayBeDBase( SvStream& rStream ) } #if 0 -static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) +static sal_Bool lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) { if ( !pFilter ) - return FALSE; + return sal_False; - // TRUE for XML file or template + // sal_True for XML file or template // (template filter has no internal name -> allow configuration key names) String aName(pFilter->GetFilterName()); @@ -310,7 +310,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) SfxAllItemSet *pSet = new SfxAllItemSet( SFX_APP()->GetPool() ); TransformParameters( SID_OPENDOC, lDescriptor, *pSet ); - SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, FALSE ); + SFX_ITEMSET_ARG( pSet, pItem, SfxBoolItem, SID_DOC_READONLY, sal_False ); bWasReadOnly = pItem && pItem->GetValue(); @@ -333,10 +333,10 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pFilter = aMatcher.GetFilter4EA( aTypeName ); // ctor of SfxMedium uses owner transition of ItemSet - SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, FALSE, NULL, pSet ); - aMedium.UseInteractionHandler( TRUE ); + SfxMedium aMedium( aURL, bWasReadOnly ? STREAM_STD_READ : STREAM_STD_READWRITE, sal_False, NULL, pSet ); + aMedium.UseInteractionHandler( sal_True ); - BOOL bIsStorage = aMedium.IsStorage(); + sal_Bool bIsStorage = aMedium.IsStorage(); if ( aMedium.GetErrorCode() == ERRCODE_NONE ) { // remember input stream and content and put them into the descriptor later @@ -380,7 +380,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) String aFilterName; if ( pFilter ) aFilterName = pFilter->GetName(); - aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : FALSE, &aFilterName ); + aTypeName = SfxFilter::GetTypeFromStorage( xStorage, pFilter ? pFilter->IsOwnTemplateFormat() : sal_False, &aFilterName ); } catch( lang::WrappedTargetException& aWrap ) { @@ -441,22 +441,22 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pFilter = 0; if ( pStream ) { - SotStorageRef aStorage = new SotStorage ( pStream, FALSE ); + SotStorageRef aStorage = new SotStorage ( pStream, sal_False ); if ( !aStorage->GetError() ) { // Excel-5: detect through contained streams // there are some "excel" formats from 3rd party vendors that need to be distinguished String aStreamName(RTL_CONSTASCII_STRINGPARAM("Workbook")); - BOOL bExcel97Stream = ( aStorage->IsStream( aStreamName ) ); + sal_Bool bExcel97Stream = ( aStorage->IsStream( aStreamName ) ); aStreamName = String(RTL_CONSTASCII_STRINGPARAM("Book")); - BOOL bExcel5Stream = ( aStorage->IsStream( aStreamName ) ); + sal_Bool bExcel5Stream = ( aStorage->IsStream( aStreamName ) ); if ( bExcel97Stream || bExcel5Stream ) { if ( bExcel97Stream ) { String aOldName; - BOOL bIsCalcFilter = TRUE; + sal_Bool bIsCalcFilter = sal_True; if ( pPreselectedFilter ) { // cross filter; now this should be a type detection only, not a filter detection @@ -485,7 +485,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) else if ( bExcel5Stream ) { String aOldName; - BOOL bIsCalcFilter = TRUE; + sal_Bool bIsCalcFilter = sal_True; if ( pPreselectedFilter ) { // cross filter; now this should be a type detection only, not a filter detection @@ -529,18 +529,18 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) #define M_ALT(ANZ) (0x0200+(ANZ)) #define M_ENDE 0x8000 - static const UINT16 pLotus[] = // Lotus 1/1A/2 + static const sal_uInt16 pLotus[] = // Lotus 1/1A/2 { 0x0000, 0x0000, 0x0002, 0x0000, M_ALT(2), 0x0004, 0x0006, 0x0004, M_ENDE }; - static const UINT16 pLotusNew[] = // Lotus >= 9.7 + static const sal_uInt16 pLotusNew[] = // Lotus >= 9.7 { 0x0000, 0x0000, M_DC, 0x0000, // Rec# + Len (0x1a) M_ALT(3), 0x0003, 0x0004, 0x0005, // File Revision Code 97->ME 0x0010, 0x0004, 0x0000, 0x0000, M_ENDE }; - static const UINT16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4 + static const sal_uInt16 pExcel1[] = // Excel BIFF2, BIFF3, BIFF4 { 0x09, // lobyte of BOF rec ID (0x0009, 0x0209, 0x0409) M_ALT(3), 0x00, 0x02, 0x04, // hibyte of BOF rec ID (0x0009, 0x0209, 0x0409) M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16) @@ -550,7 +550,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x00, // hibyte of data type (0x0010, 0x0020, 0x0040) M_ENDE }; - static const UINT16 pExcel2[] = // Excel BIFF4 Workspace + static const sal_uInt16 pExcel2[] = // Excel BIFF4 Workspace { 0x09, // lobyte of BOF rec ID (0x0409) 0x04, // hibyte of BOF rec ID (0x0409) M_ALT(3), 4, 6, 8, // lobyte of BOF rec size (4, 6, 8, 16) @@ -560,7 +560,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x01, // hibyte of data type (0x0100) M_ENDE }; - static const UINT16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream) + static const sal_uInt16 pExcel3[] = // #i23425# Excel BIFF5, BIFF7, BIFF8 (simple book stream) { 0x09, // lobyte of BOF rec ID (0x0809) 0x08, // hibyte of BOF rec ID (0x0809) M_ALT(4), 4, 6, 8, 16, // lobyte of BOF rec size @@ -570,7 +570,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x00, // hibyte of data type M_ENDE }; - static const UINT16 pSc10[] = // StarCalc 1.0 Dokumente + static const sal_uInt16 pSc10[] = // StarCalc 1.0 Dokumente { 'B', 'l', 'a', 'i', 's', 'e', '-', 'T', 'a', 'b', 'e', 'l', 'l', 'e', 0x000A, 0x000D, 0x0000, // Sc10CopyRight[16] M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, M_DC, @@ -579,21 +579,21 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) 0x0000, M_ENDE }; - static const UINT16 pLotus2[] = // Lotus >3 + static const sal_uInt16 pLotus2[] = // Lotus >3 { 0x0000, 0x0000, 0x001A, 0x0000, // Rec# + Len (26) M_ALT(2), 0x0000, 0x0002, // File Revision Code 0x0010, 0x0004, 0x0000, // File Revision Subcode M_ENDE }; - static const UINT16 pQPro[] = + static const sal_uInt16 pQPro[] = { 0x0000, 0x0000, 0x0002, 0x0000, M_ALT(4), 0x0001, 0x0002, // WB1, WB2 0x0006, 0x0007, // QPro 6/7 (?) 0x0010, M_ENDE }; - static const UINT16 pDIF1[] = // DIF mit CR-LF + static const sal_uInt16 pDIF1[] = // DIF mit CR-LF { 'T', 'A', 'B', 'L', 'E', M_DC, M_DC, @@ -602,7 +602,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) '\"', M_ENDE }; - static const UINT16 pDIF2[] = // DIF mit CR oder LF + static const sal_uInt16 pDIF2[] = // DIF mit CR oder LF { 'T', 'A', 'B', 'L', 'E', M_DC, @@ -611,13 +611,13 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) '\"', M_ENDE }; - static const UINT16 pSylk[] = // Sylk + static const sal_uInt16 pSylk[] = // Sylk { 'I', 'D', ';', M_ALT(3), 'P', 'N', 'E', // 'P' plus undocumented Excel extensions 'N' and 'E' M_ENDE }; - static const UINT16 *ppFilterPatterns[] = // Arrays mit Suchmustern + static const sal_uInt16 *ppFilterPatterns[] = // Arrays mit Suchmustern { pLotus, pExcel1, @@ -631,7 +631,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pLotus2, pQPro }; - const UINT16 nFilterCount = sizeof(ppFilterPatterns) / sizeof(ppFilterPatterns[0]); + const sal_uInt16 nFilterCount = sizeof(ppFilterPatterns) / sizeof(ppFilterPatterns[0]); static const sal_Char* const pFilterName[] = // zugehoerige Filter { @@ -648,43 +648,43 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) pFilterQPro6 }; - // const UINT16 nByteMask = 0xFF; + // const sal_uInt16 nByteMask = 0xFF; // suchen Sie jetzt! // ... realisiert ueber 'Mustererkennung' - BYTE nAkt; - BOOL bSync; // Datei und Muster stimmen ueberein - USHORT nFilter; // Zaehler ueber alle Filter - const UINT16 *pSearch; // aktuelles Musterwort + sal_uInt8 nAkt; + sal_Bool bSync; // Datei und Muster stimmen ueberein + sal_uInt16 nFilter; // Zaehler ueber alle Filter + const sal_uInt16 *pSearch; // aktuelles Musterwort for ( nFilter = 0 ; nFilter < nFilterCount ; nFilter++ ) { rStr.Seek( 0 ); // am Anfang war alles Uebel... rStr >> nAkt; pSearch = ppFilterPatterns[ nFilter ]; - bSync = TRUE; + bSync = sal_True; while( !rStr.IsEof() && bSync ) { - register UINT16 nMuster = *pSearch; + register sal_uInt16 nMuster = *pSearch; if( nMuster < 0x0100 ) { // direkter Byte-Vergleich - if( ( BYTE ) nMuster != nAkt ) - bSync = FALSE; + if( ( sal_uInt8 ) nMuster != nAkt ) + bSync = sal_False; } else if( nMuster & M_DC ) { // don't care } else if( nMuster & M_ALT(0) ) { // alternative Bytes - BYTE nAnzAlt = ( BYTE ) nMuster; - bSync = FALSE; // zunaechst unsynchron + sal_uInt8 nAnzAlt = ( sal_uInt8 ) nMuster; + bSync = sal_False; // zunaechst unsynchron while( nAnzAlt > 0 ) { pSearch++; - if( ( BYTE ) *pSearch == nAkt ) - bSync = TRUE; // jetzt erst Synchronisierung + if( ( sal_uInt8 ) *pSearch == nAkt ) + bSync = sal_True; // jetzt erst Synchronisierung nAnzAlt--; } } @@ -700,7 +700,7 @@ static BOOL lcl_IsAnyXMLFilter( const SfxFilter* pFilter ) { // gefundenen Filter einstellen pFilter = aMatcher.GetFilter4FilterName( String::CreateFromAscii(pFilterName[ nFilter ]) ); } - bSync = FALSE; // leave inner loop + bSync = sal_False; // leave inner loop nFilter = nFilterCount; // leave outer loop } else diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx index 0a1f86afd7d1..92a9c3ef43ee 100644 --- a/sc/source/ui/unoobj/servuno.cxx +++ b/sc/source/ui/unoobj/servuno.cxx @@ -371,7 +371,7 @@ sal_uInt16 ScServiceProvider::GetProviderType(const String& rServiceName) } } - USHORT i; + sal_uInt16 i; for (i=0; i<SC_SERVICE_COUNT; i++) { DBG_ASSERT( aOldNames[i], "ScServiceProvider::GetProviderType: no oldname => crash"); diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx index 6ec721198bed..fe77e5ef32e6 100644 --- a/sc/source/ui/unoobj/shapeuno.cxx +++ b/sc/source/ui/unoobj/shapeuno.cxx @@ -102,7 +102,7 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) : pShapePropertySet(NULL), pShapePropertyState(NULL), pImplementationId(NULL), - bIsTextShape(FALSE), + bIsTextShape(false), bIsNoteCaption(false), bInitializedNotifier(false) { @@ -254,22 +254,22 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScShapeObj::getPropertySetInfo( return mxPropSetInfo; } -BOOL lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum ) +sal_Bool lcl_GetPageNum( SdrPage* pPage, SdrModel& rModel, SCTAB& rNum ) { - USHORT nCount = rModel.GetPageCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = rModel.GetPageCount(); + for (sal_uInt16 i=0; i<nCount; i++) if ( rModel.GetPage(i) == pPage ) { rNum = static_cast<SCTAB>(i); - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } -BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint ) +sal_Bool lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& rCaptionPoint ) { - BOOL bReturn = FALSE; + sal_Bool bReturn = sal_False; rtl::OUString sType(xShape->getShapeType()); sal_Bool bCaptionShape(sType.equalsAscii("com.sun.star.drawing.CaptionShape")); if (bCaptionShape) @@ -278,7 +278,7 @@ BOOL lcl_GetCaptionPoint( uno::Reference< drawing::XShape >& xShape, awt::Point& if (xShapeProp.is()) { xShapeProp->getPropertyValue( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "CaptionPoint" )) ) >>= rCaptionPoint; - bReturn = TRUE; + bReturn = sal_True; } } return bReturn; @@ -1400,7 +1400,7 @@ class ShapeUnoEventAccessImpl : public ShapeUnoEventAcess_BASE private: ScShapeObj* mpShape; - ScMacroInfo* getInfo( BOOL bCreate = FALSE ) + ScMacroInfo* getInfo( sal_Bool bCreate = sal_False ) { if( mpShape ) if( SdrObject* pObj = mpShape->GetSdrObject() ) @@ -1440,7 +1440,7 @@ public: rtl::OUString sValue; if ( pProperties->Value >>= sValue ) { - ScMacroInfo* pInfo = getInfo( TRUE ); + ScMacroInfo* pInfo = getInfo( sal_True ); DBG_ASSERT( pInfo, "shape macro info could not be created!" ); if ( !pInfo ) break; diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx index b005d16ce482..2827b8c9e1dc 100644 --- a/sc/source/ui/unoobj/srchuno.cxx +++ b/sc/source/ui/unoobj/srchuno.cxx @@ -85,21 +85,21 @@ ScCellSearchObj::ScCellSearchObj() : { pSearchItem = new SvxSearchItem( SCITEM_SEARCHDATA ); // Defaults: - pSearchItem->SetWordOnly(FALSE); - pSearchItem->SetExact(FALSE); - pSearchItem->SetMatchFullHalfWidthForms(FALSE); - pSearchItem->SetUseAsianOptions(FALSE); // or all asian bits would have to be handled - pSearchItem->SetBackward(FALSE); - pSearchItem->SetSelection(FALSE); - pSearchItem->SetRegExp(FALSE); - pSearchItem->SetPattern(FALSE); - pSearchItem->SetLevenshtein(FALSE); - pSearchItem->SetLEVRelaxed(FALSE); + pSearchItem->SetWordOnly(sal_False); + pSearchItem->SetExact(sal_False); + pSearchItem->SetMatchFullHalfWidthForms(sal_False); + pSearchItem->SetUseAsianOptions(sal_False); // or all asian bits would have to be handled + pSearchItem->SetBackward(sal_False); + pSearchItem->SetSelection(sal_False); + pSearchItem->SetRegExp(sal_False); + pSearchItem->SetPattern(sal_False); + pSearchItem->SetLevenshtein(sal_False); + pSearchItem->SetLEVRelaxed(sal_False); pSearchItem->SetLEVOther(2); pSearchItem->SetLEVShorter(2); pSearchItem->SetLEVLonger(2); // Calc-Flags - pSearchItem->SetRowDirection(FALSE); + pSearchItem->SetRowDirection(sal_False); pSearchItem->SetCellType(SVX_SEARCHIN_FORMULA); // Selection-Flag wird beim Aufruf gesetzt diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx index 50aecbe7f2e3..f929e6b16985 100644 --- a/sc/source/ui/unoobj/styleuno.cxx +++ b/sc/source/ui/unoobj/styleuno.cxx @@ -377,7 +377,7 @@ const SfxItemPropertyMap* lcl_GetFooterStyleMap() #define SC_FAMILYNAME_CELL "CellStyles" #define SC_FAMILYNAME_PAGE "PageStyles" -static UINT16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE }; +static sal_uInt16 aStyleFamilyTypes[SC_STYLE_FAMILY_COUNT] = { SFX_STYLE_FAMILY_PARA, SFX_STYLE_FAMILY_PAGE }; //------------------------------------------------------------------------ @@ -418,11 +418,11 @@ struct ScDisplayNameMap String aProgName; }; -const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) +const ScDisplayNameMap* lcl_GetStyleNameMap( sal_uInt16 nType ) { if ( nType == SFX_STYLE_FAMILY_PARA ) { - static BOOL bCellMapFilled = FALSE; + static sal_Bool bCellMapFilled = sal_False; static ScDisplayNameMap aCellMap[6]; if ( !bCellMapFilled ) { @@ -443,13 +443,13 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) // last entry remains empty - bCellMapFilled = TRUE; + bCellMapFilled = sal_True; } return aCellMap; } else if ( nType == SFX_STYLE_FAMILY_PAGE ) { - static BOOL bPageMapFilled = FALSE; + static sal_Bool bPageMapFilled = sal_False; static ScDisplayNameMap aPageMap[3]; if ( !bPageMapFilled ) { @@ -461,7 +461,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) // last entry remains empty - bPageMapFilled = TRUE; + bPageMapFilled = sal_True; } return aPageMap; } @@ -475,7 +475,7 @@ const ScDisplayNameMap* lcl_GetStyleNameMap( UINT16 nType ) #define SC_SUFFIX_USER " (user)" #define SC_SUFFIX_USER_LEN 7 -BOOL lcl_EndsWithUser( const String& rString ) +sal_Bool lcl_EndsWithUser( const String& rString ) { const sal_Unicode *pChar = rString.GetBuffer(); xub_StrLen nLen = rString.Len(); @@ -490,9 +490,9 @@ BOOL lcl_EndsWithUser( const String& rString ) } // static -String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName, UINT16 nType ) +String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName, sal_uInt16 nType ) { - BOOL bDisplayIsProgrammatic = FALSE; + sal_Bool bDisplayIsProgrammatic = sal_False; const ScDisplayNameMap* pNames = lcl_GetStyleNameMap( nType ); if (pNames) @@ -502,7 +502,7 @@ String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName if (pNames->aDispName == rDispName) return pNames->aProgName; else if (pNames->aProgName == rDispName) - bDisplayIsProgrammatic = TRUE; // display name matches any programmatic name + bDisplayIsProgrammatic = sal_True; // display name matches any programmatic name } while( (++pNames)->aDispName.Len() ); } @@ -521,7 +521,7 @@ String ScStyleNameConversion::DisplayToProgrammaticName( const String& rDispName } // static -String ScStyleNameConversion::ProgrammaticToDisplayName( const String& rProgName, UINT16 nType ) +String ScStyleNameConversion::ProgrammaticToDisplayName( const String& rProgName, sal_uInt16 nType ) { if ( lcl_EndsWithUser( rProgName ) ) { @@ -580,7 +580,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XStyleFamilies -ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const +ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) const { if ( pDocShell ) { @@ -593,7 +593,7 @@ ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(UINT16 nType) const return NULL; } -ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(UINT32 nIndex) const +ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) const { if ( nIndex < SC_STYLE_FAMILY_COUNT ) return GetObjectByType_Impl(aStyleFamilyTypes[nIndex]); @@ -699,9 +699,9 @@ void SAL_CALL ScStyleFamiliesObj::loadStylesFromURL( const rtl::OUString& aURL, { // collect options - BOOL bLoadReplace = TRUE; // defaults - BOOL bLoadCellStyles = TRUE; - BOOL bLoadPageStyles = TRUE; + sal_Bool bLoadReplace = sal_True; // defaults + sal_Bool bLoadCellStyles = sal_True; + sal_Bool bLoadPageStyles = sal_True; const beans::PropertyValue* pPropArray = aOptions.getConstArray(); long nPropCount = aOptions.getLength(); @@ -732,13 +732,13 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScStyleFamiliesObj::getStyleLoaderO beans::PropertyValue* pArray = aSequence.getArray(); pArray[0].Name = rtl::OUString::createFromAscii( SC_UNONAME_OVERWSTL ); - ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, TRUE ); + ScUnoHelpFunctions::SetBoolInAny( pArray[0].Value, sal_True ); pArray[1].Name = rtl::OUString::createFromAscii( SC_UNONAME_LOADCELL ); - ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, TRUE ); + ScUnoHelpFunctions::SetBoolInAny( pArray[1].Value, sal_True ); pArray[2].Name = rtl::OUString::createFromAscii( SC_UNONAME_LOADPAGE ); - ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, TRUE ); + ScUnoHelpFunctions::SetBoolInAny( pArray[2].Value, sal_True ); return aSequence; } @@ -771,7 +771,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint ) // XStyleFamily -ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex) +ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) { if ( pDocShell ) { @@ -781,7 +781,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(UINT32 nIndex) SfxStyleSheetIterator aIter( pStylePool, eFamily ); if ( nIndex < aIter.Count() ) { - SfxStyleSheetBase* pStyle = aIter[(USHORT)nIndex]; + SfxStyleSheetBase* pStyle = aIter[(sal_uInt16)nIndex]; if ( pStyle ) { return new ScStyleObj( pDocShell, eFamily, String (pStyle->GetName()) ); @@ -819,7 +819,7 @@ void SAL_CALL ScStyleFamilyObj::insertByName( const rtl::OUString& aName, const if ( pStyleObj && pStyleObj->GetFamily() == eFamily && !pStyleObj->IsInserted() ) // noch nicht eingefuegt? { - String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) )); + String aNameStr(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) )); ScDocument* pDoc = pDocShell->GetDocument(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); @@ -866,10 +866,10 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; if ( pDocShell ) { - String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) )); + String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) )); ScDocument* pDoc = pDocShell->GetDocument(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); @@ -880,7 +880,7 @@ void SAL_CALL ScStyleFamilyObj::removeByName( const rtl::OUString& aName ) SfxStyleSheetBase* pStyle = pStylePool->Find( aString, eFamily ); if (pStyle) { - bFound = TRUE; + bFound = sal_True; if ( eFamily == SFX_STYLE_FAMILY_PARA ) { // wie ScViewFunc::RemoveStyleSheetInUse @@ -965,7 +965,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getByName( const rtl::OUString& aName ) { ScUnoGuard aGuard; uno::Reference< style::XStyle > xObj( - GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) ) )); + GetObjectByName_Impl( ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) ) )); if (xObj.is()) return uno::makeAny(xObj); else @@ -983,19 +983,19 @@ uno::Sequence<rtl::OUString> SAL_CALL ScStyleFamilyObj::getElementNames() ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); SfxStyleSheetIterator aIter( pStylePool, eFamily ); - UINT16 nCount = aIter.Count(); + sal_uInt16 nCount = aIter.Count(); String aName; uno::Sequence<rtl::OUString> aSeq(nCount); rtl::OUString* pAry = aSeq.getArray(); SfxStyleSheetBase* pStyle = aIter.First(); - UINT16 nPos = 0; + sal_uInt16 nPos = 0; while (pStyle) { DBG_ASSERT( nPos<nCount, "Anzahl durcheinandergekommen" ); if (nPos<nCount) pAry[nPos++] = ScStyleNameConversion::DisplayToProgrammaticName( - pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) ); + pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) ); pStyle = aIter.Next(); } return aSeq; @@ -1009,7 +1009,7 @@ sal_Bool SAL_CALL ScStyleFamilyObj::hasByName( const rtl::OUString& aName ) ScUnoGuard aGuard; if ( pDocShell ) { - String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<UINT16>(eFamily) )); + String aString(ScStyleNameConversion::ProgrammaticToDisplayName( aName, sal::static_int_cast<sal_uInt16>(eFamily) )); ScDocument* pDoc = pDocShell->GetDocument(); ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool(); @@ -1051,7 +1051,7 @@ uno::Any SAL_CALL ScStyleFamilyObj::getPropertyValue( const ::rtl::OUString& sPr } if ( nResId > 0 ) { - ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< USHORT >( nResId ) ) ); + ::rtl::OUString sDisplayName( ScGlobal::GetRscString( static_cast< sal_uInt16 >( nResId ) ) ); aRet = uno::makeAny( sDisplayName ); } } @@ -1211,7 +1211,7 @@ rtl::OUString SAL_CALL ScStyleObj::getParentStyle() throw(uno::RuntimeException) ScUnoGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); if (pStyle) - return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<UINT16>(eFamily) ); + return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetParent(), sal::static_int_cast<sal_uInt16>(eFamily) ); return rtl::OUString(); } @@ -1229,7 +1229,7 @@ void SAL_CALL ScStyleObj::setParentStyle( const rtl::OUString& rParentStyle ) //! DocFunc-Funktion?? //! Undo ????????????? - String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<UINT16>(eFamily) )); + String aString(ScStyleNameConversion::ProgrammaticToDisplayName( rParentStyle, sal::static_int_cast<sal_uInt16>(eFamily) )); sal_Bool bOk = pStyle->SetParent( aString ); if (bOk) { @@ -1267,7 +1267,7 @@ rtl::OUString SAL_CALL ScStyleObj::getName() throw(uno::RuntimeException) ScUnoGuard aGuard; SfxStyleSheetBase* pStyle = GetStyle_Impl(); if (pStyle) - return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<UINT16>(eFamily) ); + return ScStyleNameConversion::DisplayToProgrammaticName( pStyle->GetName(), sal::static_int_cast<sal_uInt16>(eFamily) ); return rtl::OUString(); } @@ -1296,7 +1296,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName ) pDoc->GetPool()->CellStyleCreated( aString ); // Zellvorlagen = 2, Seitenvorlagen = 4 - UINT16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ? + sal_uInt16 nId = ( eFamily == SFX_STYLE_FAMILY_PARA ) ? SID_STYLE_FAMILY2 : SID_STYLE_FAMILY4; SfxBindings* pBindings = pDocShell->GetViewBindings(); if (pBindings) @@ -1311,7 +1311,7 @@ void SAL_CALL ScStyleObj::setName( const rtl::OUString& aNewName ) // static uno::Reference<container::XIndexReplace> ScStyleObj::CreateEmptyNumberingRules() { - SvxNumRule aRule( 0, 0, TRUE ); // nothing supported + SvxNumRule aRule( 0, 0, sal_True ); // nothing supported return SvxCreateNumRule( &aRule ); } @@ -1364,7 +1364,7 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const rtl::OUString& if ( pItemSet && pResultEntry ) { - USHORT nWhich = pResultEntry->nWID; + sal_uInt16 nWhich = pResultEntry->nWID; if ( nWhich == SC_WID_UNO_TBLBORD ) { nWhich = ATTR_BORDER; @@ -1434,7 +1434,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const rtl::OUString& aProperty if ( pStyleSet && pResultEntry ) { - USHORT nWhich = pResultEntry->nWID; + sal_uInt16 nWhich = pResultEntry->nWID; if ( IsScItemWid( nWhich ) ) { @@ -1619,9 +1619,9 @@ void SAL_CALL ScStyleObj::setAllPropertiesToDefault() throw (uno::RuntimeExcepti // #i22448# apply the default BoxInfoItem for page styles again // (same content as in ScStyleSheet::GetItemSet, to control the dialog) SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER ); - aBoxInfoItem.SetTable( FALSE ); - aBoxInfoItem.SetDist( TRUE ); - aBoxInfoItem.SetValid( VALID_DISTANCE, TRUE ); + aBoxInfoItem.SetTable( sal_False ); + aBoxInfoItem.SetDist( sal_True ); + aBoxInfoItem.SetValid( VALID_DISTANCE, sal_True ); rSet.Put( aBoxInfoItem ); pDocShell->PageStyleModified( aStyleName, sal_True ); @@ -1750,14 +1750,14 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons // #67847# language for number formats SvNumberFormatter* pFormatter = pDocShell->GetDocument()->GetFormatTable(); - UINT32 nOldFormat = ((const SfxUInt32Item&) + sal_uInt32 nOldFormat = ((const SfxUInt32Item&) rSet.Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&) rSet.Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); nOldFormat = pFormatter-> GetFormatForLanguageIfBuiltIn( nOldFormat, eOldLang ); - UINT32 nNewFormat = 0; + sal_uInt32 nNewFormat = 0; *pValue >>= nNewFormat; rSet.Put( SfxUInt32Item( ATTR_VALUE_FORMAT, nNewFormat ) ); @@ -1774,7 +1774,7 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons { sal_Int16 nVal = 0; *pValue >>= nVal; - rSet.Put( SfxUInt16Item( pEntry->nWID, (USHORT)HMMToTwips(nVal) ) ); + rSet.Put( SfxUInt16Item( pEntry->nWID, (sal_uInt16)HMMToTwips(nVal) ) ); } break; case ATTR_ROTATE_VALUE: @@ -1798,18 +1798,18 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons switch( eOrient ) { case table::CellOrientation_STANDARD: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); break; case table::CellOrientation_TOPBOTTOM: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 27000 ) ); break; case table::CellOrientation_BOTTOMTOP: - rSet.Put( SfxBoolItem( ATTR_STACKED, FALSE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_False ) ); rSet.Put( SfxInt32Item( ATTR_ROTATE_VALUE, 9000 ) ); break; case table::CellOrientation_STACKED: - rSet.Put( SfxBoolItem( ATTR_STACKED, TRUE ) ); + rSet.Put( SfxBoolItem( ATTR_STACKED, sal_True ) ); break; default: { @@ -1850,26 +1850,26 @@ void ScStyleObj::SetOnePropertyValue( const ::rtl::OUString& rPropertyName, cons break; case ATTR_PAGE_PAPERBIN: { - BYTE nTray = PAPERBIN_PRINTER_SETTINGS; - BOOL bFound = FALSE; + sal_uInt8 nTray = PAPERBIN_PRINTER_SETTINGS; + sal_Bool bFound = sal_False; rtl::OUString aName; if ( *pValue >>= aName ) { if ( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( SC_PAPERBIN_DEFAULTNAME ) ) ) - bFound = TRUE; + bFound = sal_True; else { Printer* pPrinter = pDocShell->GetPrinter(); if (pPrinter) { String aNameStr = aName; - USHORT nCount = pPrinter->GetPaperBinCount(); - for (USHORT i=0; i<nCount; i++) + sal_uInt16 nCount = pPrinter->GetPaperBinCount(); + for (sal_uInt16 i=0; i<nCount; i++) if ( aNameStr == pPrinter->GetPaperBinName(i) ) { - nTray = (BYTE) i; - bFound = TRUE; + nTray = (sal_uInt8) i; + bFound = sal_True; break; } } @@ -1995,7 +1995,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa if ( pItemSet && pResultEntry ) { - USHORT nWhich = pResultEntry->nWID; + sal_uInt16 nWhich = pResultEntry->nWID; if ( IsScItemWid( nWhich ) ) { @@ -2004,7 +2004,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa case ATTR_VALUE_FORMAT: if ( pDocShell ) { - UINT32 nOldFormat = ((const SfxUInt32Item&) + sal_uInt32 nOldFormat = ((const SfxUInt32Item&) pItemSet->Get( ATTR_VALUE_FORMAT )).GetValue(); LanguageType eOldLang = ((const SvxLanguageItem&) pItemSet->Get( ATTR_LANGUAGE_FORMAT )).GetLanguage(); @@ -2020,7 +2020,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa case ATTR_STACKED: { sal_Int32 nRot = ((const SfxInt32Item&)pItemSet->Get(ATTR_ROTATE_VALUE)).GetValue(); - BOOL bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue(); + sal_Bool bStacked = ((const SfxBoolItem&)pItemSet->Get(nWhich)).GetValue(); SvxOrientationItem( nRot, bStacked, 0 ).QueryValue( aAny ); } break; @@ -2040,7 +2040,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const rtl::OUString& aPropertyNa { // property PrinterPaperTray is the name of the tray - BYTE nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue(); + sal_uInt8 nValue = ((const SvxPaperBinItem&)pItemSet->Get(nWhich)).GetValue(); rtl::OUString aName; if ( nValue == PAPERBIN_PRINTER_SETTINGS ) aName = rtl::OUString::createFromAscii( SC_PAPERBIN_DEFAULTNAME ); @@ -2117,7 +2117,7 @@ rtl::OUString SAL_CALL ScStyleObj::getImplementationName() throw(uno::RuntimeExc sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName ) throw(uno::RuntimeException) { - BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); + sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); return rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( SCSTYLE_SERVICE ) )|| rServiceName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM ( bPage ? SCPAGESTYLE_SERVICE : SCCELLSTYLE_SERVICE )); @@ -2126,7 +2126,7 @@ sal_Bool SAL_CALL ScStyleObj::supportsService( const rtl::OUString& rServiceName uno::Sequence<rtl::OUString> SAL_CALL ScStyleObj::getSupportedServiceNames() throw(uno::RuntimeException) { - BOOL bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); + sal_Bool bPage = ( eFamily == SFX_STYLE_FAMILY_PAGE ); uno::Sequence<rtl::OUString> aRet(2); rtl::OUString* pArray = aRet.getArray(); pArray[0] = rtl::OUString::createFromAscii( SCSTYLE_SERVICE ); diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx index aa4cdf58882d..f089253f794d 100644 --- a/sc/source/ui/unoobj/targuno.cxx +++ b/sc/source/ui/unoobj/targuno.cxx @@ -245,7 +245,7 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType } if (nImgId) { - BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); + sal_Bool bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); ImageList aEntryImages( ScResId( bHighContrast ? RID_IMAGELIST_H_NAVCONT : RID_IMAGELIST_NAVCONT ) ); const Image& rImage = aEntryImages.GetImage( nImgId ); rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap( rImage.GetBitmapEx() )); diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx index 5c45195621d8..ca1a7f978010 100644 --- a/sc/source/ui/unoobj/textuno.cxx +++ b/sc/source/ui/unoobj/textuno.cxx @@ -75,7 +75,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() SVX_UNOEDIT_NUMBERING_PROPERTIE, // for completeness of service ParagraphProperties {0,0,0,0,0,0} }; - static BOOL bTwipsSet = FALSE; + static sal_Bool bTwipsSet = sal_False; if (!bTwipsSet) { @@ -95,7 +95,7 @@ const SvxItemPropertySet * lcl_GetHdFtPropertySet() ++pEntry; } - bTwipsSet = TRUE; + bTwipsSet = sal_True; } static SvxItemPropertySet aHdFtPropertySet_Impl( aHdFtPropertyMap_Impl, SdrObject::GetGlobalDrawObjectItemPool() ); return &aHdFtPropertySet_Impl; @@ -140,7 +140,7 @@ void ScHeaderFooterContentObj::RemoveListener( SfxListener& rListener ) rListener.EndListening( aBC ); } -void ScHeaderFooterContentObj::UpdateText( USHORT nPart, EditEngine& rSource ) +void ScHeaderFooterContentObj::UpdateText( sal_uInt16 nPart, EditEngine& rSource ) { EditTextObject* pNew = rSource.CreateTextObject(); switch (nPart) @@ -231,13 +231,13 @@ ScHeaderFooterContentObj* ScHeaderFooterContentObj::getImplementation( //------------------------------------------------------------------------ ScHeaderFooterTextData::ScHeaderFooterTextData( ScHeaderFooterContentObj& rContent, - USHORT nP ) : + sal_uInt16 nP ) : rContentObj( rContent ), nPart( nP ), pEditEngine( NULL ), pForwarder( NULL ), - bDataValid( FALSE ), - bInUpdate( FALSE ) + bDataValid( sal_False ), + bInUpdate( sal_False ) { rContentObj.acquire(); // must not go away rContentObj.AddListener( *this ); @@ -262,7 +262,7 @@ void ScHeaderFooterTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) if ( ((const ScHeaderFooterChangedHint&)rHint).GetPart() == nPart ) { if (!bInUpdate) // not for own updates - bDataValid = FALSE; // text has to be fetched again + bDataValid = sal_False; // text has to be fetched again } } } @@ -273,9 +273,9 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, TRUE ); + ScHeaderEditEngine* pHdrEngine = new ScHeaderEditEngine( pEnginePool, sal_True ); - pHdrEngine->EnableUndo( FALSE ); + pHdrEngine->EnableUndo( sal_False ); pHdrEngine->SetRefMapMode( MAP_TWIP ); // default font must be set, independently of document @@ -313,7 +313,7 @@ SvxTextForwarder* ScHeaderFooterTextData::GetTextForwarder() if (pData) pEditEngine->SetText(*pData); - bDataValid = TRUE; + bDataValid = sal_True; return pForwarder; } @@ -321,18 +321,18 @@ void ScHeaderFooterTextData::UpdateData() { if ( pEditEngine ) { - bInUpdate = TRUE; // don't reset bDataValid during UpdateText + bInUpdate = sal_True; // don't reset bDataValid during UpdateText rContentObj.UpdateText( nPart, *pEditEngine ); - bInUpdate = FALSE; + bInUpdate = sal_False; } } //------------------------------------------------------------------------ ScHeaderFooterTextObj::ScHeaderFooterTextObj( ScHeaderFooterContentObj& rContent, - USHORT nP ) : + sal_uInt16 nP ) : aTextData( rContent, nP ), pUnoText( NULL ) { @@ -401,7 +401,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce rtl::OUString aRet; const EditTextObject* pData; - USHORT nPart = aTextData.GetPart(); + sal_uInt16 nPart = aTextData.GetPart(); ScHeaderFooterContentObj& rContentObj = aTextData.GetContentObj(); if (nPart == SC_HDFT_LEFT) @@ -413,7 +413,7 @@ rtl::OUString SAL_CALL ScHeaderFooterTextObj::getString() throw(uno::RuntimeExce if (pData) { // for pure text, no font info is needed in pool defaults - ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE ); + ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True ); ScHeaderFieldData aData; FillDummyFieldData( aData ); @@ -431,7 +431,7 @@ void SAL_CALL ScHeaderFooterTextObj::setString( const rtl::OUString& aText ) thr String aString(aText); // for pure text, no font info is needed in pool defaults - ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), TRUE ); + ScHeaderEditEngine aEditEngine( EditEngine::CreatePool(), sal_True ); aEditEngine.SetText( aString ); aTextData.GetContentObj().UpdateText( aTextData.GetPart(), aEditEngine ); @@ -504,7 +504,7 @@ void SAL_CALL ScHeaderFooterTextObj::insertTextContent( aSelection.nEndPos = aSelection.nStartPos + 1; pHeaderField->InitDoc( &aTextData.GetContentObj(), aTextData.GetPart(), aSelection ); - // #91431# for bAbsorb=FALSE, the new selection must be behind the inserted content + // #91431# for bAbsorb=sal_False, the new selection must be behind the inserted content // (the xml filter relies on this) if (!bAbsorb) aSelection.nStartPos = aSelection.nEndPos; @@ -943,7 +943,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper() pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM ); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); // TRUE: become owner of pool + pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); // TRUE: become owner of pool pForwarder = new SvxEditEngineForwarder( *pEditEngine ); pOriginalSource = new ScSimpleEditSource( pForwarder ); } @@ -988,10 +988,10 @@ ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) : pEditEngine( NULL ), pForwarder( NULL ), pOriginalSource( NULL ), - bDataValid( FALSE ), - bInUpdate( FALSE ), - bDirty( FALSE ), - bDoUpdate( TRUE ) + bDataValid( sal_False ), + bInUpdate( sal_False ), + bDirty( sal_False ), + bDoUpdate( sal_True ) { if (pDocShell) pDocShell->GetDocument()->AddUnoObject(*this); @@ -1043,12 +1043,12 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() { SfxItemPool* pEnginePool = EditEngine::CreatePool(); pEnginePool->FreezeIdRanges(); - pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, TRUE ); + pEditEngine = new ScFieldEditEngine( pEnginePool, NULL, sal_True ); } - // currently, GetPortions doesn't work if UpdateMode is FALSE, + // currently, GetPortions doesn't work if UpdateMode is sal_False, // this will be fixed (in EditEngine) by src600 -// pEditEngine->SetUpdateMode( FALSE ); - pEditEngine->EnableUndo( FALSE ); +// pEditEngine->SetUpdateMode( sal_False ); + pEditEngine->EnableUndo( sal_False ); if (pDocShell) pEditEngine->SetRefDevice(pDocShell->GetRefDevice()); else @@ -1086,7 +1086,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder() } } - bDataValid = TRUE; + bDataValid = sal_True; return pForwarder; } @@ -1101,17 +1101,17 @@ void ScCellTextData::UpdateData() // or things like attributes after the text would be lost // (are not stored in the cell) - bInUpdate = TRUE; // prevents bDataValid from being reset + bInUpdate = sal_True; // prevents bDataValid from being reset ScDocFunc aFunc(*pDocShell); - aFunc.PutData( aCellPos, *pEditEngine, FALSE, TRUE ); // always as text + aFunc.PutData( aCellPos, *pEditEngine, sal_False, sal_True ); // always as text - bInUpdate = FALSE; - bDirty = FALSE; + bInUpdate = sal_False; + bDirty = sal_False; } } else - bDirty = TRUE; + bDirty = sal_True; } void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) @@ -1124,7 +1124,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) } else if ( rHint.ISA( SfxSimpleHint ) ) { - ULONG nId = ((const SfxSimpleHint&)rHint).GetId(); + sal_uLong nId = ((const SfxSimpleHint&)rHint).GetId(); if ( nId == SFX_HINT_DYING ) { pDocShell = NULL; // invalid now @@ -1135,7 +1135,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint ) else if ( nId == SFX_HINT_DATACHANGED ) { if (!bInUpdate) // not for own UpdateData calls - bDataValid = FALSE; // text has to be read from the cell again + bDataValid = sal_False; // text has to be read from the cell again } } } diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx index 7646e52c030f..13dba8f1e423 100644 --- a/sc/source/ui/unoobj/viewuno.cxx +++ b/sc/source/ui/unoobj/viewuno.cxx @@ -51,6 +51,7 @@ #include <sfx2/viewfrm.hxx> #include <rtl/uuid.h> #include <toolkit/helper/convert.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include "drawsh.hxx" #include "drtxtob.hxx" @@ -114,6 +115,7 @@ const SfxItemPropertyMapEntry* lcl_GetViewOptPropertyMap() {MAP_CHAR_LEN(SC_UNO_VISAREA), 0, &getCppuType((awt::Rectangle*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_ZOOMTYPE), 0, &getCppuType((sal_Int16*)0), 0, 0}, {MAP_CHAR_LEN(SC_UNO_ZOOMVALUE), 0, &getCppuType((sal_Int16*)0), 0, 0}, + {MAP_CHAR_LEN(SC_UNO_VISAREASCREEN),0, &getCppuType((awt::Rectangle*)0), 0, 0}, {0,0,0,0,0,0} }; return aViewOptPropertyMap_Impl; @@ -135,7 +137,7 @@ SC_SIMPLE_SERVICE_INFO( ScViewPaneBase, "ScViewPaneObj", "com.sun.star.sheet.Spr //------------------------------------------------------------------------ -ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, USHORT nP) : +ScViewPaneBase::ScViewPaneBase(ScTabViewShell* pViewSh, sal_uInt16 nP) : pViewShell( pViewSh ), nPane( nP ) { @@ -321,7 +323,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells() namespace { - bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, USHORT _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView ) + bool lcl_prepareFormShellCall( ScTabViewShell* _pViewShell, sal_uInt16 _nPane, FmFormShell*& _rpFormShell, Window*& _rpWindow, SdrView*& _rpSdrView ) { if ( !_pViewShell ) return false; @@ -418,10 +420,15 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const ScAddress aCell(pViewShell->GetViewData()->GetPosX(eWhichH), pViewShell->GetViewData()->GetPosY(eWhichV), pViewShell->GetViewData()->GetTabNo()); - Rectangle aVisRect(pDoc->GetMMRect(aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab())); - - aVisRect.SetSize(pWindow->PixelToLogic(pWindow->GetSizePixel(), pWindow->GetDrawMapMode(sal_True))); - + Rectangle aCellRect( pDoc->GetMMRect( aCell.Col(), aCell.Row(), aCell.Col(), aCell.Row(), aCell.Tab() ) ); + Size aVisSize( pWindow->PixelToLogic( pWindow->GetSizePixel(), pWindow->GetDrawMapMode( sal_True ) ) ); + Point aVisPos( aCellRect.TopLeft() ); + if ( pDoc->IsLayoutRTL( aCell.Tab() ) ) + { + aVisPos = aCellRect.TopRight(); + aVisPos.X() -= aVisSize.Width(); + } + Rectangle aVisRect( aVisPos, aVisSize ); aVisArea = AWTRectangle(aVisRect); } } @@ -430,7 +437,7 @@ awt::Rectangle ScViewPaneBase::GetVisArea() const //------------------------------------------------------------------------ -ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, USHORT nP) : +ScViewPaneObj::ScViewPaneObj(ScTabViewShell* pViewSh, sal_uInt16 nP) : ScViewPaneBase( pViewSh, nP ) { } @@ -586,7 +593,7 @@ void ScTabViewObj::SheetChanged( bool bSameTabButMoved ) uno::Reference< uno::XInterface > xSource(xView, uno::UNO_QUERY); aEvent.Source = xSource; aEvent.ActiveSheet = new ScTableSheetObj(pDocSh, pViewData->GetTabNo()); - for ( USHORT n=0; n<aActivationListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aActivationListeners.Count(); n++ ) { try { @@ -664,26 +671,26 @@ uno::Sequence<sal_Int8> SAL_CALL ScTabViewObj::getImplementationId() // XDocumentView -BOOL lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges ) +sal_Bool lcl_TabInRanges( SCTAB nTab, const ScRangeList& rRanges ) { - ULONG nCount = rRanges.Count(); - for (ULONG i=0; i<nCount; i++) + sal_uLong nCount = rRanges.Count(); + for (sal_uLong i=0; i<nCount; i++) { const ScRange* pRange = rRanges.GetObject(i); if ( nTab >= pRange->aStart.Tab() && nTab <= pRange->aEnd.Tab() ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* pSelObj ) { - BOOL bFound = FALSE; + sal_Bool bFound = sal_False; SCTAB nObjectTab = 0; SdrModel* pModel = rDrawView.GetModel(); - USHORT nPageCount = pModel->GetPageCount(); - for (USHORT i=0; i<nPageCount && !bFound; i++) + sal_uInt16 nPageCount = pModel->GetPageCount(); + for (sal_uInt16 i=0; i<nPageCount && !bFound; i++) { SdrPage* pPage = pModel->GetPage(i); if (pPage) @@ -694,7 +701,7 @@ void lcl_ShowObject( ScTabViewShell& rViewSh, ScDrawView& rDrawView, SdrObject* { if ( pObject == pSelObj ) { - bFound = TRUE; + bFound = sal_True; nObjectTab = static_cast<SCTAB>(i); } pObject = aIter.Next(); @@ -716,11 +723,11 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) ScTabViewShell* pViewSh = GetViewShell(); if ( !pViewSh ) - return FALSE; + return sal_False; //! Type of aSelection can be some specific interface instead of XInterface - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; uno::Reference<uno::XInterface> xInterface(aSelection, uno::UNO_QUERY); if ( !xInterface.is() ) //clear all selections { @@ -732,7 +739,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } else //#102232#; if there is no DrawView remove range selection pViewSh->Unmark(); - bRet = TRUE; + bRet = sal_True; } if (bDrawSelModeSet) // remove DrawSelMode if set by API; if necessary it will be set again later @@ -773,13 +780,13 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if (pDisp) pDisp->Execute( pFunc->GetSlotID(), SFX_CALLMODE_SYNCHRON ); } - pViewSh->SetDrawShell(FALSE); - pViewSh->SetDrawSelMode(FALSE); // nach dem Dispatcher-Execute + pViewSh->SetDrawShell(sal_False); + pViewSh->SetDrawSelMode(sal_False); // nach dem Dispatcher-Execute // Ranges selektieren const ScRangeList& rRanges = pRangesImp->GetRangeList(); - ULONG nRangeCount = rRanges.Count(); + sal_uLong nRangeCount = rRanges.Count(); // for empty range list, remove selection (cursor remains where it was) if ( nRangeCount == 0 ) pViewSh->Unmark(); @@ -794,7 +801,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) pViewSh->SetTabNo( pFirst->aStart.Tab() ); pViewSh->DoneBlockMode(); pViewSh->InitOwnBlockMode(); - pViewData->GetMarkData().MarkFromRangeList( rRanges, TRUE ); + pViewData->GetMarkData().MarkFromRangeList( rRanges, sal_True ); pViewSh->MarkDataChanged(); pViewData->GetDocShell()->PostPaintGridAll(); // Markierung (alt&neu) if ( pFirst ) @@ -806,7 +813,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) //! Methode an der View, um RangeList zu selektieren } - bRet = TRUE; + bRet = sal_True; } } else if ( pShapeImp || xShapeColl.is() ) // Drawing-Layer @@ -827,7 +834,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) if ( pPV && pObj->GetPage() == pPV->GetPage() ) { pDrawView->MarkObj( pObj, pPV ); - bRet = TRUE; + bRet = sal_True; } } } @@ -876,14 +883,14 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection ) } } if (bAllMarked) - bRet = TRUE; + bRet = sal_True; } else - bRet = TRUE; // empty XShapes (all shapes are deselected) + bRet = sal_True; // empty XShapes (all shapes are deselected) } if (bRet) - pViewSh->SetDrawShell(TRUE); + pViewSh->SetDrawShell(sal_True); } } @@ -906,7 +913,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) if (pDrawView) { const SdrMarkList& rMarkList = pDrawView->GetMarkedObjectList(); - ULONG nMarkCount = rMarkList.GetMarkCount(); + sal_uLong nMarkCount = rMarkList.GetMarkCount(); if (nMarkCount) { // ShapeCollection erzeugen (wie in SdXImpressView::getSelection im Draw) @@ -915,7 +922,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) SvxShapeCollection* pShapes = new SvxShapeCollection(); uno::Reference<uno::XInterface> xRet(static_cast<cppu::OWeakObject*>(pShapes)); - for (ULONG i=0; i<nMarkCount; i++) + for (sal_uLong i=0; i<nMarkCount; i++) { SdrObject* pDrawObj = rMarkList.GetMark(i)->GetMarkedSdrObj(); if (pDrawObj) @@ -951,7 +958,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) ScMarkData aFilteredMark( rMark ); ScViewUtil::UnmarkFiltered( aFilteredMark, pDocSh->GetDocument()); ScRangeList aRangeList; - aFilteredMark.FillRangeListWithMarks( &aRangeList, FALSE); + aFilteredMark.FillRangeListWithMarks( &aRangeList, sal_False); // Theoretically a selection may start and end on a filtered row. switch (aRangeList.Count()) { @@ -991,7 +998,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection() throw(uno::RuntimeException) // remember if the selection was from the cursor position without anything selected // (used when rendering the selection) - pObj->SetCursorOnly( TRUE ); + pObj->SetCursorOnly( sal_True ); } } @@ -1008,7 +1015,7 @@ rtl::OUString ScTabViewObj::getPrinterName(void) const ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE); + SfxPrinter* pPrinter = pViewSh->GetPrinter(sal_True); if (pPrinter) return pPrinter->GetName(); } @@ -1025,7 +1032,7 @@ void ScTabViewObj::setPrinterName(const rtl::OUString& PrinterName) ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - SfxPrinter* pPrinter = pViewSh->GetPrinter(TRUE); + SfxPrinter* pPrinter = pViewSh->GetPrinter(sal_True); if (pPrinter) { String aString(PrinterName); @@ -1073,7 +1080,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getCount() throw(uno::RuntimeException) { ScUnoGuard aGuard; ScTabViewShell* pViewSh = GetViewShell(); - USHORT nPanes = 0; + sal_uInt16 nPanes = 0; if (pViewSh) { nPanes = 1; @@ -1091,7 +1098,7 @@ uno::Any SAL_CALL ScTabViewObj::getByIndex( sal_Int32 nIndex ) lang::WrappedTargetException, uno::RuntimeException) { ScUnoGuard aGuard; - uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((USHORT)nIndex)); + uno::Reference<sheet::XViewPane> xPane(GetObjectByIndex_Impl((sal_uInt16)nIndex)); if (xPane.is()) return uno::makeAny(xPane); else @@ -1113,7 +1120,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasElements() throw(uno::RuntimeException) // XSpreadsheetView -ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const +ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const { static ScSplitPos ePosHV[4] = { SC_SPLIT_TOPLEFT, SC_SPLIT_BOTTOMLEFT, SC_SPLIT_TOPRIGHT, SC_SPLIT_BOTTOMRIGHT }; @@ -1122,22 +1129,22 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const if (pViewSh) { ScSplitPos eWhich = SC_SPLIT_BOTTOMLEFT; // default Position - BOOL bError = FALSE; + sal_Bool bError = sal_False; ScViewData* pViewData = pViewSh->GetViewData(); - BOOL bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE ); - BOOL bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE ); + sal_Bool bHor = ( pViewData->GetHSplitMode() != SC_SPLIT_NONE ); + sal_Bool bVer = ( pViewData->GetVSplitMode() != SC_SPLIT_NONE ); if ( bHor && bVer ) { // links oben, links unten, rechts oben, rechts unten - wie in Excel if ( nIndex < 4 ) eWhich = ePosHV[nIndex]; else - bError = TRUE; + bError = sal_True; } else if ( bHor ) { if ( nIndex > 1 ) - bError = TRUE; + bError = sal_True; else if ( nIndex == 1 ) eWhich = SC_SPLIT_BOTTOMRIGHT; // sonst SC_SPLIT_BOTTOMLEFT @@ -1145,16 +1152,16 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(USHORT nIndex) const else if ( bVer ) { if ( nIndex > 1 ) - bError = TRUE; + bError = sal_True; else if ( nIndex == 0 ) eWhich = SC_SPLIT_TOPLEFT; // sonst SC_SPLIT_BOTTOMLEFT } else if ( nIndex > 0 ) - bError = TRUE; // nicht geteilt: nur 0 gueltig + bError = sal_True; // nicht geteilt: nur 0 gueltig if (!bError) - return new ScViewPaneObj( pViewSh, sal::static_int_cast<USHORT>(eWhich) ); + return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) ); } return NULL; @@ -1230,7 +1237,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP Window* pActiveWin = pData->GetActiveWin(); Point aPos = pActiveWin->PixelToLogic(rPoint); - USHORT nHitLog = (USHORT) pActiveWin->PixelToLogic( + sal_uInt16 nHitLog = (sal_uInt16) pActiveWin->PixelToLogic( Size(pDrawView->GetHitTolerancePixel(),0)).Width(); sal_uInt32 nCount(pDrawPage->GetObjCount()); @@ -1283,7 +1290,7 @@ sal_Bool ScTabViewObj::MousePressed( const awt::MouseEvent& e ) aMouseEvent.PopupTrigger = e.PopupTrigger; aMouseEvent.Target = xTarget; - for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ ) + for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ ) { try { @@ -1377,7 +1384,7 @@ sal_Bool ScTabViewObj::MouseReleased( const awt::MouseEvent& e ) aMouseEvent.PopupTrigger = e.PopupTrigger; aMouseEvent.Target = xTarget; - for ( USHORT n=0; n<aMouseClickHandlers.Count(); n++ ) + for ( sal_uInt16 n=0; n<aMouseClickHandlers.Count(); n++ ) { try { @@ -1403,10 +1410,10 @@ void ScTabViewObj::StartMouseListening() void ScTabViewObj::EndMouseListening() { - USHORT nCount(aMouseClickHandlers.Count()); + sal_uInt16 nCount(aMouseClickHandlers.Count()); lang::EventObject aEvent; aEvent.Source = (cppu::OWeakObject*)this; - for ( USHORT n=0; n<nCount; n++ ) + for ( sal_uInt16 n=0; n<nCount; n++ ) { try { @@ -1425,10 +1432,10 @@ void ScTabViewObj::StartActivationListening() void ScTabViewObj::EndActivationListening() { - USHORT nCount = aActivationListeners.Count(); + sal_uInt16 nCount = aActivationListeners.Count(); lang::EventObject aEvent; aEvent.Source = (cppu::OWeakObject*)this; - for ( USHORT n=0; n<nCount; n++ ) + for ( sal_uInt16 n=0; n<nCount; n++ ) { try { @@ -1448,7 +1455,7 @@ void SAL_CALL ScTabViewObj::addEnhancedMouseClickHandler( const uno::Reference< if (aListener.is()) { - USHORT nCount = aMouseClickHandlers.Count(); + sal_uInt16 nCount = aMouseClickHandlers.Count(); uno::Reference<awt::XEnhancedMouseClickHandler> *pObj = new uno::Reference<awt::XEnhancedMouseClickHandler>( aListener ); aMouseClickHandlers.Insert( pObj, nCount ); @@ -1462,8 +1469,8 @@ void SAL_CALL ScTabViewObj::removeEnhancedMouseClickHandler( const uno::Referenc throw (uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aMouseClickHandlers.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aMouseClickHandlers.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<awt::XEnhancedMouseClickHandler> *pObj = aMouseClickHandlers[n]; if ( *pObj == aListener ) @@ -1482,7 +1489,7 @@ void SAL_CALL ScTabViewObj::addActivationEventListener( const uno::Reference< sh if (aListener.is()) { - USHORT nCount = aActivationListeners.Count(); + sal_uInt16 nCount = aActivationListeners.Count(); uno::Reference<sheet::XActivationEventListener> *pObj = new uno::Reference<sheet::XActivationEventListener>( aListener ); aActivationListeners.Insert( pObj, nCount ); @@ -1496,8 +1503,8 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference< throw (uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aActivationListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aActivationListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<sheet::XActivationEventListener> *pObj = aActivationListeners[n]; if ( *pObj == aListener ) @@ -1511,16 +1518,16 @@ void SAL_CALL ScTabViewObj::removeActivationEventListener( const uno::Reference< #if 0 -BOOL ScTabViewObj::getPagebreakMode(void) const +sal_Bool ScTabViewObj::getPagebreakMode(void) const { ScUnoGuard aGuard; ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) return pViewSh->GetViewData()->IsPagebreakMode(); - return FALSE; + return sal_False; } -void ScTabViewObj::setPagebreakMode(BOOL PagebreakMode) +void ScTabViewObj::setPagebreakMode(sal_Bool PagebreakMode) { ScUnoGuard aGuard; ScTabViewShell* pViewSh = GetViewShell(); @@ -1530,18 +1537,18 @@ void ScTabViewObj::setPagebreakMode(BOOL PagebreakMode) #endif -INT16 ScTabViewObj::GetZoom(void) const +sal_Int16 ScTabViewObj::GetZoom(void) const { ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { const Fraction& rZoomY = pViewSh->GetViewData()->GetZoomY(); // Y wird angezeigt - return (INT16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator()); + return (sal_Int16)(( rZoomY.GetNumerator() * 100 ) / rZoomY.GetDenominator()); } return 0; } -void ScTabViewObj::SetZoom(INT16 nZoom) +void ScTabViewObj::SetZoom(sal_Int16 nZoom) { ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) @@ -1558,7 +1565,7 @@ void ScTabViewObj::SetZoom(INT16 nZoom) } } Fraction aFract( nZoom, 100 ); - pViewSh->SetZoom( aFract, aFract, TRUE ); + pViewSh->SetZoom( aFract, aFract, sal_True ); pViewSh->PaintGrid(); pViewSh->PaintTop(); pViewSh->PaintLeft(); @@ -1567,9 +1574,9 @@ void ScTabViewObj::SetZoom(INT16 nZoom) } } -INT16 ScTabViewObj::GetZoomType(void) const +sal_Int16 ScTabViewObj::GetZoomType(void) const { - INT16 aZoomType = view::DocumentZoomType::OPTIMAL; + sal_Int16 aZoomType = view::DocumentZoomType::OPTIMAL; ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { @@ -1596,7 +1603,7 @@ INT16 ScTabViewObj::GetZoomType(void) const return aZoomType; } -void ScTabViewObj::SetZoomType(INT16 aZoomType) +void ScTabViewObj::SetZoomType(sal_Int16 aZoomType) { ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) @@ -1639,11 +1646,11 @@ void ScTabViewObj::SetZoomType(INT16 aZoomType) { case SVX_ZOOM_WHOLEPAGE: case SVX_ZOOM_PAGEWIDTH: - pView->SetZoomType( eZoomType, TRUE ); + pView->SetZoomType( eZoomType, sal_True ); break; default: - pView->SetZoomType( SVX_ZOOM_PERCENT, TRUE ); + pView->SetZoomType( SVX_ZOOM_PERCENT, sal_True ); } SetZoom( nZoom ); } @@ -1663,7 +1670,7 @@ sal_Bool SAL_CALL ScTabViewObj::getIsWindowSplit() throw(uno::RuntimeException) pViewData->GetVSplitMode() == SC_SPLIT_NORMAL ); } - return FALSE; + return sal_False; } sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException) @@ -1679,7 +1686,7 @@ sal_Bool SAL_CALL ScTabViewObj::hasFrozenPanes() throw(uno::RuntimeException) pViewData->GetVSplitMode() == SC_SPLIT_FIX ); } - return FALSE; + return sal_False; } sal_Int32 SAL_CALL ScTabViewObj::getSplitHorizontal() throw(uno::RuntimeException) @@ -1725,7 +1732,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitColumn() throw(uno::RuntimeException) SCsCOL nCol; SCsROW nRow; - pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, FALSE ); + pViewData->GetPosFromPixel( nSplit, 0, ePos, nCol, nRow, sal_False ); if ( nCol > 0 ) return nCol; } @@ -1747,7 +1754,7 @@ sal_Int32 SAL_CALL ScTabViewObj::getSplitRow() throw(uno::RuntimeException) ScSplitPos ePos = SC_SPLIT_TOPLEFT; // es ist vertikal geteilt SCsCOL nCol; SCsROW nRow; - pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, FALSE ); + pViewData->GetPosFromPixel( 0, nSplit, ePos, nCol, nRow, sal_False ); if ( nRow > 0 ) return nRow; } @@ -1762,8 +1769,8 @@ void SAL_CALL ScTabViewObj::splitAtPosition( sal_Int32 nPixelX, sal_Int32 nPixel ScTabViewShell* pViewSh = GetViewShell(); if (pViewSh) { - pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), TRUE, TRUE ); - pViewSh->FreezeSplitters( FALSE ); + pViewSh->SplitAtPixel( Point( nPixelX, nPixelY ), sal_True, sal_True ); + pViewSh->FreezeSplitters( sal_False ); pViewSh->InvalidateSplit(); } } @@ -1785,11 +1792,11 @@ void SAL_CALL ScTabViewObj::freezeAtPosition( sal_Int32 nColumns, sal_Int32 nRow aWinStart = pWin->GetPosPixel(); ScViewData* pViewData = pViewSh->GetViewData(); - Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, TRUE )); + Point aSplit(pViewData->GetScrPos( (SCCOL)nColumns, (SCROW)nRows, SC_SPLIT_BOTTOMLEFT, sal_True )); aSplit += aWinStart; - pViewSh->SplitAtPixel( aSplit, TRUE, TRUE ); - pViewSh->FreezeSplitters( TRUE ); + pViewSh->SplitAtPixel( aSplit, sal_True, sal_True ); + pViewSh->FreezeSplitters( sal_True ); pViewSh->InvalidateSplit(); } } @@ -1809,8 +1816,8 @@ void SAL_CALL ScTabViewObj::removeSelectionChangeListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aSelectionListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aSelectionListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<view::XSelectionChangeListener> *pObj = aSelectionListeners[n]; if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface? @@ -1825,7 +1832,7 @@ void ScTabViewObj::SelectionChanged() { lang::EventObject aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aSelectionListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aSelectionListeners.Count(); n++ ) (*aSelectionListeners[n])->selectionChanged( aEvent ); // handle sheet events @@ -2038,6 +2045,16 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const rtl::OUString& aProperty else if ( aString.EqualsAscii( SC_UNO_VISAREA ) ) aRet <<= GetVisArea(); else if ( aString.EqualsAscii( SC_UNO_ZOOMTYPE ) ) aRet <<= GetZoomType(); else if ( aString.EqualsAscii( SC_UNO_ZOOMVALUE ) ) aRet <<= GetZoom(); + else if ( aString.EqualsAscii( SC_UNO_VISAREASCREEN ) ) + { + ScViewData* pViewData = pViewSh->GetViewData(); + Window* pActiveWin = ( pViewData ? pViewData->GetActiveWin() : NULL ); + if ( pActiveWin ) + { + Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL ); + aRet <<= AWTRectangle( aRect ); + } + } } return aRet; @@ -2062,8 +2079,8 @@ void SAL_CALL ScTabViewObj::removePropertyChangeListener( const ::rtl::OUString& uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aPropertyChgListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aPropertyChgListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<beans::XPropertyChangeListener> *pObj = aPropertyChgListeners[n]; if ( *pObj == xListener ) //! wozu der Mumpitz mit queryInterface? @@ -2094,7 +2111,7 @@ void ScTabViewObj::VisAreaChanged() { beans::PropertyChangeEvent aEvent; aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); - for ( USHORT n=0; n<aPropertyChgListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aPropertyChgListeners.Count(); n++ ) (*aPropertyChgListeners[n])->propertyChange( aEvent ); } @@ -2109,9 +2126,9 @@ void SAL_CALL ScTabViewObj::startRangeSelection( if (pViewSh) { String aInitVal, aTitle; - BOOL bCloseOnButtonUp = FALSE; - BOOL bSingleCell = FALSE; - BOOL bMultiSelection = FALSE; + sal_Bool bCloseOnButtonUp = sal_False; + sal_Bool bSingleCell = sal_False; + sal_Bool bMultiSelection = sal_False; rtl::OUString aStrVal; const beans::PropertyValue* pPropArray = aArguments.getConstArray(); @@ -2166,8 +2183,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRangeSelListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRangeSelListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<sheet::XRangeSelectionListener> *pObj = aRangeSelListeners[n]; if ( *pObj == xListener ) @@ -2193,8 +2210,8 @@ void SAL_CALL ScTabViewObj::removeRangeSelectionChangeListener( throw(uno::RuntimeException) { ScUnoGuard aGuard; - USHORT nCount = aRangeChgListeners.Count(); - for ( USHORT n=nCount; n--; ) + sal_uInt16 nCount = aRangeChgListeners.Count(); + for ( sal_uInt16 n=nCount; n--; ) { uno::Reference<sheet::XRangeSelectionChangeListener> *pObj = aRangeChgListeners[n]; if ( *pObj == xListener ) @@ -2211,7 +2228,7 @@ void ScTabViewObj::RangeSelDone( const String& rText ) aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.RangeDescriptor = rtl::OUString( rText ); - for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ ) (*aRangeSelListeners[n])->done( aEvent ); } @@ -2221,7 +2238,7 @@ void ScTabViewObj::RangeSelAborted( const String& rText ) aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.RangeDescriptor = rtl::OUString( rText ); - for ( USHORT n=0; n<aRangeSelListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRangeSelListeners.Count(); n++ ) (*aRangeSelListeners[n])->aborted( aEvent ); } @@ -2231,7 +2248,7 @@ void ScTabViewObj::RangeSelChanged( const String& rText ) aEvent.Source.set(static_cast<cppu::OWeakObject*>(this)); aEvent.RangeDescriptor = rtl::OUString( rText ); - for ( USHORT n=0; n<aRangeChgListeners.Count(); n++ ) + for ( sal_uInt16 n=0; n<aRangeChgListeners.Count(); n++ ) (*aRangeChgListeners[n])->descriptorChanged( aEvent ); } @@ -2332,7 +2349,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref ScUnoGuard aGuard; ScEditShell* pShell = PTR_CAST( ScEditShell, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ); if (pShell) - pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), FALSE ); + pShell->GetEditView()->InsertText( xTrans, ::rtl::OUString(), sal_False ); else { ScDrawTextObjectBar* pTextShell = PTR_CAST( ScDrawTextObjectBar, GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ); @@ -2343,7 +2360,7 @@ void SAL_CALL ScTabViewObj::insertTransferable( const ::com::sun::star::uno::Ref OutlinerView* pOutView = pView->GetTextEditOutlinerView(); if ( pOutView ) { - pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), FALSE ); + pOutView->GetEditView().InsertText( xTrans, ::rtl::OUString(), sal_False ); return; } } |