summaryrefslogtreecommitdiff
path: root/wizards
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-08-19 23:36:52 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-08-22 09:39:13 +0100
commit2f9cf699aa4387d76f11ade915b1f1b4d9dd7f35 (patch)
tree3b91ad97d63157b126867222c85a1b30399b93c1 /wizards
parent39aecb765dfc68c507c407e934d6959616df80b2 (diff)
Resolves: fdo#36127 hide staroffice filters when binfilter unavailable
Diffstat (limited to 'wizards')
-rw-r--r--wizards/source/importwizard/Main.xba24
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
&apos; If the ProgressPage ist already on Top The Dialog will be immediately closed when this flag is
&apos; set to False
@@ -43,7 +44,9 @@ Sub Main()
ImportDialog.ImportPreview.BackGroundColor = RGB(0,60,126)
ImportDialog.cmdGoOn.DefaultButton = True
ImportDialogArea.GetControl(&quot;optMSDocuments&quot;).SetFocus()
- ToggleCheckboxesWithBoolean(False)
+ oBinFilterComp = createUnoService( &quot;com.sun.star.comp.office.BF_MigrateFilter&quot; )
+ 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 = &quot;MS&quot;
- ToggleCheckBoxesWithBoolean(bMSEnable)
+ ToggleCheckboxesWithBoolean(bMSEnable)
End Sub
@@ -219,10 +223,18 @@ Sub ToggleCheckboxesWithBoolean(bMSEnable as Boolean)
MaxApplCount = 4
End If
With ImportDialogArea
- .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
+ 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