home *** CD-ROM | disk | FTP | other *** search
/ PC World 2004 October / PCWorld_2004-10_cd.bin / akce / openoffice / f_0110 / Language.xba < prev    next >
Extensible Markup Language  |  2003-03-27  |  3KB  |  84 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
  3. <script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
  4.  
  5.  
  6.  
  7.  
  8. Sub LoadLanguage()
  9.     If InitResources("WebWizard","wwz") Then
  10.         WebWiz_gErrContentNotFound = GetResText(1101)
  11.         WebWiz_gErrStyleNotFound = GetResText(1102)
  12.         WebWiz_gErrMainTemplateError = GetResText(1103)
  13.         WebWiz_gErrWhileReloading = GetResText(1104)
  14.         WebWiz_gErrWhileLoadStyles = GetResText(1105)
  15.         WebWiz_gErrMainDocumentError = GetResText(1106)
  16.         WebWiz_gErrMsg = GetResText(1107)
  17.     End If
  18. End Sub
  19.  
  20.  
  21. Function GetWebWizardPaths() as Boolean
  22. Dim TemplatePath as String
  23.     TextureDir = GetOfficeSubPath("Gallery","www-back")
  24.     If TextureDir <> "" Then
  25.         GraphicsDir = GetOfficeSubPath("Gallery","www-graf/")
  26.         If GraphicsDir <> "" Then
  27.             BulletDir = GetOfficeSubPath("Gallery", "bullets/")
  28.             If BulletDir <> "" Then
  29.                 PhotosDir = GetPathSettings("Gallery", False, 1)
  30.                 If PhotosDir <> "" Then
  31.                     TemplatePath = GetOfficeSubPath("Template", "wizard/web/")
  32.                     If TemplatePath <> "" Then
  33.                         SOBitmapPath = GetOfficeSubPath("Template", "wizard/bitmap")
  34.                         If SOBitmapPath <> "" Then
  35.                             GetWebwizardPaths() = True
  36.                             Exit Function
  37.                             End If
  38.                     End If
  39.                 End If
  40.             End If
  41.         End If
  42.     End If
  43.     DisposeDocument(oBaseDocument)
  44.     GetWebWizardPaths() = False
  45. End Function
  46.  
  47.  
  48.  
  49. Sub OpenWebDialog()
  50.     Dim sBitmapPath as String
  51.     Dim BufferNames() as String
  52.     Dim SelList(0) as Integer
  53.     SelList(0) = 0
  54.     MainDialog = LoadDialog("WebWizard","WebWzrd")
  55.     DialogModel = MainDialog.Model
  56.     With DialogModel
  57.         .cbHelp.Label = GetResText(1000)
  58.         .Title = GetResText(1001)
  59.         .cbCancel.Label = GetResText(1002)
  60.         .cbGoOn.Label = GetResText(1003)
  61.         .lblTemplate.Label = GetResText(1004)
  62.         .lblStyle.Label = GetResText(1005)
  63.         .hlnBackground.Label = GetResText(1006)
  64.         .optTiled.Label = GetRestext(1007)
  65.         .optArea.Label = GetResText(1008)
  66.         .chkSaveasTemplate.Label = GetResText(1010)
  67.     End With
  68.     
  69.     BufferNames() = ArrayfromMultiArray(Layout, 1)
  70.     DialogModel.lbTemplate.StringItemList() = BufferNames()
  71.     DialogModel.lbTemplate.SelectedItems() = SelList()
  72.  
  73.  
  74.     BufferNames() = ArrayfromMultiArray(Style, 1)
  75.     DialogModel.lbStyles.StringItemList() = BufferNames()
  76.     DialogModel.lbStyles.SelectedItems() = SelList()
  77.     sBitmapPath = SOBitmapPath & "webwizard.bmp"
  78.  
  79.     DialogModel.ImagePreview.ImageURL = sBitmapPath
  80.     ToggleOptionButtons(DialogModel, bWithBackGraphic)
  81.     MainDialog.GetControl("lbTemplate").SetFocus()
  82.     DialogModel.cbGoOn.DefaultButton = True
  83.     DialogModel.ImagePreview.BackGroundColor = RGB(0,60,126)
  84. End Sub</script:module>