summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-18 15:33:40 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-18 15:33:40 +0100
commite6064484fae8aa2797f86c68e9a8d23d2e213367 (patch)
treedb2f4d140efca43ab01dee4fc053fff0829d106b /sc/source/ui/undo
parent9e0a09e89c38774dd1af902387a8b25de158b634 (diff)
parent378c75a798c8baa34cb26e7f07fe28cb5ee2a85f (diff)
Merge remote-tracking branch 'origin/integration/dev300_m101'
Conflicts: chart2/source/controller/main/UndoManager.cxx chart2/source/tools/RegressionCurveHelper.cxx sc/inc/address.hxx sc/inc/attrib.hxx sc/inc/bigrange.hxx sc/inc/callform.hxx sc/inc/cell.hxx sc/inc/chartarr.hxx sc/inc/chartlis.hxx sc/inc/chgtrack.hxx sc/inc/collect.hxx sc/inc/compiler.hxx sc/inc/detdata.hxx sc/inc/document.hxx sc/inc/fillinfo.hxx sc/inc/olinetab.hxx sc/inc/prnsave.hxx sc/inc/queryparam.hxx sc/inc/sc.hrc sc/inc/scabstdlg.hxx sc/inc/table.hxx sc/inc/validat.hxx sc/inc/zforauto.hxx sc/source/core/data/documen2.cxx sc/source/core/data/document.cxx sc/source/core/data/table1.cxx sc/source/core/tool/address.cxx sc/source/core/tool/token.cxx sc/source/filter/excel/frmbase.cxx sc/source/filter/excel/impop.cxx sc/source/filter/excel/xename.cxx sc/source/filter/inc/formel.hxx sc/source/filter/inc/xename.hxx sc/source/filter/xml/xmlexprt.cxx sc/source/filter/xml/xmlnexpi.cxx sc/source/filter/xml/xmlnexpi.hxx sc/source/ui/dbgui/filtdlg.cxx sc/source/ui/inc/docfunc.hxx sc/source/ui/inc/namedlg.hxx sc/source/ui/namedlg/namedlg.cxx sc/source/ui/src/namedlg.src
Diffstat (limited to 'sc/source/ui/undo')
-rw-r--r--sc/source/ui/undo/areasave.cxx34
-rw-r--r--sc/source/ui/undo/refundo.cxx6
-rw-r--r--sc/source/ui/undo/undobase.cxx74
-rw-r--r--sc/source/ui/undo/undoblk.cxx271
-rw-r--r--sc/source/ui/undo/undoblk2.cxx33
-rw-r--r--sc/source/ui/undo/undoblk3.cxx241
-rw-r--r--sc/source/ui/undo/undocell.cxx130
-rw-r--r--sc/source/ui/undo/undodat.cxx332
-rw-r--r--sc/source/ui/undo/undodraw.cxx16
-rw-r--r--sc/source/ui/undo/undoolk.cxx2
-rw-r--r--sc/source/ui/undo/undorangename.cxx4
-rw-r--r--sc/source/ui/undo/undostyl.cxx24
-rw-r--r--sc/source/ui/undo/undotab.cxx305
-rw-r--r--sc/source/ui/undo/undoutil.cxx15
14 files changed, 744 insertions, 743 deletions
diff --git a/sc/source/ui/undo/areasave.cxx b/sc/source/ui/undo/areasave.cxx
index 56eb56508336..fab15bd8a996 100644
--- a/sc/source/ui/undo/areasave.cxx
+++ b/sc/source/ui/undo/areasave.cxx
@@ -74,7 +74,7 @@ ScDataObject* ScAreaLinkSaver::Clone() const
return new ScAreaLinkSaver( *this );
}
-BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
+sal_Bool ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
{
return ( aFileName == rCompare.GetFile() &&
aFilterName == rCompare.GetFilter() &&
@@ -83,7 +83,7 @@ BOOL ScAreaLinkSaver::IsEqualSource( const ScAreaLink& rCompare ) const
nRefresh == rCompare.GetRefreshDelay() );
}
-BOOL ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
+sal_Bool ScAreaLinkSaver::IsEqual( const ScAreaLink& rCompare ) const
{
return ( IsEqualSource( rCompare ) &&
aDestArea == rCompare.GetDestArea() );
@@ -105,11 +105,11 @@ void ScAreaLinkSaver::InsertNewLink( ScDocument* pDoc ) const
{
ScAreaLink* pLink = new ScAreaLink( pObjSh, aFileName, aFilterName, aOptions,
aSourceArea, aDestArea.aStart, nRefresh );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aDestArea );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aFileName, &aFilterName, &aSourceArea );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
}
}
@@ -133,7 +133,7 @@ ScDataObject* ScAreaLinkSaveCollection::Clone() const
return new ScAreaLinkSaveCollection( *this );
}
-BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
+sal_Bool ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
{
// IsEqual can be checked in sequence.
// Neither ref-update nor removing links will change the order.
@@ -141,31 +141,31 @@ BOOL ScAreaLinkSaveCollection::IsEqual( const ScDocument* pDoc ) const
sfx2::LinkManager* pLinkManager = const_cast<ScDocument*>(pDoc)->GetLinkManager();
if (pLinkManager)
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
{
if ( nPos >= GetCount() || !(*this)[nPos]->IsEqual( *(ScAreaLink*)pBase ) )
- return FALSE;
+ return false;
++nPos;
}
}
if ( nPos < GetCount() )
- return FALSE; // fewer links in the document than in the save collection
+ return false; // fewer links in the document than in the save collection
}
- return TRUE;
+ return sal_True;
}
ScAreaLink* lcl_FindLink( const ::sfx2::SvBaseLinks& rLinks, const ScAreaLinkSaver& rSaver )
{
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if ( pBase->ISA(ScAreaLink) &&
@@ -188,8 +188,8 @@ void ScAreaLinkSaveCollection::Restore( ScDocument* pDoc ) const
if (pLinkManager)
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nSaveCount = GetCount();
- for (USHORT nPos=0; nPos<nSaveCount; nPos++)
+ sal_uInt16 nSaveCount = GetCount();
+ for (sal_uInt16 nPos=0; nPos<nSaveCount; nPos++)
{
ScAreaLinkSaver* pSaver = (*this)[nPos];
ScAreaLink* pLink = lcl_FindLink( rLinks, *pSaver );
@@ -209,8 +209,8 @@ ScAreaLinkSaveCollection* ScAreaLinkSaveCollection::CreateFromDoc( const ScDocum
if (pLinkManager)
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- USHORT nLinkCount = rLinks.Count();
- for (USHORT i=0; i<nLinkCount; i++)
+ sal_uInt16 nLinkCount = rLinks.Count();
+ for (sal_uInt16 i=0; i<nLinkCount; i++)
{
::sfx2::SvBaseLink* pBase = *rLinks[i];
if (pBase->ISA(ScAreaLink))
diff --git a/sc/source/ui/undo/refundo.cxx b/sc/source/ui/undo/refundo.cxx
index 3763dfc89f05..0376f7c7a9c4 100644
--- a/sc/source/ui/undo/refundo.cxx
+++ b/sc/source/ui/undo/refundo.cxx
@@ -167,7 +167,7 @@ void ScRefUndoData::DeleteUnchanged( const ScDocument* pDoc )
}
}
-void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
+void ScRefUndoData::DoUndo( ScDocument* pDoc, sal_Bool bUndoRefFirst )
{
if (pDBCollection)
pDoc->SetDBCollection( new ScDBCollection(*pDBCollection) );
@@ -196,8 +196,8 @@ void ScRefUndoData::DoUndo( ScDocument* pDoc, BOOL bUndoRefFirst )
if (pDBCollection || pRangeName)
{
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // Mehrfachberechnungen vermeiden
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // Mehrfachberechnungen vermeiden
pDoc->CompileAll();
pDoc->SetDirty();
pDoc->SetAutoCalc( bOldAutoCalc );
diff --git a/sc/source/ui/undo/undobase.cxx b/sc/source/ui/undo/undobase.cxx
index 609c2eb05924..9c603a3d33a3 100644
--- a/sc/source/ui/undo/undobase.cxx
+++ b/sc/source/ui/undo/undobase.cxx
@@ -67,14 +67,27 @@ ScSimpleUndo::~ScSimpleUndo()
delete pDetectiveUndo;
}
-BOOL ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
+bool ScSimpleUndo::SetViewMarkData( const ScMarkData& rMarkData )
+{
+ if ( IsPaintLocked() )
+ return false;
+
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
+ if ( !pViewShell )
+ return false;
+
+ pViewShell->SetMarkData( rMarkData );
+ return true;
+}
+
+sal_Bool ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
{
// Zu jeder Undo-Action kann eine SdrUndoGroup fuer das Aktualisieren
// der Detektiv-Pfeile gehoeren.
// DetectiveRefresh kommt immer hinterher, die SdrUndoGroup ist in
// eine ScUndoDraw Action verpackt.
// Nur beim automatischen Aktualisieren wird AddUndoAction mit
- // bTryMerg=TRUE gerufen.
+ // bTryMerg=sal_True gerufen.
if ( !pDetectiveUndo && pNextAction->ISA(ScUndoDraw) )
{
@@ -84,15 +97,15 @@ BOOL ScSimpleUndo::Merge( SfxUndoAction *pNextAction )
ScUndoDraw* pCalcUndo = (ScUndoDraw*)pNextAction;
pDetectiveUndo = pCalcUndo->GetDrawUndo();
pCalcUndo->ForgetDrawUndo();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return false;
}
void ScSimpleUndo::BeginUndo()
{
- pDocShell->SetInUndo( TRUE );
+ pDocShell->SetInUndo( sal_True );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -115,12 +128,12 @@ void ScSimpleUndo::EndUndo()
pViewShell->ShowAllCursors();
}
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScSimpleUndo::BeginRedo()
{
- pDocShell->SetInUndo( TRUE ); //! eigenes Flag fuer Redo?
+ pDocShell->SetInUndo( sal_True ); //! eigenes Flag fuer Redo?
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -142,7 +155,7 @@ void ScSimpleUndo::EndRedo()
pViewShell->ShowAllCursors();
}
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScSimpleUndo::ShowTable( SCTAB nTab )
@@ -185,7 +198,7 @@ ScBlockUndo::~ScBlockUndo()
void ScBlockUndo::BeginUndo()
{
ScSimpleUndo::BeginUndo();
- EnableDrawAdjust( pDocShell->GetDocument(), FALSE );
+ EnableDrawAdjust( pDocShell->GetDocument(), false );
}
void ScBlockUndo::EndUndo()
@@ -193,7 +206,7 @@ void ScBlockUndo::EndUndo()
if (eMode == SC_UNDO_AUTOHEIGHT)
AdjustHeight();
- EnableDrawAdjust( pDocShell->GetDocument(), TRUE );
+ EnableDrawAdjust( pDocShell->GetDocument(), sal_True );
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
ShowBlock();
@@ -209,7 +222,7 @@ void ScBlockUndo::EndRedo()
ScSimpleUndo::EndRedo();
}
-BOOL ScBlockUndo::AdjustHeight()
+sal_Bool ScBlockUndo::AdjustHeight()
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -233,9 +246,9 @@ BOOL ScBlockUndo::AdjustHeight()
nPPTY = ScGlobal::nScreenPPTY;
}
- BOOL bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(),
+ sal_Bool bRet = pDoc->SetOptimalHeight( aBlockRange.aStart.Row(), aBlockRange.aEnd.Row(),
/*!*/ aBlockRange.aStart.Tab(), 0, &aVirtDev,
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
if (bRet)
pDocShell->PostPaint( 0, aBlockRange.aStart.Row(), aBlockRange.aStart.Tab(),
@@ -247,12 +260,15 @@ BOOL ScBlockUndo::AdjustHeight()
void ScBlockUndo::ShowBlock()
{
+ if ( IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
ShowTable( aBlockRange ); // bei mehreren Tabs im Range ist jede davon gut
pViewShell->MoveCursorAbs( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
ScRange aRange = aBlockRange;
aRange.aStart.SetTab( nTab );
@@ -290,7 +306,7 @@ void ScMoveUndo::UndoRef()
{
ScDocument* pDoc = pDocShell->GetDocument();
ScRange aRange(0,0,0, MAXCOL,MAXROW,pRefUndoDoc->GetTableCount()-1);
- pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, FALSE, pDoc, NULL, FALSE );
+ pRefUndoDoc->CopyToDocument( aRange, IDF_FORMULA, false, pDoc, NULL, false );
if (pRefUndoData)
pRefUndoData->DoUndo( pDoc, (eMode == SC_UNDO_REFFIRST) );
// HACK: ScDragDropUndo ist der einzige mit REFFIRST.
@@ -302,7 +318,7 @@ void ScMoveUndo::BeginUndo()
{
ScSimpleUndo::BeginUndo();
- EnableDrawAdjust( pDocShell->GetDocument(), FALSE );
+ EnableDrawAdjust( pDocShell->GetDocument(), false );
if (pRefUndoDoc && eMode == SC_UNDO_REFFIRST)
UndoRef();
@@ -315,7 +331,7 @@ void ScMoveUndo::EndUndo()
if (pRefUndoDoc && eMode == SC_UNDO_REFLAST)
UndoRef();
- EnableDrawAdjust( pDocShell->GetDocument(), TRUE );
+ EnableDrawAdjust( pDocShell->GetDocument(), sal_True );
ScSimpleUndo::EndUndo();
}
@@ -354,7 +370,7 @@ void ScDBFuncUndo::EndUndo()
if ( pAutoDBRange )
{
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -389,7 +405,7 @@ void ScDBFuncUndo::BeginRedo()
{
// move the database range to this function's position again (see ScDocShell::GetDBData)
- USHORT nNoNameIndex;
+ sal_uInt16 nNoNameIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nNoNameIndex ) )
@@ -412,8 +428,8 @@ void ScDBFuncUndo::BeginRedo()
aOriginalRange.aStart.Col(), aOriginalRange.aStart.Row(),
aOriginalRange.aEnd.Col(), aOriginalRange.aEnd.Row() );
- pNoNameData->SetByRow( TRUE );
- pNoNameData->SetAutoFilter( FALSE );
+ pNoNameData->SetByRow( sal_True );
+ pNoNameData->SetAutoFilter( false );
// header is always set with the operation in redo
}
}
@@ -459,7 +475,7 @@ String ScUndoWrapper::GetRepeatComment(SfxRepeatTarget& rTarget) const
return String();
}
-USHORT ScUndoWrapper::GetId() const
+sal_uInt16 ScUndoWrapper::GetId() const
{
if (pWrappedUndo)
return pWrappedUndo->GetId();
@@ -467,26 +483,26 @@ USHORT ScUndoWrapper::GetId() const
return 0;
}
-BOOL ScUndoWrapper::IsLinked()
+sal_Bool ScUndoWrapper::IsLinked()
{
if (pWrappedUndo)
return pWrappedUndo->IsLinked();
else
- return FALSE;
+ return false;
}
-void ScUndoWrapper::SetLinked( BOOL bIsLinked )
+void ScUndoWrapper::SetLinked( sal_Bool bIsLinked )
{
if (pWrappedUndo)
pWrappedUndo->SetLinked(bIsLinked);
}
-BOOL ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoWrapper::Merge( SfxUndoAction* pNextAction )
{
if (pWrappedUndo)
return pWrappedUndo->Merge(pNextAction);
else
- return FALSE;
+ return false;
}
void ScUndoWrapper::Undo()
@@ -507,12 +523,12 @@ void ScUndoWrapper::Repeat(SfxRepeatTarget& rTarget)
pWrappedUndo->Repeat(rTarget);
}
-BOOL ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoWrapper::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (pWrappedUndo)
return pWrappedUndo->CanRepeat(rTarget);
else
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index a670f067c8d8..0e59c0a35f92 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -106,7 +106,7 @@ TYPEINIT1(ScUndoBorder, ScBlockUndo);
ScUndoInsertCells::ScUndoInsertCells( ScDocShell* pNewDocShell,
const ScRange& rRange, SCTAB nNewCount, SCTAB* pNewTabs, SCTAB* pNewScenarios,
InsCellCmd eNewCmd, ScDocument* pUndoDocument, ScRefUndoData* pRefData,
- BOOL bNewPartOfPaste ) :
+ sal_Bool bNewPartOfPaste ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ),
aEffRange( rRange ),
nCount( nNewCount ),
@@ -143,7 +143,7 @@ String ScUndoInsertCells::GetComment() const
return ScGlobal::GetRscString( pPasteUndo ? STR_UNDO_PASTE : STR_UNDO_INSERTCELLS );
}
-BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
{
// If a paste undo action has already been added, append (detective) action there.
if ( pPasteUndo )
@@ -160,7 +160,7 @@ BOOL ScUndoInsertCells::Merge( SfxUndoAction* pNextAction )
pPasteUndo = pWrappedAction;
pWrapper->ForgetWrappedUndo(); // pWrapper is deleted by UndoManager
- return TRUE;
+ return sal_True;
}
}
@@ -180,7 +180,7 @@ void ScUndoInsertCells::SetChangeTrack()
nEndChangeAction = 0;
}
-void ScUndoInsertCells::DoChange( const BOOL bUndo )
+void ScUndoInsertCells::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB i;
@@ -238,13 +238,13 @@ void ScUndoInsertCells::DoChange( const BOOL bUndo )
{
SCCOL nEndCol = aWorkRange.aEnd.Col();
SCROW nEndRow = aWorkRange.aEnd.Row();
- pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE );
+ pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True );
}
}
//? Undo fuer herausgeschobene Attribute ?
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
switch (eCmd)
{
@@ -301,7 +301,7 @@ void ScUndoInsertCells::Undo()
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -309,7 +309,7 @@ void ScUndoInsertCells::Redo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
if ( pPasteUndo )
@@ -328,11 +328,11 @@ void ScUndoInsertCells::Repeat(SfxRepeatTarget& rTarget)
pPasteUndo->Repeat( rTarget );
}
else
- ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->InsertCells( eCmd, sal_True );
}
}
-BOOL ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertCells::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -391,7 +391,7 @@ void ScUndoDeleteCells::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoDeleteCells::DoChange( const BOOL bUndo )
+void ScUndoDeleteCells::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB i;
@@ -442,7 +442,7 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
for( i=0; i<nCount && bUndo; i++ )
{
pRefUndoDoc->CopyToDocument( aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i],
- IDF_ALL | IDF_NOCAPTIONS, FALSE, pDoc );
+ IDF_ALL | IDF_NOCAPTIONS, false, pDoc );
}
ScRange aWorkRange( aEffRange );
@@ -474,12 +474,12 @@ void ScUndoDeleteCells::DoChange( const BOOL bUndo )
SCCOL nEndCol = aWorkRange.aEnd.Col();
SCROW nEndRow = aWorkRange.aEnd.Row();
- pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], TRUE );
+ pDoc->ExtendMerge( aWorkRange.aStart.Col(), aWorkRange.aStart.Row(), nEndCol, nEndRow, pTabs[i], sal_True );
}
}
// Zeichnen
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
switch (eCmd)
{
case DEL_DELROWS:
@@ -533,7 +533,7 @@ void ScUndoDeleteCells::Undo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -552,7 +552,7 @@ void ScUndoDeleteCells::Redo()
{
WaitObject aWait( pDocShell->GetActiveDialogParent() ); // wichtig wegen TrackFormulas bei UpdateReference
BeginRedo();
- DoChange( FALSE);
+ DoChange( false);
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -564,10 +564,10 @@ void ScUndoDeleteCells::Redo()
void ScUndoDeleteCells::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( eCmd, sal_True );
}
-BOOL ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -579,7 +579,7 @@ BOOL ScUndoDeleteCells::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoDeleteMulti::ScUndoDeleteMulti( ScDocShell* pNewDocShell,
- BOOL bNewRows, BOOL bNeedsRefresh, SCTAB nNewTab,
+ sal_Bool bNewRows, sal_Bool bNeedsRefresh, SCTAB nNewTab,
const SCCOLROW* pRng, SCCOLROW nRngCnt,
ScDocument* pUndoDocument, ScRefUndoData* pRefData ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFLAST ),
@@ -607,7 +607,7 @@ void ScUndoDeleteMulti::DoChange() const
{
SCCOL nStartCol;
SCROW nStartRow;
- USHORT nPaint;
+ sal_uInt16 nPaint;
if (bRows)
{
nStartCol = 0;
@@ -627,7 +627,7 @@ void ScUndoDeleteMulti::DoChange() const
SCCOL nEndCol = MAXCOL;
SCROW nEndRow = MAXROW;
pDoc->RemoveFlagsTab( nStartCol, nStartRow, nEndCol, nEndRow, nTab, SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, TRUE );
+ pDoc->ExtendMerge( nStartCol, nStartRow, nEndCol, nEndRow, nTab, sal_True );
}
pDocShell->PostPaint( nStartCol, nStartRow, nTab, MAXCOL, MAXROW, nTab, nPaint );
@@ -666,7 +666,7 @@ void ScUndoDeleteMulti::SetChangeTrack()
aRange.aStart.SetCol( static_cast<SCCOL>(nStart) );
aRange.aEnd.SetCol( static_cast<SCCOL>(nEnd) );
}
- ULONG nDummyStart;
+ sal_uLong nDummyStart;
pChangeTrack->AppendDeleteRange( aRange, pRefUndoDoc,
nDummyStart, nEndChangeAction );
}
@@ -702,10 +702,10 @@ void ScUndoDeleteMulti::Undo()
SCCOLROW nStart = *(pOneRange++);
SCCOLROW nEnd = *(pOneRange++);
if (bRows)
- pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,FALSE,pDoc );
+ pRefUndoDoc->CopyToDocument( 0,nStart,nTab, MAXCOL,nEnd,nTab, IDF_ALL,false,pDoc );
else
pRefUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart),0,nTab,
- static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,FALSE,pDoc );
+ static_cast<SCCOL>(nEnd),MAXROW,nTab, IDF_ALL,false,pDoc );
}
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
@@ -757,10 +757,10 @@ void ScUndoDeleteMulti::Repeat(SfxRepeatTarget& rTarget)
{
// DeleteCells, falls einfache Selektion
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteCells( DEL_DELROWS, sal_True );
}
-BOOL ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteMulti::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -802,13 +802,13 @@ void ScUndoCut::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoCut::DoChange( const BOOL bUndo )
+void ScUndoCut::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
// do not undo/redo objects and note captions, they are handled via drawing undo
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
if (bUndo) // nur bei Undo
{
@@ -817,7 +817,7 @@ void ScUndoCut::DoChange( const BOOL bUndo )
ScRange aCopyRange = aExtendedRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aCopyRange, nUndoFlags, false, pDoc );
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
@@ -845,7 +845,7 @@ void ScUndoCut::DoChange( const BOOL bUndo )
void ScUndoCut::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -853,19 +853,19 @@ void ScUndoCut::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
}
void ScUndoCut::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->CutToClip( NULL, sal_True );
}
-BOOL ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoCut::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -881,10 +881,10 @@ ScUndoPaste::ScUndoPaste( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData,
void* /* pFill1 */, void* /* pFill2 */, void* /* pFill3 */,
- BOOL bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
+ sal_Bool bRedoIsFilled, const ScUndoPasteOptions* pOptions ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -933,20 +933,20 @@ void ScUndoPaste::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoPaste::DoChange( const BOOL bUndo )
+void ScUndoPaste::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
// RefUndoData for redo is created before first undo
// (with DeleteUnchanged after the DoUndo call)
- BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
if ( bCreateRedoData )
pRefRedoData = new ScRefUndoData( pDoc );
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// fuer Undo immer alle oder keine Inhalte sichern
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -955,7 +955,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
// do not undo/redo objects and note captions, they are handled via drawing undo
(nUndoFlags &= ~IDF_OBJECTS) |= IDF_NOCAPTIONS;
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -967,8 +967,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
if (!pRedoDoc)
{
- BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
- BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+ sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
@@ -978,11 +978,11 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, nUndoFlags, FALSE, pRedoDoc );
- bRedoFilled = TRUE;
+ pDoc->CopyToDocument( aCopyRange, nUndoFlags, false, pRedoDoc );
+ bRedoFilled = sal_True;
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
aMarkData.MarkToMulti();
@@ -997,21 +997,21 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
aTabSelectRange.aStart.SetTab( nFirstSelected );
aTabSelectRange.aEnd.SetTab( nFirstSelected );
- pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pRedoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
for (nTab=0; nTab<nTabCount; nTab++)
if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab))
{
aTabSelectRange.aStart.SetTab( nTab );
aTabSelectRange.aEnd.SetTab( nTab );
- pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
}
}
if (pWorkRefData)
{
- pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ pWorkRefData->DoUndo( pDoc, sal_True ); // sal_True = bSetChartRangeLists for SetChartListenerCollection
if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
- bPaintAll = TRUE;
+ bPaintAll = sal_True;
}
if ( bCreateRedoData && pRefRedoData )
@@ -1021,13 +1021,13 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
{
aTabSelectRange.aStart.SetTab( nFirstSelected );
aTabSelectRange.aEnd.SetTab( nFirstSelected );
- pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
for (nTab=0; nTab<nTabCount; nTab++)
if (nTab != nFirstSelected && aMarkData.GetTableSelect(nTab))
{
aTabSelectRange.aStart.SetTab( nTab );
aTabSelectRange.aEnd.SetTab( nTab );
- pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aTabSelectRange, nUndoFlags, false, pDoc );
}
}
@@ -1041,8 +1041,8 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
SetChangeTrack();
ScRange aDrawRange( aBlockRange );
- pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
- USHORT nPaint = PAINT_GRID;
+ pDoc->ExtendMerge( aDrawRange, sal_True ); // only needed for single sheet (text/rtf etc.)
+ sal_uInt16 nPaint = PAINT_GRID;
if (bPaintAll)
{
aDrawRange.aStart.SetCol(0);
@@ -1051,7 +1051,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
aDrawRange.aEnd.SetRow(MAXROW);
nPaint |= PAINT_TOP | PAINT_LEFT;
/*A*/ if (pViewShell)
- pViewShell->AdjustBlockHeight(FALSE);
+ pViewShell->AdjustBlockHeight(false);
}
else
{
@@ -1065,7 +1065,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
nPaint |= PAINT_LEFT;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
@@ -1089,7 +1089,7 @@ void ScUndoPaste::DoChange( const BOOL bUndo )
void ScUndoPaste::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
ShowTable( aBlockRange );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -1099,9 +1099,9 @@ void ScUndoPaste::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
}
@@ -1119,12 +1119,12 @@ void ScUndoPaste::Repeat(SfxRepeatTarget& rTarget)
pViewSh->PasteFromClip( nFlags, pOwnClip->GetDocument(),
aPasteOptions.nFunction, aPasteOptions.bSkipEmpty, aPasteOptions.bTranspose,
aPasteOptions.bAsLink, aPasteOptions.eMoveMode, IDF_NONE,
- TRUE ); // allow warning dialog
+ sal_True ); // allow warning dialog
}
}
}
-BOOL ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1136,8 +1136,8 @@ BOOL ScUndoPaste::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell,
- const ScRange& rRange, ScAddress aNewDestPos, BOOL bNewCut,
- ScDocument* pUndoDocument, ScRefUndoData* pRefData, BOOL bScenario ) :
+ const ScRange& rRange, ScAddress aNewDestPos, sal_Bool bNewCut,
+ ScDocument* pUndoDocument, ScRefUndoData* pRefData, sal_Bool bScenario ) :
ScMoveUndo( pNewDocShell, pUndoDocument, pRefData, SC_UNDO_REFFIRST ),
aSrcRange( rRange ),
bCut( bNewCut ),
@@ -1148,7 +1148,7 @@ ScUndoDragDrop::ScUndoDragDrop( ScDocShell* pNewDocShell,
aDestEnd.IncCol(aSrcRange.aEnd.Col() - aSrcRange.aStart.Col());
aDestEnd.IncTab(aSrcRange.aEnd.Tab() - aSrcRange.aStart.Tab());
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
if ( !bIncludeFiltered )
{
// find number of non-filtered rows
@@ -1196,9 +1196,9 @@ void ScUndoDragDrop::SetChangeTrack()
nStartChangeAction = nEndChangeAction = 0;
}
-void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const
+void ScUndoDragDrop::PaintArea( ScRange aRange, sal_uInt16 nExtFlags ) const
{
- USHORT nPaint = PAINT_GRID;
+ sal_uInt16 nPaint = PAINT_GRID;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
ScDocument* pDoc = pDocShell->GetDocument();
@@ -1211,7 +1211,7 @@ void ScUndoDragDrop::PaintArea( ScRange aRange, USHORT nExtFlags ) const
aRange.aStart.Tab(), 0, &aVirtDev,
pViewData->GetPPTX(), pViewData->GetPPTY(),
pViewData->GetZoomX(), pViewData->GetZoomY(),
- FALSE ) )
+ false ) )
{
aRange.aStart.SetCol(0);
aRange.aEnd.SetCol(MAXCOL);
@@ -1258,16 +1258,16 @@ void ScUndoDragDrop::DoUndo( ScRange aRange ) const
ScRange aPaintRange = aRange;
pDoc->ExtendMerge( aPaintRange ); // before deleting
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aPaintRange );
// do not undo objects and note captions, they are handled via drawing undo
- USHORT nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nUndoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pDoc->DeleteAreaTab( aRange, nUndoFlags );
- pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, FALSE, pDoc );
+ pRefUndoDoc->CopyToDocument( aRange, nUndoFlags, false, pDoc );
if ( pDoc->HasAttrib( aRange, HASATTR_MERGED ) )
- pDoc->ExtendMerge( aRange, TRUE );
+ pDoc->ExtendMerge( aRange, sal_True );
aPaintRange.aEnd.SetCol( Max( aPaintRange.aEnd.Col(), aRange.aEnd.Col() ) );
aPaintRange.aEnd.SetRow( Max( aPaintRange.aEnd.Row(), aRange.aEnd.Row() ) );
@@ -1293,10 +1293,10 @@ void ScUndoDragDrop::Redo()
ScDocument* pDoc = pDocShell->GetDocument();
ScDocument* pClipDoc = new ScDocument( SCDOCMODE_CLIP );
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
// do not undo/redo objects and note captions, they are handled via drawing undo
- USHORT nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nRedoFlags = (IDF_ALL & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
/* TODO: Redoing note captions is quite tricky due to the fact that a
helper clip document is used. While (re-)pasting the contents to the
@@ -1314,7 +1314,7 @@ void ScUndoDragDrop::Redo()
SCTAB nTab;
ScMarkData aSourceMark;
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
- aSourceMark.SelectTable( nTab, TRUE );
+ aSourceMark.SelectTable( nTab, sal_True );
// do not clone objects and note captions into clipdoc (see above)
ScClipParam aClipParam(aSrcRange, bCut);
@@ -1324,7 +1324,7 @@ void ScUndoDragDrop::Redo()
{
ScRange aSrcPaintRange = aSrcRange;
pDoc->ExtendMerge( aSrcPaintRange ); // before deleting
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aSrcPaintRange );
pDoc->DeleteAreaTab( aSrcRange, nRedoFlags );
PaintArea( aSrcPaintRange, nExtFlags );
@@ -1332,11 +1332,11 @@ void ScUndoDragDrop::Redo()
ScMarkData aDestMark;
for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++)
- aDestMark.SelectTable( nTab, TRUE );
+ aDestMark.SelectTable( nTab, sal_True );
- BOOL bIncludeFiltered = bCut;
+ sal_Bool bIncludeFiltered = bCut;
// TODO: restore old note captions instead of cloning new captions...
- pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, TRUE, FALSE, bIncludeFiltered );
+ pDoc->CopyFromClip( aDestRange, aDestMark, IDF_ALL & ~IDF_OBJECTS, NULL, pClipDoc, sal_True, false, bIncludeFiltered );
if (bCut)
for (nTab=aSrcRange.aStart.Tab(); nTab<=aSrcRange.aEnd.Tab(); nTab++)
@@ -1345,14 +1345,14 @@ void ScUndoDragDrop::Redo()
// skipped rows and merged cells don't mix
if ( !bIncludeFiltered && pClipDoc->HasClipFilteredRows() )
- pDocShell->GetDocFunc().UnmergeCells( aDestRange, FALSE, TRUE );
+ pDocShell->GetDocFunc().UnmergeCells( aDestRange, false, sal_True );
for (nTab=aDestRange.aStart.Tab(); nTab<=aDestRange.aEnd.Tab(); nTab++)
{
SCCOL nEndCol = aDestRange.aEnd.Col();
SCROW nEndRow = aDestRange.aEnd.Row();
pDoc->ExtendMerge( aDestRange.aStart.Col(), aDestRange.aStart.Row(),
- nEndCol, nEndRow, nTab, TRUE );
+ nEndCol, nEndRow, nTab, sal_True );
PaintArea( ScRange( aDestRange.aStart.Col(), aDestRange.aStart.Row(), nTab,
nEndCol, nEndRow, nTab ), 0 );
}
@@ -1363,7 +1363,7 @@ void ScUndoDragDrop::Redo()
ShowTable( aDestRange.aStart.Tab() );
RedoSdrUndoAction( pDrawUndo ); //! include in ScBlockUndo?
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, sal_True ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -1373,9 +1373,9 @@ void ScUndoDragDrop::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDragDrop::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
@@ -1409,7 +1409,7 @@ void ScUndoListNames::DoChange( ScDocument* pSrcDoc ) const
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aBlockRange, IDF_ALL );
- pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, FALSE, pDoc );
+ pSrcDoc->CopyToDocument( aBlockRange, IDF_ALL, false, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1437,7 +1437,7 @@ void ScUndoListNames::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->InsertNameList();
}
-BOOL ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoListNames::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1490,10 +1490,10 @@ void ScUndoUseScenario::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteSelection( IDF_ALL, aMarkData );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL, sal_True, pDoc, &aMarkData );
// Szenario-Tabellen
- BOOL bFrame = FALSE;
+ sal_Bool bFrame = false;
SCTAB nTab = aRange.aStart.Tab();
SCTAB nEndTab = nTab;
while ( pUndoDoc->HasTable(nEndTab+1) && pUndoDoc->IsScenario(nEndTab+1) )
@@ -1503,19 +1503,19 @@ void ScUndoUseScenario::Undo()
// Flags immer
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pUndoDoc->GetScenarioData( i, aComment, aColor, nScenFlags );
pDoc->SetScenarioData( i, aComment, aColor, nScenFlags );
- BOOL bActive = pUndoDoc->IsActiveScenario( i );
+ sal_Bool bActive = pUndoDoc->IsActiveScenario( i );
pDoc->SetActiveScenario( i, bActive );
// Bei Zurueckkopier-Szenarios auch Inhalte
if ( nScenFlags & SC_SCENARIO_TWOWAY )
{
pDoc->DeleteAreaTab( 0,0, MAXCOL,MAXROW, i, IDF_ALL );
- pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,i, MAXCOL,MAXROW,i, IDF_ALL,false, pDoc );
}
if ( nScenFlags & SC_SCENARIO_SHOWFRAME )
- bFrame = TRUE;
+ bFrame = sal_True;
}
// Wenn sichtbare Rahmen, dann alles painten
@@ -1545,7 +1545,7 @@ void ScUndoUseScenario::Redo()
pViewShell->InitOwnBlockMode();
}
- pDocShell->UseScenario( nTab, aName, FALSE );
+ pDocShell->UseScenario( nTab, aName, false );
EndRedo();
}
@@ -1559,14 +1559,14 @@ void ScUndoUseScenario::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoUseScenario::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (rTarget.ISA(ScTabViewTarget))
{
ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData();
return !pViewData->GetDocument()->IsScenario( pViewData->GetTabNo() );
}
- return FALSE;
+ return false;
}
@@ -1600,19 +1600,17 @@ String ScUndoSelectionStyle::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_APPLYCELLSTYLE );
}
-void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
+void ScUndoSelectionStyle::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aWorkRange( aRange );
if ( pDoc->HasAttrib( aWorkRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
if (bUndo) // bei Undo alte Daten wieder reinschubsen
@@ -1621,7 +1619,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
ScRange aCopyRange = aWorkRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
}
else // bei Redo Style wieder zuweisen
{
@@ -1638,6 +1636,7 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aWorkRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -1647,14 +1646,14 @@ void ScUndoSelectionStyle::DoChange( const BOOL bUndo )
void ScUndoSelectionStyle::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoSelectionStyle::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1673,16 +1672,16 @@ void ScUndoSelectionStyle::Repeat(SfxRepeatTarget& rTarget)
}
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
- rViewShell.SetStyleSheetToMarked( pStyleSheet, TRUE );
+ rViewShell.SetStyleSheetToMarked( pStyleSheet, sal_True );
}
}
-BOOL ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoSelectionStyle::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
-USHORT ScUndoSelectionStyle::GetId() const
+sal_uInt16 ScUndoSelectionStyle::GetId() const
{
return STR_UNDO_APPLYCELLSTYLE;
}
@@ -1730,7 +1729,7 @@ void ScUndoEnterMatrix::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aBlockRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
pDocShell->PostPaint( aBlockRange, PAINT_GRID );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1773,7 +1772,7 @@ void ScUndoEnterMatrix::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoEnterMatrix::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1793,7 +1792,7 @@ ScRange lcl_GetMultiMarkRange( const ScMarkData& rMark )
}
ScUndoIndent::ScUndoIndent( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, BOOL bIncrement ) :
+ ScDocument* pNewUndoDoc, sal_Bool bIncrement ) :
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -1808,7 +1807,7 @@ ScUndoIndent::~ScUndoIndent()
String ScUndoIndent::GetComment() const
{
- USHORT nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
+ sal_uInt16 nId = bIsIncrement ? STR_UNDO_INC_INDENT : STR_UNDO_DEC_INDENT;
return ScGlobal::GetRscString( nId );
}
@@ -1821,7 +1820,7 @@ void ScUndoIndent::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1844,7 +1843,7 @@ void ScUndoIndent::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->ChangeIndent( bIsIncrement );
}
-BOOL ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoIndent::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1882,7 +1881,7 @@ void ScUndoTransliterate::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_CONTENTS, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1905,7 +1904,7 @@ void ScUndoTransliterate::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->TransliterateText( nTransliterationType );
}
-BOOL ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1916,7 +1915,7 @@ BOOL ScUndoTransliterate::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, const USHORT* pW ) :
+ ScDocument* pNewUndoDoc, const sal_uInt16* pW ) :
ScBlockUndo( pNewDocShell, lcl_GetMultiMarkRange(rMark), SC_UNDO_AUTOHEIGHT ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -1924,11 +1923,11 @@ ScUndoClearItems::ScUndoClearItems( ScDocShell* pNewDocShell, const ScMarkData&
{
DBG_ASSERT( pW, "ScUndoClearItems: Which-Pointer ist 0" );
- USHORT nCount = 0;
+ sal_uInt16 nCount = 0;
while ( pW[nCount] )
++nCount;
- pWhich = new USHORT[nCount+1];
- for (USHORT i=0; i<=nCount; i++)
+ pWhich = new sal_uInt16[nCount+1];
+ for (sal_uInt16 i=0; i<=nCount; i++)
pWhich[i] = pW[i];
}
@@ -1948,7 +1947,7 @@ void ScUndoClearItems::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -1971,11 +1970,11 @@ void ScUndoClearItems::Repeat(SfxRepeatTarget& rTarget)
{
ScViewData* pViewData = ((ScTabViewTarget&)rTarget).GetViewShell()->GetViewData();
ScDocFunc aFunc(*pViewData->GetDocShell());
- aFunc.ClearItems( pViewData->GetMarkData(), pWhich, FALSE );
+ aFunc.ClearItems( pViewData->GetMarkData(), pWhich, false );
}
}
-BOOL ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoClearItems::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2010,9 +2009,9 @@ void ScUndoRemoveBreaks::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pDoc );
if (pViewShell)
- pViewShell->UpdatePageBreakData( TRUE );
+ pViewShell->UpdatePageBreakData( sal_True );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
EndUndo();
@@ -2028,7 +2027,7 @@ void ScUndoRemoveBreaks::Redo()
pDoc->RemoveManualBreaks(nTab);
pDoc->UpdatePageBreaks(nTab);
if (pViewShell)
- pViewShell->UpdatePageBreakData( TRUE );
+ pViewShell->UpdatePageBreakData( sal_True );
pDocShell->PostPaint( 0,0,nTab, MAXCOL,MAXROW,nTab, PAINT_GRID );
EndRedo();
@@ -2043,7 +2042,7 @@ void ScUndoRemoveBreaks::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveBreaks::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2087,7 +2086,7 @@ void ScUndoRemoveMerge::Undo()
// There is no need to extend merge area because it's already been extended.
ScRange aRange = maOption.getSingleRange(*itr);
pDoc->DeleteAreaTab(aRange, IDF_ATTRIB);
- pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aRange, IDF_ATTRIB, false, pDoc);
bool bDidPaint = false;
if ( pViewShell )
@@ -2132,11 +2131,11 @@ void ScUndoRemoveMerge::Redo()
maOption.mnEndCol, maOption.mnEndRow, nTab,
SC_MF_HOR | SC_MF_VER );
- pDoc->ExtendMerge(aRange, TRUE, FALSE);
+ pDoc->ExtendMerge(aRange, true, false);
// Paint
- BOOL bDidPaint = FALSE;
+ sal_Bool bDidPaint = false;
if ( pViewShell )
{
pViewShell->SetTabNo(nTab);
@@ -2155,7 +2154,7 @@ void ScUndoRemoveMerge::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->RemoveMerge();
}
-BOOL ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveMerge::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -2222,8 +2221,8 @@ void ScUndoBorder::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScMarkData aMarkData;
- aMarkData.MarkFromRangeList( *pRanges, FALSE );
- pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, TRUE, pDoc, &aMarkData );
+ aMarkData.MarkFromRangeList( *pRanges, false );
+ pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_True, pDoc, &aMarkData );
pDocShell->PostPaint( aBlockRange, PAINT_GRID, SC_PF_LINES | SC_PF_TESTMERGE );
EndUndo();
@@ -2242,7 +2241,7 @@ void ScUndoBorder::Redo()
ScMarkData aMark;
aMark.SetMarkArea( aRange );
- aMark.SelectTable( nTab, TRUE );
+ aMark.SelectTable( nTab, sal_True );
pDoc->ApplySelectionFrame( aMark, pOuter, pInner );
}
@@ -2257,9 +2256,9 @@ void ScUndoBorder::Repeat(SfxRepeatTarget& /* rTarget */)
//! spaeter (wenn die Funktion aus cellsuno nach docfunc gewandert ist)
}
-BOOL ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoBorder::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // s.o.
+ return false; // s.o.
}
diff --git a/sc/source/ui/undo/undoblk2.cxx b/sc/source/ui/undo/undoblk2.cxx
index fd5965acda0d..208a10d437cc 100644
--- a/sc/source/ui/undo/undoblk2.cxx
+++ b/sc/source/ui/undo/undoblk2.cxx
@@ -68,7 +68,7 @@ ScUndoWidthOrHeight::ScUndoWidthOrHeight( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCTAB nNewStartTab, SCCOLROW nNewEnd, SCTAB nNewEndTab,
ScDocument* pNewUndoDoc, SCCOLROW nNewCnt, SCCOLROW* pNewRanges,
ScOutlineTable* pNewUndoTab,
- ScSizeMode eNewMode, USHORT nNewSizeTwips, BOOL bNewWidth ) :
+ ScSizeMode eNewMode, sal_uInt16 nNewSizeTwips, sal_Bool bNewWidth ) :
ScSimpleUndo( pNewDocShell ),
aMarkData( rMark ),
nStart( nNewStart ),
@@ -114,18 +114,13 @@ void ScUndoWidthOrHeight::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
SCCOLROW nPaintStart = nStart > 0 ? nStart-1 : static_cast<SCCOLROW>(0);
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
+ if ( SetViewMarkData( aMarkData ) )
nPaintStart = 0; // paint all, because of changed selection
- }
}
//! outlines from all tables?
@@ -141,14 +136,14 @@ void ScUndoWidthOrHeight::Undo()
{
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE,
- FALSE, pDoc );
+ false, pDoc );
pDoc->UpdatePageBreaks( nTab );
pDocShell->PostPaint( static_cast<SCCOL>(nPaintStart), 0, nTab,
MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_TOP );
}
else // Height
{
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
pDocShell->PostPaint( 0, nPaintStart, nTab, MAXCOL, MAXROW, nTab, PAINT_GRID | PAINT_LEFT );
}
@@ -156,6 +151,7 @@ void ScUndoWidthOrHeight::Undo()
DoSdrUndoAction( pDrawUndo, pDoc );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->UpdateScrollBars();
@@ -172,19 +168,14 @@ void ScUndoWidthOrHeight::Redo()
{
BeginRedo();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
-
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
if (eMode==SC_SIZE_OPTIMAL)
{
- if (pViewShell)
- {
- pViewShell->SetMarkData( aMarkData );
-
- bPaintAll = TRUE; // paint all, because of changed selection
- }
+ if ( SetViewMarkData( aMarkData ) )
+ bPaintAll = sal_True; // paint all, because of changed selection
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -192,7 +183,7 @@ void ScUndoWidthOrHeight::Redo()
pViewShell->SetTabNo( nStartTab );
// SetWidthOrHeight aendert aktuelle Tabelle !
- pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, FALSE, TRUE, &aMarkData );
+ pViewShell->SetWidthOrHeight( bWidth, nRangeCnt, pRanges, eMode, nNewSize, false, true, &aMarkData );
}
// paint grid if selection was changed directly at the MarkData
@@ -205,10 +196,10 @@ void ScUndoWidthOrHeight::Redo()
void ScUndoWidthOrHeight::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SetMarkedWidthOrHeight( bWidth, eMode, nNewSize, sal_True );
}
-BOOL ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoWidthOrHeight::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
diff --git a/sc/source/ui/undo/undoblk3.cxx b/sc/source/ui/undo/undoblk3.cxx
index eb3987ff42d9..446e3dede1c6 100644
--- a/sc/source/ui/undo/undoblk3.cxx
+++ b/sc/source/ui/undo/undoblk3.cxx
@@ -95,8 +95,8 @@ TYPEINIT1(ScUndoUpdateAreaLink, SfxUndoAction);
ScUndoDeleteContents::ScUndoDeleteContents(
ScDocShell* pNewDocShell,
const ScMarkData& rMark, const ScRange& rRange,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
- USHORT nNewFlags, BOOL bObjects )
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
+ sal_uInt16 nNewFlags, sal_Bool bObjects )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -147,19 +147,17 @@ void ScUndoDeleteContents::SetChangeTrack()
//----------------------------------------------------------------------------
-void ScUndoDeleteContents::DoChange( const BOOL bUndo )
+void ScUndoDeleteContents::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
if (bUndo) // nur Undo
{
- USHORT nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren
+ sal_uInt16 nUndoFlags = IDF_NONE; // entweder alle oder keine Inhalte kopieren
if (nFlags & IDF_CONTENTS) // (es sind nur die richtigen ins UndoDoc kopiert worden)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
@@ -191,13 +189,14 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
aMarkData.MarkToMulti();
RedoSdrUndoAction( pDrawUndo );
// do not delete objects and note captions, they have been removed via drawing undo
- USHORT nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
+ sal_uInt16 nRedoFlags = (nFlags & ~IDF_OBJECTS) | IDF_NOCAPTIONS;
pDoc->DeleteSelection( nRedoFlags, aMarkData );
aMarkData.MarkToSimple();
SetChangeTrack();
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustRowHeight(
aRange.aStart.Row(), aRange.aEnd.Row() ) ) )
/*A*/ pDocShell->PostPaint( aRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -215,7 +214,7 @@ void ScUndoDeleteContents::DoChange( const BOOL bUndo )
void ScUndoDeleteContents::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
// #i97876# Spreadsheet data changes are not notified
@@ -234,7 +233,7 @@ void ScUndoDeleteContents::Undo()
void ScUndoDeleteContents::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
// #i97876# Spreadsheet data changes are not notified
@@ -253,13 +252,13 @@ void ScUndoDeleteContents::Redo()
void ScUndoDeleteContents::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DeleteContents( nFlags, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteContents::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -277,8 +276,8 @@ ScUndoFillTable::ScUndoFillTable( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti, SCTAB nSrc,
- USHORT nFlg, USHORT nFunc, BOOL bSkip, BOOL bLink )
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti, SCTAB nSrc,
+ sal_uInt16 nFlg, sal_uInt16 nFunc, sal_Bool bSkip, sal_Bool bLink )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -320,7 +319,7 @@ void ScUndoFillTable::SetChangeTrack()
SCTAB nTabCount = pDocShell->GetDocument()->GetTableCount();
ScRange aWorkRange(aRange);
nStartChangeAction = 0;
- ULONG nTmpAction;
+ sal_uLong nTmpAction;
for ( SCTAB i = 0; i < nTabCount; i++ )
{
if (i != nSrcTab && aMarkData.GetTableSelect(i))
@@ -341,13 +340,11 @@ void ScUndoFillTable::SetChangeTrack()
//----------------------------------------------------------------------------
-void ScUndoFillTable::DoChange( const BOOL bUndo )
+void ScUndoFillTable::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
if (bUndo) // nur Undo
{
@@ -382,6 +379,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
// CellContentChanged kommt mit der Markierung
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
SCTAB nTab = pViewShell->GetViewData()->GetTabNo();
@@ -398,7 +396,7 @@ void ScUndoFillTable::DoChange( const BOOL bUndo )
void ScUndoFillTable::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -408,7 +406,7 @@ void ScUndoFillTable::Undo()
void ScUndoFillTable::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -424,7 +422,7 @@ void ScUndoFillTable::Repeat(SfxRepeatTarget& rTarget)
//----------------------------------------------------------------------------
-BOOL ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoFillTable::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -441,7 +439,7 @@ ScUndoSelectionAttr::ScUndoSelectionAttr( ScDocShell* pNewDocShell,
const ScMarkData& rMark,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, BOOL bNewMulti,
+ ScDocument* pNewUndoDoc, sal_Bool bNewMulti,
const ScPatternAttr* pNewApply,
const SvxBoxItem* pNewOuter, const SvxBoxInfoItem* pNewInner )
//
@@ -491,19 +489,17 @@ ScEditDataArray* ScUndoSelectionAttr::GetDataArray()
//----------------------------------------------------------------------------
-void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
+void ScUndoSelectionAttr::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aEffRange( aRange );
if ( pDoc->HasAttrib( aEffRange, HASATTR_MERGED ) ) // zusammengefasste Zellen?
pDoc->ExtendMerge( aEffRange );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aEffRange );
ChangeEditData(bUndo);
@@ -526,6 +522,7 @@ void ScUndoSelectionAttr::DoChange( const BOOL bUndo )
pDoc->ApplySelectionFrame( aMarkData, pLineOuter, pLineInner );
}
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if ( !( (pViewShell) && pViewShell->AdjustBlockHeight() ) )
/*A*/ pDocShell->PostPaint( aEffRange, PAINT_GRID | PAINT_EXTRAS, nExtFlags );
@@ -556,7 +553,7 @@ void ScUndoSelectionAttr::ChangeEditData( const bool bUndo )
void ScUndoSelectionAttr::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
@@ -566,7 +563,7 @@ void ScUndoSelectionAttr::Undo()
void ScUndoSelectionAttr::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -579,16 +576,16 @@ void ScUndoSelectionAttr::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (pLineOuter)
- rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, TRUE );
+ rViewShell.ApplyPatternLines( *pApplyPattern, pLineOuter, pLineInner, sal_True );
else
- rViewShell.ApplySelectionPattern( *pApplyPattern, TRUE );
+ rViewShell.ApplySelectionPattern( *pApplyPattern, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoSelectionAttr::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -606,7 +603,7 @@ ScUndoAutoFill::ScUndoAutoFill( ScDocShell* pNewDocShell,
ScDocument* pNewUndoDoc, const ScMarkData& rMark,
FillDir eNewFillDir, FillCmd eNewFillCmd, FillDateCmd eNewFillDateCmd,
double fNewStartValue, double fNewStepValue, double fNewMaxValue,
- USHORT nMaxShIndex )
+ sal_uInt16 nMaxShIndex )
//
: ScBlockUndo( pNewDocShell, rRange, SC_UNDO_AUTOHEIGHT ),
//
@@ -687,12 +684,12 @@ void ScUndoAutoFill::Undo()
aWorkRange.aStart.SetTab(nTab);
aWorkRange.aEnd.SetTab(nTab);
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aWorkRange );
pDoc->DeleteAreaTab( aWorkRange, IDF_AUTOFILL );
- pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aWorkRange, IDF_AUTOFILL, false, pDoc );
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
pDocShell->PostPaint( aWorkRange, PAINT_GRID, nExtFlags );
}
}
@@ -791,17 +788,17 @@ void ScUndoAutoFill::Repeat(SfxRepeatTarget& rTarget)
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (eFillCmd==FILL_SIMPLE)
- rViewShell.FillSimple( eFillDir, TRUE );
+ rViewShell.FillSimple( eFillDir, sal_True );
else
rViewShell.FillSeries( eFillDir, eFillCmd, eFillDateCmd,
- fStartValue, fStepValue, fMaxValue, TRUE );
+ fStartValue, fStepValue, fMaxValue, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoFill::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -891,7 +888,7 @@ void ScUndoMerge::DoChange( bool bUndo ) const
if (bUndo && mpUndoDoc)
{
pDoc->DeleteAreaTab( aRange, IDF_CONTENTS|IDF_NOCAPTIONS );
- mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ mpUndoDoc->CopyToDocument( aRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
}
// redo -> merge contents again
@@ -949,15 +946,15 @@ void ScUndoMerge::Repeat(SfxRepeatTarget& rTarget)
if (rTarget.ISA(ScTabViewTarget))
{
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
- BOOL bCont = FALSE;
- rViewShell.MergeCells( FALSE, bCont, TRUE );
+ sal_Bool bCont = false;
+ rViewShell.MergeCells( false, bCont, sal_True );
}
}
//----------------------------------------------------------------------------
-BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -972,7 +969,7 @@ BOOL ScUndoMerge::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoAutoFormat::ScUndoAutoFormat( ScDocShell* pNewDocShell,
const ScRange& rRange, ScDocument* pNewUndoDoc,
- const ScMarkData& rMark, BOOL bNewSize, USHORT nNewFormatNo )
+ const ScMarkData& rMark, sal_Bool bNewSize, sal_uInt16 nNewFormatNo )
//
: ScBlockUndo( pNewDocShell, rRange, bNewSize ? SC_UNDO_MANUALHEIGHT : SC_UNDO_AUTOHEIGHT ),
//
@@ -1010,7 +1007,7 @@ void ScUndoAutoFormat::Undo()
// Attribute
// pDoc->DeleteAreaTab( aBlockRange, IDF_ATTRIB );
-// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, FALSE, pDoc );
+// pUndoDoc->CopyToDocument( aBlockRange, IDF_ATTRIB, sal_False, pDoc );
SCTAB nTabCount = pDoc->GetTableCount();
pDoc->DeleteArea( aBlockRange.aStart.Col(), aBlockRange.aStart.Row(),
@@ -1019,7 +1016,7 @@ void ScUndoAutoFormat::Undo()
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, FALSE, pDoc, &aMarkData );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ATTRIB, false, pDoc, &aMarkData );
// Zellhoehen und -breiten (IDF_NONE)
if (bSize)
@@ -1032,9 +1029,9 @@ void ScUndoAutoFormat::Undo()
SCTAB nEndZ = aBlockRange.aEnd.Tab();
pUndoDoc->CopyToDocument( nStartX, 0, 0, nEndX, MAXROW, nTabCount-1,
- IDF_NONE, FALSE, pDoc, &aMarkData );
+ IDF_NONE, false, pDoc, &aMarkData );
pUndoDoc->CopyToDocument( 0, nStartY, 0, MAXCOL, nEndY, nTabCount-1,
- IDF_NONE, FALSE, pDoc, &aMarkData );
+ IDF_NONE, false, pDoc, &aMarkData );
pDocShell->PostPaint( 0, 0, nStartZ, MAXCOL, MAXROW, nEndZ,
PAINT_GRID | PAINT_LEFT | PAINT_TOP, SC_PF_LINES );
}
@@ -1084,7 +1081,7 @@ void ScUndoAutoFormat::Redo()
nPPTY = ScGlobal::nScreenPPTY;
}
- BOOL bFormula = FALSE; //! merken
+ sal_Bool bFormula = false; //! merken
for (SCTAB nTab=nStartZ; nTab<=nEndZ; nTab++)
{
@@ -1096,22 +1093,22 @@ void ScUndoAutoFormat::Redo()
// wie SC_SIZE_VISOPT
for (SCROW nRow=nStartY; nRow<=nEndY; nRow++)
{
- BYTE nOld = pDoc->GetRowFlags(nRow,nTab);
+ sal_uInt8 nOld = pDoc->GetRowFlags(nRow,nTab);
bool bHidden = pDoc->RowHidden(nRow, nTab);
if ( !bHidden && ( nOld & CR_MANUALSIZE ) )
pDoc->SetRowFlags( nRow, nTab, nOld & ~CR_MANUALSIZE );
}
pDoc->SetOptimalHeight( nStartY, nEndY, nTab, 0, &aVirtDev,
- nPPTX, nPPTY, aZoomX, aZoomY, FALSE );
+ nPPTX, nPPTY, aZoomX, aZoomY, false );
for (SCCOL nCol=nStartX; nCol<=nEndX; nCol++)
if (!pDoc->ColHidden(nCol, nTab))
{
- USHORT nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab,
+ sal_uInt16 nThisSize = STD_EXTRA_WIDTH + pDoc->GetOptimalColWidth( nCol, nTab,
&aVirtDev, nPPTX, nPPTY, aZoomX, aZoomY, bFormula,
&aDestMark );
pDoc->SetColWidth( nCol, nTab, nThisSize );
- pDoc->ShowCol( nCol, nTab, TRUE );
+ pDoc->ShowCol( nCol, nTab, sal_True );
}
}
@@ -1131,13 +1128,13 @@ void ScUndoAutoFormat::Redo()
void ScUndoAutoFormat::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->AutoFormat( nFormatNo, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoFormat::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1229,8 +1226,7 @@ void ScUndoReplace::Undo()
DBG_ASSERT(pSearchItem->GetCommand() == SVX_SEARCHCMD_REPLACE_ALL,
"ScUndoReplace:: Falscher Modus");
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
//! markierte Tabellen
//! Bereich merken ?
@@ -1238,10 +1234,10 @@ void ScUndoReplace::Undo()
// Undo-Dokument hat keine Zeilen-/Spalten-Infos, also mit bColRowFlags = FALSE
// kopieren, um Outline-Gruppen nicht kaputtzumachen.
- USHORT nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
+ sal_uInt16 nUndoFlags = (pSearchItem->GetPattern()) ? IDF_ATTRIB : IDF_CONTENTS;
pUndoDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, MAXTAB,
- nUndoFlags, FALSE, pDoc, NULL, FALSE ); // ohne Row-Flags
+ nUndoFlags, false, pDoc, NULL, false ); // ohne Row-Flags
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetPattern() &&
@@ -1252,12 +1248,12 @@ void ScUndoReplace::Undo()
pSearchItem->SetReplaceString(aTempStr);
pDoc->ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- aMarkData, TRUE);
+ aMarkData, sal_True);
pSearchItem->SetReplaceString(pSearchItem->GetSearchString());
pSearchItem->SetSearchString(aTempStr);
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
pDocShell->PostPaintGridAll();
}
else if (pSearchItem->GetCellType() == SVX_SEARCHIN_NOTE)
@@ -1268,7 +1264,7 @@ void ScUndoReplace::Undo()
pNote->SetText( aCursorPos, aUndoStr );
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
}
else
{
@@ -1279,7 +1275,7 @@ void ScUndoReplace::Undo()
pDoc->SetString( aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(), aUndoStr );
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
pDocShell->PostPaintGridAll();
}
@@ -1302,14 +1298,14 @@ void ScUndoReplace::Redo()
if (pViewShell)
pViewShell->MoveCursorAbs( aCursorPos.Col(), aCursorPos.Row(),
- SC_FOLLOW_JUMP, FALSE, FALSE );
+ SC_FOLLOW_JUMP, false, false );
if (pUndoDoc)
{
if (pViewShell)
{
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
- pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
+ pViewShell->SearchAndReplace( pSearchItem, false, sal_True );
}
}
else if (pSearchItem->GetPattern() &&
@@ -1317,12 +1313,12 @@ void ScUndoReplace::Redo()
{
pDoc->ReplaceStyle( *pSearchItem,
aCursorPos.Col(), aCursorPos.Row(), aCursorPos.Tab(),
- aMarkData, TRUE);
+ aMarkData, sal_True);
pDocShell->PostPaintGridAll();
}
else
if (pViewShell)
- pViewShell->SearchAndReplace( pSearchItem, FALSE, TRUE );
+ pViewShell->SearchAndReplace( pSearchItem, false, sal_True );
SetChangeTrack();
@@ -1335,13 +1331,13 @@ void ScUndoReplace::Redo()
void ScUndoReplace::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, TRUE, FALSE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SearchAndReplace( pSearchItem, sal_True, false );
}
//----------------------------------------------------------------------------
-BOOL ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoReplace::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1361,7 +1357,7 @@ ScUndoTabOp::ScUndoTabOp( ScDocShell* pNewDocShell,
const ScRefAddress& rFormulaEnd,
const ScRefAddress& rRowCell,
const ScRefAddress& rColCell,
- BYTE nMd )
+ sal_uInt8 nMd )
//
: ScSimpleUndo( pNewDocShell ),
//
@@ -1400,12 +1396,12 @@ void ScUndoTabOp::Undo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aRange );
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aRange );
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->DeleteAreaTab( aRange,IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
pDocShell->PostPaint( aRange, PAINT_GRID, nExtFlags );
pDocShell->PostDataChanged();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -1430,7 +1426,7 @@ void ScUndoTabOp::Redo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->TabOp( aParam, FALSE);
+ pViewShell->TabOp( aParam, false);
EndRedo();
}
@@ -1445,9 +1441,9 @@ void ScUndoTabOp::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabOp::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1530,14 +1526,12 @@ void ScUndoConversion::DoChange( ScDocument* pRefDoc, const ScAddress& rCursorPo
ScDocument* pDoc = pDocShell->GetDocument();
ShowTable( rCursorPos.Tab() );
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
SCTAB nTabCount = pDoc->GetTableCount();
// Undo/Redo-doc has only selected tables
- BOOL bMulti = aMarkData.IsMultiMarked();
+ sal_Bool bMulti = aMarkData.IsMultiMarked();
pRefDoc->CopyToDocument( 0, 0, 0,
MAXCOL, MAXROW, nTabCount-1,
IDF_CONTENTS, bMulti, pDoc, &aMarkData );
@@ -1579,13 +1573,13 @@ void ScUndoConversion::Redo()
void ScUndoConversion::Repeat( SfxRepeatTarget& rTarget )
{
if( rTarget.ISA( ScTabViewTarget ) )
- ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DoSheetConversion( maConvParam, sal_True );
}
//----------------------------------------------------------------------------
-BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
{
return rTarget.ISA( ScTabViewTarget );
}
@@ -1600,7 +1594,7 @@ BOOL ScUndoConversion::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoRefConversion::ScUndoRefConversion( ScDocShell* pNewDocShell,
const ScRange& aMarkRange, const ScMarkData& rMark,
- ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, BOOL bNewMulti, USHORT nNewFlag) :
+ ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc, sal_Bool bNewMulti, sal_uInt16 nNewFlag) :
ScSimpleUndo( pNewDocShell ),
aMarkData ( rMark ),
pUndoDoc ( pNewUndoDoc ),
@@ -1639,9 +1633,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
ShowTable(aRange);
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
ScRange aCopyRange = aRange;
SCTAB nTabCount = pDoc->GetTableCount();
@@ -1650,6 +1642,7 @@ void ScUndoRefConversion::DoChange( ScDocument* pRefDoc)
pRefDoc->CopyToDocument( aCopyRange, nFlags, bMulti, pDoc, &aMarkData );
pDocShell->PostPaint( aRange, PAINT_GRID);
pDocShell->PostDataChanged();
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
pViewShell->CellContentChanged();
}
@@ -1679,7 +1672,7 @@ void ScUndoRefConversion::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->DoRefConversion();
}
-BOOL ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRefConversion::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1724,11 +1717,11 @@ void ScUndoRefreshLink::Undo()
{
BeginUndo();
- BOOL bMakeRedo = !pRedoDoc;
+ sal_Bool bMakeRedo = !pRedoDoc;
if (bMakeRedo)
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- BOOL bFirst = TRUE;
+ sal_Bool bFirst = sal_True;
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nCount = pDoc->GetTableCount();
for (SCTAB nTab=0; nTab<nCount; nTab++)
@@ -1738,11 +1731,11 @@ void ScUndoRefreshLink::Undo()
if (bMakeRedo)
{
if (bFirst)
- pRedoDoc->InitUndo( pDoc, nTab, nTab, TRUE, TRUE );
+ pRedoDoc->InitUndo( pDoc, nTab, nTab, sal_True, sal_True );
else
- pRedoDoc->AddUndoTab( nTab, nTab, TRUE, TRUE );
- bFirst = FALSE;
- pDoc->CopyToDocument(aRange, IDF_ALL, FALSE, pRedoDoc);
+ pRedoDoc->AddUndoTab( nTab, nTab, true, true );
+ bFirst = false;
+ pDoc->CopyToDocument(aRange, IDF_ALL, false, pRedoDoc);
pRedoDoc->SetLink( nTab,
pDoc->GetLinkMode(nTab),
pDoc->GetLinkDoc(nTab),
@@ -1753,7 +1746,7 @@ void ScUndoRefreshLink::Undo()
}
pDoc->DeleteAreaTab( aRange,IDF_ALL );
- pUndoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aRange, IDF_ALL, false, pDoc );
pDoc->SetLink( nTab, pUndoDoc->GetLinkMode(nTab), pUndoDoc->GetLinkDoc(nTab),
pUndoDoc->GetLinkFlt(nTab), pUndoDoc->GetLinkOpt(nTab),
pUndoDoc->GetLinkTab(nTab),
@@ -1782,7 +1775,7 @@ void ScUndoRefreshLink::Redo()
ScRange aRange(0,0,nTab,MAXCOL,MAXROW,nTab);
pDoc->DeleteAreaTab( aRange, IDF_ALL );
- pRedoDoc->CopyToDocument( aRange, IDF_ALL, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aRange, IDF_ALL, false, pDoc );
pDoc->SetLink( nTab,
pRedoDoc->GetLinkMode(nTab),
pRedoDoc->GetLinkDoc(nTab),
@@ -1808,9 +1801,9 @@ void ScUndoRefreshLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRefreshLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1821,8 +1814,8 @@ ScAreaLink* lcl_FindAreaLink( sfx2::LinkManager* pLinkManager, const String& rDo
const String& rSrc, const ScRange& rDest )
{
const ::sfx2::SvBaseLinks& rLinks = pLinkManager->GetLinks();
- 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 = *rLinks[i];
if (pBase->ISA(ScAreaLink))
@@ -1846,7 +1839,7 @@ ScUndoInsertAreaLink::ScUndoInsertAreaLink( ScDocShell* pShell,
const String& rDoc,
const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefresh )
+ sal_uLong nRefresh )
//
: ScSimpleUndo ( pShell ),
//
@@ -1900,11 +1893,11 @@ void ScUndoInsertAreaLink::Redo()
ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions,
aAreaName, aRange.aStart, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aRange );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
@@ -1920,9 +1913,9 @@ void ScUndoInsertAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1936,7 +1929,7 @@ BOOL ScUndoInsertAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoRemoveAreaLink::ScUndoRemoveAreaLink( ScDocShell* pShell,
const String& rDoc, const String& rFlt, const String& rOpt,
const String& rArea, const ScRange& rDestRange,
- ULONG nRefresh )
+ sal_uLong nRefresh )
//
: ScSimpleUndo ( pShell ),
//
@@ -1974,11 +1967,11 @@ void ScUndoRemoveAreaLink::Undo()
ScAreaLink* pLink = new ScAreaLink( pDocShell, aDocName, aFltName, aOptions,
aAreaName, aRange.aStart, nRefreshDelay );
- pLink->SetInCreate( TRUE );
+ pLink->SetInCreate( sal_True );
pLink->SetDestArea( aRange );
pLinkManager->InsertFileLink( *pLink, OBJECT_CLIENT_FILE, aDocName, &aFltName, &aAreaName );
pLink->Update();
- pLink->SetInCreate( FALSE );
+ pLink->SetInCreate( false );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) ); // Navigator
}
@@ -2010,9 +2003,9 @@ void ScUndoRemoveAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -2025,10 +2018,10 @@ BOOL ScUndoRemoveAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoUpdateAreaLink::ScUndoUpdateAreaLink( ScDocShell* pShell,
const String& rOldD, const String& rOldF, const String& rOldO,
- const String& rOldA, const ScRange& rOldR, ULONG nOldRD,
+ const String& rOldA, const ScRange& rOldR, sal_uLong nOldRD,
const String& rNewD, const String& rNewF, const String& rNewO,
- const String& rNewA, const ScRange& rNewR, ULONG nNewRD,
- ScDocument* pUndo, ScDocument* pRedo, BOOL bDoInsert )
+ const String& rNewA, const ScRange& rNewR, sal_uLong nNewRD,
+ ScDocument* pUndo, ScDocument* pRedo, sal_Bool bDoInsert )
//
: ScSimpleUndo( pShell ),
//
@@ -2071,7 +2064,7 @@ String ScUndoUpdateAreaLink::GetComment() const
//----------------------------------------------------------------------------
-void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
+void ScUndoUpdateAreaLink::DoChange( const sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -2085,13 +2078,13 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
{
pDoc->FitBlock( aNewRange, aOldRange );
pDoc->DeleteAreaTab( aOldRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->UndoToDocument( aOldRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
}
else
@@ -2100,18 +2093,18 @@ void ScUndoUpdateAreaLink::DoChange( const BOOL bUndo ) const
{
pDoc->FitBlock( aOldRange, aNewRange );
pDoc->DeleteAreaTab( aNewRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aNewRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
else
{
ScRange aCopyRange( aOldRange.aStart, ScAddress(nEndX,nEndY,nEndZ) );
pDoc->DeleteAreaTab( aCopyRange, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ pRedoDoc->CopyToDocument( aCopyRange, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
}
ScRange aWorkRange( aNewRange.aStart, ScAddress( nEndX, nEndY, nEndZ ) );
- pDoc->ExtendMerge( aWorkRange, TRUE );
+ pDoc->ExtendMerge( aWorkRange, sal_True );
// Paint
@@ -2145,7 +2138,7 @@ void ScUndoUpdateAreaLink::Undo()
pLink->SetRefreshDelay( nOldRefresh );
}
- DoChange(TRUE);
+ DoChange(sal_True);
}
@@ -2164,7 +2157,7 @@ void ScUndoUpdateAreaLink::Redo()
pLink->SetRefreshDelay( nNewRefresh );
}
- DoChange(FALSE);
+ DoChange(false);
}
@@ -2178,9 +2171,9 @@ void ScUndoUpdateAreaLink::Repeat(SfxRepeatTarget& /* rTarget */)
//----------------------------------------------------------------------------
-BOOL ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoUpdateAreaLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx
index a57b0b137a9d..9743cf42c193 100644
--- a/sc/source/ui/undo/undocell.cxx
+++ b/sc/source/ui/undo/undocell.cxx
@@ -80,7 +80,7 @@ TYPEINIT1(ScUndoRangeNames, ScSimpleUndo);
ScUndoCursorAttr::ScUndoCursorAttr( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
const ScPatternAttr* pOldPat, const ScPatternAttr* pNewPat,
- const ScPatternAttr* pApplyPat, BOOL bAutomatic ) :
+ const ScPatternAttr* pApplyPat, sal_Bool bAutomatic ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
@@ -107,7 +107,7 @@ String ScUndoCursorAttr::GetComment() const
{
//! eigener Text fuer automatische Attributierung
- USHORT nId = STR_UNDO_CURSORATTR; // "Attribute"
+ sal_uInt16 nId = STR_UNDO_CURSORATTR; // "Attribute"
return ScGlobal::GetRscString( nId );
}
@@ -120,7 +120,7 @@ void ScUndoCursorAttr::SetEditData( EditTextObject* pOld, EditTextObject* pNew )
void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const shared_ptr<EditTextObject>& pEditData ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, TRUE );
+ pDoc->SetPattern( nCol, nRow, nTab, *pWhichPattern, true );
ScBaseCell* pCell;
pDoc->GetCell(nCol, nRow, nTab, pCell);
@@ -131,16 +131,16 @@ void ScUndoCursorAttr::DoChange( const ScPatternAttr* pWhichPattern, const share
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
pViewShell->AdjustBlockHeight();
}
const SfxItemSet& rApplySet = pApplyPattern->GetItemSet();
- BOOL bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, TRUE ) != SFX_ITEM_DEFAULT ||
- rApplySet.GetItemState( ATTR_CONDITIONAL, TRUE ) != SFX_ITEM_DEFAULT );
- BOOL bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, TRUE ) != SFX_ITEM_DEFAULT );
+ sal_Bool bPaintExt = ( rApplySet.GetItemState( ATTR_SHADOW, sal_True ) != SFX_ITEM_DEFAULT ||
+ rApplySet.GetItemState( ATTR_CONDITIONAL, sal_True ) != SFX_ITEM_DEFAULT );
+ sal_Bool bPaintRows = ( rApplySet.GetItemState( ATTR_HOR_JUSTIFY, sal_True ) != SFX_ITEM_DEFAULT );
- USHORT nFlags = SC_PF_TESTMERGE;
+ sal_uInt16 nFlags = SC_PF_TESTMERGE;
if (bPaintExt)
nFlags |= SC_PF_LINES;
if (bPaintRows)
@@ -179,7 +179,7 @@ void ScUndoCursorAttr::Repeat(SfxRepeatTarget& rTarget)
((ScTabViewTarget&)rTarget).GetViewShell()->ApplySelectionPattern( *pApplyPattern );
}
-BOOL ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -193,7 +193,7 @@ BOOL ScUndoCursorAttr::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
SCTAB nNewCount, SCTAB* pNewTabs, ScBaseCell** ppOldData,
- BOOL* pHasForm, ULONG* pOldForm,
+ sal_Bool* pHasForm, sal_uLong* pOldForm,
const String& rNewStr, EditTextObject* pObj ) :
ScSimpleUndo( pNewDocShell ),
aNewString( rNewStr ),
@@ -212,7 +212,7 @@ ScUndoEnterData::ScUndoEnterData( ScDocShell* pNewDocShell,
ScUndoEnterData::~ScUndoEnterData()
{
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (ppOldCells[i])
ppOldCells[i]->Delete();
delete[] ppOldCells;
@@ -233,14 +233,14 @@ void ScUndoEnterData::DoChange() const
{
// Zeilenhoehe anpassen
//! nur wenn noetig (alte oder neue EditZelle, oder Attribute) ??
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
pDocShell->AdjustRowHeight( nRow, nRow, pTabs[i] );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
}
pDocShell->PostDataChanged();
@@ -253,10 +253,10 @@ void ScUndoEnterData::SetChangeTrack()
{
nEndChangeAction = pChangeTrack->GetActionMax() + 1;
ScAddress aPos( nCol, nRow, nTab );
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
aPos.SetTab( pTabs[i] );
- ULONG nFormat = 0;
+ sal_uLong nFormat = 0;
if ( pHasFormat && pOldFormats )
{
if ( pHasFormat[i] )
@@ -276,7 +276,7 @@ void ScUndoEnterData::Undo()
BeginUndo();
ScDocument* pDoc = pDocShell->GetDocument();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
ScBaseCell* pNewCell = ppOldCells[i] ? ppOldCells[i]->CloneWithoutNote( *pDoc, SC_CLONECELL_STARTLISTENING ) : 0;
pDoc->PutCell( nCol, nRow, pTabs[i], pNewCell );
@@ -290,14 +290,14 @@ void ScUndoEnterData::Undo()
{
ScPatternAttr aPattern( *pDoc->GetPattern( nCol, nRow, pTabs[i] ) );
aPattern.GetItemSet().ClearItem( ATTR_VALUE_FORMAT );
- pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, TRUE );
+ pDoc->SetPattern( nCol, nRow, pTabs[i], aPattern, sal_True );
}
}
pDocShell->PostPaintCell( nCol, nRow, pTabs[i] );
}
ScChangeTrack* pChangeTrack = pDoc->GetChangeTrack();
- if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<ULONG>(nCount) )
+ if ( pChangeTrack && nEndChangeAction >= sal::static_int_cast<sal_uLong>(nCount) )
pChangeTrack->Undo( nEndChangeAction - nCount + 1, nEndChangeAction );
DoChange();
@@ -308,7 +308,7 @@ void ScUndoEnterData::Undo()
if ( pModelObj && pModelObj->HasChangesListeners() )
{
ScRangeList aChangeRanges;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) );
}
@@ -321,7 +321,7 @@ void ScUndoEnterData::Redo()
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
{
if (pNewEditData)
pDoc->PutCell( nCol, nRow, pTabs[i], new ScEditCell( pNewEditData,
@@ -341,7 +341,7 @@ void ScUndoEnterData::Redo()
if ( pModelObj && pModelObj->HasChangesListeners() )
{
ScRangeList aChangeRanges;
- for ( USHORT i = 0; i < nCount; ++i )
+ for ( sal_uInt16 i = 0; i < nCount; ++i )
{
aChangeRanges.Append( ScRange( nCol, nRow, pTabs[i] ) );
}
@@ -358,7 +358,7 @@ void ScUndoEnterData::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -370,7 +370,7 @@ BOOL ScUndoEnterData::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoEnterValue::ScUndoEnterValue( ScDocShell* pNewDocShell, const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, double nVal, BOOL bHeight ) :
+ ScBaseCell* pUndoCell, double nVal, sal_Bool bHeight ) :
ScSimpleUndo( pNewDocShell ),
aPos ( rNewPos ),
pOldCell ( pUndoCell ),
@@ -442,9 +442,9 @@ void ScUndoEnterValue::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -454,7 +454,7 @@ BOOL ScUndoEnterValue::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//
ScUndoPutCell::ScUndoPutCell( ScDocShell* pNewDocShell, const ScAddress& rNewPos,
- ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, BOOL bHeight ) :
+ ScBaseCell* pUndoCell, ScBaseCell* pRedoCell, sal_Bool bHeight ) :
ScSimpleUndo( pNewDocShell ),
aPos ( rNewPos ),
pOldCell ( pUndoCell ),
@@ -531,9 +531,9 @@ void ScUndoPutCell::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -544,7 +544,7 @@ BOOL ScUndoPutCell::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoPageBreak::ScUndoPageBreak( ScDocShell* pNewDocShell,
SCCOL nNewCol, SCROW nNewRow, SCTAB nNewTab,
- BOOL bNewColumn, BOOL bNewInsert ) :
+ sal_Bool bNewColumn, sal_Bool bNewInsert ) :
ScSimpleUndo( pNewDocShell ),
nCol( nNewCol ),
nRow( nNewRow ),
@@ -572,19 +572,19 @@ String ScUndoPageBreak::GetComment() const
) );
}
-void ScUndoPageBreak::DoChange( BOOL bInsertP ) const
+void ScUndoPageBreak::DoChange( sal_Bool bInsertP ) const
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
if (bInsertP)
- pViewShell->InsertPageBreak(bColumn, FALSE);
+ pViewShell->InsertPageBreak(bColumn, false);
else
- pViewShell->DeletePageBreak(bColumn, FALSE);
+ pViewShell->DeletePageBreak(bColumn, false);
pDocShell->GetDocument()->InvalidatePageBreaks(nTab);
}
@@ -611,13 +611,13 @@ void ScUndoPageBreak::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bInsert)
- rViewShell.InsertPageBreak(bColumn, TRUE);
+ rViewShell.InsertPageBreak(bColumn, sal_True);
else
- rViewShell.DeletePageBreak(bColumn, TRUE);
+ rViewShell.DeletePageBreak(bColumn, sal_True);
}
}
-BOOL ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -628,7 +628,7 @@ BOOL ScUndoPageBreak::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoPrintZoom::ScUndoPrintZoom( ScDocShell* pNewDocShell,
- SCTAB nT, USHORT nOS, USHORT nOP, USHORT nNS, USHORT nNP ) :
+ SCTAB nT, sal_uInt16 nOS, sal_uInt16 nOP, sal_uInt16 nNS, sal_uInt16 nNP ) :
ScSimpleUndo( pNewDocShell ),
nTab( nT ),
nOldScale( nOS ),
@@ -647,10 +647,10 @@ String ScUndoPrintZoom::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_PRINTSCALE );
}
-void ScUndoPrintZoom::DoChange( BOOL bUndo )
+void ScUndoPrintZoom::DoChange( sal_Bool bUndo )
{
- USHORT nScale = bUndo ? nOldScale : nNewScale;
- USHORT nPages = bUndo ? nOldPages : nNewPages;
+ sal_uInt16 nScale = bUndo ? nOldScale : nNewScale;
+ sal_uInt16 nPages = bUndo ? nOldPages : nNewPages;
ScDocument* pDoc = pDocShell->GetDocument();
String aStyleName = pDoc->GetPageStyle( nTab );
@@ -671,14 +671,14 @@ void ScUndoPrintZoom::DoChange( BOOL bUndo )
void ScUndoPrintZoom::Undo()
{
BeginUndo();
- DoChange(TRUE);
+ DoChange(sal_True);
EndUndo();
}
void ScUndoPrintZoom::Redo()
{
BeginRedo();
- DoChange(FALSE);
+ DoChange(false);
EndRedo();
}
@@ -692,7 +692,7 @@ void ScUndoPrintZoom::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoPrintZoom::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -751,7 +751,7 @@ void ScUndoThesaurus::SetChangeTrack( ScBaseCell* pOldCell )
nEndChangeAction = 0;
}
-void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
+void ScUndoThesaurus::DoChange( sal_Bool bUndo, const String& rStr,
const EditTextObject* pTObj )
{
ScDocument* pDoc = pDocShell->GetDocument();
@@ -760,7 +760,7 @@ void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
if (pViewShell)
{
pViewShell->SetTabNo( nTab );
- pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nCol, nRow, SC_FOLLOW_JUMP, false, false );
}
if (pTObj)
@@ -798,7 +798,7 @@ void ScUndoThesaurus::DoChange( BOOL bUndo, const String& rStr,
void ScUndoThesaurus::Undo()
{
BeginUndo();
- DoChange( TRUE, aUndoStr, pUndoTObject );
+ DoChange( sal_True, aUndoStr, pUndoTObject );
ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
if ( pChangeTrack )
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
@@ -808,17 +808,17 @@ void ScUndoThesaurus::Undo()
void ScUndoThesaurus::Redo()
{
BeginRedo();
- DoChange( FALSE, aRedoStr, pRedoTObject );
+ DoChange( false, aRedoStr, pRedoTObject );
EndRedo();
}
void ScUndoThesaurus::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->DoThesaurus( sal_True );
}
-BOOL ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoThesaurus::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -883,9 +883,9 @@ void ScUndoReplaceNote::Repeat( SfxRepeatTarget& /*rTarget*/ )
{
}
-BOOL ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
+sal_Bool ScUndoReplaceNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
{
- return FALSE;
+ return false;
}
String ScUndoReplaceNote::GetComment() const
@@ -955,9 +955,9 @@ void ScUndoShowHideNote::Repeat( SfxRepeatTarget& /*rTarget*/ )
{
}
-BOOL ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
+sal_Bool ScUndoShowHideNote::CanRepeat( SfxRepeatTarget& /*rTarget*/ ) const
{
- return FALSE;
+ return false;
}
String ScUndoShowHideNote::GetComment() const
@@ -983,7 +983,7 @@ ScUndoDetective::ScUndoDetective( ScDocShell* pNewDocShell,
bIsDelete = ( pOperation == NULL );
if (!bIsDelete)
{
- nAction = (USHORT) pOperation->GetOperation();
+ nAction = (sal_uInt16) pOperation->GetOperation();
aPos = pOperation->GetPos();
}
}
@@ -996,7 +996,7 @@ ScUndoDetective::~ScUndoDetective()
String ScUndoDetective::GetComment() const
{
- USHORT nId = STR_UNDO_DETDELALL;
+ sal_uInt16 nId = STR_UNDO_DETDELALL;
if ( !bIsDelete )
switch ( (ScDetOpType) nAction )
{
@@ -1030,7 +1030,7 @@ void ScUndoDetective::Undo()
ScDetOpList* pList = pDoc->GetDetOpList();
if (pList && pList->Count())
{
- USHORT nPos = pList->Count() - 1;
+ sal_uInt16 nPos = pList->Count() - 1;
ScDetOpData* pData = (*pList)[nPos];
if ( pData->GetOperation() == (ScDetOpType) nAction && pData->GetPos() == aPos )
pList->DeleteAndDestroy( nPos, 1 );
@@ -1073,9 +1073,9 @@ void ScUndoDetective::Repeat(SfxRepeatTarget& /* rTarget */)
// hammanich
}
-BOOL ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDetective::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -1102,17 +1102,17 @@ String ScUndoRangeNames::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_RANGENAMES );
}
-void ScUndoRangeNames::DoChange( BOOL bUndo )
+void ScUndoRangeNames::DoChange( sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDoc->CompileNameFormula( TRUE ); // CreateFormulaString
+ pDoc->CompileNameFormula( sal_True ); // CreateFormulaString
if ( bUndo )
pDoc->SetRangeName( new ScRangeName( *pOldRanges ) );
else
pDoc->SetRangeName( new ScRangeName( *pNewRanges ) );
- pDoc->CompileNameFormula( FALSE ); // CompileFormulaString
+ pDoc->CompileNameFormula( false ); // CompileFormulaString
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREAS_CHANGED ) );
}
@@ -1120,14 +1120,14 @@ void ScUndoRangeNames::DoChange( BOOL bUndo )
void ScUndoRangeNames::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoRangeNames::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1136,9 +1136,9 @@ void ScUndoRangeNames::Repeat(SfxRepeatTarget& /* rTarget */)
// hammanich
}
-BOOL ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRangeNames::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx
index 83d37fda9e62..dc23ff8f6aeb 100644
--- a/sc/source/ui/undo/undodat.cxx
+++ b/sc/source/ui/undo/undodat.cxx
@@ -85,8 +85,8 @@ TYPEINIT1(ScUndoDataForm, SfxUndoAction); // amelia
ScUndoDoOutline::ScUndoDoOutline( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
- ScDocument* pNewUndoDoc, BOOL bNewColumns,
- USHORT nNewLevel, USHORT nNewEntry, BOOL bNewShow ) :
+ ScDocument* pNewUndoDoc, sal_Bool bNewColumns,
+ sal_uInt16 nNewLevel, sal_uInt16 nNewEntry, sal_Bool bNewShow ) :
ScSimpleUndo( pNewDocShell ),
nStart( nNewStart ),
nEnd( nNewEnd ),
@@ -127,17 +127,17 @@ void ScUndoDoOutline::Undo()
// inverse Funktion ausfuehren
if (bShow)
- pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE, FALSE );
+ pViewShell->HideOutline( bColumns, nLevel, nEntry, false, false );
else
- pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE, FALSE );
+ pViewShell->ShowOutline( bColumns, nLevel, nEntry, false, false );
// Original Spalten-/Zeilenstatus
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
@@ -159,9 +159,9 @@ void ScUndoDoOutline::Redo()
pViewShell->SetTabNo( nTab );
if (bShow)
- pViewShell->ShowOutline( bColumns, nLevel, nEntry, FALSE );
+ pViewShell->ShowOutline( bColumns, nLevel, nEntry, false );
else
- pViewShell->HideOutline( bColumns, nLevel, nEntry, FALSE );
+ pViewShell->HideOutline( bColumns, nLevel, nEntry, false );
EndRedo();
}
@@ -170,9 +170,9 @@ void ScUndoDoOutline::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
//
@@ -182,7 +182,7 @@ BOOL ScUndoDoOutline::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoMakeOutline::ScUndoMakeOutline( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScOutlineTable* pNewUndoTab, BOOL bNewColumns, BOOL bNewMake ) :
+ ScOutlineTable* pNewUndoTab, sal_Bool bNewColumns, sal_Bool bNewMake ) :
ScSimpleUndo( pNewDocShell ),
aBlockStart( nStartX, nStartY, nStartZ ),
aBlockEnd( nEndX, nEndY, nEndZ ),
@@ -234,9 +234,9 @@ void ScUndoMakeOutline::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd );
if (bMake)
- pViewShell->MakeOutline( bColumns, FALSE );
+ pViewShell->MakeOutline( bColumns, false );
else
- pViewShell->RemoveOutline( bColumns, FALSE );
+ pViewShell->RemoveOutline( bColumns, false );
pDocShell->PostPaint(0,0,aBlockStart.Tab(),MAXCOL,MAXROW,aBlockEnd.Tab(),PAINT_GRID);
@@ -250,13 +250,13 @@ void ScUndoMakeOutline::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bMake)
- rViewShell.MakeOutline( bColumns, TRUE );
+ rViewShell.MakeOutline( bColumns, sal_True );
else
- rViewShell.RemoveOutline( bColumns, TRUE );
+ rViewShell.RemoveOutline( bColumns, sal_True );
}
}
-BOOL ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -268,7 +268,7 @@ BOOL ScUndoMakeOutline::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoOutlineLevel::ScUndoOutlineLevel( ScDocShell* pNewDocShell,
SCCOLROW nNewStart, SCCOLROW nNewEnd, SCTAB nNewTab,
ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab,
- BOOL bNewColumns, USHORT nNewLevel ) :
+ sal_Bool bNewColumns, sal_uInt16 nNewLevel ) :
ScSimpleUndo( pNewDocShell ),
nStart( nNewStart ),
nEnd( nNewEnd ),
@@ -306,9 +306,9 @@ void ScUndoOutlineLevel::Undo()
if (bColumns)
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStart), 0, nTab,
- static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, FALSE, pDoc);
+ static_cast<SCCOL>(nEnd), MAXROW, nTab, IDF_NONE, false, pDoc);
else
- pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStart, nTab, MAXCOL, nEnd, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -335,7 +335,7 @@ void ScUndoOutlineLevel::Redo()
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );
- pViewShell->SelectLevel( bColumns, nLevel, FALSE );
+ pViewShell->SelectLevel( bColumns, nLevel, false );
EndRedo();
}
@@ -343,10 +343,10 @@ void ScUndoOutlineLevel::Redo()
void ScUndoOutlineLevel::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->SelectLevel( bColumns, nLevel, sal_True );
}
-BOOL ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -358,7 +358,7 @@ BOOL ScUndoOutlineLevel::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoOutlineBlock::ScUndoOutlineBlock( ScDocShell* pNewDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
- ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, BOOL bNewShow ) :
+ ScDocument* pNewUndoDoc, ScOutlineTable* pNewUndoTab, sal_Bool bNewShow ) :
ScSimpleUndo( pNewDocShell ),
aBlockStart( nStartX, nStartY, nStartZ ),
aBlockEnd( nEndX, nEndY, nEndZ ),
@@ -402,7 +402,7 @@ void ScUndoOutlineBlock::Undo()
if (!bShow)
{ // Groesse des ausgeblendeten Blocks
- USHORT nLevel;
+ sal_uInt16 nLevel;
pUndoTable->GetColArray()->FindTouchedLevel( nStartCol, nEndCol, nLevel );
pUndoTable->GetColArray()->ExtendBlock( nLevel, nStartCol, nEndCol );
pUndoTable->GetRowArray()->FindTouchedLevel( nStartRow, nEndRow, nLevel );
@@ -410,8 +410,8 @@ void ScUndoOutlineBlock::Undo()
}
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE, pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -434,9 +434,9 @@ void ScUndoOutlineBlock::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart, aBlockEnd );
if (bShow)
- pViewShell->ShowMarkedOutlines( FALSE );
+ pViewShell->ShowMarkedOutlines( false );
else
- pViewShell->HideMarkedOutlines( FALSE );
+ pViewShell->HideMarkedOutlines( false );
EndRedo();
}
@@ -448,13 +448,13 @@ void ScUndoOutlineBlock::Repeat(SfxRepeatTarget& rTarget)
ScTabViewShell& rViewShell = *((ScTabViewTarget&)rTarget).GetViewShell();
if (bShow)
- rViewShell.ShowMarkedOutlines( TRUE );
+ rViewShell.ShowMarkedOutlines( sal_True );
else
- rViewShell.HideMarkedOutlines( TRUE );
+ rViewShell.HideMarkedOutlines( sal_True );
}
}
-BOOL ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoOutlineBlock::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -505,8 +505,8 @@ void ScUndoRemoveAllOutlines::Undo()
SCROW nStartRow = aBlockStart.Row();
SCROW nEndRow = aBlockEnd.Row();
- pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, FALSE, pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( nStartCol, 0, nTab, nEndCol, MAXROW, nTab, IDF_NONE, false, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pDoc->UpdatePageBreaks( nTab );
@@ -534,7 +534,7 @@ void ScUndoRemoveAllOutlines::Redo()
if ( nVisTab != nTab )
pViewShell->SetTabNo( nTab );
- pViewShell->RemoveAllOutlines( FALSE );
+ pViewShell->RemoveAllOutlines( false );
EndRedo();
}
@@ -542,10 +542,10 @@ void ScUndoRemoveAllOutlines::Redo()
void ScUndoRemoveAllOutlines::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->RemoveAllOutlines( sal_True );
}
-BOOL ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRemoveAllOutlines::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -601,9 +601,9 @@ void ScUndoAutoOutline::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -636,7 +636,7 @@ void ScUndoAutoOutline::Redo()
ScRange aRange( aBlockStart.Col(), aBlockStart.Row(), nTab,
aBlockEnd.Col(), aBlockEnd.Row(), nTab );
ScOutlineDocFunc aFunc( *pDocShell );
- aFunc.AutoOutline( aRange, FALSE, FALSE );
+ aFunc.AutoOutline( aRange, false, false );
// auf der View markieren
// Wenn's beim Aufruf eine Mehrfachselektion war, ist es jetzt der
@@ -651,10 +651,10 @@ void ScUndoAutoOutline::Redo()
void ScUndoAutoOutline::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->AutoOutline( sal_True );
}
-BOOL ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoAutoOutline::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -725,9 +725,9 @@ void ScUndoSubTotals::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc);
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -740,9 +740,9 @@ void ScUndoSubTotals::Undo()
pDoc->DeleteAreaTab( 0,aParam.nRow1+1, MAXCOL,aParam.nRow2, nTab, IDF_ALL );
pUndoDoc->CopyToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_NONE, FALSE, pDoc ); // Flags
+ IDF_NONE, false, pDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aParam.nRow1+1, nTab, MAXCOL, aParam.nRow2, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
@@ -750,7 +750,7 @@ void ScUndoSubTotals::Undo()
if (pUndoRange)
pDoc->SetRangeName( new ScRangeName( *pUndoRange ) );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
if ( nVisTab != nTab )
@@ -774,7 +774,7 @@ void ScUndoSubTotals::Redo()
ScUndoUtil::MarkSimpleBlock( pDocShell, aParam.nCol1,aParam.nRow1,nTab,
aParam.nCol2,aParam.nRow2,nTab );
- pViewShell->DoSubTotals( aParam, FALSE );
+ pViewShell->DoSubTotals( aParam, false );
EndRedo();
}
@@ -783,9 +783,9 @@ void ScUndoSubTotals::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -794,7 +794,7 @@ BOOL ScUndoSubTotals::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell,
SCTAB nNewTab, const ScSortParam& rParam,
- BOOL bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
+ sal_Bool bQuery, ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
const ScRange* pDest ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
@@ -803,11 +803,11 @@ ScUndoSort::ScUndoSort( ScDocShell* pNewDocShell,
bRepeatQuery( bQuery ),
pUndoDoc( pNewUndoDoc ),
pUndoDB( pNewUndoDB ),
- bDestArea( FALSE )
+ bDestArea( false )
{
if ( pDest )
{
- bDestArea = TRUE;
+ bDestArea = sal_True;
aDestRange = *pDest;
}
}
@@ -850,23 +850,23 @@ void ScUndoSort::Undo()
// do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo)
pDoc->DeleteAreaTab( nStartCol,nStartRow, nEndCol,nEndRow, nSortTab, IDF_ALL|IDF_NOCAPTIONS );
pUndoDoc->CopyToDocument( nStartCol, nStartRow, nSortTab, nEndCol, nEndRow, nSortTab,
- IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
if (bDestArea)
{
// do not delete/copy note captions, they are handled in drawing undo (ScDBFuncUndo::mpDrawUndo)
pDoc->DeleteAreaTab( aDestRange, IDF_ALL|IDF_NOCAPTIONS );
- pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aDestRange, IDF_ALL|IDF_NOCAPTIONS, false, pDoc );
}
// Zeilenhoehen immer (wegen automatischer Anpassung)
//! auf ScBlockUndo umstellen
// if (bRepeatQuery)
pUndoDoc->CopyToDocument( 0, nStartRow, nSortTab, MAXCOL, nEndRow, nSortTab,
- IDF_NONE, FALSE, pDoc );
+ IDF_NONE, false, pDoc );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
SCTAB nVisTab = pViewShell->GetViewData()->GetTabNo();
if ( nVisTab != nSortTab )
@@ -891,7 +891,7 @@ void ScUndoSort::Redo()
pViewShell->MarkRange( ScRange( aSortParam.nCol1, aSortParam.nRow1, nTab,
aSortParam.nCol2, aSortParam.nRow2, nTab ) );
- pViewShell->Sort( aSortParam, FALSE );
+ pViewShell->Sort( aSortParam, false );
// Quellbereich painten wegen Markierung
if ( !aSortParam.bInplace )
@@ -905,9 +905,9 @@ void ScUndoSort::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -916,7 +916,7 @@ BOOL ScUndoSort::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQueryParam& rParam,
ScDocument* pNewUndoDoc, ScDBCollection* pNewUndoDB,
- const ScRange* pOld, BOOL bSize, const ScRange* pAdvSrc ) :
+ const ScRange* pOld, sal_Bool bSize, const ScRange* pAdvSrc ) :
ScDBFuncUndo( pNewDocShell, ScRange( rParam.nCol1, rParam.nRow1, nNewTab,
rParam.nCol2, rParam.nRow2, nNewTab ) ),
pDrawUndo( NULL ),
@@ -924,18 +924,18 @@ ScUndoQuery::ScUndoQuery( ScDocShell* pNewDocShell, SCTAB nNewTab, const ScQuery
aQueryParam( rParam ),
pUndoDoc( pNewUndoDoc ),
pUndoDB( pNewUndoDB ),
- bIsAdvanced( FALSE ),
- bDestArea( FALSE ),
+ bIsAdvanced( false ),
+ bDestArea( false ),
bDoSize( bSize )
{
if ( pOld )
{
- bDestArea = TRUE;
+ bDestArea = sal_True;
aOldDest = *pOld;
}
if ( pAdvSrc )
{
- bIsAdvanced = TRUE;
+ bIsAdvanced = sal_True;
aAdvSource = *pAdvSrc;
}
@@ -961,7 +961,7 @@ void ScUndoQuery::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- BOOL bCopy = !aQueryParam.bInplace;
+ sal_Bool bCopy = !aQueryParam.bInplace;
SCCOL nDestEndCol = 0;
SCROW nDestEndRow = 0;
if (bCopy)
@@ -970,7 +970,7 @@ void ScUndoQuery::Undo()
nDestEndRow = aQueryParam.nDestRow + ( aQueryParam.nRow2-aQueryParam.nRow1 );
ScDBData* pData = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
- aQueryParam.nDestTab, TRUE );
+ aQueryParam.nDestTab, sal_True );
if (pData)
{
ScRange aNewDest;
@@ -998,22 +998,22 @@ void ScUndoQuery::Undo()
pUndoDoc->CopyToDocument( aQueryParam.nDestCol, aQueryParam.nDestRow, aQueryParam.nDestTab,
nDestEndCol, nDestEndRow, aQueryParam.nDestTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Attribute werden immer mitkopiert (#49287#)
// Rest von altem Bereich
if ( bDestArea && !bDoSize )
{
pDoc->DeleteAreaTab( aOldDest, IDF_ALL );
- pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( aOldDest, IDF_ALL, false, pDoc );
}
}
else
pUndoDoc->CopyToDocument( 0, aQueryParam.nRow1, nTab, MAXCOL, aQueryParam.nRow2, nTab,
- IDF_NONE, FALSE, pDoc );
+ IDF_NONE, false, pDoc );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
if (!bCopy)
{
@@ -1068,9 +1068,9 @@ void ScUndoQuery::Redo()
pViewShell->SetTabNo( nTab );
if ( bIsAdvanced )
- pViewShell->Query( aQueryParam, &aAdvSource, FALSE );
+ pViewShell->Query( aQueryParam, &aAdvSource, false );
else
- pViewShell->Query( aQueryParam, NULL, FALSE );
+ pViewShell->Query( aQueryParam, NULL, false );
EndRedo();
}
@@ -1079,9 +1079,9 @@ void ScUndoQuery::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht wegen Spaltennummern
+ return false; // geht nicht wegen Spaltennummern
}
//
@@ -1089,7 +1089,7 @@ BOOL ScUndoQuery::CanRepeat(SfxRepeatTarget& /* rTarget */) const
//
ScUndoAutoFilter::ScUndoAutoFilter( ScDocShell* pNewDocShell, const ScRange& rRange,
- const String& rName, BOOL bSet ) :
+ const String& rName, sal_Bool bSet ) :
ScDBFuncUndo( pNewDocShell, rRange ),
aDBName( rName ),
bFilterSet( bSet )
@@ -1105,11 +1105,11 @@ String ScUndoAutoFilter::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_QUERY ); // same as ScUndoQuery
}
-void ScUndoAutoFilter::DoChange( BOOL bUndo )
+void ScUndoAutoFilter::DoChange( sal_Bool bUndo )
{
- BOOL bNewFilter = bUndo ? !bFilterSet : bFilterSet;
+ sal_Bool bNewFilter = bUndo ? !bFilterSet : bFilterSet;
- USHORT nIndex;
+ sal_uInt16 nIndex;
ScDocument* pDoc = pDocShell->GetDocument();
ScDBCollection* pColl = pDoc->GetDBCollection();
if ( pColl->SearchName( aDBName, nIndex ) )
@@ -1136,14 +1136,14 @@ void ScUndoAutoFilter::DoChange( BOOL bUndo )
void ScUndoAutoFilter::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoAutoFilter::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1151,9 +1151,9 @@ void ScUndoAutoFilter::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoAutoFilter::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//
@@ -1185,11 +1185,11 @@ void ScUndoDBData::Undo()
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), TRUE );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // unnoetige Berechnungen vermeiden
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ pDoc->SetDBCollection( new ScDBCollection(*pUndoColl), sal_True );
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pDoc->SetAutoCalc( bOldAutoCalc );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1203,11 +1203,11 @@ void ScUndoDBData::Redo()
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // unnoetige Berechnungen vermeiden
- pDoc->CompileDBFormula( TRUE ); // CreateFormulaString
- pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), TRUE );
- pDoc->CompileDBFormula( FALSE ); // CompileFormulaString
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // unnoetige Berechnungen vermeiden
+ pDoc->CompileDBFormula( sal_True ); // CreateFormulaString
+ pDoc->SetDBCollection( new ScDBCollection(*pRedoColl), sal_True );
+ pDoc->CompileDBFormula( false ); // CompileFormulaString
pDoc->SetAutoCalc( bOldAutoCalc );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_DBAREAS_CHANGED ) );
@@ -1219,9 +1219,9 @@ void ScUndoDBData::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDBData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // geht nicht
+ return false; // geht nicht
}
//
@@ -1243,7 +1243,7 @@ ScUndoImportData::ScUndoImportData( ScDocShell* pNewDocShell, SCTAB nNewTab,
pUndoDBData( pNewUndoData ),
pRedoDBData( pNewRedoData ),
nFormulaCols( nNewFormula ),
- bRedoFilled( FALSE )
+ bRedoFilled( false )
{
// redo doc doesn't contain imported data (but everything else)
}
@@ -1287,20 +1287,20 @@ void ScUndoImportData::Undo()
// imported data is deleted later anyway,
// so now delete each column after copying to save memory (#41216#)
- BOOL bOldAutoCalc = pDoc->GetAutoCalc();
- pDoc->SetAutoCalc( FALSE ); // outside of the loop
+ sal_Bool bOldAutoCalc = pDoc->GetAutoCalc();
+ pDoc->SetAutoCalc( false ); // outside of the loop
for (SCCOL nCopyCol = nCol1; nCopyCol <= nCol2; nCopyCol++)
{
pDoc->CopyToDocument( nCopyCol,nRow1,nTab, nCopyCol,nRow2,nTab,
- IDF_CONTENTS & ~IDF_NOTE, FALSE, pRedoDoc );
+ IDF_CONTENTS & ~IDF_NOTE, false, pRedoDoc );
pDoc->DeleteAreaTab( nCopyCol,nRow1, nCopyCol,nRow2, nTab, IDF_CONTENTS & ~IDF_NOTE );
pDoc->DoColResize( nTab, nCopyCol, nCopyCol, 0 );
}
pDoc->SetAutoCalc( bOldAutoCalc );
- bRedoFilled = TRUE;
+ bRedoFilled = sal_True;
}
}
- BOOL bMoveCells = pUndoDBData && pRedoDBData &&
+ sal_Bool bMoveCells = pUndoDBData && pRedoDBData &&
pRedoDBData->IsDoSize(); // in alt und neu gleich
if (bMoveCells)
{
@@ -1315,7 +1315,7 @@ void ScUndoImportData::Undo()
aOld.aEnd.SetCol( aOld.aEnd.Col() + nFormulaCols ); // FitBlock auch fuer Formeln
aNew.aEnd.SetCol( aNew.aEnd.Col() + nFormulaCols );
- pDoc->FitBlock( aNew, aOld, FALSE ); // rueckwaerts
+ pDoc->FitBlock( aNew, aOld, false ); // rueckwaerts
}
else
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
@@ -1323,7 +1323,7 @@ void ScUndoImportData::Undo()
pUndoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
nEndCol+nFormulaCols,nEndRow,nTab,
- IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ IDF_ALL & ~IDF_NOTE, false, pDoc );
if (pCurrentData)
{
@@ -1370,7 +1370,7 @@ void ScUndoImportData::Redo()
pCurrentData = ScUndoUtil::GetOldDBData( pUndoDBData, pDoc, nTab,
nCol1, nRow1, nCol2, nRow2 );
}
- BOOL bMoveCells = pUndoDBData && pRedoDBData &&
+ sal_Bool bMoveCells = pUndoDBData && pRedoDBData &&
pRedoDBData->IsDoSize(); // in alt und neu gleich
if (bMoveCells)
{
@@ -1387,14 +1387,14 @@ void ScUndoImportData::Redo()
pDoc->DeleteAreaTab( aNew.aStart.Col(), aNew.aStart.Row(),
aNew.aEnd.Col(), aNew.aEnd.Row(), nTab, IDF_ALL & ~IDF_NOTE );
- pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, FALSE, pDoc ); // incl. Formeln
+ pRedoDoc->CopyToDocument( aNew, IDF_ALL & ~IDF_NOTE, false, pDoc ); // incl. Formeln
}
else
{
pDoc->DeleteAreaTab( aImportParam.nCol1,aImportParam.nRow1,
nEndCol,nEndRow, nTab, IDF_ALL & ~IDF_NOTE );
pRedoDoc->CopyToDocument( aImportParam.nCol1,aImportParam.nRow1,nTab,
- nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, FALSE, pDoc );
+ nEndCol,nEndRow,nTab, IDF_ALL & ~IDF_NOTE, false, pDoc );
}
if (pCurrentData)
@@ -1437,14 +1437,14 @@ void ScUndoImportData::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoImportData::CanRepeat(SfxRepeatTarget& rTarget) const
{
// Repeat nur fuer Import per DB-Bereich, dann ist pUndoDBData gesetzt
if (pUndoDBData)
return (rTarget.ISA(ScTabViewTarget));
else
- return FALSE; // Adressbuch
+ return false; // Adressbuch
}
//
@@ -1466,13 +1466,13 @@ ScUndoRepeatDB::ScUndoRepeatDB( ScDocShell* pNewDocShell, SCTAB nNewTab,
pUndoTable( pNewUndoTab ),
pUndoRange( pNewUndoRange ),
pUndoDB( pNewUndoDB ),
- bQuerySize( FALSE )
+ bQuerySize( false )
{
if ( pOldQ && pNewQ )
{
aOldQuery = *pOldQ;
aNewQuery = *pNewQ;
- bQuerySize = TRUE;;
+ bQuerySize = sal_True;;
}
}
@@ -1499,7 +1499,7 @@ void ScUndoRepeatDB::Undo()
if (bQuerySize)
{
- pDoc->FitBlock( aNewQuery, aOldQuery, FALSE );
+ pDoc->FitBlock( aNewQuery, aOldQuery, false );
if ( aNewQuery.aEnd.Col() == aOldQuery.aEnd.Col() )
{
@@ -1517,7 +1517,7 @@ void ScUndoRepeatDB::Undo()
aOldForm.aEnd.SetCol( aOldQuery.aEnd.Col() + nFormulaCols );
ScRange aNewForm = aOldForm;
aNewForm.aEnd.SetRow( aNewQuery.aEnd.Row() );
- pDoc->FitBlock( aNewForm, aOldForm, FALSE );
+ pDoc->FitBlock( aNewForm, aOldForm, false );
}
}
}
@@ -1549,9 +1549,9 @@ void ScUndoRepeatDB::Undo()
pUndoTable->GetRowArray()->GetRange( nStartRow, nEndRow );
pUndoDoc->CopyToDocument( static_cast<SCCOL>(nStartCol), 0, nTab,
- static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, FALSE,
+ static_cast<SCCOL>(nEndCol), MAXROW, nTab, IDF_NONE, false,
pDoc );
- pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0, nStartRow, nTab, MAXCOL, nEndRow, nTab, IDF_NONE, false, pDoc );
pViewShell->UpdateScrollBars();
}
@@ -1564,9 +1564,9 @@ void ScUndoRepeatDB::Undo()
MAXCOL, aBlockEnd.Row(), nTab, IDF_ALL );
pUndoDoc->CopyToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_NONE, FALSE, pDoc ); // Flags
+ IDF_NONE, false, pDoc ); // Flags
pUndoDoc->UndoToDocument( 0, aBlockStart.Row(), nTab, MAXCOL, aBlockEnd.Row(), nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
ScUndoUtil::MarkSimpleBlock( pDocShell, aBlockStart.Col(),aBlockStart.Row(),nTab,
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
@@ -1574,7 +1574,7 @@ void ScUndoRepeatDB::Undo()
if (pUndoRange)
pDoc->SetRangeName( new ScRangeName( *pUndoRange ) );
if (pUndoDB)
- pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), TRUE );
+ pDoc->SetDBCollection( new ScDBCollection( *pUndoDB ), sal_True );
// erack! it's broadcasted
// pDoc->SetDirty();
@@ -1604,7 +1604,7 @@ void ScUndoRepeatDB::Redo()
aBlockEnd.Col(),aBlockEnd.Row(),nTab );
pViewShell->SetCursor( aCursorPos.Col(), aCursorPos.Row() );
- pViewShell->RepeatDB( FALSE );
+ pViewShell->RepeatDB( false );
EndRedo();
}
@@ -1612,10 +1612,10 @@ void ScUndoRepeatDB::Redo()
void ScUndoRepeatDB::Repeat(SfxRepeatTarget& rTarget)
{
if (rTarget.ISA(ScTabViewTarget))
- ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( TRUE );
+ ((ScTabViewTarget&)rTarget).GetViewShell()->RepeatDB( sal_True );
}
-BOOL ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1626,7 +1626,7 @@ BOOL ScUndoRepeatDB::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoDataPilot::ScUndoDataPilot( ScDocShell* pNewDocShell,
ScDocument* pOldDoc, ScDocument* pNewDoc,
- const ScDPObject* pOldObj, const ScDPObject* pNewObj, BOOL bMove ) :
+ const ScDPObject* pOldObj, const ScDPObject* pNewObj, sal_Bool bMove ) :
ScSimpleUndo( pNewDocShell ),
pOldUndoDoc( pOldDoc ),
pNewUndoDoc( pNewDoc ),
@@ -1650,7 +1650,7 @@ ScUndoDataPilot::~ScUndoDataPilot()
String ScUndoDataPilot::GetComment() const
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if ( pOldUndoDoc && pNewUndoDoc )
nIndex = STR_UNDO_PIVOT_MODIFY;
else if ( pNewUndoDoc )
@@ -1674,13 +1674,13 @@ void ScUndoDataPilot::Undo()
{
aNewRange = pNewDPObject->GetOutRange();
pDoc->DeleteAreaTab( aNewRange, IDF_ALL );
- pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, FALSE, pDoc );
+ pNewUndoDoc->CopyToDocument( aNewRange, IDF_ALL, false, pDoc );
}
if ( pOldDPObject && pOldUndoDoc )
{
aOldRange = pOldDPObject->GetOutRange();
pDoc->DeleteAreaTab( aOldRange, IDF_ALL );
- pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, FALSE, pDoc );
+ pOldUndoDoc->CopyToDocument( aOldRange, IDF_ALL, false, pDoc );
}
// update objects in collection
@@ -1717,7 +1717,7 @@ void ScUndoDataPilot::Undo()
// re-insert deleted object
ScDPObject* pDestObj = new ScDPObject( *pOldDPObject );
- pDestObj->SetAlive(TRUE);
+ pDestObj->SetAlive(sal_True);
if ( !pDoc->GetDPCollection()->InsertNewTable(pDestObj) )
{
OSL_FAIL("cannot insert DPObject");
@@ -1768,7 +1768,7 @@ void ScUndoDataPilot::Redo()
}
ScDBDocFunc aFunc( *pDocShell );
- aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, FALSE, FALSE, bAllowMove ); // no new undo action
+ aFunc.DataPilotUpdate( pSourceObj, pNewDPObject, false, false, bAllowMove ); // no new undo action
EndRedo();
}
@@ -1778,10 +1778,10 @@ void ScUndoDataPilot::Repeat(SfxRepeatTarget& /* rTarget */)
//! allow deletion
}
-BOOL ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
//! allow deletion
- return FALSE;
+ return false;
}
@@ -1791,7 +1791,7 @@ BOOL ScUndoDataPilot::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoConsolidate::ScUndoConsolidate( ScDocShell* pNewDocShell, const ScArea& rArea,
const ScConsolidateParam& rPar, ScDocument* pNewUndoDoc,
- BOOL bReference, SCROW nInsCount, ScOutlineTable* pTab,
+ sal_Bool bReference, SCROW nInsCount, ScOutlineTable* pTab,
ScDBData* pData ) :
ScSimpleUndo( pNewDocShell ),
aDestArea( rArea ),
@@ -1836,19 +1836,19 @@ void ScUndoConsolidate::Undo()
pDoc->SetOutlineTable( nTab, pUndoTab );
// Zeilenstatus
- pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, FALSE, pDoc );
+ pUndoDoc->CopyToDocument( 0,0,nTab, MAXCOL,MAXROW,nTab, IDF_NONE, false, pDoc );
// Daten & Referenzen
pDoc->DeleteAreaTab( 0,aDestArea.nRowStart, MAXCOL,aDestArea.nRowEnd, nTab, IDF_ALL );
pUndoDoc->UndoToDocument( 0, aDestArea.nRowStart, nTab,
MAXCOL, aDestArea.nRowEnd, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Original-Bereich
if (pUndoData)
{
pDoc->DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, pDoc);
}
pDocShell->PostPaint( 0,aDestArea.nRowStart,nTab, MAXCOL,MAXROW,nTab,
@@ -1860,13 +1860,13 @@ void ScUndoConsolidate::Undo()
aDestArea.nColEnd,aDestArea.nRowEnd, nTab, IDF_ALL );
pUndoDoc->CopyToDocument( aDestArea.nColStart, aDestArea.nRowStart, nTab,
aDestArea.nColEnd, aDestArea.nRowEnd, nTab,
- IDF_ALL, FALSE, pDoc );
+ IDF_ALL, false, pDoc );
// Original-Bereich
if (pUndoData)
{
pDoc->DeleteAreaTab(aOldRange, IDF_ALL);
- pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, FALSE, pDoc);
+ pUndoDoc->CopyToDocument(aOldRange, IDF_ALL, false, pDoc);
}
SCCOL nEndX = aDestArea.nColEnd;
@@ -1888,7 +1888,7 @@ void ScUndoConsolidate::Undo()
ScDBCollection* pColl = pDoc->GetDBCollection();
if (pColl)
{
- USHORT nIndex;
+ sal_uInt16 nIndex;
if (pColl->SearchName( pUndoData->GetName(), nIndex ))
{
ScDBData* pDocData = (*pColl)[nIndex];
@@ -1917,7 +1917,7 @@ void ScUndoConsolidate::Redo()
{
BeginRedo();
- pDocShell->DoConsolidate( aParam, FALSE );
+ pDocShell->DoConsolidate( aParam, false );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
@@ -1934,9 +1934,9 @@ void ScUndoConsolidate::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoConsolidate::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1952,8 +1952,8 @@ void ScUndoChartData::Init()
}
ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
- const ScRange& rNew, BOOL bColHdr, BOOL bRowHdr,
- BOOL bAdd ) :
+ const ScRange& rNew, sal_Bool bColHdr, sal_Bool bRowHdr,
+ sal_Bool bAdd ) :
ScSimpleUndo( pNewDocShell ),
aChartName( rName ),
bNewColHeaders( bColHdr ),
@@ -1967,8 +1967,8 @@ ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
}
ScUndoChartData::ScUndoChartData( ScDocShell* pNewDocShell, const String& rName,
- const ScRangeListRef& rNew, BOOL bColHdr, BOOL bRowHdr,
- BOOL bAdd ) :
+ const ScRangeListRef& rNew, sal_Bool bColHdr, sal_Bool bRowHdr,
+ sal_Bool bAdd ) :
ScSimpleUndo( pNewDocShell ),
aChartName( rName ),
aNewRangeListRef( rNew ),
@@ -1993,7 +1993,7 @@ void ScUndoChartData::Undo()
BeginUndo();
pDocShell->GetDocument()->UpdateChartArea( aChartName, aOldRangeListRef,
- bOldColHeaders, bOldRowHeaders, FALSE );
+ bOldColHeaders, bOldRowHeaders, false );
EndUndo();
}
@@ -2012,9 +2012,9 @@ void ScUndoChartData::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoChartData::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// Amelia Wang
@@ -2023,10 +2023,10 @@ ScUndoDataForm::ScUndoDataForm( ScDocShell* pNewDocShell,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ,
const ScMarkData& rMark,
ScDocument* pNewUndoDoc, ScDocument* pNewRedoDoc,
- USHORT nNewFlags,
+ sal_uInt16 nNewFlags,
ScRefUndoData* pRefData,
void* /*pFill1*/, void* /*pFill2*/, void* /*pFill3*/,
- BOOL bRedoIsFilled ) :
+ sal_Bool bRedoIsFilled ) :
ScBlockUndo( pNewDocShell, ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ), SC_UNDO_SIMPLE ),
aMarkData( rMark ),
pUndoDoc( pNewUndoDoc ),
@@ -2076,7 +2076,7 @@ void ScUndoDataForm::SetChangeTrack()
void ScUndoDataForm::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( true );
ShowTable( aBlockRange );
EndUndo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
@@ -2086,9 +2086,9 @@ void ScUndoDataForm::Redo()
{
BeginRedo();
ScDocument* pDoc = pDocShell->GetDocument();
- EnableDrawAdjust( pDoc, FALSE ); //! include in ScBlockUndo?
- DoChange( FALSE );
- EnableDrawAdjust( pDoc, TRUE ); //! include in ScBlockUndo?
+ EnableDrawAdjust( pDoc, false ); //! include in ScBlockUndo?
+ DoChange( false );
+ EnableDrawAdjust( pDoc, true ); //! include in ScBlockUndo?
EndRedo();
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_AREALINKS_CHANGED ) );
}
@@ -2097,31 +2097,31 @@ void ScUndoDataForm::Repeat(SfxRepeatTarget& /*rTarget*/)
{
}
-BOOL ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDataForm::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
-void ScUndoDataForm::DoChange( const BOOL bUndo )
+void ScUndoDataForm::DoChange( const sal_Bool bUndo )
{
ScDocument* pDoc = pDocShell->GetDocument();
// RefUndoData for redo is created before first undo
// (with DeleteUnchanged after the DoUndo call)
- BOOL bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
+ sal_Bool bCreateRedoData = ( bUndo && pRefUndoData && !pRefRedoData );
if ( bCreateRedoData )
pRefRedoData = new ScRefUndoData( pDoc );
ScRefUndoData* pWorkRefData = bUndo ? pRefUndoData : pRefRedoData;
// fuer Undo immer alle oder keine Inhalte sichern
- USHORT nUndoFlags = IDF_NONE;
+ sal_uInt16 nUndoFlags = IDF_NONE;
if (nFlags & IDF_CONTENTS)
nUndoFlags |= IDF_CONTENTS;
if (nFlags & IDF_ATTRIB)
nUndoFlags |= IDF_ATTRIB;
- BOOL bPaintAll = FALSE;
+ sal_Bool bPaintAll = false;
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -2130,8 +2130,8 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
{
if (!pRedoDoc)
{
- BOOL bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
- BOOL bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
+ sal_Bool bColInfo = ( aBlockRange.aStart.Row()==0 && aBlockRange.aEnd.Row()==MAXROW );
+ sal_Bool bRowInfo = ( aBlockRange.aStart.Col()==0 && aBlockRange.aEnd.Col()==MAXCOL );
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
pRedoDoc->InitUndoSelected( pDoc, aMarkData, bColInfo, bRowInfo );
@@ -2141,11 +2141,11 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
ScRange aCopyRange = aBlockRange;
aCopyRange.aStart.SetTab(0);
aCopyRange.aEnd.SetTab(nTabCount-1);
- pDoc->CopyToDocument( aCopyRange, 1, FALSE, pRedoDoc );
- bRedoFilled = TRUE;
+ pDoc->CopyToDocument( aCopyRange, 1, false, pRedoDoc );
+ bRedoFilled = true;
}
- USHORT nExtFlags = 0;
+ sal_uInt16 nExtFlags = 0;
pDocShell->UpdatePaintExt( nExtFlags, aBlockRange );
for ( sal_uInt16 i=0; i <= ( aBlockRange.aEnd.Col() - aBlockRange.aStart.Col() ); i++ )
@@ -2157,9 +2157,9 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
if (pWorkRefData)
{
- pWorkRefData->DoUndo( pDoc, TRUE ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
+ pWorkRefData->DoUndo( pDoc, true ); // TRUE = bSetChartRangeLists for SetChartListenerCollection
if ( pDoc->RefreshAutoFilter( 0,0, MAXCOL,MAXROW, aBlockRange.aStart.Tab() ) )
- bPaintAll = TRUE;
+ bPaintAll = true;
}
if ( bCreateRedoData && pRefRedoData )
@@ -2175,8 +2175,8 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
SetChangeTrack();
ScRange aDrawRange( aBlockRange );
- pDoc->ExtendMerge( aDrawRange, TRUE ); // only needed for single sheet (text/rtf etc.)
- USHORT nPaint = PAINT_GRID;
+ pDoc->ExtendMerge( aDrawRange, true ); // only needed for single sheet (text/rtf etc.)
+ sal_uInt16 nPaint = PAINT_GRID;
if (bPaintAll)
{
aDrawRange.aStart.SetCol(0);
@@ -2185,7 +2185,7 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
aDrawRange.aEnd.SetRow(MAXROW);
nPaint |= PAINT_TOP | PAINT_LEFT;
/*A*/ if (pViewShell)
- pViewShell->AdjustBlockHeight(FALSE);
+ pViewShell->AdjustBlockHeight(false);
}
else
{
@@ -2199,7 +2199,7 @@ void ScUndoDataForm::DoChange( const BOOL bUndo )
nPaint |= PAINT_LEFT;
aDrawRange.aEnd.SetRow(MAXROW);
}
-/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(FALSE))
+/*A*/ if ((pViewShell) && pViewShell->AdjustBlockHeight(false))
{
aDrawRange.aStart.SetCol(0);
aDrawRange.aStart.SetRow(0);
diff --git a/sc/source/ui/undo/undodraw.cxx b/sc/source/ui/undo/undodraw.cxx
index cfc83b6592ac..8a263080ae1d 100644
--- a/sc/source/ui/undo/undodraw.cxx
+++ b/sc/source/ui/undo/undodraw.cxx
@@ -131,7 +131,7 @@ String ScUndoDraw::GetRepeatComment(SfxRepeatTarget& rTarget) const
return String();
}
-USHORT ScUndoDraw::GetId() const
+sal_uInt16 ScUndoDraw::GetId() const
{
if (pDrawUndo)
return pDrawUndo->GetId();
@@ -139,26 +139,26 @@ USHORT ScUndoDraw::GetId() const
return 0;
}
-BOOL ScUndoDraw::IsLinked()
+sal_Bool ScUndoDraw::IsLinked()
{
if (pDrawUndo)
return pDrawUndo->IsLinked();
else
- return FALSE;
+ return false;
}
-void ScUndoDraw::SetLinked( BOOL bIsLinked )
+void ScUndoDraw::SetLinked( sal_Bool bIsLinked )
{
if (pDrawUndo)
pDrawUndo->SetLinked(bIsLinked);
}
-BOOL ScUndoDraw::Merge( SfxUndoAction* pNextAction )
+sal_Bool ScUndoDraw::Merge( SfxUndoAction* pNextAction )
{
if (pDrawUndo)
return pDrawUndo->Merge(pNextAction);
else
- return FALSE;
+ return false;
}
void ScUndoDraw::Undo()
@@ -185,12 +185,12 @@ void ScUndoDraw::Repeat(SfxRepeatTarget& rTarget)
pDrawUndo->Repeat(rTarget);
}
-BOOL ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDraw::CanRepeat(SfxRepeatTarget& rTarget) const
{
if (pDrawUndo)
return pDrawUndo->CanRepeat(rTarget);
else
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undoolk.cxx b/sc/source/ui/undo/undoolk.cxx
index 31c96cb0b061..843c275ef0cb 100644
--- a/sc/source/ui/undo/undoolk.cxx
+++ b/sc/source/ui/undo/undoolk.cxx
@@ -92,7 +92,7 @@ void DeleteSdrUndoAction( SdrUndoAction* pUndoAction )
delete pUndoAction;
}
-void EnableDrawAdjust( ScDocument* pDoc, BOOL bEnable )
+void EnableDrawAdjust( ScDocument* pDoc, sal_Bool bEnable )
{
ScDrawLayer* pLayer = pDoc->GetDrawLayer();
if (pLayer)
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index 25b6c2ed696d..d384bc8b91d3 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -84,9 +84,9 @@ void ScUndoAllRangeNames::Repeat(SfxRepeatTarget& /*rTarget*/)
{
}
-BOOL ScUndoAllRangeNames::CanRepeat(SfxRepeatTarget& /*rTarget*/) const
+sal_Bool ScUndoAllRangeNames::CanRepeat(SfxRepeatTarget& /*rTarget*/) const
{
- return false;
+ return sal_False;
}
String ScUndoAllRangeNames::GetComment() const
diff --git a/sc/source/ui/undo/undostyl.cxx b/sc/source/ui/undo/undostyl.cxx
index 619736f8f188..f8286ed4b264 100644
--- a/sc/source/ui/undo/undostyl.cxx
+++ b/sc/source/ui/undo/undostyl.cxx
@@ -119,13 +119,13 @@ ScUndoModifyStyle::~ScUndoModifyStyle()
String ScUndoModifyStyle::GetComment() const
{
- USHORT nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
+ sal_uInt16 nId = (eFamily == SFX_STYLE_FAMILY_PARA) ?
STR_UNDO_EDITCELLSTYLE :
STR_UNDO_EDITPAGESTYLE;
return ScGlobal::GetRscString( nId );
}
-void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, BOOL bRemoved )
+void lcl_DocStyleChanged( ScDocument* pDoc, SfxStyleSheetBase* pStyle, sal_Bool bRemoved )
{
//! move to document or docshell
@@ -147,8 +147,8 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
ScDocument* pDoc = pDocSh->GetDocument();
ScStyleSheetPool* pStlPool = pDoc->GetStyleSheetPool();
String aNewName = rData.GetName();
- BOOL bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style
- BOOL bNew = ( rName.Len() == 0 && !bDelete ); // creating new style
+ sal_Bool bDelete = ( aNewName.Len() == 0 ); // no new name -> delete style
+ sal_Bool bNew = ( rName.Len() == 0 && !bDelete ); // creating new style
SfxStyleSheetBase* pStyle = NULL;
if ( rName.Len() )
@@ -177,7 +177,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
if ( bDelete )
{
if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
- lcl_DocStyleChanged( pDoc, pStyle, TRUE ); // TRUE: remove usage of style
+ lcl_DocStyleChanged( pDoc, pStyle, sal_True ); // TRUE: remove usage of style
else
pDoc->RemovePageStyleInUse( rName );
@@ -196,11 +196,11 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
const SfxItemSet* pNewSet = rData.GetItems();
DBG_ASSERT( pNewSet, "no ItemSet for style" );
if (pNewSet)
- rStyleSet.Set( *pNewSet, FALSE );
+ rStyleSet.Set( *pNewSet, false );
if ( eStyleFamily == SFX_STYLE_FAMILY_PARA )
{
- lcl_DocStyleChanged( pDoc, pStyle, FALSE ); // cell styles: row heights
+ lcl_DocStyleChanged( pDoc, pStyle, false ); // cell styles: row heights
}
else
{
@@ -212,7 +212,7 @@ void ScUndoModifyStyle::DoChange( ScDocShell* pDocSh, const String& rName,
if (pNewSet)
pDoc->ModifyStyleSheet( *pStyle, *pNewSet );
- pDocSh->PageStyleModified( aNewName, TRUE );
+ pDocSh->PageStyleModified( aNewName, sal_True );
}
}
}
@@ -241,9 +241,9 @@ void ScUndoModifyStyle::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoModifyStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // no repeat possible
+ return false; // no repeat possible
}
// -----------------------------------------------------------------------
@@ -303,9 +303,9 @@ void ScUndoApplyPageStyle::Repeat(SfxRepeatTarget& /* rTarget */)
//! set same page style to current tab
}
-BOOL ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoApplyPageStyle::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
diff --git a/sc/source/ui/undo/undotab.cxx b/sc/source/ui/undo/undotab.cxx
index 0af08d48593c..97f2549711e1 100644
--- a/sc/source/ui/undo/undotab.cxx
+++ b/sc/source/ui/undo/undotab.cxx
@@ -59,7 +59,7 @@
#include <vector>
-extern BOOL bDrawIsInUndo; //! irgendwo als Member !!!
+extern sal_Bool bDrawIsInUndo; //! irgendwo als Member !!!
using namespace com::sun::star;
using ::com::sun::star::uno::Sequence;
@@ -94,7 +94,7 @@ TYPEINIT1(ScUndoTabColor, SfxUndoAction);
ScUndoInsertTab::ScUndoInsertTab( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,
+ sal_Bool bApp,
const String& rNewName) :
ScSimpleUndo( pNewDocShell ),
sNewName( rNewName ),
@@ -137,11 +137,11 @@ void ScUndoInsertTab::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
pViewShell->SetTabNo(nTab);
- pDocShell->SetInUndo( TRUE ); //! BeginUndo
- bDrawIsInUndo = TRUE;
- pViewShell->DeleteTable( nTab, FALSE );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndUndo
+ pDocShell->SetInUndo( sal_True ); //! BeginUndo
+ bDrawIsInUndo = sal_True;
+ pViewShell->DeleteTable( nTab, false );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndUndo
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
@@ -149,7 +149,7 @@ void ScUndoInsertTab::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nEndChangeAction, nEndChangeAction );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -159,17 +159,17 @@ void ScUndoInsertTab::Redo()
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
if (bAppend)
- pViewShell->AppendTable( sNewName, FALSE );
+ pViewShell->AppendTable( sNewName, false );
else
{
pViewShell->SetTabNo(nTab);
- pViewShell->InsertTable( sNewName, nTab, FALSE );
+ pViewShell->InsertTable( sNewName, nTab, false );
}
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndRedo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndRedo
SetChangeTrack();
}
@@ -181,7 +181,7 @@ void ScUndoInsertTab::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -193,7 +193,7 @@ BOOL ScUndoInsertTab::CanRepeat(SfxRepeatTarget& rTarget) const
ScUndoInsertTables::ScUndoInsertTables( ScDocShell* pNewDocShell,
SCTAB nTabNum,
- BOOL bApp,SvStrings *pNewNameList) :
+ sal_Bool bApp,SvStrings *pNewNameList) :
ScSimpleUndo( pNewDocShell ),
pDrawUndo( NULL ),
nTab( nTabNum ),
@@ -212,7 +212,7 @@ ScUndoInsertTables::~ScUndoInsertTables()
{
for(int i=0;i<pNameList->Count();i++)
{
- pStr=pNameList->GetObject(sal::static_int_cast<USHORT>(i));
+ pStr=pNameList->GetObject(sal::static_int_cast<sal_uInt16>(i));
delete pStr;
}
pNameList->Remove(0,pNameList->Count());
@@ -251,19 +251,19 @@ void ScUndoInsertTables::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
pViewShell->SetTabNo(nTab);
- pDocShell->SetInUndo( TRUE ); //! BeginUndo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginUndo
+ bDrawIsInUndo = sal_True;
vector<SCTAB> TheTabs;
for(int i=0; i<pNameList->Count(); ++i)
{
TheTabs.push_back(nTab+i);
}
- pViewShell->DeleteTables( TheTabs, FALSE );
+ pViewShell->DeleteTables( TheTabs, false );
TheTabs.clear();
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndUndo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndUndo
DoSdrUndoAction( pDrawUndo, pDocShell->GetDocument() );
@@ -271,7 +271,7 @@ void ScUndoInsertTables::Undo()
if ( pChangeTrack )
pChangeTrack->Undo( nStartChangeAction, nEndChangeAction );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -281,13 +281,13 @@ void ScUndoInsertTables::Redo()
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
pViewShell->SetTabNo(nTab);
- pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),FALSE );
+ pViewShell->InsertTables( pNameList, nTab, static_cast<SCTAB>(pNameList->Count()),false );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE ); //! EndRedo
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false ); //! EndRedo
SetChangeTrack();
}
@@ -299,7 +299,7 @@ void ScUndoInsertTables::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoInsertTables::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -333,7 +333,7 @@ void ScUndoDeleteTab::SetChangeTrack()
ScChangeTrack* pChangeTrack = pDocShell->GetDocument()->GetChangeTrack();
if ( pChangeTrack )
{
- ULONG nTmpChangeAction;
+ sal_uLong nTmpChangeAction;
nStartChangeAction = pChangeTrack->GetActionMax() + 1;
nEndChangeAction = 0;
ScRange aRange( 0, 0, 0, MAXCOL, MAXROW, 0 );
@@ -363,7 +363,7 @@ void ScUndoDeleteTab::Undo()
unsigned int i=0;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bLink = FALSE;
+ sal_Bool bLink = false;
String aName;
for(i=0; i<theTabs.size(); ++i)
@@ -371,33 +371,33 @@ void ScUndoDeleteTab::Undo()
SCTAB nTab = theTabs[i];
pRefUndoDoc->GetName( nTab, aName );
- bDrawIsInUndo = TRUE;
- BOOL bOk = pDoc->InsertTab( nTab, aName );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = sal_True;
+ sal_Bool bOk = pDoc->InsertTab( nTab, aName );
+ bDrawIsInUndo = false;
if (bOk)
{
- pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,FALSE, pDoc );
+ pRefUndoDoc->CopyToDocument(0,0,nTab, MAXCOL,MAXROW,nTab, IDF_ALL,false, pDoc );
String aOldName;
pRefUndoDoc->GetName( nTab, aOldName );
- pDoc->RenameTab( nTab, aOldName, FALSE );
+ pDoc->RenameTab( nTab, aOldName, false );
if (pRefUndoDoc->IsLinked(nTab))
{
pDoc->SetLink( nTab, pRefUndoDoc->GetLinkMode(nTab), pRefUndoDoc->GetLinkDoc(nTab),
pRefUndoDoc->GetLinkFlt(nTab), pRefUndoDoc->GetLinkOpt(nTab),
pRefUndoDoc->GetLinkTab(nTab), pRefUndoDoc->GetLinkRefreshDelay(nTab) );
- bLink = TRUE;
+ bLink = sal_True;
}
if ( pRefUndoDoc->IsScenario(nTab) )
{
- pDoc->SetScenario( nTab, TRUE );
+ pDoc->SetScenario( nTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pRefUndoDoc->GetScenarioData( nTab, aComment, aColor, nScenFlags );
pDoc->SetScenarioData( nTab, aComment, aColor, nScenFlags );
- BOOL bActive = pRefUndoDoc->IsActiveScenario( nTab );
+ sal_Bool bActive = pRefUndoDoc->IsActiveScenario( nTab );
pDoc->SetActiveScenario( nTab, bActive );
}
pDoc->SetVisible( nTab, pRefUndoDoc->IsVisible( nTab ) );
@@ -430,28 +430,28 @@ void ScUndoDeleteTab::Undo()
pDocShell->PostPaint(0,0,0, MAXCOL,MAXROW,MAXTAB, PAINT_ALL ); // incl. Extras
- // nicht ShowTable wegen SetTabNo(..., TRUE):
+ // nicht ShowTable wegen SetTabNo(..., sal_True):
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), TRUE );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDoc, theTabs[0] ), true );
}
void ScUndoDeleteTab::Redo()
{
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs[0] ) );
+ pViewShell->SetTabNo( lcl_GetVisibleTabBefore( *pDocShell->GetDocument(), theTabs.front() ) );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE ); //! BeginRedo
- bDrawIsInUndo = TRUE;
- pViewShell->DeleteTables( theTabs, FALSE );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( TRUE ); //! EndRedo
+ pDocShell->SetInUndo( sal_True ); //! BeginRedo
+ bDrawIsInUndo = sal_True;
+ pViewShell->DeleteTables( theTabs, false );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( sal_True ); //! EndRedo
SetChangeTrack();
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
@@ -460,11 +460,11 @@ void ScUndoDeleteTab::Repeat(SfxRepeatTarget& rTarget)
if (rTarget.ISA(ScTabViewTarget))
{
ScTabViewShell* pViewShell = ((ScTabViewTarget&)rTarget).GetViewShell();
- pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), TRUE );
+ pViewShell->DeleteTable( pViewShell->GetViewData()->GetTabNo(), sal_True );
}
}
-BOOL ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoDeleteTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -527,9 +527,9 @@ void ScUndoRenameTab::Repeat(SfxRepeatTarget& /* rTarget */)
// Repeat macht keinen Sinn
}
-BOOL ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRenameTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -563,7 +563,7 @@ String ScUndoMoveTab::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_MOVE_TAB );
}
-void ScUndoMoveTab::DoChange( BOOL bUndo ) const
+void ScUndoMoveTab::DoChange( sal_Bool bUndo ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
@@ -579,7 +579,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
pDoc->MoveTab( nDestTab, nOldTab );
pViewShell->GetViewData()->MoveTab( nDestTab, nOldTab );
- pViewShell->SetTabNo( nOldTab, TRUE );
+ pViewShell->SetTabNo( nOldTab, true );
if (mpOldNames)
{
const OUString& rOldName = (*mpOldNames)[i-1];
@@ -599,7 +599,7 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
pDoc->MoveTab( nOldTab, nNewTab );
pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
- pViewShell->SetTabNo( nDestTab, TRUE );
+ pViewShell->SetTabNo( nDestTab, true );
if (mpNewNames)
{
const OUString& rNewName = (*mpNewNames)[i];
@@ -617,28 +617,28 @@ void ScUndoMoveTab::DoChange( BOOL bUndo ) const
void ScUndoMoveTab::Undo()
{
- DoChange( TRUE );
+ DoChange( sal_True );
}
void ScUndoMoveTab::Redo()
{
- DoChange( FALSE );
+ DoChange( false );
}
void ScUndoMoveTab::Repeat(SfxRepeatTarget& /* rTarget */)
{
- // kein Repeat ! ? !
+ // No Repeat ! ? !
}
-BOOL ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoMoveTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//----------------------------------------------------------------------------------
//
-// Tabelle kopieren
+// Copy table
//
ScUndoCopyTab::ScUndoCopyTab(
@@ -673,7 +673,7 @@ void ScUndoCopyTab::DoChange() const
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo((*mpOldTabs)[0],TRUE);
+ pViewShell->SetTabNo((*mpOldTabs)[0],true);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) ); // Navigator
@@ -695,9 +695,9 @@ void ScUndoCopyTab::Undo()
if (nDestTab > MAXTAB) // append?
nDestTab = pDoc->GetTableCount() - 1;
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->DeleteTab(nDestTab);
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
}
// ScTablesHint broadcasts after all sheets have been deleted,
@@ -729,9 +729,9 @@ void ScUndoCopyTab::Redo()
if (nDestTab > MAXTAB) // angehaengt ?
nDestTab = pDoc->GetTableCount() - 1;
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->CopyTab( nOldTab, nNewTab );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
pViewShell->GetViewData()->MoveTab( nOldTab, nNewTab );
@@ -741,15 +741,15 @@ void ScUndoCopyTab::Redo()
if ( pDoc->IsScenario(nAdjSource) )
{
- pDoc->SetScenario(nNewTab, TRUE );
+ pDoc->SetScenario(nNewTab, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nAdjSource, aComment, aColor, nScenFlags );
pDoc->SetScenarioData(nNewTab, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario(nAdjSource);
+ sal_Bool bActive = pDoc->IsActiveScenario(nAdjSource);
pDoc->SetActiveScenario(nNewTab, bActive );
- BOOL bVisible=pDoc->IsVisible(nAdjSource);
+ sal_Bool bVisible=pDoc->IsVisible(nAdjSource);
pDoc->SetVisible(nNewTab,bVisible );
}
@@ -765,7 +765,7 @@ void ScUndoCopyTab::Redo()
RedoSdrUndoAction( pDrawUndo ); // after the sheets are inserted
- pViewShell->SetTabNo( nDestTab, TRUE ); // after draw-undo
+ pViewShell->SetTabNo( nDestTab, sal_True ); // after draw-undo
DoChange();
@@ -776,9 +776,9 @@ void ScUndoCopyTab::Repeat(SfxRepeatTarget& /* rTarget */)
// kein Repeat ! ? !
}
-BOOL ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoCopyTab::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
//---------------------------------------------------------------------------------
@@ -849,9 +849,9 @@ void ScUndoTabColor::Repeat(SfxRepeatTarget& /* rTarget */)
// No Repeat
}
-BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -862,7 +862,7 @@ BOOL ScUndoTabColor::CanRepeat(SfxRepeatTarget& /* rTarget */) const
ScUndoMakeScenario::ScUndoMakeScenario( ScDocShell* pNewDocShell,
SCTAB nSrc, SCTAB nDest,
const String& rN, const String& rC,
- const Color& rCol, USHORT nF,
+ const Color& rCol, sal_uInt16 nF,
const ScMarkData& rMark ) :
ScSimpleUndo( pNewDocShell ),
nSrcTab( nSrc ),
@@ -891,11 +891,11 @@ void ScUndoMakeScenario::Undo()
{
ScDocument* pDoc = pDocShell->GetDocument();
- pDocShell->SetInUndo( TRUE );
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True );
+ bDrawIsInUndo = sal_True;
pDoc->DeleteTab( nDestTab );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false );
DoSdrUndoAction( pDrawUndo, pDoc );
@@ -904,32 +904,31 @@ void ScUndoMakeScenario::Undo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( nSrcTab, TRUE );
+ pViewShell->SetTabNo( nSrcTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
- // SetTabNo(...,TRUE) for all views to sync with drawing layer pages
+ // SetTabNo(...,sal_True) for all views to sync with drawing layer pages
pDocShell->Broadcast( SfxSimpleHint( SC_HINT_FORCESETTAB ) );
}
void ScUndoMakeScenario::Redo()
{
- ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
- if (pViewShell)
- pViewShell->SetMarkData( aMarkData );
+ SetViewMarkData( aMarkData );
RedoSdrUndoAction( pDrawUndo ); // Draw Redo first
- pDocShell->SetInUndo( TRUE );
- bDrawIsInUndo = TRUE;
+ pDocShell->SetInUndo( sal_True );
+ bDrawIsInUndo = sal_True;
- pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, FALSE );
+ pDocShell->MakeScenario( nSrcTab, aName, aComment, aColor, nFlags, aMarkData, false );
- bDrawIsInUndo = FALSE;
- pDocShell->SetInUndo( FALSE );
+ bDrawIsInUndo = false;
+ pDocShell->SetInUndo( false );
+ ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo( nDestTab, TRUE );
+ pViewShell->SetTabNo( nDestTab, sal_True );
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
}
@@ -942,7 +941,7 @@ void ScUndoMakeScenario::Repeat(SfxRepeatTarget& rTarget)
}
}
-BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -954,7 +953,7 @@ BOOL ScUndoMakeScenario::CanRepeat(SfxRepeatTarget& rTarget) const
//
ScUndoImportTab::ScUndoImportTab( ScDocShell* pShell,
- SCTAB nNewTab, SCTAB nNewCount, BOOL bNewLink ) :
+ SCTAB nNewTab, SCTAB nNewCount, sal_Bool bNewLink ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
nCount( nNewCount ),
@@ -985,11 +984,11 @@ void ScUndoImportTab::DoChange() const
{
if(nTab<nTabCount)
{
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
}
else
{
- pViewShell->SetTabNo(nTab-1,TRUE);
+ pViewShell->SetTabNo(nTab-1,sal_True);
}
}
@@ -1004,32 +1003,32 @@ void ScUndoImportTab::Undo()
SCTAB i;
ScDocument* pDoc = pDocShell->GetDocument();
- BOOL bMakeRedo = !pRedoDoc;
+ sal_Bool bMakeRedo = !pRedoDoc;
if (bMakeRedo)
{
pRedoDoc = new ScDocument( SCDOCMODE_UNDO );
- pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, TRUE,TRUE );
+ pRedoDoc->InitUndo( pDoc, nTab,nTab+nCount-1, sal_True,sal_True );
String aOldName;
for (i=0; i<nCount; i++)
{
SCTAB nTabPos=nTab+i;
- pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pRedoDoc );
+ pDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pRedoDoc );
pDoc->GetName( nTabPos, aOldName );
- pRedoDoc->RenameTab( nTabPos, aOldName, FALSE );
+ pRedoDoc->RenameTab( nTabPos, aOldName, false );
if ( pDoc->IsScenario(nTabPos) )
{
- pRedoDoc->SetScenario(nTabPos, TRUE );
+ pRedoDoc->SetScenario(nTabPos, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
pRedoDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
- BOOL bActive = pDoc->IsActiveScenario(nTabPos);
+ sal_Bool bActive = pDoc->IsActiveScenario(nTabPos);
pRedoDoc->SetActiveScenario(nTabPos, bActive );
- BOOL bVisible=pDoc->IsVisible(nTabPos);
+ sal_Bool bVisible=pDoc->IsVisible(nTabPos);
pRedoDoc->SetVisible(nTabPos,bVisible );
}
@@ -1041,10 +1040,10 @@ void ScUndoImportTab::Undo()
DoSdrUndoAction( pDrawUndo, pDoc ); // before the sheets are deleted
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
for (i=0; i<nCount; i++)
pDoc->DeleteTab( nTab );
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
DoChange();
}
@@ -1064,26 +1063,26 @@ void ScUndoImportTab::Redo()
{
SCTAB nTabPos=nTab+i;
pRedoDoc->GetName(nTabPos,aName);
- bDrawIsInUndo = TRUE;
+ bDrawIsInUndo = sal_True;
pDoc->InsertTab(nTabPos,aName);
- bDrawIsInUndo = FALSE;
+ bDrawIsInUndo = false;
}
for (i=0; i<nCount; i++) // then copy into inserted sheets
{
SCTAB nTabPos=nTab+i;
- pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,FALSE, pDoc );
+ pRedoDoc->CopyToDocument(0,0,nTabPos, MAXCOL,MAXROW,nTabPos, IDF_ALL,false, pDoc );
if ( pRedoDoc->IsScenario(nTabPos) )
{
- pDoc->SetScenario(nTabPos, TRUE );
+ pDoc->SetScenario(nTabPos, sal_True );
String aComment;
Color aColor;
- USHORT nScenFlags;
+ sal_uInt16 nScenFlags;
pRedoDoc->GetScenarioData(nTabPos, aComment, aColor, nScenFlags );
pDoc->SetScenarioData(nTabPos, aComment, aColor, nScenFlags );
- BOOL bActive = pRedoDoc->IsActiveScenario(nTabPos);
+ sal_Bool bActive = pRedoDoc->IsActiveScenario(nTabPos);
pDoc->SetActiveScenario(nTabPos, bActive );
- BOOL bVisible=pRedoDoc->IsVisible(nTabPos);
+ sal_Bool bVisible=pRedoDoc->IsVisible(nTabPos);
pDoc->SetVisible(nTabPos,bVisible );
}
@@ -1103,7 +1102,7 @@ void ScUndoImportTab::Repeat(SfxRepeatTarget& rTarget)
Execute(FID_INS_TABLE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoImportTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
@@ -1122,12 +1121,12 @@ ScUndoRemoveLink::ScUndoRemoveLink( ScDocShell* pShell, const String& rDoc ) :
ScDocument* pDoc = pDocShell->GetDocument();
SCTAB nTabCount = pDoc->GetTableCount();
pTabs = new SCTAB[nTabCount];
- pModes = new BYTE[nTabCount];
+ pModes = new sal_uInt8[nTabCount];
pTabNames = new String[nTabCount];
for (SCTAB i=0; i<nTabCount; i++)
{
- BYTE nMode = pDoc->GetLinkMode(i);
+ sal_uInt8 nMode = pDoc->GetLinkMode(i);
if (nMode)
if (pDoc->GetLinkDoc(i) == aDocName)
{
@@ -1163,11 +1162,11 @@ String ScUndoRemoveLink::GetComment() const
return ScGlobal::GetRscString( STR_UNDO_REMOVELINK );
}
-void ScUndoRemoveLink::DoChange( BOOL bLink ) const
+void ScUndoRemoveLink::DoChange( sal_Bool bLink ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
String aEmpty;
- for (USHORT i=0; i<nCount; i++)
+ for (sal_uInt16 i=0; i<nCount; i++)
if (bLink) // establish link
pDoc->SetLink( pTabs[i], pModes[i], aDocName, aFltName, aOptions, pTabNames[i], nRefreshDelay );
else // remove link
@@ -1177,12 +1176,12 @@ void ScUndoRemoveLink::DoChange( BOOL bLink ) const
void ScUndoRemoveLink::Undo()
{
- DoChange( TRUE );
+ DoChange( sal_True );
}
void ScUndoRemoveLink::Redo()
{
- DoChange( FALSE );
+ DoChange( false );
}
void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */)
@@ -1190,9 +1189,9 @@ void ScUndoRemoveLink::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1201,7 +1200,7 @@ BOOL ScUndoRemoveLink::CanRepeat(SfxRepeatTarget& /* rTarget */) const
// Tabellen ein-/ausblenden
//
-ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewShow ) :
+ScUndoShowHideTab::ScUndoShowHideTab( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewShow ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
bShow( bNewShow )
@@ -1212,14 +1211,14 @@ ScUndoShowHideTab::~ScUndoShowHideTab()
{
}
-void ScUndoShowHideTab::DoChange( BOOL bShowP ) const
+void ScUndoShowHideTab::DoChange( sal_Bool bShowP ) const
{
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->SetVisible( nTab, bShowP );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
SFX_APP()->Broadcast( SfxSimpleHint( SC_HINT_TABLES_CHANGED ) );
pDocShell->SetDocumentModified();
@@ -1243,14 +1242,14 @@ void ScUndoShowHideTab::Repeat(SfxRepeatTarget& rTarget)
SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoShowHideTab::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
String ScUndoShowHideTab::GetComment() const
{
- USHORT nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
+ sal_uInt16 nId = bShow ? STR_UNDO_SHOWTAB : STR_UNDO_HIDETAB;
return ScGlobal::GetRscString( nId );
}
@@ -1287,7 +1286,7 @@ void ScUndoDocProtect::DoProtect(bool bProtect)
if (pViewShell)
{
pViewShell->UpdateLayerLocks();
- pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann
+ pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann
}
pDocShell->PostPaintGridAll();
@@ -1312,14 +1311,14 @@ void ScUndoDocProtect::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoDocProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoDocProtect::GetComment() const
{
- USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
+ sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_DOC : STR_UNDO_UNPROTECT_DOC;
return ScGlobal::GetRscString( nId );
}
@@ -1357,7 +1356,7 @@ void ScUndoTabProtect::DoProtect(bool bProtect)
if (pViewShell)
{
pViewShell->UpdateLayerLocks();
- pViewShell->UpdateInputHandler(TRUE); // damit sofort wieder eingegeben werden kann
+ pViewShell->UpdateInputHandler(sal_True); // damit sofort wieder eingegeben werden kann
}
pDocShell->PostPaintGridAll();
@@ -1382,14 +1381,14 @@ void ScUndoTabProtect::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoTabProtect::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoTabProtect::GetComment() const
{
- USHORT nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
+ sal_uInt16 nId = mpProtectSettings->isProtected() ? STR_UNDO_PROTECT_TAB : STR_UNDO_UNPROTECT_TAB;
return ScGlobal::GetRscString( nId );
}
@@ -1413,7 +1412,7 @@ ScUndoPrintRange::~ScUndoPrintRange()
delete pNewRanges;
}
-void ScUndoPrintRange::DoChange(BOOL bUndo)
+void ScUndoPrintRange::DoChange(sal_Bool bUndo)
{
ScDocument* pDoc = pDocShell->GetDocument();
if (bUndo)
@@ -1433,14 +1432,14 @@ void ScUndoPrintRange::DoChange(BOOL bUndo)
void ScUndoPrintRange::Undo()
{
BeginUndo();
- DoChange( TRUE );
+ DoChange( sal_True );
EndUndo();
}
void ScUndoPrintRange::Redo()
{
BeginRedo();
- DoChange( FALSE );
+ DoChange( false );
EndRedo();
}
@@ -1449,9 +1448,9 @@ void ScUndoPrintRange::Repeat(SfxRepeatTarget& /* rTarget */)
// gippsnich
}
-BOOL ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoPrintRange::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE; // gippsnich
+ return false; // gippsnich
}
String ScUndoPrintRange::GetComment() const
@@ -1469,7 +1468,7 @@ String ScUndoPrintRange::GetComment() const
ScUndoScenarioFlags::ScUndoScenarioFlags( ScDocShell* pNewDocShell, SCTAB nT,
const String& rON, const String& rNN, const String& rOC, const String& rNC,
- const Color& rOCol, const Color& rNCol, USHORT nOF, USHORT nNF ) :
+ const Color& rOCol, const Color& rNCol, sal_uInt16 nOF, sal_uInt16 nNF ) :
ScSimpleUndo( pNewDocShell ),
nTab ( nT ),
aOldName ( rON ),
@@ -1531,9 +1530,9 @@ void ScUndoScenarioFlags::Repeat(SfxRepeatTarget& /* rTarget */)
// Repeat macht keinen Sinn
}
-BOOL ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoScenarioFlags::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
@@ -1568,8 +1567,8 @@ SdrObject* ScUndoRenameObject::GetObject()
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if ( pDrawLayer )
{
- USHORT nCount = pDrawLayer->GetPageCount();
- for (USHORT nTab=0; nTab<nCount; nTab++)
+ sal_uInt16 nCount = pDrawLayer->GetPageCount();
+ for (sal_uInt16 nTab=0; nTab<nCount; nTab++)
{
SdrPage* pPage = pDrawLayer->GetPage(nTab);
DBG_ASSERT(pPage,"Page ?");
@@ -1614,9 +1613,9 @@ void ScUndoRenameObject::Repeat(SfxRepeatTarget& /* rTarget */)
{
}
-BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
+sal_Bool ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
{
- return FALSE;
+ return false;
}
// -----------------------------------------------------------------------
@@ -1624,7 +1623,7 @@ BOOL ScUndoRenameObject::CanRepeat(SfxRepeatTarget& /* rTarget */) const
// Switch sheet between left-to-right and right-to-left
//
-ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, BOOL bNewRTL ) :
+ScUndoLayoutRTL::ScUndoLayoutRTL( ScDocShell* pShell, SCTAB nNewTab, sal_Bool bNewRTL ) :
ScSimpleUndo( pShell ),
nTab( nNewTab ),
bRTL( bNewRTL )
@@ -1635,20 +1634,20 @@ ScUndoLayoutRTL::~ScUndoLayoutRTL()
{
}
-void ScUndoLayoutRTL::DoChange( BOOL bNew )
+void ScUndoLayoutRTL::DoChange( sal_Bool bNew )
{
- pDocShell->SetInUndo( TRUE );
+ pDocShell->SetInUndo( sal_True );
ScDocument* pDoc = pDocShell->GetDocument();
pDoc->SetLayoutRTL( nTab, bNew );
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
- pViewShell->SetTabNo(nTab,TRUE);
+ pViewShell->SetTabNo(nTab,sal_True);
pDocShell->SetDocumentModified();
- pDocShell->SetInUndo( FALSE );
+ pDocShell->SetInUndo( false );
}
void ScUndoLayoutRTL::Undo()
@@ -1668,7 +1667,7 @@ void ScUndoLayoutRTL::Repeat(SfxRepeatTarget& rTarget)
Execute( FID_TAB_RTL, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD);
}
-BOOL ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
+sal_Bool ScUndoLayoutRTL::CanRepeat(SfxRepeatTarget& rTarget) const
{
return (rTarget.ISA(ScTabViewTarget));
}
diff --git a/sc/source/ui/undo/undoutil.cxx b/sc/source/ui/undo/undoutil.cxx
index 6d6fcc770a1f..9668e5b0d4ac 100644
--- a/sc/source/ui/undo/undoutil.cxx
+++ b/sc/source/ui/undo/undoutil.cxx
@@ -44,10 +44,13 @@
#include "globstr.hrc"
#include "global.hxx"
-void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
+void ScUndoUtil::MarkSimpleBlock( ScDocShell* pDocShell,
SCCOL nStartX, SCROW nStartY, SCTAB nStartZ,
SCCOL nEndX, SCROW nEndY, SCTAB nEndZ )
{
+ if ( pDocShell->IsPaintLocked() )
+ return;
+
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
{
@@ -56,7 +59,7 @@ void ScUndoUtil::MarkSimpleBlock( ScDocShell* /* pDocShell */,
pViewShell->SetTabNo( nStartZ );
pViewShell->DoneBlockMode();
- pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, FALSE, FALSE );
+ pViewShell->MoveCursorAbs( nStartX, nStartY, SC_FOLLOW_JUMP, false, false );
pViewShell->InitOwnBlockMode();
pViewShell->GetViewData()->GetMarkData().
SetMarkArea( ScRange( nStartX, nStartY, nStartZ, nEndX, nEndY, nEndZ ) );
@@ -90,25 +93,25 @@ ScDBData* ScUndoUtil::GetOldDBData( ScDBData* pUndoData, ScDocument* pDoc, SCTAB
if (!pRet)
{
- BOOL bWasTemp = FALSE;
+ sal_Bool bWasTemp = false;
if ( pUndoData )
{
String aName;
pUndoData->GetName( aName );
if ( aName == ScGlobal::GetRscString( STR_DB_NONAME ) )
- bWasTemp = TRUE;
+ bWasTemp = sal_True;
}
DBG_ASSERT(bWasTemp, "Undo: didn't find database range");
(void)bWasTemp;
- USHORT nIndex;
+ sal_uInt16 nIndex;
ScDBCollection* pColl = pDoc->GetDBCollection();
if (pColl->SearchName( ScGlobal::GetRscString( STR_DB_NONAME ), nIndex ))
pRet = (*pColl)[nIndex];
else
{
pRet = new ScDBData( ScGlobal::GetRscString( STR_DB_NONAME ), nTab,
- nCol1,nRow1, nCol2,nRow2, TRUE,
+ nCol1,nRow1, nCol2,nRow2, sal_True,
pDoc->HasColHeader( nCol1,nRow1,nCol2,nRow2,nTab ) );
pColl->Insert( pRet );
}