summaryrefslogtreecommitdiff
path: root/sc/source/ui/undo/undoblk2.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/undo/undoblk2.cxx')
-rw-r--r--sc/source/ui/undo/undoblk2.cxx33
1 files changed, 12 insertions, 21 deletions
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));
}