tdf#103355 Working menu after closing slideshow
Change-Id: Ic6bfb6f9a86d9c475d2d3368b924b56a89c90551 Reviewed-on: https://gerrit.libreoffice.org/35251 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <eszkadev@gmail.com>
This commit is contained in:
parent
9e77785b6f
commit
c97d78eaa9
@ -32,9 +32,10 @@ private:
|
|||||||
const OUString& aModuleName,
|
const OUString& aModuleName,
|
||||||
ToolBox* pShortcuts
|
ToolBox* pShortcuts
|
||||||
);
|
);
|
||||||
DECL_STATIC_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, void);
|
DECL_LINK(OpenNotebookbarPopupMenu, NotebookBar*, void);
|
||||||
|
|
||||||
ChangedUIEventListener* m_pListener;
|
ChangedUIEventListener* m_pListener;
|
||||||
|
css::uno::Reference<css::frame::XFrame> m_xFrame;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_bInitialized;
|
bool m_bInitialized;
|
||||||
|
@ -143,7 +143,7 @@ void NotebookbarTabControl::StateChanged(StateChangedType nStateChange)
|
|||||||
pShortcuts->Show();
|
pShortcuts->Show();
|
||||||
|
|
||||||
SetToolBox( static_cast<ToolBox*>( pShortcuts.get() ) );
|
SetToolBox( static_cast<ToolBox*>( pShortcuts.get() ) );
|
||||||
SetIconClickHdl( LINK( nullptr, NotebookbarTabControl, OpenNotebookbarPopupMenu ) );
|
SetIconClickHdl( LINK( this, NotebookbarTabControl, OpenNotebookbarPopupMenu ) );
|
||||||
|
|
||||||
m_pListener = new ChangedUIEventListener( this );
|
m_pListener = new ChangedUIEventListener( this );
|
||||||
|
|
||||||
@ -159,10 +159,10 @@ void NotebookbarTabControl::StateChanged(StateChangedType nStateChange)
|
|||||||
|
|
||||||
Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
|
Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
|
||||||
const Reference<XModuleManager> xModuleManager = ModuleManager::create( xContext );
|
const Reference<XModuleManager> xModuleManager = ModuleManager::create( xContext );
|
||||||
Reference<XFrame> xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface();
|
m_xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface();
|
||||||
OUString aModuleName = xModuleManager->identify( xFrame );
|
OUString aModuleName = xModuleManager->identify( m_xFrame );
|
||||||
|
|
||||||
FillShortcutsToolBox( xContext, xFrame, aModuleName, pToolBox );
|
FillShortcutsToolBox( xContext, m_xFrame, aModuleName, pToolBox );
|
||||||
|
|
||||||
Size aSize( pToolBox->GetOptimalSize() );
|
Size aSize( pToolBox->GetOptimalSize() );
|
||||||
Point aPos( ICON_SIZE + 10, 0 );
|
Point aPos( ICON_SIZE + 10, 0 );
|
||||||
@ -229,14 +229,13 @@ void NotebookbarTabControl::FillShortcutsToolBox(Reference<XComponentContext>& x
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMPL_STATIC_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, pNotebookbar, void)
|
IMPL_LINK(NotebookbarTabControl, OpenNotebookbarPopupMenu, NotebookBar*, pNotebookbar, void)
|
||||||
{
|
{
|
||||||
SfxViewFrame* pViewFrame = SfxViewFrame::Current();
|
if (pNotebookbar && m_xFrame.is())
|
||||||
if (pNotebookbar && pViewFrame)
|
|
||||||
{
|
{
|
||||||
Sequence<Any> aArgs {
|
Sequence<Any> aArgs {
|
||||||
makeAny(comphelper::makePropertyValue("Value", OUString("notebookbar"))),
|
makeAny(comphelper::makePropertyValue("Value", OUString("notebookbar"))),
|
||||||
makeAny(comphelper::makePropertyValue("Frame", pViewFrame->GetFrame().GetFrameInterface())) };
|
makeAny(comphelper::makePropertyValue("Frame", m_xFrame)) };
|
||||||
|
|
||||||
Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
|
Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
|
||||||
Reference<XPopupMenuController> xPopupController(
|
Reference<XPopupMenuController> xPopupController(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user