summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-03-21 10:45:48 +0000
committerCaolán McNamara <caolanm@redhat.com>2018-03-21 16:08:11 +0100
commit417d26291cd13c861e8f6262d0fb6afa026f015c (patch)
tree93385ce80a21a5783dc46187be87cd45345bdc8f /include
parent754f6e2fe0d329e12e9e083d4fccc4086d9b4d04 (diff)
move these down to base
Change-Id: I8489abb3d6b7115b19cff9522dc49589e7d6a9c4 Reviewed-on: https://gerrit.libreoffice.org/51702 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/weld.hxx15
1 files changed, 9 insertions, 6 deletions
diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx
index 1da74234d50e..1d0e3f390076 100644
--- a/include/vcl/weld.hxx
+++ b/include/vcl/weld.hxx
@@ -588,11 +588,18 @@ class VCL_DLLPUBLIC DialogController
{
private:
virtual Dialog* getDialog() = 0;
+ const Dialog* getConstDialog() const
+ {
+ return const_cast<DialogController*>(this)->getDialog();
+ }
public:
short run() { return getDialog()->run(); }
static bool runAsync(const std::shared_ptr<DialogController>& rController,
const std::function<void(sal_Int32)>&);
+ void set_title(const OUString& rTitle) { getDialog()->set_title(rTitle); }
+ void set_help_id(const OString& rHelpId) { getDialog()->set_help_id(rHelpId); }
+ OString get_help_id() const { return getConstDialog()->get_help_id(); }
virtual ~DialogController();
};
@@ -608,9 +615,7 @@ protected:
public:
GenericDialogController(weld::Widget* pParent, const OUString& rUIFile,
const OString& rDialogId);
- ~GenericDialogController() override;
- void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
- void set_help_id(const OString& rHelpId) { m_xDialog->set_help_id(rHelpId); }
+ virtual ~GenericDialogController() override;
};
class VCL_DLLPUBLIC MessageDialogController : public DialogController
@@ -628,9 +633,7 @@ protected:
public:
MessageDialogController(weld::Widget* pParent, const OUString& rUIFile,
const OString& rDialogId, const OString& rRelocateId = OString());
- ~MessageDialogController() override;
- void set_title(const OUString& rTitle) { m_xDialog->set_title(rTitle); }
- void set_help_id(const OString& rHelpId) { m_xDialog->set_help_id(rHelpId); }
+ virtual ~MessageDialogController() override;
void set_primary_text(const OUString& rText) { m_xDialog->set_primary_text(rText); }
OUString get_primary_text() const { return m_xDialog->get_primary_text(); }
void set_default_response(int response) { m_xDialog->set_default_response(response); }