Fwd: commit (HEAD): TOC and bookmarks

From: Hubert Figuiere <hub_at_abisource.com>
Date: Mon May 17 2004 - 16:57:10 CEST

[ I relaxed the anti-spamm filters a little. yahoo.co.uk is blacklisted
otherwise -- Hub ]

----- Forwarded message
From: "Tomas Frydrych" <tomasfrydrych@yahoo.co.uk>
Subject: commit (HEAD): TOC and bookmarks
Message-ID: <40A6638B.14021.1240560@localhost>

Added new property 'toc-range-bookmark', which restricts the TOC
contents to a document range marked by given bookmark; for now this
only works when importing Word TOC with \b parameter and we should
add a bookmark combo box to the FormatTOC dialogue to allow for this
property to be specified.

Fixed a couple of TOC related bugs:

    (1) removed _insertIntoList() call from block processing in
    fl_ContainerLayout::insert() -- the list insertion has to be
    done in the block constructor, because the TOC related functions
    called inside the constructor rely on the block being already in
    the list. (I am not sure whether the block constructor should be
    doing any of those things; it might be preferable to have a
    post-construction init() routine that would be called

    (2) fixed up fl_TOCLayout::_addBlockInVec() to correctly handle
    the case where the new block is inserted into a block that
    itself is shaddowed in the TOC. Similar fixes for _removeBlockInVec().

I also changed several fl_TOC*:: functions to return UT_UTF8String
reference instead of pointer; this is so we do not have to check for
NULL & dereferrence (and it also prevents us from accidentally
deleting the returned string object).

bookmarks: added fp_BookmarkRun::getBookmarkedDocPosition(); this
function contains some special logic to handle stacked-up bookmarks
(i.e., several bookmarks at the same document position) and the case
where bookmark is the very first thing in a block. The significant
consequence of these changes is that bookmarks can only be deleted as
a part of a selection or by using the Insert->Bookmark dialogue; they
cannot be deleted by simply hitting Delete or Backspace. In fact, I
am contemplating restricting bookmark deletion only to using the
dialogue, as implicit deletion of bookmarks in the background can be
real PIA.

Also fixed a bug in bookmark deletion that caused deletion past end
of doc.

Added UT_UTF8String::appendUCS2() menthod to avoid using iconv in the
Word importer.

files: many in text, ie_imp_MSWord_97.cpp/h, ut_string_class.h/cpp,


----- End forwarded message -----
Received on Mon May 17 16:57:11 2004

This archive was generated by hypermail 2.1.8 : Mon May 17 2004 - 16:57:11 CEST