summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-12-05 13:22:06 +0100
committerSamuel Mehrbrodt <s.mehrbrodt@gmail.com>2014-12-05 13:22:49 +0100
commit2f90974fd06870457301ec0be0ab8c43981689ec (patch)
tree2c15bfd9ed7ff86ee7ff810aed0de69d2ecf265d
parente6aa6daccf14827d92fd50a300738dda68527eb5 (diff)
fdo85897 Make 'Function List' only accessible in sidebar
Change-Id: I875d1dd75c02f617814a934b34b5099f9c2279cc
-rw-r--r--sc/sdi/scalc.sdi2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx16
-rw-r--r--sc/source/ui/view/tabvwsha.cxx6
3 files changed, 7 insertions, 17 deletions
diff --git a/sc/sdi/scalc.sdi b/sc/sdi/scalc.sdi
index e196e852e69b..2fbf3733ff75 100644
--- a/sc/sdi/scalc.sdi
+++ b/sc/sdi/scalc.sdi
@@ -2866,7 +2866,7 @@ SfxVoidItem FreezePanes SID_WINDOW_FIX
]
-SfxBoolItem FunctionBox FID_FUNCTION_BOX
+SfxVoidItem FunctionBox FID_FUNCTION_BOX
[
/* flags: */
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index 312ff21905be..8253b37d35df 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -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;
}
}
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index e543588a2f05..6c2896db131c 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -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() )