Commit graph

818 commits

Author SHA1 Message Date
Noel Grandin
47317f0416 loplugin:expandablemethods in ucb..ucbhelper
Change-Id: I42d077d7ebcfb77447d011644f8d64e80eae69c2
Reviewed-on: https://gerrit.libreoffice.org/30266
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-26 06:49:46 +00:00
Andrea Gelmini
14d096e2bf Fix typos
Change-Id: Ie75beb4e282a4d1b784a5847262e39cf9c851527
Reviewed-on: https://gerrit.libreoffice.org/29440
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-03 06:15:59 +00:00
Noel Grandin
7f97b5e72c convert CONTINUATION constants to typed_flags_set
Change-Id: I38333e5d229aa520fbe0a8ad72007c503853956e
2016-09-26 08:29:38 +02:00
Noel Grandin
b18e1bc61c loplugin:unusedfields
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24
Reviewed-on: https://gerrit.libreoffice.org/29078
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-20 10:45:14 +00:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4 "Explicitly mark
overriding destructors as 'virtual'" appears to no longer be a problem with
MSVC 2013.

(The little change in the rewriting code of compilerplugins/clang/override.cxx
was necessary to prevent an endless loop when adding "override" to

  OOO_DLLPUBLIC_CHARTTOOLS    virtual ~CloseableLifeTimeManager();

in chart2/source/inc/LifeTime.hxx, getting stuck in the leading
OOO_DLLPUBLIC_CHARTTOOLS macro.  Can't remember what that
isAtEndOfImmediateMacroExpansion thing was originally necessary for, anyway.)

Change-Id: I534c634504d7216b9bb632c2775c04eaf27e927e
2016-09-13 13:19:22 +02:00
Noel Grandin
c158c00489 loplugin:constantparam in framework..vbahelper
Change-Id: I592f73012ae8a4df8488ef04dc0956d9400625bc
2016-09-07 10:04:44 +02:00
Noel Grandin
3c127bc71d cid#1371163 Missing move assignment operator
Change-Id: Ie050cfae965adf7bc43c91f366904cf6876783c0
2016-08-29 09:23:46 +02:00
Stephan Bergmann
2d8911d939 ucbhelper::Std{In,Out}putStream are only used in ucb/source/ucb/cmis/
...where their use of boost::shared_ptr (instead of std::shared_ptr) matches the
use in libcmis, but makes them unlikely to be useful anywhere else.  So move
them into ucb/source/ucb/cmis/.

Change-Id: I68359be6b43d6889af4f241dcdcbdc0d9d70d717
2016-08-22 14:52:28 +02:00
Stephan Bergmann
8f30da6386 Some clang-tidy misc-move-constructor-init
...by turning the relevant ctor parameters into "const &".

Change-Id: Ia8d0aba5da10ad6b25f8689e2281e45b3d71c1fc
2016-08-19 16:55:06 +02:00
Noel Grandin
508c95f1b6 improve passstuffbyref return analysis
Change-Id: I4258bcc97273d8bb7a8c4879fac02a427f76e18c
Reviewed-on: https://gerrit.libreoffice.org/27317
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-27 06:48:25 +00:00
Noel Grandin
48a8d6d843 loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 11:21:17 +00:00
Michael Stahl
47443d720d ucbhelper: get rid of pointless scope in ContentImplHelper::release
Change-Id: I5a35674115388288190e3a6496010badc32cf589
2016-06-24 12:52:25 +02:00
Noel Grandin
29bea29ec1 loplugin:singlevalfields in ucbhelper
Change-Id: I738bda6e6e161fb5ea96bd496a21ccf72680cd7f
Reviewed-on: https://gerrit.libreoffice.org/26604
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-24 08:12:53 +00:00
Noel Grandin
5bd5baff3f remove some more (void) style function definitions/declarations
found with
    git grep -nP '^\s*void\s*\)'

Change-Id: I1206031cf957cb6f957cae64ec5cae1280bda694
Reviewed-on: https://gerrit.libreoffice.org/26590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-23 10:57:45 +00:00
Noel Grandin
0323253a7c remove some manual ref-counting
triggered when I noticed a class doing acquire() in the
constructor and then release() in the destructor.

found mostly by
    git grep -n -B5 -e '->release()'

Change-Id: I96e43a3d30ffd9ae9a34275f24cd914d8f7b026f
Reviewed-on: https://gerrit.libreoffice.org/25806
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-06 07:01:34 +00:00
Noel Grandin
95d20a3799 Revert "remove some manual ref-counting"
until I have a better understanding of the UNO reference
counting.

This reverts commit 111de438ea.
2016-05-24 11:02:42 +02:00
Noel Grandin
111de438ea remove some manual ref-counting
triggered when I noticed a class doing acquire() in the constructor and
then release() in the destructor.

found mostly by
   git grep -n -B5 -e '->release()'

