diff options
author | Heiko Tietze <tietze.heiko@gmail.com> | 2023-04-26 10:50:04 +0200 |
---|---|---|
committer | Heiko Tietze <heiko.tietze@documentfoundation.org> | 2023-04-26 16:15:06 +0200 |
commit | 95ae136380906c6d270fd47b2b9655b2c32f670e (patch) | |
tree | e41d748986ebf2039a413046233175a8bb82fc9e | |
parent | 3bd65f0e3ea9953c7f4b00f3d42171d9b3dc3fd0 (diff) |
Resolves tdf#153852 - Make sort dialog resizable
Change-Id: Ie0db5c713bf16443962245900655736aeddce532
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151042
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
-rw-r--r-- | sc/source/ui/dbgui/sortdlg.cxx | 14 | ||||
-rw-r--r-- | sc/source/ui/inc/sortdlg.hxx | 1 | ||||
-rw-r--r-- | sc/uiconfig/scalc/ui/sortdialog.ui | 3 |
3 files changed, 16 insertions, 2 deletions
diff --git a/sc/source/ui/dbgui/sortdlg.cxx b/sc/source/ui/dbgui/sortdlg.cxx index 22af2230b081..43978d1b8585 100644 --- a/sc/source/ui/dbgui/sortdlg.cxx +++ b/sc/source/ui/dbgui/sortdlg.cxx @@ -22,12 +22,26 @@ #include <scui_def.hxx> #include <tpsort.hxx> #include <sortdlg.hxx> +#include <unotools/viewoptions.hxx> ScSortDlg::ScSortDlg(weld::Window* pParent, const SfxItemSet* pArgSet) : SfxTabDialogController(pParent, "modules/scalc/ui/sortdialog.ui", "SortDialog", pArgSet) { AddTabPage("criteria", ScTabPageSortFields::Create, nullptr); AddTabPage("options", ScTabPageSortOptions::Create, nullptr); + + // restore dialog size + SvtViewOptions aDlgOpt(EViewType::Dialog, "SortDialog"); + if (aDlgOpt.Exists()) + m_xDialog->set_window_state(aDlgOpt.GetWindowState()); +} + +ScSortDlg::~ScSortDlg() +{ + // tdf#153852 - Make of sort dialog resizable (and remember size) + SvtViewOptions aDlgOpt(EViewType::Dialog, "SortDialog"); + OUString sWindowState = m_xDialog->get_window_state(vcl::WindowDataMask::PosSize); + aDlgOpt.SetWindowState(sWindowState); } ScSortWarningDlg::ScSortWarningDlg(weld::Window* pParent, diff --git a/sc/source/ui/inc/sortdlg.hxx b/sc/source/ui/inc/sortdlg.hxx index 10d4268d7c51..a18bc66da867 100644 --- a/sc/source/ui/inc/sortdlg.hxx +++ b/sc/source/ui/inc/sortdlg.hxx @@ -26,6 +26,7 @@ class ScSortDlg : public SfxTabDialogController { public: ScSortDlg(weld::Window* pParent, const SfxItemSet* pArgSet); + virtual ~ScSortDlg() override; }; class ScSortWarningDlg : public weld::GenericDialogController diff --git a/sc/uiconfig/scalc/ui/sortdialog.ui b/sc/uiconfig/scalc/ui/sortdialog.ui index e9ac12779df1..7149b3e63425 100644 --- a/sc/uiconfig/scalc/ui/sortdialog.ui +++ b/sc/uiconfig/scalc/ui/sortdialog.ui @@ -1,12 +1,11 @@ <?xml version="1.0" encoding="UTF-8"?> -<!-- Generated with glade 3.38.2 --> +<!-- Generated with glade 3.40.0 --> <interface domain="sc"> <requires lib="gtk+" version="3.20"/> <object class="GtkDialog" id="SortDialog"> <property name="can-focus">False</property> <property name="border-width">6</property> <property name="title" translatable="yes" context="sortdialog|SortDialog">Sort</property> - <property name="resizable">False</property> <property name="modal">True</property> <property name="default-width">0</property> <property name="default-height">0</property> |