diff options
-rw-r--r-- | wizards/source/importwizard/API.xba | 10 | ||||
-rw-r--r-- | wizards/source/importwizard/DialogModul.xba | 17 | ||||
-rw-r--r-- | wizards/source/importwizard/FilesModul.xba | 12 | ||||
-rw-r--r-- | wizards/source/importwizard/ImportDialog.xdl | 34 | ||||
-rw-r--r-- | wizards/source/importwizard/Language.xba | 4 | ||||
-rw-r--r-- | wizards/source/importwizard/Main.xba | 10 |
6 files changed, 42 insertions, 45 deletions
diff --git a/wizards/source/importwizard/API.xba b/wizards/source/importwizard/API.xba index 46005c6bd..0f48f5530 100644 --- a/wizards/source/importwizard/API.xba +++ b/wizards/source/importwizard/API.xba @@ -31,10 +31,9 @@ Declare Function RegQueryValueExNULL Lib "advapi32.dll" Alias "Re ByVal lpData As Long, _ lpcbData As Long) As Long -Declare Function RegCloseKey Lib "advapi32.dll" _ +Declare Function RegCloseKeyA Lib "advapi32.dll" Alias "RegCloseKey" _ (ByVal hKey As Long) As Long -Declare Function RegCloseKey Lib "advapi32.dll" (hKey As Long) As Long Public Const HKEY_CLASSES_ROOT = &H80000000 Public Const HKEY_CURRENT_USER = &H80000001 @@ -65,7 +64,7 @@ Dim lRetValue as Long lRetValue = RegOpenKeyEx(lBaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey) ' lRetValue = QueryValue(HKEY_LOCAL_MACHINE, "SOFTWARE\Microsoft\Outlook Express\5.0\Default Settings", "Revocation Checking") If hKey <> 0 Then - RegCloseKey (hKey) + RegCloseKeyA (hKey) End If OpenRegKey() = lRetValue End Function @@ -197,7 +196,6 @@ Dim vValue As String ' Key value lRetVal = RegOpenKeyEx(BaseKey, sKeyName, 0, KEY_ALL_ACCESS, hKey) lRetVal = QueryValueEx(hKey, sValueName, vValue) - RegCloseKey (hKey) + RegCloseKeyA (hKey) QueryValue = vValue -End Function -</script:module>
\ No newline at end of file +End Function</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/DialogModul.xba b/wizards/source/importwizard/DialogModul.xba index 1fd1e6a23..41759bd5f 100644 --- a/wizards/source/importwizard/DialogModul.xba +++ b/wizards/source/importwizard/DialogModul.xba @@ -68,6 +68,7 @@ Public Const SBAPPLKEY = 9 Sub FillStep_Welcome() Dim i as Integer ' bDoKeepApplValues = False + ImportDialogArea.Title = sTitle With ImportDialog .cbHelp.Label = sHelpButton .cbCancel.Label = sCancelButton @@ -120,7 +121,11 @@ Dim Index as Integer .DocumentImportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCSOURCE)) .DocumentExportPath.Text = ConvertFromUrl(Applications(CurOffice,SBDOCTARGET)) .hlnDocuments.Label = sProgressMoreDocs - + If WizardMode = SBXMLMODE Then + ImportDialogArea.Title = sTitle & " - " & sSODocumentCheckBox(Index) + Else + ImportDialogArea.Title = sTitle & " - " & sMSDocumentCheckBox(Index) + End If If WizardMode = SBXMLMODE AND Index = 3 Then ' Note: SO-Helper Applications are partly treated like templates although they only have documents .hlnTemplates.Label = sProgressMoreDocs @@ -212,6 +217,8 @@ Dim bDoEnable as Boolean .TemplateExportPath.Enabled = bDoEnable .TemplateSearchSubDir.Enabled = bDoEnable .TemplateImportPath.Enabled = bDoEnable + .Button1.Enabled = bDoEnable + .Button2.Enabled = bDoEnable If Not bDoEnable Then .cbGoOn.Enabled = .DocumentPathCheckbox.State = 1 Else @@ -230,6 +237,8 @@ Dim bDoEnable as Boolean .DocumentSearchSubDir.Enabled = bDoEnable .DocumentImportPath.Enabled = bDoEnable .DocumentExportPath.Enabled = bDoEnable + .Button3.Enabled = bDoEnable + .Button4.Enabled = bDoEnable End With ToggleNextButton() End Sub @@ -285,6 +294,7 @@ End Function Sub FillStep_Summary() ' Todo: Angabe über die Vorlagengruppen,bzw. Template-Exportpfad + ImportDialogArea.Title = sTitle With ImportDialog .SummaryTextbox.Text = MakeSummaryString() .cbGoOn.Enabled = .SummaryTextbox.Text <> "" @@ -384,7 +394,7 @@ Sub SetupXMLConfiguration() XMLFilterName(5,2) = "stc" XMLFilterName(6,0) = "application/vnd.stardivision.impress;application/x-starimpress|application/vnd.stardivision.draw;application/x-stardraw" - XMLFilterName(6,1) = "simpress: impress_StarOffice_XML_Impress_Template|draw_StarOffice_XML_Draw_Template" + XMLFilterName(6,1) = "simpress: impress_StarOffice_XML_Impress_Template|sdraw: draw_StarOffice_XML_Draw_Template" XMLFilterName(6,2) = "sti|std" XMLFilterName(7,0) = "sgl" @@ -495,5 +505,4 @@ Dim oRefControl oRefControl = ImportDialogArea.GetControl(RefControlName) GetFolderName(oRefControl.Model) ToggleNextButton() -End Sub -</script:module>
\ No newline at end of file +End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/FilesModul.xba b/wizards/source/importwizard/FilesModul.xba index 3e121258e..a7ffbc641 100644 --- a/wizards/source/importwizard/FilesModul.xba +++ b/wizards/source/importwizard/FilesModul.xba @@ -316,15 +316,7 @@ Dim i as Integer Dim bLogExists as Boolean If ImportDialog.chkLogfile.State = 1 Then i = 2 -'Dim oArg() as new com.sun.star.beans.PropertyValue -'Dim oUrl as new com.sun.star.util.URL -'Dim oDisp as Object -' oUrl.Complete = "private:factory/swriter" -' oDisp = StarDesktop.currentFrame.queryDispatch(oUrl, "_self", 0) -' oDisp = StarDesktop.currentFrame.queryDispatch(oUrl, "_self", 0) - -' oDisp.dispatch(oUrl, oArg()) - oLogDocument = StarDesktop.LoadComponentFromURL("private:factory/swriter", "_blank", 4, NoArgs())' HiddenProperties()) ' HiddenProperties()) + oLogDocument = StarDesktop.LoadComponentFromURL("private:factory/swriter", "_blank", 4, NoArgs())' HiddenProperties()) ' HiddenProperties()) oLogCursor = oLogDocument.Text.CreateTextCursor oLogTable = oLogDocument.CreateInstance("com.sun.star.text.TextTable") oLogCursor.Text.InsertTextContent(oLogCursor, oLogTable, True) @@ -333,7 +325,7 @@ Dim bLogExists as Boolean oLogCursor = oLogTable.GetCellbyPosition(1,0).createTextCursor oLogCursor.SetString(sTargetDocuments) bInsertRow = False - ' Todo: Strings in Resourcen +' Todo: Strings in Resourcen sLogUrl = SOWorkPath & "/Logfile.sxw" Do bLogExists = oUcb.Exists(sLogUrl) diff --git a/wizards/source/importwizard/ImportDialog.xdl b/wizards/source/importwizard/ImportDialog.xdl index 24057f3b5..9f273e697 100644 --- a/wizards/source/importwizard/ImportDialog.xdl +++ b/wizards/source/importwizard/ImportDialog.xdl @@ -1,16 +1,16 @@ <?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="ImportDialog" dlg:title="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="2" dlg:help-url="HID:34570"> +<dlg:window xmlns:dlg="http://openoffice.org/2000/dialog" xmlns:script="http://openoffice.org/2000/script" dlg:id="ImportDialog" dlg:title="ImportDialog" dlg:left="96" dlg:top="28" dlg:width="270" dlg:height="210" dlg:page="1" dlg:help-url="HID:34570"> <dlg:bulletinboard> <dlg:text dlg:id="TemplateExportLabel" dlg:tab-index="0" dlg:left="12" dlg:top="94" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="TemplateExportLabel"/> <dlg:textfield dlg:id="TemplateImportPath" dlg:tab-index="1" dlg:left="73" dlg:top="76" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34583"> <script:event script:event-name="on-textchange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:textfield> <dlg:textfield dlg:id="TemplateExportPath" dlg:tab-index="2" dlg:left="73" dlg:top="92" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34584"/> - <dlg:checkbox dlg:id="DocumentPathCheckbox" dlg:tab-index="3" dlg:left="12" dlg:top="121" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34586" dlg:value="DocumentPathCheckbox"> + <dlg:checkbox dlg:id="DocumentPathCheckbox" dlg:tab-index="3" dlg:left="12" dlg:top="121" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34586" dlg:value="DocumentPathCheckbox" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.DialogModul.SetEnabledDocument_InputPath" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="DocumentSearchSubDir" dlg:tab-index="4" dlg:left="12" dlg:top="134" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34587" dlg:value="DocumentSearchSubDir"/> + <dlg:checkbox dlg:id="DocumentSearchSubDir" dlg:tab-index="4" dlg:left="12" dlg:top="134" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34587" dlg:value="DocumentSearchSubDir" dlg:checked="false"/> <dlg:text dlg:id="DocumentImportLabel" dlg:tab-index="5" dlg:left="10" dlg:top="151" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="DocumentImportLabel"/> <dlg:text dlg:id="DocumentExportLabel" dlg:tab-index="6" dlg:left="10" dlg:top="167" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="DocumentExportLabel"/> <dlg:textfield dlg:id="DocumentImportPath" dlg:tab-index="7" dlg:left="73" dlg:top="149" dlg:width="170" dlg:height="12" dlg:page="2" dlg:help-url="HID:34588"> @@ -28,12 +28,8 @@ <dlg:button dlg:id="cbBack" dlg:tab-index="17" dlg:left="155" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34573" dlg:value="cbBack"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ImportWizard.Main.PrevStep" script:language="StarBasic"/> </dlg:button> - <dlg:button dlg:id="cbCancel" dlg:tab-index="18" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34572" dlg:value="cbCancel"> - <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ImportWizard.Main.CallCancelTask" script:language="StarBasic"/> - </dlg:button> - <dlg:button dlg:id="cbHelp" dlg:tab-index="19" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="14" dlg:tag="34571" dlg:help-url="HID:34571" dlg:value="cbHelp"> - <script:event script:event-name="on-performaction" script:location="application" script:macro-name="Tools.Recursive.ShowHelperDialog" script:language="StarBasic"/> - </dlg:button> + <dlg:button dlg:id="cbCancel" dlg:tab-index="18" dlg:left="6" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34572" dlg:value="cbCancel" dlg:button-type="cancel"/> + <dlg:button dlg:id="cbHelp" dlg:tab-index="19" dlg:left="65" dlg:top="190" dlg:width="50" dlg:height="14" dlg:tag="34571" dlg:value="cbHelp"/> <dlg:button dlg:id="cbGoOn" dlg:tab-index="20" dlg:left="214" dlg:top="190" dlg:width="50" dlg:height="14" dlg:help-url="HID:34574" dlg:value="cbGoOn"> <script:event script:event-name="on-performaction" script:location="application" script:macro-name="ImportWizard.Main.NextStep" script:language="StarBasic"/> </dlg:button> @@ -59,34 +55,34 @@ <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleCheckboxes" script:language="StarBasic"/> </dlg:radio> </dlg:radiogroup> - <dlg:checkbox dlg:id="ChkFirstSOApplication" dlg:tab-index="29" dlg:left="12" dlg:top="85" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34596" dlg:value="ChkFirstSOApplication"> + <dlg:checkbox dlg:id="ChkFirstSOApplication" dlg:tab-index="29" dlg:left="12" dlg:top="85" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34596" dlg:value="ChkFirstSOApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="ChkSecondSOApplication" dlg:tab-index="30" dlg:left="136" dlg:top="85" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34597" dlg:value="ChkSecondSOApplication"> + <dlg:checkbox dlg:id="ChkSecondSOApplication" dlg:tab-index="30" dlg:left="136" dlg:top="85" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34597" dlg:value="ChkSecondSOApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="ChkThirdSOApplication" dlg:tab-index="31" dlg:left="12" dlg:top="98" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34598" dlg:value="ChkThirdSOApplication"> + <dlg:checkbox dlg:id="ChkThirdSOApplication" dlg:tab-index="31" dlg:left="12" dlg:top="98" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34598" dlg:value="ChkThirdSOApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="ChkFourthSOApplication" dlg:tab-index="32" dlg:left="136" dlg:top="98" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34599" dlg:value="ChkFourthSOApplication"> + <dlg:checkbox dlg:id="ChkFourthSOApplication" dlg:tab-index="32" dlg:left="136" dlg:top="98" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34599" dlg:value="ChkFourthSOApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="ChkFirstMSApplication" dlg:tab-index="33" dlg:disabled="true" dlg:left="12" dlg:top="126" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34578" dlg:value="ChkFirstMSApplication"> + <dlg:checkbox dlg:id="ChkFirstMSApplication" dlg:tab-index="33" dlg:disabled="true" dlg:left="12" dlg:top="126" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34578" dlg:value="ChkFirstMSApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="ChkSecondMSApplication" dlg:tab-index="34" dlg:disabled="true" dlg:left="136" dlg:top="126" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34579" dlg:value="ChkSecondMSApplication"> + <dlg:checkbox dlg:id="ChkSecondMSApplication" dlg:tab-index="34" dlg:disabled="true" dlg:left="136" dlg:top="126" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34579" dlg:value="ChkSecondMSApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="ChkThirdMSApplication" dlg:tab-index="35" dlg:disabled="true" dlg:left="12" dlg:top="139" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34580" dlg:value="ChkThirdMSApplication"> + <dlg:checkbox dlg:id="ChkThirdMSApplication" dlg:tab-index="35" dlg:disabled="true" dlg:left="12" dlg:top="139" dlg:width="120" dlg:height="9" dlg:page="1" dlg:help-url="HID:34580" dlg:value="ChkThirdMSApplication" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.Main.ToggleNextButton" script:language="StarBasic"/> </dlg:checkbox> <dlg:text dlg:id="WelcomeTextLabel2" dlg:tab-index="36" dlg:disabled="true" dlg:left="6" dlg:top="152" dlg:width="258" dlg:height="18" dlg:page="1" dlg:value="WelcomeTextLabel2" dlg:multiline="true"/> - <dlg:checkbox dlg:id="TemplateCheckbox" dlg:tab-index="37" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34581" dlg:value="TemplateCheckbox"> + <dlg:checkbox dlg:id="TemplateCheckbox" dlg:tab-index="37" dlg:left="12" dlg:top="48" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34581" dlg:value="TemplateCheckbox" dlg:checked="false"> <script:event script:event-name="on-itemstatechange" script:location="application" script:macro-name="ImportWizard.DialogModul.SetEnabledTemplate_InputPath" script:language="StarBasic"/> </dlg:checkbox> - <dlg:checkbox dlg:id="TemplateSearchSubDir" dlg:tab-index="38" dlg:left="12" dlg:top="61" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34582" dlg:value="TemplateSearchSubDir"/> + <dlg:checkbox dlg:id="TemplateSearchSubDir" dlg:tab-index="38" dlg:left="12" dlg:top="61" dlg:width="240" dlg:height="10" dlg:page="2" dlg:help-url="HID:34582" dlg:value="TemplateSearchSubDir" dlg:checked="false"/> <dlg:text dlg:id="TemplateImportLabel" dlg:tab-index="39" dlg:left="12" dlg:top="78" dlg:width="60" dlg:height="8" dlg:page="2" dlg:value="TemplateImportLabel"/> - <dlg:checkbox dlg:id="chkLogfile" dlg:tab-index="40" dlg:left="6" dlg:top="171" dlg:width="136" dlg:height="9" dlg:page="1" dlg:help-url="HID:34577" dlg:value="chkLogfile"/> + <dlg:checkbox dlg:id="chkLogfile" dlg:tab-index="40" dlg:left="6" dlg:top="171" dlg:width="136" dlg:height="9" dlg:page="1" dlg:help-url="HID:34577" dlg:value="chkLogfile" dlg:checked="false"/> <dlg:fixedline dlg:id="hlnTemplates" dlg:tab-index="41" dlg:left="6" dlg:top="37" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnTemplates"/> <dlg:fixedline dlg:id="hlnDocuments" dlg:tab-index="42" dlg:left="6" dlg:top="110" dlg:width="258" dlg:height="8" dlg:page="2" dlg:value="hlnDocuments"/> <dlg:fixedline dlg:id="FixedLine1" dlg:tab-index="43" dlg:left="6" dlg:top="181" dlg:width="258" dlg:height="6"/> diff --git a/wizards/source/importwizard/Language.xba b/wizards/source/importwizard/Language.xba index 8dc3e2a4e..4ad26c5a6 100644 --- a/wizards/source/importwizard/Language.xba +++ b/wizards/source/importwizard/Language.xba @@ -102,7 +102,6 @@ Sub LoadLanguage() GetApplResourceArray(3110, 4, sSumSOTemplates()) GetApplResourceArray(3200, 3, sSumMSDocuments()) GetApplResourceArray(3210, 3, sSumMSTemplates()) - ImportDialogArea.Title = sTitle With ImportDialog sImportLabel = GetResText(1033) sExportLabel = GetResText(1034) @@ -128,5 +127,4 @@ Dim a as Integer BigArray(a) = GetResText(i) a = a + 1 Next -End Sub -</script:module>
\ No newline at end of file +End Sub</script:module>
\ No newline at end of file diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba index cd7afc948..3d0b6a66a 100644 --- a/wizards/source/importwizard/Main.xba +++ b/wizards/source/importwizard/Main.xba @@ -14,6 +14,7 @@ Public bSetFonts as Boolean Public bConversionIsRunnig as Boolean Sub Main() +Dim RetValue as Integer BasicLibraries.LoadLibrary("Tools") bSetFonts = False bConversionIsRunnig = False @@ -39,7 +40,11 @@ Sub Main() RepaintHeaderPreview() SetStates() ImportDialog.cbGoOn.DefaultButton = True - ImportDialogArea.Execute() + ImportDialogArea.GetControl("OptSODocuments").SetFocus() + RetValue = ImportDialogArea.Execute() + If RetValue = 0 Then + CallCancelTask() + End If ImportDialogArea.Dispose() End Exit Sub @@ -223,5 +228,4 @@ Sub TakeOverPathSettings() Applications(CurOffice,SBTEMPLTARGET) = Applications(0,SBTEMPLTARGET) End If End If -End Sub -</script:module>
\ No newline at end of file +End Sub</script:module>
\ No newline at end of file |