summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2002-11-06 14:20:48 +0000
committerBehrend Cornelius <bc@openoffice.org>2002-11-06 14:20:48 +0000
commit22c8cc4ed2d29421fe5fc8ab2ce4e90a4738c9d2 (patch)
tree660b4c1774c2c14c0d7b0943014369f073325e2e /wizards
parent810b3473a08f9270259683b2a5d1bdf8b99321ed (diff)
#104710# "GetWizardPaths" added
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 &lt;&gt; 0 Then
MsgBox (WebWiz_gErrWhileLoadStyles$, 16, WebWiz_gWizardName$)
-&apos; 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, &quot;/cnt&quot;)
GetCurIndex(DialogModel, Layout(),2)
SetProgressValue(30)
@@ -88,7 +96,9 @@ On Local Error Goto GlobalErrorHandler
GLOBALERRORHANDLER:
If Err &lt;&gt; 0 Then
MsgBox (WebWiz_gErrMsg$, 16, WebWiz_gWizardName$)
-&apos; CancelHTMLWizard()
+ oBaseDocument.dispose()
+ RESUME EXITWIZARD
+EXITWIZARD:
End If
End Sub
@@ -297,7 +307,13 @@ Dim sExtension as String
oDocInfo = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
FilterLen = Len(sFileFilter)
bItemFound = False
+ &apos; It has to be made sure that the TemplatePath &lt;&gt; &quot;&quot;
TemplatePath = GetOfficeSubPath(&quot;Template&quot;, &quot;wizard/web/&quot;)
+ If TemplatePath = &quot;&quot; Then
+ Dim NullList()
+ getListBoxArrays() = NullList()
+ Exit Function
+ End If
DirContent() = oUcb.GetFolderContents(TemplatePath,True)
If sFileFilter = &quot;/cnt&quot; Then
DimCount = 2
@@ -347,9 +363,9 @@ Dim sExtension as String
End If
Next i
If sFileFilter = &quot;/cnt&quot; 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