summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/bugfix-test.cxx2
-rw-r--r--sc/qa/unit/copy_paste_test.cxx2
-rw-r--r--sc/qa/unit/dataproviders_test.cxx2
-rw-r--r--sc/qa/unit/datatransformation_test.cxx2
-rw-r--r--sc/qa/unit/filters-test.cxx2
-rw-r--r--sc/qa/unit/helper/qahelper.cxx14
-rw-r--r--sc/qa/unit/opencl-test.cxx2
-rw-r--r--sc/qa/unit/parallelism.cxx2
-rw-r--r--sc/qa/unit/subsequent_export-test.cxx2
9 files changed, 17 insertions, 13 deletions
diff --git a/sc/qa/unit/bugfix-test.cxx b/sc/qa/unit/bugfix-test.cxx
index a4629a62cd2a..b14b86b9a58e 100644
--- a/sc/qa/unit/bugfix-test.cxx
+++ b/sc/qa/unit/bugfix-test.cxx
@@ -283,7 +283,7 @@ void ScFiltersTest::testTdf104310()
}
ScFiltersTest::ScFiltersTest()
- : ScBootstrapFixture( "/sc/qa/unit/data" )
+ : ScBootstrapFixture( "sc/qa/unit/data" )
{
}
diff --git a/sc/qa/unit/copy_paste_test.cxx b/sc/qa/unit/copy_paste_test.cxx
index 89448c9d6c31..e4966ba2bfdf 100644
--- a/sc/qa/unit/copy_paste_test.cxx
+++ b/sc/qa/unit/copy_paste_test.cxx
@@ -226,7 +226,7 @@ void ScCopyPasteTest::testTdf84411()
}
ScCopyPasteTest::ScCopyPasteTest()
- : ScBootstrapFixture( "/sc/qa/unit/data" )
+ : ScBootstrapFixture( "sc/qa/unit/data" )
{
}
diff --git a/sc/qa/unit/dataproviders_test.cxx b/sc/qa/unit/dataproviders_test.cxx
index 4b18db5ecd75..a3d375453150 100644
--- a/sc/qa/unit/dataproviders_test.cxx
+++ b/sc/qa/unit/dataproviders_test.cxx
@@ -138,7 +138,7 @@ void ScDataProvidersTest::testHTMLImport()
}
ScDataProvidersTest::ScDataProvidersTest() :
- ScBootstrapFixture( "/sc/qa/unit/data/dataprovider" ),
+ ScBootstrapFixture( "sc/qa/unit/data/dataprovider" ),
m_pDoc(nullptr)
{
}
diff --git a/sc/qa/unit/datatransformation_test.cxx b/sc/qa/unit/datatransformation_test.cxx
index 785b7024a74b..1120f177bb09 100644
--- a/sc/qa/unit/datatransformation_test.cxx
+++ b/sc/qa/unit/datatransformation_test.cxx
@@ -124,7 +124,7 @@ void ScDataTransformationTest::testColumnMerge()
}
ScDataTransformationTest::ScDataTransformationTest() :
- ScBootstrapFixture( "/sc/qa/unit/data/dataprovider" ),
+ ScBootstrapFixture( "sc/qa/unit/data/dataprovider" ),
m_pDoc(nullptr)
{
}
diff --git a/sc/qa/unit/filters-test.cxx b/sc/qa/unit/filters-test.cxx
index 108c1c36029c..2b926251affb 100644
--- a/sc/qa/unit/filters-test.cxx
+++ b/sc/qa/unit/filters-test.cxx
@@ -761,7 +761,7 @@ void ScFiltersTest::testSortWithSheetExternalReferencesODS_Impl( ScDocShellRef c
}
ScFiltersTest::ScFiltersTest()
- : ScBootstrapFixture( "/sc/qa/unit/data" )
+ : ScBootstrapFixture( "sc/qa/unit/data" )
, mbUpdateReferenceOnSort(false)
{
}
diff --git a/sc/qa/unit/helper/qahelper.cxx b/sc/qa/unit/helper/qahelper.cxx
index 11ea61d953b8..668b388f55a1 100644
--- a/sc/qa/unit/helper/qahelper.cxx
+++ b/sc/qa/unit/helper/qahelper.cxx
@@ -16,6 +16,7 @@
#include "formulacell.hxx"
#include <svx/svdpage.hxx>
#include <svx/svdoole2.hxx>
+#include <tools/urlobj.hxx>
#include <editeng/brushitem.hxx>
#include <editeng/justifyitem.hxx>
#include <formula/errorcodes.hxx>
@@ -631,11 +632,14 @@ OUString EnsureSeparator(const OUStringBuffer& rFilePath)
void ScBootstrapFixture::createFileURL(
const OUString& aFileBase, const OUString& aFileExtension, OUString& rFilePath)
{
- OUStringBuffer aBuffer( m_directories.getSrcRootURL() );
- aBuffer.append(EnsureSeparator(aBuffer)).append(m_aBaseString);
- aBuffer.append(EnsureSeparator(aBuffer)).append(aFileExtension);
- aBuffer.append(EnsureSeparator(aBuffer)).append(aFileBase).append(aFileExtension);
- rFilePath = aBuffer.makeStringAndClear();
+ // m_aBaseString and aFileBase may contain multiple segments, so use
+ // GetNewAbsURL instead of insertName for them:
+ INetURLObject url(m_directories.getSrcRootURL());
+ url.setFinalSlash();
+ url.GetNewAbsURL(m_aBaseString, &url);
+ url.insertName(aFileExtension, true);
+ url.GetNewAbsURL(aFileBase + aFileExtension, &url);
+ rFilePath = url.GetMainURL(INetURLObject::DecodeMechanism::NONE);
}
void ScBootstrapFixture::createCSVPath(const OUString& aFileBase, OUString& rCSVPath)
diff --git a/sc/qa/unit/opencl-test.cxx b/sc/qa/unit/opencl-test.cxx
index b5138a5ff068..83ed36b81010 100644
--- a/sc/qa/unit/opencl-test.cxx
+++ b/sc/qa/unit/opencl-test.cxx
@@ -4727,7 +4727,7 @@ void ScOpenCLTest::testStatisticalFormulaStDevPA1()
}
ScOpenCLTest::ScOpenCLTest()
- : ScBootstrapFixture( "/sc/qa/unit/data" )
+ : ScBootstrapFixture( "sc/qa/unit/data" )
{
}
diff --git a/sc/qa/unit/parallelism.cxx b/sc/qa/unit/parallelism.cxx
index 5876c83e9b91..1bd725ad38b1 100644
--- a/sc/qa/unit/parallelism.cxx
+++ b/sc/qa/unit/parallelism.cxx
@@ -60,7 +60,7 @@ private:
};
ScParallelismTest::ScParallelismTest()
- : ScBootstrapFixture( "/sc/qa/unit/data" )
+ : ScBootstrapFixture( "sc/qa/unit/data" )
{
}
diff --git a/sc/qa/unit/subsequent_export-test.cxx b/sc/qa/unit/subsequent_export-test.cxx
index 6d53bb5f33fd..45f56d08fa03 100644
--- a/sc/qa/unit/subsequent_export-test.cxx
+++ b/sc/qa/unit/subsequent_export-test.cxx
@@ -3343,7 +3343,7 @@ void ScExportTest::testSwappedOutImageExport()
}
ScExportTest::ScExportTest()
- : ScBootstrapFixture("/sc/qa/unit/data")
+ : ScBootstrapFixture("sc/qa/unit/data")
{
}