Kaydet (Commit) 7364f174 authored tarafından Matthias Seidel's avatar Matthias Seidel

Cleaning up Euro Converter wizard, moving graphics from bmp to png

üst cb4c0a6a
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<!--***********************************************************
*
*
* 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
......@@ -9,16 +9,16 @@
* 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
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*
***********************************************************-->
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="AutoPilotRun" script:language="StarBasic">Option Explicit
......@@ -54,7 +54,7 @@ Dim oFactoryKey as Object
InitializeConverter(oLocale, 2)
ToggleGoOnButton()
oFactoryKey = GetRegistryKeyContent(&quot;org.openoffice.Setup/Office/Factories&quot;)
DialogModel.chkTextDocuments.Enabled = oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;)
DialogModel.chkTextDocuments.Enabled = oFactoryKey.hasbyName(&quot;com.sun.star.text.TextDocument&quot;)
DialogModel.cmdGoOn.DefaultButton = True
DialogModel.lstCurrencies.TabIndex = 12
DialogConvert.GetControl(&quot;optWholeDir&quot;).SetFocus()
......@@ -147,7 +147,7 @@ Dim sExtension as String
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;
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
......@@ -246,7 +246,7 @@ Dim TextBoxText as String
TextBoxText = TextBoxText &amp; DeleteStr(sInclusiveSubDir,&quot;~&quot;) &amp; chr(13)
End If
Else
TextBoxText = sSOURCEFILE &amp; &quot; &quot; &amp; ConvertFromUrl(Source) &amp; chr(13)
TextBoxText = sSOURCEFILE &amp; &quot; &quot; &amp; ConvertFromUrl(Source) &amp; chr(13)
End If
TextBoxText = TextBoxText &amp; sTARGETDIR &amp; &quot; &quot; &amp; ConvertFromUrl(TargetDir) &amp; chr(13)
If DialogModel.chkProtect.State = 1 Then
......@@ -254,8 +254,8 @@ Dim TextBoxText as String
End If
DialogModel.txtConfig.Text = TextBoxText
ToggleProgressStep()
DialogModel.cmdGoOn.Enabled = False
InitializeThirdStep() = True
DialogModel.cmdGoOn.Enabled = False
InitializeThirdStep() = True
Else
InitializeThirdStep() = False
End If
......@@ -276,7 +276,7 @@ Dim LocStep as Integer
DialogConvert.GetControl(&quot;lstCurrencies&quot;).Visible = Not bMakeVisible
DialogConvert.GetControl(&quot;cmdBack&quot;).Visible = bMakeVisible
DialogConvert.GetControl(&quot;cmdGoOn&quot;).Visible = bMakeVisible
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
End Sub
......@@ -330,8 +330,8 @@ Dim sNoDirMessage as String
If DialogModel.chkTextDocuments.State = 1 Then
If (Instr(1, sLocMimeType, &quot;text&quot;) = 0) And (Instr(1, sLocMimeType, &quot;calc&quot;) = 0) Then
Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE)
bIsValid = False
End If
bIsValid = False
End If
Else
If (Instr(1, sLocMimeType, &quot;spreadsheet&quot;) = 0) And (Instr(1, sLocMimeType, &quot;calc&quot;)) = 0 Then
Msgbox(sMsgFileInvalid, 48, sMsgDLGTITLE)
......@@ -350,7 +350,7 @@ Dim sNoDirMessage as String
End If
End if
Else
Msgbox(HeaderString &amp; &quot; &apos;&quot; &amp; ConvertFromUrl(sPath) &amp; &quot;&apos; &quot; &amp; sMsgNOTTHERE,48, sMsgDLGTITLE)
Msgbox(HeaderString &amp; &quot; &apos;&quot; &amp; ConvertFromUrl(sPath) &amp; &quot;&apos; &quot; &amp; sMsgNOTTHERE,48, sMsgDLGTITLE)
End If
If bIsValid Then
AssignFileName() = sPath
......@@ -361,7 +361,7 @@ End Function
Sub ToggleGoOnButton()
Dim bDoEnable as Boolean
Dim bDoEnable as Boolean
Dim sLocMimeType as String
Dim sPath as String
bDoEnable = Ubound(DialogModel.lstCurrencies.SelectedItems()) &gt; -1
......@@ -376,7 +376,7 @@ End Sub
Sub CallFolderPicker()
GetFolderName(DialogModel.txtTarget)
ToggleGoOnButton()
ToggleGoOnButton()
End Sub
......@@ -385,7 +385,7 @@ Sub CallFilePicker()
Dim oMasterKey as Object
Dim oTypes() as Object
Dim oUIKey() as Object
oMasterKey = GetRegistryKeyContent(&quot;org.openoffice.TypeDetection.Types&quot;)
oTypes() = oMasterKey.Types
oUIKey = GetRegistryKeyContent(&quot;org.openoffice.Office.UI/FilterClassification/LocalFilters&quot;)
......@@ -406,7 +406,7 @@ Sub CallFilePicker()
Else
ReDim FilterNames(5,1) as String
End If
FilterNames(0,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc&quot;).UIName
FilterNames(0,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc&quot;).UIName
Filternames(0,1) = &quot;*.sxc&quot;
FilterNames(1,0) = oTypes.GetByName(&quot;calc_StarOffice_XML_Calc_Template&quot;).UIName
Filternames(1,1) = &quot;*.stc&quot;
......@@ -414,9 +414,9 @@ Sub CallFilePicker()
FilterNames(2,1) = &quot;*.sdc&quot;
FilterNames(3,0) = oUIKey.Classes.GetByName(&quot;sc345templ&quot;).DisplayName
Filternames(3,1) = &quot;*.vor&quot;
FilterNames(4,0) = oTypes.GetByName(&quot;calc8&quot;).UIName
FilterNames(4,0) = oTypes.GetByName(&quot;calc8&quot;).UIName
Filternames(4,1) = &quot;*.ods&quot;
FilterNames(5,0) = oTypes.GetByName(&quot;calc8_template&quot;).UIName
FilterNames(5,0) = oTypes.GetByName(&quot;calc8_template&quot;).UIName
Filternames(5,1) = &quot;*.ots&quot;
GetFileName(DialogModel.txtSource, Filternames())
Else
......@@ -428,7 +428,7 @@ End Sub
Sub PreviousStep()
DialogModel.Step = 2
DialogModel.cmdGoOn.Label = sGOON
DialogModel.cmdGoOn.Label = sGOON
DialogModel.cmdCancel.Label = sCANCEL
End Sub
</script:module>
......@@ -77,7 +77,7 @@
<dlg:text dlg:id="lblRetrieval" dlg:tab-index="24" dlg:left="9" dlg:top="119" dlg:width="216" dlg:height="8" dlg:page="3" dlg:value="lblRetrieval"/>
<dlg:text dlg:id="lblConfig" dlg:tab-index="25" dlg:left="6" dlg:top="39" dlg:width="94" dlg:height="8" dlg:page="3" dlg:value="lblConfig"/>
<dlg:text dlg:id="lblCurDocument" dlg:tab-index="26" dlg:left="16" dlg:top="141" dlg:width="208" dlg:height="8" dlg:page="3"/>
<dlg:img dlg:id="imgPreview" dlg:tab-index="27" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:src="file:///D:/office630np/share/template/german/wizard/bitmap/euro_2.bmp"/>
<dlg:img dlg:id="imgPreview" dlg:tab-index="27" dlg:left="6" dlg:top="6" dlg:width="258" dlg:height="26" dlg:src="file:///D:/office630np/share/template/german/wizard/bitmap/euro_2.png"/>
<dlg:fixedline dlg:id="hlnSelection" dlg:tab-index="28" dlg:left="7" dlg:top="72" dlg:width="258" dlg:height="8" dlg:page="1" dlg:value="hlnSelection"/>
<dlg:fixedline dlg:id="hlnExtent" dlg:tab-index="29" 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="30" dlg:left="6" dlg:top="108" dlg:width="258" dlg:height="8" dlg:page="3" dlg:value="hlnProgress"/>
......
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE script:module PUBLIC "-//OpenOffice.org//DTD OfficeDocument 1.0//EN" "module.dtd">
<!--***********************************************************
*
*
* 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
......@@ -9,21 +9,19 @@
* 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
*
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
*
***********************************************************-->
<script:module xmlns:script="http://openoffice.org/2000/script" script:name="Init" script:language="StarBasic">Option Explicit
REM ***** BASIC *****
REM ***** BASIC *****
Public Const SBRANGEUBOUND = 20
Public StyleRangeAssignmentList(SBRANGEUBOUND)as String
......@@ -217,13 +215,13 @@ Dim LocWorkPath as String
sCurrSLOVAK = GetResText(1515)
sCurrUNKNOWN = GetResText(1516)
sCurrSYSUNKNOWN = GetResText(1517)
.cmdCancel.Label = sCANCEL
.cmdHelp.Label = sHELP
.cmdBack.Label = GetResText(1002)
.cmdGoOn.Label = sGOON
.lblHint.Label = GetResText(1004)
.cmdCancel.Label = sCANCEL
.cmdHelp.Label = sHELP
.cmdBack.Label = GetResText(1002)
.cmdGoOn.Label = sGOON
.lblHint.Label = GetResText(1004)
.lblCurrencies.Label = GetResText(1006)
.cmdBack.Enabled = False
.cmdBack.Enabled = False
If .Step = 1 Then
.chkComplete.Label = GetResText(1100)
.hlnSelection.Label = GetResText(1101)
......@@ -236,10 +234,10 @@ Dim LocWorkPath as String
Else
.lblProgress.Label = sStsPROGRESS
.hlnExtent.Label = GetResText(1200)
.optSingleFile.Label = GetResText(1201)
.optSingleFile.Label = GetResText(1201)
.optWholeDir.Label = GetResText(1202)
.chkProtect.Label = GetResText(1207)
.chkTextDocuments.Label = GetResText(1210)
.chkTextDocuments.Label = GetResText(1210)
sSOURCEFILE = GetResText(1203)
sSOURCEDIR = GetResText(1204)
......@@ -247,8 +245,8 @@ Dim LocWorkPath as String
sInclusiveSubDir = GetResText(1205)
.chkRecursive.Label = sInclusiveSubDir
sTARGETDIR = GetResText(1206)
.lblTarget.Label = STARGETDIR
.lblTarget.Label = STARGETDIR
LocWorkPath = GetPathSettings(&quot;Work&quot;)
If Not oUcb.Exists(LocWorkPath) Then
ShowNoOfficePathError()
......@@ -256,7 +254,7 @@ Dim LocWorkPath as String
End If
.txtSource.Text = ConvertfromUrl(LocWorkPath)
SubstDir = .txtSource.Text
.txtTarget.Text = .txtSource.Text
.hlnProgress.Label = GetResText(1600)
......@@ -290,7 +288,7 @@ Sub InitializeLanguages()
LangIDValue(3,0,0) = &quot;es&quot;
LangIDValue(3,0,1) = &quot;&quot;
LangIDValue(3,0,2) = &quot;-40A&quot;
&apos;Spanish modern
LangIDValue(3,1,0) = &quot;es&quot;
LangIDValue(3,1,1) = &quot;&quot;
......@@ -333,7 +331,7 @@ Sub InitializeLanguages()
LangIDValue(8,0,0) = &quot;fr&quot;
LangIDValue(8,0,1) = &quot;LU&quot;
LangIDValue(8,0,2) = &quot;-140C&quot;
LangIDValue(8,1,0) = &quot;de&quot;
LangIDValue(8,1,1) = &quot;LU&quot;
LangIDValue(8,1,2) = &quot;-1007&quot;
......@@ -544,7 +542,7 @@ Sub InitializeControls()
EnableStep2DialogControls(True)
End If
End If
End Sub
End Sub
Sub InitializeConverter(oLocale, iDialogPage as Integer)
......@@ -558,7 +556,7 @@ Dim Isthere as Boolean
If sDocType = &quot;sCalc&quot; Then
bDocHasProtectedSheets = CheckSheetProtection(oSheets)
End If
oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
oStatusline = ThisComponent.GetCurrentController.GetFrame.CreateStatusIndicator()
End If
DialogConvert = LoadDialog(&quot;Euro&quot;, &quot;DlgConvert&quot;)
DialogModel = DialogConvert.Model
......@@ -575,9 +573,9 @@ Dim Isthere as Boolean
Stop
End If
FillUpCurrencyListbox()
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.bmp&quot;
DialogModel.imgPreview.ImageUrl = BitmapDir &amp; &quot;euro_&quot; &amp; DialogModel.Step &amp; &quot;.png&quot;
DialogConvert.Title = sMsgDLGTITLE
DialogModel.cmdGoOn.DefaultButton = True
DialogModel.cmdGoOn.DefaultButton = True
If iDialogPage = 1 Then
ToggleWindow(True)
End If
......@@ -592,7 +590,7 @@ Sub InitializeCurrencyValues(CurrIndex)
CurrSymbolList(1) = CurrValue(CurrIndex,4)
CurrSymbolList(2) = CurrValue(CurrIndex,5)
End If
End Sub
End Sub
Function InitializeLocales(oLocale) as Boolean
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment