Review Request: fix saving of textranges in KoTextWriter::Private::saveParagraph(...)

Commit Hook null at kde.org
Thu Dec 6 15:58:28 GMT 2012


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/107601/#review23079
-----------------------------------------------------------


This review has been submitted with commit 2383fe68ea377c79147eebfc34ef429dcd2fba33 by Friedrich W. H. Kossebau to branch calligra/2.6.

- Commit Hook


On Dec. 6, 2012, 2:45 p.m., Friedrich W. H. Kossebau wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/107601/
> -----------------------------------------------------------
> 
> (Updated Dec. 6, 2012, 2:45 p.m.)
> 
> 
> Review request for Calligra and C. Boemann.
> 
> 
> Description
> -------
> 
> After lots of experiments here finally something relatively elegant (though you should have seen my intermediate hacks to understand ;) ).
> 
> Fixes the bugs seen with e.g. orpheus on saving bookmarks, at least for me. I think/hope I catched all cases which can be there by the parameters from & to, the possible textblock contents and the possible textranges.
> Usage of KoTextRangeManager::textRangesChangingWithin(...) and KoTextRange::saveOdf(...) can be surely improved, but for now this here is at least a working fix.
> 
> Here my rationale for the patch:
> Start and end tags of textranges can appear on positions in a text block.
> in front of the first text element, between the elements, or behind the last.
> A textblock is composed of no or many text fragments.
> If there is no element at all, the only possible position is 0 (relative to the
> begin of the block).
> Start tags are ideally written in front of the content they are tagging,
> and not behind the previous content. That way tags which are at the very begin
> of the text do not need special handling.
> End tags are ideally written directly behind the content, and not in front of
> the next content. That way end tags which are at the very end of the text
> do not need special handling.
> Then there is the case of start tags which are at the final position of a text block:
> the content they belong to includes the block end/border, so they need to be
> written at the place of the last position.
> 
> 
> Diffs
> -----
> 
>   libs/kotext/KoAnnotation.h 0dfb43c 
>   libs/kotext/KoAnnotation.cpp a700f02 
>   libs/kotext/KoBookmark.h c64cbe1 
>   libs/kotext/KoBookmark.cpp 5538e5f 
>   libs/kotext/KoTextRange.h c728798 
>   libs/kotext/opendocument/KoTextWriter_p.cpp 9cc353c 
> 
> Diff: http://git.reviewboard.kde.org/r/107601/diff/
> 
> 
> Testing
> -------
> 
> Oh yes. Created reports with lots of tables & charts, updated them, saved, updated, loaded, updated, added new tables & charts, updated, saved, updated, loaded, .... And no longer any issue then, so far.
> 
> 
> Thanks,
> 
> Friedrich W. H. Kossebau
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/calligra-devel/attachments/20121206/5f4054c8/attachment.htm>


More information about the calligra-devel mailing list