@@ -307,7 +307,7 @@ private void applySecurityPolicies(GUIAccessControlEntry allowedPermissions, fin
307307
308308 applyDownloadSecurity (allowedPermissions , someSelection , justOneSelected );
309309
310- applyOfficeSecurity (allowedPermissions , justOneSelected );
310+ applyOfficeSecurity (allowedPermissions , selection , justOneSelected );
311311
312312 convert .setEnabled (justOneSelected && Feature .enabled (Feature .FORMAT_CONVERSION ));
313313 archive .setEnabled (someSelection && allowedPermissions .isArchive () && Feature .enabled (Feature .ARCHIVING ));
@@ -334,9 +334,11 @@ private void applySplitSecurity(GUIAccessControlEntry enabledPermissions, List<G
334334 merge .setEnabled (moreSelected && enabledPermissions .isWrite ());
335335 }
336336
337- private void applyOfficeSecurity (GUIAccessControlEntry enabledPermissions , boolean justOneSelected ) {
337+ private void applyOfficeSecurity (GUIAccessControlEntry enabledPermissions , List <GUIDocument > selection ,
338+ boolean justOneSelected ) {
338339 office .setEnabled (justOneSelected && Feature .enabled (Feature .OFFICE ) && enabledPermissions .isWrite ()
339- && enabledPermissions .isDownload () && Util .isOfficeFile (grid .getSelectedDocument ().getFileName ()));
340+ && enabledPermissions .isDownload () && Util .isOfficeFile (grid .getSelectedDocument ().getFileName ())
341+ && checkStatusInSelection (Constants .DOC_UNLOCKED , selection ));
340342 }
341343
342344 private void applyDownloadSecurity (GUIAccessControlEntry enabledPermissions , boolean someSelection ,
0 commit comments