Description: Color filter choice is missing in filter field. Steps to Reproduce: 1.load test file 2.open autofilter dialog 3.open standard filter 4. in the first line of filter dialogue "color", select in second field "background" 5. in the third field you should see a choice of different color, you'll cell content instead Actual Results: - cell contents Expected Results: - a set of background color Reproducible: Always User Profile Reset: No Additional Info: tested in Version: 7.6.0.0.beta1+ (X86_64) / LibreOffice Community Build ID: a0ce0d4418ad92dd0e3a70cf698c549b544d6084 CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: fr-FR (fr_FR); UI: fr-FR Calc: CL threaded
Created attachment 187811 [details] test-file
In Filter by Color, I see the name of the colors, not the content; but comment 0 is not clear to me. Perhaps attaching a screenshot of what you see as incorrect would help? Additionally, attachment 187811 [details] from comment 1 mentions the following (which is not the same as comment 0): " test dark orange 4 -cell 11 background color color not present in color selector if cell is empty background color items not always present in standard filter " Such behavior depends on how you select the autofilter area: * If you just click on cell A1 and then Autofilter, the autofilter goes as far as the first empty cell in the column. * If, instead, you first select the relevant area (A1:A18, or the entire column A:A), then all the values and all the respective colors will be included in the autofilter list.
It seems the behavior is better with 7.6 beta. I can see now background-color selector in standard-filter. Version: 7.6.0.0.beta1+ (X86_64) / LibreOffice Community Build ID: a0ce0d4418ad92dd0e3a70cf698c549b544d6084 CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: fr-FR (fr_FR); UI: en-GB Calc: CL threaded I think the behaviour can confuse user... If we select all A column, not all colors are present in the sort selector. See Screenshot test-color-1.mp4 if we define a data range like A1-A18, all colors are now present. See screenshot test-color-2.mp4
Created attachment 188012 [details] Test autofilter wit background color, no selection, or A column selected
Created attachment 188013 [details] Test autofilter with background color, with range defined
STR for attachment 187811 [details]: 1. Deactivate Autofilter. 2. Select relevant area for each test case. 3. Activate Autofilter and follow the additional steps for: 3.1. Sort by color 3.2. Filter by color 3.3. Standard Filter by background color (In reply to Regis Perdreau from comment #3) > I think the behaviour can confuse user... > If we select all A column, not all colors are present in the sort selector. > See > Screenshot test-color-1.mp4 I see 8 colors in the sort list, in the filter list and in the standard filter. > if we define a data range like A1-A18, all colors are now present. See > screenshot test-color-2.mp4 Same as above. The only case in which the list of colors is "incomplete" is when the filter is applied when the selected area is limited to cell A1 only (or rather, no selected area, just cell A1 has the focus when Autofilter is initially activated). This is as I described in comment 2. So that would be NAB. Someone else would have to attempt to reproduce the behavior seen by the reporter.
Created attachment 188043 [details] Test autofilter wit background color, range A1-A18 defined
We have a standard filter with no possibility to choose background color (in autofilter) In Version: 7.5.4.2 (X86_64) / LibreOffice Community Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6 CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Vulkan; VCL: win Locale: fr-FR (fr_FR); UI: fr-FR Calc: threaded
(In reply to Regis Perdreau from comment #8) > We have a standard filter with no possibility to choose background color > (in autofilter) > In Version: 7.5.4.2 (X86_64) / LibreOffice Community You originally reported the behavior for LO 7.6+, and I've been testing (repeated times) with 7.6+ or newer Dev versions. As I already said, with such tests I have not reproduced the problems. I still could not repro with LO 7.5.3.2. I'll reset this from NEEDINFO to UNCONFIRMED, until someone can repro this. I'll change the Version field from 7.6.x to 7.5.4.2 too (for now). I have to wonder whether any of the Locale and/or UI language settings make any difference, considering the different resulting behavior I see. If there are problems with LO 7.5, perhaps some back-port / cherry-pick is needed.
(In reply to ady from comment #9) > I still could not repro with LO 7.5.3.2. > I have to wonder whether any of the Locale and/or UI language settings make > any difference, considering the different resulting behavior I see. Setting the UI to French (France), I can repro. Setting the UI to English (US), no repro. Setting to NEW.
(In reply to ady from comment #10) > Setting the UI to French (France), I can repro. > Setting the UI to English (US), no repro. The [META] bug 142076 is (ATM): (AutoFilter-Color) - [META] Color filtering in Autofilter bugs and enhancements I don't see a meta for Standard Filter - Color (neither background nor font). I am unsure whether to CC Samuel Mehrbrodt about this bug 155757. I am also not sure whether this is a "normal" bug, or instead it is related to some form of translation problem and/or UX/UI bug. Let's see if UX can help in any of these doubts > needsUXEval.
The fact that both font and background color show a spinbox (rather the expected list of applied colors) clearly indicate a missing implementation. All background or font colors of the selection should be listed. And ideally we can also include empty cells with a background- currently those are not available in any filter. Me doesn't hesitate to bother Samuel with this, the awesome developer who introduced the feature.
Got fooled by macOS. The dropdown lists the color of all cells with content except the first. Testing with yellow/1, red/2, green/3 and only red and green show up (or only green if A3 is empty). Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 6ae13c5fc5b28efeb1f6b75d4f6574bae20af37c CPU threads: 8; OS: Mac OS X 13.4.1; UI render: Skia/Metal; VCL: osx Locale: en-US (en_DE.UTF-8); UI: en-US Calc: threaded
(In reply to Heiko Tietze from comment #13) > Locale: en-US (en_DE.UTF-8); UI: en-US Please re-read comment 10. Regarding listing "no BC", that would be a different report (for which I don't see a problem). Regarding listing cells with no content, that would be a different report (and it is not clear to me what the problem would be, considering what I already posted in comment 2 and in comment 6).
So, are there any code pointers to understand this lack of l10n support ? If relevant. Regards.
It Work in DE, IT, ES with Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 218a7650a5cf03f895bed19c68d6f02daec536e9 CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win Locale: en-GB (en_GB); UI: fr-FR Calc: CL threaded But in French with the string "Couleur d'arrière-plan" the list of colour is not rendered... Is it possible to confirm that there is an encoding problem with this string ?
Created attachment 189017 [details] Backtrace When opening Standard Filter in the autofilter in French language, I get the following assert in a debug build: sc/source/ui/dbgui/filtdlg.cxx :117 : ScFilterDlg::ScFilterDlg(SfxBindings*, SfxChildWindow*, weld::Window*, const SfxItemSet&): l'assertion « m_xLbCond1->find_text(aStrBackgroundColor) != -1 » a échoué. Since there is no assertion failure when using English language, it seems to be related to the reported problem.
As I can see the problem here is caused by two instances of the text "Background color" that are capitalized differently in the French translation. 1. The string SCSTR_FILTER_BACKGROUND_COLOR_COND: #define SCSTR_FILTER_BACKGROUND_COLOR_COND NC_("STANDARDFILTERDIALOG_COND", "Background color") https://opengrok.libreoffice.org/xref/core/sc/inc/strings.hrc?r=bb5e0368#43 Translated as: "Couleur d'arrière-plan" https://translations.documentfoundation.org/translate/libo_ui-master/scmessages/fr/?checksum=54fb1a3892885776&sort_by=-priority,position source string description: sGJCz There's even a comment in the .hrc file: // This must match the translation of the same strings of standardfilterdialog|cond 2. Items in standardfilterdialog.ui <item translatable="yes" context="standardfilterdialog|cond">Background color</item> https://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/standardfilterdialog.ui?r=12606799#434 https://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/standardfilterdialog.ui?r=12606799#473 https://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/standardfilterdialog.ui?r=12606799#512 https://opengrok.libreoffice.org/xref/core/sc/uiconfig/scalc/ui/standardfilterdialog.ui?r=12606799#551 Translated as: "Couleur d'Arrière-plan" https://translations.documentfoundation.org/translate/libo_ui-master/scmessages/fr/?checksum=c4ed5542833dcf1c&sort_by=-priority,position source string description: 5Wa7m
I have to change this string "Couleur d'Arrière plan" by "Couleur arriere plan" to make the program run. (as other accepted language has only ascii letter) Neither "'" and "è" are accepted. I suspect an encoding problem but it's tricky to follow where. Could someone confirm ?
The problem is only with the different capitalization. Changing "Arrière" to "arrière" or vice versa in the respective strings should solve this issue.
I respectfully disagree. May be another underlaying problem...
I might've misunderstood, and there're more parts to this problem, but I'm fairly sure the reason why the colors aren't showing in French language is what I described. This is the assert: assert(m_xLbCond1->find_text(aStrBackgroundColor) != -1); https://opengrok.libreoffice.org/xref/core/sc/source/ui/dbgui/filtdlg.cxx?r=d84291f5#117 There are a couple of comparisons of one string with the other (the strings are described in comment 18), like this: OUString sSelectedCondition = maCondLbArr[nPos]->get_active_text(); if (sSelectedCondition == aStrFontColor) aColors = pList->maFilterEntries.getTextColors(); else if (sSelectedCondition == aStrBackgroundColor) aColors = pList->maFilterEntries.getBackgroundColors(); https://opengrok.libreoffice.org/xref/core/sc/source/ui/dbgui/filtdlg.cxx?r=d84291f5#648 It would be fairly easy to make the code do case-insensitive comparison as a "hack", which would solve this and similar cases, but there are also searches like the assert itself, and eg. this that tries to find the text among the items that'd require more complex workarounds that can be simply solved by fixing the translation: nCondPos = maCondLbArr[i]->find_text( rEntry.IsQueryByTextColor() ? aStrFontColor : aStrBackgroundColor); https://opengrok.libreoffice.org/xref/core/sc/source/ui/dbgui/filtdlg.cxx?r=d84291f5#1454 The string itself matters for none of these cases, the problem is only due to them being different.
Ok, i have asked a translation modification.
ok, i have fully rebuilded LO. The string "Couleur d'arrière-plan" is working... now...
Considering comment 18 (quote): " There's even a comment in the .hrc file: // This must match the translation of the same strings of standardfilterdialog|cond " Perhaps some kind of (unit) test should be included, in order to warn when (new/modified/current) relevant translations are not a match, so as to avoid future problems similar to this report? IDK whether such thing is even possible, but if it is...
It's almost perfect except standard filter background color list...Version 7.6.1.1 windows fr. - In the Autofilter menu, sort by color , we have all background color (see screenshot) - In the Standard filter background color option, we have only one color. (see screenshot)
Created attachment 189290 [details] Autofilter sort by color background list
Created attachment 189291 [details] Background color list in standard filter.
The same in master, if the cell is empty : "sort by color" in Autofilter menu is different from "background color" list in standard filter. If the cell is not empty : "sort by color" in Autofilter menu is the same than "background color" list in standard filter. Is it possible to be consistent between the result of "sort by color" and "background color" list in standard filter ?
(In reply to Regis Perdreau from comment #29) > if the cell is empty : "sort by color" in Autofilter menu is different from > "background color" list in standard filter. > If the cell is not empty : "sort by color" in Autofilter menu is the same > than "background color" list in standard filter. I can confirm this behavior, however it seems different from the originally reported bug (it isn't specific to French language, either). Seems similar to bug 122975, perhaps it would be worth following up there. Let me close this bug report, since it was fixed by the translation update.