summaryrefslogtreecommitdiffstats
path: root/wizards/source/tutorials
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-07 09:06:44 +0000
commited5640d8b587fbcfed7dd7967f3de04b37a76f26 (patch)
tree7a5f7c6c9d02226d7471cb3cc8fbbf631b415303 /wizards/source/tutorials
parentInitial commit. (diff)
downloadlibreoffice-upstream/4%7.4.7.tar.xz
libreoffice-upstream/4%7.4.7.zip
Adding upstream version 4:7.4.7.upstream/4%7.4.7upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wizards/source/tutorials/Functions.xba385
-rw-r--r--wizards/source/tutorials/RoadMap.xba134
-rw-r--r--wizards/source/tutorials/ShowInfoDialog.xba322
-rw-r--r--wizards/source/tutorials/TutorialClose.xba32
-rw-r--r--wizards/source/tutorials/TutorialCloseDialog.xdl31
-rw-r--r--wizards/source/tutorials/TutorialCreator.xba27
-rw-r--r--wizards/source/tutorials/TutorialOpen.xba113
-rw-r--r--wizards/source/tutorials/TutorialOpenDialog.xdl38
-rw-r--r--wizards/source/tutorials/TutorialsDialog.xdl43
-rw-r--r--wizards/source/tutorials/dialog.xlb7
-rw-r--r--wizards/source/tutorials/script.xlb10
11 files changed, 1142 insertions, 0 deletions
diff --git a/wizards/source/tutorials/Functions.xba b/wizards/source/tutorials/Functions.xba
new file mode 100644
index 000000000..4b422c80b
--- /dev/null
+++ b/wizards/source/tutorials/Functions.xba
@@ -0,0 +1,385 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Functions" script:language="StarBasic">REM ***** BASIC *****
+Dim DialogVisible As Boolean
+Dim TutorStep As Integer
+Dim TutorLastStep As Integer
+Dim myDialog As Object
+Dim myTutorial As Object
+Public TutorText() As String
+Dim documentTitle As String
+Dim exampleUse As Object
+Dim properties() As Object
+Dim docTYP As String
+&apos;public myWidth As Long
+Dim myHeight As Long
+Dim oTextField As Object
+Dim stepTitle As String
+Dim oOpenDialogFlag
+Dim imageStatus As String
+
+Sub LoadTutorialDialog(exampleToUse, documentTYP)
+ Init()
+ exampleUse = exampleToUse
+ TutorText() = exampleUse.LoadText()
+ properties() = exampleUse.GetProperties()
+ If properties(3).Value = &quot;True&quot; Then
+ Dim localisation(0) As new com.sun.star.beans.NamedValue
+ localisation(0).Name = &quot;Localisation&quot;
+ localisation(0).Value = properties()
+ myTutorial.execute(localisation())
+ Else
+ TutorStep = 0
+ TutorLastStep = 0
+ docTYP = documentTYP
+ InitAction()
+ ShowInfoMain()
+ DialogVisible = True
+ myDialog = LoadDialog(&quot;Tutorials&quot;,&quot;TutorialsDialog&quot;)
+
+ SetTutorialDocumentPosSize()
+
+ documentProps = ThisComponent.getDocumentProperties()
+ myDialog.Title = &quot;Tutorials - &quot; &amp; documentProps.Title
+ oTextField = myDialog.GetControl(&quot;myTextField&quot;)
+ oTextField.setVisible(False)
+
+ imageStatus = &quot;MIN&quot;
+ setMaxMinImage(imageStatus)
+
+ &apos;myWidth = myDialog.Size.Width
+ myHeight = myDialog.Size.Height
+
+ CheckForStepShowButtonStatus()
+ CheckForStepNextButtonStatus()
+ InitRoadMap()
+ SetVisibleTrue()
+ myDialog.model.myTextField.Label = stepTitle
+ myDialog.model.myText.Label = GetStepText()&apos;TutorText(TutorStep)
+
+
+ Do
+ wait 1000
+ Loop Until DialogVisible = False
+ If( oOpenDialogFlag = True) Then
+ Destroy()
+ TutorialOpen.TutorialOpenMain()
+ Else
+ Destroy()
+ End If
+ End If
+End Sub
+
+Sub setMaxMinImage(param As String)
+ On Local Error Goto NOIMAGE
+ oCommandButton = myDialog.GetControl(&quot;CommandButton&quot;)
+ templatePath = GetPathSettings(&quot;Template&quot;,false, 0)
+ Dim bitmapPath As String
+ iPos = InStr(templatePath,&quot;/&quot;)
+ If(iPos &gt; 0) Then
+ If(param = &quot;MAX&quot;) Then
+ bitmapPath = templatePath &amp; &quot;../wizard/bitmap/maximize.png&quot;
+ ElseIf(param = &quot;MIN&quot;) Then
+ bitmapPath = templatePath &amp; &quot;../wizard/bitmap/minimize.png&quot;
+ End If
+ Else
+ If(param = &quot;MAX&quot;) Then
+ bitmapPath = templatePath &amp; &quot;..\wizard\bitmap\maximize.png&quot;
+ ElseIf(param = &quot;MIN&quot;) Then
+ bitmapPath = templatePath &amp; &quot;..\wizard\bitmap\minimize.png&quot;
+ End If
+ End If
+ &apos;printdbgInfo oCommandButton.Model
+ oCommandButton.Model.ImageUrl = bitmapPath
+ Exit Sub
+ NOIMAGE:
+End Sub
+
+Sub SetTutorialDocumentPosSize()
+ activDesktopWindow = StarDesktop.activeFrame.ContainerWindow
+ If(activDesktopWindow.posSize.Height &lt; 550) Then
+ activDesktopWindow.setPosSize(0,0,0,550,8)
+ End If
+ If (activDesktopWindow.posSize.Width &lt; 750 ) Then
+ activDesktopWindow.setPosSize(0,0,750,0,4)
+ EndIf
+End Sub
+
+Sub InitRoadMap()
+ RoadMapMain(Functions, myDialog)
+ SetControlModelPosSize(0, 0, 85, 176)
+ SetControlModelText(&quot;Steps&quot;)
+
+ StepSize = Ubound(TutorText())
+ Dim ItemsArray(StepSize) as String
+ For i = 0 To StepSize
+ stepcontent = TutorText(i)
+ iPos = InStr(stepcontent,CHR(13))
+ ItemName = Left(stepcontent, iPos)
+ ItemsArray(i) = ItemName
+ Next i
+ InsertItemsLabels( ItemsArray())
+
+ For i = 1 To StepSize
+ SetItemEnabled( i, False)
+ Next i
+ SetItemEnabled( 0, True)
+End Sub
+
+Sub Destroy()
+ &apos;myDialog.dispose
+ wait 1000
+ ShowInfoDialog.DisposeIDialog()
+
+ &apos; THE DOCUMENT GETS CLOSED HERE!!!!!!!! GPF
+ thisComponent.CurrentController.Frame.close(True)
+
+End Sub
+
+Sub Init
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ myTutorial = createUNOService(&quot;com.sun.star.wizards.tutorial.executer.CallTutorialFramework&quot;)
+ documentTitle = ThisComponent.getCurrentController.getFrame.Title
+End Sub
+
+Sub InitStep
+ udProps = ThisComponent.DocumentProperties.UserDefinedProperties
+ If udProps.PropertySetInfo.hasPropertyByName(&quot;CurrentStep&quot;) Then
+ TutorStep = udProps.CurrentStep
+ Else
+ udProps.addProperty(&quot;CurrentStep&quot;, 0, TutorStep)
+ End If
+End Sub
+
+Sub setStep
+ ThisComponent.DocumentProperties.UserDefinedProperties.CurrentStep = TutorStep
+End Sub
+
+Sub InitAction()
+ SetStepTitle()
+
+ Dim property(6) As new com.sun.star.beans.PropertyValue
+ property(0).Name = &quot;DocumentTYP&quot;
+ property(0).Value = docTYP
+ property(1).Name = &quot;MethodName&quot;
+ property(1).Value = &quot;setDelay&quot;
+ property(2).Name = &quot;Param&quot;
+ property(2).Value = 0 &apos;key insert speed (Millis)
+ property(3).Name = &quot;Param&quot;
+ property(3).Value = 4 &apos;mouse animate speed (Millis)
+ property(4).Name = &quot;Param&quot;
+ property(4).Value = 2000 &apos;after mouse animate sleep (Millis)
+ property(5).Name = &quot;Param&quot;
+ property(5).Value = 10 &apos;mouse scroll speed (Millis)
+ property(6).Name = &quot;Param&quot;
+ property(6).Value = -1 &apos;mouse speed (step)
+ myTutorial.setPropertyValues(property())
+End Sub
+
+Sub EndDialog
+ oOpenDialogFlag = False
+ If (myDialog.model.done.Label = &quot;Close&quot;) Then
+ TutorialCloseMain()
+ Else
+ DialogVisible = False
+ End If
+End Sub
+
+Sub NextStep
+ GotoStep(TutorStep + 1)
+End Sub
+
+Sub GotoStep(StepIndex)
+ If(StepIndex &lt;= Ubound(TutorText())) Then
+ TutorStep = StepIndex
+ If TutorStep &gt; TutorLastStep Then
+ TutorLastStep = TutorStep
+ End If
+ If(TutorStep = Ubound(TutorText())) Then
+ myDialog.model.next.enabled = False
+ myDialog.model.done.Label = &quot;Done&quot;
+ myDialog.model.show.Label = &quot;Tutorials&quot;
+ Else
+ myDialog.model.next.enabled = True
+ End If
+ SetStepTitle()
+ myDialog.model.myText.Label = GetStepText()
+ CheckForStepShowButtonStatus()
+ SetItemEnabled( TutorStep, True)
+ &apos;setStep()
+ End If
+End Sub
+
+Function GetStepText()
+ Dim tempText As String
+ tempText = TutorText(TutorStep)
+ iPos = InStr(tempText,CHR(13))
+ ResultString = Right(tempText, Len(tempText) - iPos - 1)
+ GetStepText() = ResultString
+End Function
+
+Sub ItemChange(CurrentItemID, SelectitemID)
+ GotoStep(SelectitemID)
+End Sub
+
+Sub SetDisableShowMeButton()
+ myDialog.model.show.enabled = False
+ TutorLastStep = TutorLastStep + 1
+End Sub
+
+Sub Minimize(aEvent)
+ ActionItemsTextField = myDialog.GetControl(&quot;ActionItemsLabel&quot;)
+ FixedLineVertikal = myDialog.GetControl(&quot;FixedLineVertikal&quot;)
+
+ If myDialog.Size.Height = 35 Then
+ myDialog.setPosSize(0,0,0,myHeight,8)
+ oTextField.setVisible(False)
+ ActionItemsTextField.setVisible(True)
+ FixedLineVertikal.setVisible(True)
+ RoadMap.SetVisibleRoadMap(True)
+ Else
+ myDialog.setPosSize(0,0,0,35,8)
+ rmSelectedIndex = RoadMap.GetSelectedIndex() + 1
+ gsTitle = GetStepTitle()
+ oTextField.setText(rmSelectedIndex &amp; &quot;. &quot; &amp; gsTitle)
+ oTextField.setVisible(True)
+ ActionItemsTextField.setVisible(False)
+ FixedLineVertikal.setVisible(False)
+ RoadMap.SetVisibleRoadMap(False)
+ End If
+ If(imageStatus = &quot;MAX&quot;) Then
+ imageStatus = &quot;MIN&quot;
+ ElseIf(imageStatus = &quot;MIN&quot;) Then
+ imageStatus = &quot;MAX&quot;
+ End If
+ setMaxMinImage(imageStatus)
+
+End Sub
+
+Sub SetStepTitle()
+ stepcontent = TutorText(TutorStep)
+ iPos = InStr(stepcontent,CHR(13))
+ stepTitle = Left(stepcontent, iPos)
+ SetStepTitle() = stepTitle
+End Sub
+
+Function GetStepTitle()
+ GetStepTitle() = stepTitle
+End Function
+
+Sub CheckForStepShowButtonStatus()
+ If ((exampleUse.ContainsStepAction() = True And TutorStep = TutorLastStep) Or myDialog.model.show.Label = &quot;Tutorials&quot;) Then
+ myDialog.model.show.enabled = True
+ Else
+ myDialog.model.show.enabled = False
+ End If
+End Sub
+
+Sub CheckForStepNextButtonStatus()
+ If(TutorStep = Ubound(TutorText())) Then
+ myDialog.model.next.enabled = False
+ myDialog.model.done.Label = &quot;Done&quot;
+ End If
+End Sub
+
+Sub Show(aEvent)
+ &apos;ShowInfoMain()
+ If( myDialog.model.show.Label = &quot;Tutorials&quot;) Then
+ oOpenDialogFlag = True
+ DialogVisible = False
+ Else
+ SetMousePosition(aEvent)
+ exampleUse.Action()
+ End If
+End Sub
+
+Sub SetMousePosition(aEvent)
+ MyPoints() = MousePoints(aEvent)
+
+ Dim mousePosition(3) as new com.sun.star.beans.PropertyValue
+ mousePosition(0).Name = &quot;DocumentTYP&quot;
+ mousePosition(0).Value = docTYP
+ mousePosition(1).Name = &quot;MethodName&quot;
+ mousePosition(1).Value = &quot;setMousePosition&quot;
+ mousePosition(2).Name = &quot;Param&quot;
+ mousePosition(2).Value = MyPoints(0)
+ mousePosition(3).Name = &quot;Param&quot;
+ mousePosition(3).Value = MyPoints(1)
+
+ myTutorial.setPropertyValues(mousePosition())
+End Sub
+
+Function MousePoints(aEvent)
+ Dim position(1) As Integer
+ position(0) = myDialog.getControl(&quot;show&quot;).AccessibleContext.LocationOnScreen.X + aEvent.Source.Model.PositionX
+ position(1) = myDialog.getControl(&quot;show&quot;).AccessibleContext.LocationOnScreen.Y + aEvent.Source.Model.PositionY
+ MousePoints = position()
+End Function
+
+Function CheckPath(path() As String)
+ &apos;documentTitle = ThisComponent.getCurrentController.getFrame.Title
+ sTitle = path(0)
+ ResultString = Right(sTitle, 3)
+ iPos = InStr(ResultString,&quot;#&quot;)
+ ResultString = Right(ResultString, Len(ResultString) - iPos)
+ ResultFrameString = InStr (sTitle, &quot;{D}FRAME#&quot;)
+ If ResultFrameString &lt;&gt; 0 Then
+ If Not (sTitle = (&quot;{D}FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString)) Then
+ &apos;path(0) = &quot;{D}FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ path(0) = &quot;FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ sTitle = path(1)
+ ResultString = Right(sTitle, 3)
+ iPos = InStr(ResultString,&quot;#&quot;)
+ ResultString = Right(ResultString, Len(ResultString) - iPos)
+ path(1) = &quot;ROOT_PANE#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ Else
+ &apos;path(0) = &quot;{D}FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ path(0) = &quot;FRAME#&quot; &amp; documentTitle &amp; &quot;#&quot; &amp; ResultString
+ End If
+ End If
+End Function
+
+Sub SetVisibleTutorialsDialog(param)
+ myDialog.setVisible(param)
+End Sub
+
+Sub SetVisibleTrue()
+ myDialog.setVisible(True)
+End Sub
+
+Sub SetVisibleFalse()
+ myDialog.setVisible(False)
+End Sub
+
+Sub ExitTutorial()
+ Dim aUrl As new com.sun.star.util.URL
+ oDoc = ThisComponent
+ urlTransformer = createUNOService(&quot;com.sun.star.util.URLTransformer&quot;)
+ aUrl.Complete = &quot;slot:5621&quot;
+ urlTransformer.parseStrict(aUrl)
+ xController = oDoc.getCurrentController()
+ xDispatcher = xController.queryDispatch(aUrl, &quot;&quot;, 0)
+ if NOT isNull(xDispatcher) then
+ xDispatcher.dispatch(aUrl, DimArray())
+ else
+ msgBox &quot;Error! Cannot close document.&quot;
+ End If
+End Sub
+</script:module>
diff --git a/wizards/source/tutorials/RoadMap.xba b/wizards/source/tutorials/RoadMap.xba
new file mode 100644
index 000000000..efcfc03a4
--- /dev/null
+++ b/wizards/source/tutorials/RoadMap.xba
@@ -0,0 +1,134 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="RoadMap" script:language="StarBasic">REM ***** BASIC *****
+Dim oControlModel
+Dim oDialogModel
+Dim CurrentItem
+Dim bLongString
+Dim oControl
+Dim oEvent
+Dim oUseDialog As Object
+Dim oModulName As Object
+
+Sub RoadMapMain(ModulNameforItemChange, dialogtoUse)
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ oUseDialog = dialogtoUse
+ oModulName = ModulNameforItemChange
+ oDialogModel = oUseDialog.Model
+ oControlModel = oUseDialog.Model.CreateInstance(&quot;com.sun.star.awt.UnoControlRoadmapModel&quot;)
+
+ oDialogModel.insertByName(&quot;RoadMap&quot;, oControlModel)
+ oControl = oUseDialog.getControl(&quot;RoadMap&quot;)
+ oEvent = createUnoListener( &quot;CallBack_&quot;, &quot;com.sun.star.awt.XItemListener&quot; )
+ oControl.addItemListener(oEvent)
+ oControlModel.CurrentItemID = 0
+ oControlModel.Complete = True
+ oControlModel.Activated = True
+End Sub
+
+Sub SetVisibleRoadMap(param)
+ oControl.SetVisible(param)
+End Sub
+
+Sub SetDialogModelSize(Width, Height)
+ oDialogModel.Width = Width
+ oDialogModel.Height = Height
+End Sub
+
+Sub SetControlModelPosSize(X, Y, Width, Height)
+ oControlModel.PositionX = X
+ oControlModel.PositionY = Y
+ oControlModel.Width = Width
+ oControlModel.Height = Height
+End Sub
+
+Sub SetControlModelText( ModelText As String)
+ oControlModel.Text = ModelText
+End Sub
+
+Sub InsertItemsLabels( ItemLabelsArray() As String)
+ For i = 0 To Ubound(ItemLabelsArray())
+ oRoadmapItem = oControlModel.createInstance()
+ oRoadmapItem.Label = ItemLabelsArray(i)
+ oRoadmapItem.ID = i
+ oControlModel.insertbyIndex(i, oRoadmapItem)
+ Next i
+End Sub
+
+Sub SetItemEnabled( ItemIndex, param)
+ oControlModel.getByIndex(ItemIndex).Enabled = param
+ oControlModel.CurrentItemID = ItemIndex
+End Sub
+
+Sub AddImagetoControlModel( Url As String)
+ oControlModel.ImageUrl = ConvertToUrl(Url)
+End Sub
+
+Function GetSelectedIndex()
+ GetSelectedIndex() = oControlModel.CurrentItemID
+End Function
+
+Function GetControlModel()
+ GetControlModel = oControlModel
+End Function
+
+Function GetDialogModel()
+ GetDialogModel = oDialogModel
+End Function
+
+Sub Callback_itemStateChanged(aEvent)
+ oModulName.ItemChange(oControlModel.CurrentItemID, aEvent.itemID)
+End Sub
+
+Sub SetComplete(param)
+ oControlModel.Complete = param
+End Sub
+
+Sub SetActivated(param)
+ oControlModel.Activated = param
+End Sub
+
+Sub RemoveItem(ItemIndex)
+ If ItemIndex &gt; -1 Then
+ oControlModel.removeByIndex(ItemIndex)
+ End If
+End Sub
+
+Sub InsertItem(ItemLabel As String)
+ oRoadmapItem = oControlModel.createInstance()
+ oRoadmapItem.Label = ItemLabel
+ oControlModel.insertbyIndex(oControlModel.CurrentItemID, oRoadmapItem)
+End Sub
+
+Sub ReplaceItem(ItemLabel As String)
+ oRoadmapItem = oControlModel.createInstance()
+ oRoadmapItem.Label = ItemLabel
+ oControlModel.replacebyIndex(oControlModel.CurrentItemID, oRoadmapItem)
+End Sub
+
+Sub Callback_disposing(aEvent)
+End Sub
+
+Sub Property_propertyChange(aEvent)
+End Sub
+
+Sub Property_disposing(aEvent)
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/ShowInfoDialog.xba b/wizards/source/tutorials/ShowInfoDialog.xba
new file mode 100644
index 000000000..e1da4b596
--- /dev/null
+++ b/wizards/source/tutorials/ShowInfoDialog.xba
@@ -0,0 +1,322 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="ShowInfoDialog" script:language="StarBasic">REM ***** BASIC *****
+Dim oWnd As Object
+Dim oWnd2 As Object
+Dim oWnd3 As Object
+Dim oDoc as Object
+
+Sub ShowInfoMain
+ prop() = GetShowInfoProperties()
+ Init(prop(0).Value, prop(1).Value, prop(2).Value, prop(3).Value, prop(4).Value, prop(5).Value, prop(6).Value, prop(7).Value, prop(8).Value)
+End Sub
+
+Sub Init(tFieldText As String, windowX, windowY, windowWidth, windowHeight, tFieldX, tFieldY, tFieldWidth, tFieldHeight)
+ toolkit = createUnoService(&quot;com.sun.star.awt.Toolkit&quot;)
+ Dim oWndDescr As new com.sun.star.awt.WindowDescriptor
+ Dim oBounds As new com.sun.star.awt.Rectangle
+ oWndDescr.Type = com.sun.star.awt.WindowClass.TOP
+ oWndDescr.WindowServiceName = &quot;&quot;
+ oWndDescr.ParentIndex = 0
+
+ &apos;officeX = StarDesktop.ActiveFrame.getContainerWindow().AccessibleContext.LocationOnScreen.X
+ &apos;officeY = StarDesktop.ActiveFrame.getContainerWindow().AccessibleContext.LocationOnScreen.Y
+ &apos;officeWidth = StarDesktop.ActiveFrame.getContainerWindow().getPosSize().Width
+ &apos;officeHeight = StarDesktop.ActiveFrame.getContainerWindow().getPosSize().Height
+ officeWidth = thisComponent.CurrentController.Frame.getContainerWindow().getPosSize().Width
+ officeHeight = thisComponent.CurrentController.Frame.getContainerWindow().getPosSize().Height
+
+ &apos;dialogWidth = myTutoShowDialog.getPosSize().Width
+ &apos;dialogHeight = myTutoShowDialog.getPosSize().Height
+ X = officeWidth - windowWidth - windowX
+ Y = officeHeight - windowHeight - windowY
+
+ oBounds.X = X : oBounds.Y = Y
+ oBounds.Width = windowWidth : oBounds.Height = windowHeight
+ oWndDescr.Bounds = oBounds
+ oWndDescr.Parent = thisComponent.CurrentController.Frame.ContainerWindow
+ with com.sun.star.awt.WindowAttribute
+ oWndDescr.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW
+ end with
+
+ oWnd = toolkit.createWindow(oWndDescr)
+
+ Dim oWndDescr3 As new com.sun.star.awt.WindowDescriptor
+ Dim oBounds3 As new com.sun.star.awt.Rectangle
+ oWndDescr3.Type = com.sun.star.awt.WindowClass.TOP
+ oWndDescr3.WindowServiceName = &quot;fixedimage&quot; &apos;&quot;fixedtext&quot;
+ oWndDescr3.ParentIndex = 0
+ oBounds3.X = 0 : oBounds3.Y = 0
+ oBounds3.Width = tFieldWidth : oBounds3.Height = tFieldHeight
+ oWndDescr3.Bounds = oBounds3
+ oWndDescr3.Parent = oWnd
+ with com.sun.star.awt.WindowAttribute
+ oWndDescr3.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW
+ end with
+
+ oWnd3= toolkit.createWindow(oWndDescr3)
+ &apos;oWnd2.Text = tFieldText
+ &apos;printdbgInfo(oWnd3)
+ setImage(oWnd3)
+ &apos;oWnd3.Background = 16777215
+&apos; oWnd2.SetBackGround(16776960)
+ oWnd.SetBackGround(16776960)
+&apos; oWnd.FontDescriptors(0).Name = &quot;Albany&quot;
+&apos; oWnd.FontDescriptors(0).StyleName = &quot;BOLD&quot;
+
+ Dim oWndDescr2 As new com.sun.star.awt.WindowDescriptor
+ Dim oBounds2 As new com.sun.star.awt.Rectangle
+ oWndDescr2.Type = com.sun.star.awt.WindowClass.TOP
+ oWndDescr2.WindowServiceName = &quot;fixedtext&quot;
+ oWndDescr2.ParentIndex = 0
+ oBounds2.X = tFieldX : oBounds2.Y = tFieldY
+ oBounds2.Width = tFieldWidth : oBounds2.Height = tFieldHeight
+ oWndDescr2.Bounds = oBounds2
+ oWndDescr2.Parent = oWnd3
+ with com.sun.star.awt.WindowAttribute
+ oWndDescr2.WindowAttributes = .CLOSEABLE AND .MOVEABLE AND .SIZEABLE AND .BORDER AND .SHOW
+ end with
+
+ oWnd2= toolkit.createWindow(oWndDescr2)
+ oWnd2.Text = tFieldText
+ oWnd2.Background = 268435455
+ &apos;printdbgInfo(oWnd2)
+
+ &apos;printdbgInfo oWnd.getPosSize()
+
+End Sub
+
+Function GetShowInfoProperties()
+ stepText = GetStepTitle()
+ Dim Properties(8) As new com.sun.star.beans.NamedValue
+ Properties(0).Name = &quot;ShowInfoDialogText&quot;
+ Properties(0).Value = stepText &amp; &quot;Press [Esc] to abort.&quot;
+ Properties(1).Name = &quot;WindowX&quot;
+ Properties(1).Value = 20
+ Properties(2).Name = &quot;WindowY&quot;
+ Properties(2).Value = 40
+ Properties(3).Name = &quot;WindowWidth&quot;
+ Properties(3).Value = 190
+ Properties(4).Name = &quot;WindowHeight&quot;
+ Properties(4).Value = 50
+ Properties(5).Name = &quot;TFieldX&quot;
+ Properties(5).Value = 7
+ Properties(6).Name = &quot;TFieldY&quot;
+ Properties(6).Value = 8
+ Properties(7).Name = &quot;TFieldWidth&quot;
+ Properties(7).Value = 190
+ Properties(8).Name = &quot;TFieldHeight&quot;
+ Properties(8).Value = 50
+ GetShowInfoProperties = Properties()
+End Function
+
+Sub setShowInfoText()
+ stepText = GetStepTitle()
+ oWnd2.Text = stepText &amp; &quot;Press [Esc] to abort.&quot;
+End Sub
+
+Sub ShowON()
+ setShowInfoText()
+ oWnd.setVisible(True)
+ oWnd3.setVisible(True)
+ oWnd2.setVisible(True)
+End Sub
+
+Sub ShowOFF()
+ &apos;On Local Error Goto NOPROPERTYSETINFO:
+ oWnd.setVisible(False)
+ oWnd2.setVisible(False)
+ oWnd3.setVisible(False)
+ &apos;oDoc.dispose()
+ Exit Sub
+ &apos;NOPROPERTYSETINFO:
+End Sub
+
+Sub DisposeIDialog()
+ &apos;On Local Error Goto NOPROPERTYSETINFO:
+ oWnd3.dispose
+ oWnd2.dispose
+ oWnd.dispose
+ oDoc.dispose()
+ Exit Sub
+ &apos;NOPROPERTYSETINFO:
+End Sub
+
+sub setImage(whatever as Object)
+
+ templatePath = GetPathSettings(&quot;Template&quot;,false, 0)
+ Dim bitmapPath As String
+ iPos = InStr(templatePath,&quot;/&quot;)
+ if(iPos &gt; 0) Then
+ bitmapPath = templatePath &amp; &quot;../wizard/bitmap/tutorial_background.gif&quot;
+ Else
+ bitmapPath = templatePath &amp; &quot;..\wizard\bitmap\tutorial_background.gif&quot;
+ End If
+
+ dim props(0) as new com.sun.star.beans.PropertyValue
+ props(0).Name = &quot;Hidden&quot;
+ props(0).Value = true
+ oDoc = StarDesktop.loadComponentFromUrl(&quot;private:factory/swriter&quot;,&quot;_blank&quot;,0,props())
+ oShape = addControlToDefaultForm(&quot;ImageButton&quot;, 1000, 1000, 2000, 1000)
+ imgControl = oShape.getControl()
+ &apos;imgControl.ImageUrl=&quot;file:///D:/Program%20Files/src680_m11_qwizards1_49_TEST/share/gallery/tutoItem.gif&quot;
+ imgControl.ImageUrl = bitmapPath
+ imgControl.addConsumer(whatever)
+ imgControl.startProduction()
+end sub
+
+Function createControlShape(cKind As String) As Object
+
+ Dim oControlShape As Object
+ Dim oControl As Object
+
+
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; &amp; cKind)
+ oControl.setPropertyValue(&quot;DefaultControl&quot;, &quot;com.sun.star.form.control.&quot; &amp; cKind)
+ oControlShape.setControl(oControl)
+
+
+ createControlShape() = oControlShape
+
+End Function
+
+Function createControlShapeWithDefaultControl(cKind As String) As Object
+
+ Dim oControlShape As Object
+ Dim oControl As Object
+
+
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; &amp; cKind)
+ oControlShape.setControl(oControl)
+
+
+ createControlShapeWithDefaultControl() = oControlShape
+
+End Function
+
+Function createUNOControlShape(cKind As String, defControl As String) As Object
+
+ Dim oControlShape As Object
+ Dim oControl As Object
+
+
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; &amp; cKind)
+ oControl.setPropertyValue(&quot;DefaultControl&quot;, &quot;com.sun.star.awt.&quot; &amp; defControl)
+ oControlShape.setControl(oControl)
+
+
+ createUNOControlShape() = oControlShape
+
+End Function
+
+Function addShape(oShape As Object) As Boolean
+
+ Dim vSize As New com.sun.star.awt.Size
+ Dim oDrawPage As Object
+ Dim oForms As Object
+ Dim oForm As Object
+
+ oDrawPage = oDoc.getDrawPage()
+ oForms = oDrawPage.getForms()
+
+ if oForms.Count = 0 then
+ oForm = oDoc.createInstance(&quot;com.sun.star.form.component.Form&quot;)
+ oForms.insertByIndex(0, oForm)
+ end if
+
+ vSize.Height = 2000 : vSize.Width = 2000
+ oShape.Size = vSize
+ oDrawPage.add(oShape)
+
+ addShape() = true
+
+End Function
+
+sub addControl(cKind as String)
+
+ Dim oDrawPage As Object
+ Dim oForm As Object, oForms As Object
+ Dim oControl As Object, oControlShape As Object
+ Dim aSz As Variant
+ Dim oText As Object
+
+ oDrawPage = oDoc.DrawPage
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; + cKind)
+ oForm = oDoc.createInstance(&quot;com.sun.star.form.component.Form&quot;)
+ oforms = oDrawPage.Forms
+ if oforms.count = 0 then
+ oforms.insertbyindex(0,oForm)
+ end if
+ oControlShape.Control = oControl
+ oDrawPage.add(oControlShape)
+
+End sub
+
+Function addControlToDefaultForm(cKind as String, x As Integer, y As Integer, width As Integer, height As Integer) As Object
+
+ Dim oDrawPage As Object
+ Dim oControl As Object, oControlShape As Object
+ Dim pos As New com.sun.star.awt.Point
+ Dim size As New com.sun.star.awt.Size
+
+ pos.X = x
+ pos.Y = y
+ size.Width = width
+ size.Height = height
+
+ oDrawPage = oDoc.DrawPage
+ oControlShape = oDoc.createInstance(&quot;com.sun.star.drawing.ControlShape&quot;)
+ oControl = oDoc.createInstance(&quot;com.sun.star.form.component.&quot; + cKind)
+ oControlShape.Control = oControl
+ oControlShape.Position = pos
+ oControlShape.Size = size
+ oDrawPage.add(oControlShape)
+
+ addControlToDefaultForm() = oControlShape
+
+End Function
+
+Function addShapeToDrawDoc(oPage as Object, nPosX, nPosY as Integer, oType As String) As Object
+ Dim aPoint As New com.sun.star.awt.Point
+ Dim aSize As New com.sun.star.awt.Size
+ Dim oShape As Object
+ Dim servNames As Variant
+
+ aPoint.x = nPosX
+ aPoint.y = nPosY
+ aSize.Width = 2000
+ aSize.Height = 1000
+ oShape = oDoc.createInstance(&quot;com.sun.star.drawing.&quot;+oType+&quot;Shape&quot;)
+ oShape.Size = aSize
+ oShape.Position = aPoint
+
+ if oShape.getPropertySetInfo().hasPropertyByName(&quot;FillColor&quot;) then
+ oShape.FillColor = RGB(128, 255, 0)
+ End If
+
+ oPage.add(oShape)
+
+ addShapeToDrawDoc() = oShape
+End Function
+</script:module>
diff --git a/wizards/source/tutorials/TutorialClose.xba b/wizards/source/tutorials/TutorialClose.xba
new file mode 100644
index 000000000..b4a066b89
--- /dev/null
+++ b/wizards/source/tutorials/TutorialClose.xba
@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialClose" script:language="StarBasic">REM ***** BASIC *****
+Dim myCloseDialog As Object
+
+Sub TutorialCloseMain
+ myCloseDialog = LoadDialog(&quot;Tutorials&quot;,&quot;TutorialCloseDialog&quot;)
+ myCloseDialog.Execute()
+End Sub
+
+Sub CloseYes(aEvent)
+ myCloseDialog.EndExecute()
+ DialogVisible = False
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialCloseDialog.xdl b/wizards/source/tutorials/TutorialCloseDialog.xdl
new file mode 100644
index 000000000..a362b2a44
--- /dev/null
+++ b/wizards/source/tutorials/TutorialCloseDialog.xdl
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialCloseDialog" dlg:left="173" dlg:top="82" dlg:width="132" dlg:height="38" dlg:closeable="true" dlg:moveable="true">
+ <dlg:styles>
+ <dlg:style dlg:style-id="0" dlg:font-weight="150"/>
+ </dlg:styles>
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="yesButton" dlg:tab-index="1" dlg:left="24" dlg:top="20" dlg:width="50" dlg:height="14" dlg:value="Yes">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialClose.CloseYes?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="noButton" dlg:tab-index="0" dlg:left="76" dlg:top="20" dlg:width="50" dlg:height="14" dlg:value="No" dlg:button-type="cancel"/>
+ <dlg:text dlg:style-id="0" dlg:id="Label1" dlg:tab-index="2" dlg:left="6" dlg:top="6" dlg:width="120" dlg:height="8" dlg:value="Do you want to close this Tutorial?." dlg:align="center"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialCreator.xba b/wizards/source/tutorials/TutorialCreator.xba
new file mode 100644
index 000000000..34e1276f4
--- /dev/null
+++ b/wizards/source/tutorials/TutorialCreator.xba
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialCreator" script:language="StarBasic">REM ***** BASIC *****
+Sub TutorialCreatorMain
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ myTutorial = createUNOService(&quot;com.sun.star.wizards.tutorial.executer.CallTutorialFramework&quot;)
+ myTutorial.trigger(&quot;StartTutorialCreator&quot;)
+End Sub
+
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialOpen.xba b/wizards/source/tutorials/TutorialOpen.xba
new file mode 100644
index 000000000..5b6001c6c
--- /dev/null
+++ b/wizards/source/tutorials/TutorialOpen.xba
@@ -0,0 +1,113 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<script:module xmlns:script="http://openoffice.org/2000/script" script:name="TutorialOpen" script:language="StarBasic">REM ***** BASIC *****
+Dim myOpenDialog As Object
+Dim oListBox As Object
+Dim files As Object
+Dim oUcb As Object
+Dim oListener As Object
+
+Sub TutorialOpenMain
+ GlobalScope.BasicLibraries.LoadLibrary(&quot;Tools&quot;)
+ myOpenDialog = LoadDialog(&quot;Tutorials&quot;,&quot;TutorialOpenDialog&quot;)
+ init()
+ myOpenDialog.Execute()
+End Sub
+
+Sub Init
+ On Local Error Goto NOFILE
+ myOpenDialog.Title = &quot;Tutorials&quot;
+ oListBox = myOpenDialog.GetControl(&quot;ListBox&quot;)
+ templatePath = GetPathSettings(&quot;Template&quot;,false, 0)
+ Dim tutorialPath As String
+ iPos = InStr(templatePath,&quot;/&quot;)
+ if(iPos &gt; 0) Then
+ tutorialPath = templatePath &amp; &quot;/tutorials&quot;
+ Else
+ tutorialPath = templatePath &amp; &quot;\tutorials&quot;
+ End If
+ oUcb = createUnoService(&quot;com.sun.star.ucb.SimpleFileAccess&quot;)
+ files = oUcb.getFolderContents(tutorialPath,true)
+ size = Ubound( files() )
+ Dim tempFiles(size) As String
+ tempCount = 0
+ For iCount = 0 To size
+ completPath = files(iCount)
+ oDocInfo = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
+ oDocInfo.Read(completPath)
+ sDocTitle = oDocInfo.Title
+ if(not isNull(sDocTitle) And len(sDocTitle) &gt; 0) Then
+ oListbox.addItem(sDocTitle,0)
+ tempFiles(tempCount) = completPath
+ tempCount = tempCount + 1
+ End If
+ Next iCount
+ &apos;printdbgInfo oListbox
+ size = oListbox.ItemCount - 1
+ Dim tempFiles2(size) As String
+ For iCount = 0 To size
+ tempFiles2(iCount) = tempFiles(iCount)
+ Next iCount
+ files() = tempFiles2()
+ Exit Sub
+ NOFILE:
+ If Err &lt;&gt; 0 Then
+ Msgbox &quot;No file found error!&quot; &amp; CHR(13) &amp; &quot;Path: ...\share\template\...\tutorials\&quot;
+ myOpenDialog.model.Open.enabled = False
+ End If
+End Sub
+
+Sub ItemSelected(oEvent)
+ On Local Error Goto NOFILE
+ completPath = files(Ubound(files()) - oEvent.Selected)
+ oTextField = myOpenDialog.GetControl(&quot;Label&quot;) &apos;TextField
+ oTextField.setText(&quot;&quot;)
+ Dim NoArgs() as new com.sun.star.beans.PropertyValue
+ oDocInfo = CreateUnoService(&quot;com.sun.star.document.DocumentProperties&quot;)
+ oDocInfo.Read(completPath)
+ sDocDescription = oDocInfo.Description
+ if(not isNull(sDocTitle) And len(sDocDescription) &gt; 0) Then
+ oTextField.setText(sDocDescription)
+ Else
+ oTextField.setText(&quot;Not Description!!!.&quot;)
+ End If
+ Exit Sub
+ NOFILE:
+ If Err &lt;&gt; 0 Then
+ Msgbox &quot;Open file error!&quot;
+ End If
+End Sub
+
+Sub OpenTutorial(aEvent)
+ completPath = files(Ubound(files()) - oListBox.getSelectedItemPos())
+ Dim Args(2) as new com.sun.star.beans.PropertyValue
+ Args(1).Name = &quot;MacroExecutionMode&quot;
+ Args(1).Value = com.sun.star.document.MacroExecMode.ALWAYS_EXECUTE
+ Args(2).Name = &quot;AsTemplate&quot;
+ Args(2).Value = true
+
+ StarDesktop.LoadComponentFromURL(completPath,&quot;_default&quot;,0, Args())
+ myOpenDialog.endExecute()
+End Sub
+
+Sub Cancel(aEvent)
+ myOpenDialog.endExecute()
+End Sub
+</script:module> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialOpenDialog.xdl b/wizards/source/tutorials/TutorialOpenDialog.xdl
new file mode 100644
index 000000000..d9a6009a3
--- /dev/null
+++ b/wizards/source/tutorials/TutorialOpenDialog.xdl
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialOpenDialog" dlg:left="158" dlg:top="58" dlg:width="250" dlg:height="200" dlg:closeable="true" dlg:moveable="true">
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="Open" dlg:tab-index="1" dlg:left="141" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Open">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialOpen.OpenTutorial?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="Cancel" dlg:tab-index="2" dlg:left="194" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Cancel">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.TutorialOpen.Cancel?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:menulist dlg:id="ListBox" dlg:tab-index="0" dlg:left="8" dlg:top="17" dlg:width="98" dlg:height="155">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tutorials.TutorialOpen.OpenTutorial" script:language="StarBasic"/>
+ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="Tutorials.TutorialOpen.ItemSelected" script:language="StarBasic"/>
+ </dlg:menulist>
+ <dlg:fixedline dlg:id="FixedLine" dlg:tab-index="3" dlg:left="6" dlg:top="6" dlg:width="100" dlg:height="8" dlg:value="Tutorials"/>
+ <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="4" dlg:left="6" dlg:top="176" dlg:width="238" dlg:height="1"/>
+ <dlg:fixedline dlg:id="FixedLine2" dlg:tab-index="5" dlg:left="110" dlg:top="6" dlg:width="134" dlg:height="8" dlg:value="Description"/>
+ <dlg:fixedline dlg:id="FixedLine3" dlg:tab-index="6" dlg:left="267" dlg:top="44" dlg:width="0" dlg:height="2"/>
+ <dlg:text dlg:id="Label" dlg:tab-index="7" dlg:left="112" dlg:top="17" dlg:width="132" dlg:height="155" dlg:multiline="true"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tutorials/TutorialsDialog.xdl b/wizards/source/tutorials/TutorialsDialog.xdl
new file mode 100644
index 000000000..f8a2ee211
--- /dev/null
+++ b/wizards/source/tutorials/TutorialsDialog.xdl
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
+<!--
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+-->
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="TutorialsDialog" dlg:left="149" dlg:top="54" dlg:width="250" dlg:height="200" dlg:closeable="true" dlg:moveable="true">
+ <dlg:styles>
+ <dlg:style dlg:style-id="0" dlg:font-weight="150"/>
+ </dlg:styles>
+ <dlg:bulletinboard>
+ <dlg:button dlg:id="CommandButton" dlg:tab-index="3" dlg:left="232" dlg:top="4" dlg:width="13" dlg:height="13" dlg:value="C">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.Minimize?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:id="myText" dlg:tab-index="4" dlg:left="91" dlg:top="26" dlg:width="153" dlg:height="145" dlg:value="This text explains all the action items that the user can do to follow the current step highlighted in the road map at the left side of the tutorial window.&#x0a;&#x0a;1. Open the Format menu&#x0a;2. Choose the Paragraph command&#x0a;3. Click the Numbering tab&#x0a;&#x0a;The first step will always explain what the current tutorial is about.&#x0a;&#x0a;The last step - it is highlighted currently in the road map - will summarize what the user now has seen or learned." dlg:multiline="true"/>
+ <dlg:button dlg:id="show" dlg:tab-index="1" dlg:left="142" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Show me">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.Show?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:button dlg:id="next" dlg:tab-index="0" dlg:left="89" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Next &gt;&gt;">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.NextStep?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:style-id="0" dlg:id="myTextField" dlg:tab-index="5" dlg:left="6" dlg:top="6" dlg:width="192" dlg:height="8" dlg:value="Current Step (in Road Map)"/>
+ <dlg:button dlg:id="done" dlg:tab-index="2" dlg:left="195" dlg:top="180" dlg:width="50" dlg:height="14" dlg:value="Close">
+ <script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:Tutorials.Functions.EndDialog?language=Basic&amp;location=application" script:language="Script"/>
+ </dlg:button>
+ <dlg:text dlg:style-id="0" dlg:id="ActionItemsLabel" dlg:tab-index="8" dlg:left="91" dlg:top="8" dlg:width="45" dlg:height="8" dlg:value="Action Items"/>
+ <dlg:fixedline dlg:id="FixedLineHorizontal" dlg:tab-index="7" dlg:left="0" dlg:top="176" dlg:width="250" dlg:height="1"/>
+ <dlg:fixedline dlg:id="FixedLineVertikal" dlg:tab-index="6" dlg:left="85" dlg:top="0" dlg:width="1" dlg:height="176" dlg:align="vertical"/>
+ </dlg:bulletinboard>
+</dlg:window> \ No newline at end of file
diff --git a/wizards/source/tutorials/dialog.xlb b/wizards/source/tutorials/dialog.xlb
new file mode 100644
index 000000000..e02b20688
--- /dev/null
+++ b/wizards/source/tutorials/dialog.xlb
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tutorials" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="TutorialsDialog"/>
+ <library:element library:name="TutorialOpenDialog"/>
+ <library:element library:name="TutorialCloseDialog"/>
+</library:library> \ No newline at end of file
diff --git a/wizards/source/tutorials/script.xlb b/wizards/source/tutorials/script.xlb
new file mode 100644
index 000000000..30280c6b1
--- /dev/null
+++ b/wizards/source/tutorials/script.xlb
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE library:library PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "library.dtd">
+<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Tutorials" library:readonly="false" library:passwordprotected="false">
+ <library:element library:name="Functions"/>
+ <library:element library:name="TutorialCreator"/>
+ <library:element library:name="TutorialOpen"/>
+ <library:element library:name="RoadMap"/>
+ <library:element library:name="ShowInfoDialog"/>
+ <library:element library:name="TutorialClose"/>
+</library:library> \ No newline at end of file