Commit Graph

5613 Commits

Author SHA1 Message Date
Stephan Bergmann
3daadac6c9 loplugin:includeform: extensions
Change-Id: I2f9001ddae6cbcef51ba2c0415baa727f211261d
2017-10-23 22:46:08 +02:00
Noel Grandin
87a9979c89 overload std::hash for OUString and OString
no need to explicitly specify it anymore

Change-Id: I6ad9259cce77201fdd75152533f5151aae83e9ec
Reviewed-on: https://gerrit.libreoffice.org/43567
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-23 08:15:35 +02:00
Michael Meeks
254c49dcce tdf#113225 - hold the solar mutex when entering from UNO.
http://crashreport.libreoffice.org/stats/crash_details/dff57662-1693-47f6-8b09-88f180d2e706

Change-Id: I4322c2113c300af97fb5854aac4a741b7027e6b1
Reviewed-on: https://gerrit.libreoffice.org/43623
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2017-10-21 06:40:58 +02:00
Noel Grandin
08f7502bf8 no need to call acquire()
when we are returning an uno::Reference

Change-Id: Ifff0dba20f45f5321f398577fa7d5fb073278a94
Reviewed-on: https://gerrit.libreoffice.org/43472
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-18 08:36:01 +02:00
Noel Grandin
899a656870 use rtl::Reference in BibDataManager
instead of manual reference counting

Change-Id: Ia8fd5487fb8d25d6725dd36b74aab57272aba911
Reviewed-on: https://gerrit.libreoffice.org/43447
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-10-17 10:58:46 +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
532a4dcba6 Replace more reinterpret_cast with SAL_W/SAL_U
Change-Id: Ia632e4083222ad9e7f17c2ad0d0825f189c700cc
Reviewed-on: https://gerrit.libreoffice.org/43071
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-03 16:30:36 +02:00
Johnny_M
ebeff35a03 tdf#39468 Translate German comments (leftovers)
Change-Id: I9952c560547b0668d8216edba1486638fa41e553
Reviewed-on: https://gerrit.libreoffice.org/42990
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-10-01 16:28:39 +02:00
Stephan Bergmann
3e9f0d6f6e loplugin:flatten (clang-cl, extensions)
Change-Id: I2aceee910e8e39a7c4ebb89282447dc4b26ad3cb
Reviewed-on: https://gerrit.libreoffice.org/42978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-10-01 08:57:22 +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
362a21d3a1 Use explicit function names for fooA/fooW WinAPI; prefer fooW
We should only use generic foo function name when it takes params
that are also dependent on UNICODE define, like
LoadCursor( nullptr, IDC_ARROW )
where IDC_ARROW is defined in MSVC headers synchronised with
LoadCursor definition.

We should always use Unicode API for any file paths operations,
because otherwise we will get "?" for any character in path that
is not in current non-unicode codepage, which will result in failed
file operations.

Change-Id: I3a7f453ca0f893002d8a9764318919709fd8b633
Reviewed-on: https://gerrit.libreoffice.org/42935
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2017-09-30 11:23:41 +02:00
Noel Grandin
290507945d readonly xBibCursor in BibDataManager
since
    commit 95117e7fef
    Date:   Mon Sep 18 15:18:56 2000 +0000
    initial import

Change-Id: Ia7e57f1e0e2b19c6eb5b66ada9cc062f202b453a
Reviewed-on: https://gerrit.libreoffice.org/42833
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-27 09:06:34 +02:00
Samuel Mehrbrodt
b9a8ac48d7 Rename GetSelectEntryData -> GetSelectedEntryData
Change-Id: Ia6402f6d2c978cbd5557052a43e9728ca9e11173
Reviewed-on: https://gerrit.libreoffice.org/42285
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-25 10:54:53 +02:00
Samuel Mehrbrodt
83de03e077 Rename GetSelectEntryCount -> GetSelectedEntryCount
Change-Id: I405b347b404ed0acb3b6a0204e0b914a7698ce25
Reviewed-on: https://gerrit.libreoffice.org/42284
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-25 10:00:46 +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
Noel Grandin
3a481dde03 loplugin:flatten in editeng..extensions
Change-Id: I2b68f5640471ea827c09af1b5a319fb526a53b4b
Reviewed-on: https://gerrit.libreoffice.org/42579
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-21 15:29:20 +02:00
Samuel Mehrbrodt
d99b65c864 Rename GetSelectEntryPos -> GetSelectedEntryPos
Change-Id: I0bd4cb463575af843c72d9c8aaf91742203532a4
Reviewed-on: https://gerrit.libreoffice.org/42283
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:45:38 +02:00
Samuel Mehrbrodt
b649e5bf1d Rename GetSelectEntry -> GetSelectedEntry
Change-Id: Ibb7d8c59c0e61b0e87455bd78f241d8691dd9dce
Reviewed-on: https://gerrit.libreoffice.org/42282
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2017-09-21 12:44:00 +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
Jochen Nitschke
7315f325ff use more default copy ctors
if ctor should be private or protected explicitly default them.
boost::optional has copy ctors, so use them.

