diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-02-28 11:13:12 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-03-24 11:00:50 +0100 |
commit | 5a2c0ab29719ac914d30d8789c0e386541702cbf (patch) | |
tree | a114088ae5b6d537de78db1745f9524e40baa714 /sfx2/source | |
parent | 70b9775af71b0e1a4b4d0760d2884631184db5ae (diff) |
weld writer navigator
GtkToggleToolButton are much wider than vcl equivalents. Split the bottom
toolbar into two toolbars. Rearrange their contents so the layout of each level
visually match.
Notes:
Master documents have two modes, master content tree and the normal content
tree.
You can drag entries from the content tree into the document, drag mode drop
down controls whether its a link or a copy etc that's dropped in.
Documents can be dropped into the content and global trees.
If outline tracking isn't active, then when content changes the tree is cleared
and refilled, typically an effort is made to reselect the same entry that was
previously selected. Additionally, if the amount of content didn't change an
effort is made to scroll back to the location the scrollbar was at before the
clear.
Change-Id: I00c015145eac5b1acc3398d3c40861d830e4264a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89725
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/dialog/recfloat.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/sidebar/ControllerFactory.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/toolbox/weldutils.cxx | 7 |
3 files changed, 10 insertions, 5 deletions
diff --git a/sfx2/source/dialog/recfloat.cxx b/sfx2/source/dialog/recfloat.cxx index 28073a3130b9..18833ea5edfa 100644 --- a/sfx2/source/dialog/recfloat.cxx +++ b/sfx2/source/dialog/recfloat.cxx @@ -100,7 +100,7 @@ SfxRecordingFloat_Impl::SfxRecordingFloat_Impl(SfxBindings* pBind, SfxChildWindo : SfxModelessDialogController(pBind, pChildWin, pParent, "sfx/ui/floatingrecord.ui", "FloatingRecord") , m_xToolbar(m_xBuilder->weld_toolbar("toolbar")) - , m_xDispatcher(new ToolbarUnoDispatcher(*m_xToolbar, pBind->GetActiveFrame())) + , m_xDispatcher(new ToolbarUnoDispatcher(*m_xToolbar, *m_xBuilder, pBind->GetActiveFrame())) { // start recording SfxBoolItem aItem( SID_RECORDMACRO, true ); diff --git a/sfx2/source/sidebar/ControllerFactory.cxx b/sfx2/source/sidebar/ControllerFactory.cxx index ef07c0827f7b..71d5a3649007 100644 --- a/sfx2/source/sidebar/ControllerFactory.cxx +++ b/sfx2/source/sidebar/ControllerFactory.cxx @@ -139,11 +139,11 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController( } Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController( - weld::Toolbar& rToolbar, + weld::Toolbar& rToolbar, weld::Builder& rBuilder, const OUString& rsCommandName, const Reference<frame::XFrame>& rxFrame) { - css::uno::Reference<css::awt::XWindow> xWidget(new weld::TransportAsXWindow(&rToolbar)); + css::uno::Reference<css::awt::XWindow> xWidget(new weld::TransportAsXWindow(&rToolbar, &rBuilder)); Reference<frame::XToolbarController> xController( CreateToolBarController( @@ -188,6 +188,8 @@ Reference<frame::XToolbarController> ControllerFactory::CreateToolBoxController( if (xController.is()) { + xController->createItemWindow(xWidget); + Reference<util::XUpdatable> xUpdatable(xController, UNO_QUERY); if (xUpdatable.is()) xUpdatable->update(); diff --git a/sfx2/source/toolbox/weldutils.cxx b/sfx2/source/toolbox/weldutils.cxx index 1be8559d4d87..c35f9047cf20 100644 --- a/sfx2/source/toolbox/weldutils.cxx +++ b/sfx2/source/toolbox/weldutils.cxx @@ -71,10 +71,11 @@ vcl::ImageType ToolbarUnoDispatcher::GetIconSize() const return eType; } -ToolbarUnoDispatcher::ToolbarUnoDispatcher(weld::Toolbar& rToolbar, +ToolbarUnoDispatcher::ToolbarUnoDispatcher(weld::Toolbar& rToolbar, weld::Builder& rBuilder, const css::uno::Reference<css::frame::XFrame>& rFrame) : m_xFrame(rFrame) , m_pToolbar(&rToolbar) + , m_pBuilder(&rBuilder) { rToolbar.connect_clicked(LINK(this, ToolbarUnoDispatcher, SelectHdl)); rToolbar.connect_menu_toggled(LINK(this, ToolbarUnoDispatcher, ToggleMenuHdl)); @@ -112,7 +113,8 @@ ToolbarUnoDispatcher::ToolbarUnoDispatcher(weld::Toolbar& rToolbar, void ToolbarUnoDispatcher::CreateController(const OUString& rCommand) { css::uno::Reference<css::frame::XToolbarController> xController( - sfx2::sidebar::ControllerFactory::CreateToolBoxController(*m_pToolbar, rCommand, m_xFrame)); + sfx2::sidebar::ControllerFactory::CreateToolBoxController(*m_pToolbar, *m_pBuilder, + rCommand, m_xFrame)); if (xController.is()) maControllers.insert(std::make_pair(rCommand, xController)); @@ -190,6 +192,7 @@ void ToolbarUnoDispatcher::dispose() m_pToolbar->connect_clicked(Link<const OString&, void>()); m_pToolbar = nullptr; + m_pBuilder = nullptr; } ToolbarUnoDispatcher::~ToolbarUnoDispatcher() { dispose(); } |