summaryrefslogtreecommitdiff
path: root/sfx2/source/view/viewfrm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2/source/view/viewfrm.cxx')
-rw-r--r--sfx2/source/view/viewfrm.cxx65
1 files changed, 1 insertions, 64 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx
index 1534261dd592..7dbe506431fa 100644
--- a/sfx2/source/view/viewfrm.cxx
+++ b/sfx2/source/view/viewfrm.cxx
@@ -102,7 +102,6 @@ using ::com::sun::star::container::XIndexContainer;
// Due to ViewFrame::Current
#include "appdata.hxx"
-#include <sfx2/taskpane.hxx>
#include <sfx2/app.hxx>
#include <sfx2/objface.hxx>
#include "openflag.hxx"
@@ -154,20 +153,6 @@ void SfxViewFrame::InitInterface_Impl()
#endif
}
-
-namespace
-{
- bool moduleHasToolPanels( SfxViewFrame_Impl& i_rViewFrameImpl )
- {
- if ( !i_rViewFrameImpl.aHasToolPanels )
- {
- i_rViewFrameImpl.aHasToolPanels.reset( ::sfx2::ModuleTaskPane::ModuleHasToolPanels(
- i_rViewFrameImpl.rFrame.GetFrameInterface() ) );
- }
- return *i_rViewFrameImpl.aHasToolPanels;
- }
-}
-
static bool AskPasswordToModify_Impl( const uno::Reference< task::XInteractionHandler >& xHandler, const OUString& aPath, const SfxFilter* pFilter, sal_uInt32 nPasswordHash, const uno::Sequence< beans::PropertyValue >& aInfo )
{
// TODO/LATER: In future the info should replace the direct hash completely
@@ -3116,27 +3101,11 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState )
else if ( KnowsChildWindow(nSID) )
rState.Put( SfxBoolItem( nSID, HasChildWindow(nSID) ) );
}
- else if ( nSID == SID_TASKPANE )
- {
- if ( !KnowsChildWindow( nSID ) )
- {
- OSL_FAIL( "SID_TASKPANE state requested, but no task pane child window exists for this ID!" );
- rState.DisableItem( nSID );
- }
- else if ( !moduleHasToolPanels( *pImp ) )
- {
- rState.Put( SfxVisibilityItem( nSID, false ) );
- }
- else
- {
- rState.Put( SfxBoolItem( nSID, HasChildWindow( nSID ) ) );
- }
- }
else if ( nSID == SID_SIDEBAR )
{
if ( !KnowsChildWindow( nSID ) )
{
- OSL_ENSURE( false, "SID_TASKPANE state requested, but no task pane child window exists for this ID!" );
+ OSL_ENSURE( false, "SID_SIDEBAR state requested, but no task pane child window exists for this ID!" );
rState.DisableItem( nSID );
}
else
@@ -3214,38 +3183,6 @@ void SfxViewFrame::SetViewFrame( SfxViewFrame* pFrame )
SfxGetpApp()->SetViewFrame_Impl( pFrame );
}
-void SfxViewFrame::ActivateToolPanel( const css::uno::Reference< css::frame::XFrame >& i_rFrame, const OUString& i_rPanelURL )
-{
- SolarMutexGuard aGuard;
-
- // look up the SfxFrame for the given XFrame
- SfxFrame* pFrame = nullptr;
- for ( pFrame = SfxFrame::GetFirst(); pFrame; pFrame = SfxFrame::GetNext( *pFrame ) )
- {
- if ( pFrame->GetFrameInterface() == i_rFrame )
- break;
- }
- SfxViewFrame* pViewFrame = pFrame ? pFrame->GetCurrentViewFrame() : nullptr;
- ENSURE_OR_RETURN_VOID( pViewFrame != nullptr, "SfxViewFrame::ActivateToolPanel: did not find an SfxFrame for the given XFrame!" );
-
- pViewFrame->ActivateToolPanel_Impl( i_rPanelURL );
-}
-
-void SfxViewFrame::ActivateToolPanel_Impl( const OUString& i_rPanelURL )
-{
- // ensure the task pane is visible
- ENSURE_OR_RETURN_VOID( KnowsChildWindow( SID_TASKPANE ), "SfxViewFrame::ActivateToolPanel: this frame/module does not allow for a task pane!" );
- if ( !HasChildWindow( SID_TASKPANE ) )
- ToggleChildWindow( SID_TASKPANE );
-
- SfxChildWindow* pTaskPaneChildWindow = GetChildWindow( SID_TASKPANE );
- ENSURE_OR_RETURN_VOID( pTaskPaneChildWindow, "SfxViewFrame::ActivateToolPanel_Impl: just switched it on, but it is not there!" );
-
- ::sfx2::ITaskPaneToolPanelAccess* pPanelAccess = dynamic_cast< ::sfx2::ITaskPaneToolPanelAccess* >( pTaskPaneChildWindow );
- ENSURE_OR_RETURN_VOID( pPanelAccess, "SfxViewFrame::ActivateToolPanel_Impl: task pane child window does not implement a required interface!" );
- pPanelAccess->ActivateToolPanel( i_rPanelURL );
-}
-
SfxInfoBarWindow* SfxViewFrame::AppendInfoBar( const OUString& sId, const OUString& sMessage )
{
const sal_uInt16 nId = SfxInfoBarContainerChild::GetChildWindowId();