summaryrefslogtreecommitdiff
path: root/wizards/source/importwizard/Main.xba
diff options
context:
space:
mode:
Diffstat (limited to 'wizards/source/importwizard/Main.xba')
-rw-r--r--wizards/source/importwizard/Main.xba32
1 files changed, 19 insertions, 13 deletions
diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba
index 6d2c93b29aec..7ba8e8b25ba7 100644
--- a/wizards/source/importwizard/Main.xba
+++ b/wizards/source/importwizard/Main.xba
@@ -5,14 +5,21 @@
' ***** BASIC *****
' Todo: Problematik der VBA-Makros, die angeblich nicht mit abgespeichert werden koennen.
' Evt. Erkennen der Arbeitsverzeichnisse von MS Office
-' Filternamen fuer Ziel-XML-Dokumente und deren Extensionen feststellen (auch fuer StarMath)
-' Extension fuer XML-Vorlagen klaeren
Public HeaderPreviews(4) as Object
Public ImportDialog as Object
Public ImportDialogArea as Object
+Public bSetFonts as Boolean
+' If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is
+' set to False
+Public bCallCancelMsg as Boolean
-Sub Main
+Sub Main()
BasicLibraries.LoadLibrary("Tools")
+ bSetFonts = False
+ If bSetFonts Then
+ BasicLibraries.LoadLibrary("Translater")
+ GetFontNames()
+ End If
sCRLF = CHR(10) & CHR(13)
oUcb = createUnoService("com.sun.star.ucb.SimpleFileAccess")
If Not bDebugWizard Then
@@ -30,7 +37,7 @@ Sub Main
FillStep_Welcome()
RepaintHeaderPreview()
SetStates()
- ImportDialogArea.SetVisible(True)
+ ImportDialogArea.SetVisible(True) 'Execute()
ImportDialog.cbGoOn.DefaultButton = True
Exit Sub
RTError:
@@ -53,6 +60,7 @@ Dim iCurStep as Integer
If Not bDebugWizard Then
On Error Goto RTError
End If
+ bCallCancelMsg = False
iCurStep = ImportDialog.Step
Select Case iCurStep
Case 1
@@ -90,6 +98,7 @@ Dim iCurStep as Integer
If Not bDebugWizard Then
On Error Goto RTError
End If
+ bCallCancelMsg = False
iCurStep = ImportDialog.Step
Select Case iCurStep
Case 4
@@ -118,13 +127,15 @@ End Sub
Sub CancelButton
-' If ImportDialog.Step = 4 Then
-' Call CancelButtonPressed()
-' Else
+ If bCallCancelMsg Then
+ ' Conversion is already running
+ ImportDialog.cbCancel.Enabled = False
+ bCancelTask = True
+ Else
ImportDialogArea.EndExecute
ImportDialogArea.Dispose()
End
-' End If
+ End If
End Sub
@@ -140,11 +151,6 @@ Sub CancelTask()
End Sub
-'Sub CancelButtonPressed()
-' ImportDialog.cbCancel.Enabled = False
-' bCancelTask = True
-'End Sub
-
Sub TemplateDirSearchDialog()
CallDirSearchDialog(ImportDialog.TemplateImportPath)