sc/source/ui/docshell/docsh.cxx |   11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

New commits:
commit 5ff06d5e385a0ea30a427e3e6ebb7c605dbf984b
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Wed Sep 22 20:18:33 2021 +0100
Commit:     Caolán McNamara <caol...@redhat.com>
CommitDate: Thu Sep 23 09:51:41 2021 +0200

    dbf filter needs a physical file
    
    Change-Id: Ia522fee21edeafa419c173606ebaac0667d264fe
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122492
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caol...@redhat.com>

diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index baf0903ca855..013c59f8adac 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -3409,10 +3409,17 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool 
TestImportDBF(SvStream &rStream)
 {
     ScDLL::Init();
 
-    utl::TempFile aTempInput;
+    // we need a real file for this filter
+
+    // put it in an empty dir
+    utl::TempFile aTmpDir(nullptr, true);
+    aTmpDir.EnableKillingFile();
+    OUString sTmpDir = aTmpDir.GetURL();
+
+    OUString sNoExtension;
+    utl::TempFile aTempInput(OUString(), true, &sNoExtension, &sTmpDir);
     aTempInput.EnableKillingFile();
 
-    // need a real file for this filter
     SvStream* pInputStream = aTempInput.GetStream(StreamMode::WRITE);
     sal_uInt8 aBuffer[8192];
     while (auto nRead = rStream.ReadBytes(aBuffer, SAL_N_ELEMENTS(aBuffer)))

Reply via email to