Commit Graph

1394 Commits

Author SHA1 Message Date
Noel Grandin
b4c890cb65 loplugin:finalclasses in sfx2..svl
Change-Id: I71b78135b3d0259657438c4401340bb35ab5c6e0
Reviewed-on: https://gerrit.libreoffice.org/43742
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-24 13:41:17 +02:00
Stephan Bergmann
37604bca41 loplugin:includeform: shell (macOS)
Change-Id: I2a254633124caa03d48ec9e6d21751b0b8750c0b
2017-10-24 11:54:15 +02:00
Stephan Bergmann
7666da05ee loplugin:includeform: shell
Change-Id: I73be2f09a4b27509b62936daa414efb51977277f
2017-10-23 22:45:53 +02:00
Mike Kaganski
1944e3ddc0 Rename and move SAL_U/W to o3tl::toU/W
Previosly (since commit 9ac98e6e34)
it was expected to gradually remove SAL_U/W usage in Windows code
by replacing with reinterpret_cast or changing to some bettertypes.
But as it's useful to make use of fact that LibreOffice and Windows
use compatible representation of strings, this commit puts these
functions to a better-suited o3tl, and recommends that the functions
be consistently used throughout Windows-specific code to reflect the
compatibility and keep the casts safe.

Change-Id: I2f7c65606d0e2d0c01a00f08812bb4ab7659c5f6
Reviewed-on: https://gerrit.libreoffice.org/43150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-05 16:02:52 +02:00
Noel Grandin
2c05d758b2 add << operator for css::uno::Exception
Change-Id: Ia23dafd07133779144965682df3b7125a3214235
Reviewed-on: https://gerrit.libreoffice.org/43046
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins <ci@libreoffice.org>
2017-10-04 15:18:00 +02:00
Mike Kaganski
c3609f107b Use SAL_W/SAL_U instead of reinterpret_cast btwn wchar_t* and sal_Unicode*
This is type-safe, and allows to catch cases where a source type
is changed for some reason, but reinterpret_cast masks that

Change-Id: Ib64b6fa2e22d94a6bba890f0ccc3e20325c6f0a1
Reviewed-on: https://gerrit.libreoffice.org/42961
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 19:08:28 +02:00
Mike Kaganski
0dd2e602e5 Drop check for Windows versions we don't support
Since we dropped support of Vista and below in master toward 6.0,
those checks are needless. Removing the code that only worked in
older versions, and streamlining the resulting code.

Also, use kernel32.dll version for Windows version, instead of
deprecated GetVersionEx, and inconvenient VersionHelpers. Since both
GetVersion(Ex) and VersionHelpers (based on VerifyVersionInfo) are
subject to manifest-based behavior since Windows 8.1, this move will
hopefully result in more reliable OS version detection.

Change-Id: I3edd8fc1843e64b6a65bd3a126be6a085511f13c
Reviewed-on: https://gerrit.libreoffice.org/42905
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-29 14:55:11 +02:00
Mike Kaganski
e80aef4e03 shell: use Unicode on Windows
Change-Id: I9f7962db320f8832879ba327108425a7592b4b77
Reviewed-on: https://gerrit.libreoffice.org/42885
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-28 08:55:04 +02:00
Stephan Bergmann
e827d227c9 loplugin:redundantcast (clang-cl)
Change-Id: I37e7e217d89fb51cdfe28ec37be901e20068c309
2017-09-27 08:46:29 +02:00
Stephan Bergmann
a385dcd020 loplugin:cstylecast (clang-cl)
Change-Id: Ic61a2d58e260e11f3698524891201e8b761c97fc
2017-09-26 08:33:38 +02:00
Noel Grandin
a8622c77d2 loplugin:flatten in sdext..stoc
Change-Id: I460e813e20a691c53738373376d3363f553bbab2
Reviewed-on: https://gerrit.libreoffice.org/42636
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-23 09:02:58 +02:00
Andrea Gelmini
0db08432c6 Fix typo
Change-Id: I970201eb99c56db3ac5fefb9e113c0bb3b8c754b
Reviewed-on: https://gerrit.libreoffice.org/42678
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2017-09-23 00:59:11 +02:00
Mike Kaganski
eef4c133e9 Windows: avoid dependence on UNICODE define; prefer W functions
Change-Id: I95b90128e93f0d88ed73601bcc5a7ca9279d4cf1
Reviewed-on: https://gerrit.libreoffice.org/42560
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-22 20:53:30 +02:00
Mike Kaganski
afeff9102c Use even more WIN32_LEAN_AND_MEAN
Change-Id: I538fe5b41156366e0e87b3a93e58a3947afd18f5
Reviewed-on: https://gerrit.libreoffice.org/42398
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-18 01:13:30 +02:00
Mike Kaganski
3128668599 Use more WIN32_LEAN_AND_MEAN
https://msdn.microsoft.com/en-us/aa383745

