Uploaded image for project: 'ODF Toolkit'
  1. ODF Toolkit
  2. ODFTOOLKIT-339

[Simpe]Add new methods in TextDocument to suport insert a d ocument into an open document

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.5-incubating
    • 0.6-incubating
    • simple api
    • None

    Description

      Dear all,

      Do you have meet this requirement before?

      Customer want to render a report from other source documents, all the target and source documents are using the same style templates.
      With ODF toolkit API, we can append the content of source documents to target document with styles, but during document insertation the styles existing in the target and the source document are
      added again to the target document.
      Example: Both the report master doc (= target doc) and the inserted doc (= sourcedoc) have the identical style "MinD Standard" defined to it. After appending the source doc to the master doc there three styles in the report master doc: the original style "MinD Standard" and two additional styles named "MinD Standard-ala266c" and MinD Standard-af9e507". The paragraphs from the source doc which were originally formatted with "MinD Standard" are in the master doc now formatted with "MinD Standard-af9e507".

      This is very confusing for users to see for every included source doc the multiple styles included in the target doc.

      So a propose add new methods in TextDocument to meet this requirement:
      TextDocument.insertContentFromDocumentAfter(docName, positon, isCopyStyle)
      TextDocument.insertContentFromDocumentBefore(docName, positon, isCopyStyle)

      Parameters for the API are: 1. Name of the source doc to be inserted, 2. Paragraph location where to put the insert doc, 3. copy the style of the insert doc (Boolean: yes/no)
      if isCopyStyle is yes then insert styles in source document to the master doc.
      if isCopyStyle is no then don't insert styles to source document to the master doc.

      Any comments about this ?

      Attachments

        1. ODF_339.patch
          24 kB
          Da Li Liu
        2. TestInsertDocument.odt
          13 kB
          Da Li Liu

        Activity

          People

            liudali Da Li Liu
            liudali Da Li Liu
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 336h
                336h
                Remaining:
                Remaining Estimate - 336h
                336h
                Logged:
                Time Spent - Not Specified
                Not Specified