summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-06-05 15:40:56 +0000
committerAndre Fischer <af@apache.org>2013-06-05 15:40:56 +0000
commit7b26aba94e5544937f1e37e34915bcb276bc3c27 (patch)
treebabede9a22ad29ca8ccd9e33acc788348befc6b5 /sd
parent136976efb17b8617a83c7f26601cd04031b51e7f (diff)
122470: Fixed programmatic triggered switching of sidebar decks.
Notes
Notes: merged as: 50cbbc7f3afdd077e98f416f97390fe93428e8cf
Diffstat (limited to 'sd')
-rw-r--r--sd/inc/app.hrc2
-rw-r--r--sd/sdi/ViewShellBase.sdi5
-rw-r--r--sd/sdi/sdraw.sdi27
-rw-r--r--sd/source/ui/app/sdmod1.cxx11
-rw-r--r--sd/source/ui/framework/tools/FrameworkHelper.cxx51
-rw-r--r--sd/source/ui/inc/framework/FrameworkHelper.hxx19
-rw-r--r--sd/source/ui/slidesorter/controller/SlsSlotManager.cxx11
-rw-r--r--sd/source/ui/table/tablefunction.cxx10
-rw-r--r--sd/source/ui/view/GraphicViewShellBase.cxx1
-rw-r--r--sd/source/ui/view/ViewShellBase.cxx50
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx25
-rw-r--r--sd/source/ui/view/drviews6.cxx22
12 files changed, 30 insertions, 204 deletions
diff --git a/sd/inc/app.hrc b/sd/inc/app.hrc
index 5d8bcd4e7534..5abda4c7e254 100644
--- a/sd/inc/app.hrc
+++ b/sd/inc/app.hrc
@@ -487,7 +487,7 @@
#define SID_TP_USE_FOR_NEW_PRESENTATIONS (SID_SD_START+427)
#define SID_TP_SHOW_LARGE_PREVIEW (SID_SD_START+428)
#define SID_TP_SHOW_SMALL_PREVIEW (SID_SD_START+429)
-#define SID_SHOW_TOOL_PANEL (SID_SD_START+430)
+// SID_SD_START+430 is unused
#define SID_INSERT_MASTER_PAGE (SID_SD_START+431)
#define SID_DELETE_MASTER_PAGE (SID_SD_START+432)
#define SID_RENAME_MASTER_PAGE (SID_SD_START+433)
diff --git a/sd/sdi/ViewShellBase.sdi b/sd/sdi/ViewShellBase.sdi
index 341ba23b17f5..833ce9ddfdab 100644
--- a/sd/sdi/ViewShellBase.sdi
+++ b/sd/sdi/ViewShellBase.sdi
@@ -82,11 +82,6 @@ interface ViewShellBaseView
ExecMethod = Execute;
StateMethod = GetState;
]
- SID_SHOW_TOOL_PANEL
- [
- ExecMethod = Execute;
- StateMethod = GetState;
- ]
SID_WIN_FULLSCREEN
[
ExecMethod = Execute;
diff --git a/sd/sdi/sdraw.sdi b/sd/sdi/sdraw.sdi
index e7907b4c59bb..b1cfb38f58c8 100644
--- a/sd/sdi/sdraw.sdi
+++ b/sd/sdi/sdraw.sdi
@@ -7366,30 +7366,3 @@ SfxBoolItem SlideSorterMultiPaneGUI SID_SLIDE_SORTER_MULTI_PANE_GUI
ToolBoxConfig = TRUE,
GroupId = GID_MODIFY;
]
-
-SfxVoidItem TaskPaneShowPanel SID_SHOW_TOOL_PANEL (
- SfxBoolItem IsPanelVisible ID_VAL_ISVISIBLE,
- SfxUInt32Item PanelId ID_VAL_PANEL_INDEX)
-[
- /* flags: */
- AutoUpdate = TRUE,
- Cachable = Cachable,
- FastCall = FALSE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = FALSE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = GID_VIEW;
-]
-
-
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx
index 5b9901cb262a..29340333af9a 100644
--- a/sd/source/ui/app/sdmod1.cxx
+++ b/sd/source/ui/app/sdmod1.cxx
@@ -746,17 +746,6 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq )
}
}
}
-
- if (bMakeLayoutVisible && pViewFrame!=NULL)
- {
- // Make the layout menu visible in the tool pane.
- ::sd::ViewShellBase* pBase = ::sd::ViewShellBase::GetViewShellBase(pViewFrame);
- if (pBase != NULL)
- {
- FrameworkHelper::Instance(*pBase)->RequestSidebarPanel(
- FrameworkHelper::msLayoutTaskPanelURL);
- }
- }
}
return pFrame;
diff --git a/sd/source/ui/framework/tools/FrameworkHelper.cxx b/sd/source/ui/framework/tools/FrameworkHelper.cxx
index 5f79903401b2..09ebe865656e 100644
--- a/sd/source/ui/framework/tools/FrameworkHelper.cxx
+++ b/sd/source/ui/framework/tools/FrameworkHelper.cxx
@@ -637,57 +637,6 @@ Reference<XResourceId> FrameworkHelper::RequestView (
-Reference<XResourceId> FrameworkHelper::RequestSidebarPanel (
- const OUString& rsTaskPanelURL,
- const bool bEnsureTaskPaneIsVisible)
-{
- try
- {
- if (mxConfigurationController.is())
- {
- // Check the existence of the task pane.
- if ( ! bEnsureTaskPaneIsVisible)
- {
- Reference<XConfiguration> xConfiguration (
- mxConfigurationController->getCurrentConfiguration());
- if (xConfiguration.is())
- if ( ! xConfiguration->hasResource(
- CreateResourceId(msSidebarViewURL, msSidebarPaneURL)))
- {
- // Task pane is not active. Do not force it.
- return NULL;
- }
- }
-
- // Create the resource id from URLs for the sidebar pane
- // and view and the requested panel.
- mxConfigurationController->requestResourceActivation(
- CreateResourceId(msSidebarPaneURL),
- ResourceActivationMode_ADD);
- mxConfigurationController->requestResourceActivation(
- CreateResourceId(msSidebarViewURL, msSidebarPaneURL),
- ResourceActivationMode_REPLACE);
- Reference<XResourceId> xPanelId (CreateResourceId(rsTaskPanelURL, msSidebarViewURL, msSidebarPaneURL));
- mxConfigurationController->requestResourceActivation(
- xPanelId,
- ResourceActivationMode_REPLACE);
-
- return xPanelId;
- }
- }
- catch (lang::DisposedException&)
- {
- Dispose();
- }
- catch (RuntimeException&)
- {}
-
- return NULL;
-}
-
-
-
-
void FrameworkHelper::RequestResourceDeactivation (const cssu::Reference<cssdf::XResourceId>& rxResourceId)
{
try
diff --git a/sd/source/ui/inc/framework/FrameworkHelper.hxx b/sd/source/ui/inc/framework/FrameworkHelper.hxx
index d8ac6a321c44..1417fe21536b 100644
--- a/sd/source/ui/inc/framework/FrameworkHelper.hxx
+++ b/sd/source/ui/inc/framework/FrameworkHelper.hxx
@@ -229,25 +229,6 @@ public:
const ::rtl::OUString& rsResourceURL,
const ::rtl::OUString& rsAnchorURL);
- /** Request the activation of the specified panel in the
- sidebar.
- @param rsSidebarPanelURL
- The panel that is to be activated.
- @param bEnsurePaneIsVisible
- When this is <TRUE/> then the sidebar pane is activated when not
- yet active.
- When this flag is <FALSE/> then the requested panel
- is activated only when the task pane is already active. When it
- is not active then this call is silently ignored.
- @return
- The resource id of the requested sidebar panel is returned. With that
- the caller can, for example, call RunOnResourceActivation() to
- do some initialization after the requested view becomes active.
- */
- cssu::Reference<cssdf::XResourceId> RequestSidebarPanel (
- const ::rtl::OUString& rsSidebarPanelURL,
- const bool bEnsureTaskPaneIsVisible = true);
-
/** Request the deactivation of the specified resource.
*/
void RequestResourceDeactivation (
diff --git a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
index 2fd7549fdbbd..42bc76d59783 100644
--- a/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
+++ b/sd/source/ui/slidesorter/controller/SlsSlotManager.cxx
@@ -76,6 +76,7 @@
#include <sfx2/viewfrm.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
#include <svx/svxids.hrc>
#include <svx/zoomitem.hxx>
#include <svx/svxdlg.hxx>
@@ -187,12 +188,10 @@ void SlotManager::FuTemporary (SfxRequest& rRequest)
case SID_SLIDE_TRANSITIONS_PANEL:
{
- // Make the slide transition panel visible (expand it)
- // in the tool pane.
- if (mrSlideSorter.GetViewShellBase() != NULL)
- framework::FrameworkHelper::Instance(*mrSlideSorter.GetViewShellBase())
- ->RequestSidebarPanel(
- sd::framework::FrameworkHelper::msSlideTransitionTaskPanelURL);
+ // Make the slide transition panel visible in the sidebar.
+ ::sfx2::sidebar::Sidebar::ShowPanel(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("SlideTransitionPanel")),
+ pShell->GetViewFrame()->GetFrame().GetFrameInterface());
rRequest.Ignore ();
break;
}
diff --git a/sd/source/ui/table/tablefunction.cxx b/sd/source/ui/table/tablefunction.cxx
index 69760a93d243..ddced59c395b 100644
--- a/sd/source/ui/table/tablefunction.cxx
+++ b/sd/source/ui/table/tablefunction.cxx
@@ -55,6 +55,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/request.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
#include <svl/style.hxx>
#include "framework/FrameworkHelper.hxx"
@@ -204,10 +205,11 @@ SfxViewShell* pViewShell = GetViewShell();
}
else
{
- // Make the slide transition panel visible (expand it) in the
- // tool pane.
- framework::FrameworkHelper::Instance(GetViewShellBase())->RequestSidebarPanel(
- framework::FrameworkHelper::msTableDesignPanelURL);
+ // Make the table design panel visible (expand it) in the
+ // sidebar.
+ ::sfx2::sidebar::Sidebar::ShowPanel(
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("ImpressTableDesignPanel")),
+ GetViewFrame()->GetFrame().GetFrameInterface());
}
Cancel();
diff --git a/sd/source/ui/view/GraphicViewShellBase.cxx b/sd/source/ui/view/GraphicViewShellBase.cxx
index d666c52009d8..e97fb6d63525 100644
--- a/sd/source/ui/view/GraphicViewShellBase.cxx
+++ b/sd/source/ui/view/GraphicViewShellBase.cxx
@@ -96,7 +96,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 6704a2127059..b59c39e1193d 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -198,7 +198,6 @@ public:
void GetSlotState (SfxItemSet& rSet);
void ProcessRestoreEditingViewSlot (void);
- void ProcessTaskPaneSlot (SfxRequest& rRequest);
private:
ViewShellBase& mrBase;
@@ -743,10 +742,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;
@@ -1535,51 +1530,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.
- sal_Bool bShowToolPanel = sal_True;
- sidebar::PanelId nPanelId (sidebar::PID_UNKNOWN);
- bool bPanelIdGiven = false;
-
- // Extract the given arguments.
- const SfxItemSet* pArgs = rRequest.GetArgs();
- if (pArgs)
- {
- if ((pArgs->Count() == 1) || (pArgs->Count() == 2))
- {
- SFX_REQUEST_ARG (rRequest, pIsPanelVisible,
- SfxBoolItem, ID_VAL_ISVISIBLE, sal_False);
- if (pIsPanelVisible != NULL)
- bShowToolPanel = pIsPanelVisible->GetValue();
- }
- 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()!=NULL
- && 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 c507d00cafd2..65ba91f01e99 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -53,6 +53,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>
@@ -147,27 +148,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/drviews6.cxx b/sd/source/ui/view/drviews6.cxx
index 9c8d44e760f5..8c63595242ef 100644
--- a/sd/source/ui/view/drviews6.cxx
+++ b/sd/source/ui/view/drviews6.cxx
@@ -78,6 +78,12 @@
#include "DrawDocShell.hxx"
#include "framework/FrameworkHelper.hxx"
#include <svx/svdoashp.hxx>
+#include <sfx2/sidebar/Sidebar.hxx>
+
+namespace {
+ static const ::rtl::OUString CustomAnimationPanelId (RTL_CONSTASCII_USTRINGPARAM("CustomAnimationPanel"));
+ static const ::rtl::OUString SlideTransitionPanelId (RTL_CONSTASCII_USTRINGPARAM("SlideTransitionPanel"));
+}
namespace sd {
@@ -574,10 +580,10 @@ void DrawViewShell::FuTemp04(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 ();
@@ -586,10 +592,10 @@ void DrawViewShell::FuTemp04(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 ();