summaryrefslogtreecommitdiff
path: root/sc/source/ui/inc/corodlg.hxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-05-19 17:01:53 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-05-19 21:48:40 +0200
commitf9d21be4607f191a769e05e1880d3ddb34060bd2 (patch)
tree1be2d85d41e7c192e3b2b9cfa3e8eeb2388f5c27 /sc/source/ui/inc/corodlg.hxx
parent6ac83797e033dd0b799455d552c61abd202160b4 (diff)
weld ScColRowLabelDlg
Change-Id: If706a86b4aa55f2678b3ad9a96e81679eca0faea Reviewed-on: https://gerrit.libreoffice.org/54566 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sc/source/ui/inc/corodlg.hxx')
-rw-r--r--sc/source/ui/inc/corodlg.hxx35
1 files changed, 12 insertions, 23 deletions
diff --git a/sc/source/ui/inc/corodlg.hxx b/sc/source/ui/inc/corodlg.hxx
index f9f876f418d3..b0c91b4009fe 100644
--- a/sc/source/ui/inc/corodlg.hxx
+++ b/sc/source/ui/inc/corodlg.hxx
@@ -20,37 +20,26 @@
#ifndef INCLUDED_SC_SOURCE_UI_INC_CORODLG_HXX
#define INCLUDED_SC_SOURCE_UI_INC_CORODLG_HXX
-#include <vcl/dialog.hxx>
-#include <vcl/button.hxx>
+#include <vcl/weld.hxx>
-class ScColRowLabelDlg : public ModalDialog
+class ScColRowLabelDlg : public weld::GenericDialogController
{
public:
- ScColRowLabelDlg(vcl::Window* pParent,
- bool bCol,
- bool bRow)
- : ModalDialog(pParent, "ChangeSourceDialog",
- "modules/scalc/ui/changesourcedialog.ui")
+ ScColRowLabelDlg(weld::Window* pParent, bool bCol, bool bRow)
+ : GenericDialogController(pParent, "modules/scalc/ui/changesourcedialog.ui", "ChangeSourceDialog")
+ , m_xBtnRow(m_xBuilder->weld_check_button("row"))
+ , m_xBtnCol(m_xBuilder->weld_check_button("col"))
{
- get(m_pBtnRow, "row");
- get(m_pBtnCol, "col");
- m_pBtnCol->Check(bCol);
- m_pBtnRow->Check(bRow);
- }
- virtual ~ScColRowLabelDlg() override { disposeOnce(); }
- virtual void dispose() override
- {
- m_pBtnRow.clear();
- m_pBtnCol.clear();
- ModalDialog::dispose();
+ m_xBtnCol->set_active(bCol);
+ m_xBtnRow->set_active(bRow);
}
- bool IsCol() const { return m_pBtnCol->IsChecked(); }
- bool IsRow() const { return m_pBtnRow->IsChecked(); }
+ bool IsCol() const { return m_xBtnCol->get_active(); }
+ bool IsRow() const { return m_xBtnRow->get_active(); }
private:
- VclPtr<CheckBox> m_pBtnRow;
- VclPtr<CheckBox> m_pBtnCol;
+ std::unique_ptr<weld::CheckButton> m_xBtnRow;
+ std::unique_ptr<weld::CheckButton> m_xBtnCol;
};
#endif