@@ -74,6 +74,8 @@ public abstract class Util {
7474
7575 private static final Set <String > spreadsheetExts = new HashSet <>(Arrays .asList (".xls" , ".xlsm" , ".xlsx" , ".ods" ));
7676
77+ private static final Set <String > presentationExts = new HashSet <>(Arrays .asList (".ppt" , ".pptx" , ".pptm" , ".odp" ));
78+
7779 private static final Set <String > imageExts = new HashSet <>(
7880 Arrays .asList (".gif" , ".jpg" , ".jpeg" , ".bmp" , ".tif" , ".tiff" , ".png" , ".jfif" , ".webp" ));
7981
@@ -301,8 +303,8 @@ public static String fileNameIcon(String iconName, int size) {
301303 long shortcutSize = Math .round (size * 0.625D );
302304 long shortcutMarginTop = Math .round (size * 0.4375D );
303305 long shortcutMarginLeft = Math .round (size * 0.6D );
304- sb .append (IMG_SRC + fileIconUrl ("shortcut.svg" ) + WIDTH + shortcutSize + PX_HEIGHT
305- + shortcutSize + "px' style='position:absolute; z-index:1; margin-top: " + shortcutMarginTop
306+ sb .append (IMG_SRC + fileIconUrl ("shortcut.svg" ) + WIDTH + shortcutSize + PX_HEIGHT + shortcutSize
307+ + "px' style='position:absolute; z-index:1; margin-top: " + shortcutMarginTop
306308 + "px; margin-left:" + shortcutMarginLeft + "px'/>" );
307309 }
308310
@@ -318,8 +320,8 @@ public static String fileNameIcon(String iconName, int size) {
318320 iconName = baseIconName ;
319321 }
320322
321- sb .append ("<img class='filenameIcon' src='" + fileIconUrl (iconName + ".svg" ) + WIDTH + size
322- + PX_HEIGHT + size + "px' />" );
323+ sb .append ("<img class='filenameIcon' src='" + fileIconUrl (iconName + ".svg" ) + WIDTH + size + PX_HEIGHT + size
324+ + "px' />" );
323325
324326 sb .append (END_DIV );
325327 return sb .toString ();
@@ -452,6 +454,10 @@ public static boolean isSpreadsheetFile(String fileName) {
452454 return spreadsheetExts .stream ().anyMatch (ext -> fileName .toLowerCase ().endsWith (ext ));
453455 }
454456
457+ public static boolean isPresentationFile (String fileName ) {
458+ return presentationExts .stream ().anyMatch (ext -> fileName .toLowerCase ().endsWith (ext ));
459+ }
460+
455461 public static boolean isDICOMFile (String fileName ) {
456462 return dicomExts .stream ().anyMatch (ext -> fileName .toLowerCase ().endsWith (ext ));
457463 }
0 commit comments