Revision 724787

Go back to digest for 14th October 2007

Features in Office

Thorsten Zachmann committed changes in /trunk/koffice:

o added method to save the styles.xml files out of KoGenStyles.
o handle default styles
o ported test to QTest
o port kspread to the new unified saving code. (it is in this commit as it uses default styles and the handling has changed a bit)

With this change it is now possible to save the styles.xml file when you use the KoGenStyles by simply calling

saveOdfStylesDotXml(...);

To save all automatic-styles into content.xml call

saveOdfAutomaticStyles( contentWriter, false );

If there is a style missing that you need in the styles.xml or in the automatic-styles of the content.xml file it has to be added to KoGenStyle.h and to KoGenStyles.cpp. With this change all koffice apps can use the same infrastructure for saving styles which removes a lot of duplicated code.

I have ported most of the applications to use this new function and will commit them soon. KChart is not yet done as first the type used for the styles in KChart has to be changed.

Please test your applications and report back when you find any problems caused by this patch.

File Changes

Added 2 files
  • /trunk/koffice/libs/main/tests
  •   /TestKoGenStyles.cpp
  •   /TestKoGenStyles.h
Deleted 1 files
  • /trunk/koffice/libs/main/tests/kogenstylestest.cpp
Modified 7 files
  • /trunk/koffice
  •   /kspread/Doc.cpp
  •   /kspread/Doc.h
  •   /kspread/SheetPrint.cpp
  •   /libs/main/KoGenStyles.cpp
  •   /libs/main/KoGenStyles.h
  •   /libs/main/tests/CMakeLists.txt
  •   /libs/store/tests/xmlwritertest.h
10 files changed in total