828 Commits

Author SHA1 Message Date
Miklos Vajna
a5a571307f tdf#82580 tools: rename Rectangle to tools::Rectangle
Mostly generated using

make check COMPILER_EXTERNAL_TOOL=1 CCACHE_PREFIX=clang-rename-wrapper RENAME_ARGS="-qualified-name=Rectangle -new-name=tools::Rectangle"

Except some modules have their own foo::tools namespace, so there have
to use ::tools::Rectangle. This commit just moves the class from the
global namespace, it does not update pre/postwin.h yet.

Change-Id: I42b2de3c6f769fcf28cfe086f98eb31e42a305f2
Reviewed-on: https://gerrit.libreoffice.org/35923
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2017-03-31 06:27:11 +00:00
Caolán McNamara
3d213b3dc5 make SfxGetpApp just get and move GetOrCreate to the periphery
Change-Id: If3b22635e46dbccf0fad101f51bb653cbbcd3a32
Reviewed-on: https://gerrit.libreoffice.org/34957
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2017-03-08 09:56:07 +00:00
Noel Grandin
e4f6db9ec2 FontDescription.IsVertical is a tristate
found by still in progress "UNO scoped enum" change

Change-Id: I0a21b89e77be165bc96e914017a402cf8724d218
Reviewed-on: https://gerrit.libreoffice.org/34719
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-28 12:21:06 +00:00
Stephan Bergmann
43f2a7d979 Better make the zero-initialization more explicit
...if initializing these members is necessary at all; a bit hard to tell from
the code.

Change-Id: I3ddb25c35f0d1b44a092bdb2cb0192ce619f947c
2017-02-23 08:49:32 +01:00
Tor Lillqvist
6de3688cc6 Drop :: prefix from std in c*/
Change-Id: If078cda95fa6ccd37270a5e9d81cfa0b84e71155
Reviewed-on: https://gerrit.libreoffice.org/34324
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tor Lillqvist <tml@collabora.com>
2017-02-15 23:01:23 +00:00
Noel Grandin
f4826959c1 new loplugin:unusedenumconstants
These are the simple removals, where it is obviously safe,
the more complex ones will come in separate commits

Change-Id: I7211945a6a5576354b60d9c709940ce9b674f308
Reviewed-on: https://gerrit.libreoffice.org/33828
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 08:59:39 +00:00
Noel Grandin
2489000d3f loplugin:useuniqueptr extend to check local vars
just the simple and obvious case for now, of a local var being allocated
and deleted inside a single local block, and the delete happening at the
end of the block

Change-Id: I3a7a094da543debdcd2374737c2ecff91d644625
Reviewed-on: https://gerrit.libreoffice.org/33749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-01 12:15:22 +00:00
Patrick J
e3a47c0950 tdf#101638 diameter and radius were mixed up, devide by two
Change-Id: Iaece1ca3439ab3e1029156a5847768728b53b96e
Reviewed-on: https://gerrit.libreoffice.org/33717
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2017-01-31 09:26:02 +00:00
Stephan Bergmann
e57ca02849 Remove dynamic exception specifications
...(for now, from LIBO_INTERNAL_CODE only).  See the mail thread starting at
<https://lists.freedesktop.org/archives/libreoffice/2017-January/076665.html>
"Dynamic Exception Specifications" for details.

Most changes have been done automatically by the rewriting loplugin:dynexcspec
(after enabling the rewriting mode, to be committed shortly).  The way it only
removes exception specs from declarations if it also sees a definition, it
identified some dead declarations-w/o-definitions (that have been removed
manually) and some cases where a definition appeared in multiple include files
(which have also been cleaned up manually).  There's also been cases of macro
paramters (that were used to abstract over exception specs) that have become
unused now (and been removed).

Furthermore, some code needed to be cleaned up manually
(avmedia/source/quicktime/ and connectivity/source/drivers/kab/), as I had no
configurations available that would actually build that code.  Missing @throws
documentation has not been applied in such manual clean-up.

