diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-13 22:04:41 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-11-13 22:30:19 +0100 |
commit | 70ad8ec6d5bd9b2b146d7409ec06d3414cd8551c (patch) | |
tree | d0d09efe33c4abc3474e5e72955c26e4185dd197 /sw/qa/extras/inc | |
parent | f15efcb0f53ea45bf4d44a83e60706d4899c42cd (diff) |
Make CppunitTest_sw_htmlexport use DECLARE_SW_ROUNDTRIP_TEST()
Change-Id: Idc524ce084e117a9cfe816e5012ef33ea774fef6
Diffstat (limited to 'sw/qa/extras/inc')
-rw-r--r-- | sw/qa/extras/inc/swmodeltestbase.hxx | 21 |
1 files changed, 16 insertions, 5 deletions
diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 27cacf254a1c..79eb8af578ed 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -139,8 +139,10 @@ protected: void executeImportExportImportTest(const char* filename) { header(); + preTest(filename); load(mpTestDocumentPath, filename); - reload(mpFilter); + reload(mpFilter, filename); + postTest(filename); verify(); finish(); } @@ -174,6 +176,14 @@ protected: { } + /** + * Override this function if not calcing layout is needed + */ + virtual bool mustCalcLayoutOf(const char* /*filename*/) + { + return true; + } + private: void dumpLayout() { @@ -391,7 +401,7 @@ protected: std::cerr << "File tested,Execution Time (ms)" << std::endl; } - void load(const char* pDir, const char* pName, bool bCalcLayout = true) + void load(const char* pDir, const char* pName) { if (mxComponent.is()) mxComponent->dispose(); @@ -399,11 +409,11 @@ protected: std::cerr << pName << ","; m_nStartTime = osl_getGlobalTimer(); mxComponent = loadFromDesktop(getURLFromSrc(pDir) + OUString::createFromAscii(pName), "com.sun.star.text.TextDocument"); - if (bCalcLayout) + if (mustCalcLayoutOf(pName)) calcLayout(); } - void reload(const char* pFilter) + void reload(const char* pFilter, const char* filename) { uno::Reference<frame::XStorable> xStorable(mxComponent, uno::UNO_QUERY); uno::Sequence<beans::PropertyValue> aArgs(1); @@ -420,7 +430,8 @@ protected: xmlBufferFree(mpXmlBuffer); mpXmlBuffer = 0; } - calcLayout(); + if (mustCalcLayoutOf(filename)) + calcLayout(); } /// Save the loaded document to a tempfile. Can be used to check the resulting docx/odt directly as a ZIP file. |