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

Propose to add new API to insert form controls into document

    XMLWordPrintableJSON

Details

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

    Description

      Here's a customer requirement that new APIs are needed to insert standard from controls into document, like Radio buttons, Checkboxes and InputFields. Additionally, it is required to assign appropriate labels and values to the inserted controls.

      To support this feature, a problem came up first. A form control is implementation-dependent and it may have self-defined attributes that cannot be ignored and auto-generated by editors. Besides, not all the forms defined in the ODF specs are fully supported by common ODF editors.For example, AOO use <form:formatted-text> to implement date field and time field.

      I think one way to resolve this can be separating the implementation-dependent details from other contents. Define a provider class which implements Form interface and provide methods to create controls, like provider.createTextArea(initValues). For now we can only use OOFormProvider as the default one and use its implementation methods to initiate the controls, but user can also define customized providers by themselves.

      Besides, how to define the style of a shape and set anchor type of a control to char may be also complex. I'll try to figure them out as I dig into the details.

      Any one have comments or ideas with this proposal? Thanks!

      Attachments

        1. createFormInTextDocument.patch
          234 kB
          Ke Jia
        2. createFormIntextDocument_v2.patch
          151 kB
          Ke Jia

        Activity

          People

            Unassigned Unassigned
            kejia Ke Jia
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: