Commit Graph
1898 Commits
Author SHA1 Message Date
Stephan Bergmann 3260edbeb5 loplugin:stringadd (clang-cl)
Change-Id: Id7c2db4abcf947c4efa0296df29feca2c36d3cf8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114692
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-27 15:45:27 +02:00
Noel Grandin 7049328fb2 loplugin:stringadd replace OUStringLiteral temporaries with OUString::Concat
Change-Id: I656f06a74d9f0180ae460264563d6a935c7d2c60
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114377
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-04-21 13:15:32 +02:00
Stephan Bergmann 177dcfec4e Better handling of filelocs
Change-Id: Ic9c06cb476942ceb7d0166f22103e2e88cc9c21f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114339
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-20 17:52:58 +02:00
Hossein ea5641baee Updated README.md files to represent current code / use Markdown format
Previously, all of the README files have been renamed to README.md
and now, the contents of these files were changed to use Markdown
format. Other than format inconsistency, some README.md files lacked
information about modules, or were out of date. By using LibreOffice
/ OpenOffice wiki and other documentation websites, these files were
updated. Now every README.md file has a title, and some description.
The top-level README.md file is changed to add links to the modules.
The result of processing the Markdown format README.md files can be
seen at: https://docs.libreoffice.org/

Change-Id: Ic3b0c3c064a2498d6a435253b041df010cd7797a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113424
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2021-04-07 17:47:16 +02:00
Hossein c16158772d Using .md extension/Markdown syntax for modules README
Renaming all README files for all top level modules to README.md,
applying no content change at this stage to be able to track history
of the files. These files should be edited to use correct Markdown
syntax later.

Change-Id: I542fa3f3d32072156f16eaad2211a397cc212665
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112977
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-03-24 11:46:14 +01:00
Mike Kaganski 96388e5e80 Drop 'static_cast<cppu::OWeakObject*>' syntactic noise
... where the object is created in-place, and its type is known

Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-03-10 08:22:26 +01:00
Mike Kaganski ed40d477b2 Drop ComPtr and use sal::systools::COMReference
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-27 11:05:00 +01:00
Stephan Bergmann f456c4dacf Improve checkExtension
Change-Id: Iff416a9c5930ad5903f7ee51a2abbc94d5f40800
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110970
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Jenkins
2021-02-16 11:08:33 +01:00
Andrea Gelmini 60b4c9f192 Remove unneeded breaks
Extending this:
https://gerrit.libreoffice.org/c/core/+/110512

Change-Id: I90d15fa6992a566e89c76dfab5fc863b33e0078a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110523
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-02-08 21:18:21 +01:00
Christian Lohmaier 4b9190fc29 mac: don't put script files into Contents/MacOS or framework-bin directory
Signing them as executable code would require external attributes, and
those in turn break packaging into hfs+ dmg when building on apfs with
Big Sur.
It is not a new thing - the old Code Signing in Depth technote
https://developer.apple.com/library/archive/technotes/tn2206/_index.html
already reads:
"Store Python, Perl, shell, and other script files and other non-Mach-O
executables in your app's Contents/Resources directory. While it's
possible to sign such executables and store them in Contents/MacOS, this
is not recommended.
[…]
Put another way, a properly-signed app that has all of its files in the
correct places will not contain any signatures stored as extended
attributes."
The patch does exactly that for LO and the shipped python framework and
adds symlinks for the moved files.
Same applies for the Language pack applescript and the tarball - those
are also moved into Contents/Resources

Change-Id: Iab21e77b73f941248ca89c6e80703fdf67a1057c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109537
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2021-01-18 15:56:36 +01:00
Stephan Bergmann 35e471bb4d Adapt the remaining OUString functions to std string_view
...for LIBO_INTERNAL_ONLY.  These had been missed by
1b43cceaea "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-11 21:25:10 +01:00
Stephan Bergmann 62128cda92 Strength-reduce some OUStringToOString("..."+...)
...to "..."+OUStringToOString(...), in preparation of making OUStringToOString
take a std::u16string_view

Change-Id: Ic01ca249d4d0eb58ac959ffdf96471308a3715dc
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107600
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-12-11 17:33:57 +01:00
Gabor Kelemen 107399d684 tdf#42949 Fix new IWYU warnings in directories s*
Except recently checked sc, sd, svx, sw

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ice1b86628e4f22a39f307b9c5fa567b6ab9d5acb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106917
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-01 14:56:43 +01:00
Stephan Bergmann e5022a5e52 loplugin:stringviewparam (Library_kf5be1)
Change-Id: Iaeaca5564f39863343cbb901be87dfd651c241ad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106863
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-30 16:04:49 +01:00
Stephan Bergmann a63087f580 RegCreateKeyExW etc. return LSTATUS
Change-Id: I78ebfd3e9eec9437ee405e99e2bcb96c53b1b84b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106728
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-27 13:19:24 +01:00
Stephan Bergmann d52ea2baa0 GetShortPathNameW returns DWORD
Change-Id: I5e86f9d0fd9832d0c8500c5d38805ddef5d5304b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106727
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-27 13:17:49 +01:00
Stephan Bergmann 2a78e9ddaf Windows InterlockedIncrement/Decrement use LONG
Change-Id: Ib3e8e89332399eba443d9ff291f694cfceb95af1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106726
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-27 13:16:46 +01:00
Stephan Bergmann 70b3bdd402 ZipFile::GetFileLongestFileNameLength is unused
...since 04366df3bc "Simple Zip file-format
implementation to avoid the need of minizip"

