summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/webwizard/Common.xba3
-rw-r--r--wizards/source/webwizard/HtmlAutoPilotBasic.xba24
-rw-r--r--wizards/source/webwizard/Language.xba40
3 files changed, 53 insertions, 14 deletions
diff --git a/wizards/source/webwizard/Common.xba b/wizards/source/webwizard/Common.xba
index d5dcab8bc3c3..806c49423b67 100644
--- a/wizards/source/webwizard/Common.xba
+++ b/wizards/source/webwizard/Common.xba
@@ -49,7 +49,8 @@ Dim StylesOptions(0) as New com.sun.star.beans.PropertyValue
ErrorOcurred:
If Err <> 0 Then
MsgBox (WebWiz_gErrWhileLoadStyles$, 16, WebWiz_gWizardName$)
-' CancelHTMLWizard()
+ RESUME EXITSUB
+EXITSUB:
End If
End Function
diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
index e3448bc54bfe..d7882bff25a3 100644
--- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba
+++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
@@ -22,6 +22,7 @@ Public Style(MaxStyles, 8) as String
Public Layout$(MaxLayouts, 2)
Public TextureDir$, BulletDir$, GraphicsDir$, GalleryDir$, PhotosDir$
+Public SOBitmapPath as String
Public CurrentBullet$, CurrentPrev$, CurrentNext$, CurrentHome$, CurrentTop$
Public FileStr as String
@@ -59,9 +60,16 @@ On Local Error Goto GlobalErrorHandler
SetProgressValue(2)
oBaseDocument.LockControllers
oViewSettings.ShowTableBoundaries = False
+ If Not GetWebWizardPaths() Then
+ oBaseDocument.dispose()
+ Exit Sub
+ End If
LoadLanguage
SetProgressValue(10)
- GetPaths()
+ If Not GetWebWizardPaths() Then
+ oBaseDocument.dispose()
+ Exit Sub
+ End If
Layout() = getListBoxArrays(oUcb, "/cnt")
GetCurIndex(DialogModel, Layout(),2)
SetProgressValue(30)
@@ -88,7 +96,9 @@ On Local Error Goto GlobalErrorHandler
GLOBALERRORHANDLER:
If Err <> 0 Then
MsgBox (WebWiz_gErrMsg$, 16, WebWiz_gWizardName$)
-' CancelHTMLWizard()
+ oBaseDocument.dispose()
+ RESUME EXITWIZARD
+EXITWIZARD:
End If
End Sub
@@ -297,7 +307,13 @@ Dim sExtension as String
oDocInfo = CreateUnoService("com.sun.star.document.DocumentProperties")
FilterLen = Len(sFileFilter)
bItemFound = False
+ ' It has to be made sure that the TemplatePath <> ""
TemplatePath = GetOfficeSubPath("Template", "wizard/web/")
+ If TemplatePath = "" Then
+ Dim NullList()
+ getListBoxArrays() = NullList()
+ Exit Function
+ End If
DirContent() = oUcb.GetFolderContents(TemplatePath,True)
If sFileFilter = "/cnt" Then
DimCount = 2
@@ -347,9 +363,9 @@ Dim sExtension as String
End If
Next i
If sFileFilter = "/cnt" Then
- ReDim PreServe List(a-1,2) as String
+ ReDim Preserve List(a-1,2) as String
Else
- ReDim PreServe List(a-1,8) as String
+ ReDim Preserve List(a-1,8) as String
End If
If Not bItemfound Then
MsgBox(WebWiz_gErrContentNotFound$, 16, WebWiz_gWizardName$)
diff --git a/wizards/source/webwizard/Language.xba b/wizards/source/webwizard/Language.xba
index a3c8bc66fdb0..c1d5eadee5a0 100644
--- a/wizards/source/webwizard/Language.xba
+++ b/wizards/source/webwizard/Language.xba
@@ -3,6 +3,8 @@
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Language" script:language="StarBasic">Option Explicit
+
+
Sub LoadLanguage()
If InitResources(&quot;WebWizard&quot;,&quot;wwz&quot;) Then
WebWiz_gErrContentNotFound = GetResText(1101)
@@ -16,16 +18,38 @@ Sub LoadLanguage()
End Sub
-Sub GetPaths
- TextureDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;www-back/&quot;)
- GraphicsDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;www-graf/&quot;)
- BulletDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;bullets/&quot;)
- PhotosDir = GetPathSettings(&quot;Gallery&quot;, False, 1)
-End Sub
+Function GetWebWizardPaths() as Boolean
+Dim TemplatePath as String
+ TextureDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-back&quot;)
+ If TextureDir &lt;&gt; &quot;&quot; Then
+ GraphicsDir = GetOfficeSubPath(&quot;Gallery&quot;,&quot;www-graf/&quot;)
+ If GraphicsDir &lt;&gt; &quot;&quot; Then
+ BulletDir = GetOfficeSubPath(&quot;Gallery&quot;, &quot;bullets/&quot;)
+ If BulletDir &lt;&gt; &quot;&quot; Then
+ PhotosDir = GetPathSettings(&quot;Gallery&quot;, False, 1)
+ If PhotosDir &lt;&gt; &quot;&quot; Then
+ TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
+ If TemplatePath &lt;&gt; &quot;&quot; Then
+ SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
+ If SOBitmapPath &lt;&gt; &quot;&quot; Then
+ GetWebwizardPaths() = True
+ Exit Function
+ End If
+ End If
+ End If
+ End If
+ End If
+ End If
+ If Not IsNull(oDocument) Then
+ oBaseDocument.dispose()
+ End If
+ GetWebWizardPaths() = False
+End Function
+
Sub OpenWebDialog()
- Dim SOBitmapPath,sBitmapPath as String
+ Dim sBitmapPath as String
Dim BufferNames() as String
Dim SelList(0) as Integer
SelList(0) = 0
@@ -52,8 +76,6 @@ Sub OpenWebDialog()
BufferNames() = ArrayfromMultiArray(Style, 1)
DialogModel.lbStyles.StringItemList() = BufferNames()
DialogModel.lbStyles.SelectedItems() = SelList()
-
- SOBitmapPath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/bitmap&quot;)
sBitmapPath = SOBitmapPath &amp; &quot;webwizard.bmp&quot;
DialogModel.ImagePreview.ImageURL = sBitmapPath