summaryrefslogtreecommitdiff
path: root/sd/source/ui/unoidl
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-04-24 07:35:03 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:20 +0100
commit998a399166d14e6f8f71c66888212d4ab74b31ee (patch)
tree08ec9f95f4aa18026de95e312fc6634963f2bf63 /sd/source/ui/unoidl
parenteebf7fa20a97d36e859b6537cf889bff8dbbf565 (diff)
Resolves: #i122093# Don't show Impress layouts panel for master pages
(cherry picked from commit 573490c7240fc02dcf82bf0ba262863612e53187) Conflicts: sd/source/ui/sidebar/LayoutMenu.cxx Change-Id: Ie5c0a1e15ea8db2d2b033efb1234492bd438658d Related: #i122093# WaE in DrawController::BroadcastContextChenge() (cherry picked from commit 26e4fcdbb8594696b45d0600e1b7a5e5946cd2aa) Change-Id: I416215077643f3eb4d43eb761e457d0893bcc429
Diffstat (limited to 'sd/source/ui/unoidl')
-rw-r--r--sd/source/ui/unoidl/DrawController.cxx50
1 files changed, 50 insertions, 0 deletions
diff --git a/sd/source/ui/unoidl/DrawController.cxx b/sd/source/ui/unoidl/DrawController.cxx
index e45f4f1d0119..e71a0fa4ff39 100644
--- a/sd/source/ui/unoidl/DrawController.cxx
+++ b/sd/source/ui/unoidl/DrawController.cxx
@@ -46,6 +46,9 @@
#include <svx/fmshell.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
+#include <sfx2/sidebar/EnumContext.hxx>
+#include <svx/sidebar/ContextChangeEventMultiplexer.hxx>
+
#include <boost/shared_ptr.hpp>
using namespace ::std;
@@ -53,6 +56,7 @@ using namespace ::cppu;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::drawing::framework;
+using ::sfx2::sidebar::EnumContext;
namespace sd {
@@ -547,6 +551,52 @@ void DrawController::FirePropertyChange (
+void DrawController::BroadcastContextChange (void) const
+{
+ ::boost::shared_ptr<ViewShell> pViewShell (mpBase->GetMainViewShell());
+ if ( ! pViewShell)
+ return;
+
+ EnumContext::Context eContext (EnumContext::Context_Unknown);
+ switch (pViewShell->GetShellType())
+ {
+ case ViewShell::ST_IMPRESS:
+ case ViewShell::ST_DRAW:
+ if (mbMasterPageMode)
+ eContext = EnumContext::Context_MasterPage;
+ else
+ eContext = EnumContext::Context_DrawPage;
+ break;
+
+ case ViewShell::ST_NOTES:
+ eContext = EnumContext::Context_NotesPage;
+ break;
+
+ case ViewShell::ST_HANDOUT:
+ eContext = EnumContext::Context_HandoutPage;
+ break;
+
+ case ViewShell::ST_OUTLINE:
+ eContext = EnumContext::Context_OutlineText;
+ break;
+
+ case ViewShell::ST_SLIDE_SORTER:
+ eContext = EnumContext::Context_SlidesorterPage;
+ break;
+
+ case ViewShell::ST_PRESENTATION:
+ case ViewShell::ST_NONE:
+ default:
+ eContext = EnumContext::Context_Empty;
+ break;
+ }
+
+ ContextChangeEventMultiplexer::NotifyContextChange(mpBase, eContext);
+}
+
+
+
+
ViewShellBase* DrawController::GetViewShellBase (void)
{
return mpBase;