[Libreoffice-commits] core.git: chart2/qa
Markus Mohrhard
markus.mohrhard at googlemail.com
Mon May 16 03:21:24 UTC 2016
chart2/qa/extras/chart2export.cxx | 2 +-
chart2/qa/extras/charttest.hxx | 10 +++++++++-
2 files changed, 10 insertions(+), 2 deletions(-)
New commits:
commit df5235560730ff73729c496476a0be02eb8c4ac6
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date: Mon May 16 03:43:24 2016 +0200
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 at libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard at googlemail.com>
diff --git a/chart2/qa/extras/chart2export.cxx b/chart2/qa/extras/chart2export.cxx
index cd98f21..0279583 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 843bf37..9c174cf 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();
More information about the Libreoffice-commits
mailing list