Change-Id: I3408691256c9b0c12bc5332de976743626e13960
Reviewed-on: https://gerrit.libreoffice.org/33574
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-01-26 12:54:43 +00:00
Noel Grandin
1d7c589d50 loplugin: unnecessary destructor cppcanvas..filter
Change-Id: I009cdd60869a67d210edf879ddb451663a7b8676
Reviewed-on: https://gerrit.libreoffice.org/33491
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-01-24 11:02:35 +00:00
Mark Page
f671121525 Split emfplus.cxx into multiple files
This helps make emfplus.cxx more readable.
No source code was changed, only moved except these
renamed to avoid inheritance warnings::
EMFPBrush::transformation renamed to brush_transformation
EMFPPen::transformation renamed to pen_transformation
Change-Id: I6952d6300c9c459833c2dda2b715d851b9e80de7
Reviewed-on: https://gerrit.libreoffice.org/31165
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2017-01-23 11:44:45 +00:00
Stephan Bergmann
3aaf523d68 Dispose Window when done
Change-Id: I6b67d12174c3caa0a4bf230d87421f5768a331f8
2016-12-22 10:22:21 +01:00
Noel Grandin
70f05aa69a convert PolyStyle to scoped enum
Change-Id: Ia35fdbb5e40888db9558988ac069741b31721f0e
Reviewed-on: https://gerrit.libreoffice.org/31633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-06 05:31:18 +00:00
Stephan Bergmann
ef3a9951e0 loplugin:unnecessaryoverride (dtors) in cppcanvas
Change-Id: I4f6f6e36a965b5c01ffd51b1710fa8cc57d497fa
2016-11-28 14:14:53 +01:00
Michael Stahl
2b14fb3a4f cppcanvas, oox: add missing #include <osl/endian.h>
These files use the macro OSL_BIGENDIAN but did not include the header
that defines it.

Found via:

git grep -l OSL_.*ENDIAN | grep -E '\.h(xx)?$' | while read f; do grep -L endian\\.h $f ; done

Change-Id: Iffb36336026e49a9c3d8fcf125a54ec857c7552e
2016-11-21 12:47:51 +01:00
Noel Grandin
b01c5ae956 loplugin:unusedmethods unused return types
Change-Id: I88204bca60dd1e299b040c52bc87e500cbfaa930
Reviewed-on: https://gerrit.libreoffice.org/30519
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-03 11:37:31 +00:00
jan iversen
9183e2cec0 Revert "tdf#96505 Get rid of cargo cult "long" integer literals"
This partly reverts commit 8ae33b1652cb1e654c426350169d3bb9fa031a4f.

Added a comment why 1L is needed in this file.

Change-Id: I92349b42decb964a45d4dc9c50b89cd22766acb9
Reviewed-on: https://gerrit.libreoffice.org/30259
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-25 09:21:55 +00:00
Rosen
8ae33b1652 tdf#96505 Get rid of cargo cult "long" integer literals
fixed all long integer literals in file

Change-Id: Ib557d88d4e4f17d5c334c92d611d002fe163f2f6
Reviewed-on: https://gerrit.libreoffice.org/29235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-10-25 07:14:26 +00:00
Noel Grandin
954f752cf1 convert MapUnit to scoped enum
I left a prefix on the names "Map" so that I would not have to re-arrange
each name too much, since I can't start identifiers with digits like "100thMM"

And remove RSC_EXTRAMAPUNIT, which doesn't seem to be doing anything anymore.

Change-Id: I5187824aa87e30caf5357b51b5384b5ab919d224
Reviewed-on: https://gerrit.libreoffice.org/29096
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-05 06:51:20 +00:00
Noel Grandin
a2b77b4368 loplugin:singlevalfields in basic..idl
Also fix obvious bug in the initialisation of the
connectivity::odbc::OConnection::m_bClosed field.
Probably closes some kind of connection leak there.

Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82
Reviewed-on: https://gerrit.libreoffice.org/28932
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 08:30:26 +00:00
Michael Stahl
b647996a9b replace sal_Size with std::size_t (or sal_uInt64 for SvStream pos)
... except in include/rtl, include/sal, include/uno, where sal_Size is
retained for compatibility, and where callers of rtl functions pass in
pointers that are incompatible on MSVC.

