diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-05-16 03:43:24 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2016-05-16 03:21:05 +0000 |
commit | df5235560730ff73729c496476a0be02eb8c4ac6 (patch) | |
tree | b585bdda8d36656b59b98ac681b7c4fc54d0b5ff /chart2 | |
parent | 98505584ba3f324e36800704bbdacc2b7cf0ef71 (diff) |
parseExport only needs to export files
This saves about 50% of the chart2export test time as we no longer
import files that we will never need.
Change-Id: I7ddbae9e8b3194d10e2c25b59cfdd2fa5d345b9d
Reviewed-on: https://gerrit.libreoffice.org/25023
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/qa/extras/chart2export.cxx | 2 | ||||
-rw-r--r-- | chart2/qa/extras/charttest.hxx | 10 |
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(); |