[Solved] OpenOffice and LibreOffice will both handle my long PDF configuration line when coding to run in the Mac OS X environment.
The problem was that where OpenOffice runs under Catalina(10.15), the Java Run Time environment supplied by Apple in their normal distribution, worked as released by Apple. In Apple's Big Sur(10.16) version needed not only a Mac Compatible, Java Run Time, but the latest Software Development Kit (SDK) to run with minor, fixable issues. Still have issues thought. Running External applications using OpenOffice Code is different than running external applications using LibreOffice Code. For Example, to run an Apple Script to Quit Open Office without I/O error (a problem many people have but few have provided simple solutions to fix in Mac OS environments over the last 10 years), I trigger a simple Apple Script in OpenOffice using the following code:
Code: Select all
Sub SaveClose
dim CpathNm as string, CpNQoo as string, sPath1 as string
rem ********************************************************************
rem First, get the path to the Document you are currently in.
rem ********************************************************************
GlobalScope.BasicLibraries.loadLibrary("Tools")
CpathNm=DirectoryNameoutofPath(ThisComponent.getURL(),"/")
L = LEN(CpathNm)
' MsgBox "CpathNm/L= " & CpathNm & "/ " & L
rem ********************************************************************
rem Next, The path returned starts with "file:///Users/MyDir/... then on to
rem whichever directories your application/Document to be saved is running in.
rem I keep the Qoo.app and QLo.app AppleScipts in an Application Folder,
rem but to launch them, I must know where the "/" is after "MyDir" to get the launch Path right.
rem The following code handles the variable length of "MyDir" associated with different computers.
rem ********************************************************************
If L < 15 then goto SnC2:
for N = 15 to L
If MID(CpathNm,N,1) = "/" then
M = N
CpNQoo = LEFT(CpathNm,M) & "Applications/Qoo.app/Contents/MacOS/applet"
'msgbox "CpNQoo = " & CpNQoo
goto SnC1:
Else
End If
next N
msgbox "Something is wrong, CpNQoo = " & CpNQoo
goto SnC2:
rem ----------------------------------------------------------------------
SnC1:
sPath1= CpNQoo
oSvc = createUnoService("com.sun.star.system.SystemShellExecute")
oSvc.execute(sPath1, "" , 0)
rem ----------------------------------------------------------------------
rem In Libra Office The apple script QLo is triggered with
rem the following code:(without the rem's)
rem ----------------------------------------------------------------------
rem sPath1= CpNQoo
rem shell(sPath1)
rem ----------------------------------------------------------------------
rem The AppleScript waits 3 seconds before quitting OpenOffice,
rem which gives enough time for your document to be
rem stored and disposed of.
rem on run
rem delay 3
rem tell application "OpenOffice"
rem quit
rem end tell
rem end run
rem ----------------------------------------------------------------------
dim oDoc as Object
dim oDocCtrl as Object
oDoc = ThisComponent
oDocCtrl = oDoc.getCurrentController()
oDoc.store() ' Save...
DisposeDocument(oDoc) ' ... and close
SnC2:
End Sub