Change-Id: I20fd35c1f48912b1744063aadf0b917ca56288d8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106694
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-26 15:53:19 +01:00
Stephan Bergmann 696739056f Better handling of Java files
Change-Id: Ifa662be39ac7d35241ee31956e2556b7ba3b5a02
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106558
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-25 10:51:36 +01:00
Philipp Hofer 7c9a2c4b97 tdf#123936 Formatting files in module shell with clang-format
Change-Id: Iba0c34cff0e04b18a3b4c5b7bb2aa42e14aedb81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105707
Tested-by: Jenkins
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-19 10:44:14 +01:00
Stephan Bergmann ed3eda5d75 Use the new single-instance="true" attribute in shell
Change-Id: Ia8e454a65965cf99bafa795fe0bea4836ada2ee0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103846
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-10-02 20:41:23 +02:00
Noel Grandin 7adf79c2dd fix LTO+mergedlibs on windows
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-17 17:55:23 +02:00
Jan-Marek Glogowski 63972e79bb Fix the minimal build-tools target
The revert commits change the build-tools target for a DESKTOP
build to build the complete LO. This restores the original,
minimal one and also adds a whitelist of allowd build types.

OpenCL needs a configure switch, as it's status is also stored
in a config header, so preventing the build is not enough.

This also reverts:
- commit 802161a505
- commit 02d931a59e

Change-Id: Ibfcb0c54e72da1b7c2e63c082ea6586520a787fa
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102480
Tested-by: Jenkins
Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2020-09-11 18:34:48 +02:00
Stephan Bergmann c927aab29e Make the OUString ctors taking raw sal_Unicode pointer/non-const array explicit
...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 4b9e440c51
"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-07 19:19:14 +02:00
Stephan Bergmann 1bc7285803 Improve QString to OUString conversion
...assuming the way of constructing an OUString from just a QString::utf16
pointer, ignoring QString::size, was not chosen deliberately to cut of the input
string at a potential embedded NUL.

(This change is a prerequisite for making the OUString ctor taking a raw pointer
explicit.)

Change-Id: I3fb3026065f0247c19f0497d28adf422106bd9c4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102083
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-09-05 21:19:56 +02:00
Stephan Bergmann 33ecd0d5c4 Change OUStringLiteral from char[] to char16_t[]
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-28 08:07:09 +02:00
Andrea Gelmini eab5ce4647 Fix typo
Change-Id: Ib0e423f26428f5311d5f067177bd9457347e4971
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101111
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-08-21 12:22:56 +02:00
Stephan Bergmann 13ae66c0eb loplugin:stringstatic (clang-cl)
Change-Id: I024c7437e876459e22a6f541405b87ac13e7dc99
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101135
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-21 11:05:28 +02:00
Noel Grandin 2d58224468 loplugin:flatten
Change-Id: I6560756eb63856a22b43e3e65a7b7843cd2d5376
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100447
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-08-11 11:20:43 +02:00
Stephan Bergmann 924341e2c7 Improved loplugin:staticanonymous -> redundantstatic redux, clang-cl
Change-Id: Ie6dc22edbcfdf05ab8d7d668cb7cc33b5b747995
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100100
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-08-04 20:20:41 +02:00
Noel Grandin 7f0fb9a5e7 shell/wininet: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: I6612d0e45b50f3b02396734b2a20a2c17e18e052
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99137
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-23 08:52:27 +02:00
Noel Grandin 389daaa737 shell/simplemail: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: I944cbd7bc38f9dc1811756d3db4522047aaf34e5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99135
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-21 15:17:19 +02:00
Noel Grandin 9cc580922b shell/syssh: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: I0c46ef0e9be472b8fccc34376e9f1c23b0c07cb7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99130
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-21 14:41:24 +02:00
Noel Grandin da7489eb6a compact namespace decl
used
   git grep -lw namespace
    | xargs perl -i -p0e 's/(\w+)\s*.\{.\s*namespace\s*(\w+)/\1::\2/smg;'
 to do the initial replace, then compiled and fixed.

