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
8Sub LoadLanguage()
9	If InitResources(&quot;WebWizard&quot;,&quot;wwz&quot;) 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
18End Sub
19
20
21Function GetWebWizardPaths() as Boolean
22Dim TemplatePath as String
23	TextureDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-back&quot;)
24	If TextureDir &lt;&gt; &quot;&quot; Then
25		GraphicsDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-graf/&quot;)
26		If GraphicsDir &lt;&gt; &quot;&quot; Then
27			BulletDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;bullets/&quot;)
28			If BulletDir &lt;&gt; &quot;&quot; Then
29				PhotosDir = GetPathSettings(&quot;Gallery&quot;, False, 1)
30				If PhotosDir &lt;&gt; &quot;&quot; Then
31					TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
32					If TemplatePath &lt;&gt; &quot;&quot; Then
33						SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;../wizard/bitmap&quot;)
34						If SOBitmapPath &lt;&gt; &quot;&quot; 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
45End Function
46
47
48
49Sub OpenWebDialog()
50	Dim sBitmapPath as String
51	Dim BufferNames() as String
52	Dim SelList(0) as Integer
53	SelList(0) = 0
54	MainDialog = LoadDialog(&quot;WebWizard&quot;,&quot;WebWzrd&quot;)
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 &amp; &quot;webwizard.bmp&quot;
78
79	DialogModel.ImagePreview.ImageURL = sBitmapPath
80	ToggleOptionButtons(DialogModel, bWithBackGraphic)
81	MainDialog.GetControl(&quot;lbTemplate&quot;).SetFocus()
82	DialogModel.cbGoOn.DefaultButton = True
83	DialogModel.ImagePreview.BackGroundColor = RGB(0,60,126)
84End Sub</script:module>