summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2023-11-03 14:07:34 +0100
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2023-11-06 22:39:33 +0100
commitbf927cb4513f8ef2a5205e98fbcf1ff02c344b4a (patch)
tree5dd29c10247c6fb622a4dbc18b00952d16794884 /cui
parentb21cab3f1784154cfaf7e5be71329ad6ff4f162a (diff)
tdf#149935 - Hyperlink Target Dialog: remember last used position and size
Change-Id: I87fdf78b6ec4963eb4450d937dd86209e03865a1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158879 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'cui')
-rw-r--r--cui/source/dialogs/hlmarkwn.cxx15
1 files changed, 14 insertions, 1 deletions
diff --git a/cui/source/dialogs/hlmarkwn.cxx b/cui/source/dialogs/hlmarkwn.cxx
index 7eb2ced02489..cf90450450ad 100644
--- a/cui/source/dialogs/hlmarkwn.cxx
+++ b/cui/source/dialogs/hlmarkwn.cxx
@@ -79,11 +79,19 @@ SvxHlinkDlgMarkWnd::SvxHlinkDlgMarkWnd(weld::Window* pParentDialog, SvxHyperlink
mxBtApply->connect_clicked( LINK ( this, SvxHlinkDlgMarkWnd, ClickApplyHdl_Impl ) );
mxBtClose->connect_clicked( LINK ( this, SvxHlinkDlgMarkWnd, ClickCloseHdl_Impl ) );
mxLbTree->connect_row_activated( LINK ( this, SvxHlinkDlgMarkWnd, DoubleClickApplyHdl_Impl ) );
+
+ // tdf#149935 - remember last used position and size
+ SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
+ if (aDlgOpt.Exists())
+ m_xDialog->set_window_state(aDlgOpt.GetWindowState());
}
SvxHlinkDlgMarkWnd::~SvxHlinkDlgMarkWnd()
{
ClearTree();
+ // tdf#149935 - remember last used position and size
+ SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
+ aDlgOpt.SetWindowState(m_xDialog->get_window_state(vcl::WindowDataMask::PosSize));
}
void SvxHlinkDlgMarkWnd::ErrorChanged()
@@ -126,7 +134,12 @@ sal_uInt16 SvxHlinkDlgMarkWnd::SetError( sal_uInt16 nError)
// Move window
void SvxHlinkDlgMarkWnd::MoveTo(const Point& rNewPos)
{
- m_xDialog->window_move(rNewPos.X(), rNewPos.Y());
+ // tdf#149935 - remember last used position and size
+ SvtViewOptions aDlgOpt(EViewType::Dialog, m_xDialog->get_help_id());
+ if (aDlgOpt.Exists())
+ m_xDialog->set_window_state(aDlgOpt.GetWindowState());
+ else
+ m_xDialog->window_move(rNewPos.X(), rNewPos.Y());
}
namespace