1cdf0e10cSrcweir<?xml version="1.0" encoding="UTF-8"?> 2cdf0e10cSrcweir<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd"> 3*3e02b54dSAndrew Rist<!--*********************************************************** 4*3e02b54dSAndrew Rist * 5*3e02b54dSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 6*3e02b54dSAndrew Rist * or more contributor license agreements. See the NOTICE file 7*3e02b54dSAndrew Rist * distributed with this work for additional information 8*3e02b54dSAndrew Rist * regarding copyright ownership. The ASF licenses this file 9*3e02b54dSAndrew Rist * to you under the Apache License, Version 2.0 (the 10*3e02b54dSAndrew Rist * "License"); you may not use this file except in compliance 11*3e02b54dSAndrew Rist * with the License. You may obtain a copy of the License at 12*3e02b54dSAndrew Rist * 13*3e02b54dSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 14*3e02b54dSAndrew Rist * 15*3e02b54dSAndrew Rist * Unless required by applicable law or agreed to in writing, 16*3e02b54dSAndrew Rist * software distributed under the License is distributed on an 17*3e02b54dSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 18*3e02b54dSAndrew Rist * KIND, either express or implied. See the License for the 19*3e02b54dSAndrew Rist * specific language governing permissions and limitations 20*3e02b54dSAndrew Rist * under the License. 21*3e02b54dSAndrew Rist * 22*3e02b54dSAndrew Rist ***********************************************************--> 23cdf0e10cSrcweir<script:module xmlns:script="http://openoffice.org/2000/script" script:name="tools" script:language="StarBasic">REM ***** BASIC ***** 24cdf0e10cSrcweirOption Explicit 25cdf0e10cSrcweirPublic Const SBMAXTEXTSIZE = 50 26cdf0e10cSrcweir 27cdf0e10cSrcweir 28cdf0e10cSrcweirFunction SetProgressValue(iValue as Integer) 29cdf0e10cSrcweir If iValue = 0 Then 30cdf0e10cSrcweir oProgressbar.End 31cdf0e10cSrcweir End If 32cdf0e10cSrcweir ProgressValue = iValue 33cdf0e10cSrcweir oProgressbar.Value = iValue 34cdf0e10cSrcweirEnd Function 35cdf0e10cSrcweir 36cdf0e10cSrcweir 37cdf0e10cSrcweirFunction GetPreferredWidth(oModel as Object, bGetMaxWidth as Boolean, Optional LocText) 38cdf0e10cSrcweirDim aPeerSize as new com.sun.star.awt.Size 39cdf0e10cSrcweirDim nWidth as Integer 40cdf0e10cSrcweirDim oControl as Object 41cdf0e10cSrcweir If Not IsMissing(LocText) Then 42cdf0e10cSrcweir ' Label 43cdf0e10cSrcweir aPeerSize = GetPeerSize(oModel, oControl, LocText) 44cdf0e10cSrcweir ElseIf CurControlType = cImageControl Then 45cdf0e10cSrcweir GetPreferredWidth() = 2000 46cdf0e10cSrcweir Exit Function 47cdf0e10cSrcweir Else 48cdf0e10cSrcweir aPeerSize = GetPeerSize(oModel, oControl) 49cdf0e10cSrcweir End If 50cdf0e10cSrcweir nWidth = aPeerSize.Width 51cdf0e10cSrcweir ' We increase the preferred Width a bit so that the control does not become too small 52cdf0e10cSrcweir ' when we change the border from "3D" to "Flat" 53cdf0e10cSrcweir GetPreferredWidth = (nWidth + 10) * XPixelFactor ' PixelTo100thmm(nWidth) 54cdf0e10cSrcweirEnd Function 55cdf0e10cSrcweir 56cdf0e10cSrcweir 57cdf0e10cSrcweirFunction GetPreferredHeight(oModel as Object, Optional LocText) 58cdf0e10cSrcweirDim aPeerSize as new com.sun.star.awt.Size 59cdf0e10cSrcweirDim nHeight as Integer 60cdf0e10cSrcweirDim oControl as Object 61cdf0e10cSrcweir If Not IsMissing(LocText) Then 62cdf0e10cSrcweir ' Label 63cdf0e10cSrcweir aPeerSize = GetPeerSize(oModel, oControl, LocText) 64cdf0e10cSrcweir ElseIf CurControlType = cImageControl Then 65cdf0e10cSrcweir GetPreferredHeight() = 2000 66cdf0e10cSrcweir Exit Function 67cdf0e10cSrcweir Else 68cdf0e10cSrcweir aPeerSize = GetPeerSize(oModel, oControl) 69cdf0e10cSrcweir End If 70cdf0e10cSrcweir nHeight = aPeerSize.Height 71cdf0e10cSrcweir ' We increase the preferred Height a bit so that the control does not become too small 72cdf0e10cSrcweir ' when we change the border from "3D" to "Flat" 73cdf0e10cSrcweir GetPreferredHeight = (nHeight+1) * YPixelFactor ' PixelTo100thmm(nHeight) 74cdf0e10cSrcweirEnd Function 75cdf0e10cSrcweir 76cdf0e10cSrcweir 77cdf0e10cSrcweirFunction GetPeerSize(oModel as Object, oControl as Object, Optional LocText) 78cdf0e10cSrcweirDim oPeer as Object 79cdf0e10cSrcweirDim aPeerSize as new com.sun.star.awt.Size 80cdf0e10cSrcweirDim NullValue 81cdf0e10cSrcweir oControl = oController.GetControl(oModel) 82cdf0e10cSrcweir oPeer = oControl.GetPeer() 83cdf0e10cSrcweir If oControl.Model.PropertySetInfo.HasPropertybyName("EffectiveMax") Then 84cdf0e10cSrcweir If oControl.Model.EffectiveMax = 0 Then 85cdf0e10cSrcweir ' This is relevant for decimal fields 86cdf0e10cSrcweir oControl.Model.EffectiveValue = 999.9999 87cdf0e10cSrcweir Else 88cdf0e10cSrcweir oControl.Model.EffectiveValue = oControl.Model.EffectiveMax 89cdf0e10cSrcweir End If 90cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 91cdf0e10cSrcweir oControl.Model.EffectiveValue = NullValue 92cdf0e10cSrcweir ElseIf Not IsMissing(LocText) Then 93cdf0e10cSrcweir oControl.Text = LocText 94cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 95cdf0e10cSrcweir ElseIf CurFieldType = com.sun.star.sdbc.DataType.BIT Then 96cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 97cdf0e10cSrcweir ElseIf CurFieldType = com.sun.star.sdbc.DataType.BOOLEAN Then 98cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 99cdf0e10cSrcweir ElseIf CurFieldType = com.sun.star.sdbc.DataType.DATE Then 100cdf0e10cSrcweir oControl.Model.Date = Date 101cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 102cdf0e10cSrcweir oControl.Model.Date = NullValue 103cdf0e10cSrcweir ElseIf CurFieldType = com.sun.star.sdbc.DataType.TIME Then 104cdf0e10cSrcweir oControl.Time = Time 105cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 106cdf0e10cSrcweir oControl.Time = NullValue 107cdf0e10cSrcweir Else 108cdf0e10cSrcweir If oControl.MaxTextLen > SBMAXTEXTSIZE Then 109cdf0e10cSrcweir oControl.Text = Mid(SBSIZETEXT,1, SBMAXTEXTSIZE) 110cdf0e10cSrcweir Else 111cdf0e10cSrcweir oControl.Text = Mid(SBSIZETEXT,1, oControl.MaxTextLen) 112cdf0e10cSrcweir End If 113cdf0e10cSrcweir GetPeerSize() = oPeer.PreferredSize() 114cdf0e10cSrcweir oControl.Text = "" 115cdf0e10cSrcweir End If 116cdf0e10cSrcweirEnd Function 117cdf0e10cSrcweir 118cdf0e10cSrcweir 119cdf0e10cSrcweirFunction TwipToCM(BYVAL nValue as long) as String 120cdf0e10cSrcweir TwipToCM = trim(str(nValue / 567)) + "cm" 121cdf0e10cSrcweirEnd function 122cdf0e10cSrcweir 123cdf0e10cSrcweir 124cdf0e10cSrcweirFunction TwipTo100telMM(BYVAL nValue as long) as long 125cdf0e10cSrcweir TwipTo100telMM = nValue / 0.567 126cdf0e10cSrcweirEnd function 127cdf0e10cSrcweir 128cdf0e10cSrcweir 129cdf0e10cSrcweirFunction TwipToPixel(BYVAL nValue as long) as long ' not an exact calculation 130cdf0e10cSrcweir TwipToPixel = nValue / 15 131cdf0e10cSrcweirEnd function 132cdf0e10cSrcweir 133cdf0e10cSrcweir 134cdf0e10cSrcweirFunction PixelTo100thMMX(oControl as Object) as long 135cdf0e10cSrcweir oPeer = oControl.GetPeer() 136cdf0e10cSrcweir PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterX/100000) 137cdf0e10cSrcweir 138cdf0e10cSrcweir' PixelTo100thMM = nValue * 28 ' not an exact calculation 139cdf0e10cSrcweirEnd function 140cdf0e10cSrcweir 141cdf0e10cSrcweir 142cdf0e10cSrcweirFunction PixelTo100thMMY(oControl as Object) as long 143cdf0e10cSrcweir oPeer = oControl.GetPeer() 144cdf0e10cSrcweir PixelTo100mmX = Clng(Peer.GetInfo.PixelPerMeterY/100000) 145cdf0e10cSrcweir 146cdf0e10cSrcweir' PixelTo100thMM = nValue * 28 ' not an exact calculation 147cdf0e10cSrcweirEnd function 148cdf0e10cSrcweir 149cdf0e10cSrcweir 150cdf0e10cSrcweirFunction GetPoint(xPos, YPos) as New com.sun.star.awt.Point 151cdf0e10cSrcweirDim aPoint as New com.sun.star.awt.Point 152cdf0e10cSrcweir aPoint.X = xPos 153cdf0e10cSrcweir aPoint.Y = yPos 154cdf0e10cSrcweir GetPoint() = aPoint 155cdf0e10cSrcweirEnd Function 156cdf0e10cSrcweir 157cdf0e10cSrcweir 158cdf0e10cSrcweirFunction GetSize(iWidth, iHeight) As New com.sun.star.awt.Size 159cdf0e10cSrcweirDim aSize As New com.sun.star.awt.Size 160cdf0e10cSrcweir aSize.Width = iWidth 161cdf0e10cSrcweir aSize.Height = iHeight 162cdf0e10cSrcweir GetSize() = aSize 163cdf0e10cSrcweirEnd Function 164cdf0e10cSrcweir 165cdf0e10cSrcweir 166cdf0e10cSrcweirSub ImportStyles() 167cdf0e10cSrcweirDim OldIndex as Integer 168cdf0e10cSrcweir If Not bDebug Then 169cdf0e10cSrcweir On Local Error GoTo WIZARDERROR 170cdf0e10cSrcweir End If 171cdf0e10cSrcweir OldIndex = CurIndex 172cdf0e10cSrcweir CurIndex = GetCurIndex(DialogModel.lstStyles, Styles(),8) 173cdf0e10cSrcweir If CurIndex <> OldIndex Then 174cdf0e10cSrcweir ToggleLayoutPage(False) 175cdf0e10cSrcweir Dim sImportPath as String 176cdf0e10cSrcweir sImportPath = Styles(CurIndex, 8) 177cdf0e10cSrcweir bWithBackGraphic = LoadNewStyles(oDocument, DialogModel, CurIndex, sImportPath, Styles(), TexturePath) 178cdf0e10cSrcweir ControlCaptionsToStandardLayout() 179cdf0e10cSrcweir ToggleLayoutPage(True, "lstStyles") 180cdf0e10cSrcweir End If 181cdf0e10cSrcweirWIZARDERROR: 182cdf0e10cSrcweir If Err <> 0 Then 183cdf0e10cSrcweir Msgbox(sMsgErrMsg, 16, GetProductName()) 184cdf0e10cSrcweir Resume LOCERROR 185cdf0e10cSrcweir LOCERROR: 186cdf0e10cSrcweir End If 187cdf0e10cSrcweirEnd Sub 188cdf0e10cSrcweir 189cdf0e10cSrcweir 190cdf0e10cSrcweir 191cdf0e10cSrcweirFunction SetNumerics(ByVal oLocObject as Object, iLocFieldType as Integer) as Object 192cdf0e10cSrcweir If CurControlType = cNumericBox Then 193cdf0e10cSrcweir oLocObject.TreatAsNumber = True 194cdf0e10cSrcweir Select Case iLocFieldType 195cdf0e10cSrcweir Case com.sun.star.sdbc.DataType.BIGINT 196cdf0e10cSrcweir oLocObject.EffectiveMax = 2147483647 * 2147483647 197cdf0e10cSrcweir oLocObject.EffectiveMin = -(-2147483648 * -2147483648) 198cdf0e10cSrcweir' oLocObject.DecimalAccuracy = 0 199cdf0e10cSrcweir Case com.sun.star.sdbc.DataType.INTEGER 200cdf0e10cSrcweir oLocObject.EffectiveMax = 2147483647 201cdf0e10cSrcweir oLocObject.EffectiveMin = -2147483648 202cdf0e10cSrcweir Case com.sun.star.sdbc.DataType.SMALLINT 203cdf0e10cSrcweir oLocObject.EffectiveMax = 32767 204cdf0e10cSrcweir oLocObject.EffectiveMin = -32768 205cdf0e10cSrcweir Case com.sun.star.sdbc.DataType.TINYINT 206cdf0e10cSrcweir oLocObject.EffectiveMax = 127 207cdf0e10cSrcweir oLocObject.EffectiveMin = -128 208cdf0e10cSrcweir Case com.sun.star.sdbc.DataType.FLOAT, com.sun.star.sdbc.DataType.REAL, com.sun.star.sdbc.DataType.DOUBLE, com.sun.star.sdbc.DataType.DECIMAL, com.sun.star.sdbc.DataType.NUMERIC 209cdf0e10cSrcweir'Todo: oLocObject.DecimalAccuracy = ... 210cdf0e10cSrcweir oLocObject.EffectiveDefault = CurDefaultValue 211cdf0e10cSrcweir' Todo: HelpText??? 212cdf0e10cSrcweir End Select 213cdf0e10cSrcweir If oLocObject.PropertySetinfo.HasPropertyByName("Width")Then ' Note: an Access AutoincrementField does not provide this property Width 214cdf0e10cSrcweir oLocObject.Width = CurFieldLength + CurScale + 1 215cdf0e10cSrcweir End If 216cdf0e10cSrcweir If CurIsCurrency Then 217cdf0e10cSrcweir'Todo: How do you set currencies? 218cdf0e10cSrcweir End If 219cdf0e10cSrcweir ElseIf CurControlType = cTextBox Then 'com.sun.star.sdbc.DataType.CHAR, com.sun.star.sdbc.DataType.VARCHAR, com.sun.star.sdbc.DataType.LONGVARCHAR 220cdf0e10cSrcweir If CurFieldLength = 0 Then 'Or oLocObject.MaxTextLen > SBMAXTEXTSIZE 221cdf0e10cSrcweir oLocObject.MaxTextLen = SBMAXTEXTSIZE 222cdf0e10cSrcweir CurFieldLength = SBMAXTEXTSIZE 223cdf0e10cSrcweir Else 224cdf0e10cSrcweir oLocObject.MaxTextLen = CurFieldLength 225cdf0e10cSrcweir End If 226cdf0e10cSrcweir oLocObject.DefaultText = CurDefaultValue 227cdf0e10cSrcweir ElseIf CurControlType = cDateBox Then 228cdf0e10cSrcweir' Todo Why does this not work?: oLocObject.DefaultDate = CurDefaultValue 229cdf0e10cSrcweir ElseIf CurControlType = cTimeBox Then ' com.sun.star.sdbc.DataType.DATE, com.sun.star.sdbc.DataType.TIME 230cdf0e10cSrcweir oLocObject.DefaultTime = CurDefaultValue 231cdf0e10cSrcweir' Todo: Property TimeFormat? frome where? 232cdf0e10cSrcweir ElseIf CurControlType = cCheckBox Then 233cdf0e10cSrcweir' Todo Why does this not work?: oLocObject.DefautState = CurDefaultValue 234cdf0e10cSrcweir End If 235cdf0e10cSrcweir If oLocObject.PropertySetInfo.HasPropertybyName("FormatKey") Then 236cdf0e10cSrcweir On Local Error Resume Next 237cdf0e10cSrcweir oLocObject.FormatKey = CurFormatKey 238cdf0e10cSrcweir End If 239cdf0e10cSrcweirEnd Function 240cdf0e10cSrcweir 241cdf0e10cSrcweir 242cdf0e10cSrcweir' Destroy all Shapes in Nirwana 243cdf0e10cSrcweirSub RemoveShapes() 244cdf0e10cSrcweirDim n as Integer 245cdf0e10cSrcweirDim oControl as Object 246cdf0e10cSrcweirDim oShape as Object 247cdf0e10cSrcweir For n = oDrawPage.Count-1 To 0 Step -1 248cdf0e10cSrcweir oShape = oDrawPage(n) 249cdf0e10cSrcweir If oShape.Position.Y > -2000 Then 250cdf0e10cSrcweir oDrawPage.Remove(oShape) 251cdf0e10cSrcweir End If 252cdf0e10cSrcweir Next n 253cdf0e10cSrcweirEnd Sub 254cdf0e10cSrcweir 255cdf0e10cSrcweir 256cdf0e10cSrcweir' Destroy all Shapes in Nirwana 257cdf0e10cSrcweirSub RemoveNirwanaShapes() 258cdf0e10cSrcweirDim n as Integer 259cdf0e10cSrcweirDim oControl as Object 260cdf0e10cSrcweirDim oShape as Object 261cdf0e10cSrcweir For n = oDrawPage.Count-1 To 0 Step -1 262cdf0e10cSrcweir oShape = oDrawPage(n) 263cdf0e10cSrcweir If oShape.Position.Y < -2000 Then 264cdf0e10cSrcweir oDrawPage.Remove(oShape) 265cdf0e10cSrcweir End If 266cdf0e10cSrcweir Next n 267cdf0e10cSrcweirEnd Sub 268cdf0e10cSrcweir 269cdf0e10cSrcweir 270cdf0e10cSrcweir 271cdf0e10cSrcweir' Note: as Shapes cannot be removed from the DrawPage without destroying 272cdf0e10cSrcweir' the object we have to park them somewhere beyond the visible area of the page 273cdf0e10cSrcweirSub ShapesToNirwana() 274cdf0e10cSrcweirDim n as Integer 275cdf0e10cSrcweirDim oControl as Object 276cdf0e10cSrcweir For n = 0 To oDrawPage.Count-1 277cdf0e10cSrcweir oDrawPage(n).Position = GetPoint(-20, -10000) 278cdf0e10cSrcweir Next n 279cdf0e10cSrcweirEnd Sub 280cdf0e10cSrcweir 281cdf0e10cSrcweir 282cdf0e10cSrcweirFunction CalcUniqueContentName(BYVAL oContainer as Object, sBaseName as String) as String 283cdf0e10cSrcweir 284cdf0e10cSrcweirDim nPostfix as Integer 285cdf0e10cSrcweirDim sReturn as String 286cdf0e10cSrcweir nPostfix = 2 287cdf0e10cSrcweir sReturn = sBaseName 288cdf0e10cSrcweir while (oContainer.hasByName(sReturn)) 289cdf0e10cSrcweir sReturn = sBaseName & nPostfix 290cdf0e10cSrcweir nPostfix = nPostfix + 1 291cdf0e10cSrcweir Wend 292cdf0e10cSrcweir CalcUniqueContentName = sReturn 293cdf0e10cSrcweirEnd Function 294cdf0e10cSrcweir 295cdf0e10cSrcweir 296cdf0e10cSrcweirFunction CountItemsInArray(BigArray(), SearchItem) 297cdf0e10cSrcweirDim i as Integer 298cdf0e10cSrcweirDim MaxIndex as Integer 299cdf0e10cSrcweirDim ResCount as Integer 300cdf0e10cSrcweir ResCount = 0 301cdf0e10cSrcweir MaxIndex = Ubound(BigArray()) 302cdf0e10cSrcweir For i = 0 To MaxIndex 303cdf0e10cSrcweir If SearchItem = BigArray(i) Then 304cdf0e10cSrcweir ResCount = ResCount + 1 305cdf0e10cSrcweir End If 306cdf0e10cSrcweir Next i 307cdf0e10cSrcweir CountItemsInArray() = ResCount 308cdf0e10cSrcweirEnd Function 309cdf0e10cSrcweir 310cdf0e10cSrcweir 311cdf0e10cSrcweirFunction GetDBHeight(oDBModel as Object) 312cdf0e10cSrcweir If CurControlType = cImageControl Then 313cdf0e10cSrcweir nDBHeight = 2000 314cdf0e10cSrcweir Else 315cdf0e10cSrcweir If CurFieldType = com.sun.star.sdbc.DataType.LONGVARCHAR Then 316cdf0e10cSrcweir oDBModel.MultiLine = True 317cdf0e10cSrcweir nDBHeight = nDBRefHeight * 4 318cdf0e10cSrcweir Else 319cdf0e10cSrcweir nDBHeight = nDBRefHeight 320cdf0e10cSrcweir End If 321cdf0e10cSrcweir End If 322cdf0e10cSrcweir GetDBHeight() = nDBHeight 323cdf0e10cSrcweirEnd Function 324cdf0e10cSrcweir 325cdf0e10cSrcweir 326cdf0e10cSrcweirFunction GetFormWizardPaths() as Boolean 327cdf0e10cSrcweir FormPath = GetOfficeSubPath("Template","../wizard/bitmap") 328cdf0e10cSrcweir If FormPath <> "" Then 329cdf0e10cSrcweir WebWizardPath = GetOfficeSubPath("Template","wizard/web") 330cdf0e10cSrcweir If WebWizardPath <> "" Then 331cdf0e10cSrcweir WizardPath = GetOfficeSubPath("Template","wizard/") 332cdf0e10cSrcweir If Wizardpath <> "" Then 333cdf0e10cSrcweir TexturePath = GetOfficeSubPath("Gallery", "www-back/") 334cdf0e10cSrcweir If TexturePath <> "" Then 335cdf0e10cSrcweir WorkPath = GetPathSettings("Work") 336cdf0e10cSrcweir If WorkPath <> "" Then 337cdf0e10cSrcweir TempPath = GetPathSettings("Temp") 338cdf0e10cSrcweir If TempPath <> "" Then 339cdf0e10cSrcweir GetFormWizardPaths = True 340cdf0e10cSrcweir Exit Function 341cdf0e10cSrcweir End If 342cdf0e10cSrcweir End If 343cdf0e10cSrcweir End If 344cdf0e10cSrcweir End If 345cdf0e10cSrcweir End If 346cdf0e10cSrcweir End If 347cdf0e10cSrcweir DisposeDocument(oDocument) 348cdf0e10cSrcweir GetFormWizardPaths() = False 349cdf0e10cSrcweirEnd Function 350cdf0e10cSrcweir 351cdf0e10cSrcweir 352cdf0e10cSrcweirFunction GetFilterName(sApplicationKey as String) as String 353cdf0e10cSrcweirDim oArgs() 354cdf0e10cSrcweirDim oFactory 355cdf0e10cSrcweirDim i as Integer 356cdf0e10cSrcweirDim Maxindex as Integer 357cdf0e10cSrcweirDim UIName as String 358cdf0e10cSrcweir oFactory = createUnoService("com.sun.star.document.FilterFactory") 359cdf0e10cSrcweir oArgs() = oFactory.getByName(sApplicationKey) 360cdf0e10cSrcweir MaxIndex = Ubound(oArgs()) 361cdf0e10cSrcweir For i = 0 to MaxIndex 362cdf0e10cSrcweir If (oArgs(i).Name="UIName") Then 363cdf0e10cSrcweir UIName = oArgs(i).Value 364cdf0e10cSrcweir Exit For 365cdf0e10cSrcweir End If 366cdf0e10cSrcweir next i 367cdf0e10cSrcweir GetFilterName() = UIName 368cdf0e10cSrcweirEnd Function 369cdf0e10cSrcweir</script:module> 370