filter/source/config/cache/typedetection.cxx |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 657f98d9272dd97e4f4c6e03cce4a0fa9f526819
Author:     Mike Kaganski <[email protected]>
AuthorDate: Mon Nov 27 12:21:30 2023 +0300
Commit:     Mike Kaganski <[email protected]>
CommitDate: Mon Nov 27 11:47:40 2023 +0100

    Related: tdf#96401 Set PROP_ASTEMPLATE for broken ZIP package
    
    Same as in StorageFilterDetect::detect. It would prompt user on save
    to provide a new file name, instead of silently rewriting (possibly
    recovered with errors) document.
    
    Change-Id: I8ede6d01e2d482f409e8b3f7452deb1e4bd02a85
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159985
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <[email protected]>

diff --git a/filter/source/config/cache/typedetection.cxx 
b/filter/source/config/cache/typedetection.cxx
index 5bc4f98b82f5..15a257eef878 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -930,7 +930,11 @@ OUString TypeDetection::impl_detectTypeFlatAndDeep(      
utl::MediaDescriptor& r
                         xInteraction->handle(aRequest.GetRequest());
 
                         if (aRequest.isApproved())
+                        {
+                            
rDescriptor[utl::MediaDescriptor::PROP_DOCUMENTTITLE] <<= aDocumentTitle;
+                            rDescriptor[utl::MediaDescriptor::PROP_ASTEMPLATE] 
<<= true;
                             rDescriptor["RepairPackage"] <<= true;
+                        }
                         else
                             rDescriptor["RepairAllowed"] <<= false; // Do not 
ask again
                     }

Reply via email to