summaryrefslogtreecommitdiff
path: root/sc/qa/extras/scddelinksobj.cxx
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-23 11:51:57 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-23 14:43:56 +0100
commit6c3cebd5aaec641807f5efed814fc5d1c64df149 (patch)
treedc5333838c1a973afc5b72190e0be28dfcdc6e76 /sc/qa/extras/scddelinksobj.cxx
parent139d1aa610d19ab200deff1e3cd2c787f5c87d89 (diff)
UnoApiTest: factor out createTempFile
Change-Id: I8d7bb4593839d3660b6609d836b09d50b68f5712 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143141 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'sc/qa/extras/scddelinksobj.cxx')
-rw-r--r--sc/qa/extras/scddelinksobj.cxx9
1 files changed, 3 insertions, 6 deletions
diff --git a/sc/qa/extras/scddelinksobj.cxx b/sc/qa/extras/scddelinksobj.cxx
index bb92a5a5151a..6a3a843ca9a1 100644
--- a/sc/qa/extras/scddelinksobj.cxx
+++ b/sc/qa/extras/scddelinksobj.cxx
@@ -81,12 +81,10 @@ public:
ScDDELinksObj::ScDDELinksObj()
: UnoApiTest("/sc/qa/extras/testdocuments")
- , XDDELinks(m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods"))
+ , XDDELinks(createFileURL(u"ScDDELinksObj.ods"))
, XElementAccess(cppu::UnoType<sheet::XDDELink>::get())
, XIndexAccess(1)
- , XNameAccess("soffice|"
- + m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods")
- + "!Sheet1.A1")
+ , XNameAccess("soffice|" + createFileURL(u"ScDDELinksObj.ods") + "!Sheet1.A1")
, XServiceInfo("ScDDELinksObj", "com.sun.star.sheet.DDELinks")
{
}
@@ -99,8 +97,7 @@ uno::Reference<uno::XInterface> ScDDELinksObj::init()
uno::Reference<container::XIndexAccess> xIA(xSheets, uno::UNO_QUERY_THROW);
uno::Reference<sheet::XSpreadsheet> xSheet(xIA->getByIndex(0), uno::UNO_QUERY_THROW);
- const OUString testdoc
- = m_directories.getURLFromSrc(u"/sc/qa/unoapi/testdocuments/ScDDELinksObj.ods");
+ const OUString testdoc = createFileURL(u"ScDDELinksObj.ods");
xSheet->getCellByPosition(5, 5)->setFormula("=DDE(\"soffice\";\"" + testdoc
+ "\";\"Sheet1.A1\")");