Change-Id: If1855626b297e739afef0dc5ad57958f7ad199bc
Reviewed-on: https://gerrit.libreoffice.org/42363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-17 07:43:01 +02:00
Stephan Bergmann
033bb03823 Make clamping of aParams.format work reliably
...regardless of the details of the type of aParams.format, SANE_Frame, which
the SANE documentation at <http://sane.alioth.debian.org/html/doc012.html> is
vague about.  (It could, e.g., validly have negative values in an implementation
where SANE_Frame is an enum with additional, negative enumerators besides the
required SAN_FRAME_GRAY...BLUE.)

Before 2687a5aca1 "-Werror,-Wtautological-compare
with latest clang" the code had explicitly checked for aParams.format < 0.

Change-Id: Ie2a19e67e942841c5a52b862cb427bac77d6ebb2
2017-09-11 14:34:05 +02:00
Noel Grandin
2687a5aca1 -Werror,-Wtautological-compare with latest clang
Change-Id: I073f1893b759f8d31a24187f542b031b86dc4b8a
error: comparison of unsigned enum expression >= 0 is always true
[-Werror,-Wtautological-compare]
Reviewed-on: https://gerrit.libreoffice.org/42103
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-08 15:53:29 +02:00
Caolán McNamara
1af5f6e8d1 set parent for file dialog helper
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a
Reviewed-on: https://gerrit.libreoffice.org/42048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-09-08 11:27:18 +02:00
Michael Stahl
e55ee82f51 extensions: GCC 7 -Werror=format-truncation
Given a valid DateTime, the "buffer" is too small by 1 because
Year can be negative with 4 digits.

Most of the problem is that invalid DateTimes would overflow
by up to 14 bytes; throw IllegalArgumentException for obviously
invalid DateTime.

Change-Id: I8af109425d5681b1b28454917664401a5404f251
2017-09-07 14:16:12 +02:00
Noel Grandin
326295bf10 new loplugin:redundantpointerops
Change-Id: I8428d86ea9628d69c2b40b36feee3da428a9fe1d
Reviewed-on: https://gerrit.libreoffice.org/41787
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-09-04 08:44:19 +02:00
Stephan Bergmann
597191920a loplugin:constparams: extensions (clang-cl)
Change-Id: I1665228a622b18757951b725467933699f9871ae
2017-08-31 12:14:40 +02:00
Tor Lillqvist
27bde9a6ab Drop gratuitous initial :: from comphelper::ProfileZone
Change-Id: Iae7d86b857d0563d9ed9d9b4187e009554698412
2017-08-25 16:09:53 +03:00
Noel Grandin
dcc667ac5e convert message box style bits to scoped enum
and fix harmless bug in ImpSVGDialog::ImpSVGDialog, which there since

    commit 6456f1d810
    Date:   Fri Feb 4 14:52:54 2011 +0100
    ka102: added/removed files for SVG import and module cleanup

Change-Id: I66b2ec2b029431ab453e54e962863e4ed7d78962
Reviewed-on: https://gerrit.libreoffice.org/41412
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-23 08:47:52 +02:00
Andrea Gelmini
35974dfc73 Fix typos
Change-Id: I3f3abc3c6e12536d4bc38f0c676d5fc20532a1e3
Reviewed-on: https://gerrit.libreoffice.org/41370
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2017-08-21 08:43:01 +02:00
Takeshi Abe
fb0bf56948 tdf#105538 Download update to Downloads folder on Windows
instead of Desktop.

