summaryrefslogtreecommitdiff
path: root/sc/source/ui/condformat
diff options
context:
space:
mode:
authorHeiko Tietze <heiko.tietze@documentfoundation.org>2022-06-15 12:07:31 +0200
committerHeiko Tietze <heiko.tietze@documentfoundation.org>2022-06-15 19:54:56 +0200
commita2b4620d4981ea205788b0a786845cf9ffdbf21d (patch)
treee542904b6fd00a8ad2407ad5b36ce29e4a41c915 /sc/source/ui/condformat
parent636a22ffd7769c5f31844e66579c78928434df81 (diff)
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.tietze@documentfoundation.org>
Diffstat (limited to 'sc/source/ui/condformat')
-rw-r--r--sc/source/ui/condformat/condformatmgr.cxx10
1 files changed, 10 insertions, 0 deletions
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()