diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2023-10-20 14:33:06 +0200 |
---|---|---|
committer | Xisco Fauli <xiscofauli@libreoffice.org> | 2024-12-19 11:38:47 +0100 |
commit | 11c286c83cb576951f33af241be6b828a7dc75c2 (patch) | |
tree | 0a10531b93c5435d7223225ce15ffeedcf73b00a | |
parent | 7cf55abcfe37a5ba76960b56c9b406cec380213d (diff) |
tdf#61358 - Remember the last "insert as link" state
Change-Id: I3fe88411092df159fa6dc39a8fb9eb3ab36eeb70
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158254
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
(cherry picked from commit 9f5040abbfdb6057fc2455cd6726398dc8ba7b9b)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/178190
Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
-rw-r--r-- | sfx2/source/dialog/filedlghelper.cxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx index 9ada2fe6c2a2..07325adf3085 100644 --- a/sfx2/source/dialog/filedlghelper.cxx +++ b/sfx2/source/dialog/filedlghelper.cxx @@ -20,6 +20,7 @@ #include <memory> #include <optional> #include <string_view> +#include <o3tl/test_info.hxx> #include <sfx2/filedlghelper.hxx> #include <sal/types.h> @@ -2081,10 +2082,19 @@ void FileDialogHelper_Impl::saveConfig() try { + // tdf#61358 - remember the last "insert as link" state + if (o3tl::IsRunningUITest()) + aValue <<= false; + else + aValue = xDlg->getValue(ExtendedFilePickerElementIds::CHECKBOX_LINK, 0); + bool bLink = false; + aValue >>= bLink; + OUString aUserData(GRF_CONFIG_STR); + SetToken(aUserData, 0, ' ', OUString::number(static_cast<sal_Int32>(bLink))); + aValue = xDlg->getValue( ExtendedFilePickerElementIds::CHECKBOX_PREVIEW, 0 ); bool bValue = false; aValue >>= bValue; - OUString aUserData(GRF_CONFIG_STR); SetToken( aUserData, 1, ' ', OUString::number( static_cast<sal_Int32>(bValue) ) ); INetURLObject aObj( getPath() ); |