diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-02 18:17:17 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-02-02 18:17:17 +0000 |
commit | da1c254eb4f5687ad9f3b98ddf0ec2b113ceec12 (patch) | |
tree | 5f4cf05e91b289e07db99151b0bfcc7dd7d03e93 /wizards/source/launcher | |
parent | 43ce62af03b6b87057f9547ea8cafe774196d436 (diff) |
INTEGRATION: CWS geordi2q14 (1.1.6); FILE ADDED
2004/01/30 16:07:07 hr 1.1.6.1: #111934#: merge CWS ooo111fix2
Diffstat (limited to 'wizards/source/launcher')
-rw-r--r-- | wizards/source/launcher/DicOOo.xba | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/wizards/source/launcher/DicOOo.xba b/wizards/source/launcher/DicOOo.xba new file mode 100644 index 000000000000..27d929bf6fa9 --- /dev/null +++ b/wizards/source/launcher/DicOOo.xba @@ -0,0 +1,46 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> +<script:module xmlns:script="http://openoffice.org/2000/script" script:name="DicOOo" script:language="StarBasic">Option Explicit + +Sub StartDicOOo + +Dim ThePath as string +Dim aService as object +Dim MyDicOOo as string +dim TheDoc as object +dim args(1) as new com.sun.star.beans.PropertyValue + +on error resume next + +' Find path +aService = CreateUnoService("com.sun.star.util.PathSubstitution") +ThePath =ConvertToURL(aService.substituteVariables("$(prog)", true)) +ThePath=ThePath & "/../share/dict/ooo" + +if fileExists(ThePath & "/DicOOo.lst") then +'read DicOOo.lst file + Open ThePath & "/DicOOo.lst" for input as #1 + line input #1, MyDicOOo + close #1 +else +'create default DicOOo.lst file + Open ThePath & "/DicOOo.lst" for output as #1 + MyDicOOo=ThePath & "/DicOOo.sxw" + print #1, MyDicOOo + close #1 +endif + +'security +if Not fileExists(MyDicOOo) then + MyDicOOo= ThePath & "/DicOOo.sxw" +endif +MyDicOOo=ConvertToURL(MyDicOOo) + +'Opens DicOOo main file +args(0).name="InteractionHandler" +args(0).value="" +args(1).name="MacroExecutionMode" +args(1).value=com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE_NO_WARN '4 +TheDoc=StarDesktop.loadComponentFromURL(MyDicOOo,"_blank",0,args()) + +End Sub</script:module> |