summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2020-02-28 11:13:12 +0000
committerCaolán McNamara <caolanm@redhat.com>2020-03-24 11:00:50 +0100
commit5a2c0ab29719ac914d30d8789c0e386541702cbf (patch)
treea114088ae5b6d537de78db1745f9524e40baa714 /include
parent70b9775af71b0e1a4b4d0760d2884631184db5ae (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 'include')
-rw-r--r--include/sfx2/weldutils.hxx4
-rw-r--r--include/svtools/toolboxcontroller.hxx2
-rw-r--r--include/vcl/weldutils.hxx12
3 files changed, 15 insertions, 3 deletions
diff --git a/include/sfx2/weldutils.hxx b/include/sfx2/weldutils.hxx
index 8c577f9a1651..c2e05d54924a 100644
--- a/include/sfx2/weldutils.hxx
+++ b/include/sfx2/weldutils.hxx
@@ -24,6 +24,7 @@
namespace weld
{
+class Builder;
class Toolbar;
}
@@ -33,6 +34,7 @@ private:
css::uno::Reference<css::frame::XFrame> m_xFrame;
SvtMiscOptions m_aToolbarOptions;
weld::Toolbar* m_pToolbar;
+ weld::Builder* m_pBuilder;
DECL_LINK(SelectHdl, const OString&, void);
DECL_LINK(ToggleMenuHdl, const OString&, void);
@@ -47,7 +49,7 @@ private:
public:
// fill in the label and icons for actions and dispatch the action on item click
- ToolbarUnoDispatcher(weld::Toolbar& rToolbar,
+ ToolbarUnoDispatcher(weld::Toolbar& rToolbar, weld::Builder& rBuilder,
const css::uno::Reference<css::frame::XFrame>& rFrame);
css::uno::Reference<css::frame::XToolbarController>
diff --git a/include/svtools/toolboxcontroller.hxx b/include/svtools/toolboxcontroller.hxx
index b97c0e15b11a..bcf688ded0c6 100644
--- a/include/svtools/toolboxcontroller.hxx
+++ b/include/svtools/toolboxcontroller.hxx
@@ -47,6 +47,7 @@ class ToolBox;
namespace weld
{
+ class Builder;
class Toolbar;
}
@@ -184,6 +185,7 @@ class SVT_DLLPUBLIC ToolboxController :
css::uno::Reference< css::util::XURLTransformer > m_xUrlTransformer;
OUString m_sModuleName;
weld::Toolbar* m_pToolbar;
+ weld::Builder* m_pBuilder;
};
}
diff --git a/include/vcl/weldutils.hxx b/include/vcl/weldutils.hxx
index dc2ca29150ac..fdc9e8cf30d6 100644
--- a/include/vcl/weldutils.hxx
+++ b/include/vcl/weldutils.hxx
@@ -27,6 +27,7 @@ class VCL_DLLPUBLIC TransportAsXWindow : public TransportAsXWindow_Base
private:
osl::Mutex m_aHelperMtx;
weld::Widget* m_pWeldWidget;
+ weld::Builder* m_pWeldWidgetBuilder;
comphelper::OInterfaceContainerHelper2 m_aWindowListeners;
comphelper::OInterfaceContainerHelper2 m_aKeyListeners;
@@ -36,9 +37,10 @@ private:
comphelper::OInterfaceContainerHelper2 m_aPaintListeners;
public:
- TransportAsXWindow(weld::Widget* pWeldWidget)
+ TransportAsXWindow(weld::Widget* pWeldWidget, weld::Builder* pWeldWidgetBuilder = nullptr)
: TransportAsXWindow_Base(m_aHelperMtx)
, m_pWeldWidget(pWeldWidget)
+ , m_pWeldWidgetBuilder(pWeldWidgetBuilder)
, m_aWindowListeners(m_aHelperMtx)
, m_aKeyListeners(m_aHelperMtx)
, m_aFocusListeners(m_aHelperMtx)
@@ -50,7 +52,13 @@ public:
weld::Widget* getWidget() const { return m_pWeldWidget; }
- virtual void clear() { m_pWeldWidget = nullptr; }
+ weld::Builder* getBuilder() const { return m_pWeldWidgetBuilder; }
+
+ virtual void clear()
+ {
+ m_pWeldWidget = nullptr;
+ m_pWeldWidgetBuilder = nullptr;
+ }
// css::awt::XWindow
void SAL_CALL setPosSize(sal_Int32, sal_Int32, sal_Int32, sal_Int32, sal_Int16) override