[prev in list] [next in list] [prev in thread] [next in thread] 

List:       koffice-devel
Subject:    Re: putting a style in styles.xml
From:       Thorsten Zachmann <t.zachmann () zagge ! de>
Date:       2009-10-30 20:29:06
Message-ID: 200910302129.06134.t.zachmann () zagge ! de
[Download RAW message or body]

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.
> 
> <office:document-styles>
>  <office:styles>
>   <style:style style:name="standard" style:family="graphic"> <!-- how can i
> make this? -->
>   </style:style>
> 
> I have tried KoGenStyle::setAutoStyleInStylesDotXml but that produces
>  children for <office:automatic-styles> and KoGenStyle::setDefaultStyle
>  which produces <style:default-style/>. 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
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic