diff options
author | Behrend Cornelius <bc@openoffice.org> | 2002-07-11 14:36:57 +0000 |
---|---|---|
committer | Behrend Cornelius <bc@openoffice.org> | 2002-07-11 14:36:57 +0000 |
commit | 93cc5aaab469e052fa4a3fa0b3c77aed03c863e5 (patch) | |
tree | 145bc0bc9535088f06abc5d7483263089c26574f /wizards/source | |
parent | c6f5661fb2a6d36d86ac69d8f1cb0b45913c00c3 (diff) |
#95686# Progressbar now in Dialog inserted
Diffstat (limited to 'wizards/source')
-rw-r--r-- | wizards/source/euro/AutoPilotRun.xba | 2 | ||||
-rw-r--r-- | wizards/source/euro/Common.xba | 27 | ||||
-rw-r--r-- | wizards/source/euro/ConvertRun.xba | 8 | ||||
-rw-r--r-- | wizards/source/euro/DlgConvert.xdl | 6 | ||||
-rw-r--r-- | wizards/source/euro/DlgPassword.xdl | 2 | ||||
-rw-r--r-- | wizards/source/euro/Hard.xba | 8 | ||||
-rw-r--r-- | wizards/source/euro/Init.xba | 97 | ||||
-rw-r--r-- | wizards/source/euro/Protect.xba | 4 | ||||
-rw-r--r-- | wizards/source/euro/Soft.xba | 2 | ||||
-rw-r--r-- | wizards/source/euro/Writer.xba | 2 | ||||
-rw-r--r-- | wizards/source/euro/dialog.xlb | 4 | ||||
-rw-r--r-- | wizards/source/euro/script.xlb | 4 |
12 files changed, 98 insertions, 68 deletions
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba index f242aa9e6..c5bdc455d 100644 --- a/wizards/source/euro/AutoPilotRun.xba +++ b/wizards/source/euro/AutoPilotRun.xba @@ -36,7 +36,7 @@ Dim i As Integer ToggleGoOnButton() DialogModel.cmdGoOn.DefaultButton = True DialogConvert.GetControl("optWholeDir").SetFocus() - DialogConvert.Execute + DialogConvert.Execute() DialogConvert.Dispose() End If End Sub diff --git a/wizards/source/euro/Common.xba b/wizards/source/euro/Common.xba index 51e3f1d70..e82ed658e 100644 --- a/wizards/source/euro/Common.xba +++ b/wizards/source/euro/Common.xba @@ -61,12 +61,12 @@ Function ConvertDocument() bRangeListDefined = False End If Else - oStatusline.SetValue(10) + DialogModel.ProgressBar.ProgressValue = 10 ' oStatusline.SetValue(10) ConvertTextFields() - oStatusline.SetValue(80) + DialogModel.ProgressBar.ProgressValue = 80 ' oStatusline.SetValue(80) ConvertWriterTables() End If - oStatusline.End + EndStatusLine() On Local Error Goto 0 End Function @@ -201,7 +201,11 @@ End Sub Sub IncreaseStatusValue(AddStatusValue as Integer) StatusValue = Int(StatusValue + AddStatusValue) - oStatusline.SetValue(StatusValue) + If DialogModel.Step = 3 Then + DialogModel.ProgressBar.ProgressValue = StatusValue + Else + oStatusline.SetValue(StatusValue) + End If End Sub @@ -255,6 +259,19 @@ End Sub Sub InitializeProgressbar() CurCellCount = 0 - oStatusline.Start(sStsPROGRESS,100) '"Konvertierungsfortschritt:" + If Not IsNull(oStatusLine) Then + oStatusline.Start(sStsPROGRESS, 100) + Else + DialogModel.ProgressBar.ProgressValue = 0 + End If StatusValue = 0 +End Sub + + +Sub EndStatusLine() + If Not IsNull(oStatusLine) Then + oStatusline.End + Else + DialogModel.ProgressBar.ProgressValue = 100 + End If End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/euro/ConvertRun.xba b/wizards/source/euro/ConvertRun.xba index 57ffffcd1..0582b0c6f 100644 --- a/wizards/source/euro/ConvertRun.xba +++ b/wizards/source/euro/ConvertRun.xba @@ -306,4 +306,12 @@ Sub SetOptionValuestoNull() .optSelRange.State = 0 End With End Sub + + + +Sub SetStatusLineText(sStsREPROTECT as String) + If Not IsNull(oStatusLine) Then + oStatusline.SetText(sStsREPROTECT) + End If +End Sub </script:module>
\ No newline at end of file diff --git a/wizards/source/euro/DlgConvert.xdl b/wizards/source/euro/DlgConvert.xdl index f9727f06d..7add39c99 100644 --- a/wizards/source/euro/DlgConvert.xdl +++ b/wizards/source/euro/DlgConvert.xdl @@ -1,6 +1,6 @@ <?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="3" dlg:help-url="HID:34660" dlg:closeable="true" dlg:moveable="true"> <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"/> @@ -33,7 +33,7 @@ <dlg:checkbox dlg:id="chkComplete" dlg:tab-index="10" dlg:left="12" dlg:top="43" dlg:width="129" dlg:height="10" dlg:page="1" dlg:help-url="HID:34661" dlg:value="chkComplete" dlg:checked="true"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="Euro.ConvertRun.RetrieveEnableValue" script:language="StarBasic"/> </dlg:checkbox> - <dlg:text dlg:id="lblHint" dlg:tab-index="11" dlg:left="6" dlg:top="164" dlg:width="258" dlg:height="22" dlg:value="lblHint" dlg:multiline="true"/> + <dlg:text dlg:id="lblHint" dlg:tab-index="11" dlg:left="6" dlg:top="166" dlg:width="258" dlg:height="20" dlg:value="lblHint" dlg:multiline="true"/> <dlg:textfield dlg:id="txtTarget" dlg:tab-index="12" dlg:left="80" dlg:top="143" dlg:width="165" dlg:height="12" dlg:page="2" dlg:help-url="HID:34672"/> <dlg:button dlg:id="cmdCallTargetDialog" dlg:tab-index="13" dlg:left="249" dlg:top="142" dlg:width="15" dlg:height="14" dlg:page="2" dlg:help-url="HID:34678" dlg:value="..."> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Euro.AutoPilotRun.CallFolderPicker" script:language="StarBasic"/> @@ -71,5 +71,7 @@ <dlg:fixedline dlg:id="hlnExtent" dlg:tab-index="32" dlg:left="6" dlg:top="39" dlg:width="156" dlg:height="8" dlg:page="2" dlg:value="hlnExtent"/> <dlg:fixedline dlg:id="hlnProgress" dlg:tab-index="33" dlg:left="6" dlg:top="108" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="hlnProgress"/> <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="34" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="9" dlg:page="1"/> + <dlg:progressmeter dlg:id="ProgressBar" dlg:tab-index="35" dlg:left="85" dlg:top="152" dlg:width="179" dlg:height="10" dlg:page="3"/> + <dlg:text dlg:id="lblProgress" dlg:tab-index="36" dlg:left="6" dlg:top="153" dlg:width="79" dlg:height="8" dlg:page="3" dlg:value="lblProgress"/> </dlg:bulletinboard> </dlg:window>
\ No newline at end of file diff --git a/wizards/source/euro/DlgPassword.xdl b/wizards/source/euro/DlgPassword.xdl index 3a106a259..9b29dde0b 100644 --- a/wizards/source/euro/DlgPassword.xdl +++ b/wizards/source/euro/DlgPassword.xdl @@ -1,6 +1,6 @@ <?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="DlgPassword" dlg:title="DlgPassword" dlg:left="77" dlg:top="93" dlg:width="310" dlg:height="65"> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="DlgPassword" dlg:left="77" dlg:top="93" dlg:width="310" dlg:height="65" dlg:closeable="true" dlg:moveable="true" dlg:title="DlgPassword"> <dlg:bulletinboard> <dlg:button dlg:id="cmdGoOn" dlg:tab-index="0" dlg:left="251" dlg:top="6" dlg:width="53" dlg:height="14" dlg:help-url="HID:34690" dlg:value="cmdGoOn"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Euro.Protect.ReadPassword" script:language="StarBasic"/> diff --git a/wizards/source/euro/Hard.xba b/wizards/source/euro/Hard.xba index 0d99a26d4..b2e0d5d3c 100644 --- a/wizards/source/euro/Hard.xba +++ b/wizards/source/euro/Hard.xba @@ -14,7 +14,7 @@ Dim MaxIndex as Integer oDocument.CurrentController.Select(oSelRanges) If (DialogModel.optSheetRanges.State = 1) AND (DialogModel.chkComplete.State <> 1) Then ' Ist das Sheet Grundlage für die Bearbeitung? - oStatusline.SetText(sStsRELRANGES) '"Erfassung der relevanten Bereiche..." + SetStatusLineText(sStsRELRANGES) osheet = oDocument.CurrentController.GetActiveSheet oRanges = osheet.CellFormatRanges.createEnumeration() MaxIndex = AddSheetRanges(oRanges, MaxIndex, oSheet, False) @@ -26,7 +26,7 @@ Dim MaxIndex as Integer bRangeListDefined = True End If EnableStep1DialogControls(True, True, True) - oStatusline.SetText("") + SetStatusLineText("") End Sub @@ -45,14 +45,14 @@ Dim sStatustext as String Else sStatustext = ReplaceString(sStsRELSHEETRANGES,Str(i+1),"%1Number%1") sStatustext = ReplaceString(sStatusText,oSheets.Count,"%2TotPageCount%2") - oStatusline.SetText(sStatusText) + SetStatusLineText(sStatusText) End If oRanges = osheet.CellFormatRanges.createEnumeration MaxIndex = AddSheetRanges(oRanges, MaxIndex, oSheet, bAutopilot) Next i Else If Not bAutoPilot Then - oStatusline.SetText(sStsRELRANGES) '"Erfassung der relevanten Bereiche..." + SetStatusLineText(sStsRELRANGES) ' Die Ranges sind schon definiert For i = 0 To Ubound(RangeList()) If RangeList(i) <> "" Then diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba index c795933a5..b52ed371d 100644 --- a/wizards/source/euro/Init.xba +++ b/wizards/source/euro/Init.xba @@ -150,45 +150,6 @@ Sub InitializeResources() sHelp = GetResText(1001) sCANCEL = GetResText(1418) sEnd = GetResText(1000) - .cmdCancel.Label = sCANCEL - .cmdHelp.Label = sHELP - .cmdBack.Label = GetResText(1002) - .cmdGoOn.Label = sGOON - .lblHint.Label = GetResText(1004) - .lblCurrencies.Label = GetResText(1006) - If .Step = 1 Then - .chkComplete.Label = GetResText(1100) - .hlnSelection.Label = GetResText(1101) - .optCellTemplates.Label = GetResText(1102) - .optSheetRanges.Label = GetResText(1103) - .optDocRanges.Label = GetResText(1104) - .optSelRange.Label = GetResText(1105) - sCURRRANGES = GetResText(1108) - .lblSelection.Label = sCURRRANGES - Else - .hlnExtent.Label = GetResText(1200) - .optSingleFile.Label = GetResText(1201) '"Einzelnes StarOffice -Dokument"'GetResText(1201) - .optWholeDir.Label = GetResText(1202) - .chkProtect.Label = GetResText(1207) - .chkTextDocuments.Label = GetResText(1210) ' "Auch Feldbefehle und Tabellen in Textdokumenten konvertieren"' Todo: Dieses Model später am Control unsichtbar machen - - sSOURCEFILE = GetResText(1203) - sSOURCEDIR = GetResText(1204) - .lblSource.Label = sSOURCEDIR - sInclusiveSubDir = GetResText(1205) - .chkRecursive.Label = sInclusiveSubDir - sTARGETDIR = GetResText(1206) - .lblTarget.Label = STARGETDIR - .txtSource.Text = ConvertfromUrl(GetPathSettings("Work")) - SubstDir = .txtSource.Text - .txtTarget.Text = .txtSource.Text - .hlnProgress.Label = GetResText(1600) - .lblConfig.Label = GetResText(1603) - sPrgsRETRIEVAL = GetResText(1601) - sPrgsCONVERTING = GetResText(1602) - sPrgsUNPROTECT = GetResText(1604) - End If - .cmdBack.Enabled = False sPROTECT = GetResText(1005) sCONTINUE = GetResText(1007) sSELTEMPL = GetResText(1106) @@ -237,7 +198,47 @@ Sub InitializeResources() sCurrFINNISH = GetResText(1510) sCurrGREEK = GetResText(1511) sCurrUNKNOWN = GetResText(1511) - sCurrSYSUNKNOWN = GetResText(1512) + sCurrSYSUNKNOWN = GetResText(1512) + .cmdCancel.Label = sCANCEL + .cmdHelp.Label = sHELP + .cmdBack.Label = GetResText(1002) + .cmdGoOn.Label = sGOON + .lblHint.Label = GetResText(1004) + .lblCurrencies.Label = GetResText(1006) + .cmdBack.Enabled = False + If .Step = 1 Then + .chkComplete.Label = GetResText(1100) + .hlnSelection.Label = GetResText(1101) + .optCellTemplates.Label = GetResText(1102) + .optSheetRanges.Label = GetResText(1103) + .optDocRanges.Label = GetResText(1104) + .optSelRange.Label = GetResText(1105) + sCURRRANGES = GetResText(1108) + .lblSelection.Label = sCURRRANGES + Else + .lblProgress.Label = sStsPROGRESS + .hlnExtent.Label = GetResText(1200) + .optSingleFile.Label = GetResText(1201) '"Einzelnes StarOffice -Dokument"'GetResText(1201) + .optWholeDir.Label = GetResText(1202) + .chkProtect.Label = GetResText(1207) + .chkTextDocuments.Label = GetResText(1210) ' "Auch Feldbefehle und Tabellen in Textdokumenten konvertieren"' Todo: Dieses Model später am Control unsichtbar machen + + sSOURCEFILE = GetResText(1203) + sSOURCEDIR = GetResText(1204) + .lblSource.Label = sSOURCEDIR + sInclusiveSubDir = GetResText(1205) + .chkRecursive.Label = sInclusiveSubDir + sTARGETDIR = GetResText(1206) + .lblTarget.Label = STARGETDIR + .txtSource.Text = ConvertfromUrl(GetPathSettings("Work")) + SubstDir = .txtSource.Text + .txtTarget.Text = .txtSource.Text + .hlnProgress.Label = GetResText(1600) + .lblConfig.Label = GetResText(1603) + sPrgsRETRIEVAL = GetResText(1601) + sPrgsCONVERTING = GetResText(1602) + sPrgsUNPROTECT = GetResText(1604) + End If End With End Sub @@ -461,15 +462,17 @@ End Sub Sub InitializeConverter(oLocale, iDialogPage as Integer) Dim Isthere as Boolean - ToggleWindow(False) bCancelProtection = False ' bMacroStopped = False bRangeListDefined = False PWIndex = -1 - sDocType = GetDocumentType(ThisComponent) - oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator() - If sDocType = "sCalc" Then - bDocHasProtectedSheets = CheckSheetProtection(oSheets) + If iDialogPage = 1 Then + ToggleWindow(False) + sDocType = GetDocumentType(ThisComponent) + If sDocType = "sCalc" Then + bDocHasProtectedSheets = CheckSheetProtection(oSheets) + End If + oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator() End If DialogConvert = LoadDialog("Euro", "DlgConvert") DialogModel = DialogConvert.Model @@ -486,7 +489,9 @@ Dim Isthere as Boolean DialogModel.imgPreview.ImageUrl = BitmapDir & "euro_" & DialogModel.Step & ".bmp" DialogConvert.Title = sMsgDLGTITLE DialogModel.cmdGoOn.DefaultButton = True - ToggleWindow(True) + If iDialogPage = 1 Then + ToggleWindow(True) + End If End Sub diff --git a/wizards/source/euro/Protect.xba b/wizards/source/euro/Protect.xba index cc7013677..a1ae708ac 100644 --- a/wizards/source/euro/Protect.xba +++ b/wizards/source/euro/Protect.xba @@ -124,7 +124,7 @@ Dim ProtectList() as String Dim SheetName as String Dim SheetPassword as String If PWIndex > -1 Then - oStatusline.SetText(sStsREPROTECT) + SetStatusLineText(sStsREPROTECT) For i = 0 To PWIndex ProtectList() = ArrayOutOfString(UnProtectList(i),";") SheetName = ProtectList(0) @@ -138,7 +138,7 @@ Dim SheetPassword as String oProtectSheet.Protect(SheetPassWord) End If Next i - oStatusline.SetText("") + SetStatusLineText("") End If PWIndex = -1 ReDim UnProtectList() diff --git a/wizards/source/euro/Soft.xba b/wizards/source/euro/Soft.xba index aabf13352..77880ffb2 100644 --- a/wizards/source/euro/Soft.xba +++ b/wizards/source/euro/Soft.xba @@ -54,7 +54,7 @@ Dim CurStyleName as String Dim AssignString as String LastIndex = Ubound(StyleList()) StatusValue = 0 - oStatusLine.SetText(sStsRELRANGES) '"Erfassung der relevanten Bereiche..." + SetStatusLineText(sStsRELRANGES) For i = 0 To LastIndex CurStyleName = StyleList(i) n = PartStringInArray(StyleRangeAssignmentList(), CurStyleName, 0) diff --git a/wizards/source/euro/Writer.xba b/wizards/source/euro/Writer.xba index 79ec83562..27dc3a0ba 100644 --- a/wizards/source/euro/Writer.xba +++ b/wizards/source/euro/Writer.xba @@ -33,14 +33,12 @@ Dim oCell as Object End Sub - Sub ModifyObjectValuewithCurrFactor(oDocObject as Object) oDocObjectValue = oDocObject.Value oDocObject.Value = oDocObjectValue/CurrFactor End Sub - Sub ConvertTextFields() Dim oTextFields as Object Dim oTextField as Object diff --git a/wizards/source/euro/dialog.xlb b/wizards/source/euro/dialog.xlb index c461ce54f..296b542d5 100644 --- a/wizards/source/euro/dialog.xlb +++ b/wizards/source/euro/dialog.xlb @@ -1,6 +1,6 @@ <?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="Euro" library:readonly="true" library:passwordprotected="false"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Euro" library:readonly="false" library:passwordprotected="false"> <library:element library:name="DlgConvert"/> <library:element library:name="DlgPassword"/> -</library:library> +</library:library>
\ No newline at end of file diff --git a/wizards/source/euro/script.xlb b/wizards/source/euro/script.xlb index 1bc4927c2..02b3d34e9 100644 --- a/wizards/source/euro/script.xlb +++ b/wizards/source/euro/script.xlb @@ -1,6 +1,6 @@ <?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="Euro" library:readonly="true" library:passwordprotected="false"> +<library:library xmlns:library="http://openoffice.org/2000/library" library:name="Euro" library:readonly="false" library:passwordprotected="false"> <library:element library:name="ConvertRun"/> <library:element library:name="AutoPilotRun"/> <library:element library:name="Hard"/> @@ -9,4 +9,4 @@ <library:element library:name="Common"/> <library:element library:name="Writer"/> <library:element library:name="Protect"/> -</library:library> +</library:library>
\ No newline at end of file |