diff options
author | Szymon Kłos <eszkadev@gmail.com> | 2016-06-17 23:54:00 +0200 |
---|---|---|
committer | Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> | 2016-06-27 17:51:56 +0000 |
commit | 1df394503f1e62b091453c95c05a212892ae8d58 (patch) | |
tree | 4767346ce348cc498df09985b6fa431a45f255d3 /svx/source/sidebar/SelectionChangeHandler.cxx | |
parent | 0c80b4dfd27109def7a5bdc34c3fcc5499db6c0d (diff) |
GSoC notebookbar: switching tabs depending on context
+ sfx2::sidebar::EnumContext moved to the vcl module
+ TabPage contains vector with context values
+ vcl builder reads control's contexts from the "class" mark
+ ContextTabControl shows tabs depending on context
Change-Id: I661b0d3f35d46ace2a2e8eb1d374148f0c60017d
Reviewed-on: https://gerrit.libreoffice.org/26447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Diffstat (limited to 'svx/source/sidebar/SelectionChangeHandler.cxx')
-rw-r--r-- | svx/source/sidebar/SelectionChangeHandler.cxx | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/svx/source/sidebar/SelectionChangeHandler.cxx b/svx/source/sidebar/SelectionChangeHandler.cxx index 2cc8cc9b9a84..76430afbd6b0 100644 --- a/svx/source/sidebar/SelectionChangeHandler.cxx +++ b/svx/source/sidebar/SelectionChangeHandler.cxx @@ -21,21 +21,19 @@ #include "svx/sidebar/ContextChangeEventMultiplexer.hxx" #include "svx/svdmrkv.hxx" -#include <sfx2/sidebar/EnumContext.hxx> +#include <vcl/EnumContext.hxx> #include <sfx2/shell.hxx> using namespace css; using namespace css::uno; -using namespace sfx2::sidebar; - namespace svx { namespace sidebar { SelectionChangeHandler::SelectionChangeHandler ( const std::function<rtl::OUString()>& rSelectionChangeCallback, const Reference<css::frame::XController>& rxController, - const EnumContext::Context eDefaultContext) + const vcl::EnumContext::Context eDefaultContext) : SelectionChangeHandlerInterfaceBase(m_aMutex), maSelectionChangeCallback(rSelectionChangeCallback), mxController(rxController), @@ -55,11 +53,11 @@ void SAL_CALL SelectionChangeHandler::selectionChanged (const lang::EventObject& { if (maSelectionChangeCallback) { - const EnumContext::Context eContext ( - EnumContext::GetContextEnum(maSelectionChangeCallback())); + const vcl::EnumContext::Context eContext ( + vcl::EnumContext::GetContextEnum(maSelectionChangeCallback())); ContextChangeEventMultiplexer::NotifyContextChange( mxController, - eContext==EnumContext::Context_Unknown + eContext==vcl::EnumContext::Context_Unknown ? meDefaultContext : eContext); } |