1 <?xml version=
"1.0" encoding=
"UTF-8"?>
2 <!DOCTYPE script:module PUBLIC
"-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
3 <script:module xmlns:
script=
"http://openoffice.org/2000/script" script:
name=
"FontOOo" script:
language=
"StarBasic">Option Explicit
9 Dim MyFontOOo as string
11 dim args(
1) as new com.sun.star.beans.PropertyValue
16 aService = CreateUnoService(
"com.sun.star.util.PathSubstitution
")
17 ThePath =ConvertToURL(aService.substituteVariables(
"$(prog)
", true))
18 ThePath=ThePath
& "/../share/dict/ooo
"
20 if fileExists(ThePath
& "/FontOOo.lst
") then
21 'read FontOOo.lst file
22 Open ThePath
& "/FontOOo.lst
" for input as #
1
23 line input #
1, MyFontOOo
26 'create default FontOOo.lst file
27 Open ThePath
& "/FontOOo.lst
" for output as #
1
28 MyFontOOo=ThePath
& "/FontOOo.sxw
"
34 if Not fileExists(MyFontOOo) then
35 MyFontOOo= ThePath
& "/FontOOo.sxw
"
37 MyFontOOo=ConvertToURL(MyFontOOo)
39 'Opens FontOOo main file
40 args(
0).name=
"InteractionHandler
"
41 args(
0).value=
""
42 args(
1).name=
"MacroExecutionMode
"
43 args(
1).value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN
'4
44 TheDoc=StarDesktop.loadComponentFromURL(MyFontOOo,
"_blank
",
0,args())
46 End Sub
</script:module>