diff options
author | Rüdiger Timm <rt@openoffice.org> | 2004-03-30 12:38:33 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2004-03-30 12:38:33 +0000 |
commit | 60f760eb81995a7c26107ef25610a6539c615cd5 (patch) | |
tree | 316b6f58e104eebc60db0b118ce1408f3a27e53f /wizards/source/importwizard/DialogModul.xba | |
parent | 6080d5f963bb2a5f3116f688a066e7cc6193703c (diff) |
INTEGRATION: CWS extras12 (1.34.8); FILE MERGED
2003/12/17 12:36:08 bc 1.34.8.1: #112871# Filtertracing for importwizard added
Diffstat (limited to 'wizards/source/importwizard/DialogModul.xba')
-rw-r--r-- | wizards/source/importwizard/DialogModul.xba | 96 |
1 files changed, 86 insertions, 10 deletions
diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba index e84fb717ecb7..da617d2d66e9 100644 --- a/wizards/source/importwizard/DialogModul.xba +++ b/wizards/source/importwizard/DialogModul.xba @@ -8,6 +8,7 @@ Public Const SBFIRSTAPPLCHECKED = 0 Public Const SBSECONDAPPLCHECKED = 1 Public Const SBTHIRDAPPLCHECKED = 2 Public Const SBFOURTHAPPLCHECKED = 3 +Public bFilterTracingAvailable as Boolean Public WizardMode as String Public Const SBMICROSOFTMODE = "MS" Public Const SBXMLMODE = "SO" @@ -29,8 +30,12 @@ Public ApplCount as Integer Public sKeyName(SBMAXAPPLCOUNT-1) as String Public sValueName(SBMAXAPPLCOUNT-1) as String Public sCRLF as String -Public MSFilterName(5,2) as String -Public XMLFilterName(7,2) as String +Public MSFilterName(5,4) as String +Public XMLFilterName(7,3) as String +Public FilterTracingLogPath(2) as String +Public bMSApplFilterTracingAvailable(2) as String +Public bTakeOverTargetName(2) as Boolean +Public bTakeOverPathName(2) as Boolean ' e.g.: ' XMLFilterName(x,0) = "sdw" ' in documents we take the extensions; in SO-templates the appropriate Filtername @@ -111,10 +116,6 @@ Dim oNullObject as Object Else SetupXMLConfiguration() End If - ' chkTemplatePath-Captions - GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox()) - ' DocumentCheckbox- Captions - GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox()) FillUpApplicationList() End If CurOffice = OfficeIndex @@ -254,6 +255,7 @@ Dim Index as Integer Dim sAddText as String For i = 0 To ApplCount -1 Index = Applications(i,SBAPPLKEY) + GetFilterTracingLogPath(i, Index) If Applications(i,SBTEMPLCONVERT) Then ' Templates are to be converted sAddText = "" @@ -328,11 +330,57 @@ Sub FillStep_Progress() End Sub +Sub GetFilterTracingLogPath(i as Integer, Index as Integer) +Dim aNodePath(0) as new com.sun.star.beans.PropertyValue +Dim oMasterKey +Dim oImportKey +Dim oWordKey +Dim oExcelkey +Dim oPowerpointKey +Dim oFilterService + aNodePath(0).Name = "nodepath" + aNodePath(0).Value = "org.openoffice.Office.Tracing" + oFilterService = createUnoService("com.sun.star.util.FilterTracer") + bFilterTracingAvailable = Not IsNull(oFilterService) + If bFilterTracingAvailable Then + oMasterkey = GetRegistryKeyContent("org.openoffice.Office.Tracing/") + If oMasterKey.hasbyName("Import") Then + oImportKey = GetRegistryKeyContent("org.openoffice.Office.Tracing/Import") + bMSApplFilterTracingAvailable(i) = CheckMSImportAvailability(oImportkey, MSFiltername(Index, 4), FilterTracingLogPath(i), bTakeOverTargetName(i), bTakeOverPathName(i)) + End If + End If +End Sub + + +Function CheckMSImportAvailability(oImportkey, MSApplName as String, MSLogPath as String, bTakeOverTargetname as String, bTakeOverpathName as String) as Boolean +Dim bApplIsAvailable as Boolean +Dim oApplKey +Dim LocApplName as String +Dim LocApplPath as String + bApplIsAvailable = oImportKey.hasbyName(MSApplName) + If bApplIsAvailable Then + oApplKey = oImportKey.getByName(MSApplName) + bApplIsAvailable = oApplKey.On + LocApplName = oApplKey.Name + LocApplPath = oApplKey.Path + bTakeOverTargetName = (LocApplName = "") + bTakeOverPathName = (LocApplPath = "") + MSLogPath = LocApplPath & "/" & LocApplName & ".log" + End If + CheckMSImportAvailability() = bApplIsAvailable +End Function + + + Sub SetupMSConfiguration() iApplSection = 0 Wizardmode = SBMICROSOFTMODE MaxApplCount = 3 ApplCount = 3 + ' chkTemplatePath-Captions + GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox()) + ' DocumentCheckbox- Captions + GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox()) sKeyName(0) = "Software\Microsoft\Office\8.0\Word\Options" sKeyName(1) = "Software\Microsoft\Office\8.0\Excel\Microsoft Excel" @@ -346,26 +394,39 @@ Sub SetupMSConfiguration() MSFilterName(0,0) = "doc" MSFilterName(0,1) = "StarOffice XML (Writer)" MSFilterName(0,2) = "sxw" + MSFilterName(0,3) = sMSDocumentCheckBox(0) + MSFilterName(0,4) = "Word" + MSFilterName(1,0) = "xls" MSFilterName(1,1) = "StarOffice XML (Calc)" MSFilterName(1,2) = "sxc" + MSFilterName(1,3) = sMSDocumentCheckBox(1) + MSFilterName(1,4) = "Excel" - MSFilterName(2,0) = "ppt|pps" - MSFilterName(2,1) = "StarOffice XML (Impress)|StarOffice XML (Impress)" - MSFilterName(2,2) = "sxi|sxi" + MSFilterName(2,0) = "ppt" + MSFilterName(2,1) = "StarOffice XML (Impress)" + MSFilterName(2,2) = "sxi" + MSFilterName(2,3) = sMSDocumentCheckBox(2) + MSFilterName(2,4) = "PowerPoint" MSFilterName(3,0) = "dot" MSFilterName(3,1) = "writer_StarOffice_XML_Writer_Template" MSFilterName(3,2) = "stw" - + MSFilterName(3,3) = sMSTemplateCheckBox(0) + MSFilterName(3,4) = "Word" + MSFilterName(4,0) = "xlt" MSFilterName(4,1) = "calc_StarOffice_XML_Calc_Template" MSFilterName(4,2) = "stc" + MSFilterName(4,3) = sMSTemplateCheckBox(1) + MSFilterName(4,4) = "Excel" MSFilterName(5,0) = "pot" MSFilterName(5,1) = "impress_StarOffice_XML_Impress_Template" MSFilterName(5,2) = "sti" + MSFilterName(5,3) = sMSTemplateCheckBox(2) + MSFilterName(5,4) = "PowerPoint" End Sub @@ -407,40 +468,55 @@ Sub SetupXMLConfiguration() Wizardmode = SBXMLMODE ApplCount = 4 MaxApplCount = 4 + + ' chkTemplatePath-Captions + GetApplResourceArray(1009 + iApplSection, ApplCount, sTemplateCheckBox()) + ' DocumentCheckbox- Captions + GetApplResourceArray(1009 + iApplSection + ApplCount, ApplCount, sDocumentCheckBox()) XMLFilterName(0,0) = "sdw" XMLFilterName(0,1) = "StarOffice XML (Writer)" XMLFilterName(0,2) = "sxw" + XMLFilterName(0,3) = sDocumentCheckBox(0) XMLFilterName(1,0) = "sdc" XMLFilterName(1,1) = "StarOffice XML (Calc)" XMLFilterName(1,2) = "sxc" + XMLFilterName(1,3) = sDocumentCheckBox(1) XMLFilterName(2,0) = "sdd|sda" XMLFilterName(2,1) = "StarOffice XML (Impress)|sdraw: StarOffice XML (Draw)" XMLFilterName(2,2) = "sxi|sxd" + XMLFilterName(2,3) = sDocumentCheckBox(2) XMLFilterName(3,0) = "smf" XMLFilterName(3,1) = "StarOffice XML (Math)" XMLFilterName(3,2) = "sxm" + XMLFilterName(3,3) = sDocumentCheckBox(3) XMLFilterName(4,0) = "application/x-openoffice-starwriter|application/vnd.stardivision.writer/web" XMLFilterName(4,1) = "writer_StarOffice_XML_Writer_Template|writer_web_StarOffice_XML_Writer_Web_Template" XMLFilterName(4,2) = "stw|stw" + XMLFilterName(4,3) = sTemplateCheckBox(0) + XMLFilterName(5,0) = "application/x-openoffice-starcalc" XMLFilterName(5,1) = "calc_StarOffice_XML_Calc_Template" XMLFilterName(5,2) = "stc" + XMLFilterName(5,3) = sTemplateCheckBox(1) ' due to bug #108942# impress templates of the version 4.0 have to be handled in a special way because their mimetype ' falsely points to the draw application. XMLFilterName(6,0) = "application/x-openoffice-starimpress|application/x-openoffice-stardraw-40|application/x-openoffice-stardraw" XMLFilterName(6,1) = "impress_StarOffice_XML_Impress_Template|impress_StarOffice_XML_Impress_Template|draw_StarOffice_XML_Draw_Template" XMLFilterName(6,2) = "sti|sti|std" + XMLFilterName(6,3) = sTemplateCheckBox(2) + XMLFilterName(7,0) = "sgl" XMLFilterName(7,1) = "writer_globaldocument_StarOffice_XML_Writer_GlobalDocument" XMLFilterName(7,2) = "sxg" + XMLFilterName(7,3) = sTemplateCheckBox(3) End Sub |