diff options
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r-- | sc/source/ui/unoobj/docuno.cxx | 236 |
1 files changed, 118 insertions, 118 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 828ec8f09297..63b7943ade87 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -567,7 +567,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 @@ -609,7 +609,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 @@ -760,7 +760,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 @@ -768,7 +768,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; @@ -821,11 +821,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() ) @@ -851,7 +851,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 } @@ -880,7 +880,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; } } } @@ -894,9 +894,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 } @@ -914,7 +914,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 ); } } } @@ -1049,7 +1049,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 ); @@ -1059,10 +1059,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, NULL ); + (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_False, NULL, 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() ) ); @@ -1137,7 +1137,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; @@ -1153,7 +1153,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(); @@ -1193,7 +1193,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec //<---i56629 } - (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, TRUE, NULL, NULL ); + (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, sal_True, NULL, NULL ); // resolve the hyperlinks for PDF export @@ -1308,7 +1308,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; @@ -1338,7 +1338,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(); @@ -1372,7 +1372,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? @@ -1383,7 +1383,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? @@ -1397,7 +1397,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 ) @@ -1430,7 +1430,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 ); } } @@ -1443,7 +1443,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(); } @@ -1456,7 +1456,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 @@ -1543,7 +1543,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 ); @@ -1592,7 +1592,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 ); } } @@ -1668,7 +1668,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... @@ -1738,10 +1738,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 ) ) @@ -1782,7 +1782,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(); } } @@ -1848,11 +1848,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 ) ) { @@ -1958,7 +1958,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 @@ -2195,9 +2195,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; @@ -2235,7 +2235,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++) @@ -2248,14 +2248,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; @@ -2353,7 +2353,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) { @@ -2361,7 +2361,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) { @@ -2384,7 +2384,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; @@ -2402,7 +2402,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 ); } } } @@ -2493,12 +2493,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 @@ -2508,13 +2508,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 @@ -2525,7 +2525,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); @@ -2533,7 +2533,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 @@ -2543,7 +2543,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 ); } } } @@ -2556,8 +2556,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 @@ -2581,17 +2581,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) @@ -2608,8 +2608,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 @@ -2626,10 +2626,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 ); } @@ -2641,10 +2641,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) @@ -2661,7 +2661,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; @@ -2669,7 +2669,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 { @@ -2688,7 +2688,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(); @@ -2699,7 +2699,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(); @@ -2823,9 +2823,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; } //------------------------------------------------------------------------ @@ -2886,14 +2886,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 @@ -2903,14 +2903,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 @@ -2992,9 +2992,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 @@ -3028,33 +3028,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 ); } } @@ -3075,7 +3075,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 ) ) @@ -3086,7 +3086,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 ) ) @@ -3152,14 +3152,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 @@ -3169,14 +3169,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 @@ -3261,13 +3261,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? @@ -3278,14 +3278,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 ) ) @@ -3299,12 +3299,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 ) ) { @@ -3337,7 +3337,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 ) ) @@ -3353,7 +3353,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 ) ) @@ -3507,7 +3507,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 ); } } @@ -3520,11 +3520,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 ); } } } @@ -3545,7 +3545,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 ); @@ -3613,7 +3613,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 ???? @@ -3629,16 +3629,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 ); @@ -3663,13 +3663,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, @@ -3683,7 +3683,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 ); } @@ -3697,7 +3697,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 ); } } |