summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2023-03-21 09:49:31 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2023-03-21 10:57:02 +0000
commit53946b0698d63849266f465c16386dd8e9319f19 (patch)
treee304bb45bee18cf0dffdd9cb38fdf8b9b2cea3d7 /sc
parent4fd7d1a9e64ed256d442ef997c80bce92afe839b (diff)
CppunitTest_sc_subsequent_filters_test4: simplify code a bit
Change-Id: I85f8a4859e741959f841b82e771d45e9a362cc20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149199 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc')
-rw-r--r--sc/qa/unit/subsequent_filters_test4.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/sc/qa/unit/subsequent_filters_test4.cxx b/sc/qa/unit/subsequent_filters_test4.cxx
index 21a918086304..98f66c600f47 100644
--- a/sc/qa/unit/subsequent_filters_test4.cxx
+++ b/sc/qa/unit/subsequent_filters_test4.cxx
@@ -984,15 +984,12 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testColorScaleNumWithRefXLSX)
CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf153514)
{
ScDocument aDoc;
- OUString aFullUrl = m_directories.getURLFromSrc(u"sc/qa/unit/data/xml/tdf153514.xml");
-
- OUString aValidPath;
- osl::FileBase::getSystemPathFromFileURL(aFullUrl, aValidPath);
+ OUString aPath = createFilePath(u"xml/tdf153514.xml");
ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
CPPUNIT_ASSERT(pOrcus);
- pOrcus->importODS_Styles(aDoc, aValidPath);
+ pOrcus->importODS_Styles(aDoc, aPath);
ScStyleSheetPool* pStyleSheetPool = aDoc.GetStyleSheetPool();
ScStyleSheet* pStyleSheet;
@@ -1022,16 +1019,12 @@ CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testTdf153514)
CPPUNIT_TEST_FIXTURE(ScFiltersTest4, testOrcusODSStyleInterface)
{
ScDocument aDoc;
- OUString aFullUrl = m_directories.getURLFromSrc(u"sc/qa/unit/data/xml/styles.xml");
-
- /* This loop below trims file:// from the start because orcus doesn't accept such a URL */
- OUString aValidPath;
- osl::FileBase::getSystemPathFromFileURL(aFullUrl, aValidPath);
+ OUString aPath = createFilePath(u"xml/styles.xml");
ScOrcusFilters* pOrcus = ScFormatFilter::Get().GetOrcusFilters();
CPPUNIT_ASSERT(pOrcus);
- pOrcus->importODS_Styles(aDoc, aValidPath);
+ pOrcus->importODS_Styles(aDoc, aPath);
ScStyleSheetPool* pStyleSheetPool = aDoc.GetStyleSheetPool();
/* Test cases for Style "Name1"