forked from amazingfate/loongoffice
The problem was that in case a paragraph is empty, and it has both a
character style and direct formatting, then the doc model created by the
ODT and DOCX import is like this:
<text>
<attrset>
<item whichId="8" which="character font size" value="nHeight: 240, nProp: 100"/>
</attrset>
<hints>
<hint end="0" whichId="52" which="character format" value="name: hello"/>
</hints>
</text>
I.e. the direct formatting is stored in the attribute set of the text
node directly, while the character style is stored as a hint.
MSWordExportBase::OutputTextNode() tried to read the hints and if there
were not any, then tried to read the attribute set, while in this
situation we need both.
Change-Id: I71fd10f6d00246348e77fee5431cb4e2a7c9b349
You can find different types of Writer tests here, the following directories
are available:
- core:
- filters-test: loads different file types (see SwFiltersTest::testCVEs() for
the list of supported filter types), and only makes sure Writer does not
crash. To add new tests, you just need to drop in the test files to the
relevant directory, no code change is necessary.
- uwriter: this test has access to private Writer symbols, add new tests here
if you need that.
- extras:
- see its own README -- executes import and export filters and asserts the
UNO model to verify the resulting document is the expected one.
- also, any new C++ test that links to libsw (but does not need access to
private Writer symbols) should go in this directory, whether using the UNO
API or the internal one.
- complex: JUnit-based tests using the UNO API
- unoapi: JUnit-based test trying to get/set every UNO property, etc.