<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - Possible CppunitTest_sw_ooxmlexport3 testCalendar3 bug"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=128083">128083</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>Possible CppunitTest_sw_ooxmlexport3 testCalendar3 bug
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Writer
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>raykowj@gmail.com
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I have been trying help with <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Clearing direct formatting breaks undo"
   href="show_bug.cgi?id=127706">bug 127706</a>. The approach I have taken causes the
cppunit test CppunitTest_sw_ooxmlexport3 to fail with:

ooxmlexport3.cxx:319:Assertion
Test name: testCalendar3::Import
equality assertion failed
- Expected: 6003669
- Actual  : 16711935

ooxmlexport3.cxx:319:Assertion
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.

CPPUNIT_ASSERT_EQUAL(sal_Int32(0x5B9BD5),
getProperty<sal_Int32>(getRun(getParagraphOfText(1, xCell->getText()), 1),
"CharColor"));

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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>