Kaydet (Commit) 8bab53a1 authored tarafından Michael Stahl's avatar Michael Stahl

wizards: Document Conversion: remove StarOffice mode:

With the removal of binfilter, legacy StarOffice format documents cannot
be converted any more, so remove the associated code.

Change-Id: I49da6b56eb893acebce0de43846128abaede6a71
üst 907b63a0
......@@ -102,8 +102,6 @@ Dim Index as Integer
sPath = SOWorkPath
End If
GetDefaultPath = sPath
Case SBXMLMODE
GetDefaultPath = SOWorkPath
End Select
End Function
......@@ -158,13 +156,6 @@ Dim sTemplateValueName as String
Else
GetTemplateDefaultPath = SOWorkPath
End If
Case SBXMLMODE
If Index = 3 Then
' Helper Application with no templates
GetTemplateDefaultPath = SOWorkPath
Else
GetTemplateDefaultPath = SOTemplatePath
End If
End Select
NOVALIDSYSTEMPATH:
If Err <> 0 Then
......@@ -222,4 +213,4 @@ Dim vValue As String ' Key value
RegCloseKeyA (hKey)
QueryValue = vValue
End Function
</script:module>
\ No newline at end of file
</script:module>
......@@ -238,9 +238,6 @@ Dim XMLTemplateContentString as String
XMLTemplateCount = 0
XMLTemplateContentString = &quot;&quot;
For i = 0 To ApplCount-1
If WizardMode = SBXMLMODE Then
XMLTemplateCount = XMLTemplateCount + 1
End If
CheckIfToAddPathToCollection(i, SBTEMPLCONVERT, SBTEMPLSOURCE, SBTEMPLRECURSIVE, sFilterName(), MaxApplCount)
Next i
End Sub
......@@ -470,13 +467,6 @@ Function GetTargetTemplatePath(Index as Integer)
Select Case WizardMode
Case SBMICROSOFTMODE
GetTargetTemplatePath() = SOTemplatePath &amp; &quot;/&quot; &amp; sTemplateGroupName
Case SBXMLMODE
If Index = 3 Then
&apos; Helper Application
GetTargetTemplatePath = SOWorkPath
Else
GetTargetTemplatePath = SOTemplatePath
End If
End Select
End Function
......
......@@ -70,9 +70,6 @@
<dlg:radio dlg:id="optMSDocuments" dlg:tab-index="27" dlg:left="6" dlg:top="72" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="MS" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTMSDOCUMENTS" dlg:value="optMSDocuments" dlg:checked="true">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
<dlg:radio dlg:id="optSODocuments" dlg:tab-index="28" dlg:left="6" dlg:top="113" dlg:width="258" dlg:height="9" dlg:page="1" dlg:tag="SO" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_OPTSODOCUMENTS" dlg:value="optSODocuments">
<script:event script:event-name="on-performaction" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleCheckboxes?language=Basic&amp;location=application" script:language="Script"/>
</dlg:radio>
</dlg:radiogroup>
<dlg:checkbox dlg:id="chkMSApplication1" dlg:tab-index="29" dlg:disabled="true" dlg:left="12" dlg:top="85" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKWORD" dlg:value="chkMSApplication1" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
......@@ -83,18 +80,6 @@
<dlg:checkbox dlg:id="chkMSApplication3" dlg:tab-index="31" dlg:disabled="true" dlg:left="12" dlg:top="98" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CHKPOWERPOINT" dlg:value="chkMSApplication3" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication1" dlg:tab-index="32" dlg:left="12" dlg:top="126" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKWRITER" dlg:value="chkSOApplication1" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication2" dlg:tab-index="33" dlg:left="155" dlg:top="126" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKCALC" dlg:value="chkSOApplication2" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication3" dlg:tab-index="34" dlg:left="12" dlg:top="139" dlg:width="141" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKIMPRESS" dlg:value="chkSOApplication3" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkSOApplication4" dlg:tab-index="35" dlg:left="155" dlg:top="139" dlg:width="109" dlg:height="9" dlg:page="1" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_0_CHKMATHGLOBAL" dlg:value="chkSOApplication4" dlg:checked="false">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.Main.ToggleNextButton?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
<dlg:checkbox dlg:id="chkTemplatePath" dlg:tab-index="36" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:tag="Template" dlg:help-url="HID:WIZARDS_HID_DLGIMPORT_2_CBTEMPLATE" dlg:value="chkTemplatePath" dlg:checked="true">
<script:event script:event-name="on-itemstatechange" script:macro-name="vnd.sun.star.script:ImportWizard.DialogModul.ToggleInputPaths?language=Basic&amp;location=application" script:language="Script"/>
</dlg:checkbox>
......
......@@ -21,8 +21,6 @@
Public sMSTemplateCheckbox(2) As String
Public sMSDocumentCheckbox(2) As String
Public sSODocumentCheckbox(4) As String
Public sSOHelperdocuments(1,1) As String
Public sTemplateCheckbox(SBMAXAPPLCOUNT-1) As String
Public sDocumentCheckbox(SBMAXAPPLCOUNT-1) As String
Public sTemplateGroupName As String
......@@ -51,8 +49,6 @@ Public sReady as String, sTitle as String
Public sCloseButton as String
Public sSourceDocuments as String
Public sTargetDocuments as String
Public sSumSODocuments(4) as String
Public sSumSOTemplates(4) as String
Public sSumMSDocuments(3) as String
Public sSumMSTemplates(3) as String
Public ModuleList(3) as String
......@@ -83,21 +79,9 @@ Sub LoadLanguage()
&apos; DocumentCheckbox- Captions
GetApplResourceArray(1012, 3, sMSDocumentCheckBox())
&apos; DocumentCheckbox- Captions
GetApplResourceArray(2013, 5, sSODocumentCheckBox())
&apos;StarOffice Applicationnames
sSOHelperDocuments(0,0) = GetResText(2017)
sSOHelperDocuments(0,1) = &quot;com.sun.star.text.GlobalDocument&quot;
sSOHelperDocuments(1,0) = GetResText(2018)
sSOHelperDocuments(1,1) = &quot;com.sun.star.formula.FormulaProperties&quot;
GetApplResourceArray(2017,2, sSOHelperDocuments())
sContainerName(0) = GetResText(1030)
&apos; Note: for the version 5.2 there was no Productname &quot;StarSuite&quot;
sContainerName(1) = &quot;StarOffice&quot;
sSummaryHeader = GetResText(1031)
......@@ -132,9 +116,6 @@ Sub LoadLanguage()
sLogSummary = GetResText(2034)
sSumInclusiveSubDir = GetResText(3000)
sSumSaveDocuments = GetResText(3001)
&apos;StarOffice Applicationnames
GetApplResourceArray(3100, 4, sSumSODocuments())
GetApplResourceArray(3110, 4, sSumSOTemplates())
GetApplResourceArray(3200, 3, sSumMSDocuments())
GetApplResourceArray(3210, 3, sSumMSTemplates())
With ImportDialog
......
......@@ -25,7 +25,6 @@ Public ImportDialog as Object
Public ImportDialogArea as Object
Public oFactoryKey as Object
Public bShowLogFile as Boolean
Public oBinFilterComp as Object
&apos; If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is
&apos; set to False
......@@ -54,14 +53,13 @@ Sub Main()
ImportDialogArea = LoadDialog(&quot;ImportWizard&quot;,&quot;ImportDialog&quot;)
ImportDialog = ImportDialogArea.Model
LoadLanguage()
WizardMode = SBXMLMODE
MaxApplCount = 4
WizardMode = SBMICROSOFTMODE
MaxApplCount = 3
FillStep_Welcome()
RepaintHeaderPreview()
ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126)
ImportDialog.cmdGoOn.DefaultButton = True
ImportDialogArea.GetControl(&quot;optMSDocuments&quot;).SetFocus()
oBinFilterComp = createBF_MigrateFilterIfPossible()
ToggleCheckboxesWithBoolean(True)
RetValue = ImportDialogArea.Execute()
......@@ -106,8 +104,6 @@ Dim iCurStep as Integer
Select Case WizardMode
Case SBMICROSOFTMODE
Call ConvertAllDocuments(MSFilterName())
CASE SBXMLMODE
Call ConvertAllDocuments(XMLFilterName())
End Select
Case 4
CancelTask(True)
......@@ -203,17 +199,6 @@ Dim i as Integer
End Sub
Function createBF_MigrateFilterIfPossible()
Dim oService
On Error Goto RTError
oService = createUnoService(&quot;com.sun.star.comp.office.BF_MigrateFilter&quot;)
getBinFilterCompIfItExists = oService
Exit Function
RTError:
createBF_MigrateFilterIfPossible = Nothing
End Function
Function CheckInstalledModule(Index as Integer) as Boolean
Dim ModuleName as String
Dim NameList() as String
......@@ -247,22 +232,9 @@ Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean)
WizardMode = SBMICROSOFTMODE
MaxApplCount = 3
Else
WizardMode = SBXMLMODE
MaxApplCount = 4
&apos;Not supposed to happen - is there an assert in BASIC...
End If
With ImportDialogArea
If (isNull(oBinFilterComp)) Then
.GetControl(&quot;optSODocuments&quot;).Visible = False
.GetControl(&quot;chkSOApplication1&quot;).Visible = False
.GetControl(&quot;chkSOApplication2&quot;).Visible = False
.GetControl(&quot;chkSOApplication3&quot;).Visible = False
.GetControl(&quot;chkSOApplication4&quot;).Visible = False
Else
.GetControl(&quot;chkSOApplication1&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkSOApplication2&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkSOApplication3&quot;).Model.Enabled = Not bMSEnable
.GetControl(&quot;chkSOApplication4&quot;).Model.Enabled = Not bMSEnable
End if
.GetControl(&quot;chkMSApplication1&quot;).Model.Enabled = bMSEnable
.GetControl(&quot;chkMSApplication2&quot;).Model.Enabled = bMSEnable
.GetControl(&quot;chkMSApplication3&quot;).Model.Enabled = bMSEnable
......@@ -283,8 +255,6 @@ Dim i as Integer
With ImportDialog
If .optMSDocuments.State = 1 Then
bDoEnable = .chkMSApplication1.State = 1 Or .chkMSApplication2.State = 1 Or .chkMSApplication3.State = 1
Else
bDoEnable = .chkSOApplication1.State = 1 Or .chkSOApplication2.State = 1 Or .chkSOApplication3.State = 1 Or .chkSOApplication4.State = 1
End If
End With
bDoKeepApplValues = False
......@@ -301,13 +271,8 @@ Sub TakeOverPathSettings()
If Applications(CurOffice,SBDOCSOURCE) = &quot;&quot; Then
Applications(CurOffice,SBDOCSOURCE) = Applications(0,SBDOCSOURCE)
Applications(CurOffice,SBDOCTARGET) = Applications(0,SBDOCTARGET)
If WizardMode = SBXMLMODE AND Applications(CurOffice,SBAPPLKEY) = 3 Then
Applications(CurOffice,SBTEMPLSOURCE) = Applications(CurOffice,SBDOCSOURCE)
Applications(CurOffice,SBTEMPLTARGET) = Applications(CurOffice,SBDOCTARGET)
Else
Applications(CurOffice,SBTEMPLSOURCE) = Applications(0,SBTEMPLSOURCE)
Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET)
End If
Applications(CurOffice,SBTEMPLSOURCE) = Applications(0,SBTEMPLSOURCE)
Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET)
End If
End Sub
......
......@@ -56,9 +56,6 @@
#define sPathErrorDocument_1_ 1062
#define sPathErrorDocument_2_ 1063
#define sPathErrorDocument_3_ 1064
#define sPathErrorStarDoc_1_ 1065
#define sPathErrorStarDoc_2_ 1066
#define sPathErrorStarDoc_3_ 1067
#define sOverwriteallFiles 1070
#define sreeditMacro 1071
#define scouldNotsaveDocument 1072
......@@ -71,16 +68,6 @@
#define sProgressFound 1093
#define sProgressPage5 1094
#define sReady 1100
#define sXMLTemplateCheckbox_1_ 2009
#define sXMLTemplateCheckbox_2_ 2010
#define sXMLTemplateCheckbox_3_ 2011
#define sXMLTemplateCheckbox_4_ 2012
#define sXMLDocumentCheckbox_1_ 2013
#define sXMLDocumentCheckbox_2_ 2014
#define sXMLDocumentCheckbox_3_ 2015
#define sXMLDocumentCheckbox_4_ 2016
#define sXMLHelperApplications_1 2017
#define sXMLHelperApplications_2 2018
#define sSourceDocuments 2030
#define sTargetDocuments 2031
......@@ -92,16 +79,6 @@
#define sSumInclusiveSubDir 3000
#define sSumSaveDokumente 3001
#define sSumSOTextDocuments 3100
#define sSumSOTableDocuments 3101
#define sSumSODrawDocuments 3102
#define sSumSOMathDocuments 3103
#define sSumSOTextTemplates 3110
#define sSumSOTableTemplates 3111
#define sSumSODrawTemplates 3112
#define sSumSOGlobalDocuments 3113
#define sSumMSTextDocuments 3200
#define sSumMSTableDocuments 3201
#define sSumMSDrawDocuments 3202
......@@ -361,59 +338,6 @@ String sReady
};
String sXMLTemplateCheckbox_1_
{
Text [ en-US ] = "Text templates";
};
String sXMLTemplateCheckbox_2_
{
Text [ en-US ] = "Spreadsheet templates";
};
String sXMLTemplateCheckbox_3_
{
Text [ en-US ] = "Drawing/presentation templates";
};
String sXMLTemplateCheckbox_4_
{
Text [ en-US ] = "Master documents";
};
String sXMLDocumentCheckbox_1_
{
Text [ en-US ] = "Text documents";
};
String sXMLDocumentCheckbox_2_
{
Text [ en-US ] = "Spreadsheets";
};
String sXMLDocumentCheckbox_3_
{
Text [ en-US ] = "Drawing/presentation documents";
};
String sXMLDocumentCheckbox_4_
{
Text [ en-US ] = "Master documents/formulas";
};
String sXMLHelperApplications_1
{
Text [ en-US ] = "Master documents";
};
String sXMLHelperApplications_2
{
Text [ en-US ] = "Formulas";
};
String sSourceDocuments
{
Text [ en-US ] = "Source documents";
......@@ -461,53 +385,6 @@ String sSumSaveDokumente
};
String sSumSOTextDocuments
{
Text [ en-US ] = "All StarOffice text documents contained in the following directory will be imported:";
};
String sSumSOTableDocuments
{
Text [ en-US ] = "All StarOffice spreadsheets contained in the following directory will be imported:";
};
String sSumSODrawDocuments
{
Text [ en-US ] = "All StarOffice drawing and presentation documents contained in the following directory will be imported:";
};
String sSumSOMathDocuments
{
Text [ en-US ] = "All StarOffice formula documents contained in the following directory will be imported:";
};
String sSumSOTextTemplates
{
Text [ en-US ] = "All StarOffice text templates contained in the following directory will be imported:";
};
String sSumSOTableTemplates
{
Text [ en-US ] = "All StarOffice table templates contained in the following directory will be imported:";
};
String sSumSODrawTemplates
{
Text [ en-US ] = "All StarOffice drawing and presentation templates contained in the following directory will be imported:";
};
String sSumSOGlobalDocuments
{
Text [ en-US ] = "All StarOffice master documents contained in the following directory will be imported:";
};
String sSumMSTextDocuments
{
Text [ en-US ] = "All Word documents contained in the following directory will be imported:";
......
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