diff options
-rw-r--r-- | sc/inc/scabstdlg.hxx | 2 | ||||
-rw-r--r-- | sc/qa/unit/screenshots/screenshots.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.cxx | 19 | ||||
-rw-r--r-- | sc/source/ui/attrdlg/scdlgfact.hxx | 10 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/inc/corodlg.hxx | 35 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/changesourcedialog.ui | 8 |
7 files changed, 41 insertions, 37 deletions
diff --git a/sc/inc/scabstdlg.hxx b/sc/inc/scabstdlg.hxx index 1815e2680802..f5b299c8dde8 100644 --- a/sc/inc/scabstdlg.hxx +++ b/sc/inc/scabstdlg.hxx @@ -406,7 +406,7 @@ public: ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, ScViewData *pViewData) = 0; - virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (vcl::Window* pParent, + virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (weld::Window* pParent, bool bCol, bool bRow) = 0; diff --git a/sc/qa/unit/screenshots/screenshots.cxx b/sc/qa/unit/screenshots/screenshots.cxx index 08965de0af80..5438f738db7b 100644 --- a/sc/qa/unit/screenshots/screenshots.cxx +++ b/sc/qa/unit/screenshots/screenshots.cxx @@ -172,7 +172,7 @@ VclPtr<VclAbstractDialog> ScScreenshotTest::createDialogByID(sal_uInt32 nID) case 3: // "modules/scalc/ui/changesourcedialog.ui" { - pReturnDialog = mpFact->CreateScColRowLabelDlg(mpViewShell->GetDialogParent(), true, false); + pReturnDialog = mpFact->CreateScColRowLabelDlg(mpViewShell->GetFrameWeld(), true, false); break; } diff --git a/sc/source/ui/attrdlg/scdlgfact.cxx b/sc/source/ui/attrdlg/scdlgfact.cxx index d0d098d1fb45..89179fed4b6e 100644 --- a/sc/source/ui/attrdlg/scdlgfact.cxx +++ b/sc/source/ui/attrdlg/scdlgfact.cxx @@ -77,7 +77,12 @@ IMPL_ABSTDLG_BASE(AbstractScImportAsciiDlg_Impl); IMPL_ABSTDLG_BASE(AbstractScAutoFormatDlg_Impl); -IMPL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl); + +short AbstractScColRowLabelDlg_Impl::Execute() +{ + return m_xDlg->run(); +} + IMPL_ABSTDLG_BASE(AbstractScCondFormatManagerDlg_Impl); IMPL_ABSTDLG_BASE(AbstractScDataPilotDatabaseDlg_Impl); @@ -231,12 +236,12 @@ OUString AbstractScAutoFormatDlg_Impl::GetCurrFormatName() bool AbstractScColRowLabelDlg_Impl::IsCol() { - return pDlg->IsCol(); + return m_xDlg->IsCol(); } bool AbstractScColRowLabelDlg_Impl::IsRow() { - return pDlg->IsRow(); + return m_xDlg->IsRow(); } void AbstractScDataPilotDatabaseDlg_Impl::GetValues( ScImportSourceDesc& rDesc ) @@ -688,12 +693,10 @@ VclPtr<AbstractScAutoFormatDlg> ScAbstractDialogFactory_Impl::CreateScAutoFormat return VclPtr<AbstractScAutoFormatDlg_Impl>::Create(pDlg); } -VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(vcl::Window* pParent, - bool bCol , - bool bRow) +VclPtr<AbstractScColRowLabelDlg> ScAbstractDialogFactory_Impl::CreateScColRowLabelDlg(weld::Window* pParent, + bool bCol, bool bRow) { - VclPtr<ScColRowLabelDlg> pDlg = VclPtr<ScColRowLabelDlg>::Create( pParent, bCol,bRow ); - return VclPtr<AbstractScColRowLabelDlg_Impl>::Create( pDlg ); + return VclPtr<AbstractScColRowLabelDlg_Impl>::Create(new ScColRowLabelDlg(pParent, bCol, bRow)); } VclPtr<AbstractScSortWarningDlg> ScAbstractDialogFactory_Impl::CreateScSortWarningDlg( vcl::Window* pParent, const OUString& rExtendText, const OUString& rCurrentText ) diff --git a/sc/source/ui/attrdlg/scdlgfact.hxx b/sc/source/ui/attrdlg/scdlgfact.hxx index a62239af8a87..184eaddb11c0 100644 --- a/sc/source/ui/attrdlg/scdlgfact.hxx +++ b/sc/source/ui/attrdlg/scdlgfact.hxx @@ -116,7 +116,13 @@ class AbstractScAutoFormatDlg_Impl : public AbstractScAutoFormatDlg class AbstractScColRowLabelDlg_Impl : public AbstractScColRowLabelDlg { - DECL_ABSTDLG_BASE(AbstractScColRowLabelDlg_Impl,ScColRowLabelDlg) + std::unique_ptr<ScColRowLabelDlg> m_xDlg; +public: + explicit AbstractScColRowLabelDlg_Impl(ScColRowLabelDlg* p) + : m_xDlg(p) + { + } + virtual short Execute() override; virtual bool IsCol() override; virtual bool IsRow() override; }; @@ -498,7 +504,7 @@ public: ScAutoFormat* pAutoFormat, const ScAutoFormatData* pSelFormatData, ScViewData *pViewData) override; - virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (vcl::Window* pParent, + virtual VclPtr<AbstractScColRowLabelDlg> CreateScColRowLabelDlg (weld::Window* pParent, bool bCol, bool bRow) override; diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index adb0575318da..5d341c664efd 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -342,7 +342,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell(); if (pViewSh && bValid && !aChartName.isEmpty() ) { - vcl::Window* pParent = pViewSh->GetDialogParent(); + weld::Window* pParent = pViewSh->GetFrameWeld(); SCCOL nCol1 = aSingleRange.aStart.Col(); SCROW nRow1 = aSingleRange.aStart.Row(); 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 diff --git a/sc/uiconfig/scalc/ui/changesourcedialog.ui b/sc/uiconfig/scalc/ui/changesourcedialog.ui index d805494a507f..f492fe5d1b64 100644 --- a/sc/uiconfig/scalc/ui/changesourcedialog.ui +++ b/sc/uiconfig/scalc/ui/changesourcedialog.ui @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.18.3 --> +<!-- Generated with glade 3.22.1 --> <interface domain="sc"> <requires lib="gtk+" version="3.18"/> <object class="GtkDialog" id="ChangeSourceDialog"> @@ -7,7 +7,13 @@ <property name="border_width">6</property> <property name="title" translatable="yes" context="changesourcedialog|ChangeSourceDialog">Change Source Data Range</property> <property name="resizable">False</property> + <property name="modal">True</property> + <property name="default_width">0</property> + <property name="default_height">0</property> <property name="type_hint">normal</property> + <child> + <placeholder/> + </child> <child internal-child="vbox"> <object class="GtkBox" id="dialog-vbox1"> <property name="can_focus">False</property> |