diff options
author | Andre Fischer <af@apache.org> | 2013-06-05 15:40:56 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2013-09-20 16:35:29 +0100 |
commit | 50cbbc7f3afdd077e98f416f97390fe93428e8cf (patch) | |
tree | f1f0bdfa883202bd8fe382f8f99afda454c3e30e /sd/source/ui/view | |
parent | d023339c2f85555212bdb9804854dcc2c403b50e (diff) |
Resolves: #i122470# Fixed programmatic triggered switching of sidebar decks
(cherry picked from commit 7b26aba94e5544937f1e37e34915bcb276bc3c27)
Conflicts:
sd/sdi/sdraw.sdi
sd/source/ui/framework/tools/FrameworkHelper.cxx
sd/source/ui/inc/framework/FrameworkHelper.hxx
sd/source/ui/view/ViewShellBase.cxx
sd/source/ui/view/drviews6.cxx
sfx2/Package_inc.mk
sfx2/inc/sfx2/sidebar/Sidebar.hxx
Change-Id: Ic6b518e734fe59a7b713e85e934487347b847c5a
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/GraphicViewShellBase.cxx | 1 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 42 | ||||
-rw-r--r-- | sd/source/ui/view/ViewShellImplementation.cxx | 25 | ||||
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 22 | ||||
-rw-r--r-- | sd/source/ui/view/drviews6.cxx | 1 |
5 files changed, 19 insertions, 72 deletions
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx index 39c5ba2610ce..06e99bd0453a 100644 --- a/sd/source/ui/view/GraphicViewShellBase.cxx +++ b/sd/source/ui/view/GraphicViewShellBase.cxx @@ -89,7 +89,6 @@ void GraphicViewShellBase::Execute (SfxRequest& rRequest) case SID_OUTLINEMODE: case SID_NOTESMODE: case SID_HANDOUTMODE: - case SID_SHOW_TOOL_PANEL: // Prevent some Impress-only slots from being executed. rRequest.Cancel(); break; diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index d683d4e3bb36..13f50b18afe0 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -182,7 +182,6 @@ public: void GetSlotState (SfxItemSet& rSet); void ProcessRestoreEditingViewSlot (void); - void ProcessTaskPaneSlot (SfxRequest& rRequest); private: ViewShellBase& mrBase; @@ -704,10 +703,6 @@ void ViewShellBase::Execute (SfxRequest& rRequest) // The full screen mode is not supported. Ignore the request. break; - case SID_SHOW_TOOL_PANEL: - mpImpl->ProcessTaskPaneSlot(rRequest); - break; - case SID_RESTORE_EDITING_VIEW: mpImpl->ProcessRestoreEditingViewSlot(); break; @@ -1472,43 +1467,6 @@ void ViewShellBase::Implementation::GetSlotState (SfxItemSet& rSet) - -void ViewShellBase::Implementation::ProcessTaskPaneSlot (SfxRequest& rRequest) -{ - // Set the visibility state of the toolpanel and one of its top - // level panels. - sidebar::PanelId nPanelId (sidebar::PID_UNKNOWN); - bool bPanelIdGiven = false; - - // Extract the given arguments. - const SfxItemSet* pArgs = rRequest.GetArgs(); - if (pArgs) - { - if (pArgs->Count() == 2) - { - SFX_REQUEST_ARG (rRequest, pPanelId, SfxUInt32Item, - ID_VAL_PANEL_INDEX, sal_False); - if (pPanelId != NULL) - { - nPanelId = static_cast<sidebar::PanelId>(pPanelId->GetValue()); - bPanelIdGiven = true; - } - } - } - - // Ignore the request for some combinations of panels and view - // shell types. - if (bPanelIdGiven - && ! (nPanelId==sidebar::PID_LAYOUT - && mrBase.GetMainViewShell()!=0 - && mrBase.GetMainViewShell()->GetShellType()==ViewShell::ST_OUTLINE)) - { - framework::FrameworkHelper::Instance(mrBase)->RequestSidebarPanel( - framework::FrameworkHelper::msLayoutTaskPanelURL); - } -} - - } // end of namespace sd diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 574e3cd4362a..24f7e2b0a036 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -46,6 +46,7 @@ #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> #include <sfx2/request.hxx> +#include <sfx2/sidebar/Sidebar.hxx> #include <svl/aeitem.hxx> #include <svx/imapdlg.hxx> #include <vcl/msgbox.hxx> @@ -125,27 +126,9 @@ void ViewShell::Implementation::ProcessModifyPageSlot ( { // Make the layout menu visible in the tool pane. - SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, sal_True); - SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX, sidebar::PID_LAYOUT); - SfxViewFrame* pFrame = mrViewShell.GetViewFrame(); - if (pFrame!=NULL && pFrame->GetDispatcher()!=NULL) - { - pFrame->GetDispatcher()->Execute ( - SID_SHOW_TOOL_PANEL, - SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD, - &aMakeToolPaneVisible, - &aPanelId, - NULL); - } - else - { - DBG_ASSERT(pFrame!=NULL && pFrame->GetDispatcher()!=NULL, - "ViewShell::Implementation::ProcessModifyPageSlot(): can not get dispatcher"); - } - - // We have activated a non-modal control in the task pane. - // Because it does not return anything we can not do anything - // more right now and have to exit here. + sfx2::sidebar::Sidebar::ShowPanel( + rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImpressLayoutsPanel")), + mrViewShell.GetViewFrame()->GetFrame().GetFrameInterface()); break; } else if (pArgs->Count() == 4) diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index d1d96b32dbeb..969a17b55245 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -165,6 +165,12 @@ #include "stlpool.hxx" #include "undolayer.hxx" #include "unmodpg.hxx" +#include <sfx2/sidebar/Sidebar.hxx> + +namespace { + const char CustomAnimationPanelId[] = "CustomAnimationPanel"; + const char SlideTransitionPanelId[] = "SlideTransitionPanel"; +} using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -2689,10 +2695,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_CUSTOM_ANIMATION_PANEL: { - // Make the slide transition panel visible (expand it) in the - // tool pane. - framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel( - framework::FrameworkHelper::msCustomAnimationTaskPanelURL); + // Make the slide transition panel visible in the sidebar. + ::sfx2::sidebar::Sidebar::ShowPanel( + CustomAnimationPanelId, + GetViewFrame()->GetFrame().GetFrameInterface()); Cancel(); rReq.Done (); @@ -2701,10 +2707,10 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq) case SID_SLIDE_TRANSITIONS_PANEL: { - // Make the slide transition panel visible (expand it) in the - // tool pane. - framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel( - framework::FrameworkHelper::msSlideTransitionTaskPanelURL); + // Make the slide transition panel visible in the sidebar. + ::sfx2::sidebar::Sidebar::ShowPanel( + SlideTransitionPanelId, + GetViewFrame()->GetFrame().GetFrameInterface()); Cancel(); rReq.Done (); diff --git a/sd/source/ui/view/drviews6.cxx b/sd/source/ui/view/drviews6.cxx index 97f0017542b5..6aa6238d3350 100644 --- a/sd/source/ui/view/drviews6.cxx +++ b/sd/source/ui/view/drviews6.cxx @@ -54,6 +54,7 @@ #include "sdabstdlg.hxx" #include "framework/FrameworkHelper.hxx" #include <svx/svdoashp.hxx> +#include <sfx2/sidebar/Sidebar.hxx> namespace sd { |