Date: prev next · Thread: first prev next last
2019 Archives by date, by thread · List index


Bezug: https://listarchives.libreoffice.org/de/users/msg21444.html

Hallo Oliver,

ich habe mal bissel was zusammengestellt. Die Makros habe ich so klein wie nur möglich gehalten (SourceCodes siehe ganz unten):

[1] FolderPicker (Dateiauswahl via OperatingSystem)

[1.1] Sub TEST_FolderPicker (Makro)
[1.2] TEST_FolderPicker.cmd (externer Makro-Aufruf via WinBatch)
[1.3] TEST_FolderPicker.pl (externer Makro-Aufruf via Perl)

[2] FolderPickerOffice (Dateiauswahl via LibreOffice)

[2.1] Sub TEST_FolderPickerOffice (Makro)
[2.2] TEST_FolderPicker.cmd (externer Makro-Aufruf via WinBatch)
[2.3] TEST_FolderPicker.pl (externer Makro-Aufruf via Perl)

[A] Wenn man [1.1] und [2.1] in der BASIC-IDE (in einem geöffneten CALC-Dokument) startet, funktionieren beide Makros fehlerfrei.

[B] Wenn man [1.1] extern startet via [1.2] oder [1.3], bleibt das Makro vor dem ERSTEN MsgBox-Aufruf hängen. Öffnet man während des Hängenbleibens ein neues CALC-Dokument, wird das Makro weiter ausgeführt.

[C] Wenn man [2.1] extern startet via [2.2] oder [2.3], wird das Makro fehlerfrei ausgeführt.

[D] Seit wann dieses Problem genau auftritt kann ich leider nicht sagen, aber mit "LO 6.2.2.2 (x64) @ Windows 7 Home Premium 64-bit" tritt es sicher auf.

[E] Du kannst die SourceCodes für Deinen BugReport benutzen. Wenn ich es in Englisch erklärte, wäre es wohl mehr verwirrend als erklärend ...

[F] Es könnte schon sein, dass diese FolderPicker-Problematik auch ein Hinweis auf die FilePicker-Problematik dieses Threads sein könnte, zumindest aber, dass die Picker-Software nicht mehr sauber funktioniert, an was auch immer es liegen mag.

Gruß
Hans-Werner

SourceCodes:

[1.1] Sub TEST_FolderPicker (Makro)

Sub TEST_FolderPicker
Const FolderPicker = "com.sun.star.ui.dialogs.FolderPicker"
Dim DialogFolderPicker as Object
Dim FolderPickerService as String
Dim SelectedFolder as String
Dim PropertyValue(0) as New com.sun.star.beans.PropertyValue
DialogFolderPicker = CreateUnoService(FolderPicker)
DialogFolderPicker.execute()
SelectedFolder = DialogFolderPicker.getDirectory()
MsgBox("SelectedFolder = " & SelectedFolder)
PropertyValue(0).name = "Hidden"
PropertyValue(0).value = False
StarDesktop.loadComponentFromURL("private:factory/scalc","_blank",0,PropertyValue())
MsgBox ("new CALC opened")
End Sub

[1.2] TEST_FolderPicker.cmd (externer Makro-Aufruf via WinBatch)

SET L="C:/Program Files/LibreOffice/program/soffice.exe"
SET M="macro:///Standard.Test.TEST_FolderPicker()"
%L% --nologo %M%

[1.3] TEST_FolderPicker.pl (externer Makro-Aufruf via Perl)

$L = "C:/Program Files/LibreOffice/program/soffice.exe";
$M = "macro:///Standard.Test.TEST_FolderPicker()";
`"$L" --nologo "$M"`;

[2.1] Sub TEST_FolderPickerOffice (Makro)

Sub TEST_FolderPickerOffice
Const FolderPicker = "com.sun.star.ui.dialogs.OfficeFolderPicker"
Dim DialogFolderPicker as Object
Dim FolderPickerService as String
Dim SelectedFolder as String
Dim PropertyValue(0) as New com.sun.star.beans.PropertyValue
DialogFolderPicker = CreateUnoService(FolderPicker)
DialogFolderPicker.execute()
SelectedFolder = DialogFolderPicker.getDirectory()
MsgBox("SelectedFolder = " & SelectedFolder)
PropertyValue(0).name = "Hidden"
PropertyValue(0).value = False
StarDesktop.loadComponentFromURL("private:factory/scalc","_blank",0,PropertyValue())
MsgBox ("new CALC opened")
End Sub

[2.2] TEST_FolderPicker.cmd (externer Makro-Aufruf via WinBatch)

SET L="C:/Program Files/LibreOffice/program/soffice.exe"
SET M="macro:///Standard.Test.TEST_FolderPickerOffice()"
%L% --nologo %M%

[2.3] TEST_FolderPicker.pl (externer Makro-Aufruf via Perl)

$L = "C:/Program Files/LibreOffice/program/soffice.exe";
$M = "macro:///Standard.Test.TEST_FolderPickerOffice()";
`"$L" --nologo "$M"`;


--
Liste abmelden mit E-Mail an: users+unsubscribe@de.libreoffice.org
Probleme? https://de.libreoffice.org/hilfe-kontakt/mailing-listen/abmeldung-liste/
Tipps zu Listenmails: https://wiki.documentfoundation.org/Netiquette/de
Listenarchiv: https://listarchives.libreoffice.org/de/users/
Datenschutzerklärung: https://www.documentfoundation.org/privacy

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.