https://issues.apache.org/ooo/show_bug.cgi?id=5608

drweird <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #72 from drweird <[email protected]> ---
The extension crashes in OO 4.0 when you try to use it.  I came up with this
code that turned out to be useful to me until someone finally does something to
address this issue:

sub MakeBookmark
    rem ----------------------------------------------------------------------
    rem define variables
    dim document   as object
    dim dispatcher as object
    rem ----------------------------------------------------------------------
    rem get access to the document
    document   = ThisComponent.CurrentController.Frame
    dispatcher = createUnoService("com.sun.star.frame.DispatchHelper")

    rem ----------------------------------------------------------------------
    dim args1(0) as new com.sun.star.beans.PropertyValue
    args1(0).Name = "Bookmark"
    args1(0).Value = "BackMarker"

    dispatcher.executeDispatch(document, ".uno:DeleteBookmark", "", 0, args1())

    rem ----------------------------------------------------------------------
    dim args2(0) as new com.sun.star.beans.PropertyValue
    args2(0).Name = "Bookmark"
    args2(0).Value = "BackMarker"

    dispatcher.executeDispatch(document, ".uno:InsertBookmark", "", 0, args2())

end sub


sub ReturnToBookmark

    Dim Doc As Object   
    Dim Cursor As Object
    Dim Proceed As Boolean
    Dim oDesktop, oDocument, oVCursor as Object

    oDesktop = createUnoService("com.sun.star.frame.Desktop")
    oDocument= oDesktop.getCurrentComponent() 
    oVCursor = oDocument.currentcontroller.getViewCursor()
    Doc = ThisComponent
    oVCursor.gotoRange(Doc.Bookmarks.getByName("BackMarker").Anchor(),false)

end sub

I set a key for each, and then I can set a marker with one keypress, and
quickly get back to where I last set my bookmark with the other.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are watching all bug changes.

Reply via email to