diff options
author | Eike Rathke <erack@redhat.com> | 2014-01-03 00:34:06 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2014-01-03 08:23:03 +0000 |
commit | 29439609d6023c8c7e14cafa5171b2bedc600ab4 (patch) | |
tree | 21a8f4cc6f2c7975fbf0cead33e1bb73993e8897 | |
parent | bfb51322f2bee76d7e70588050c38655a432aef0 (diff) |
die binfilter die die die
Euro Converter tried to obtain filters for names of binary filters that
don't exist anymore and can't be resolved hence the TypeDetection
GetByName() bailed out with an exception when calling the file picker
(e.g. when attempting to select a document), stopping in Basic
environment and effectively rendering the wizard useless.
Change-Id: Ifdef6f59abdc16bedd0f54ec317dc44af8f1e628
(cherry picked from commit e625d00439f725b01f3818859e95e431e6173d57)
Reviewed-on: https://gerrit.libreoffice.org/7264
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r-- | wizards/source/euro/AutoPilotRun.xba | 60 |
1 files changed, 22 insertions, 38 deletions
diff --git a/wizards/source/euro/AutoPilotRun.xba b/wizards/source/euro/AutoPilotRun.xba index 47d795989a04..fe2bed7a7d55 100644 --- a/wizards/source/euro/AutoPilotRun.xba +++ b/wizards/source/euro/AutoPilotRun.xba @@ -28,7 +28,7 @@ Public Source as String Public SubstFile as String Public SubstDir as String Public NoArgs() -Public TypeList(14) as String +Public TypeList(6) as String Public GoOn as Boolean Public DoUnprotect as Integer Public Password as String @@ -74,21 +74,13 @@ Dim bDisposable as Boolean TargetStemDir = TargetDir TypeList(0) = "calc8" TypeList(1) = "calc_StarOffice_XML_Calc" - TypeList(2) = "calc_StarCalc_30" - TypeList(3) = "calc_StarCalc_40" - TypeList(4) = "calc_StarCalc_50" If DialogModel.chkTextDocuments.State = 1 Then - ReDim Preserve TypeList(13) as String - - TypeList(5) = "writer8" - TypeList(6) = "writerglobal8" - TypeList(7) = "writer_StarOffice_XML_Writer" - TypeList(8) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument" - TypeList(9) = "writer_StarWriter_30" - TypeList(10) = "writer_StarWriter_40" - TypeList(11) = "writer_globaldocument_StarWriter_40GlobalDocument" - TypeList(12) = "writer_StarWriter_50" - TypeList(13) = "writer_globaldocument_StarWriter_50GlobalDocument" + ReDim Preserve TypeList(5) as String + + TypeList(2) = "writer8" + TypeList(3) = "writerglobal8" + TypeList(4) = "writer_StarOffice_XML_Writer" + TypeList(5) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument" End If FilesList() = ReadDirectories(SourceDir, bRecursive, True, False, TypeList()) TotDocCount = Ubound(FilesList(),1) + 1 @@ -387,34 +379,26 @@ Sub CallFilePicker() oTypes() = oMasterKey.Types oUIKey = GetRegistryKeyContent("org.openoffice.Office.UI/FilterClassification/LocalFilters") If DialogModel.chkTextDocuments.State = 1 Then - Dim FilterNames(11,1) as String - FilterNames(6,0) = oTypes.GetByName("writer_StarOffice_XML_Writer").UIName - FilterNames(6,1) = "*.sxw" - FilterNames(7,0) = oTypes.GetByName("writer_StarOffice_XML_Writer_Template").UIName - FilterNames(7,1) = "*.stw" - FilterNames(8,0) = oUIKey.Classes.GetByName("sw3to5").DisplayName - FilterNames(8,1) = "*.sdw" - FilterNames(9,0) = oUIKey.Classes.GetByName("sw3to5templ").DisplayName - Filternames(9,1) = "*.vor" - FilterNames(10,0) = oTypes.GetByName("writer8").UIName - FilterNames(10,1) = "*.odt" - FilterNames(11,0) = oTypes.GetByName("writer8_template").UIName - FilterNames(11,1) = "*.ott" + 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) = oTypes.GetByName("writer8").UIName + FilterNames(6,1) = "*.odt" + FilterNames(7,0) = oTypes.GetByName("writer8_template").UIName + FilterNames(7,1) = "*.ott" Else - ReDim FilterNames(5,1) as String + ReDim FilterNames(3,1) as String End If - FilterNames(0,0) = oTypes.GetByName("calc_StarOffice_XML_Calc").UIName + FilterNames(0,0) = oTypes.GetByName("calc_StarOffice_XML_Calc").UIName Filternames(0,1) = "*.sxc" 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" - FilterNames(4,0) = oTypes.GetByName("calc8").UIName - Filternames(4,1) = "*.ods" - FilterNames(5,0) = oTypes.GetByName("calc8_template").UIName - Filternames(5,1) = "*.ots" + FilterNames(2,0) = oTypes.GetByName("calc8").UIName + Filternames(2,1) = "*.ods" + FilterNames(3,0) = oTypes.GetByName("calc8_template").UIName + Filternames(3,1) = "*.ots" GetFileName(DialogModel.txtSource, Filternames()) Else GetFolderName(DialogModel.txtSource) |