Apache OpenOffice (AOO) Bugzilla – Issue 83427
Data loss occurs due to Issue 17171
Last modified: 2013-08-07 14:42:49 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.
Created attachment 49509 [details] Removing paragraph break causes data loss
"Very long" in this context means the sum of the two paragraph lengths is > 65534
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! Regards, Renato
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. Regards Olivier
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.
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.
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.
BTW: thanks to superm401 for creating the separate issue!
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 docedt.cxx node.cxx
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?
Created attachment 49969 [details] Bug docuemt contains one paragraphs with more than 65365 characters
ama->gnustavo: 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 well: Fixed in unocrsrhelper.cxx Thank you for the hint!
Ready for QA.
Verified fix in CWS sw8u10bf02.
Checked the fix in OOH680m7 and SRC680m245.