[Libreoffice-bugs] [Bug 144772] New: Basic Macro oEvent.Source execution in a form, started in a Text [VARCHAR] field

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Tue Sep 28 15:05:48 UTC 2021


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

            Bug ID: 144772
           Summary: Basic Macro oEvent.Source execution in a form, started
                    in a Text [VARCHAR] field
           Product: LibreOffice
           Version: 7.1.6.2 release
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Base
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: bugReportLOm at protonmail.com

Description:
The following makro does not work any longer. 

Error message:
BASIC run time error
argument not optional

this line is marked:
oFeld = oEvent.Source

The makro is started by clicking in a form on a Text [VARCHAR] field containing
a link. In the form Properties: Text box, events the makro is connected to
"Mouse button pressed".

Robert Grosskopf provided this helpful Makro to directly open an internet link
or LO file from a text field in a base form:

REM  *****  BASIC  *****

SUB Website_Aufruf(oEvent AS OBJECT)
        REM Aufruf einer Website oder des Mailprogramms mit einer vorgegebenen
Mailadresse
        DIM oFeld AS OBJECT
        DIM oShell AS OBJECT
        DIM stFeld AS STRING
        oFeld = oEvent.Source
        REM Den Text aus der Dateiauswahl auslesen
        stFeld = oFeld.Text
        IF stFeld = "" THEN
                EXIT SUB
        END IF
        IF InStr(stFeld,"@") THEN
                stFeld = "mailto:"+stFeld
        ELSEIF InStr(stFeld,"http://") OR InStr(stFeld,"https://") THEN
                stFeld = convertToUrl(stFeld)   'convertToUrl erkennt, dass mit
http:// bereits eine Verbindung vorgegeben ist. file:/// wird nicht gesetzt
        ELSE    
        END IF
        REM Start des Files mit der entsprechenden URL-Verbindung
        oShell = createUnoService("com.sun.star.system.SystemShellExecute")
        oShell.execute(stFeld,,0)
END SUB

HSQLDB odb, Java Version 8 Update 301

Problem in:
Version: 7.1.6.2 (x64) / LibreOffice Community
Build ID: 0e133318fcee89abacd6a7d077e292f1145735c3
CPU threads: 6; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

but not in: 
Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 6; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL

Actual Results:
makro does not start

Expected Results:
makro starts


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Error message:
BASIC run time error
argument not optional

this line is marked:
oFeld = oEvent.Source

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20210928/e22149d2/attachment.htm>


More information about the Libreoffice-bugs mailing list