diff options
author | Behrend Cornelius <bc@openoffice.org> | 2001-06-06 11:25:09 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2001-06-06 11:25:09 +0000 |
commit | 922c89118a3e9cd880a9b1e5507671038f312ef7 (patch) | |
tree | 157bf5cf8f123f26be552ff08c9d3f8249d715f8 /wizards/source/tools/Misc.xba | |
parent | a0f060c5be6313d52e8cf3b08a3f892665b08511 (diff) |
#87606# Some routines added
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r-- | wizards/source/tools/Misc.xba | 19 |
1 files changed, 14 insertions, 5 deletions
diff --git a/wizards/source/tools/Misc.xba b/wizards/source/tools/Misc.xba index 067bb322ec22..d754468e4efd 100644 --- a/wizards/source/tools/Misc.xba +++ b/wizards/source/tools/Misc.xba @@ -1,5 +1,5 @@ <?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="Misc" script:language="StarBasic">REM ***** BASIC ***** Const SBSHARE = 0 @@ -45,7 +45,7 @@ End Function Function ConnecttoDatabase(DSName as String, UserID as String, Password as String, Optional Propertylist(), Optional DriverProperties() as New com.sun.star.beans.PropertyValue) Dim oDBContext as Object Dim oDBSource as Object - On Local Error Goto NOCONNECTION +' On Local Error Goto NOCONNECTION oDBContext = CreateUnoService("com.sun.star.sdb.DatabaseContext") If oDBContext.HasbyName(DSName) Then oDBSource = oDBContext.GetByName(DSName) @@ -650,8 +650,6 @@ Dim oArg() as new com.sun.star.beans.PropertyValue Dim oUrl as new com.sun.star.util.URL Dim oTrans as Object Dim oDisp as Object -' oArg(0).Name = "LibraryName" -' oArg(0).Value = sLibname oTrans = createUNOService("com.sun.star.util.URLTransformer") oUrl.Complete = "slot:" & CStr(SlotID) oTrans.parsestrict(oUrl) @@ -683,4 +681,15 @@ Dim oLocale as New com.sun.star.lang.Locale GetLocale = oLocale End Function -</script:module>
\ No newline at end of file + +Sub ToggleDesignMode(oDocument as Object) +Dim aSwitchMode as new com.sun.star.util.URL + aSwitchMode.Complete = ".uno:SwitchControlDesignMode" + aTransformer = createUnoService("com.sun.star.util.URLTransformer") + aTransformer.parseStrict(aSwitchMode) + oFrame = oDocument.currentController.Frame + oDispatch = oFrame.queryDispatch(aSwitchMode, oFrame.Name, 63) + Dim aEmptyArgs() as com.sun.star.bean.PropertyValue + oDispatch.dispatch(aSwitchMode, aEmptyArgs()) + Erase aSwitchMode +End Sub</script:module>
\ No newline at end of file |