Date: prev next · Thread: first prev next last
2013 Archives by date, by thread · List index


Hi all,

I recently added a new unit test to Writer docx test suite.
It's quite simple: a single page document with one table filling all the page. The test then verifies that after import/export the document has indeed 1 page. (see sw/qa/extras/ooxmlexport/ooxmlexport.cxx and sw/qa/extras/ooxmlexport/data/1-table-1-page.docx)

The problem is: on some machine, for instance Linux-openSUSE-x86@18-Clang Tinderbox, this test is failing like this:

code:
   CPPUNIT_ASSERT_EQUAL(sal_Int16(1), xCursor->getPage());
result:
equality assertion failed
- Expected: 1
- Actual  : 2

But on the very same machine, manually opening the docx file with LibreOffice lead to a 1 page document.

I tried to fix that by:
- inserting a call to ViewShell::CalcLayout after loading the document, and before querying the page count => fails
  - use ViewShell::LayoutIdle instead => fails too
- making SwModelTestBase a SfxListener, and prevent the 'calcLayout' method to return until SW_EVENT_LAYOUT_FINISHED event is received => fails too: if I block the execution, no events are received by the Notify function (everything is running in the same thread maybe ?)

Any ideas of what I'm doing wrong or how to fix the issue ?

Thanks!

Pierre-Eric



Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.