summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-01-19 10:14:07 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2018-01-19 20:21:57 +0100
commit8da0832fe5f216768e3c4f17334ed15ef7b4de85 (patch)
tree481b4678cc76a400a48fa1c0250919396a30a0fb
parent57a70245f5ad4b8bb722c1dc0aaa06f3d42965f4 (diff)
Don't create database files in $HOME
Regression from commit 46b3202bf883618f1585850191c19776861013ed Change-Id: If8e0b309274ea14e996e0dde2d1ee9b49ff0f737 Reviewed-on: https://gerrit.libreoffice.org/48173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx7
1 files changed, 6 insertions, 1 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index f32c512d84de..6f4903f98d2f 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -5765,13 +5765,16 @@ void SwUiWriterTest::testTdf115013()
{
const OUString sColumnName("Name with spaces, \"quotes\" and \\backslashes");
+ utl::TempFile aTempDir(nullptr, true);
+ const OUString aWorkDir = aTempDir.GetURL();
+
//create new writer document
SwDoc* pDoc = createDoc();
{
// Load and register data source
const OUString aDataSourceURI(m_directories.getURLFromSrc(DATA_DIRECTORY) + "datasource.ods");
- OUString sDataSource = SwDBManager::LoadAndRegisterDataSource(aDataSourceURI, nullptr);
+ OUString sDataSource = SwDBManager::LoadAndRegisterDataSource(aDataSourceURI, &aWorkDir);
CPPUNIT_ASSERT(!sDataSource.isEmpty());
// Insert a new field type for the mailmerge field
@@ -5805,6 +5808,8 @@ void SwUiWriterTest::testTdf115013()
OUString sColumn = static_cast<SwDBFieldType*>(pField->GetTyp())->GetColumnName();
// The column name must come correct after round trip
CPPUNIT_ASSERT_EQUAL(sColumnName, sColumn);
+
+ utl::removeTree(aWorkDir);
}
void SwUiWriterTest::testTdf115065()