summaryrefslogtreecommitdiff
path: root/include/test
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2022-11-04 17:31:55 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2022-11-08 11:54:22 +0100
commit248be1fe7d31499fe7e237bb15ec67b55962c1a7 (patch)
treed2a3693af5d555f5c6cca31b625a9001af21e869 /include/test
parent444bf8710d5da7b584fbcb94693e4ed8d2e29297 (diff)
UnoApiTest: simplify code by using tempfile member
SwModelTestBase does the same. this will help to make SwModelTestBase inherit from UnoApiTest Change-Id: If1c824cf92f0e8b70253e4d5fdeddcaa521d4632 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142287 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'include/test')
-rw-r--r--include/test/unoapi_test.hxx8
-rw-r--r--include/test/unoapixml_test.hxx2
2 files changed, 6 insertions, 4 deletions
diff --git a/include/test/unoapi_test.hxx b/include/test/unoapi_test.hxx
index 2b29e50a5bfd..90fc65ef6d08 100644
--- a/include/test/unoapi_test.hxx
+++ b/include/test/unoapi_test.hxx
@@ -36,9 +36,9 @@ public:
css::uno::Any executeMacro(const OUString& rScriptURL,
const css::uno::Sequence<css::uno::Any>& rParams = {});
- utl::TempFileNamed save(const OUString& rFilter);
- utl::TempFileNamed saveAndClose(const OUString& rFilter);
- utl::TempFileNamed saveAndReload(const OUString& rFilter);
+ void save(const OUString& rFilter);
+ void saveAndClose(const OUString& rFilter);
+ void saveAndReload(const OUString& rFilter);
void skipValidation() { mbSkipValidation = true; }
void setFilterOptions(const OUString& rFilterOptions) { maFilterOptions = rFilterOptions; }
@@ -47,6 +47,8 @@ protected:
// reference to document component that we are testing
css::uno::Reference<css::lang::XComponent> mxComponent;
+ utl::TempFileNamed maTempFile;
+
private:
bool mbSkipValidation;
OUString m_aBaseString;
diff --git a/include/test/unoapixml_test.hxx b/include/test/unoapixml_test.hxx
index 36fb334a75cd..660fda6c2050 100644
--- a/include/test/unoapixml_test.hxx
+++ b/include/test/unoapixml_test.hxx
@@ -22,7 +22,7 @@ class OOO_DLLPUBLIC_TEST UnoApiXmlTest : public UnoApiTest, public XmlTestTools
public:
UnoApiXmlTest(OUString path);
- xmlDocUniquePtr parseExport(OUString const& rTempFile, OUString const& rStreamName);
+ xmlDocUniquePtr parseExport(OUString const& rStreamName);
};
#endif // INCLUDED_TEST_UNOAPIXML_TEST_HXX