putting a style in styles.xml

View: New views
3 Messages — Rating Filter:   Alert me  

putting a style in styles.xml

by jos.van.den.oever :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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.

Cheers,
Jos

--
Jos van den Oever, software architect
+49 391 25 19 15 53
http://kogmbh.com/legal/
_______________________________________________
koffice-devel mailing list
koffice-devel@...
https://mail.kde.org/mailman/listinfo/koffice-devel

Re: putting a style in styles.xml

by Jaroslaw Staniek :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

2009/10/30 Jos van den Oever <Jos.van.den.Oever@...>:
> 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.
>

Perhaps looking at the body of TestKoGenStyles::testLookup()
could help?

--
regards / pozdrawiam, Jaroslaw Staniek
 Kexi & KOffice (http://www.kexi-project.org, http://www.koffice.org)
 KDE Libraries for MS Windows (http://windows.kde.org)
 http://www.linkedin.com/in/jstaniek
_______________________________________________
koffice-devel mailing list
koffice-devel@...
https://mail.kde.org/mailman/listinfo/koffice-devel

Re: putting a style in styles.xml

by Bugzilla from t.zachmann@zagge.de :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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@...
https://mail.kde.org/mailman/listinfo/koffice-devel