summaryrefslogtreecommitdiff
path: root/chart2/qa
diff options
context:
space:
mode:
authorNoel Grandin <noelgrandin@gmail.com>2022-09-21 20:54:00 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-09-29 09:11:18 +0200
commit4b95451f859bac8e05956ce12df17f1ee410032d (patch)
tree2ebe03c8ecbba3c9179d33c346774e037fcfc224 /chart2/qa
parenta08468c1a5255d3fb04cd8a0dc627acdea40426a (diff)
split utl::TempFile into fast and named variants
which makes it easier to know what each variant requires to stay on it's happy path Change-Id: I3275a2543573367714bc78092e882f6535507285 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140469 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/qa')
-rw-r--r--chart2/qa/extras/charttest.hxx14
1 files changed, 7 insertions, 7 deletions
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index 0097229cfe34..a2fb6209bcea 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -116,8 +116,8 @@ class ChartTest : public test::BootstrapFixture, public unotest::MacrosTest, pub
public:
ChartTest():mbSkipValidation(false) {}
void load( std::u16string_view rDir, std::u16string_view rFileName );
- std::shared_ptr<utl::TempFile> save( const OUString& rFileName );
- std::shared_ptr<utl::TempFile> reload( const OUString& rFileName );
+ std::shared_ptr<utl::TempFileNamed> save( const OUString& rFileName );
+ std::shared_ptr<utl::TempFileNamed> reload( const OUString& rFileName );
uno::Sequence < OUString > getImpressChartColumnDescriptions( std::u16string_view pDir, const char* pName );
std::u16string_view getFileExtension( std::u16string_view rFileName );
@@ -174,22 +174,22 @@ void ChartTest::load( std::u16string_view aDir, std::u16string_view aName )
mxComponent = loadFromDesktop(m_directories.getURLFromSrc(aDir) + aName, maServiceName);
}
-std::shared_ptr<utl::TempFile> ChartTest::save(const OUString& rFilterName)
+std::shared_ptr<utl::TempFileNamed> ChartTest::save(const OUString& rFilterName)
{
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
auto aArgs(::comphelper::InitPropertySequence({
{ "FilterName", Any(rFilterName) }
}));
- std::shared_ptr<utl::TempFile> pTempFile = std::make_shared<utl::TempFile>();
+ std::shared_ptr<utl::TempFileNamed> pTempFile = std::make_shared<utl::TempFileNamed>();
pTempFile->EnableKillingFile();
xStorable->storeToURL(pTempFile->GetURL(), aArgs);
return pTempFile;
}
-std::shared_ptr<utl::TempFile> ChartTest::reload(const OUString& rFilterName)
+std::shared_ptr<utl::TempFileNamed> ChartTest::reload(const OUString& rFilterName)
{
- std::shared_ptr<utl::TempFile> pTempFile = save(rFilterName);
+ std::shared_ptr<utl::TempFileNamed> pTempFile = save(rFilterName);
mxComponent->dispose();
mxComponent = loadFromDesktop(pTempFile->GetURL(), maServiceName);
std::cout << pTempFile->GetURL();
@@ -723,7 +723,7 @@ getShapeByName(const uno::Reference<drawing::XShapes>& rShapes, const OUString&
xmlDocUniquePtr ChartTest::parseExport(const OUString& rDir, const OUString& rFilterFormat)
{
- std::shared_ptr<utl::TempFile> pTempFile = save(rFilterFormat);
+ std::shared_ptr<utl::TempFileNamed> pTempFile = save(rFilterFormat);
// Read the XML stream we're interested in.
uno::Reference<packages::zip::XZipFileAccess2> xNameAccess = packages::zip::ZipFileAccess::createWithURL(comphelper::getComponentContext(m_xSFactory), pTempFile->GetURL());