Change-Id: I8344453780689f5120ba0870e44965b6d292450c
2016-09-15 12:01:11 +02:00
Stephan Bergmann
91dd2db17b loplugin:override: No more need for the "MSVC dtor override" workaround
The issue of 362d4f0cd4e50111edfae9d30c90602c37ed65a2 "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
1256980239 convert GradientStyle to scoped enum
Change-Id: Ib740da708612df7a5f4b8c82262b9b1bd436604d
2016-09-05 08:21:46 +02:00
Noel Grandin
65ca57a447 convert LineStyle to scoped enum
Change-Id: I30cfa5a0649b806604c443f55683d1f2a430983d
2016-09-05 08:21:46 +02:00
Stephan Bergmann
489a47dfa0 loplugin:stringconstant: adapt to improved OUStringLiteral1 (cppcanvas)
Change-Id: I98a9e1404c2a9a39c8f930609c199c75f0a572f1
2016-08-30 15:27:26 +02:00
Caolán McNamara
2e6d96408e Revert "temp tinderbox fix"
This reverts commit d4cb9c3a8851cb874fd8b6c77d4d7521da7579b7.

Change-Id: Ifd11427ea6b4137d0e0c007e7f140fbc6caa3f31
2016-07-28 13:35:04 +01:00
Noel Grandin
6e72f0251b new loplugin unnecessary override
Change-Id: I88d3e33823d68745b98625050a8a274f9ef04bcb
Reviewed-on: https://gerrit.libreoffice.org/27135
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-07-15 14:05:41 +00:00
Stephan Bergmann
fd8f328462 Clean up uses of Any::getValue() in cppcanvas
Change-Id: I9a69b35ee7dc2da3912a72361e0e742bf480e6be
2016-06-10 18:55:53 +02:00
Gleb Mishchenko
a97b392879 tdf#94698 cleanup Makefiles. Get rid of udkapi and offapi
This patch changes occurences in makefiles
from
$(eval $(call gb_CppunitTest_use_api,comphelper_test_config, \
	udkapi \
	offapi \
))

to
$(eval $(call gb_CppunitTest_use_sdk_api,comphelper_test_config))

(corrected instead of abandon, jani)

Change-Id: Ic96ec65d82d7452e288f05a8b6d576ef543b068e
Reviewed-on: https://gerrit.libreoffice.org/23426
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-09 09:47:11 +00:00
Michael Stahl
62d270116b tools: rename SvStream::Read/Write to ReadBytes/WriteBytes
Change-Id: Ib788a30d413436aa03f813aa2fddcbc4d6cd2f9a
Reviewed-on: https://gerrit.libreoffice.org/25972
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-06 18:09:11 +00:00
Noel Grandin
52225a3b7f Convert ComplexTextLayoutMode to scoped enum
Change-Id: I257f8e15fec92f0701235a6fe4b6a2272498c4f1
Reviewed-on: https://gerrit.libreoffice.org/25667
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-03 11:34:23 +00:00
Noel Grandin
990082f37c Convert FontRelief to scoped enum
Change-Id: I545c83d742db27f1a004b66e5eb1ef768f62e011
Reviewed-on: https://gerrit.libreoffice.org/25626
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-30 06:41:53 +00:00
Noel Grandin
50ac0f503b convert FONT_EMPHASIS_MARK to scoped enum
Change-Id: I137c78b337e57d3442db08334128e79d186b278f
Reviewed-on: https://gerrit.libreoffice.org/24753
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-09 09:41:34 +00:00
Noel Grandin
e1af7f0c43 clang-tidy modernize-loop-convert in c*
Change-Id: I77d2548f8be97792660761e6156cd24734a95aaf
2016-04-21 11:03:55 +02:00
Noel Grandin
789055bc2a clang-tidy performance-unnecessary-copy-initialization
probably not much performance benefit, but it sure is good at
identifying leftover intermediate variables from previous
refactorings.

Change-Id: I3ce16fe496ac2733c1cb0a35f74c0fc9193cc657
Reviewed-on: https://gerrit.libreoffice.org/24026
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 07:37:31 +00:00
Noel Grandin
62633dfe02 clang-tidy performance-unnecessary-value-param in various
Change-Id: I7168d44dab8e6a8e37bb7920d744ff32f5e52907
Reviewed-on: https://gerrit.libreoffice.org/24019
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-14 11:37:19 +00:00
Noel Grandin
b8eb294651 loplugin:passstuffbyref in various
Change-Id: I80070c83204e531c2f599f8a56193d6ffe0e5022
2016-04-14 10:24:47 +02:00
Jochen Nitschke
c664b27505 tdf#94306 remove unused boost dependencies
remove <boost/noncopyable.hpp> in pch and
remove boost from makefile if it was the only boost entry.

