Date: prev next · Thread: first prev next last
2015 Archives by date, by thread · List index


On 30/06/2015 21:54, Michael Meeks wrote:
Hi Julien,

On Tue, 2015-06-30 at 12:13 -0700, julien2412 wrote:
Giving a try to tdf#92404, I didn't reproduce the problem when I selected 2
files but I noticed that only 1 file was added on the interface.
Searching a bit, I found it was because list of files was always truncated
to first element
        Good =) you're using the wrong API method.
not me, web page wizard in this case :-)
     699 uno::Sequence<OUString> SAL_CALL SalGtkFilePicker::getFiles() throw(
uno::RuntimeException, std::exception )
     700 {
     701     // no member access => no mutex needed
     702
     703     uno::Sequence< OUString > aFiles = getSelectedFiles();
     704     /*
     705       The previous multiselection API design was completely broken
     706       and unimplementable for some hetrogenous pseudo-URIs eg.
search:
     707       Thus crop unconditionally to a single selection.
     708     */
     709     aFiles.realloc (1);
     710     return aFiles;
     711 }
        The semantics here were -impossibly- awful - multi-selection used to
have a first-base-url and then relative URL fragments in slots 1->N on
top of it which was just busted.
For some like kde4 file picker it seems so, but not for SalGtkFilePicker which uses getSelectedFiles method and then just truncates the result (see http://opengrok.libreoffice.org/xref/core/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx#699) But this part gives you right since it reuses the method you talked about :-)
...

opposite description!
        We should fix the description =) the basic problem is that some paths
like 'recent files' or whatever we can't play this above trick.

        The method should be marked deprecated in the API with a reference to
XFilePicker2 =)
I submitted a patch to review about description/deprecated part, see https://gerrit.libreoffice.org/#/c/16630/

Thank you for your quick feedback about this! :-)

Julien

Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.