sc/source/ui/condformat/condformatmgr.cxx | 10 ++++++++++ 1 file changed, 10 insertions(+)
New commits: commit f777a25f32b3c98a45cf1a24e130a5cce153f5d0 Author: Heiko Tietze <heiko.tie...@documentfoundation.org> AuthorDate: Wed Jun 15 12:07:31 2022 +0200 Commit: Adolfo Jayme Barrientos <fit...@ubuntu.com> CommitDate: Fri Jun 24 19:41:37 2022 +0200 Related tdf#101285 - Remember position of conditional format dialog Change-Id: I4094fb46bb6130f4befcc25136424a45b90b9d92 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135897 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> (cherry picked from commit 3d3341aa156e089a6ebcf399d9ec6ad1f183d063) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135889 Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com> diff --git a/sc/source/ui/condformat/condformatmgr.cxx b/sc/source/ui/condformat/condformatmgr.cxx index 06954a7f65d1..d4a2980a6dfa 100644 --- a/sc/source/ui/condformat/condformatmgr.cxx +++ b/sc/source/ui/condformat/condformatmgr.cxx @@ -13,6 +13,7 @@ #include <document.hxx> #include <conditio.hxx> #include <o3tl/safeint.hxx> +#include <unotools/viewoptions.hxx> ScCondFormatManagerWindow::ScCondFormatManagerWindow(weld::TreeView& rTreeView, ScDocument& rDoc, ScConditionalFormatList* pFormatList) @@ -99,11 +100,20 @@ ScCondFormatManagerDlg::ScCondFormatManagerDlg(weld::Window* pParent, ScDocument m_xBtnAdd->connect_clicked(LINK(this, ScCondFormatManagerDlg, AddBtnHdl)); m_xTreeView->connect_row_activated(LINK(this, ScCondFormatManagerDlg, EditBtnHdl)); + SvtViewOptions aDlgOpt(EViewType::Dialog, "CondFormatDialog"); + if (aDlgOpt.Exists()) + m_xDialog->set_window_state(aDlgOpt.GetWindowState().toUtf8()); + UpdateButtonSensitivity(); } ScCondFormatManagerDlg::~ScCondFormatManagerDlg() { + // tdf#101285 - Remember position of dialog + SvtViewOptions aDlgOpt(EViewType::Dialog, "CondFormatDialog"); + OString sWindowState + = m_xDialog->get_window_state(vcl::WindowDataMask::Pos); + aDlgOpt.SetWindowState(OUString::fromUtf8(sWindowState)); } std::unique_ptr<ScConditionalFormatList> ScCondFormatManagerDlg::GetConditionalFormatList()