https://bugs.documentfoundation.org/show_bug.cgi?id=103615

            Bug ID: 103615
           Summary: Macro with ShareDocument dispatch command -> no
                    functionnality
           Product: LibreOffice
           Version: 5.2.3.3 rc
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Version: 5.2.3.3 (x64)
Build ID: d54a8868f08a7b39642414cf2c8ef2f228f780cf
Threads CPU : 4; Version de l'OS :Windows 6.29; UI Render : par défaut; 
Locale : fr-FR (fr_FR); Calc: group

When I use the macros recorder, I have this macro :

    sub Main
    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(1) as new com.sun.star.beans.PropertyValue
    args1(0).Name = "URL"
    args1(0).Value = "file:///C:/Users/Public/EssaiDocumentPartag%C3%A9.ods" '
name of the document
    args1(1).Name = "FilterName"
    args1(1).Value = "calc8"

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

    rem ----------------------------------------------------------------------
    dispatcher.executeDispatch(document, ".uno:Save", "", 0, Array())

    rem ----------------------------------------------------------------------
    dispatcher.executeDispatch(document, ".uno:ShareDocument", "", 0, Array())

    end sub

If I use this macro in another document and I try to execute it, I have no
effect on the file. The file is not shared and no window is displayed like with
the Tools>Share Documents menu command.

I try to use the command :
     DispatchSlot (26317) ' ID of ShareDocument command
instead of 
     dispatcher.executeDispatch(document, ".uno:ShareDocument", "", 0, Array())

but I have an error message in the DisplaySlot macro with the querydispatch
method.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to