summaryrefslogtreecommitdiff
path: root/wizards/source/euro
diff options
context:
space:
mode:
authorBehrend Cornelius <bc@openoffice.org>2001-11-12 16:33:21 +0000
committerBehrend Cornelius <bc@openoffice.org>2001-11-12 16:33:21 +0000
commit980ef79c70d22761f6c3497df1243bb779ab0fe9 (patch)
treeb4cd238e6d0d80ffc8f4e900d278aa03c6854858 /wizards/source/euro
parentf3c91eaec4482b75277fcbf9f0d932b31e8570e6 (diff)
#94501# Back Button now enabled on 2nd step. Statusline now at original frame
Diffstat (limited to 'wizards/source/euro')
-rw-r--r--wizards/source/euro/AutoPilotRun.xba54
-rw-r--r--wizards/source/euro/Common.xba7
-rw-r--r--wizards/source/euro/DlgConvert.xdl6
-rw-r--r--wizards/source/euro/Init.xba3
4 files changed, 39 insertions, 31 deletions
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba
index bda48c5eebc4..f4199c66d913 100644
--- a/wizards/source/euro/AutoPilotRun.xba
+++ b/wizards/source/euro/AutoPilotRun.xba
@@ -66,8 +66,9 @@ Dim FilesList()
&apos; ChangeToNextProgressStep()
sTotDocCount = CStr(TotDocCount)
OpenProperties(0).Name = &quot;Hidden&quot;
- OpenProperties(0).Value = True
+ OpenProperties(0).Value = False
OpenProperties(1).Name = &quot;AsTemplate&quot;
+
For DocIndex = 0 To TotDocCount - 1
If InitializeDocument(FilesList()) Then
If StoreDocument() Then
@@ -79,6 +80,7 @@ Dim FilesList()
End If
End If
Next DocIndex
+ DialogModel.cmdBack.Enabled = True
DialogModel.cmdGoOn.Enabled = True
DialogModel.cmdGoOn.Label = sReady
DialogModel.cmdCancel.Label = sEnd
@@ -101,29 +103,29 @@ Dim sExtension as String
SourceFile = Source
TargetFile = TargetDir &amp; &quot;/&quot; &amp; FileNameoutofPath(SourceFile, &quot;/&quot;)
End If
-
- If Not oUcb.Exists(TargetDir) Then
- oUcb.CreateFolder(TargetDir)
- End If
- sExtension = GetFileNameExtension(SourceFile, &quot;/&quot;)
- OpenProperties(1).Value = False
- Select Case sExtension
- Case &quot;vor&quot;, &quot;stc&quot;, &quot;stw&quot;, &quot;sti&quot;, &quot;std&quot;
- OpenProperties(1).Value = False
- Case Else
- OpenProperties(1).Value = True
- End Select
- oDocument = OpenDocument(SourceFile, OpenProperties(), bDisposable)
- If (oDocument.IsReadOnly) AND (UCase(SourceFile) = UCase(TargetFile)) Then
- bIsReadOnly = True
- Msgbox(sMsgDOCISREADONLY, 16, GetProductName())
+ If CreateFolder(TargetDir) Then
+ sExtension = GetFileNameExtension(SourceFile, &quot;/&quot;)
+ OpenProperties(1).Value = False
+ Select Case sExtension
+ Case &quot;vor&quot;, &quot;stc&quot;, &quot;stw&quot;, &quot;sti&quot;, &quot;std&quot;
+ OpenProperties(1).Value = False
+ Case Else
+ OpenProperties(1).Value = False
+ End Select
+ oDocument = OpenDocument(SourceFile, OpenProperties(), bDisposable)
+ If (oDocument.IsReadOnly) AND (UCase(SourceFile) = UCase(TargetFile)) Then
+ bIsReadOnly = True
+ Msgbox(sMsgDOCISREADONLY, 16, GetProductName())
+ Else
+ bIsReadOnly = False
+ RetrieveDocumentObjects()
+ sViewPath = CutPathView(SourceFile, 60)
+ DialogModel.lblCurDocument.Label = Str(DocIndex+1) &amp; &quot;/&quot; &amp; sTotDocCount &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
+ End If
+ InitializeDocument() = Not bIsReadOnly
Else
- bIsReadOnly = False
- RetrieveDocumentObjects()
- sViewPath = CutPathView(SourceFile, 60)
- DialogModel.lblCurDocument.Label = Str(DocIndex+1) &amp; &quot;/&quot; &amp; sTotDocCount &amp; &quot; (&quot; &amp; sViewPath &amp; &quot;)&quot;
+ InitializeDocument() = False
End If
- InitializeDocument() = Not bIsReadOnly
Else
InitializeDocument() = False
End If
@@ -138,7 +140,6 @@ End Function
Sub ChangeToNextProgressStep()
DialogModel.lblCurProgress.FontWeight = com.sun.star.awt.FontWeight.NORMAL
-&apos; DialogConvert.GetControl(&quot;lblCurProgress&quot;).Visible = False
DialogConvert.GetControl(&quot;lblCurProgress&quot;).Visible = True
End Sub
@@ -442,4 +443,11 @@ Sub CallFilePicker()
GetFolderName(DialogModel.txtSource)
End If
ToggleGoOnButton()
+End Sub
+
+
+Sub PreviousStep()
+ DialogModel.Step = 2
+ DialogModel.cmdGoOn.Label = sGOON
+ DialogModel.cmdCancel.Label = sCANCEL
End Sub</script:module> \ No newline at end of file
diff --git a/wizards/source/euro/Common.xba b/wizards/source/euro/Common.xba
index 2bc1fbc5f3b6..26d0da7c0e5f 100644
--- a/wizards/source/euro/Common.xba
+++ b/wizards/source/euro/Common.xba
@@ -7,14 +7,12 @@ Public DialogPassword as Object
Public PasswordModel as Object
Sub RetrieveDocumentObjects()
-
CurMimeType = GetDocumentType(oDocument)
If Instr(1, CurMimeType, &quot;calc&quot;) &lt;&gt; 0 Then
oSheets = oDocument.Sheets
oSheet = oDocument.Sheets.GetbyIndex(0)
oAddressRanges = oDocument.createInstance(&quot;com.sun.star.sheet.SheetCellRanges&quot;)
End If
- oStatusline = oDocument.GetCurrentController.GetFrame.CreateStatusIndicator
&apos; Retrieve the indices for the cellformatations
oFormats = oDocument.NumberFormats
End Sub
@@ -67,9 +65,9 @@ Function ConvertDocument()
ConvertTextFields()
oStatusline.SetValue(80)
ConvertWriterTables()
- End If
+ End If
oStatusline.End
- On Local Error Goto 0
+ On Local Error Goto 0
End Function
@@ -182,7 +180,6 @@ End Function
Sub StartConversion()
GoOn = True
-&apos; ToggleWindow(False)
Select Case DialogModel.Step
Case 1
If DialogModel.chkComplete.State = 1 Then
diff --git a/wizards/source/euro/DlgConvert.xdl b/wizards/source/euro/DlgConvert.xdl
index 9e768d74ec36..e28f8535f7e6 100644
--- a/wizards/source/euro/DlgConvert.xdl
+++ b/wizards/source/euro/DlgConvert.xdl
@@ -1,12 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE dlg:window PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "dialog.dtd">
-<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogConvert" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="1" dlg:help-url="HID:34660">
+<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DialogConvert" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="2" dlg:help-url="HID:34660">
<dlg:bulletinboard>
<dlg:button dlg:id="cmdCancel" dlg:tab-index="0" dlg:left="6" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34673" dlg:value="cmdCancel">
<script:event script:event-name="on-performaction" script:location="application" script:macro-name="Euro.Common.CancelTask" script:language="StarBasic"/>
</dlg:button>
<dlg:button dlg:id="cmdHelp" dlg:tab-index="1" dlg:left="63" dlg:top="190" dlg:width="53" dlg:height="14" dlg:tag="34674" dlg:value="cmdHelp" dlg:button-type="help"/>
- <dlg:button dlg:id="cmdBack" dlg:tab-index="2" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34675" dlg:value="cmdBack"/>
+ <dlg:button dlg:id="cmdBack" dlg:tab-index="2" dlg:left="155" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34675" dlg:value="cmdBack">
+ <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Euro.AutoPilotRun.PreviousStep" script:language="StarBasic"/>
+ </dlg:button>
<dlg:button dlg:id="cmdGoOn" dlg:tab-index="3" dlg:left="211" dlg:top="190" dlg:width="53" dlg:height="14" dlg:help-url="HID:34676" dlg:value="cmdGoOn">
<script:event script:event-name="on-performaction" script:location="application" script:macro-name="Euro.Common.StartConversion" script:language="StarBasic"/>
</dlg:button>
diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba
index 07078776a251..80e7d8145091 100644
--- a/wizards/source/euro/Init.xba
+++ b/wizards/source/euro/Init.xba
@@ -467,7 +467,8 @@ Dim Isthere as Boolean
&apos; bMacroStopped = False
bRangeListDefined = False
PWIndex = -1
- sDocType = GetDocumentType(StarDesktop.ActiveFrame.Controller.Model)
+ sDocType = GetDocumentType(ThisComponent)
+ oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
If sDocType = &quot;sCalc&quot; Then
bDocHasProtectedSheets = CheckSheetProtection(oSheets)
End If