summaryrefslogtreecommitdiffstats
path: root/sd/source/ui/view/drviews4.cxx
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2009-06-04 16:21:29 +0000
committerKurt Zenker <kz@openoffice.org>2009-06-04 16:21:29 +0000
commitef7c5c7534ecf24b2af1bc0de6e221327b4a4c49 (patch)
tree91654c3c0af54f00d2246874ee38e7a02e7035b4 /sd/source/ui/view/drviews4.cxx
parentCWS-TOOLING: integrate CWS os128 (diff)
downloadcore-ef7c5c7534ecf24b2af1bc0de6e221327b4a4c49.tar.gz
core-ef7c5c7534ecf24b2af1bc0de6e221327b4a4c49.zip
CWS-TOOLING: integrate CWS clnoundo
2009-05-18 09:40:22 +0200 wg r271998 : i102011 2009-04-28 12:20:24 +0200 cl r271318 : CWS-TOOLING: rebase CWS clnoundo to trunk@270723 (milestone: DEV300:m46) 2009-04-02 11:37:14 +0200 cl r270388 : #i100371# check valid positions all the time to avoid crashes during model lock 2009-03-30 13:02:27 +0200 cl r270219 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:59:41 +0200 cl r270218 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:55:06 +0200 cl r270217 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:53:27 +0200 cl r270216 : #i100371# do not create undo actions in drawing layer during load 2009-03-30 12:49:28 +0200 cl r270215 : #i100371# added EnableUndo() and IsUndoEnabled()
Diffstat (limited to 'sd/source/ui/view/drviews4.cxx')
-rw-r--r--sd/source/ui/view/drviews4.cxx31
1 files changed, 15 insertions, 16 deletions
diff --git a/sd/source/ui/view/drviews4.cxx b/sd/source/ui/view/drviews4.cxx
index 229e0b8c6eb1..1f98a0705d97 100644
--- a/sd/source/ui/view/drviews4.cxx
+++ b/sd/source/ui/view/drviews4.cxx
@@ -31,6 +31,8 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sd.hxx"
+#include <com/sun/star/drawing/XDrawPagesSupplier.hpp>
+
#include "DrawViewShell.hxx"
#include <vcl/msgbox.hxx>
#include <svtools/urlbmk.hxx>
@@ -92,6 +94,8 @@ namespace sd {
#pragma optimize ( "", off )
#endif
+using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::drawing;
/*************************************************************************
|*
@@ -102,25 +106,20 @@ namespace sd {
void DrawViewShell::DeleteActualPage()
{
USHORT nPage = maTabControl.GetCurPageId() - 1;
- SdPage* pPage = GetDoc()->GetSdPage(nPage,PK_STANDARD);
-
-#ifdef DBG_UTIL
- USHORT nPageCount = GetDoc()->GetPageCount();
- DBG_ASSERT(nPageCount > 1, "aber das ist die letzte!");
-#endif
mpDrawView->SdrEndTextEdit();
- mpDrawView->BegUndo();
-
- mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoDeletePage(*pPage));
- GetDoc()->RemovePage(pPage->GetPageNum());
-
- pPage = GetDoc()->GetSdPage(nPage, PK_NOTES);
- mpDrawView->AddUndo(GetDoc()->GetSdrUndoFactory().CreateUndoDeletePage(*pPage));
- GetDoc()->RemovePage(pPage->GetPageNum());
-
- mpDrawView->EndUndo();
+ try
+ {
+ Reference<XDrawPagesSupplier> xDrawPagesSupplier( GetDoc()->getUnoModel(), UNO_QUERY_THROW );
+ Reference<XDrawPages> xPages( xDrawPagesSupplier->getDrawPages(), UNO_QUERY_THROW );
+ Reference< XDrawPage > xPage( xPages->getByIndex( nPage ), UNO_QUERY_THROW );
+ xPages->remove( xPage );
+ }
+ catch( Exception& )
+ {
+ DBG_ERROR("SelectionManager::DeleteSelectedMasterPages(), exception caught!");
+ }
}
/*************************************************************************