Issue 83427 - Data loss occurs due to Issue 17171
Summary: Data loss occurs due to Issue 17171
Alias: None
Product: Writer
Classification: Application
Component: editing (show other issues)
Version: OOo 2.3
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: michael.ruess
QA Contact: issues@sw
Depends on:
Reported: 2007-11-07 20:39 UTC by superm401
Modified: 2013-08-07 14:42 UTC (History)
8 users (show)

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

Removing paragraph break causes data loss (8.44 KB, application/vnd.oasis.opendocument.text)
2007-11-07 20:40 UTC, superm401
no flags Details
Bug docuemt contains one paragraphs with more than 65365 characters (8.45 KB, application/vnd.sun.xml.writer)
2007-11-28 12:30 UTC, andreas.martens
no flags Details

Note You need to log in before you can comment on or make changes to this issue.
Description superm401 2007-11-07 20:39:47 UTC
As requested by Mathias Bauer at 17171, I'm filing a separate bug for the data
loss issue.

1. Open a document with two paragraphs, the first very long (e.g. attached, from
the old bug).

2. Go to the beginning of the second paragraph, and erase the paragraph break.

The end of the first paragraph is lost.
Comment 1 superm401 2007-11-07 20:40:51 UTC
Created attachment 49509 [details]
Removing paragraph break causes data loss
Comment 2 superm401 2007-11-07 20:43:24 UTC
"Very long" in this context means the sum of the two paragraph lengths is > 65534
Comment 3 renatoyamane 2007-11-07 21:26:23 UTC
Someone can ask, "why you need so long paragraph"?
The answer is: This is a "rule" to write actas (law documents).
65k characters is ~12 pages and is very easy find actas with more than 12 pages.

In law-offices is impossible use ISO26300 (Open Document Files) if we can
write/edit actas and is possible lost data!

Comment 4 ohallot 2007-11-07 22:13:35 UTC
Minor correction on first comment by superm401: It is the end of the second
paragraph that is lost.

Worst, the action cannot be undone. Not even with ctrl-z or undo. Vanished.
Comment 5 superm401 2007-11-08 03:51:47 UTC
I've figured out this discrepancy.  If you press delete at the end of the first
paragraph, the end of the second paragraph will be lost.  If you press backspace
at the beginning of the second paragraph, the end of the first paragraph will be
lost.  Either way, the data loss is unacceptable.  It should simply be
impossible to erase the paragraph break if that would result in data loss.  That
would be annoying, but not as bad as data loss.

Regarding "In law-offices is impossible use ISO26300 (Open Document Files) if we
can write/edit actas and is possible lost data!" that's completely incorrect. 
There is nothing wrong with the standard, and AbiWord does not have this problem
in any form when working with ODT files.
Comment 6 Mathias_Bauer 2007-11-08 08:24:24 UTC
To make it clear: this issue will not be about implementing large paragraphs
(this is issue 17171). This issue is about avoiding data loss by preventing the
paragraph merge to happen. This is a severe problem that should be fixed ASAP.
Comment 7 Mathias_Bauer 2007-11-08 08:26:34 UTC
Andreas, please take over. We should try to check whether a merged paragraph
will be able to take the whole text before we merge them and in case that isn't
possible give an error message and do nothing.
Comment 8 Mathias_Bauer 2007-11-08 08:27:19 UTC
BTW: thanks to superm401 for creating the separate issue!
Comment 9 andreas.martens 2007-11-27 07:57:39 UTC
Here my fix:
If you try to merge two paragraphs and the result would be a paragraph longer
than 65535, nothing will happen. This will not solve issue 17171 but at least we
will not have any data loss in such a situation.

Fixed in CWS sw8u10bf02
Comment 10 gnustavo 2007-11-28 11:16:00 UTC
Since this issue deals specifically with the problem that happens when one
removes a line break, this patch seems to prevent it nicely.

What would happen though if one imports a .doc document or a .odt document
produced with other ODF compliant office suites when the document contains
paragraphs with more than 64KB bytes?

Does this patch prevents that also or should we file another issue specifically
to this other problem?
Comment 11 andreas.martens 2007-11-28 12:30:48 UTC
Created attachment 49969 [details]
Bug docuemt contains one paragraphs with more than 65365 characters
Comment 12 andreas.martens 2007-11-28 12:36:32 UTC
During the *.doc import there is already(since OOo2.0 or longer) an automatic
split if a paragraph exceeds our limit.
And for an *.odt document, mmh, well. _Now_ this is covered within this issue as
Fixed in
Thank you for the hint!
Comment 13 andreas.martens 2007-12-04 09:37:05 UTC
Ready for QA.
Comment 14 michael.ruess 2007-12-11 14:42:17 UTC
Verified fix in CWS sw8u10bf02.
Comment 15 michael.ruess 2008-02-12 15:28:59 UTC
Checked the fix in OOH680m7 and SRC680m245.