summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--wizards/source/euro/AutoPilotRun.xba115
-rw-r--r--wizards/source/euro/Common.xba29
-rw-r--r--wizards/source/euro/ConvertRun.xba5
-rw-r--r--wizards/source/euro/DlgConvert.xdl4
-rw-r--r--wizards/source/euro/Init.xba3
-rw-r--r--wizards/source/euro/dialog.xlb4
-rw-r--r--wizards/source/euro/script.xlb4
7 files changed, 47 insertions, 117 deletions
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba
index f4199c66d..2d56a31fd 100644
--- a/wizards/source/euro/AutoPilotRun.xba
+++ b/wizards/source/euro/AutoPilotRun.xba
@@ -42,6 +42,8 @@ End Sub
Sub ConvertDocuments()
Dim FilesList()
+Dim bDisposable as Boolean
+
If Source <> "" And TargetDir <> "" Then
If DialogModel.optSingleFile.State = 1 Then
SourceFile = Source
@@ -66,11 +68,11 @@ Dim FilesList()
' ChangeToNextProgressStep()
sTotDocCount = CStr(TotDocCount)
OpenProperties(0).Name = "Hidden"
- OpenProperties(0).Value = False
+ OpenProperties(0).Value = True
OpenProperties(1).Name = "AsTemplate"
-
+ OpenProperties(1).Value = False
For DocIndex = 0 To TotDocCount - 1
- If InitializeDocument(FilesList()) Then
+ If InitializeDocument(FilesList(), bDisposable) Then
If StoreDocument() Then
ConvertDocument()
oDocument.Store
@@ -88,7 +90,7 @@ Dim FilesList()
End Sub
-Function InitializeDocument(FilesList()) as Boolean
+Function InitializeDocument(FilesList(), bDisposable as Boolean) as Boolean
' The Autopilot is started from step No. 2
Dim sViewPath as String
Dim bIsReadOnly as Boolean
@@ -105,13 +107,6 @@ Dim sExtension as String
End If
If CreateFolder(TargetDir) Then
sExtension = GetFileNameExtension(SourceFile, "/")
- OpenProperties(1).Value = False
- Select Case sExtension
- Case "vor", "stc", "stw", "sti", "std"
- 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
@@ -199,12 +194,6 @@ Sub SwapExtent()
End Sub
-Sub HelperDialog()
-'Todo: The String "start" can be replaced by a HelpIndex
- StarDesktop.LoadComponentfromUrl("vnd.sun.star.help://" & sDocType & "/start", "_OFFICE_HELP", 64, NoArgs())
-End Sub
-
-
Sub InitializeThirdStep()
Dim TextBoxText as String
Source = AssignFileName(DialogModel.txtSource.Text, DialogModel.lblSource.Label, True)
@@ -361,83 +350,33 @@ End Sub
Sub CallFilePicker()
If DialogModel.optSingleFile.State = 1 Then
Dim oMasterKey as Object
- Dim oFilters() as Object
+ Dim oTypes() as Object
+ Dim oUIKey() as Object
oMasterKey = GetRegistryKeyContent("org.openoffice.Office.TypeDetection/")
- oFilters() = oMasterKey.Types
-
+ oTypes() = oMasterKey.Types
+ oUIKey = GetRegistryKeyContent("org.openoffice.Office.UI/FilterClassification/LocalFilters")
If DialogModel.chkTextDocuments.State = 1 Then
- Dim FilterNames(21,1) as String
-
- FilterNames(9,0) = oFilters.GetByName("writer_StarOffice_XML_Writer").UIName
- FilterNames(9,1) = "*.sxw"
-
- FilterNames(10,0) = oFilters.GetByName("writer_StarOffice_XML_Writer_Template").UIName
- FilterNames(10,1) = "*.vor"
-
- FilterNames(11,0) = oFilters.GetByName("writer_StarWriter_10").UIName
- FilterNames(11,1) = "*.sdw"
-
- FilterNames(12,0) = oFilters.GetByName("writer_StarWriter_30").UIName
- FilterNames(12,1) = "*.sdw"
-
- FilterNames(13,0) = oFilters.GetByName("writer_StarWriter_30_VorlageTemplate").UIName
- FilterNames(13,1) = "*.vor"
-
- FilterNames(14,0) = oFilters.GetByName("writer_StarWriter_40").UIName
- FilterNames(14,1) = "*.sdw"
-
- FilterNames(15,0) = oFilters.GetByName("writer_StarWriter_40_VorlageTemplate").UIName
- FilterNames(15,1) = "*.vor"
-
- FilterNames(16,0) = oFilters.GetByName("writer_StarWriter_50").UIName
- FilterNames(16,1) = "*.sdw"
-
- FilterNames(17,0) = oFilters.GetByName("writer_StarWriter_50_VorlageTemplate").UIName
- FilterNames(17,1) = "*.vor"
-
- FilterNames(18,0) = oFilters.GetByName("writer_web_StarOffice_XML_Writer_Web_Template").UIName
- FilterNames(18,1) = "*.stw"
-
- FilterNames(19,0) = oFilters.GetByName("writer_web_StarWriterWeb_40_VorlageTemplate").UIName
- FilterNames(19,1) = "*.vor"
-
- FilterNames(20,0) = oFilters.GetByName("writer_web_StarWriterWeb_50_VorlageTemplate").UIName
- FilterNames(20,1) = "*.vor"
-
- FilterNames(21,0) = oFilters.GetByName("writer_web_HTML").UIName
- FilterNames(21,1) = "*.HTML"
-
+ Dim FilterNames(7,1) as String
+ FilterNames(4,0) = oTypes.GetByName("writer_StarOffice_XML_Writer").UIName
+ FilterNames(4,1) = "*.sxw"
+ FilterNames(5,0) = oTypes.GetByName("writer_StarOffice_XML_Writer_Template").UIName
+ FilterNames(5,1) = "*.stw"
+ FilterNames(6,0) = oUIKey.Classes.GetByName("sw3to5").DisplayName
+ FilterNames(6,1) = "*.sdw"
+ FilterNames(7,0) = oUIKey.Classes.GetByName("sw3to5templ").DisplayName
+ Filternames(7,1) = "*.vor"
Else
- ReDim FilterNames(8,1) as String
+ ReDim FilterNames(3,1) as String
End If
- FilterNames(0,0) = oFilters.GetByName("calc_StarOffice_XML_Calc").UIName
+ FilterNames(0,0) = oTypes.GetByName("calc_StarOffice_XML_Calc").UIName
Filternames(0,1) = "*.sxc"
-
- FilterNames(1,0) = oFilters.GetByName("calc_StarOffice_XML_Calc_Template").UIName
- Filternames(1,1) = "*.stw"
-
- FilterNames(2,0) = oFilters.GetByName("calc_StarCalc_10").UIName
- Filternames(2,1) = "*.sdc"
-
- FilterNames(3,0) = oFilters.GetByName("calc_StarCalc_30").UIName
- Filternames(3,1) = "*.sdc"
-
- FilterNames(4,0) = oFilters.GetByName("calc_StarCalc_30_VorlageTemplate").UIName
- Filternames(4,1) = "*.vor"
-
- FilterNames(5,0) = oFilters.GetByName("calc_StarCalc_40").UIName
- Filternames(5,1) = "*.sdc"
-
- FilterNames(6,0) = oFilters.GetByName("calc_StarCalc_40_VorlageTemplate").UIName
- Filternames(6,1) = "*.vor"
-
- FilterNames(7,0) = oFilters.GetByName("calc_StarCalc_50").UIName
- Filternames(7,1) = "*.sdc"
-
- FilterNames(8,0) = oFilters.GetByName("calc_StarCalc_50_VorlageTemplate").UIName
- Filternames(8,1) = "*.vor"
-
+ FilterNames(1,0) = oTypes.GetByName("calc_StarOffice_XML_Calc_Template").UIName
+ Filternames(1,1) = "*.stc"
+ FilterNames(2,0) = oUIKey.Classes.GetByName("sc345").DisplayName
+ FilterNames(2,1) = "*.sdc"
+ FilterNames(3,0) = oUIKey.Classes.GetByName("sc345templ").DisplayName
+ Filternames(3,1) = "*.vor"
GetFileName(DialogModel.txtSource, Filternames())
Else
GetFolderName(DialogModel.txtSource)
diff --git a/wizards/source/euro/Common.xba b/wizards/source/euro/Common.xba
index 26d0da7c0..0fcb07b30 100644
--- a/wizards/source/euro/Common.xba
+++ b/wizards/source/euro/Common.xba
@@ -216,25 +216,18 @@ Dim OldCurrIndex as Integer
CurExtension(1) = LangIDValue(CurrIndex,1,2)
CurExtension(2) = LangIDValue(CurrIndex,2,2)
If DialogModel.Step = 1 Then
- If OldCurrIndex = -1 Then
- DialogModel.chkComplete.State = 1
- EnableStep1DialogControls(True,False, True)
- SetOptionValuestoNull()
- Else
- EnableStep1DialogControls(False,False, False)
- If DialogModel.optCellTemplates.State = 1 Then
- EnableStep1DialogControls(False, False, False)
- CreateStyleEnumeration()
- ElseIf ((DialogModel.optSheetRanges.State = 1) OR (DialogModel.optDocRanges.State = 1)) AND (DialogModel.Step = 1) Then
- UpRangeList = UBound(RangeList())
- ReDim RangeList(UpRangeList) 'as String
- CreateRangeEnumeration(False)
- ElseIf DialogModel.optSelRange.State= 1 Then
- 'Preselected Range
-' CheckRangeSelection()
- End If
- EnableStep1DialogControls(True, True, True)
+ EnableStep1DialogControls(False,False, False)
+ If DialogModel.optCellTemplates.State = 1 Then
+ EnableStep1DialogControls(False, False, False)
+ CreateStyleEnumeration()
+ ElseIf ((DialogModel.optSheetRanges.State = 1) OR (DialogModel.optDocRanges.State = 1)) AND (DialogModel.Step = 1) Then
+ UpRangeList = UBound(RangeList())
+ ReDim RangeList(UpRangeList) 'as String
+ CreateRangeEnumeration(False)
+ ElseIf DialogModel.optSelRange.State= 1 Then
+ 'Preselected Range
End If
+ EnableStep1DialogControls(True, True, True)
ElseIf DialogModel.Step = 2 Then
EnableStep2DialogControls(True)
End If
diff --git a/wizards/source/euro/ConvertRun.xba b/wizards/source/euro/ConvertRun.xba
index aeaab396f..fd45e2be0 100644
--- a/wizards/source/euro/ConvertRun.xba
+++ b/wizards/source/euro/ConvertRun.xba
@@ -8,7 +8,6 @@ Public oPreSelRange as Object
' Todo Vorselektion der Listbox
' Mauspointer umschalten:
-' Todo: Sinnigkeit von 'DocDisposed' noch einmal überprüfen
' Todo: In der Hilfe sollte ein Hinweis erscheinen, dass immer zwei Nachkommastellen angezeigt werden
' und die resultierende Betrag ebenfalls bis auf zwei Stellen nach dem Komma gerundet wird
@@ -17,8 +16,7 @@ Sub Main()
If InitResources("Euro Converter", "eur") Then
bDoUnProtect = False
bPreSelected = True
-' DocDisposed = False
- oDocument = StarDesktop.CurrentFrame.Controller.Model
+ oDocument = ThisComponent
RetrieveDocumentObjects() ' Statusline, SheetsCollection etc.
InitializeConverter(oDocument.CharLocale, 1)
GetPreSelectedRange()
@@ -246,6 +244,7 @@ Dim OldCurrSymbolList(2) as String
Dim OldCurrIndex as Integer
Dim OldCurExtension(2) as String
oPreSelRange = AddSelectedRangeToSelRangesEnum()
+
DialogModel.chkComplete.State = Abs(Not(bPreSelected))
If bPreSelected Then
DialogModel.optSelRange.State = 1
diff --git a/wizards/source/euro/DlgConvert.xdl b/wizards/source/euro/DlgConvert.xdl
index e28f8535f..1c44ad984 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="2" 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: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"/>
@@ -60,7 +60,7 @@
</dlg:radiogroup>
<dlg:text dlg:id="lblCurProgress" dlg:tab-index="22" dlg:left="16" dlg:top="130" dlg:width="181" dlg:height="8" dlg:page="3"/>
<dlg:text dlg:id="lblRetrieval" dlg:tab-index="23" dlg:left="9" dlg:top="119" dlg:width="178" dlg:height="8" dlg:page="3" dlg:value="lblRetrieval"/>
- <dlg:textfield dlg:id="txtConfig" dlg:tab-index="24" dlg:left="6" dlg:top="50" dlg:width="258" dlg:height="55" dlg:page="3" dlg:vscroll="true" dlg:multiline="true"/>
+ <dlg:textfield dlg:id="txtConfig" dlg:tab-index="24" dlg:left="6" dlg:top="50" dlg:width="258" dlg:height="55" dlg:page="3" dlg:vscroll="true" dlg:multiline="true" dlg:readonly="true"/>
<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"/>
diff --git a/wizards/source/euro/Init.xba b/wizards/source/euro/Init.xba
index 80e7d8145..0b6790bd5 100644
--- a/wizards/source/euro/Init.xba
+++ b/wizards/source/euro/Init.xba
@@ -20,7 +20,6 @@ Public UnprotectList() as String
Public FilterNames(2,1) as String
Public bDoUnProtect as Boolean
Public bCancelTask as Boolean
-Public bDisposable as Boolean
Public sREADY as String
Public sPROTECT as String
@@ -513,7 +512,7 @@ Dim bTakeThisLocale as Boolean
If DialogModel.Step = 2 Then
bTakeThisLocale = LangIDValue(n,m,0) = sLanguage
Else
- bTakeThisLocale = LangIDValue(n,m,0) = sLanguage AND LangIDValue(n,m,1) = sCountry
+ bTakeThisLocale = LangIDValue(n,m,0) = sLanguage&apos; AND LangIDValue(n,m,1) = sCountry
End If
If bTakeThisLocale Then
CurrIndex = n
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