Bug 67874 - No icon association with MS Office and 3rd party files in Info.plist
Summary: No icon association with MS Office and 3rd party files in Info.plist
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All macOS (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA target:7.1.0
Keywords: skillUI, topicUI
: 117169 (view as bug list)
Depends on:
Blocks: macOS-UI-polish
  Show dependency treegraph
 
Reported: 2013-08-07 17:23 UTC by Joshua
Modified: 2022-06-08 19:49 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
MS Files showing blank generic icon (85.24 KB, image/png)
2018-06-26 15:52 UTC, 5umi0efkb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joshua 2013-08-07 17:23:17 UTC
Problem description: 
Files created in MS Office Suite don't show icons related with its contents or application to open them like in GNU/Linux or MS Windows. Instead, files on OSX maintain a blank icon as if there is not a program association related to the file. 

Steps to reproduce:
1. Download and copy LibreOffice app to the applications folder on MAC OSX.
2. Start LibreOffice and open any file.
3. Wait to get file association whit the LibreOffice application.

Current behavior:
When file association occurs, documents from MS Office would not show icons related to its contents nor the app wich opens them, instead, them will maintain the "unknown" file format icon.

Expected behavior:
As soon as file association with LibreOffice occurs, MS Office files should show and icon that identifies them as document, presentation or spreadsheet. For example a .DOC or .DOCX document should be showed with the oasis-text.icns icon.
              
Operating System: Mac OS X
Version: 4.1.0.4 release
Comment 1 retired 2013-11-22 15:05:02 UTC
Agreed and confirmed. Setting to NEW.
Comment 2 QA Administrators 2015-04-19 03:21:45 UTC Comment hidden (obsolete)
Comment 3 QA Administrators 2016-09-20 09:24:18 UTC Comment hidden (obsolete)
Comment 4 eisa01 2017-08-26 14:03:58 UTC
Still present for me

You have to check it in list view, otherwise quick look will show the contents of the file

Testing is a bit finicky, I actually ended up with the default Word icon, but it was blank inbetween, and never the oasis-text icon as odt files have.

Version: 5.4.0.3
Mac OS X 10.12.6
Comment 5 eisa01 2018-05-10 12:35:21 UTC
*** Bug 117169 has been marked as a duplicate of this bug. ***
Comment 6 5umi0efkb 2018-05-13 21:43:04 UTC
Still present in LO 6.0.3.2 in MacOS 10.13.4. Here is the list of file types that should show an icon and do not. They show the generic blank icon of the unknown file types.

LO has been fresh installed and icon cache deleted as well before. LO is the default application for all those file types.

.xlt, .xls, .xlsm, .xlsx (both variants), .pps, .pot, .ppt, .ppsx (both variants), .potm (both variants), .pptx (both variants), .dot, .doc, .docx (both variants), .docm, .pptm.

Suggested bug fix. I suggest those MS Office documents files to show oasis-text.icns, oasis-spreadsheet.icns, oasis-presentation.icns and MS document templates to show oasis-text-template.icns, oasis-spreadsheet-template.icns and oasis-presentation-template.icns.

Operative System:MacOS 10.13.4
Version: 6.0.3.2
Comment 7 eisa01 2018-05-15 22:17:54 UTC
Could someone without MS Office check if this was still present in OpenOffice 3.3?
https://downloadarchive.documentfoundation.org/libreoffice/old/3.3.0.4/mac/x86/LibO_3.3.0_MacOS_x86_install_en-US.dmg

I had a look in the info.plist and icons are not declared for MS office file formats AFAICT

Looking on the file on git I can't identify this ever being the case:
https://cgit.freedesktop.org/libreoffice/core/log/sysui/desktop/macosx/Info.plist?id=6e78fd18c9ca2d70af93cad321f55f3d72172742
Although I'm not 100% sure that file is the same as the app bundle?

Shouldn't actually be too hard to implement, although to me it's an open question whether CFBundleTypeIconFile or UTTypeIconFile should be used
Comment 8 5umi0efkb 2018-06-23 12:53:09 UTC
(In reply to eisa01 from comment #7)
> Could someone without MS Office check if this was still present in
> OpenOffice 3.3?
> https://downloadarchive.documentfoundation.org/libreoffice/old/3.3.0.4/mac/
> x86/LibO_3.3.0_MacOS_x86_install_en-US.dmg
> 
> I had a look in the info.plist and icons are not declared for MS office file
> formats AFAICT
> 
> Looking on the file on git I can't identify this ever being the case:
> https://cgit.freedesktop.org/libreoffice/core/log/sysui/desktop/macosx/Info.
> plist?id=6e78fd18c9ca2d70af93cad321f55f3d72172742
> Although I'm not 100% sure that file is the same as the app bundle?
> 
> Shouldn't actually be too hard to implement, although to me it's an open
> question whether CFBundleTypeIconFile or UTTypeIconFile should be used

Since there is no reference in the LO3.3 info.plist file to file type icon associated to oasis nor file- icons, I assume the bug was already present in that version.

I can confirm, though, that in the latest available version (4.1.5) of Open Office for Mac this bug is present too. It may be reasonable to think (but I am not stating it though) that this bug was simply inherited from OO, and that no one has worked it around yet.

I lack coding knowledge so i can not answer your question, but CFBundleTypeIconFile seems to be the most widespread way to assign file type icons in the info.plist files all over many apps for mac. That could be given a try.
Comment 9 5umi0efkb 2018-06-23 14:25:28 UTC
I can not solve this issue. As far as my knowledge allows me, changing Info.plist to try to register those icons makes no change at all for none of the file types.

I can confirm, though that LO3.3 DID have this bug. AOOo also has this bug, I mark it as Inherited from OOo. I update "Version" tag of this bug.

Mac Os 10.13.5
LO 6.0.5
Comment 10 5umi0efkb 2018-06-25 11:05:20 UTC
This bug seems to be closely related to this other one: bug 98540. They are not identical though, since this one is on MS files and the other on ODF but extensible to this in my oppinion since both involve info.plist.
Comment 11 5umi0efkb 2018-06-26 15:52:54 UTC
Created attachment 143135 [details]
MS Files showing blank generic icon
Comment 12 QA Administrators 2019-06-27 02:53:08 UTC Comment hidden (obsolete)
Comment 13 eisa01 2019-08-10 20:41:39 UTC
No commits AFAICT to the Info.plist, so this must still be present
Comment 14 eisa01 2020-05-10 11:50:18 UTC
Ok, so the issue is that LO does not declare icons on the "Imported Type UTIs" in the Info.plist (and neither on the "Document types")

LO also only declares .docx as imported, .doc is only under Document type under "3rd party formats"

That means that at minimum "3rd party formats" need to be restructured, as it mixes e.g., documents and spreadsheets. It would probably be better to add many of those to the "Imported Type UTIs"

Reading this Stack overflow article [1], it seems like setting the icons on the Exported/imported UTIs is best practice.

In principle this is something I should be able to fix, but getting up the build and gerrit environment seems like a momentous task...

[1] https://stackoverflow.com/questions/21937978/what-are-utimportedtypedeclarations-and-utexportedtypedeclarations-used-for-on-i

UTI documentation:
https://developer.apple.com/library/archive/documentation/FileManagement/Conceptual/understanding_utis/understand_utis_intro/understand_utis_intro.html#//apple_ref/doc/uid/TP40001319-CH201-SW1
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CocoaKeys.html#//apple_ref/doc/uid/TP40009251-SW8

Document Types documentation:
https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html#//apple_ref/doc/uid/TP40009249-101685-TPXREF107
Comment 15 eisa01 2020-05-21 10:17:30 UTC
Patch submitted for most of the files declared by "Imported Type UTIs":
https://gerrit.libreoffice.org/c/core/+/94625

This would not add icons for .doc etc. which required a bit more restructuring
Comment 16 Commit Notification 2020-06-07 07:26:00 UTC
Eivind Samseth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/4c38441c3ae5f13aa61bb429b82f080afd9ed205

tdf#67874 Add generic icons to most 3rd party formats

It will be available in 7.1.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 QA Administrators 2022-06-08 03:31:45 UTC Comment hidden (obsolete)
Comment 18 Nazrul deCastelnau 2022-06-08 19:49:14 UTC
I see an .xls document with an icon that has a spreadsheet background and a bigger XLS lettering in front.  Works for me; at least it is not the generic blank document I used to see before.  Thanks!


Version: 7.3.0.3 / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 8; OS: Mac OS X 11.6.6; UI render: Skia/Metal; VCL: osx
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded