Bug 111344 - Icon of Web Query files should be Calc icon
Summary: Icon of Web Query files should be Calc icon
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All Windows (All)
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-04 14:30 UTC by Volga
Modified: 2022-08-23 11:07 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot (42.30 KB, image/png)
2017-08-04 14:31 UTC, Volga
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Volga 2017-08-04 14:30:52 UTC
Description:
LibreOffice have already supported Web Query (.iqy) files since bug 106359 is fixed, and the files can be opened with LO Calc, however, the icon is not the same as Calc, using default LO icon instead.

Steps to Reproduce:
1. Download attachment 131676 [details] 

Actual Results:  
The icon looks the same as soffice.exe, while the file is selected, the toolbar of File Explorer shows that this file type is associatied with LO Calc, and Calc icon is displaying there.

Expected Results:
Once .iqy file is associatied with LO Calc, the icon should be the same as scalc.exe.


Reproducible: Always

User Profile Reset: No

Additional Info:
Version: 5.4.0.3 (x64)
Build ID:7556cbc6811c9d992f4064ab9287069087d7f62c
CPU 线程:4; 操作系统:Windows 6.19; UI 渲染:默认; 
Locale: zh-CN (zh_CN); Calc: group


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0
Comment 1 Volga 2017-08-04 14:31:49 UTC
Created attachment 135129 [details]
Screenshot
Comment 2 V Stuart Foote 2017-08-04 17:50:59 UTC
Confirming on Windows 10 Ent 64-bit en-US with file association made to LibreOffice Calc
Version: 5.4.0.3 (x64)
Build ID: 7556cbc6811c9d992f4064ab9287069087d7f62c
CPU threads: 8; OS: Windows 6.19; UI render: GL; 
Locale: en-US (en_US); Calc: group

The Windows shell integration shows it as generic ODF icon. 

