summaryrefslogtreecommitdiff
path: root/extensions
AgeCommit message (Collapse)AuthorFilesLines
2020-12-15Related: tdf#138661 don't limit OFormatSampleControl to +10000Caolán McNamara1-0/+2
let it take any value, so the date preview can show todays date and not an arbitrary max value from the past Change-Id: Ia6f47d44c68c15293e2adcd950724ee2cef024d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107712 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-15tdf#138701 leave current combobox cursor valid if the contents won't changeCaolán McNamara1-1/+4
Change-Id: I6d7f5de7b79d447590fcfa325f4be7430eaffd5f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107707 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-12-07Remove remaining bogus use of objc_msgSend()Tor Lillqvist4-13/+4
Follow-up to 5bf61e98b0746a4afeb68a80e54b4eb4bf4ea89f. Should avoid crashes when running as arm64 code on macOS on arm64. Change-Id: Id05d182684df82c8a7bf09f6bb7e8ccb01997b62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107259 Tested-by: Jenkins Reviewed-by: Tor Lillqvist <tml@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107324
2020-11-21tdf#123936 Formatting files in module extensions with clang-formatPhilipp Hofer19-185/+98
Change-Id: I6e86641bc93bf4b3941b01fbef69c1e7984aad3a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105667 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Jenkins
2020-11-18Resolves: tdf#138271 flag formatted spinbuttons as modified on any entry changeCaolán McNamara1-0/+2
formattedspinbuttons should send value-changed on losing focus, but this is sufficient for this use case and safe to backport Change-Id: Ie0cf5ab22152d95169dc5579423a4173be678a33 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106051 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-17loplugin:stringviewparam (--enable-online-update)Stephan Bergmann2-2/+6
Change-Id: I3284a2460845c0b4816ad0148560e82da9d4eb78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105975 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-15add <!-- n-columns=1 n-rows=1 --> before every GtkGridCaolán McNamara17-0/+29
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-12New loplugin:stringviewparamStephan Bergmann4-5/+5
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-12tdf#42949 Fix new IWYU warnings in directories [e-f]*Gabor Kelemen17-18/+11
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-12tdf#138131 don't set enabled if container is already enabledCaolán McNamara1-6/+8
Change-Id: I46556c7242ad9b5c4c7a8fb923dc87458e56494e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105613 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-11-11loplugin:stringview (extensions)Julien Nabet2-2/+2
Change-Id: If2984a0de77dcd4848f612f057b3e0a79ffef21a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105582 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-11-11loplugin:stringviewNoel1-1/+1
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-11-11disable O(U)String::concat for internal codeNoel Grandin1-1/+1
in favour of the more widely used, and better optimised, operator+ Change-Id: I6a1b37e0f3d253af1f7a0892443f59b620efea63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-02toolbox always has flat styleNoel Grandin2-10/+0
ever since commit c1cd6af623e86b5b1b45f9d09dc17d6fbb907f02 Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Mon May 10 14:51:02 2004 +0000 INTEGRATION: CWS nwf (1.64.66); FILE MERGED 2004/03/31 09:28:33 ssa 1.64.66.1: #i25130# force flat toolbox buttons except for a completely and utterly undocumented hack of a registry key, introduced in commit 736dc0956a50315ec72ad126406556657a750d37 Author: Rüdiger Timm <rt@openoffice.org> Date: Thu Apr 17 14:19:46 2003 +0000 INTEGRATION: CWS vcl08 (1.57.2.4.18); FILE MERGED 2003/04/14 17:46:27 ssa 1.57.2.4.18.1: #108699# disabled flat toolbox buttons not exported anymore which only seems to apply to Windows. So just remove this. Change-Id: Idf315b8c89c3119883a5e6880d003d379fe6faec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-26loplugin:toolslong (--enable-online-update)Stephan Bergmann1-3/+3
...but where > ~/lo/core/extensions/source/update/check/download.cxx:297:17: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong] > long nError; > ^~~~~~~~~~~ > ~/lo/core/extensions/source/update/check/download.cxx:153:9: error: VarDecl, use "tools::Long" instead of 'long' [loplugin:toolslong] > long nCode; > ^~~~~~~~~~ were false positives (the third argument to curl_easy_getinfo(..., CURLINFO_RESPONSE_CODE, ...) must be a pointer to long). Change-Id: I9596ff32c32fddc7c1240d7fec3672d36265631a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104794 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-22set all .ui min require version of gtk to 3.20Caolán McNamara46-46/+46
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 emfio..filterNoel6-24/+25
Change-Id: I961cee10d45d628ff70dea0694a7a63a4fe867ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-16Rename CLANG_CC, CLANG_CXX configuration vars (avoid clash with scan-build)Stephan Bergmann1-4/+4
Clang's scan-build tool uses the CLANG_CXX environment variable (setting it up in the scan-build script to pass it to the ccc-analyzer script), but happens to erroneously set it to a non-existing path (see <https://reviews.llvm.org/D89481> "[scan-build] Fix clang++ pathname again"). So wrapping LO's autogen.sh and make in scan-build picked up that broken CLANG_CXX and caused build failures like > [CXX] external/skia/source/SkMemory_malloc.cxx > /bin/sh: ~/llvm/inst/bin/clang-12++: No such file or directory (see <https://lists.freedesktop.org/archives/libreoffice/2020-October/086113.html> "Re: llvm/clang static analyzer reports"). So rename CLANG_CXX, and for consistency also CLANG_CC and the various CLANG_CXXFLAGS_INTRINSICS_*, by prefixing each with LO_. Change-Id: Ib41cabe940f8bfb1997f74e865cca5725f859e07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104383 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-14More fixes of uses of now-explicit OUString ctor taking raw sal_Unicode pointerStephan Bergmann1-2/+2
...in Windows-only code, after c927aab29ebfff1ce3ac0b2f27ae343025a9890c "Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit". Interestingly, these occurrences were accepted by MSVC and only cause errors with clang-cl, so happened to go unnoticed until now. Change-Id: I33e7653e28a21541ef793b4b0750abb6037752db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104314 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-08Fix C++ UNO component constructor function signatureStephan Bergmann1-1/+1
...broken by 1f8fbff65d91f1d8297b94dd67fffceb7475dce5 "loplugin:const* make some params and methods const", and reported by UBSan during CppunitTest_services: > ~/gcc/trunk/inst/lib/gcc/x86_64-pc-linux-gnu/11.0.0/../../../../include/c++/11.0.0/bits/invoke.h:60:14: runtime error: call to function extensions_propctrlr_DefaultFormComponentInspectorModel_get_implementation through pointer to incorrect function type 'com::sun::star::uno::XInterface *(*)(com::sun::star::uno::XComponentContext *, const com::sun::star::uno::Sequence<com::sun::star::uno::Any> &)' > extensions/source/propctrlr/defaultforminspection.cxx:211: note: extensions_propctrlr_DefaultFormComponentInspectorModel_get_implementation defined here Change-Id: Ic9b8df736169c478fa1184fc1bb30ae992ce1cff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104086 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-07ui files: fix some capitalisation issuesNoel3-3/+3
Change-Id: Id2efb6e5f1c115cb31a6afd3f988fe156c5ad56e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103829 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06loplugin:const* make some params and methods constNoel7-9/+9
Change-Id: I97c5bbb929a2a4a029af4e6cb0fd571bbc2b698b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104030 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06loplugin:const& make some params and methods constNoel1-2/+2
Change-Id: I2973128a9c6c53187e1da400d1a5df763d515596 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-05loplugin:reducevarscope in extensionsNoel4-6/+5
Change-Id: I6ba76a8e50d564cd72edc5a3438faef5f3c71bc6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103948 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-04use more TOOLS_WARN_EXCEPTIONMike Kaganski14-34/+54
Change-Id: I7ddc1539cbd020b4b65740e213a0a993672516b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103910 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-30twain32shim: Windows directory might not be in DLL search path sometimesMike Kaganski3-1/+16
So try the full path to TWAIN_32.DLL if first try failed. Change-Id: I9ad262c91ebc7b3df63fbec3ffe34595ffd78c75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103669 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-09-29More “e-mail” → “email”Adolfo Jayme Barrientos1-1/+1
Follow-up for commits 8b57d07a64e03db32b5383f58a40c1509392cd24 and 5f665a855ef26faea4dfa2ac427685b60545e8b8 Change-Id: I8f0f9a7a81636623df766f9d4ea414bde9d408bc
2020-09-23cid#1466970 annotate as false positiveCaolán McNamara1-0/+4
Change-Id: I2ccb0fe70626c998fbc108464f03f1d4144e600d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103244 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-22OUStringLiteral/OStringLiteral coverity PARSE_ERROR workaroundCaolán McNamara2-2/+2
do more like commit 121771e37f7e2de41cd5643475861062bf25627b Date: Mon Sep 21 09:17:54 2020 +0200 Make some OUStringLiteral vars constexpr cause coverity can live with that Change-Id: I9efd7f848289c4865997a44c6780373068422227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103147 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-18Make sure --enable-online-update does not leave behind UpdateCheckThreadStephan Bergmann3-44/+150
...which is known to cause test processes to crash during exit. (Also see 5cd04405c6b2d1ee46294ce0696d89d2edc97d16 "Disable automatic onFirstVisibleTask UpdateCheck during CppunitTests", so this commit now covers tests like JunitTests and UITests that start a full soffice process.) The relevant code is already rather complex and incomprehensible; it handles the automatic update check triggered by the onFirstVisibleTask UpdateCheckJob, manually triggered update checks, and downloading of new versions. To avoid regressions in all those various scenarios, I tried to add very targeted code that should only wait for a still running UpdateCheckThread triggered by the automatic onFirstVisibleTask UpdateCheckJob---which is the scenario that caused issues during `make check`. (For a manually triggered update check or download it is probably both less likely that related threads would still run during exit, as the user would likely wait for a response before closing LibreOffice, and less severe if threads would still run during exit, as any resulting crashes would likely be "harmless" and might not even be noticed by the user.) However, I note that this targeted fix does increase the complexity and inscrutability of this code even further... The new code does not actually try to join the UpdateCheckJob---see UpdateCheckThread::join referencing <https://bz.apache.org/ooo/show_bug.cgi?id=73893> "webdav ucp does not implement XCommandProcessor::abort". Rather, it waits for UpdateCheckJob::run to finish (after unblocking at least any m_aCondition.wait calls). This, however, can take a while if the update check's HTTP request is in progress. To be able to use a std::condition_variable (with sane semantics compared to osl::ConditionVariable) in UpdateCheck::waitForUpdateCheckFinished, the corresponding UpdateCheck::m_aMutex had to be changed from a (recursive) osl::Mutex to a std::recursive_mutex one (sticking to a recursive one just to be on the safe side, whether or not the code actually makes use of that). Change-Id: I2726acd33b884b807d840cfee2786fcf45815ad7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103013 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-17fix LTO+mergedlibs on windowsNoel Grandin1-0/+10
Change-Id: I3d95d566db76e14532945b881b1847ea8c7e3153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102946 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-09-16Turn OUStringLiteral into a consteval'ed, static-refcound rtl_uStringStephan Bergmann10-57/+31
...from which an OUString can cheaply be instantiated. This is the OUString equivalent of 4b9e440c51be3e40326bc90c33ae69885bfb51e4 "Turn OStringLiteral into a consteval'ed, static-refcound rtl_String". Most remarks about that commit apply here too (this commit is just substantially bigger and a bit more complicated because there were so much more uses of OUStringLiteral than of OStringLiteral): The one downside is that OUStringLiteral now needs to be a template abstracting over the string length. But any uses for which that is a problem (e.g., as the element type of a container that would no longer be homogeneous, or in the signature of a function that shall not be turned into a template for one reason or another) can be replaced with std::u16string_view, without loss of efficiency compared to the original OUStringLiteral, and without loss of expressivity. The new OUStringLiteral ctor code would probably not be very efficient if it were ever executed at runtime, but it is intended to be only executed at compile time. Where available, C++20 "consteval" is used to statically ensure that. The intended use of the new OUStringLiteral is in all cases where an object that shall itself not be an OUString (e.g., because it shall be a global static variable for which the OUString ctor/dtor would be detrimental at library load/unload) must be converted to an OUString instance in at least one place. Other string literal abstractions could use std::u16string_view (or just plain char16_t const[N]), but interestingly OUStringLiteral might be more efficient than constexpr std::u16string_view even for such cases, as it should not need any relocations at library load time. For now, no existing uses of OUStringLiteral have been changed to some other abstraction (unless technically necessary as discussed above), and no additional places that would benefit from OUStringLiteral have been changed to use it. Global constexpr OUStringLiteral variables defined in an included file would be somewhat suboptimal, as each translation unit that uses them would create its own, unshared instance. The envisioned solution is to turn them into static data members of some class (and there may be a loplugin coming to find and fix affected places). Another approach that has been taken here in a few cases where such variables were only used in one .cxx anyway is to move their definitions from the .hxx into that one .cxx (in turn causing some files to become empty and get removed completely)---which also silenced some GCC -Werror=unused-variable if a variable from a .hxx was not used in some .cxx including it. To keep individual commits reasonably manageable, some consumers of OUStringLiteral in rtl/ustrbuf.hxx and rtl/ustring.hxx are left in a somewhat odd state for now, where they don't take advantage of OUStringLiteral's equivalence to rtl_uString, but just keep extracting its contents and copy it elsewhere. In follow-up commits, those consumers should be changed appropriately, making them treat OUStringLiteral like an rtl_uString or dropping the OUStringLiteral overload in favor of an existing (and cheap to use now) OUString overload, etc. In a similar vein, comparison operators between OUString and std::u16string_view have been added to the existing plethora of comparison operator overloads. It would be nice to eventually consolidate them, esp. with the overloads taking OUStringLiteral and/or char16_t const[N] string literals, but that appears tricky to get right without introducing new ambiguities. Also, a handful of places across the code base use comparisons between OUString and OUStringNumber, which are now ambiguous (converting the OUStringNumber to either OUString or std::u16string_view). For simplicity, those few places have manually been fixed for now by adding explicit conversion to std::u16string_view. Also some compilerplugins code needed to be adapted, and some of the compilerplugins/test cases have become irrelevant (and have been removed), as the tested code would no longer compile in the first place. sal/qa/rtl/strings/test_oustring_concat.cxx documents a workaround for GCC bug <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96878> "Failed class template argument deduction in unevaluated, parenthesized context". That place, as well as uses of OUStringLiteral in extensions/source/abpilot/fieldmappingimpl.cxx and i18npool/source/localedata/localedata.cxx, which have been replaced with OUString::Concat (and which is arguably a better choice, anyway), also caused failures with at least Clang 5.0.2 (but would not have caused failures with at least recent Clang 12 trunk, so appear to be bugs in Clang that have meanwhile been fixed). Change-Id: I34174462a28f2000cfeb2d219ffd533a767920b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102222 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-08Remove some unused const variablesStephan Bergmann2-14/+0
Change-Id: Ib27249e9d4c9c7669a2766ec501e02652199c670 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102202 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-07Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicitStephan Bergmann1-1/+1
...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-09-04TabPage no longer needs to inherit from VclBuilderContainerCaolán McNamara2-2/+10
Change-Id: Iaab26ade1109daf732e58a2f3741cc43243e374c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102023 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-02use XTextComponent interface instead of bare vcl::EditCaolán McNamara1-29/+38
Change-Id: I35aa2b905b4e31930e8cdc91dc4ea6d37cdc9bfa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-09-01Fix typo in codeAndrea Gelmini1-3/+3
It passed "make check" on Linux Change-Id: I8be2457de5018e1e764e378e609c3a41c3cb9d11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101802 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-28bibliography copy and paste doesn't work from menusCaolán McNamara2-10/+13
when using native gtk menubar and menus because the focus isn't in the bibliography window at that stage. Just remember who had the focus when enabling/disabling the copy/paste entries. Change-Id: I52e907725691932bdc61e0774ef5d2a50f0eb8cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101555 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-28should check if edit is editable for allowing pasteCaolán McNamara1-7/+6
Change-Id: I70d490467f288043089aa5f8e6e79764be6e419a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101554 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-28Change OUStringLiteral from char[] to char16_t[]Stephan Bergmann12-31/+31
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-27add a DisableCycleFocusOut flag for an all-welded hierarchyCaolán McNamara1-1/+1
so we can differentiate the case of embedded welded widgets co-sharing the tab-cycle sequence with vcl widgets vs the case its all welded widgets Change-Id: I5c57b4e98d2f5c543522a72e31d554a67c259307 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101485 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-24restore translatable="no"Caolán McNamara5-9/+9
Change-Id: I42b46c0cada25703e8e9600533a220252796457e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101289 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-24tdf#118148 Extended tips from HC2/shared/Olivier Hallot10-26/+151
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-14loplugin:simplifybool moreNoel Grandin2-2/+2
look for expressions like !(a && !b) which can be expanded out Change-Id: I72515a9638762b050f9a258c08da39ebfa2ef8e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-14tdf#135526 ranges overflowing to become negativeCaolán McNamara1-2/+6
the properties panel uses huge min/maxes which can overflow when the number of digits changes Change-Id: Idbb998a065ce8f2b918fceea2076b794cbde3368 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100731 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-13use OUStringLiteral in SfxItemPropertyMapEntryNoel Grandin1-2/+2
Change-Id: I4f05b6a35010e661ea77f3e4b83302d2ec74d227 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100405 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-13loplugin:stringstatic also look for local staticsNoel Grandin4-27/+22
Add some API to O*StringLiteral, to make it easier to use in some places that were using O*String Change-Id: I1fb93bd47ac2065c9220d509aad3f4320326d99e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-07Make use of std string_viewStephan Bergmann1-6/+2
Change-Id: Ic4b330b7d046ba77e51d32d156501a18e3782985 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100313 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-06result of MnemonicGenerator::CreateMnemonic was unusedCaolán McNamara1-1/+1
since... commit 93257759580e6df10cc9eddbf1800a17d61cfc48 Date: Tue Jul 30 15:38:52 2013 +0200 convert vcl/mnemonic.hxx from XubString to OUString Change-Id: I2df7a6b29aa30ad5ad936b524061aeaef837ca9d Change-Id: I82d7d4f038762592086f4a8bc38d12d18529ccc4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100256 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-08-05Ensure cp target directory existsStephan Bergmann1-1/+2
<https://ci.libreoffice.org/job/gerrit_windows/71710/console> > cp: cannot create regular file 'C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/CustomTarget/extensions/source/activex/SOActionsApproval.cxx': No such file or directory [...] > make[1]: *** [C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/extensions/CustomTarget_so_activex_x64.mk:22: C:/cygwin/home/tdf/lode/jenkins/workspace/gerrit_windows/workdir/CustomTarget/extensions/source/activex/SOActionsApproval.cxx] Error 1 makes it look like this has been missing all along? Change-Id: Ifa685808942f05c539950311a4d800be0894c8ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100122 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>