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

Add method getText() to OdfDocument

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • odfdom-0.8.6
    • odfdom-0.8.7
    • java
    • None
    • Operating System: All
      Platform: All
    • 230

    Description

      Either the current doc.OdfDocument and the upcoming dom.OdfDocument (see issue 229) require a getText() method.

      We should try to move the getText() method from this incubator helper class OdfWhitespaceProcessor to OdfElement and overriding it by special whitespace behavior of other classes.

      getText() should use a recursion similar as OdfElement.toString(), which returns in addition XML layout for debugging purpose - in an IDE holding the mouse cursor over a variable containing XML.

      For instance the getText() method of
      TextTabElement might return a return, triggered in Java by "\t"
      TextLineBreakElement might return a return, triggered in Java by "\n"

      Helpful is the whitespace section of ODF 1.2, see
      http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#a_3_18_White_Space_Processing_and_EOL_Handling
      http://docs.oasis-open.org/office/v1.2/cd05/OpenDocument-v1.2-cd05-part1.html#White-space_Characters

      Could you continue with requirements & design, please?

      Thanks,
      Svante

      Attachments

        Issue Links

          Activity

            People

              devin@odftoolkit.org devin
              svanteschubert@odftoolkit.org Svante Schubert
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: