To comment on the following update, log in, then open the issue:
http://www.openoffice.org/issues/show_bug.cgi?id=71060
                 Issue #|71060
                 Summary|Filter needs to iterate over all objects in Writer doc
                        |ument in order
               Component|Word processor
                 Version|OOo 2.0.4
                Platform|All
                     URL|
              OS/Version|All
                  Status|UNCONFIRMED
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|DEFECT
                Priority|P3
            Subcomponent|programming
             Assigned to|mru
             Reported by|ibshields





------- Additional comments from [EMAIL PROTECTED] Tue Oct 31 18:42:49 -0800 
2006 -------
Chapter 7 of the developers guide discusses iterating over text in a Writer
document. In particular:

"Paragraphs also have an com.sun.star.container.XEnumerationAccess of their own.
 They can enumerate every single text portion that they contain. A text portion
is a text range containing a uniform piece of information that appears within
the text flow. An ordinary paragraph, formatted in a uniform manner and
containing nothing but a string, enumerates just a single text portion. In a
paragraph that has specially formatted words or other contents, the text portion
enumeration  returns one com.sun.star.text.TextPortion service for each
differently formatted string, and for every other text content. Text portions
include the service com.sun.star.text.TextRange and have the properties listed
below:"

Thus objects anchored at a character, such as graphic objects, can be found in
their logical order by iterating over the containing paragraph, but objects such
as graphic objects, that are anchored at a paragraph are not returned when
iterating over the paragraphs of the document using the code illustration:
       // Here, we access this interface
        XEnumerationAccess xParaAccess = (XEnumerationAccess)
UnoRuntime.queryInterface(
            XEnumerationAccess.class, mxDocText);
        // Call the XEnumerationAccess's only method to access the actual
Enumeration
        XEnumeration xParaEnum = xParaAccess.createEnumeration();
        // While there are paragraphs, do things to them
        while (xParaEnum.hasMoreElements()) {
}

There appears to be no documented method to iterate over all objects in a Writer
document in order as is required for a filter.

Ian

---------------------------------------------------------------------
Please do not reply to this automatically generated notification from
Issue Tracker. Please log onto the website and enter your comments.
http://qa.openoffice.org/issue_handling/project_issues.html#notification

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to