sfx2/source/doc/guisaveas.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 6afd17ac396f7d96800c70a37aaa8beb036c01a6
Author:     Heiko Tietze <heiko.tie...@documentfoundation.org>
AuthorDate: Wed Sep 3 11:12:14 2025 +0200
Commit:     Heiko Tietze <heiko.tie...@documentfoundation.org>
CommitDate: Wed Sep 3 13:16:32 2025 +0200

    Resolves tdf#168259 - Add "Show Again" checkbox to SaveAs query
    
    Change-Id: I60b034d43bfe7069319b6dc70b0b9e00cc5e1e45
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/190553
    Tested-by: Jenkins
    Reviewed-by: Heiko Tietze <heiko.tie...@documentfoundation.org>

diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 3f171cfd8bb8..f99fb12aad16 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -2148,11 +2148,18 @@ 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);
+    auto pDlg = pFact->CreateQueryDialog(pWin, 
SfxResId(STR_QUERY_ALIENFORMAT_TTITLE), sInfoText, sQuestion, true);
     
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;

Reply via email to