summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorSzymon Kłos <eszkadev@gmail.com>2017-03-16 09:15:55 +0100
committerSzymon Kłos <eszkadev@gmail.com>2017-03-16 15:45:27 +0000
commitc97d78eaa95e9ff0cef7b467ba566af56e3e7c27 (patch)
treea94836c8f6f6260399eb52a6a2f4365dd4eadea1 /sfx2
parent9e77785b6fcf5aed2a51b7cbbe1ccd5f5e266851 (diff)
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>
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/notebookbar/NotebookbarTabControl.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/sfx2/source/notebookbar/NotebookbarTabControl.cxx b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
index 47a230097542..a443c045ffa1 100644
--- a/sfx2/source/notebookbar/NotebookbarTabControl.cxx
+++ b/sfx2/source/notebookbar/NotebookbarTabControl.cxx
@@ -143,7 +143,7 @@ void NotebookbarTabControl::StateChanged(StateChangedType nStateChange)
pShortcuts->Show();
SetToolBox( static_cast<ToolBox*>( pShortcuts.get() ) );
- SetIconClickHdl( LINK( nullptr, NotebookbarTabControl, OpenNotebookbarPopupMenu ) );
+ SetIconClickHdl( LINK( this, NotebookbarTabControl, OpenNotebookbarPopupMenu ) );
m_pListener = new ChangedUIEventListener( this );
@@ -159,10 +159,10 @@ void NotebookbarTabControl::StateChanged(StateChangedType nStateChange)
Reference<XComponentContext> xContext = comphelper::getProcessComponentContext();
const Reference<XModuleManager> xModuleManager = ModuleManager::create( xContext );
- Reference<XFrame> xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface();
- OUString aModuleName = xModuleManager->identify( xFrame );
+ m_xFrame = SfxViewFrame::Current()->GetFrame().GetFrameInterface();
+ OUString aModuleName = xModuleManager->identify( m_xFrame );
- FillShortcutsToolBox( xContext, xFrame, aModuleName, pToolBox );
+ FillShortcutsToolBox( xContext, m_xFrame, aModuleName, pToolBox );
Size aSize( pToolBox->GetOptimalSize() );
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 && pViewFrame)
+ if (pNotebookbar && m_xFrame.is())
{
Sequence<Any> aArgs {
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<XPopupMenuController> xPopupController(