From 8bdce6d900be92077b715ff1298b846ce32171b7 Mon Sep 17 00:00:00 2001 From: Ariel Constenla-Haile Date: Fri, 15 Mar 2013 22:19:19 +0000 Subject: i121872 - Integrate the Presentation Minimizer --- sd/inc/app.hrc | 1 + sd/sdi/drviewsh.sdi | 5 +++++ sd/sdi/sdraw.sdi | 25 +++++++++++++++++++++++++ sd/source/ui/view/drviewse.cxx | 30 ++++++++++++++++++++++++++++++ sd/uiconfig/simpress/menubar/menubar.xml | 1 + 5 files changed, 62 insertions(+) (limited to 'sd') diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc index b733f5acc10b..5d8bcd4e7534 100644 --- a/sd/inc/app.hrc +++ b/sd/inc/app.hrc @@ -503,5 +503,6 @@ #define SID_ADD_MOTION_PATH (SID_SD_START+441) #define SID_TABLE_TOOLBOX (SID_SD_START+442) +#define SID_PRESENTATION_MINIMIZER (SID_SD_START+442) #endif diff --git a/sd/sdi/drviewsh.sdi b/sd/sdi/drviewsh.sdi index 2df7bcd5af39..156bfdcbf884 100644 --- a/sd/sdi/drviewsh.sdi +++ b/sd/sdi/drviewsh.sdi @@ -75,6 +75,11 @@ interface ImpressEditView : DrawView ExecMethod = FuSupport ; StateMethod = GetMenuState ; ] + SID_PRESENTATION_MINIMIZER + [ + ExecMethod = FuSupport ; + StateMethod = GetMenuState ; + ] SID_CLEAR_UNDO_STACK // ole : no, status : ? [ ExecMethod = FuSupport ; diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi index e553a56c0660..e7907b4c59bb 100644 --- a/sd/sdi/sdraw.sdi +++ b/sd/sdi/sdraw.sdi @@ -5384,6 +5384,31 @@ SfxVoidItem PresentationDialog SID_PRESENTATION_DLG GroupId = GID_OPTIONS; ] +//-------------------------------------------------------------------------- +SfxVoidItem PresentationMinimizer SID_PRESENTATION_MINIMIZER +() +[ + /* flags: */ + AutoUpdate = FALSE, + Cachable = Cachable, + FastCall = FALSE, + HasCoreId = FALSE, + HasDialog = TRUE, + ReadOnlyDoc = TRUE, + Toggle = FALSE, + Container = FALSE, + RecordAbsolute = FALSE, + RecordPerSet; + Asynchron; + + /* config: */ + AccelConfig = TRUE, + MenuConfig = TRUE, + StatusBarConfig = FALSE, + ToolBoxConfig = TRUE, + GroupId = GID_APPLICATION; +] + //-------------------------------------------------------------------------- SfxVoidItem PresentationEnd SID_PRESENTATION_END () diff --git a/sd/source/ui/view/drviewse.cxx b/sd/source/ui/view/drviewse.cxx index 075384674b57..d98097370bcc 100644 --- a/sd/source/ui/view/drviewse.cxx +++ b/sd/source/ui/view/drviewse.cxx @@ -29,6 +29,7 @@ #include #include #include +#include #include @@ -102,6 +103,7 @@ #include "fuformatpaintbrush.hxx" using ::rtl::OUString; +using com::sun::star::ui::dialogs::XExecutableDialog; using namespace ::com::sun::star; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::presentation; @@ -1472,6 +1474,34 @@ void DrawViewShell::FuSupport(SfxRequest& rReq) } break; + case SID_PRESENTATION_MINIMIZER: + { + if ( GetDoc()->GetDocumentType() == DOCUMENT_TYPE_IMPRESS && + GetViewShellBase().GetController() != NULL ) + { + try + { + uno::Reference< uno::XComponentContext > xContext( + ::comphelper::getProcessComponentContext() ); + uno::Sequence< uno::Any > aArgs(1); + aArgs[0] <<= GetViewShellBase().GetController(); + + uno::Reference< XExecutableDialog > xDialog( + xContext->getServiceManager()-> + createInstanceWithArgumentsAndContext( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( + "com.sun.star.ui.dialogs.PresentationMinimizerDialog")), + aArgs, xContext), uno::UNO_QUERY_THROW ); + xDialog->execute(); + } + catch (...) + {} + } + + rReq.Done(); + } + break; + default: break; } diff --git a/sd/uiconfig/simpress/menubar/menubar.xml b/sd/uiconfig/simpress/menubar/menubar.xml index ba54639b092f..0c2f4545dcad 100644 --- a/sd/uiconfig/simpress/menubar/menubar.xml +++ b/sd/uiconfig/simpress/menubar/menubar.xml @@ -270,6 +270,7 @@ + -- cgit