diff options
author | Caolán McNamara <caolanm@redhat.com> | 2011-08-19 23:36:52 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-08-22 09:39:13 +0100 |
commit | 2f9cf699aa4387d76f11ade915b1f1b4d9dd7f35 (patch) | |
tree | 3b91ad97d63157b126867222c85a1b30399b93c1 /wizards | |
parent | 39aecb765dfc68c507c407e934d6959616df80b2 (diff) |
Resolves: fdo#36127 hide staroffice filters when binfilter unavailable
Diffstat (limited to 'wizards')
-rw-r--r-- | wizards/source/importwizard/Main.xba | 24 |
1 files changed, 18 insertions, 6 deletions
diff --git a/wizards/source/importwizard/Main.xba b/wizards/source/importwizard/Main.xba index e0e7d7071c8b..8084fda702cb 100644 --- a/wizards/source/importwizard/Main.xba +++ b/wizards/source/importwizard/Main.xba @@ -8,6 +8,7 @@ Public ImportDialog as Object Public ImportDialogArea as Object Public oFactoryKey as Object Public bShowLogFile as Boolean +Public oBinFilterComp as Object ' If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is ' set to False @@ -43,7 +44,9 @@ Sub Main() ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126) ImportDialog.cmdGoOn.DefaultButton = True ImportDialogArea.GetControl("optMSDocuments").SetFocus() - ToggleCheckboxesWithBoolean(False) + oBinFilterComp = createUnoService( "com.sun.star.comp.office.BF_MigrateFilter" ) + ToggleCheckboxesWithBoolean(True) + RetValue = ImportDialogArea.Execute() If bShowLogFile=TRUE Then OpenDocument(sLogUrl, NoArgs()) @@ -125,6 +128,7 @@ Dim iCurStep as Integer FillStep_InputPaths(CurOffice, False) Else FillStep_Welcome() + ToggleCheckboxesWithBoolean(True) bDoKeepApplValues = True End If End Select @@ -206,7 +210,7 @@ Sub ToggleCheckboxes(oEvent as Object) Dim bMSEnable as Boolean WizardMode = oEvent.Source.Model.Tag bMSEnable = WizardMode = "MS" - ToggleCheckBoxesWithBoolean(bMSEnable) + ToggleCheckboxesWithBoolean(bMSEnable) End Sub @@ -219,10 +223,18 @@ Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean) MaxApplCount = 4 End If With ImportDialogArea - .GetControl("chkSOApplication1").Model.Enabled = Not bMSEnable - .GetControl("chkSOApplication2").Model.Enabled = Not bMSEnable - .GetControl("chkSOApplication3").Model.Enabled = Not bMSEnable - .GetControl("chkSOApplication4").Model.Enabled = Not bMSEnable + If (isNull(oBinFilterComp)) Then + .GetControl("optSODocuments").Visible = False + .GetControl("chkSOApplication1").Visible = False + .GetControl("chkSOApplication2").Visible = False + .GetControl("chkSOApplication3").Visible = False + .GetControl("chkSOApplication4").Visible = False + Else + .GetControl("chkSOApplication1").Model.Enabled = Not bMSEnable + .GetControl("chkSOApplication2").Model.Enabled = Not bMSEnable + .GetControl("chkSOApplication3").Model.Enabled = Not bMSEnable + .GetControl("chkSOApplication4").Model.Enabled = Not bMSEnable + End if .GetControl("chkMSApplication1").Model.Enabled = bMSEnable .GetControl("chkMSApplication2").Model.Enabled = bMSEnable .GetControl("chkMSApplication3").Model.Enabled = bMSEnable |