summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/qa/extras/chart2export.cxx2
-rw-r--r--chart2/qa/extras/charttest.hxx10
2 files changed, 10 insertions, 2 deletions
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index cd98f216777e..02795831467e 100644
--- a/chart2/qa/extras/chart2export.cxx
+++ b/chart2/qa/extras/chart2export.cxx
@@ -214,7 +214,7 @@ OUString findChartFile(const OUString& rDir, uno::Reference< container::XNameAcc
xmlDocPtr Chart2ExportTest::parseExport(const OUString& rDir, const OUString& rFilterFormat)
{
- std::shared_ptr<utl::TempFile> pTempFile = reload(rFilterFormat);
+ std::shared_ptr<utl::TempFile> 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());
diff --git a/chart2/qa/extras/charttest.hxx b/chart2/qa/extras/charttest.hxx
index 843bf3756eff..9c174cf8e0a4 100644
--- a/chart2/qa/extras/charttest.hxx
+++ b/chart2/qa/extras/charttest.hxx
@@ -71,6 +71,7 @@ class ChartTest : public test::BootstrapFixture, public unotest::MacrosTest
public:
ChartTest():mbSkipValidation(false) {}
void load( const OUString& rDir, const OUString& rFileName );
+ std::shared_ptr<utl::TempFile> save( const OUString& rFileName );
std::shared_ptr<utl::TempFile> reload( const OUString& rFileName );
uno::Sequence < OUString > getImpressChartColumnDescriptions( const char* pDir, const char* pName );
OUString getFileExtension( const OUString& rFileName );
@@ -117,7 +118,7 @@ void ChartTest::load( const OUString& aDir, const OUString& aName )
CPPUNIT_ASSERT(mxComponent.is());
}
-std::shared_ptr<utl::TempFile> ChartTest::reload(const OUString& rFilterName)
+std::shared_ptr<utl::TempFile> ChartTest::save(const OUString& rFilterName)
{
uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY);
auto aArgs(::comphelper::InitPropertySequence({
@@ -126,6 +127,13 @@ std::shared_ptr<utl::TempFile> ChartTest::reload(const OUString& rFilterName)
std::shared_ptr<utl::TempFile> pTempFile = std::make_shared<utl::TempFile>();
pTempFile->EnableKillingFile();
xStorable->storeToURL(pTempFile->GetURL(), aArgs);
+
+ return pTempFile;
+}
+
+std::shared_ptr<utl::TempFile> ChartTest::reload(const OUString& rFilterName)
+{
+ std::shared_ptr<utl::TempFile> pTempFile = save(rFilterName);
mxComponent->dispose();
mxComponent = loadFromDesktop(pTempFile->GetURL(), maServiceName);
std::cout << pTempFile->GetURL();