minidocx
minidocx copied to clipboard
Advanced functionality for working with bookmarks
@totravel, it would be really convenient to work with bookmarks if there were these functions.
/**
* Compare bookmarks.
* @param name1 Name first bookmark.
* @param name2 Name second bookmark.
* @return enum
* 0 Bookmarks match.
* 1 The first bookmark is located below the second one and does not intersect it.
* 2 The first tab is above the second one and does not intersect it.
* 3 The first bookmark is located below the second one and crosses it.
* 4 The first tab is above the second one and crosses it.
* 5 The first bookmark includes the second one.
* 6 The second bookmark includes the first one.
* 7 Bookmarks start in one place, but the first one is longer.
* 8 Bookmarks start in one place, but the second one is longer.
* 9 Bookmarks end in one place, but the first one is longer.
* 10 Bookmarks end in one place, but the second one is longer.
* 11 Bookmarks are next to each other and the first one is below the second one.
* 12 Bookmarks are located next to each other and the first one is higher than the second one.
* 13 One of the bookmarks does not exist.
*/
int CmpBookmarks(std::string name1, std::string name2);
/**
* Checking the existence of a bookmark.
* @param name Name bookmark.
* @return bool true if bookmark exists, false otherwise.
*/
bool ExistingBookmark(std::string name);