#87606# Some routines added
This commit is contained in:
parent
a0f060c5be
commit
922c89118a
5 changed files with 66 additions and 23 deletions
|
@ -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 = ""
|
||||
For i = 0 To Ubound(oLocObject.PropertySetInfo.Properties)
|
||||
Propname = oLocObject.PropertySetInfo.Properties(i).Name
|
||||
sValues = sValues & PropName & chr(13) '" = " & oLocObject.GetPropertyValue(PropName) & chr(13)
|
||||
sValues = sValues & PropName & chr(13) & " = " & oLocObject.GetPropertyValue(PropName) & chr(13)
|
||||
Next i
|
||||
Msgbox(sValues , 64, GetProductName())
|
||||
Exit Sub
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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>
|
||||
|
||||
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>
|
|
@ -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>
|
||||
|
||||
|
||||
Sub SwitchWizardDialogHeight(oDialog as Object)
|
||||
Dim oDialogModel as Object
|
||||
Dim iDlgHeight as Integer
|
||||
Dim iYPos as Integer
|
||||
oDialogModel = oDialog.Model
|
||||
If oDialogModel.Height > 100 Then
|
||||
iDlgHeight = 26
|
||||
oDialog.GetControl("imgTheme").Visible = False
|
||||
Else
|
||||
iDlgHeight = 210
|
||||
oDialog.GetControl("imgTheme").Visible = True
|
||||
End If
|
||||
iYPos = iDlgHeight - 20
|
||||
oDialogModel.cmdCancel.PositionY = iYPos
|
||||
oDialogModel.cmdHelp.PositionY = iYPos
|
||||
' Todo: Abfragen, ob in der Sequenze oDialogModel.GetControls() auch ein cmdBack
|
||||
' vorhanden ist
|
||||
oDialogModel.cmdBack.PositionY = iYPos
|
||||
oDialogModel.cmdGoOn.PositionY = iYPos
|
||||
oDialogModel.cmdSwitchHeight.PositionY = iYPos
|
||||
oDialogModel.Height = iDlgHeight
|
||||
End Sub</script:module>
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
' Deletes out of a String 'BigString' a possible Partstring 'CompString'
|
||||
Function DeleteStr(ByVal BigString,CompString as String) as String
|
||||
Dim i%, CompLen%, BigLen%
|
||||
|
@ -31,7 +30,6 @@ Dim i%, CompLen%, BigLen%
|
|||
End Function
|
||||
|
||||
|
||||
|
||||
' Finds a PartString, that is framed by the Strings 'Prestring' and 'PostString'
|
||||
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
|
||||
|
||||
|
||||
|
||||
' 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>
|
Loading…
Reference in a new issue