Logo Search packages:      
Sourcecode: jabref-plugin-oo version File versions  Download package

XTextRange net::sf::jabref::oo::OOBibBase::getBookmarkRange ( String  name  )  throws Exception [inline]

Get the XTextRange corresponding to the named bookmark.

name The name of the bookmark to find.
The XTextRange for the bookmark.

Definition at line 1022 of file OOBibBase.java.

        // query XBookmarksSupplier from document model and get bookmarks collection
        XBookmarksSupplier xBookmarksSupplier = (XBookmarksSupplier) UnoRuntime.queryInterface(
                XBookmarksSupplier.class, xCurrentComponent);
        XNameAccess xNamedBookmarks = xBookmarksSupplier.getBookmarks();

        // retrieve bookmark by name
        //System.out.println("Name="+name+" : "+xNamedBookmarks.hasByName(name));
        if (!xNamedBookmarks.hasByName(name))
            return null;
        Object foundBookmark = xNamedBookmarks.getByName(name);
        XTextContent xFoundBookmark = (XTextContent) UnoRuntime.queryInterface(
                XTextContent.class, foundBookmark);
        return xFoundBookmark.getAnchor();

Generated by  Doxygen 1.6.0   Back to index