Bug ID: 128083
           Summary: Possible CppunitTest_sw_ooxmlexport3 testCalendar3 bug
           Product: LibreOffice
           Version: unspecified
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer

I have been trying help with bug 127706. The approach I have taken causes the
cppunit test CppunitTest_sw_ooxmlexport3 to fail with:

Test name: testCalendar3::Import
equality assertion failed
- Expected: 6003669
- Actual  : 16711935

Test name: testCalendar3::Import_Export_Import
equality assertion failed
- Expected: 6003669
- Actual  : 16711935

Examining the test code I noticed getRun uses getParagraphOfText for the
XTextRange reference argument in the testCalendar2 code: 

CPPUNIT_ASSERT_EQUAL(14.f, getProperty<float>(getRun(getParagraphOfText(1,
xCell->getText()), 1), "CharHeight"));

while in the testCalendar3 code getRun does not use getParagraphOfText

CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(xCell,1), "CharHeight"));

When I change getRun to use getParagraphOfText the test does not fail for the
patch or unpatched version.

getProperty<sal_Int32>(getRun(getParagraphOfText(1, xCell->getText()), 1),

CPPUNIT_ASSERT_EQUAL(16.f, getProperty<float>(getRun(getParagraphOfText(1,
xCell->getText()), 1), "CharHeight"));

I believe this may be a bug since the patch does not fail for testCalendar2
check of CharHeight but does fail for the CharHeight check in testCalendar3
when the CharColor test is commented out, and both the CharColor and CharHeight
tests in testCalendar3 do not fail when getParagraphOfText is used in getRun.

You are receiving this mail because:
You are the assignee for the bug.
Libreoffice-bugs mailing list

Reply via email to