Change-Id: Ib88b23afdd0b836184b7f0a3f501983137a1405d
Reviewed-on: https://gerrit.libreoffice.org/40692
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2017-08-18 12:58:12 +02:00
Stephan Bergmann
a100b31f0d loplugin:oncevar (clang-cl)
Change-Id: I36c97d99d268b0ebedfd0eebc4722cabc6e51220
2017-08-18 10:07:56 +02:00
Andrea Gelmini
0501869949 Fix typos
Change-Id: I795059109e23800987cda6f04c58ab18c488ad07
Reviewed-on: https://gerrit.libreoffice.org/41242
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-08-18 07:44:59 +02:00
Andrea Gelmini
64a3124d92 Fix typos
Change-Id: Iaa9c0aea3ea1a239e378bd714ba335f91bb1faf3
Reviewed-on: https://gerrit.libreoffice.org/41194
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2017-08-17 21:53:28 +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
db17a874af convert std::map::insert to std::map::emplace II
Change-Id: Ief8bd59c903625ba65b75114b7b52c3b7ecbd331
Reviewed-on: https://gerrit.libreoffice.org/41019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 13:51:29 +02:00
Noel Grandin
d347c24036 convert std::map::insert to std::map::emplace
which is considerably less verbose

Change-Id: Ifa373e8eb09e39bd6c8d3578641610a6055a187b
Reviewed-on: https://gerrit.libreoffice.org/40978
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-11 12:38:32 +02:00
Michael Stahl
bd60bbfbdf desktop,extensions: updater: only allow redirects to HTTP/HTTPS
Configure curl to prevent redirects to other protocols.

Change-Id: Ied73b3d9a062ea6e0a1d594f4c12162dffd6c4a7
2017-08-09 18:16:32 +02:00
Noel Grandin
61d49afadb loplugin:unusedmethods
Change-Id: Id66cf12e3a59aeed1b9a7a111b841e30b248635b
Reviewed-on: https://gerrit.libreoffice.org/40876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-08-08 20:56:30 +02:00
Caolán McNamara
3b35bcf25f split out VclBuilder static methods
Change-Id: Ic94b39351c9a6131fb61883a98ae9e3ee60ad119
2017-08-02 11:42:23 +01:00
Caolán McNamara
b1d829e52e move resmgr to unotools
and the vast majority of translations is to the ui language so default
ctor with that arg

and now drop OModuleResourceClient

Change-Id: I3b85a560ffdfe5f019c2271ac56a5fe4a361522b
2017-08-01 13:42:21 +01:00
Noel Grandin
76badcaf7a loplugin:constparams in extensions,scripting,sdext
Change-Id: I3d47e144db17358bf6e2e5e3f4ad29de888c01b1
Reviewed-on: https://gerrit.libreoffice.org/40583
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-31 13:05:06 +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
Noel Grandin
b09deb0753 loplugin:constparams handle constructors
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis

Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-28 14:51:56 +02:00
Noel Grandin
5aa4a6b072 fix propcontroller extension regression
since cmmit 00657aef09
"migrate to boost::gettext"

Change-Id: I9127203ac86a87b916980186efa6f8877868955b
Reviewed-on: https://gerrit.libreoffice.org/40415
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 22:04:03 +02:00
Noel Grandin
f74da1315a use more comphelper::InitAnyPropertySequence
Found with:
  git grep -n -A10 'Sequence.*Any' -- *.cxx | grep -B5 -w PropertyValueProvider
and:
  git grep -n 'Sequence.*Any.*( *&'

Change-Id: Icb18c98bdd3f8352817e443ff78de5df042859ad
Reviewed-on: https://gerrit.libreoffice.org/40389
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-25 12:03:17 +02:00
Caolán McNamara
351202fd9b coverity#1242860 Unused value + loplugin:casttovoid
Change-Id: I80725fbde6fbf29d47f0b462ff22e6be4fbebaca
2017-07-24 09:42:21 +01:00
Caolán McNamara
fd1647ad90 coverity#1242860 Unused value
Change-Id: I0749fc82ebdf45b3cb022d3989df774e73e715bd
2017-07-24 08:11:36 +01:00
Noel Grandin
4bb2bca091 remove now unnecessary comphelper::OModuleClient stuff
after the great gettext migration of 2017

Change-Id: I704389b1ae1fb34dae0429c98cbfc89c2d3b8e27
Reviewed-on: https://gerrit.libreoffice.org/40322
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-07-23 21:11:32 +02:00