summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2012-11-01 16:28:57 -0400
committerKohei Yoshida <kohei.yoshida@gmail.com>2012-11-01 16:30:04 -0400
commit52faa1f933f07ac93752dffdc1a35620029252e3 (patch)
tree2f117ce346f1ee6b3016288b84904f6918a6c367 /sc/source
parentb10833d4db6046f2d32ea44a60cb19a626d80447 (diff)
Explicitly call these methods to init / update note positions.
Since we don't use inc / dec recalc level, we need to do this. Change-Id: Ia99b4dbfceefd1ed951a61374250c5c61e39a62a
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/ui/docshell/docfunc.cxx8
-rw-r--r--sc/source/ui/undo/undoblk.cxx16
2 files changed, 24 insertions, 0 deletions
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index 188259354fb3..e77f4caafef0 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1499,6 +1499,8 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa
itr = aMark.begin();
for (; itr != itrEnd && nTabCount; ++itr)
{
+ pDoc->InitializeNoteCaptions(*itr);
+
i = *itr;
if( pDoc->HasAttrib( nMergeTestStartX, nMergeTestStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ) )
{
@@ -1721,6 +1723,8 @@ sal_Bool ScDocFunc::InsertCells( const ScRange& rRange, const ScMarkData* pTabMa
for (; itr != itrEnd && *itr < nTabCount; ++itr)
{
i = *itr;
+ pDoc->SetDrawPageSize(i);
+
if (bNeedRefresh)
pDoc->ExtendMerge( nMergeTestStartX, nMergeTestStartY, nMergeTestEndX, nMergeTestEndY, i, sal_True );
else
@@ -1904,6 +1908,8 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa
itr = aMark.begin();
for (; itr != itrEnd && *itr < nTabCount; ++itr)
{
+ pDoc->InitializeNoteCaptions(*itr);
+
SCTAB i = *itr;
if ( pDoc->HasAttrib( nUndoStartX, nUndoStartY, i, nMergeTestEndX, nMergeTestEndY, i, HASATTR_MERGED | HASATTR_OVERLAPPED ))
{
@@ -2227,6 +2233,8 @@ sal_Bool ScDocFunc::DeleteCells( const ScRange& rRange, const ScMarkData* pTabMa
itr = aMark.begin(), itrEnd = aMark.end();
for (; itr != itrEnd && *itr < nTabCount; ++itr)
{
+ pDoc->SetDrawPageSize(*itr);
+
if ( eCmd == DEL_DELCOLS || eCmd == DEL_DELROWS )
pDoc->UpdatePageBreaks( *itr );
diff --git a/sc/source/ui/undo/undoblk.cxx b/sc/source/ui/undo/undoblk.cxx
index 3fe71b181e82..754aed1a8b36 100644
--- a/sc/source/ui/undo/undoblk.cxx
+++ b/sc/source/ui/undo/undoblk.cxx
@@ -284,6 +284,10 @@ void ScUndoInsertCells::Undo()
BeginUndo();
DoChange( sal_True );
EndUndo();
+
+ ScDocument* pDoc = pDocShell->GetDocument();
+ for (SCTAB i = 0; i < nCount; ++i)
+ pDoc->SetDrawPageSize(pTabs[i]);
}
void ScUndoInsertCells::Redo()
@@ -295,6 +299,10 @@ void ScUndoInsertCells::Redo()
if ( pPasteUndo )
pPasteUndo->Redo(); // redo paste last
+
+ ScDocument* pDoc = pDocShell->GetDocument();
+ for (SCTAB i = 0; i < nCount; ++i)
+ pDoc->SetDrawPageSize(pTabs[i]);
}
void ScUndoInsertCells::Repeat(SfxRepeatTarget& rTarget)
@@ -519,6 +527,10 @@ void ScUndoDeleteCells::Undo()
pViewShell->MarkRange( ScRange(aEffRange.aStart.Col(), aEffRange.aStart.Row(), pTabs[i], aEffRange.aEnd.Col(), aEffRange.aEnd.Row(), pTabs[i]+pScenarios[i]) );
}
}
+
+ ScDocument* pDoc = pDocShell->GetDocument();
+ for (SCTAB i = 0; i < nCount; ++i)
+ pDoc->SetDrawPageSize(pTabs[i]);
}
void ScUndoDeleteCells::Redo()
@@ -532,6 +544,10 @@ void ScUndoDeleteCells::Redo()
ScTabViewShell* pViewShell = ScTabViewShell::GetActiveViewShell();
if (pViewShell)
pViewShell->DoneBlockMode(); // current way
+
+ ScDocument* pDoc = pDocShell->GetDocument();
+ for (SCTAB i = 0; i < nCount; ++i)
+ pDoc->SetDrawPageSize(pTabs[i]);
}
void ScUndoDeleteCells::Repeat(SfxRepeatTarget& rTarget)