summaryrefslogtreecommitdiff
path: root/wizards
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
parenta0f060c5be6313d52e8cf3b08a3f892665b08511 (diff)
#87606# Some routines added
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/tools/Debug.xba4
-rw-r--r--wizards/source/tools/Listbox.xba22
-rw-r--r--wizards/source/tools/Misc.xba19
-rw-r--r--wizards/source/tools/ModuleControls.xba27
-rw-r--r--wizards/source/tools/Strings.xba17
5 files changed, 66 insertions, 23 deletions
diff --git a/wizards/source/tools/Debug.xba b/wizards/source/tools/Debug.xba
index d7af2b539dbe..45d0ac0ff30e 100644
--- a/wizards/source/tools/Debug.xba
+++ b/wizards/source/tools/Debug.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="Debug" script:language="StarBasic">REM ***** BASIC *****
Sub WritedbgInfo(LocObject as Object)
@@ -85,7 +85,7 @@ Dim sValues as String
sValues = &quot;&quot;
For i = 0 To Ubound(oLocObject.PropertySetInfo.Properties)
Propname = oLocObject.PropertySetInfo.Properties(i).Name
- sValues = sValues &amp; PropName &amp; chr(13) &apos;&quot; = &quot; &amp; oLocObject.GetPropertyValue(PropName) &amp; chr(13)
+ sValues = sValues &amp; PropName &amp; chr(13) &amp; &quot; = &quot; &amp; oLocObject.GetPropertyValue(PropName) &amp; chr(13)
Next i
Msgbox(sValues , 64, GetProductName())
Exit Sub
diff --git a/wizards/source/tools/Listbox.xba b/wizards/source/tools/Listbox.xba
index 0f8019a61725..58f96499e2b4 100644
--- a/wizards/source/tools/Listbox.xba
+++ b/wizards/source/tools/Listbox.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="Listbox" script:language="StarBasic">Option Explicit
Dim OriginalList()
Dim oDialogModel as Object
@@ -187,15 +187,17 @@ End Sub
Sub ToggleListboxControls(oDialogModel as Object, bDoEnable as Boolean)
- oDialogModel.lblFields.Enabled = bDoEnable
- oDialogModel.lblSelFields.Enabled = bDoEnable
- oDialogModel.lstTables.Enabled = bDoEnable
- oDialogModel.lstFields.Enabled = bDoEnable
- oDialogModel.lstSelFields.Enabled = bDoEnable
- oDialogModel.cmdRemoveAll.Enabled = bDoEnable
- oDialogModel.cmdRemoveSelected.Enabled = bDoEnable
- oDialogModel.cmdMoveAll.Enabled = bDoEnable
- oDialogModel.cmdMoveSelected.Enabled = bDoEnable
+ With oDialogModel
+ .lblFields.Enabled = bDoEnable
+ .lblSelFields.Enabled = bDoEnable
+ .lstTables.Enabled = bDoEnable
+ .lstFields.Enabled = bDoEnable
+ .lstSelFields.Enabled = bDoEnable
+ .cmdRemoveAll.Enabled = bDoEnable
+ .cmdRemoveSelected.Enabled = bDoEnable
+ .cmdMoveAll.Enabled = bDoEnable
+ .cmdMoveSelected.Enabled = bDoEnable
+ End With
If bDoEnable Then
FormSetMoveRights()
End If
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
diff --git a/wizards/source/tools/ModuleControls.xba b/wizards/source/tools/ModuleControls.xba
index d9d4364a75c6..874afe2dd678 100644
--- a/wizards/source/tools/ModuleControls.xba
+++ b/wizards/source/tools/ModuleControls.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="ModuleControls" script:language="StarBasic">Option Explicit
@@ -150,4 +150,27 @@ Dim oDialog as Object
oDialog = CreateUnoDialog(oLib, DialogName)
LoadDialog() = oDialog
End Function
-</script:module> \ No newline at end of file
+
+
+Sub SwitchWizardDialogHeight(oDialog as Object)
+Dim oDialogModel as Object
+Dim iDlgHeight as Integer
+Dim iYPos as Integer
+ oDialogModel = oDialog.Model
+ If oDialogModel.Height &gt; 100 Then
+ iDlgHeight = 26
+ oDialog.GetControl(&quot;imgTheme&quot;).Visible = False
+ Else
+ iDlgHeight = 210
+ oDialog.GetControl(&quot;imgTheme&quot;).Visible = True
+ End If
+ iYPos = iDlgHeight - 20
+ oDialogModel.cmdCancel.PositionY = iYPos
+ oDialogModel.cmdHelp.PositionY = iYPos
+&apos; Todo: Abfragen, ob in der Sequenze oDialogModel.GetControls() auch ein cmdBack
+&apos; vorhanden ist
+ oDialogModel.cmdBack.PositionY = iYPos
+ oDialogModel.cmdGoOn.PositionY = iYPos
+ oDialogModel.cmdSwitchHeight.PositionY = iYPos
+ oDialogModel.Height = iDlgHeight
+End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/tools/Strings.xba b/wizards/source/tools/Strings.xba
index 987796299e78..f54edcef093e 100644
--- a/wizards/source/tools/Strings.xba
+++ b/wizards/source/tools/Strings.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="Strings" script:language="StarBasic">Option Explicit
Public sProductname as String
@@ -14,7 +14,6 @@ Dim i% ,n%
End Function
-
&apos; Deletes out of a String &apos;BigString&apos; a possible Partstring &apos;CompString&apos;
Function DeleteStr(ByVal BigString,CompString as String) as String
Dim i%, CompLen%, BigLen%
@@ -31,7 +30,6 @@ Dim i%, CompLen%, BigLen%
End Function
-
&apos; Finds a PartString, that is framed by the Strings &apos;Prestring&apos; and &apos;PostString&apos;
Function FindPartString(BigString, PreString, PostString as String, SearchPos as Integer) as String
Dim StartPos%, EndPos%
@@ -125,7 +123,6 @@ Dim StartUbound as Integer
End Function
-
&apos; Deletes all fieldvalues in one-dimensional Array
Sub ClearArray(BigArray)
Dim i as integer
@@ -412,4 +409,16 @@ On Local Error Goto No2ndDim
Next s
BubbleSortList = SortList()
End Function
+
+
+Function GetValueoutofList(SearchValue, BigList(), iDim as Integer)
+Dim i as Integer
+Dim MaxIndex as Integer
+ MaxIndex = Ubound(BigList(),1)
+ For i = 0 To MaxIndex
+ If BigList(i,0) = SearchValue Then
+ GetValueOutOfList() = BigList(i,iDim)
+ End If
+ Next i
+End Function
</script:module> \ No newline at end of file