Change-Id: I83528dc8e6a5e119e7aa816219d35f1ea3723b96
Reviewed-on: https://gerrit.libreoffice.org/42338
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-16 20:16:15 +02:00
Stephan Bergmann
b2d56c8b58 loplugin:constparams: shell (clang-cl)
Change-Id: I7ffe60d53f4c4b7690efc8bec9d29a4959740d9a
2017-08-31 12:14:40 +02:00
Noel Grandin
9881bea8d4 remove unnecessary use of OUString::getStr
Change-Id: I3d13e1c0bb6aa4a7aacc463198747c1368ebc9b4
Reviewed-on: https://gerrit.libreoffice.org/38114
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:55:13 +02:00
Noel Grandin
2e8acde112 remove UL/L suffixes from integer constants on the RHS of expressions
Change-Id: I899a8126c9d971601fea6c77eca165718aea0ac5
Reviewed-on: https://gerrit.libreoffice.org/41237
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-17 11:25:21 +02:00
Noel Grandin
c9253818ec loplugin:oncevar
extend oncevar to any POD type

Change-Id: Ia98ee0a67f183e40fb0c38477760124b2c411dc0
Reviewed-on: https://gerrit.libreoffice.org/40564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 08:25:07 +02:00
Stephan Bergmann
143b3a2f3c loplugin:useuniqueptr: shell (clang-cl)
Change-Id: Icf6cd85f9e4792ad09dd1a97a8802da13da942c2
2017-07-17 17:24:05 +02:00
Stephan Bergmann
5e790f691a loplugin:unnecessaryparen: shell (clang-cl)
Change-Id: If038a119b0b01bff9f452bb66e855e35c10d06eb
2017-07-17 17:23:21 +02:00
Noel Grandin
d5f94d9318 loplugin:constparams in basegfx,sax,shell
Change-Id: I90a9d105a6db146ae64cff56983def94b9472a95
Reviewed-on: https://gerrit.libreoffice.org/40043
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-17 11:30:43 +02:00
Jochen Nitschke
11c8f51177 tdf#108287 replace std::bind2nd with lambda
in preparation of removal of deprecated std::binary_function

