incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kejia Ye (JIRA)" <>
Subject [jira] [Created] (ODFTOOLKIT-336) Add new APIs to set page style when inserting page break in TextDocument
Date Thu, 30 Aug 2012 06:20:08 GMT
Kejia Ye created ODFTOOLKIT-336:

             Summary: Add new APIs to set page style when inserting page break in TextDocument
                 Key: ODFTOOLKIT-336
             Project: ODF Toolkit
          Issue Type: New Feature
          Components: simple api
    Affects Versions: 0.7
            Reporter: Kejia Ye
             Fix For: 0.8

I'd like to propose a new API which would allow customers to set the page style when inserting
a page break. It's a common scenario to change page style when adding page break, like from
"Portrait" to "Landscape" or vice versa. 

In ODF specs, page style is defined through style:master-page, which specify the page formatting
properties through style:page-layout-name. In text document, a master page can be assigned
to paragraph style using a style:master-page-name attribute. Each time the paragraph style
is applied to text, a page break is inserted before the paragraph. A page that starts at the
page break would use the specified master page. 

Need provide APIs to do 2 things:

(1) Define a new master page or get an existing master page. 
-  New class MasterPage, which would provide get/set methods for page layout properties, like
page width, page height, print orientation, margin and so on.

(2) Assign the master page to an appointed paragraph to add page break before it.
 -  TextDocument.addPageBreak(Paragraph refParagraph, MasterPage masterPage)

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message