incubator-odf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ian C <...@amham.net>
Subject Re: How to reuse styles from input template document? No answer till now :(
Date Sun, 30 Mar 2014 11:34:51 GMT
Hi Ahmed,

have you tried the loadTemplate function of the ODFDocument class in the
ODFDom?

Then look at the the setStyleName function of a Paragraph.

So if you create a document from your template then get/created paragraphs
call the setStyleName if "Heading1" and save.

Then open the document is OpenOffice and see that it looks like you expect?

Good luck.


On Sat, Mar 29, 2014 at 9:39 PM, Ahmed I Ibrahim <AIBRAHIM@eg.ibm.com>wrote:

> Dear all
>
> I am in the middle of generating an important report and I really need a
> help here.
>
> How to reuse styles create in a template file in the generated document. I
> am trying to get my way in the odf-simple apis but no luck. I hope some
> one can help me in this.
>
> Below is the details of my question again. I tried to sample demos, as
> well as the cookbook with no luck. If you have some documentation that I
> can use, that will be great.
>
> Thanks & Best Regards / السلام عليكم
>
> Ahmed Ibrahim
> MBA ,Senior IT Architect, SWG Cairo Lab Services
> BPM Client Solution Manager, MEA
> IT Architect Egypt Profession Lead
> Mobile: +20 100 1615 506
>
>
>
> From:   Ahmed I Ibrahim/Egypt/IBM@IBMEG
> To:     odf-users@incubator.apache.org,
> Date:   03/27/2014 01:16 AM
> Subject:        How to reuse styles from input template document?
>
>
>
> Dear all,
>
> I am trying to do the following:
>
> I am trying to create a document doc.odt from a template of another
> document template.odt
>
> The template contains some custom styles for Heading 1, 2, and 3 as well
> as Style for a table and chart.
>
> For Heading 1, when I use
>  para1.applyHeading(true, 1);
>
> It is not reuse the heading 1 style from the template. While I use setting
>
> the font it is applied.
>
> It is the same problem for the rest of the styles.
>
> Am, I missing some parts here? How can I reuse the styles (that I defined
> by name) from the template in the generated text document?
>
> I am stucked and I appreciate your help here.
>
>
> Thanks & Best Regards / السلام عليكم
>
> Ahmed Ibrahim
> MBA ,Senior IT Architect, SWG Cairo Lab Services
> BPM Client Solution Manager, MEA
> IT Architect Egypt Profession Lead
> Mobile: +20 100 1615 506
>
>
>


-- 
Cheers,

Ian C

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message