diff options
author | Caolán McNamara <caolanm@redhat.com> | 2018-04-14 21:15:28 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2018-04-16 14:50:22 +0200 |
commit | 77a59cabf33d5d6ccc80ea62ee07162abc1b4e52 (patch) | |
tree | 57124d72a996510b4f6ab3f39a3732a9d4dfeff6 /include | |
parent | Fix --enable-qt5 (diff) | |
download | core-77a59cabf33d5d6ccc80ea62ee07162abc1b4e52.tar.gz core-77a59cabf33d5d6ccc80ea62ee07162abc1b4e52.zip |
weld SvxPostItDialog
Change-Id: I0aa88270aa604180223f2b35829b45e5828f792a
Reviewed-on: https://gerrit.libreoffice.org/52896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/svx/svxdlg.hxx | 13 | ||||
-rw-r--r-- | include/vcl/weld.hxx | 13 |
2 files changed, 17 insertions, 9 deletions
diff --git a/include/svx/svxdlg.hxx b/include/svx/svxdlg.hxx index 511677c923ba..9603739f8807 100644 --- a/include/svx/svxdlg.hxx +++ b/include/svx/svxdlg.hxx @@ -60,7 +60,10 @@ typedef const sal_uInt16* (*DialogGetRanges)(); typedef ::std::vector< OUString > TargetList; namespace svx{ class SpellDialogChildWindow;} -namespace weld{ class Window; } +namespace weld{ + class Dialog; + class Window; +} class AbstractSvxDistributeDialog :public VclAbstractDialog { @@ -279,7 +282,7 @@ public: virtual void SetValidateFramePosLink( const Link<SvxSwFrameValidation&,void>& rLink ) = 0; }; -class AbstractSvxPostItDialog :public VclAbstractDialog +class AbstractSvxPostItDialog : public VclAbstractDialog { protected: virtual ~AbstractSvxPostItDialog() override = default; @@ -294,7 +297,7 @@ public: virtual void ShowLastAuthor(const OUString& rAuthor, const OUString& rDate) = 0; virtual void DontChangeAuthor() = 0; virtual void HideAuthor() = 0; - virtual vcl::Window * GetWindow() = 0; + virtual std::shared_ptr<weld::Dialog> GetDialog() = 0; }; class SvxAbstractSplitTableDialog : public VclAbstractDialog @@ -441,9 +444,7 @@ public: virtual VclPtr<SfxAbstractDialog> CreateEventConfigDialog( vcl::Window* pParent, const SfxItemSet& rAttr, const css::uno::Reference< css::frame::XFrame >& _rxFrame )=0; - virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog( vcl::Window* pParent, - const SfxItemSet& rCoreSet, - bool bPrevNext = false) = 0; + virtual VclPtr<AbstractSvxPostItDialog> CreateSvxPostItDialog(weld::Window* pParent, const SfxItemSet& rCoreSet, bool bPrevNext = false) = 0; virtual VclPtr<VclAbstractDialog> CreateSvxScriptOrgDialog( vcl::Window* pParent, const OUString& rLanguage ) override = 0; virtual DialogGetRanges GetDialogGetRangesFunc() = 0; diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx index 97bea2941fac..52585c65b506 100644 --- a/include/vcl/weld.hxx +++ b/include/vcl/weld.hxx @@ -143,6 +143,8 @@ public: virtual OUString get_title() const = 0; virtual void set_busy_cursor(bool bBusy) = 0; virtual void window_move(int x, int y) = 0; + virtual bool get_extents_relative_to(Window& rRelative, int& x, int& y, int& width, int& height) + = 0; virtual css::uno::Reference<css::awt::XWindow> GetXWindow() = 0; @@ -606,9 +608,14 @@ class VCL_DLLPUBLIC TextView : virtual public Container public: virtual void set_text(const OUString& rText) = 0; virtual OUString get_text() const = 0; - virtual Selection get_selection() const = 0; - virtual void set_selection(const Selection&) = 0; + virtual void select_region(int nStartPos, int nEndPos) = 0; + virtual bool get_selection_bounds(int& rStartPos, int& rEndPos) = 0; virtual void set_editable(bool bEditable) = 0; + int get_height_rows(int nRows) const + { + //can improve this if needed + return get_text_height() * nRows; + } }; class VCL_DLLPUBLIC Expander : virtual public Container @@ -745,7 +752,7 @@ private: protected: std::unique_ptr<weld::Builder> m_xBuilder; - std::unique_ptr<weld::Dialog> m_xDialog; + std::shared_ptr<weld::Dialog> m_xDialog; public: GenericDialogController(weld::Widget* pParent, const OUString& rUIFile, |