summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2013-03-18 15:52:42 +0100
committerDavid Tardon <dtardon@redhat.com>2013-03-23 08:09:44 +0100
commit6a08c0cba41dc63acb2c22c48170b081cc99e46c (patch)
treef756cea859b93b38b0d0a3c18b6e55ca2716af38 /svx
parenta56a162e66269bfe39ba76bacc51efe4cff314da (diff)
broadcast change if removing NULL page
Change-Id: Iacf5e9cc509e29aaf5dd1321407c0de9db7677f3
Diffstat (limited to 'svx')
-rw-r--r--svx/source/svdraw/svdmodel.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index 6bddfb35b37d..2ea9027107a2 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -1486,12 +1486,14 @@ SdrPage* SdrModel::RemovePage(sal_uInt16 nPgNum)
void SdrModel::MovePage(sal_uInt16 nPgNum, sal_uInt16 nNewPos)
{
SdrPage* pPg=maPages[nPgNum];
- maPages.erase(maPages.begin()+nPgNum);
- PageListChanged();
if (pPg!=NULL) {
+ maPages.erase(maPages.begin()+nPgNum); // shortcut to avoid two broadcasts
+ PageListChanged();
pPg->SetInserted(sal_False);
InsertPage(pPg,nNewPos);
}
+ else
+ RemovePage(nPgNum);
}
void SdrModel::InsertMasterPage(SdrPage* pPage, sal_uInt16 nPos)