summaryrefslogtreecommitdiff
path: root/wizards/source/tutorials/Functions.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/tutorials/Functions.xba')
-rw-r--r--wizards/source/tutorials/Functions.xba22
1 files changed, 10 insertions, 12 deletions
diff --git a/wizards/source/tutorials/Functions.xba b/wizards/source/tutorials/Functions.xba
index 55420d860a5b..6524ec19338c 100644
--- a/wizards/source/tutorials/Functions.xba
+++ b/wizards/source/tutorials/Functions.xba
@@ -39,8 +39,8 @@ Sub LoadTutorialDialog(exampleToUse, documentTYP)
SetTutorialDocumentPosSize()
- documentInfo = ThisComponent.getDocumentInfo()
- myDialog.Title = "Tutorials - " & documentInfo.Title
+ documentProps = ThisComponent.getDocumentProperties()
+ myDialog.Title = "Tutorials - " & documentProps.Title
oTextField = myDialog.GetControl("myTextField")
oTextField.setVisible(False)
@@ -143,18 +143,16 @@ Sub Init
End Sub
Sub InitStep
- userFieldName = ThisComponent.getDocumentInfo.getUserFieldName(0)
- ResultString = InStr (userFieldName, "CurrentStep:")
- If ResultString <> 0 Then
- TutorStep = Val(ThisComponent.getDocumentInfo.getUserFieldValue(0))
- Else
- ThisComponent.getDocumentInfo.setUserFieldName(0, "CurrentStep:")
- ThisComponent.getDocumentInfo.setUserFieldValue(0, TutorStep)
- End If
+ udProps = ThisComponent.DocumentProperties.UserDefinedProperties
+ If udProps.PropertySetInfo.hasPropertyByName("CurrentStep") Then
+ TutorStep = udProps.CurrentStep
+ Else
+ udProps.addProperty("CurrentStep", 0, TutorStep)
+ End If
End Sub
Sub setStep
- ThisComponent.getDocumentInfo.setUserFieldValue(0, TutorStep)
+ ThisComponent.DocumentProperties.UserDefinedProperties.CurrentStep = TutorStep
End Sub
Sub InitAction()
@@ -367,4 +365,4 @@ Sub ExitTutorial()
msgBox "Error! Cannot close document."
End If
End Sub
-</script:module> \ No newline at end of file
+</script:module>