Change-Id: Icb945ae59c137571f4f63807601738eea5c3e831
Reviewed-on: https://gerrit.libreoffice.org/24061
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13 19:47:09 +00:00
Jochen Nitschke
4c7ec9f112 cleanup: remove unused com/sun/star/uno includes
Sequence.h(xx), Any.h(xx) and Type.h(xx)
and remove unused using-declarations from these files.

Add a few missing includes provided by them.

Change-Id: I6b91b6d1fdf9d0496dd546c0aab9bdcc6831a5d4
Reviewed-on: https://gerrit.libreoffice.org/23805
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-12 06:38:26 +00:00
Stephan Bergmann
40c3e906c6 loplugin:unreffun (missing "= delete")
Change-Id: Ie9252e29b06242e8ab0b839f52de8b81897d269e
2016-04-08 14:23:08 +02:00
Jochen Nitschke
f781997ee1 tdf#94306 replace boost::noncopyable in c...
comphelper, connectivity and cppcanvas.

Replace with C++11 delete copy-constructur
and copy-assignment.
Removed unused boost/noncopyable.hpp includes from
some source files in cppcanvas.

Change-Id: I90780820e21fbfd291ac10c266e7d16616e3a81b
Reviewed-on: https://gerrit.libreoffice.org/23905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-08 09:58:36 +00:00
Jochen Nitschke
ef97576056 tdf#97525 vcl: make DeletionListener internal
move include/vcl/impdel.hxx to vcl/inc/
include impdel.hxx in salframe.hxx
remove vcl/impdel.hxx includes in pch
add missing <list> includes

Change-Id: Id146363b2e20ce0238542929c26a83efb1e8c4bd
Reviewed-on: https://gerrit.libreoffice.org/23664
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-31 11:20:55 +00:00
Noel Grandin
f0f973da85 loplugin:constantparams in vcl/
also some improvements to the plugin

Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871
Reviewed-on: https://gerrit.libreoffice.org/23289
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-16 08:42:37 +00:00
Armin Le Grand
1c85800345 tdf#95709 adapt clip polygon for transparence groups
For presentation transparence groups are rendered by the canvas
using VirtualDevices and Bitmaps. To adapt for then painting
the Bitnmap to the canvas the RenderState needs to be adapted
to e.g. reflect the already applied scaling. Missing was to adapt
a set clip polyPolygon to be synchronized with the new RenderState
transformation.

Change-Id: If760a8076e016a6dcf306db71971f1fd2fef7017
Reviewed-on: https://gerrit.libreoffice.org/22720
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-02-28 10:11:16 +00:00
Noel Grandin
db8067145f loplugin:write only fields
Change-Id: I44f249a17d0a510ec63a488b656d57a1a392f821
2016-02-22 14:34:21 +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
Chris Sherlock
01aa78cf08 vcl: cmdevt.[hc]xx -> commandevent.[hc]xx
Change-Id: I77b30f28ae5a6fad360d7cada9acfaa9c324408b
Reviewed-on: https://gerrit.libreoffice.org/22216
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-08 21:41:17 +00:00
Chris Sherlock
88730cdae3 vcl: bmpacc.hxx -> bitmapaccess.hxx
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-06 21:04:09 +11:00
Chris Sherlock
249e3d6d19 vcl: split exception types from input types
Having them in the file apptypes.hxx isn't necessary helpful, IMO so
I've split the types into inputtypes.hxx and exceptiontypes.hxx

Change-Id: I89a1ff168c3ae276b2f5486669d4ec2dda062d57
2016-02-06 12:55:43 +11:00
Noel Grandin
27a114e73f loplugin:fpcomparison in cppcanvas/
Change-Id: I23d7e217f2616b488579be0617dbc14cd407540f
Reviewed-on: https://gerrit.libreoffice.org/21868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-04 06:32:02 +00:00