sidebar: disable impress task pane if sidebar is enabled.
Change-Id: I64e601dfd6f4a3763188537f9507c536b86b70fe
This commit is contained in:
parent
abdbb847fa
commit
ee1726bfdb
4 changed files with 21 additions and 6 deletions
|
@ -126,7 +126,7 @@ void SdDLL::RegisterControllers()
|
|||
::avmedia::MediaPlayer::RegisterChildWindow(0, pMod);
|
||||
::sd::LeftPaneImpressChildWindow::RegisterChildWindow(0, pMod);
|
||||
::sd::LeftPaneDrawChildWindow::RegisterChildWindow(0, pMod);
|
||||
::sd::ToolPanelChildWindow::RegisterChildWindow(0, pMod);
|
||||
::sd::ToolPanelChildWindow::RegisterChildWindowIfEnabled(0, pMod);
|
||||
::sfx2::sidebar::SidebarChildWindow::RegisterChildWindowIfEnabled(0, pMod);
|
||||
|
||||
SvxFillToolBoxControl::RegisterControl(0, pMod);
|
||||
|
|
|
@ -215,6 +215,14 @@ void ToolPanelChildWindow::ActivateToolPanel( const OUString& i_rPanelURL )
|
|||
}
|
||||
}
|
||||
|
||||
void ToolPanelChildWindow::RegisterChildWindowIfEnabled (sal_Bool bVisible,
|
||||
SfxModule *pMod,
|
||||
sal_uInt16 nFlags)
|
||||
{
|
||||
if ( ! SfxViewFrame::IsSidebarEnabled() )
|
||||
RegisterChildWindow( bVisible, pMod, nFlags );
|
||||
}
|
||||
|
||||
} // end of namespace ::sd
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
|
|
@ -70,6 +70,8 @@ public:
|
|||
|
||||
SFX_DECL_CHILDWINDOW_WITHID( ToolPanelChildWindow );
|
||||
|
||||
static void RegisterChildWindowIfEnabled (sal_Bool bVisible=sal_False, SfxModule *pMod=NULL, sal_uInt16 nFlags=0);
|
||||
|
||||
// ::sfx2::ITaskPaneToolPanelAccess
|
||||
virtual void ActivateToolPanel( const OUString& i_rPanelURL );
|
||||
};
|
||||
|
|
|
@ -3418,21 +3418,26 @@ bool SfxViewFrame::IsSidebarEnabled()
|
|||
}
|
||||
|
||||
// rip out the services from framework/ for good measure
|
||||
if( !bEnabled )
|
||||
try
|
||||
{
|
||||
try
|
||||
uno::Reference< ui::XUIElementFactoryManager > xUIElementFactory = ui::UIElementFactoryManager::create( xContext );
|
||||
if( !bEnabled )
|
||||
{
|
||||
uno::Reference< ui::XUIElementFactoryManager > xUIElementFactory = ui::UIElementFactoryManager::create( xContext );
|
||||
xUIElementFactory->deregisterFactory( "toolpanel", "ScPanelFactory", "" );
|
||||
xUIElementFactory->deregisterFactory( "toolpanel", "SwPanelFactory", "" );
|
||||
xUIElementFactory->deregisterFactory( "toolpanel", "SvxPanelFactory", "" );
|
||||
xUIElementFactory->deregisterFactory( "toolpanel", "SdPanelFactory", "" );
|
||||
}
|
||||
catch ( const uno::Exception &e )
|
||||
else
|
||||
{
|
||||
SAL_WARN( "sfx2.view", "Exception de-registering sidebar factories " << e.Message );
|
||||
xUIElementFactory->deregisterFactory( "toolpanel", "DrawingFramework",
|
||||
"com.sun.star.presentation.PresentationDocument" );
|
||||
}
|
||||
}
|
||||
catch ( const uno::Exception &e )
|
||||
{
|
||||
SAL_WARN( "sfx2.view", "Exception de-registering sidebar factories " << e.Message );
|
||||
}
|
||||
}
|
||||
|
||||
return bEnabled;
|
||||
|
|
Loading…
Reference in a new issue