summaryrefslogtreecommitdiff
path: root/wizards/source/webwizard/HtmlAutoPilotBasic.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/webwizard/HtmlAutoPilotBasic.xba')
-rw-r--r--wizards/source/webwizard/HtmlAutoPilotBasic.xba14
1 files changed, 7 insertions, 7 deletions
diff --git a/wizards/source/webwizard/HtmlAutoPilotBasic.xba b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
index 0ef9cc8f2de6..bcb6e4b40906 100644
--- a/wizards/source/webwizard/HtmlAutoPilotBasic.xba
+++ b/wizards/source/webwizard/HtmlAutoPilotBasic.xba
@@ -19,7 +19,6 @@ Public NumberOfLayouts%, NumberOfStyles%
' Filled with title, previous, next, home, top, bullet, background, file name
Public Style(8, MaxStyles) as String
-' Filled with title, file name
Public Layout$(2, MaxLayouts)
Public TextureDir$, BulletDir$, GraphicsDir$, GalleryDir$, PhotosDir$
@@ -131,7 +130,7 @@ On Local Error Goto ErrorOcurred
End If
oBaseDocument.UnlockControllers
oViewCursor.GotoStart(False)
- ToggleDialogControls(True, "lbTemplate")
+ ToggleDialogControls(True, "lbTemplate")
End If
End Sub
@@ -205,10 +204,9 @@ Sub EndDialog()
AttachBasicMacroToEvent(oBaseDocument,"OnNew", "WebWizard.HtmlAutoPilotBasic.SetEvent()")
' Call the Store template dialog
DispatchSlot(5538)
- Else
- SetEvent()
+ AttachBasicMacroToEvent(oBaseDocument,"OnNew", "")
End If
-' MainDialog.EndExecute()
+ SetEvent()
End Sub
@@ -237,7 +235,9 @@ Dim SavePath as String
BasicLibraries.LoadLibrary("Tools")
oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess")
GetPaths()
- oBaseDocument = StarDesktop.ActiveFrame.Controller.Model
+ oBaseDocument = ThisComponent
+' oBaseDocument.LockControllers()
+
' Note: The sub DirectoryNameoutofPath should be change, so that the last character is a slash
SavePath = DirectoryNameoutofPath(oBaseDocument.Url, "/") & "/"
@@ -258,11 +258,11 @@ Dim SavePath as String
.GetUserFieldValue(3) = ""
End With
-' ' Reset events
AttachBasicMacroToEvent(oBaseDocument,"OnSaveDone", "")
AttachBasicMacroToEvent(oBaseDocument,"OnSaveAsDone", "")
AttachBasicMacroToEvent(oBaseDocument,"OnNew", "")
oBaseDocument.Store
+' oBaseDocument.UnlockControllers()
End Sub