summaryrefslogtreecommitdiff
path: root/fpicker
AgeCommit message (Collapse)Author
2021-03-09-Werror,-Wshadow (clang-cl)Stephan Bergmann
Change-Id: I8b39e510266404a28acb380f449862366c647b87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112173 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-09-Werror,-Wnon-virtual-dtor (clang-cl)Stephan Bergmann
Change-Id: I1f02e154e090ad89ca2e664467d7514f1cbdcb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112174 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-08loplugin:makeshared (clang-cl)Stephan Bergmann
Change-Id: I902c4438adb89970db749ca06a13bfc484925851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112177 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-03-08loplugin:external (clang-cl)Stephan Bergmann
Change-Id: I543e7970e824c9d2ca504bbf3e4dd75a1ee2b4ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112175 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-02-28Convert some const OUString to OUStringLiteralMike Kaganski
Change-Id: I7cb56da6b58325781446d6c001c49638d1ec1769 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111698 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-27Drop ComPtr and use sal::systools::COMReferenceMike Kaganski
Change-Id: I9eb6d99d883b44943ad69c2c28d4e55716dc34f9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111673 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-26Simplify VistaFilePickerImplMike Kaganski
Change-Id: I13ac92f8f28a1d912681239fee1780093f8be444 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111561 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-02-24Possible race between retrieving and using parent windowSamuel Mehrbrodt
Filepicker was called from extension, parent window was initialized in constructor with current top level window (extension dialog). Extension dialog got closed before file picker was shown in some cases, causing Show() method to fail Change-Id: Ie41585e6b05511ba2dff265374348b6041e9fa87 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111378 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-02-23Add mutex guard when assigning memberSamuel Mehrbrodt
Change-Id: I173824eaccea35d9f5e47b4248939050fceb939c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111393 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2021-02-23loplugin:refcounting in fpickerNoel
Change-Id: Ia14d2a874d559c4438a33c8a46ec6076802cd637 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111285 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-02-16loplugin:referencecasting in editeng..frameworkNoel
Change-Id: Ia3375011ecd0a65afed0f131f477fc1542603fde Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-01-30tdf#140013 change icon for list view in Template Manager & Remote Files dialogRizal Muttaqin
Change-Id: I37b04d39efa7b328cff0df54a5b187876db8ba5e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110171 Tested-by: Jenkins Reviewed-by: Rizal Muttaqin <riz_17_oke@yahoo.co.id>
2021-01-21remove deprecated [x|y]align property for CheckBoxes and RadioButtonsCaolán McNamara
the gtk default is left aligned, change the vcl one to match and drop the deprecated and unnecessary [x|y]align Unfortunately on load glade's inline preview shows centered alignment, though its "true" preview tool shows left alignment and unsetting and resetting draw-indicator will update the preview to show the alignment which will be used: https://gitlab.gnome.org/GNOME/glade/-/issues/502 See https://gitlab.gnome.org/GNOME/glade/-/merge_requests/110 for my stab at making glade do the right thing. Change-Id: If454e9ce8462e6b271d2423fe7e8a55788e01fac Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109487 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15replace stock button imagesCaolán McNamara
Change-Id: I9be83856c0dd15552a042f009464c279bf239848 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109199 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15replace stock button labelsCaolán McNamara
Change-Id: I726ba7846322863d9f38314b6c6ccc7f71124a0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109197 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-15tdf#138848 add truncate-multiline to all GtkEntries and GtkSpinButtonsCaolán McNamara
except for extensions/uiconfig/spropctrlr/ui/multiline.ui Change-Id: Ia2eca14332ffd4ac6e277c7529f17eca3ba29c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109310 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-13loplugin:stringliteralvar (clang-cl)Stephan Bergmann
Change-Id: I79949789634242eb95cc722bab83e0348775f274 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109174 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-01-08replace deprecated gtk-go-up, gtk-go-down, gtk-save and gtk-open labelsCaolán McNamara
Change-Id: Iaced32a6810b1a510dc300458a8860b7994226f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108951 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-01-07replace deprecated stock labels used <= twiceCaolán McNamara
replace single use of deprecated gtk-paste replace single use of deprecated gtk-play replace single use of deprecated gtk-stop replace only two uses of deprecated gtk-clear replace only two uses of deprecated gtk-find replace only two uses of deprecated gtk-media-next replace only two uses of deprecated gtk-media-previous Change-Id: Ia749c03ad5887f7919b1d0dc2facf8ae7e5fb7a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108820 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-29loplugin:stringviewparam: operator +Stephan Bergmann
Change-Id: I044dd21b63d7eb03224675584fa143009c6b6008 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108418 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-23drop deprecated GtkAlignment, move left/top-padding into child margin-start/topCaolán McNamara
for fpicker Change-Id: I47ac66f7b823aa6cf8faa184f561cffb259eb2f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108204 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-22replace margin-left with margin-start and margin-right with margin-endCaolán McNamara
Change-Id: Iee3cc8c22b393ca420d0ed68673c61fe7ef240ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108113 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-19don't mention VclBuilder in the dialog tests docsCaolán McNamara
Change-Id: Id18a25e3d3310342887757fe417769f4213b8a3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107981 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-11Adapt the remaining OUString functions to std string_viewStephan Bergmann
...for LIBO_INTERNAL_ONLY. These had been missed by 1b43cceaea2084a0489db68cd0113508f34b6643 "Make many OUString functions take std::u16string_view parameters" because they did not match the multi-overload pattern that was addressed there, but they nevertheless benefit from being changed just as well (witness e.g. the various resulting changes from copy() to subView()). This showed a conversion from OStringChar to std::string_view to be missing (while the corresponding conversion form OUStringChar to std::u16string_view was already present). The improvement to loplugin:stringadd became necessary to fix > [CPT] compilerplugins/clang/test/stringadd.cxx > error: 'error' diagnostics expected but not seen: > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 43 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:42): simplify by merging with the preceding assignment [loplugin:stringadd] > File ~/lo/core/compilerplugins/clang/test/stringadd.cxx Line 61 (directive at ~/lo/core/compilerplugins/clang/test/stringadd.cxx:60): simplify by merging with the preceding assignment [loplugin:stringadd] > 2 errors generated. Change-Id: Ie40de0616a66e60e289c1af0ca60aed6f9ecc279 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107602 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
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: reinterpret_cast<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/+/107257 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com>
2020-12-01OSL_FAIL.*exception -> TOOLS_WARN_EXCEPTIONNoel
Change-Id: I6800e23ead2767d245d5da71d2d40e0f8a6d7e1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-30loplugin:stringviewparam include comparisons with string literalsNoel
Change-Id: I8ba1214500dddaf413c506a4b82f43d63cda804b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-25loplugin:stringview (clang-cl)Stephan Bergmann
Change-Id: I47b44c80b2a5e3c9d84f5d7257efe17f138a1067 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106563 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24Remove unused parameter (flagged now by loplugin:stringview)Stephan Bergmann
Change-Id: I474fbadfa9ab356829077d428cbd18a61a7ea919 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106487 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-24loplugin:stringviewparam extend to comparison operatorsNoel
which means that some call sites have to change to use unicode string literals i.e. u"foo" instead of "foo" Change-Id: Ie51c3adf56d343dd1d1710777f9d2a43ee66221c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-15add <!-- n-columns=1 n-rows=1 --> before every GtkGridCaolán McNamara
for a in `git ls-files '*.ui'`; do sed -i 's/^\( *\)\(<object class="GtkGrid".*\)/\1<!-- n-columns=1 n-rows=1 -->\n\1\2/' $a; done so we get the same behavior in glade as before 3.38 in that the grid preview don't show any unoccupied grid squares replace all existing n-columns=X n-rows=Y lines because they are all wrong, except for cui/uiconfig/ui/additionsfragment.ui sw/uiconfig/swriter/ui/pageheaderpanel.ui sw/uiconfig/swriter/ui/pagefooterpanel.ui which are correct. Change-Id: I401bbe8e098c26e7f57d6a872d3b70fc1ce85a00 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105846 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-15NSArray index type is NSUInteger, not longStephan Bergmann
Change-Id: I2c632a873a4fff66c3c440561add9abb7abc45ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105740 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-13tdf#123936 Formatting files in module fpicker with clang-formatPhilipp Hofer
Change-Id: Ieeaf63081023a7b1ea31b2a276c31ac3114b5657 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105673 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-12tdf#42949 Fix new IWYU warnings in directories [e-f]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I963aa5fb892a0be36212fd0587b69f217f017947 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105469 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27Resolves: tdf#137575 fpicker custom sorting setting not restoredCaolán McNamara
Change-Id: Id5fae909a12621f68eb8defcb01b91c304c61df6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104888 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-22set all .ui min require version of gtk to 3.20Caolán McNamara
and update the version mentioned in our min req in the readme.xrm follow up to commit 0c9ccc7dbf6deb4d012e0d1e6eb934e54e0f19bc Author: Caolán McNamara <caolanm@redhat.com> Date: Fri Oct 2 21:21:45 2020 +0100 raise min version of gtk to 3.20.0 Change-Id: Ibae55c97e1ee577f4b7435d124cda6a21005ad0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104692 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-10-22long->tools::Long in forms..frameworkNoel
Change-Id: I4cb29aade5ad1d3c3588b9437197e8493292872e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104625 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-07Revert "lint-ui: check that we only have one has_default==True"Noel Grandin
This reverts commit c9e3952e76a9c06d5a1d2f583829ce9eb5b9df64. Reason for revert: Some of the code manipulates visibility programmatically, and it is quite fine to has more than one has_default if only one of them is visible at a time. Change-Id: Ia4f565c7d21d232d3038c3489952782c8e2a7be5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103977 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05lint-ui: check that we only have one has_default==TrueNoel
Change-Id: Ic61e14c3b98a85a5f05b448db9805ac296c041ec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-03use more TOOLS_WARN_EXCEPTIONNoel
Change-Id: I8b5cde993c13e0b7c8c830b1ff698933a6b7cfd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103863 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-07Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicitStephan Bergmann
...and in turn add OUString::operator = and OUString::operator += overloads that take a std::u16string_view. Without making the ctors explicit, the operator overloads would have caused ambiguities when called with raw sal_Unicode pointers/non-const arrays, as those can convert to both OUString and to std::u16string_view. But the std::u16string_view operator overloads will generally be useful when changing OUStringLiteral similarly to 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String", at which point many existing uses of OUStringLiteral will be replaced with uses of std::u16string_view. Implementing this change turned up a need for an operator = overload for OUStringNumber, which has thus been added. No such need turned up for a corresponding operator += overload, but which can easily be added when the need arises. It also revealed that the operator == overloads between an OUString and a raw sal_Unicode pointer/non-const array were implemented rather inefficiently, creating a temporary OUString from the raw argument. Those have been improved. Preceding commits have already taken care of many dubious or simply unnecessary implicit uses of the now-explicit OUString ctors. This commit makes explicit the few remaining reasonable uses. (And in some cases needed to change variable initialization syntax from using parentheses to using curly braces, to avoid the most vexing parse issue. And needed to explicitly add OUString ctors from char16 const[2] string literal lvalues in a conditional expression in writerfilter/source/ooxml/OOXMLFastContextHandler.cxx that are only necessary because MSVC apparently still insists on doing array-to-pointer decay there.) All of this only affects LIBO_INTERNAL_ONLY. Change-Id: I7ce31162e9be1c3ff3c0bd184a34b535ec56be9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102098 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann
This is a prerequisite for making conversion from OUStringLiteral to OUString more efficient at least for C++20 (by replacing its internals with a constexpr- generated sal_uString-compatible layout with a SAL_STRING_STATIC_FLAG refCount, conditionally for C++20 for now). For a configure-wise bare-bones build on Linux, size reported by `du -bs instdir` grew by 118792 bytes from 1155636636 to 1155755428. In most places just a u"..." string literal prefix had to be added. In some places char const a[] = "..."; variables have been changed to char16_t, and a few places required even further changes to code (which prompted the addition of include/o3tl/string_view.hxx helper function o3tl::equalsIgnoreAsciiCase and the additional OUString::createFromAscii overload). For all uses of macros expanding to string literals, the relevant uses have been rewritten as u"" MACRO instead of changing the macro definitions. It should be possible to change at least some of those macro definitions (and drop the u"" from their call sites) in follow-up commits. Change-Id: Iec4ef1a057d412d22443312d40c6a8a290dc6144 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101483 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-24tdf#118148 Extended tips from HC2/shared/Olivier Hallot
These extended tips are extracted from <ahelp> in Help files Only for ui files, where dialogs/widget pair could be determined. Other forms of <ahelp hid=".."> such as .uno:.. and *HID* ... will be addressed elswhere. Change#1 Removed extended tips from GtkMenu of svx/.../acceptrejectchangesdialog.ui Change#2 Some empty ET's slipped in cui/macroselectdialog.ui Change-Id: Ic8dc62734143f621fcd3c4156fc004f585630277 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101186 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-21loplugin:stringstatic (clang-cl)Stephan Bergmann
Change-Id: I024c7437e876459e22a6f541405b87ac13e7dc99 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101135 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-04Improved loplugin:staticanonymous -> redundantstatic redux, clang-clStephan Bergmann
Change-Id: Ie6dc22edbcfdf05ab8d7d668cb7cc33b5b747995 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-26fpicker/win32: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: Ic7d6c94e8709184fc8f195bd019402e361e9b810 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99461 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15fpicker/aqua: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: I23b9964daba0d39cdad4e81de7b7fbfc56589b2e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98787 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15fpicker/office: create instances with uno constructorsNoel Grandin
See tdf#74608 for motivation. Change-Id: Ia6e1aec18e6450de9c65ed059a25493fc54a9f75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98788 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>