From koffice-devel Fri Oct 30 20:29:06 2009 From: Thorsten Zachmann Date: Fri, 30 Oct 2009 20:29:06 +0000 To: koffice-devel Subject: Re: putting a style in styles.xml Message-Id: <200910302129.06134.t.zachmann () zagge ! de> X-MARC-Message: https://marc.info/?l=koffice-devel&m=125693458915984 On Fri October 30 2009, Jos van den Oever wrote: > Hi all, > > In libppt, the part of koffice that converts ppt files to odp files, > applying styles to drawing elements is important. I have refactored the > styling code to use KoGenStyle for this. > > On issue that I am facing now is that I cannot find out how to write an > element like below in styles.xml. > > > > > > > I have tried KoGenStyle::setAutoStyleInStylesDotXml but that produces > children for and KoGenStyle::setDefaultStyle > which produces . Perhaps there is an option missing > in KoGenStyle to do this. I assume you want to create document styles. This is done by using the correct type. You need to use StyleUser instead of StyleAuto. StyleUser, ///< style:style with style:paragraph- properties as in odf 14.1 Style Element (office:styles) StyleAuto, ///< style:style with style:paragraph- properties as in odf 14.1 Style Element (office:automatic-styles) See KoGenStyle::Type enum for the correct styles types. Thorsten _______________________________________________ koffice-devel mailing list koffice-devel@kde.org https://mail.kde.org/mailman/listinfo/koffice-devel