diff options
author | Pascal Junck <pjunck@openoffice.org> | 2004-10-27 12:45:06 +0000 |
---|---|---|
committer | Pascal Junck <pjunck@openoffice.org> | 2004-10-27 12:45:06 +0000 |
commit | 3bb37d5742367a65fb269084cff66e08b81a903d (patch) | |
tree | 909ffb556f012db4ed0e3d8b7f194ccb4cdb1c45 /wizards | |
parent | 08fc5da49d1153303d24d409d083a49e9344a831 (diff) |
INTEGRATION: CWS dbwizard1 (1.38.42); FILE MERGED
2004/08/19 09:40:49 ih 1.38.42.1: #117590# updated to new file formats
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/importwizard/FilesModul.xba | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba index b15acfc35add..2a6c257c0eff 100644 --- a/wizards/source/importwizard/FilesModul.xba +++ b/wizards/source/importwizard/FilesModul.xba @@ -70,7 +70,7 @@ Dim bAssignFileName as Boolean End If CurFileContent = "" CurFileName = NewList(n,0) - If NewList(n,1) = "vor" Then + If (FieldInList(NewList(n,1), XMLTemplateList())) Then CurFileContent = GetRealFileContent(oDocInfo, CurFileName) t = SearchArrayforPartString(CurFileContent, XMLTemplateContentList()) bAssignFileName = (t > -1) @@ -150,6 +150,16 @@ Sub AddCollectionPath(ApplIndex as Integer, DocIndex as Integer, RecursiveIndex End Sub +Function SetExtension(LocExtension) as String + if (Instr(LocExtension, "vnd.sun.xml.impress")) > 0 then + SetExtension() = "vor|sti" + elseif (Instr(LocExtension, "vnd.sun.xml.writer")) > 0 then + SetExtension() = "vor|stw" + elseif (Instr(LocExtension, "vnd.sun.xml.calc")) > 0 then + SetExtension() = "vor|stc" + endif +End Function + Sub AddFilterNameToPathItem(ApplIndex as Integer, CollectIndex as Integer, sFiltername() as String, DistIndex as Integer) Dim iKey as Integer Dim CurListString as String @@ -160,7 +170,7 @@ Dim LocXMLTemplateContent as String CurListString = PathCollection(CollectIndex, 2) LocExtension = sFilterName(iKey +DistIndex, 0) If Len(LocExtension) > SBMAXEXTENSIONLENGTH Then ' 7 == Length of two extensions like 'sda|sdd - LocExtension = "vor" + LocExtension = SetExtension(LocExtension) LocContentString = sFilterName(iKey +DistIndex, 0) LocContentString = ReplaceString(LocContentString, "|", ";") LocXMLTemplateContent = PathCollection(CollectIndex, 3) @@ -310,7 +320,7 @@ Dim sPrevMimeTypeorExtension as String sViewPath = ConvertFromUrl(sSourceUrl) ' CutPathView(sSourceUrl, 70) ImportDialog.LabelCurDocument.Label = Str(i+1) & "/" & MaxFileIndex + 1 & " (" & sViewPath & ")" Select Case lcase(sExtension) - Case "sxw", "sxc", "sxi", "sxd", "sxs", "sxm" + Case "oot", "oos", "oop", "ood", "oom", "oof" SourceStemDir = RTrimStr(Applications(ApplIndex,SBDOCSOURCE), "/") TargetStemDir = RTrimStr(Applications(ApplIndex,SBDOCTARGET), "/") Case Else ' Templates and Helper-Applications remain @@ -425,7 +435,7 @@ Dim s as Integer FirstList(i,1) = SecList(s,1) sLocExtension = lcase(FirstList(i,1)) Select Case sLocExtension - Case "sdw", "sdc", "sda", "sdd", "smf", "sgl", "doc", "xls", "ppt" + Case "sdw", "sdc", "sda", "sdd", "smf", "sgl", "doc", "xls", "ppt", "sxi" , "sxw" , "sxd" , "sxg" , "sxm" , "sxc" AbsDocuFound = AbsDocuFound + 1 Case else AbsTemplateFound = AbsTemplateFound + 1 |