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
]
SfxBoolItem FunctionBox FID_FUNCTION_BOX
SfxVoidItem FunctionBox FID_FUNCTION_BOX
[
/* flags: */
......
......@@ -25,6 +25,7 @@
#include <sfx2/dispatch.hxx>
#include <sfx2/passwd.hxx>
#include <sfx2/request.hxx>
#include <sfx2/sidebar/Sidebar.hxx>
#include <svl/ptitem.hxx>
#include <svl/stritem.hxx>
#include <tools/urlobj.hxx>
......@@ -540,16 +541,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case FID_FUNCTION_BOX:
{
sal_uInt16 nChildId = ScFunctionChildWindow::GetChildWindowId();
if ( rReq.GetArgs() )
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 ) ) );
}
// First make sure that the sidebar is visible
pThisFrame->ShowChildWindow(SID_SIDEBAR);
GetViewFrame()->GetBindings().Invalidate(FID_FUNCTION_BOX);
::sfx2::sidebar::Sidebar::ShowPanel("FunctionsPanel",
pThisFrame->GetFrame().GetFrameInterface());
rReq.Done ();
}
break;
......@@ -1107,7 +1103,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
break;
default:
OSL_FAIL("Unbekannter Slot bei ScTabViewShell::Execute");
OSL_FAIL("Unknown Slot at ScTabViewShell::Execute");
break;
}
}
......
......@@ -152,7 +152,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
SCCOL nPosX = rViewData.GetCurX();
SCROW nPosY = rViewData.GetCurY();
SCTAB nTab = rViewData.GetTabNo();
sal_uInt16 nMyId = 0;
SfxViewFrame* pThisFrame = GetViewFrame();
bool bOle = GetViewFrame()->GetFrame().IsInPlace();
......@@ -344,11 +343,6 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
}
break;
case FID_FUNCTION_BOX:
nMyId = ScFunctionChildWindow::GetChildWindowId();
rSet.Put(SfxBoolItem(FID_FUNCTION_BOX, pThisFrame->HasChildWindow(nMyId)));
break;
case FID_PROTECT_DOC:
{
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