Change-Id: Iabb02b100975f67665be9d6d562b7206ef846107
Reviewed-on: https://gerrit.libreoffice.org/39513
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-05 08:39:17 +02:00
Stephan Bergmann
da5356b099 Revert "Workaround to call /app/bin/xdg-open when run under flatpak"
This reverts commit 28a03248b1 (and removes a
stry empty line).  There is no more need for our own /app/bin/xdg-open, as
xdg-open in the freedesktop.org (and thus also GNOME) runtime (see
<https://github.com/flatpak/flatpak-xdg-utils/blob/master/src/xdg-open.c>) by
now knows to ask the Desktop portal, too.

Change-Id: Ie4141d02ba5f43c0264afcfae9edfc2d3a8cdb16
2017-07-03 18:17:21 +02:00
Stephan Bergmann
6507c0271f loplugin:oncevar (clang-cl): shell
Change-Id: I594596f27aa6f223d2294586357b11595377e1fe
2017-07-03 14:04:11 +02:00
Jochen Nitschke
c4ddf6cd6d C++11 remove std::unary_function bases from functors
std::unary_function is deprecated since C++11 and removed in C++17

90% done with regexp magic.
removed obsolete <functional> includes.

The std::unary_function base class was used in 3 places:
* chart2/source/tools/DataSeriesHelper.cxx: lcl_MatchesRole
   is used in a std::not1 function helper who uses the members
   return_type and argument_type.
   - replace deprecated std::not1 with a lambda
* chart2/source/tools/ModifyListenerHelper.cxx:
   lcl_weakReferenceToSame used the argument_type member in the
   operator() parameter.
   - inline the parameter type.
* xmloff/source/chart/SchXMLExport.cxx: lcl_SequenceToMapElement
   used result_type and argument_type in operator().
   - inline the types

Also fix compile error with gcc about finding std::for_each.

Change-Id: I073673beb01410c3108e7d0346d9e7d6b9ad2e2f
Reviewed-on: https://gerrit.libreoffice.org/39358
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2017-07-03 12:21:03 +02:00
Stephan Bergmann
77f77c57d3 loplugin:oncevar
Change-Id: I62fbef4959390161509e20a41f687a967db6c2fe
2017-06-29 23:38:00 +02:00
Stephan Bergmann
5c7c018b11 loplugin:oncevar
Change-Id: Id5309e2d06551da6df05d06e436678b570740f78
2017-06-29 11:40:28 +02:00
Jochen Nitschke
a5dba7dbec remove unused osl/mutex.hxx includes
Change-Id: I3b50e45fdb99e9cd8bfda07356ee3ddb4dd0f8bb
Reviewed-on: https://gerrit.libreoffice.org/38905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2017-06-18 13:38:25 +02:00
Michael Stahl
4ffdb6750f remove TDE integration (vclplug, address book, config backend)
It has ~no users, can't even be built on modern Linuxes, and it annoys
folks who want to refactor VCL.

Per ESC decision from 2017-06-08, remove --enable-tde and --enable-tdeab.

Change-Id: I51ce4786f29f8fcac2e2bb2a654c41fbfbbd8afd
Reviewed-on: https://gerrit.libreoffice.org/38718
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-06-13 10:41:24 +02:00
Stephan Bergmann
99377fd4d1 loplugin:redundantcast (clang-cl)
Change-Id: I465469471dc95e5dd61ecafd8ee8c9424b1b8030
2017-06-02 10:35:45 +02:00
Stephan Bergmann
ac82ba97f3 Revert those quotes that look broken
...from 2b916da6cd "tdf#105204 fix shellcheck
warning in shell/source/unix/misc/senddoc.sh"

Change-Id: Iad55c5f4ff97f39ba117e525f2e660b537b00367
2017-05-30 18:16:29 +02:00
Yeliz Taneroğlu
2b916da6cd tdf#105204 fix shellcheck warning in shell/source/unix/misc/senddoc.sh
Change-Id: I2e402186c4a8177031a8bf80f051ef0ca70063b0
SC2006: Use $(STATEMENT) instead of legacy `STATEMENT`
SC2086: Double quote to prevent globbing and word splitting.
Reviewed-on: https://gerrit.libreoffice.org/37824
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-05-21 13:05:27 +02:00
Jochen Nitschke
0d1a3593c2 cleanup unused css/uri/ includes
Change-Id: I08c7981ecce45e343ff9e98277dd3aea4ed68ab9
Reviewed-on: https://gerrit.libreoffice.org/37860
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-20 18:00:23 +02:00
Stephan Bergmann
99c99e3c75 cid#1403658: Try harder to make Coverity Scan happy
Change-Id: I109f95a55875b7795fc366825b3a6bb2e897d676
2017-05-11 17:07:32 +02:00
Jochen Nitschke
959496794c cleanup osl/diagnose.h includes
with command
> git grep -l osl/diagnose.h *.cxx |
  xargs grep -L -w 'OSL_\w*' |
  xargs sed -i '/#include *\(<\|\"\)osl\/diagnose.h\(>\|\"\).*/d'

headers need more work

Change-Id: I906519ebbd47a04703b4fa5943b2f7abea7a97ab
Reviewed-on: https://gerrit.libreoffice.org/37350
Tested-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-05-09 15:41:46 +02:00
Stephan Bergmann
a53c3cc450 loplugin:nullptr (clang-cl)
Change-Id: I6462f3e7667951ff9306ae1f8882de747148a741
2017-05-09 14:07:01 +02:00
Stephan Bergmann
693528ffd4 Don't use uninitialized ProxyEntry::Port values
...and get rid of the useless ProxyEntry struct altogether

Change-Id: I846f126c96343da17518686e666a7d44c6b1bef1
2017-05-09 10:21:19 +02:00
Thomas Beck
ad711bc6e2 tdf#107587 Opening Hyperlink opens Browser in Background.
Added neccessary WinAPI calls to bring called window into the
Foreground.

Change-Id: I080968f655e2230d1a514b3ef91bf916d904d844
Reviewed-on: https://gerrit.libreoffice.org/37196
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2017-05-04 23:52:13 +02:00
Noel Grandin
68e213319f remove empty comments
found with:
   git ls-files | xargs grep -Pzl '/\*\*
(\*|\s|
)*\*/'

Change-Id: I1f47bcb94d5a7b290a6c622c6941195fbb578597
Reviewed-on: https://gerrit.libreoffice.org/37159
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-05-03 09:07:36 +02:00
Stephan Bergmann
99637fb4c6 loplugin:useuniqueptr (clang-cl)
Change-Id: Ie541ecc3ec8d7032666b09aaec7d216a43ae44f1
2017-04-26 17:37:13 +02:00
Stephan Bergmann
3427e613c6 loplugin:redundantcast (clang-cl)
Change-Id: I4370a16ae9652d4f1e5aa3ed472cd88ad6d210c7
2017-04-26 17:37:13 +02:00
Noel Grandin
c70d49c7c8 use strong_int for LanguageType
Change-Id: If99a944f7032180355da291ad283b4cfcea4f448
Reviewed-on: https://gerrit.libreoffice.org/36629
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-04-26 08:50:54 +02:00
Chris Sherlock
da64d198ec tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2017-04-25 09:31:31 +02:00
Mike Kaganski
aa4e06c67d tdf#103058: use RegQueryValueEx instead of RegGetValue
because the latter is unsupported on WinXP

Change-Id: Ie922271ab837637d77f3d76c5144d10a7f5a5f0d
Reviewed-on: https://gerrit.libreoffice.org/36416
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-11 20:24:24 +02:00
Mike Kaganski
88829fd914 tdf#103058: allow optional registration for MS ProgIDs
To allow in-place replacement of OWSSUPP.dll, we need to be able
to handle the same ProgIDs that it handles, namely:
SharePoint.OpenDocuments and its versions. This allows to use
the SharePoint integration capabilities of LO without the need to
reconfigure SharePoint server's DOCICON.xml (the system would
start the component with same name as MS Office uses).