And as Miguel Angel notes on bug 106359 it opens to Writer rather than Calc via shell, while opening from Calc does open the import dialog there.
Comment 3 Adolfo Jayme Barrientos 2017-08-08 13:17:32 UTC
We generally don’t have any MIME type icons for any of the formats we support (e.g., a Writer document will use the same icon as the Writer application). This is a shame, because it dilutes the brand, but that’s how it’s been since LibreOffice started. I was hoping that when volunteers showed up to design new icons for LibreOffice this issue would be discussed by the design folks, but talks stopped and nothing came out of it.
Comment 4 Heiko Tietze 2018-01-31 10:47:19 UTC
Suggest to use oasis-web-template (https://opengrok.libreoffice.org/xref/core/sysui/desktop/icons/oasis-web-template.ico). We probably have to create a WinResTarget_*.mk.

Mike, can you please have a look as you did the first step with the iqy file type.

PS: LibO6 has module specific MIME icons on W10. On Linux it's up to the icon theme installed with the system what icon is used. Looks bad here with Adwaita on pcmanfm.
Comment 5 Mike Kaganski 2018-01-31 13:44:51 UTC
(In reply to Heiko Tietze from comment #4)

Well... *mostly* it should relate to Calc (as it is used most often - always - by MS). (The proposal relates to Writer AFAICS.)
Comment 6 Heiko Tietze 2018-01-31 18:19:46 UTC
(In reply to Mike Kaganski from comment #5)
> Well... *mostly* it should relate to Calc (as it is used most often - always
> - by MS). (The proposal relates to Writer AFAICS.)

That's what we have https://wiki.documentfoundation.org/File:LibreOffice_Initial_Icons-pre_final.svg -> "Text HTML / Empty (Writer Web)" is not Calc, true
Comment 7 Mike Kaganski 2018-01-31 19:34:58 UTC
(In reply to Heiko Tietze from comment #6)

Heiko: well - that was my attempt to take part in taking design decisions :) - but I only suggested to find something hinting to Calc; still - I'm all for any decision you find doable+useful :)
Comment 8 Heiko Tietze 2018-04-07 15:38:03 UTC
Andreas, what is your opinion here?
Comment 9 Julien Nabet 2019-03-07 10:57:08 UTC
On Win10, building master sources, I noticed this:
cpp: <macro>:1 C:/BLP/core/scp2/source/calc/registryitem_calc.scp:1261 Bad token \text/x-ms-iqy produced by ##

Here's the line:
CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT( Iqy, IQY, iqy, text/x-ms-iqy )
(see https://opengrok.libreoffice.org/xref/core/scp2/source/calc/registryitem_calc.scp?r=39b39f12#1261)

Definition of CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT is here:
https://opengrok.libreoffice.org/xref/core/scp2/inc/macros.inc?r=45acf267#275
275 #define CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT(name,cond,key,mediatype) \
276     RegistryItem gid_Regitem__MediaType_DefExt_##name \
277         ParentID = PREDEFINED_HKEY_CLASSES_ROOT; \
278         ModuleID = gid_Module_Root_Reg_##name; \
279         Subkey = STRING(CONCAT2(MIME\Database\Content Type\,mediatype)); \
280         Name = STRING(Extension); \
281         Value = STRING(CONCAT2(.,key)); \
282         ComponentCondition = STRING(CONCAT3(REGISTER_,cond,=1)); \
283     End
Comment 10 Julien Nabet 2019-03-07 13:46:26 UTC
Since CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT is used once in the whole code, I thought about removing it + this patch:
diff --git a/scp2/source/calc/registryitem_calc.scp b/scp2/source/calc/registryitem_calc.scp
index a48a194522ed..ca0fc58921cd 100644
--- a/scp2/source/calc/registryitem_calc.scp
+++ b/scp2/source/calc/registryitem_calc.scp
@@ -1258,7 +1258,16 @@ CONDITIONAL_REGISTER_DOC_EXTENSION( Xlsm, gid_Module_Prg_Calc_MSO_Reg, xlsm, XLS
 CONDITIONAL_REGISTER_DOC_EXTENSION( Xlsb, gid_Module_Prg_Calc_MSO_Reg, xlsb, XLSB, MS_EXCEL_WORKSHEET, 3, scalc.exe, open, Calc )
 CONDITIONAL_REGISTER_DOC_OPEN_EXTENSION( Iqy, gid_Module_Prg_Calc_MSO_Reg, iqy, IQY, MS_EXCEL_WEBQUERY, 0, scalc.exe, open, Calc )
 CONDITIONAL_REGISTRY_ENTRY_EXT_MEDIATYPE( Iqy, IQY, iqy, text/x-ms-iqy )
-CONDITIONAL_REGISTRY_ENTRY_MEDIATYPE_DEF_EXT( Iqy, IQY, iqy, text/x-ms-iqy )
+
+RegistryItem gid_Regitem__MediaType_DefExt_Iqy
+    ParentID = PREDEFINED_HKEY_CLASSES_ROOT;
+    ModuleID = gid_Module_Root_Reg_Iqy;
+    Subkey = "MIME\Database\Content Type\text/x-ms-iqy";
+    Name = "Extension";
+    Value = ".iqy";
+    ComponentCondition = "REGISTER_IQY=1";
+End
+

At least, there's no the warning indicated but above all, it may help here.
Any thoughts?
Comment 11 Commit Notification 2019-03-08 10:37:13 UTC
Julien Nabet committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/13bc4a1c044091df08acf56695f2e00f2bd8fc2b%5E%21

Related tdf#111344: fix Bad token \text/x-ms-iqy

It will be available in 6.3.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 12 Julien Nabet 2019-03-08 10:52:36 UTC
Let's remove the target since it seems it won't help.
Comment 13 Heiko Tietze 2022-08-23 09:04:30 UTC
Julien, did your patch fix the issue?
Comment 14 Julien Nabet 2022-08-23 11:07:16 UTC
(In reply to Heiko Tietze from comment #13)
> Julien, did your patch fix the issue?

No.
I gave a try on Windows with LO 7.3.5, I created a empty file and renamed it with iqy extension, I can still reproduce the pb.