summaryrefslogtreecommitdiff
path: root/fpicker
AgeCommit message (Collapse)Author
2021-03-16check for quit when calling Yield in loopNoel Grandin
so we don't get stuck threads when the main application quits Change-Id: Id36e99267ceb4154873b6ef8ef494622fff6c19a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112409 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit c880d3e30405342a5ae6239cc77f69ed3ca6cc15) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112491 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-12-05Fix crash or hang on macOS on arm64 when opening a file pickerTor Lillqvist
There is no reason to not mention the NSOpenSavePanelDelegate protocol that AquaFilePickerDelegate implements. The way we used objc_msgSend() caused a crash or hang. (I saw both, depending on whether the code was built for debugging or not). For some reason we used to cast it to a function with variadic parameters like: ((id (*)(id, SEL, ...))objc_msgSend)(m_pDialog, @selector(setDelegate:), m_pDelegate); This does not work in arm64 code on macOS. (See https://developer.apple.com/documentation/apple_silicon/addressing_architectural_differences_in_your_macos_code?language=objc , the "Don't Redeclare a Function to Have Variable Parameters" section.) We could have replaced the ellipsis with the actual type of the first real parameter in this call, or just "id" would have worked fine. But it is much simpler to just do what we mean directly: [m_pDialog setDelegate:m_pDelegate]; I need to look through the code for other places where we have used objc_msgSend() in a similar fashion. Change-Id: Ia93b2007ed8f263eaf99d604a3c88e857efbb421 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107260 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-07-21Revert "tdf#125578 force webhelp as workaround for Safari sandboxing..."Tor Lillqvist
That change also prevented local help from being displayed in the built-in viewer on macOS. But we do want local help in Collabora Office on macOS from this branch. at least for now. Also: Revert "loplugin:nullptr (macOS)", revert "loplugin:cstylecast (macOS)". This reverts commit ffed2de3e412ff35979ecea92c3d49eefe0fcc5d. This reverts commit d2d6b2d785ccdfb67473c5b97bcac9bd25d3407b. This reverts commit 44893662d510c4173e55ba27af02d0258a697a5d. Change-Id: I98805b4c39dc01c7d8e9d7f8f09abc61a103480c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99134 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-05-06Resolves: tdf#131898 we only want the text from column 0Caolán McNamara
in the fallback file picker Change-Id: I60527661f83fde135145249a14b4f3b35840fff8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93145 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-05-06Resolves: tdf#130505 give default focus to the file name fieldCaolán McNamara
Change-Id: I2c78fa95e626029a4cfc7f8e2faf03d4a5d2dee8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93136 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-01-21Resolves: tdf#130090 xEntry should be xIconEntryCaolán McNamara
copy and paste error apparently Change-Id: Ifdeb90ececc200211ce41c55f2826987666cd401 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87088 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-27tdf#43021 WIN opt-out of OS recent folder usageJan-Marek Glogowski
The Microsoft documentation for SetFolder explicitly mentiones "In general, we do not recommended the use of this method. [...] SetDefaultFolder is the better method." If SetDefaultFolder is used the recently-used folder overwrites the value passed to SetDefaultFolder, which is shared between all file pickers. With this patch we rely on the LO internal mechanism to show the last used directory in the file picker. Regina's workaround basically does the same, as it just sets oRegistryKeyContent.WorkPathChanged, which triggers the internal path to use SetFolder instead of SetDefaultFolder. If you're wondering about the GetFolder() handling, the MS API docs have this: "Gets either the folder currently selected in the dialog, or, if the dialog is not currently displayed, the folder that is to be selected when the dialog is opened." So the call to GetFolder(), after the dialog is closed, returns the folder set by the SetFolder call, not the folder selected by the user, in case of the save dialog at least. Change-Id: Ia24f47848501df82727bfb2a99db723468bfe5b1 Reviewed-on: https://gerrit.libreoffice.org/83409 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de> Tested-by: Jan-Marek Glogowski <glogow@fbihome.de> (cherry picked from commit ffa636ba74b04b3258ec9a696bc4eac33581fa24) Reviewed-on: https://gerrit.libreoffice.org/83839 Tested-by: Jenkins
2019-11-24Resolves: tdf#128940 use a normal MenuButtonCaolán McNamara
instead of a split toolbar item Change-Id: I2e706d1a3255dca7a51d323a2bcf750f28b8fd1e Reviewed-on: https://gerrit.libreoffice.org/83582 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-13Resolves: tdf#128767 fpicker sets labels on buttons as well as labelsCaolán McNamara
Change-Id: Iedd543fe20cd713d49a9d62c256942639e44adf6 Reviewed-on: https://gerrit.libreoffice.org/82580 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-11-07loplugin:unusedmethodsNoel Grandin
Change-Id: I65354c7476dfaede1a607441d7c1b0c7ad038df4 Reviewed-on: https://gerrit.libreoffice.org/82186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-07loplugin:unusedfieldsNoel Grandin
Change-Id: Ic1c0a2144f39373f93384bccbfc74356cac65ba0 Reviewed-on: https://gerrit.libreoffice.org/82185 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-06loplugin:unnecessaryvirtualNoel Grandin
Change-Id: Ibffbd0f5d30ec14cace3638b2bb47c91a583711c Reviewed-on: https://gerrit.libreoffice.org/82171 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-02New loplugin:conditionalstringStephan Bergmann
Change-Id: I2eab990c15f845b44a3b598571aca361dadf9ff3 Reviewed-on: https://gerrit.libreoffice.org/81946 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-31Fix StringAdd::isCompileTimeConstantStephan Bergmann
...to find StringLiteral on the RHS of +=. Which revealed that the VisitCompoundStmt/checkForCompoundAssign logic needed to be fixed, too, so that s += side_effect(); s += "literal"; s += side_effect(); only gets combined to s += side_effect() + "literal"; s += side_effect(); and not all the way to s += side_effect() + "literal" + side_effect(); Change-Id: I432e3458b933a7d0ad6141c747b675cc8b0f0ba4 Reviewed-on: https://gerrit.libreoffice.org/81804 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-30-Werror,-Wunused-private-fieldStephan Bergmann
Change-Id: I33d664873ddc6d061309c8858918f852f3ad60d6 Reviewed-on: https://gerrit.libreoffice.org/81708 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-29remove unnecessary includesCaolán McNamara
Change-Id: Ia4a622b34ff3f71963cff7a1aa8658a4df12f04f Reviewed-on: https://gerrit.libreoffice.org/81676 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29use activate-link instead of clickedCaolán McNamara
so we can return true to consume the event and not continue to the default url dispatch handler Change-Id: I66400363a57d528a25d68a7f9314a8bc7d95876e Reviewed-on: https://gerrit.libreoffice.org/81555 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-29weld fpicker clusterCaolán McNamara
Change-Id: I6566263809ff0032388a0b56571f0cf7428058d7 Reviewed-on: https://gerrit.libreoffice.org/81334 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-23loplugin:unusedmethodsNoel Grandin
Change-Id: I5fd081780d46fd30864830eea2956bad6dc3e222 Reviewed-on: https://gerrit.libreoffice.org/81360 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22loplugin:unusedenumconstantsNoel Grandin
Change-Id: I76aadeefce66df93f21b7e45c0e87ab92df45131 Reviewed-on: https://gerrit.libreoffice.org/81324 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-22tdf#42949 Fix IWYU warnings in fpicker/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia3f05f9c9e74ef211cc21bf92f88a330e3e2378e Reviewed-on: https://gerrit.libreoffice.org/81288 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-10-21loplugin:virtualdead unused param in SvtFileDialog_BaseNoel Grandin
Change-Id: Id10c6df2a9d00f19dc1dc314515fedbe90918f66 Reviewed-on: https://gerrit.libreoffice.org/81235 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21to wide -> too wideCaolán McNamara
Change-Id: I5a6743c41599f55b14461741cebc40e4186945a7 Reviewed-on: https://gerrit.libreoffice.org/81215 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-21move AutocompleteEdit to fpickerCaolán McNamara
Change-Id: I00b1b4f21ffcb183d098b8af296e1dea64a2a482 Reviewed-on: https://gerrit.libreoffice.org/81177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-21update remotefilesdialog.uiCaolán McNamara
Change-Id: I23cbd7683e89d53a159a62daa92107051ad838a0 Reviewed-on: https://gerrit.libreoffice.org/81178 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-19strip Dialog ctor downCaolán McNamara
Change-Id: Ic00f5a5fe562022524c60a23509722f9e2406524 Reviewed-on: https://gerrit.libreoffice.org/81135 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-19fix buildCaolán McNamara
Change-Id: I04846dfa9156da4a00fde723640d400d10e2ed88
2019-10-19Drop ModalDialog middlemanCaolán McNamara
Change-Id: I8bc39e1a85045a6e6c15735b440ada8c3abc222b Reviewed-on: https://gerrit.libreoffice.org/81068 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-19loplugin:unusedmethodsNoel Grandin
Change-Id: I95e63105654952d12c1dfd62f51593de114be569 Reviewed-on: https://gerrit.libreoffice.org/81077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-10use a GtkMenuButton for button+menuCaolán McNamara
Change-Id: I84028ecc95b93112377806da3a1bbb879c4fd90a Reviewed-on: https://gerrit.libreoffice.org/80600 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-05move file picker only code to fpickerCaolán McNamara
Change-Id: I47cc2cb7db396a06a2abeffe4a5d40a039f21c58 Reviewed-on: https://gerrit.libreoffice.org/80222 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-02move Breadcrumb to sole user in fpickerCaolán McNamara
Change-Id: I2028f921e78611698e82e50a652b67dba1ece909 Reviewed-on: https://gerrit.libreoffice.org/80054 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-10-02loplugin:fragiledestructor (clang-cl)Stephan Bergmann
Change-Id: Ibf5b8022df00bb6c49b53853811b6503146dddd7 Reviewed-on: https://gerrit.libreoffice.org/79971 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:data (clang-cl)Stephan Bergmann
Change-Id: Ib8b2bc1c5f7b27a646036ce23cae2b6a06edd038 Reviewed-on: https://gerrit.libreoffice.org/79922 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-01loplugin:stringconstant (clang-cl)Stephan Bergmann
Change-Id: Id1a82cea4444255fdb693e126b7571a406094624 Reviewed-on: https://gerrit.libreoffice.org/79916 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-09-26loplugin:constmethod in forms..fpickerNoel Grandin
Change-Id: I1673e00be0a6c9d34ce02437bf68d929c56952f7 Reviewed-on: https://gerrit.libreoffice.org/79540 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-09-06Fixing "...."Andrea Gelmini
Change-Id: Id005a7531d546dd43de13b49bcb3e93081c5ad8d Reviewed-on: https://gerrit.libreoffice.org/78679 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-27Fix ASan heap-use-after-freeStephan Bergmann
...when opening a document via "File - Open..." with "Tools - Options... - LibreOffice - General - Open/Save Dialogs - Use LibreOffice dialogs" enabled: > ==7004==ERROR: AddressSanitizer: heap-use-after-free on address 0x61700023a370 at pc 0x7f88c788db4a bp 0x7ffd8c7d0020 sp 0x7ffd8c7d0018 > READ of size 8 at 0x61700023a370 thread T0 > #0 in rtl::Reference<PlacesListBox>::get() const at include/rtl/ref.hxx:171:16 > #1 in VclPtr<PlacesListBox>::operator bool() const at include/vcl/vclptr.hxx:187:28 > #2 in CustomContainer::GetFocus() at fpicker/source/office/iodlg.cxx:433:39 > #3 in vcl::Window::CompatGetFocus() at vcl/source/window/window.cxx:3731:5 > #4 in vcl::Window::ImplGrabFocus(GetFocusFlags) at vcl/source/window/mouse.cxx:380:17 > #5 in vcl::Window::GrabFocus() at vcl/source/window/window.cxx:2991:5 > #6 in vcl::Window::dispose() at vcl/source/window/window.cxx:448:26 > #7 in Control::dispose() at vcl/source/control/ctrl.cxx:62:13 > #8 in SvtFileView::dispose() at svtools/source/contnr/fileview.cxx:879:14 [...] > 0x61700023a370 is located 496 bytes inside of 648-byte region [0x61700023a180,0x61700023a408) > freed by thread T0 here: > #0 in operator delete(void*, unsigned long) at llvm-project/compiler-rt/lib/asan/asan_new_delete.cpp:172:3 > #1 in std::default_delete<SvtExpFileDlg_Impl>::operator()(SvtExpFileDlg_Impl*) const at gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/10.0.0/../../../../include/c++/10.0.0/bits/unique_ptr.h:81:2 > #2 in std::__uniq_ptr_impl<SvtExpFileDlg_Impl, std::default_delete<SvtExpFileDlg_Impl> >::reset(SvtExpFileDlg_Impl*) at gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/10.0.0/../../../../include/c++/10.0.0/bits/unique_ptr.h:178:4 > #3 in std::unique_ptr<SvtExpFileDlg_Impl, std::default_delete<SvtExpFileDlg_Impl> >::reset(SvtExpFileDlg_Impl*) at gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/10.0.0/../../../../include/c++/10.0.0/bits/unique_ptr.h:444:7 > #4 in SvtFileDialog::dispose() at fpicker/source/office/iodlg.cxx:523:11 [...] Change-Id: I022eac69123d87f75bda5067a672496030e1a8ec Reviewed-on: https://gerrit.libreoffice.org/78199 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-27loplugin:referencecasting find more redundant static_castNoel Grandin
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae Reviewed-on: https://gerrit.libreoffice.org/78191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-24loplugin:returnconstval in fpicker..reportdesignNoel Grandin
Change-Id: I59c55a858b2706d1327c837abc158dceca02360e Reviewed-on: https://gerrit.libreoffice.org/78058 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-21Avoid extra calls to INetURLObject::decodeStephan Bergmann
Change-Id: I700c4093213395a12342534fb7685969b5e5b220 Reviewed-on: https://gerrit.libreoffice.org/77891 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-20Fix typosAndrea Gelmini
Change-Id: Iab3756a0e27af8a87e4012decdf706d19d0f3e82 Reviewed-on: https://gerrit.libreoffice.org/77757 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-17tdf#88205 Adapt uses of css::uno::Sequence to use initializer_list ctorJulien Nabet
in forms and fpicker Change-Id: Ifa931bed6de434a2ee183c78e8e1be852ca06a56 Reviewed-on: https://gerrit.libreoffice.org/77637 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-15loplugin:sequenceloop in forms..ooxNoel Grandin
Change-Id: Id742001211e916e7709918e7112902a0c35bac95 Reviewed-on: https://gerrit.libreoffice.org/77501 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-12Fix typosAndrea Gelmini
Change-Id: Ibd802e81649373fd9ad6d0309276b8e6ae43dd24 Reviewed-on: https://gerrit.libreoffice.org/77261 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-08-10Fix typosAndrea Gelmini
Information is always singular Change-Id: I55275d7c2fd76c3ec0ae4a98aa952777feb90460 Reviewed-on: https://gerrit.libreoffice.org/75645 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it): fpickerStephan Bergmann
Change-Id: Ia641a930a35133c6fed3b68bc3a7d09ac50032a5 Reviewed-on: https://gerrit.libreoffice.org/76674 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-19loplugin:referencecasting in forms..fpickerNoel Grandin
Change-Id: I0aa040b6d3264d2efde5797f79994d3d65ceaddf Reviewed-on: https://gerrit.libreoffice.org/75957 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>