But this cannot be the default mode, since if MS Office is installed
on the same system, we would hijack the registration, that could be
undesirable.

So, this commit adds an option to use
regsvr32 [/u] /i:Substitute_OWSSUPP path\to\spsupp.dll
to also [un]register SharePoint.OpenDocuments in addition to normal
LOSPSupport.OpenDocuments.

Change-Id: Icc284f9aa8f97ecf04594dd55b99bc1e3d20740d
Reviewed-on: https://gerrit.libreoffice.org/36389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-04-11 09:46:58 +02:00
Stephan Bergmann
071dcb5f6a loplugin:redundantinline (clang-cl)
Change-Id: I03a19b599005f6ef25040889a1e1802445ebf430
Reviewed-on: https://gerrit.libreoffice.org/36063
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:06:18 +00:00
Stephan Bergmann
9a4b0beaa5 cid#1403658: Let ImplGetLocale return empty Optional for bad input
...like non-ASCII or too-long env var content on Linux

Change-Id: Ic2c536fa92b88108e96a0fc1a657180bc1906f01
Reviewed-on: https://gerrit.libreoffice.org/36067
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-04-04 12:05:21 +00:00
Jochen Nitschke
da56de9ac4 remove type decorations on char literals
they are only needed where type deduction fails.
left them in defines for now.

Change-Id: I7f002dd6bc7acc083c73b6c64076de6dd28d0b09
Reviewed-on: https://gerrit.libreoffice.org/35893
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-03-30 12:21:40 +00:00
Andrea Gelmini
2eae33e82e Fix typos
Change-Id: I5518e764fd8349c476e79bb888e93a1dab01ed1d
Reviewed-on: https://gerrit.libreoffice.org/35644
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-03-26 14:02:41 +00:00