sfx2/source/doc/guisaveas.cxx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-)
New commits: commit 78373e24f4144df9c28e485e89dc86144752719c Author: Heiko Tietze <heiko.tie...@documentfoundation.org> AuthorDate: Mon Sep 8 14:54:28 2025 +0200 Commit: Xisco Fauli <xiscofa...@libreoffice.org> CommitDate: Thu Sep 18 22:58:23 2025 +0200 Resolves tdf#168259 - Add "Show Again" checkbox to SaveAs query This backport also includes the follow-up commit Resolves tdf#168259 - Hide "Show Again" if readonly Change-Id: I60b034d43bfe7069319b6dc70b0b9e00cc5e1e45 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190553 Tested-by: Jenkins Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/191158 Reviewed-by: Justin Luth <jl...@mail.com> diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx index e4865e29a1df..8f242373bb70 100644 --- a/sfx2/source/doc/guisaveas.cxx +++ b/sfx2/source/doc/guisaveas.cxx @@ -2095,11 +2095,19 @@ bool SfxStoringHelper::WarnUnacceptableFormat( const uno::Reference< frame::XMod } VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); - auto pDlg = pFact->CreateQueryDialog(pWin, SfxResId(STR_QUERY_ALIENFORMAT_TTITLE), sInfoText, sQuestion, false); + bool bShowAgain = !officecfg::Office::Common::Save::Document::WarnAlienFormat::isReadOnly(); + auto pDlg = pFact->CreateQueryDialog(pWin, SfxResId(STR_QUERY_ALIENFORMAT_TTITLE), sInfoText, sQuestion, bShowAgain); pDlg->SetYesLabel(SfxResId(STR_QUERY_ALIENFORMAT_YES).replaceAll("%FORMATNAME", aOldUIName)); // "Use %FORMATNAME Format" pDlg->SetNoLabel(SfxResId(STR_QUERY_ALIENFORMAT_NO).replaceAll("%DEFAULTEXTENSION", sExtension)); // "Use %DEFAULTEXTENSION _Format" sal_Int32 nResult = pDlg->Execute(); + if (pDlg->ShowAgain() == false) + { + std::shared_ptr<comphelper::ConfigurationChanges> xChanges( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Save::Document::WarnAlienFormat::set(false, xChanges); + xChanges->commit(); + } pDlg->disposeOnce(); return nResult == RET_YES;