summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorMaxim Monastirsky <momonasmon@gmail.com>2020-08-12 15:42:50 +0300
committerMaxim Monastirsky <momonasmon@gmail.com>2020-08-13 00:40:05 +0200
commit839b27f249197c83ce0260396a67a2f15bdf4e9a (patch)
treeaba269e9b4bf92c617c2e29c463d2c1fa6dff603 /include/svtools
parentd9f944ce9447ec86b3536c9fc8f6f8c6dd450a73 (diff)
Merge toolbar popup classes
Now that all popups are welded. Change-Id: I5ad8a4eb6b9512ea9dd075b56d0ae6ee201fff19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100597 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/toolbarmenu.hxx53
1 files changed, 11 insertions, 42 deletions
diff --git a/include/svtools/toolbarmenu.hxx b/include/svtools/toolbarmenu.hxx
index c08da7e9c899..6e8aa5588de2 100644
--- a/include/svtools/toolbarmenu.hxx
+++ b/include/svtools/toolbarmenu.hxx
@@ -33,45 +33,7 @@ namespace com :: sun :: star :: frame { class XFrame; }
namespace com :: sun :: star :: frame { struct FeatureStateEvent; }
namespace svt { class FrameStatusListener; }
-namespace svtools {
-
-class SVT_DLLPUBLIC ToolbarPopupBase
-{
- friend class ToolbarPopupStatusListener;
-public:
- ToolbarPopupBase(const css::uno::Reference<css::frame::XFrame>& rFrame);
- virtual ~ToolbarPopupBase();
-
-protected:
- void AddStatusListener( const OUString& rCommandURL );
-
- // Forwarded from XStatusListener (subclasses must override this one to get the status updates):
- /// @throws css::uno::RuntimeException
- virtual void statusChanged(const css::frame::FeatureStateEvent& Event );
-
- css::uno::Reference<css::frame::XFrame> mxFrame;
- rtl::Reference<svt::FrameStatusListener> mxStatusListener;
-};
-
-class UNLESS_MERGELIBS(SVT_DLLPUBLIC) ToolbarPopup : public DockingWindow, public ToolbarPopupBase
-{
-public:
- ToolbarPopup(const css::uno::Reference<css::frame::XFrame>& rFrame,
- vcl::Window* pParentWindow,
- const OString& rID, const OUString& rUIXMLDescription );
- virtual ~ToolbarPopup() override;
- virtual void dispose() override;
-
-protected:
- void EndPopupMode();
-
-private:
- void init();
-};
-
-} // namespace svtools
-
-class SVT_DLLPUBLIC WeldToolbarPopup : public svtools::ToolbarPopupBase
+class SVT_DLLPUBLIC WeldToolbarPopup
{
private:
DECL_LINK(FocusHdl, weld::Widget&, void);
@@ -80,14 +42,20 @@ protected:
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Container> m_xTopLevel;
std::unique_ptr<weld::Container> m_xContainer;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
+ rtl::Reference<svt::FrameStatusListener> m_xStatusListener;
public:
WeldToolbarPopup(const css::uno::Reference<css::frame::XFrame>& rFrame,
weld::Widget* pParent, const OUString& rUIFile, const OString& rId);
- virtual ~WeldToolbarPopup() override;
+ virtual ~WeldToolbarPopup();
weld::Container* getTopLevel() { return m_xTopLevel.get(); }
weld::Container* getContainer() { return m_xContainer.get(); }
+ void AddStatusListener(const OUString& rCommandURL);
+ // Forwarded from XStatusListener (subclasses must override this one to get the status updates):
+ /// @throws css::uno::RuntimeException
+ virtual void statusChanged(const css::frame::FeatureStateEvent& Event);
virtual void GrabFocus() = 0;
};
@@ -116,10 +84,11 @@ public:
void unsetPopover();
};
-class SVT_DLLPUBLIC InterimToolbarPopup final : public svtools::ToolbarPopup
+class SVT_DLLPUBLIC InterimToolbarPopup final : public DockingWindow
{
private:
VclPtr<vcl::Window> m_xBox;
+ css::uno::Reference<css::frame::XFrame> m_xFrame;
std::unique_ptr<weld::Builder> m_xBuilder;
std::unique_ptr<weld::Container> m_xContainer;
std::unique_ptr<WeldToolbarPopup> m_xPopup;
@@ -132,7 +101,7 @@ public:
virtual void GetFocus() override;
- using ToolbarPopup::EndPopupMode;
+ void EndPopupMode();
};
#endif