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