Created attachment 132647 [details] Sample XLSM Open the attached XLSM file containing two columns with data, and a recorded VBA macro (Module1 / AF) that selects the data, creates autofilter for them, and hides 1 data row of the 4. However, in Calc after running the macro all data rows get hidden, not just one. Observed with LO 4.0.0.3 and 5.3.1.2 / Windows 7.
Confirmed in Version: 5.4.0.0.alpha0+ Build ID: 7635e0c1c7f821a1081f8e3868f641ae74a172d6 CPU threads: 4; OS: Linux 4.8; UI render: default; VCL: gtk2; Locale: ca-ES (ca_ES.UTF-8); Calc: group and LibreOffice 3.3.0 OOO330m19 (Build:6) tag libreoffice-3.3.0.4
Let's make this an easy hack. The issue is in the criteria detection in ScVbaRange which does not handle string arrays and as a result tries to filter for "". The code for this is in sc/source/ui/vba/vbarange.cxx:4508 and following which currently only handles numeric and string values but would need to be extended to handle css::uno::Sequence<OUString> as well. This task is to add the support and check how to transport the information through the UNO API to the internal data structures.
Szymon Kłos committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8891472e1f9c5e452a4e8d55241eeba118274092 tdf#107238 VBA autofilter: list of strings It will be available in 5.4.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.