summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2023-06-01 09:08:05 +0200
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2023-06-01 10:55:41 +0200
commitc1893df42567c260ca5fb069038d1a55616e7b7f (patch)
treed77cf2fe03818c22eb06d9bb1240f41b97dff10c
parent36ec021c6eafe80caefbedbbe674bd1ee0a9429a (diff)
tdf#149598 - Remember window state of the format cell dialog
Change-Id: Ie3b468c674a9a811a5359155cda1d96ed44e50fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152474 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
-rw-r--r--sc/source/ui/attrdlg/attrdlg.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/sc/source/ui/attrdlg/attrdlg.cxx b/sc/source/ui/attrdlg/attrdlg.cxx
index ad0a82542c3e..7a80073d9da3 100644
--- a/sc/source/ui/attrdlg/attrdlg.cxx
+++ b/sc/source/ui/attrdlg/attrdlg.cxx
@@ -31,11 +31,17 @@
#include <editeng/flstitem.hxx>
#include <osl/diagnose.h>
#include <comphelper/lok.hxx>
+#include <unotools/viewoptions.hxx>
ScAttrDlg::ScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs)
: SfxTabDialogController(pParent, "modules/scalc/ui/formatcellsdialog.ui",
"FormatCellsDialog", pCellAttrs)
{
+ // tdf#149598 - restore window state of the dialog
+ SvtViewOptions aDlgOpt(EViewType::Dialog, "FormatCellDialog");
+ if (aDlgOpt.Exists())
+ m_xDialog->set_window_state(aDlgOpt.GetWindowState());
+
SfxAbstractDialogFactory* pFact = SfxAbstractDialogFactory::Create();
OSL_ENSURE(pFact->GetTabPageCreatorFunc( RID_SVXPAGE_NUMBERFORMAT ), "GetTabPageCreatorFunc fail!");
@@ -67,6 +73,9 @@ ScAttrDlg::ScAttrDlg(weld::Window* pParent, const SfxItemSet* pCellAttrs)
ScAttrDlg::~ScAttrDlg()
{
+ // tdf#149598 - remember window state of the dialog
+ SvtViewOptions aDlgOpt(EViewType::Dialog, "FormatCellDialog");
+ aDlgOpt.SetWindowState(m_xDialog->get_window_state(vcl::WindowDataMask::PosSize));
}
void ScAttrDlg::PageCreated(const OUString& rPageId, SfxTabPage& rTabPage)