Issue 29943 - Iteration through paragraphs inside a selection returns all subsequent paragraphs too
Summary: Iteration through paragraphs inside a selection returns all subsequent paragr...
Status: CLOSED FIXED
Alias: None
Product: App Dev
Classification: Unclassified
Component: api (show other issues)
Version: 3.3.0 or older (OOo)
Hardware: All All
: P3 Trivial
Target Milestone: ---
Assignee: stephan.wunderlich
QA Contact: issues@api
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-06-07 17:19 UTC by akrioukov
Modified: 2013-02-24 21:08 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
A Basic macro showing how the iterating through paragraphs in a selection works in 1.1.1 and above. (6.90 KB, application/vnd.sun.xml.writer)
2004-06-07 17:20 UTC, akrioukov
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description akrioukov 2004-06-07 17:19:29 UTC
One algorithm very commonly used in developing OOo components is iterating
through paragraphs and portions of the selected text. In fact, it is the only
way to get all occurences of text with e.g. some specific formatting, since
searching for formatted text in OOo Writer is broken (see issue 10569). That's
why I used this algorithm in almost all my projects, but beginning from 1.1.1 it
is no longer possible, because iterating through paragraphs of the selection now
gives an absolutely wrong results, i. e. not only selected (fully or partially)
paragraphs are returned, but also all subsequent ones.

However the worst thing is that this issue IMHO indicates that something is
wrong in the way how api-related parts of the OOo code are currently developed.
Really, on the on hand, it is clear that the developers actively work on some
problems related with portions and text ranges in OOo Writer. That's why each
new version has new bugs which never existed in previous releases (see for
example issue 29942). On the other hand, all issues related with this topic are
treated as not very important and retargeted to OOo Later (#24292, #24049,
#23552 for example). But this makes developing new macros and Writer plug-ins
simply impossible, since I don't know which bugs will occur in the next version
and what part of my code written for previous releases will become useless for
this reason.

At least please don't target this issue to OOo Later: since it is a result of
the very recent code changes, it should be fixed immediately.
Comment 1 akrioukov 2004-06-07 17:20:55 UTC
Created attachment 15719 [details]
A Basic macro showing how the iterating through paragraphs in a selection works in 1.1.1 and above.
Comment 2 stephan.wunderlich 2004-06-09 15:50:12 UTC
SW->TL: the attached macro creates a CursorByRange, where the used range is the
current selection ... now a ParagraphEnumeration is created.
In OOo1.1.0 this enumeration contained only the selected paragraphs, but with
OOo1.1.1 and still in the current milestone it returns all paragraphs starting
with the selected one.
Comment 3 thomas.lange 2004-06-11 09:03:05 UTC
.
Comment 4 thomas.lange 2004-07-12 07:59:38 UTC
Fixed in CWS tleamisc.

Files changed:
- unoobj2.cxx new revision: 1.42.52.3

TL->QA: When checking this one please check it also within tables and with the
new tables-in-tables. Thanks!
Comment 5 thomas.lange 2004-07-12 08:00:00 UTC
.
Comment 6 thomas.lange 2004-07-16 11:01:47 UTC
*** Issue 27733 has been marked as a duplicate of this issue. ***
Comment 7 thomas.lange 2004-08-06 11:32:23 UTC
.
Comment 8 thomas.lange 2004-08-06 11:32:48 UTC
OK in CWS tleamisc.
Comment 9 stephan.wunderlich 2004-08-11 09:52:12 UTC
fixed in cws_tleamisc
Comment 10 stephan.wunderlich 2004-08-11 09:52:48 UTC
works as expected in cws_tleamisc => verified
Comment 11 stephan.wunderlich 2004-09-10 12:12:36 UTC
ok in src680_m52 => closed