summaryrefslogtreecommitdiff
path: root/wizards/source/tools/Misc.xba
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-06-06 11:25:09 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-06-06 11:25:09 +0000
commit922c89118a3e9cd880a9b1e5507671038f312ef7 (patch)
tree157bf5cf8f123f26be552ff08c9d3f8249d715f8 /wizards/source/tools/Misc.xba
parenta0f060c5be6313d52e8cf3b08a3f892665b08511 (diff)
#87606# Some routines added
Diffstat (limited to 'wizards/source/tools/Misc.xba')
-rw-r--r--wizards/source/tools/Misc.xba19
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
+&apos; On Local Error Goto NOCONNECTION
oDBContext = CreateUnoService(&quot;com.sun.star.sdb.DatabaseContext&quot;)
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
-&apos; oArg(0).Name = &quot;LibraryName&quot;
-&apos; oArg(0).Value = sLibname
oTrans = createUNOService(&quot;com.sun.star.util.URLTransformer&quot;)
oUrl.Complete = &quot;slot:&quot; &amp; 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 = &quot;.uno:SwitchControlDesignMode&quot;
+ aTransformer = createUnoService(&quot;com.sun.star.util.URLTransformer&quot;)
+ 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