Change-Id: If69904d75940c851aeffab0e78c4ba02cc968d44
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98526
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-20 10:12:57 +02:00
Noel Grandin ae777762c1 shell/sessioninstall: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: I1878cf052b3f250927d5bb72ddd523af28cf9337
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98917
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-17 08:48:02 +02:00
Noel Grandin 0790a1445c shell/desktop: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: Id59a5182a94f642811063a1e29730aa6c7a01f5d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98879
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16 15:17:15 +02:00
Noel Grandin 3e572e8c05 shell/kf5: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: I45cf95f39f5d3bcab23000422b1348c72782acc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98880
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-16 12:33:26 +02:00
Noel Grandin 82c64c3119 shell/locale: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: Id13b26fb6f518e0586bb01c0c897c039fd3bd887
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98683
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15 08:46:56 +02:00
Noel Grandin b9707b5e3a shell/syssh: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: I94d0d68133877ab68e67607715afe78313bf1faf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98681
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-15 08:46:32 +02:00
Noel Grandin af1eee15fd shell/cmdmail: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: Ifeece1a72c594348f52e3edbee503a16a99619e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98682
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-14 14:40:49 +02:00
Noel Grandin c70e400b19 shell/macbe1: create instances with uno constructors
See tdf#74608 for motivation.

Change-Id: Ifdb4adc5073b728cbad4da5b261aa7475e9997e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98680
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-07-14 11:01:50 +02:00
Thorsten Behrens c5b985bc9b replace usage of blacklist with excludelist for IWYU
Background and motivation:
  https://tools.ietf.org/html/draft-knodel-terminology-02

Change-Id: I2f22d455d2a936a85750eaab1fda215ebb6d9d48
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98182
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-10 02:03:40 +02:00
Thorsten Behrens 493ae7a6bb replace usage of blacklist with denylist
.. and a few cases of instead doing blacklist->excludelist where that
made more sense.

Background and motivation:
  https://tools.ietf.org/html/draft-knodel-terminology-02

[API CHANGE] officecfg::Office::Canvas::DeviceBlacklist -> DeviceDenylist
[API CHANGE] officecfg::Office::Canvas::BlacklistCurrentDevice -> DenylistCurrentDevice
[API CHANGE] officecfg::Office::Common::Misc::OpenCLBlackList -> OpenCLDenyList

Change-Id: Ia35e25496bf0cc0692d5de4cb66bfc232d3a869e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98180
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-07-10 01:34:54 +02:00
Stephan Bergmann b0a21fb21f Upcoming improved loplugin:staticanonymous -> redundantstatic: shell
Change-Id: Ieb0abded6050cdb8a179ea1558bd17fa14ebb64b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97665
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-07-02 07:10:24 +02:00
Gabor Kelemen 1a6a794745 tdf#42949 Fix IWYU warnings in shell/
Except for MAC/WIN specific parts (i.e. most of it)

Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.

Change-Id: Ia14fb27c047e0e69f81386212aa25344f1297e05
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95663
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-06-10 16:34:06 +02:00
Julien Nabet 6d2c6d827e Use o3tl::safeCoInitializeEx/safeCoUninitializeReinit (shell/SysShExec)
Change-Id: Ice97c2db27085fefed098ee01f3aaeb55fc90cca
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95643
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-06-07 09:40:24 +02:00
Stephan Bergmann 91f13f44f2 Upcoming loplugin:elidestringvar: shell
Change-Id: I4459f995f7515beeb2e4d2446cfe4cdcfb1a07ae
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95548
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-06-05 08:47:00 +02:00
Stephan Bergmann fe6cce01c8 Fix loplugin:simplifypointertobool for libstdc++ std::shared_ptr
...where the get member function is defined on a std::__shared_ptr base class,
so loplugin:simplifypointertobool used to miss those until now.  (While e.g.
using libc++ on macOS found those cases.)

366d08f2f6 "new loplugin:simplifypointertobool"
was mistaken in breaking isSmartPointerType(const clang::Type* t) out of
isSmartPointerType(const Expr* e); c874294ad9 "Fix
detection of std::unique_ptr/shared_ptr in loplugin:redundantpointerops" had
introduced that indivisible two-step algorithm on purpose.

The amount of additional hits (on Linux) apparently asked for turning
loplugin:simplifypointertobool into a rewriting plugin.  Which in turn showed
that the naive adivce to just "drop the get()" is not sufficient in places that
are not contextually converted to bool, as those places need to be wrapped in a
bool(...) functional cast now.  If the expression was already wrapped in
parentheses, those could be reused as part of the functional cast, but
implementing that showed that such cases are not yet found at all by the
existing loplugin:simplifypointertobool.  Lets leave that TODO for another
commit.

Besides the changes to compilerplugins/ itself, this change has been generated
fully automatically with the rewriting plugin on Linux.

Change-Id: I83107d6f634fc9ac232986f49044d7017df83e2a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94888
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2020-05-26 22:33:02 +02:00
Julien Nabet b587de60d4 Prefer CoInitializeEx instead of CoInitialize
As https://docs.microsoft.com/fr-fr/windows/win32/api/objbase/nf-objbase-coinitialize?redirectedfrom=MSDN
advised.

Moreover, it'll make concurrency model explicit
Change-Id: I247a49248bf45beb64a7985a7c0d078ee48efe2d

Change-Id: I6e755fd516d9fb2dd2a9df0c66d9afd6070447ea
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94669
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-05-22 22:22:15 +02:00
Noel Grandin 60846212c7 use for-range on Sequence in sfx2..sw
Change-Id: I09806869f2fdbae61f4c5d5c9db6859202bb63b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94609
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-21 09:54:30 +02:00