Revision 878f2bf...

Go back to digest for 17th June 2012

Bug Fixes in Office

Thorsten Zachmann committed changes in [calligra] /:

Fix saving of style child elements

When saving style child elements the child elements where always saved into the default property. However this is not correct as the output of Jos tests shows

[01:53:45]: kofficetests-odp (17s)
[01:53:45]: [kofficetests-odp] odf/odp/114096.odp
[01:53:45]: [odf/odp/114096.odp]
INVALIDSTYLESXML: (unknown file):267: error: element "style:tab-stops" not allowed here; expected the element end-tag or element "style:background-image", "style:columns" or "text:list-style"
INVALIDCONTENTXML: (unknown file):1061: error: element "style:tab-stops" not allowed here; expected the element end-tag or element "style:background-image", "style:columns" or "text:list-style"
(unknown file):1081: error: element "style:tab-stops" not allowed here; expected the element end-tag or element "style:background-image", "style:columns" or "text:list-style"

The problem is that the stye:tab-stops are added to the graphic properties but should be added to the paragraph properties.

This patch adds the possibility to define the property the child elements should be added too.

File Changes

Modified 4 files
  •   libs/odf/KoGenStyle.cpp
  •   libs/odf/KoGenStyle.h
  •   libs/kotext/styles/KoParagraphStyle.cpp
  •   libs/odf/tests/TestKoGenStyles.cpp
4 files changed in total