summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAriel Constenla-Haile <arielch@apache.org>2013-03-15 22:19:19 +0000
committerAriel Constenla-Haile <arielch@apache.org>2013-03-15 22:19:19 +0000
commit8bdce6d900be92077b715ff1298b846ce32171b7 (patch)
treec7e8d3e7d31b66faaf8f73431e91425eb0eb7118 /sd
parent0a6ba29e675385ce0aa49bb6ecd8d45b7aa0997b (diff)
i121872 - Integrate the Presentation Minimizer
Notes
Notes: prefer: ea91c7d90d74e1ca039ba669b5d3e14fa359c0fa
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/app.hrc1
-rw-r--r--sd/sdi/drviewsh.sdi5
-rw-r--r--sd/sdi/sdraw.sdi25
-rw-r--r--sd/source/ui/view/drviewse.cxx30
-rw-r--r--sd/uiconfig/simpress/menubar/menubar.xml1
5 files changed, 62 insertions, 0 deletions
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
@@ -5385,6 +5385,31 @@ SfxVoidItem PresentationDialog SID_PRESENTATION_DLG
]
//--------------------------------------------------------------------------
+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 <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/i18n/TransliterationModules.hpp>
#include <com/sun/star/i18n/TransliterationModulesExtra.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <comphelper/processfactory.hxx>
@@ -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 @@
<menu:menuitem menu:id=".uno:Gallery"/>
<menu:menuitem menu:id=".uno:BmpMask"/>
<menu:menuitem menu:id=".uno:AVMediaPlayer"/>
+ <menu:menuitem menu:id=".uno:PresentationMinimizer"/>
<menu:menuseparator/>
<menu:menu menu:id=".uno:MacrosMenu">
<menu:menupopup>