summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-15 15:26:27 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-15 22:59:54 +0100
commit15d134b4f57e66faa8bcf538a08db98dc9204c54 (patch)
tree36d0d454de0fa8976d82904639cebbdaddbae506 /unotools
parentb846d11fed926864a80183f4572016946fa6fdc5 (diff)
Make temp copy of dbaccess/qa/unit/data/firebird_empty.odb for testing
...in CppunitTest_dbaccess_firebird_test. Otherwise, the test would fail with > Test name: FirebirdTest::testEmptyDBConnection > An uncaught exception of type com.sun.star.sdbc.SQLException > - The connection can not be established. No storage or URL was given. if dbaccess/qa/unit/data/firebird_empty.odb is read-only, as DocumentStorageAccess::impl_openSubStorage_nothrow (dbaccess/source/core/dataaccess/ModelImpl.cxx) takes m_pModelImplementation->m_bDocumentReadOnly into account and returns a null xStorage. Adds a move ctor to utl::TempFile (thus causing copy ctor and copy assignment op to be implicitly deleted), but leaves any move assignment op undeclared for now, as none happens to be needed (yet). Change-Id: I6f9eff07eb54f1364a0560ffa4cf1f676a319d16 Reviewed-on: https://gerrit.libreoffice.org/46561 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/unotools/source/ucbhelper/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 4df84af0cb6a..eb099a43dca9 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <cassert>
+#include <utility>
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
#include <comphelper/processfactory.hxx>
@@ -366,6 +367,14 @@ TempFile::TempFile( const OUString& rLeadingChars, bool _bStartWithZero,
true, true, bCreateParentDirs );
}
+TempFile::TempFile(TempFile && other):
+ aName(std::move(other.aName)), pStream(other.pStream), bIsDirectory(other.bIsDirectory),
+ bKillingFileEnabled(other.bKillingFileEnabled)
+{
+ other.pStream = nullptr;
+ other.bKillingFileEnabled = false;
+}
+
TempFile::~TempFile()
{
delete pStream;