include/vcl/notebookbar.hxx | 2 -- sfx2/source/notebookbar/SfxNotebookBar.cxx | 4 ++-- vcl/source/control/notebookbar.cxx | 11 ----------- 3 files changed, 2 insertions(+), 15 deletions(-)
New commits: commit a2765c02cd44a7f4ab7d30716d8fe7c1811aa3a6 Author: Szymon KÅos <eszka...@gmail.com> Date: Fri Sep 30 22:57:35 2016 +0200 Notebookbar: fixed context handling After last changes context switching was not working. Removed unnecessary Resize call to avoid flickering. Change-Id: I7931f4d442737c704c41bb7944c6d95e45b964f7 Reviewed-on: https://gerrit.libreoffice.org/29411 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Szymon KÅos <eszka...@gmail.com> diff --git a/include/vcl/notebookbar.hxx b/include/vcl/notebookbar.hxx index 3f22162..a2ad0fe 100644 --- a/include/vcl/notebookbar.hxx +++ b/include/vcl/notebookbar.hxx @@ -30,8 +30,6 @@ public: void SetIconClickHdl(Link<NotebookBar*, void> aHdl); - virtual void StateChanged(StateChangedType nType) override; - const css::uno::Reference<css::ui::XContextChangeEventListener>& getContextChangeEventListener() const { return m_pEventListener; } private: css::uno::Reference<css::ui::XContextChangeEventListener> m_pEventListener; diff --git a/sfx2/source/notebookbar/SfxNotebookBar.cxx b/sfx2/source/notebookbar/SfxNotebookBar.cxx index db8db52..dd3bb66 100644 --- a/sfx2/source/notebookbar/SfxNotebookBar.cxx +++ b/sfx2/source/notebookbar/SfxNotebookBar.cxx @@ -252,8 +252,6 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, if (IsActive()) { - RemoveListeners(pSysWindow); - const Reference<frame::XModuleManager> xModuleManager = frame::ModuleManager::create( ::comphelper::getProcessComponentContext() ); vcl::EnumContext::Application eApp = vcl::EnumContext::GetApplicationEnum(xModuleManager->identify(xFrame)); OUString sFile = lcl_getNotebookbarFileName( eApp ); @@ -275,6 +273,8 @@ bool SfxNotebookBar::StateMethod(SystemWindow* pSysWindow, if ( ( !sFile.isEmpty() && bChangedFile ) || !pSysWindow->GetNotebookBar()->IsVisible() ) { + RemoveListeners(pSysWindow); + OUStringBuffer aBuf(rUIFile); aBuf.append( sFile ); diff --git a/vcl/source/control/notebookbar.cxx b/vcl/source/control/notebookbar.cxx index 9a93187..2ff1c3e 100644 --- a/vcl/source/control/notebookbar.cxx +++ b/vcl/source/control/notebookbar.cxx @@ -99,17 +99,6 @@ void NotebookBar::SetIconClickHdl(Link<NotebookBar*, void> aHdl) m_pContextContainer->SetIconClickHdl(aHdl); } -void NotebookBar::StateChanged(StateChangedType nType) -{ - if (nType == StateChangedType::Visible) - { - // visibility changed, update the container - GetParent()->Resize(); - } - - Control::StateChanged(nType); -} - void SAL_CALL NotebookBarContextChangeEventListener::notifyContextChangeEvent(const css::ui::ContextChangeEventObject& rEvent) throw (css::uno::RuntimeException, std::exception) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits