Kaydet (Commit) 2f90974f authored tarafından Samuel Mehrbrodt's avatar Samuel Mehrbrodt

fdo85897 Make 'Function List' only accessible in sidebar

Change-Id: I875d1dd75c02f617814a934b34b5099f9c2279cc
üst e6aa6dac
...@@ -2866,7 +2866,7 @@ SfxVoidItem FreezePanes SID_WINDOW_FIX ...@@ -2866,7 +2866,7 @@ SfxVoidItem FreezePanes SID_WINDOW_FIX
] ]
SfxBoolItem FunctionBox FID_FUNCTION_BOX SfxVoidItem FunctionBox FID_FUNCTION_BOX
[ [
/* flags: */ /* flags: */
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <sfx2/dispatch.hxx> #include <sfx2/dispatch.hxx>
#include <sfx2/passwd.hxx> #include <sfx2/passwd.hxx>
#include <sfx2/request.hxx> #include <sfx2/request.hxx>
#include <sfx2/sidebar/Sidebar.hxx>
#include <svl/ptitem.hxx> #include <svl/ptitem.hxx>
#include <svl/stritem.hxx> #include <svl/stritem.hxx>
#include <tools/urlobj.hxx> #include <tools/urlobj.hxx>
...@@ -540,16 +541,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) ...@@ -540,16 +541,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_FUNCTION_BOX: case FID_FUNCTION_BOX:
{ {
sal_uInt16 nChildId = ScFunctionChildWindow::GetChildWindowId(); // First make sure that the sidebar is visible
if ( rReq.GetArgs() ) pThisFrame->ShowChildWindow(SID_SIDEBAR);
pThisFrame->SetChildWindow( nChildId, static_cast<const SfxBoolItem&>(rReq.GetArgs()->Get(FID_FUNCTION_BOX)).GetValue());
else
{
pThisFrame->ToggleChildWindow( nChildId );
rReq.AppendItem( SfxBoolItem( FID_FUNCTION_BOX , pThisFrame->HasChildWindow( nChildId ) ) );
}
GetViewFrame()->GetBindings().Invalidate(FID_FUNCTION_BOX); ::sfx2::sidebar::Sidebar::ShowPanel("FunctionsPanel",
pThisFrame->GetFrame().GetFrameInterface());
rReq.Done (); rReq.Done ();
} }
break; break;
...@@ -1107,7 +1103,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq ) ...@@ -1107,7 +1103,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
break; break;
default: default:
OSL_FAIL("Unbekannter Slot bei ScTabViewShell::Execute"); OSL_FAIL("Unknown Slot at ScTabViewShell::Execute");
break; break;
} }
} }
......
...@@ -152,7 +152,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) ...@@ -152,7 +152,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
SCCOL nPosX = rViewData.GetCurX(); SCCOL nPosX = rViewData.GetCurX();
SCROW nPosY = rViewData.GetCurY(); SCROW nPosY = rViewData.GetCurY();
SCTAB nTab = rViewData.GetTabNo(); SCTAB nTab = rViewData.GetTabNo();
sal_uInt16 nMyId = 0;
SfxViewFrame* pThisFrame = GetViewFrame(); SfxViewFrame* pThisFrame = GetViewFrame();
bool bOle = GetViewFrame()->GetFrame().IsInPlace(); bool bOle = GetViewFrame()->GetFrame().IsInPlace();
...@@ -344,11 +343,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet ) ...@@ -344,11 +343,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
} }
break; break;
case FID_FUNCTION_BOX:
nMyId = ScFunctionChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(FID_FUNCTION_BOX, pThisFrame->HasChildWindow(nMyId)));
break;
case FID_PROTECT_DOC: case FID_PROTECT_DOC:
{ {
if ( pDocShell && pDocShell->IsDocShared() ) if ( pDocShell && pDocShell->IsDocShared() )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment