diff options
Diffstat (limited to 'sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx')
-rw-r--r-- | sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx index 135be992a1c0..9356dac3f7f9 100644 --- a/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx +++ b/sd/source/ui/toolpanel/controls/MasterPagesSelector.cxx @@ -46,6 +46,7 @@ #include "strings.hrc" #include "showview.hxx" #include "DrawViewShell.hxx" +#include "DrawController.hxx" #include "SlideSorterViewShell.hxx" #include "PreviewValueSet.hxx" #include "ViewShellBase.hxx" @@ -570,6 +571,26 @@ void MasterPagesSelector::Execute (SfxRequest& rRequest) break; } + case SID_TP_EDIT_MASTER: + { + using namespace ::com::sun::star; + uno::Reference<drawing::XDrawPage> xSelectedMaster ( + GetSelectedMasterPage()->getUnoPage(), uno::UNO_QUERY); + SfxViewFrame* pViewFrame = mrBase.GetViewFrame(); + if (pViewFrame != NULL && xSelectedMaster.is()) + { + SfxDispatcher* pDispatcher = pViewFrame->GetDispatcher(); + if (pDispatcher != NULL) + { + USHORT nIndex = mpPageSet->GetSelectItemId(); + pDispatcher->Execute(SID_MASTERPAGE, SFX_CALLMODE_SYNCHRON); + mpPageSet->SelectItem (nIndex); + mrBase.GetDrawController().setCurrentPage(xSelectedMaster); + } + } + break; + } + case SID_CUT: case SID_COPY: case SID_PASTE: |