diff options
author | Caolán McNamara <caolanm@redhat.com> | 2019-06-25 15:21:40 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2019-06-25 21:10:12 +0200 |
commit | 2cebba0e4042ca2cab37cf38874c2576c2ac6a6f (patch) | |
tree | 6d48a4057e4e6ff8f349ddba11e5d0d3122324f2 /sc/source/ui/inc/tphfedit.hxx | |
parent | 2ec032e01f03ae22ead30be77b8e89b861504128 (diff) |
use common WeldEditView
Change-Id: I873cb64a167027030c9eeef61344e6f6f885a924
Reviewed-on: https://gerrit.libreoffice.org/74705
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/inc/tphfedit.hxx')
-rw-r--r-- | sc/source/ui/inc/tphfedit.hxx | 39 |
1 files changed, 8 insertions, 31 deletions
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx index 87deb5f7a94b..ce47f287a6c4 100644 --- a/sc/source/ui/inc/tphfedit.hxx +++ b/sc/source/ui/inc/tphfedit.hxx @@ -23,7 +23,7 @@ #include <scdllapi.h> #include <cppuhelper/weakref.hxx> #include <tools/wintypes.hxx> -#include <editeng/editview.hxx> +#include <editeng/weldeditview.hxx> #include <editeng/svxenum.hxx> #include <vcl/customweld.hxx> @@ -46,8 +46,7 @@ enum ScEditWindowLocation Right }; -class SC_DLLPUBLIC ScEditWindow : public weld::CustomWidgetController - , public EditViewCallbacks +class SC_DLLPUBLIC ScEditWindow : public WeldEditView { public: ScEditWindow(ScEditWindowLocation eLoc, weld::Window* pParent); @@ -65,40 +64,17 @@ public: virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override; - ScHeaderEditEngine* GetEditEngine() const { return pEdEngine.get(); } + ScHeaderEditEngine* GetEditEngine() const; void SetObjectSelectHdl( const Link<ScEditWindow&,void>& aLink) { aObjectSelectLink = aLink; } void SetGetFocusHdl(const std::function<void (ScEditWindow&)>& rLink) { m_GetFocusLink = rLink; } protected: - virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override; - virtual bool MouseMove( const MouseEvent& rMEvt ) override; - virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override; - virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override; - virtual bool KeyInput( const KeyEvent& rKEvt ) override; - virtual void GetFocus() override; - virtual void LoseFocus() override; - virtual void Resize() override; - - virtual void EditViewInvalidate(const tools::Rectangle& rRect) const override - { - weld::DrawingArea* pDrawingArea = GetDrawingArea(); - pDrawingArea->queue_draw_area(rRect.Left(), rRect.Top(), rRect.GetWidth(), rRect.GetHeight()); - } - - virtual void EditViewSelectionChange() const override - { - weld::DrawingArea* pDrawingArea = GetDrawingArea(); - pDrawingArea->queue_draw(); - } - - virtual OutputDevice& EditViewOutputDevice() const override - { - return GetDrawingArea()->get_ref_device(); - } + virtual void makeEditEngine() override; + virtual bool KeyInput( const KeyEvent& rKEvt ) override; + virtual void GetFocus() override; + virtual void LoseFocus() override; private: - std::unique_ptr<ScHeaderEditEngine> pEdEngine; - std::unique_ptr<EditView> pEdView; ScEditWindowLocation eLocation; bool mbRTL; weld::Window* mpDialog; @@ -108,6 +84,7 @@ private: Link<ScEditWindow&,void> aObjectSelectLink; std::function<void (ScEditWindow&)> m_GetFocusLink; + }; #endif // INCLUDED_SC_SOURCE_UI_INC_TPHFEDIT_HXX |