summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@suse.com>2012-01-07 18:44:21 -0500
committerKohei Yoshida <kohei.yoshida@suse.com>2012-01-07 18:48:56 -0500
commit834f7c51ea1a51c6022da25fad9d0389682c5d52 (patch)
tree0b27ada65eb568bf73d2241172c0becab8b23f04 /sc
parentaeb3af4ea06cb1f17b0177ab77c88f809fb99427 (diff)
Reset sheet index of drawing objects when moving sheet too.
If not, cell-anchored objects would get stuck on the old sheet position, which is not good.
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/drwlayer.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/drwlayer.cxx b/sc/source/core/data/drwlayer.cxx
index 2bbd35e718c4..69f289aa0465 100644
--- a/sc/source/core/data/drwlayer.cxx
+++ b/sc/source/core/data/drwlayer.cxx
@@ -421,6 +421,8 @@ void ScDrawLayer::ScRenamePage( SCTAB nTab, const String& rNewName )
void ScDrawLayer::ScMovePage( sal_uInt16 nOldPos, sal_uInt16 nNewPos )
{
MovePage( nOldPos, nNewPos );
+ sal_uInt16 nMinPos = std::min(nOldPos, nNewPos);
+ ResetTab(nMinPos, pDoc->GetTableCount()-1);
}
void ScDrawLayer::ScCopyPage( sal_uInt16 nOldPos, sal_uInt16 nNewPos, sal_Bool bAlloc )