Change-Id: Ie1abeaed75c1f861df185e3bde680272dbadc97f
Reviewed-on: https://gerrit.libreoffice.org/25363
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-24 06:54:06 +00:00
Stephan Bergmann
4baf56e63d loplugin:passstuffbyref
Change-Id: Iba108c1007f33de2e7207e25d7eb2dfc18d1c22c
2016-05-12 14:26:29 +02:00
Stephan Bergmann
14cd5182c5 Replace fallthrough comments with new SAL_FALLTHROUGH macro
...which (in LIBO_INTERNAL_ONLY) for Clang expands to [[clang::fallthrough]] in
preparation of enabling -Wimplicit-fallthrough.  (This is only relevant for
C++11, as neither C nor old C++ has a way to annotate intended fallthroughs.)

Could use BOOST_FALLTHROUGH instead of introducing our own SAL_FALLTHROUGH, but
that would require adding back in dependencies on boost_headers to many
libraries where we carefully removed any remaining Boost dependencies only
recently.  (At least make SAL_FALLTHROUGH strictly LIBO_INTERNAL_ONLY, so its
future evolution will not have any impact on the stable URE interface.)  C++17
will have a proper [[fallthroug]], eventually removing the need for a macro
altogether.

Change-Id: I342a7610a107db7d7a344ea9cbddfd9714d7e9ca
2016-05-10 16:42:16 +02:00
Noel Grandin
f3d9aab841 teach passstuffbyref plugin to check for..
unnecessarily passing primitives by const ref.

Suggested by Tor Lillqvist

Change-Id: I445e220542969ca3e252581e5953fb01cb2b2be6
Reviewed-on: https://gerrit.libreoffice.org/24672
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06 06:48:38 +00:00
Stephan Bergmann
f9ec240046 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ie47a53763332119d290ebe5646af987ddd44be9d
2016-04-20 17:27:29 +02:00
Noel Grandin
828ed49a24 loplugin:passstuffbyref in ucbhelper
Change-Id: I680e4ca0d20d5ddabdc875a1d6bec27322956f5e
2016-04-14 09:21:39 +02:00
Noel Grandin
b76c2ea81d clang-tidy performance-unnecessary-value-param in ucbhelper
Change-Id: I595485e8804d6f2e4e0f9bc8a78c8cb132411f7d
2016-04-11 15:12:10 +02:00
Noel Grandin
3d26445098 loplugin:constantfunction in ucbhelper
Change-Id: I80e00b5ac2621378801f89532ed88b377ef72b60
Reviewed-on: https://gerrit.libreoffice.org/23297
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16 10:46:03 +00:00
Noel Grandin
b47cb646ff loplugin:constantparam
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
2016-03-15 08:27:25 +02:00
Rohan Kumar
bfa7b70048 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I simply replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0
as suggested in easy hack

Change-Id: Id30d93fa439fa4cddf4a56c90b6054203c7882b1
Reviewed-on: https://gerrit.libreoffice.org/23233
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-03-15 00:19:39 +00:00
Noel Grandin
c45d3badc9 new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Chris Sherlock
a238b1f8d3 Remove excess newlines
A ridiculously fast way of doing this is:

for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \
  --exclude-dir=workdir --exclude-dir=instdir '^
{3,}' .)
do
    perl -0777 -i -pe 's/^
{3,}/

/gm' $i
done

Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c
Reviewed-on: https://gerrit.libreoffice.org/22224
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:18:05 +00:00
Noel Grandin
752cd07d08 InterfaceContainer2 with vector instead of Sequence
create an InterfaceContainer2 class to replace InterfaceContainer.
It uses a std::vector instead of a Sequence for the mutable listener
list, which provides far better performance.

Switch all our internal use-sites to the new class.

Change-Id: I6b56cfa511ded2395faa22e68fab3b2f16c3cb88
2016-01-25 08:52:03 +02:00
Andrea Gelmini
64d624b651 Fix typos
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-01-10 14:17:20 +00:00
Noel Grandin
abc6071b7a loplugin:unusedfields various
Change-Id: I18f94269a1172cf195ee402384f7144610e1e82d
2015-11-26 13:26:25 +02:00
Noel Grandin
5fc51f8d25 use unique_ptr for pImpl in ucbhelper/
Change-Id: Ibae75fc4d843bd38179d4c7afc6ddb532835c7a6
2015-11-17 10:59:48 +02:00
Noel Grandin
96c26b0d9d use initialiser for Sequence<OUString>
using variations of:
git grep -lP 'Sequence.*OUString.*\(\s*1\s*\)' | xargs perl -0777 -pi -e "s/Sequence<OUString> (\w+)\(1\)\;
\s*OUString\* pArray.*;
.*\[0\]\s*=\s*(\S+)\;/Sequence<OUString> \1 { \2 };/g"

Change-Id: I03c64334ff30ee14dce0d17b67f5122a3893bbe3
Reviewed-on: https://gerrit.libreoffice.org/19971
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-15 12:20:39 +00:00
Noel Grandin
ee74decafe com::sun::star->css in ucbhelper/
Change-Id: I01e3046caefdcfbf630f4a794f12e8890be6db40
Reviewed-on: https://gerrit.libreoffice.org/19902
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-11 09:20:55 +00:00
Stephan Bergmann
b4af166440 loplugin:nullptr (automatic rewrite)
Change-Id: I3003db8a411740db48c2e0c6ecd81a7fd9209e6c
2015-11-10 10:31:55 +01:00
Stephan Bergmann
d0e6388a21 loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I970a03643f3c460110bc7caf1dc33c6dde1d78d5
2015-11-06 09:38:16 +01:00
Noel Grandin
94268513ee use uno::Reference::set method instead of assignment
Change-Id: Id57ccff7ea6cf5c7053b51268b1190f5459bb357
2015-11-05 12:42:42 +02:00
Noel Grandin
b5db48ada1 no need to use OUString constructor in call to createInstance
Change-Id: Iaf3d83ba1490cb1d97a5bd4d1f7cd6943d4a7296
Reviewed-on: https://gerrit.libreoffice.org/19704
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-01 15:25:43 +00:00
Stephan Bergmann
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
Stephan Bergmann
db0ac3d2cb loplugin:stringconstant
Change-Id: I68c63d560cfd7ec82802cd3f073cdd0544cff99b
2015-10-05 14:35:46 +02:00
Giuseppe Castagno
b4576f3da4 tdf#82744: fix WebDAV lock/unlock behaviour - part 3
Changes done to the code in sfx2, ucbhelper, ucb, unotools in no particular order

- add method helpers to call the ucb lock/unlock

- add lock/unlock 'real' management

- make DateChange property retrieval working for WebDAV as well

- add check for changed content of a WebDAV file, in order to reload
it correctly when 'Edit Mode' command is activated from GUI

- Unlock WebDAV file while saving only if explicitly enabled
  Needed in order to avoid the small window of file unlocked state that
  opens while saving a file.
  When saving LO actually does as follows:
  - unlock the prevoius version of the file
  - prepares operations to save the modified version
  - lock the new file
  - save the new version

- the lock method is enabled if the DAV resource supports it.
In case the lock is not supported, for example example DAV with lock
disabled, the lock method is disabled.

Exception: when the resource is first created and the lock is not
supported: a lock command is sent anyway, because if the resource is not
yet present, there is no method to detect the lock/unlock availability
in this case.

- cppcheck:noExplicitConstructor

Change-Id: I0aa876c4e3364d86e5740977b97f3db9a01e4491
Reviewed-on: https://gerrit.libreoffice.org/17189
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
2015-10-05 11:14:50 +00:00
Andrea Gelmini
82f0a4f930 Fix typos
Change-Id: I3926eca56ac9f54f9ddbf88610888ce97cf00b34
Reviewed-on: https://gerrit.libreoffice.org/18990
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-30 10:41:48 +00:00
Takeshi Abe
ee7da352b8 Resolves: tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants.

Change-Id: I7154f9472f02fdf47d27ba715db55bb1ec669a8a
Reviewed-on: https://gerrit.libreoffice.org/18580
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-15 06:19:28 +00:00
Stephan Bergmann
c168ff9c5e loplugin:stringconstant: OUStringBuffer: appendAscii -> append
Change-Id: If38423c29c7a9f4d740c244d350b83c471523797
2015-08-31 08:00:53 +02:00
Stephan Bergmann
3d1e29c55b Remove newly unused ucbhelper/fileidentifierconverter.hxx
Change-Id: I7c272383ecb115e19699ed96bf5622d979403a01
2015-08-18 15:32:16 +02:00
Stephan Bergmann
1242a3a55f Remove obsolete getLocalFileURL
...vnd.sun.star.wfs is long gone

Change-Id: I64da15a6c16e429aeda57c435e353891fb28f04d
2015-08-18 14:19:59 +02:00
Noel Grandin
286dfc2a72 loplugin: defaultparams
Change-Id: I50ba6a836473961d952ed88e56532501469c5368
2015-08-11 09:48:18 +02:00
Noel Grandin
a4fd6c4f9e inline some use-once typedefs
Change-Id: I02cbbba56a2ad83e0ac3d806265a7e0d6a29594d
Reviewed-on: https://gerrit.libreoffice.org/17495
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 12:16:33 +00:00
Szymon Kłos
298272f9dc tdf#84190 : when auth fails, don't remember passwords for cmis
Change-Id: Ia1e0d553556693e0efa6de0bfc6f8b0ae9d40b5d
2015-07-16 09:53:23 +02:00
Stephan Bergmann
647d7b0cd5 loplugin:stringconstant: handle OUString+=OUString(literal)
Change-Id: I6e534537883ef76db88926203bf21b6d0be0aab1
2015-06-26 13:55:35 +02:00