103 Commits

Author SHA1 Message Date
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
8a16f665b1 makeAny->Any in canvas..configmgr
Change-Id: Id06812595f373cd0da8b421dbac34a60a266ae6e
Reviewed-on: https://gerrit.libreoffice.org/33869
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-02-03 10:44:01 +00:00
Noel Grandin
0681a6ee28 more SAL_WARN_UNUSED
Change-Id: Idf44fe0302b4504c443f083e527b63b2461ada85
2017-01-31 14:05:11 +02: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
Stephan Bergmann
6f710c79e2 New loplugin:externvar: canvas
Change-Id: If11977a086dd7bd7d76782577db619fd272e814c
2017-01-09 15:44:18 +01:00
Khaled Hosny
d538d3d841 This fallback code makes no sense any more
Ito probably made sense only with bitmap fonts which we no longer
support, and if we don’t need the fallback for printer devices then we
don’t need it on screen either (that whole printer/screen distinction
needs to die someday).

Change-Id: Icf77cd70f0f1b2c186a3c856900295caba72e903
Reviewed-on: https://gerrit.libreoffice.org/31914
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
2016-12-14 00:28:15 +00:00
Caolán McNamara
482d7ce61b change from glew to epoxy
because that works under wayland out of the box and gtk3 uses it already

Change-Id: Iefaac31e325534a81a5389f752804af917c1baef
Reviewed-on: https://gerrit.libreoffice.org/31213
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-12-13 11:33:18 +00:00
Arnaud Versini
4282ea67c2 canvas: remove useless MutexGuards
Change-Id: I7a6f55ad7f3a26a88263660b97dd8650858890f8
Reviewed-on: https://gerrit.libreoffice.org/31859
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-12-11 18:55:07 +00:00
Noel Grandin
78b4a1fb01 update vclwidget loplugin to find ref-dropping assigment
Look for places where we are accidentally assigning a returned-by-value
VclPtr<T> to a T*, which generally ends up in a use-after-free.

Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9
Reviewed-on: https://gerrit.libreoffice.org/30749
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11 06:55:41 +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
1c15a20df8 loplugin:unusedmethods unused returns
Change-Id: I4da3374e31d3c7407b401d66275da7f56ae83d30
Reviewed-on: https://gerrit.libreoffice.org/29178
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22 13:13:05 +00: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
f22fa99460 loplugin:countusersofdefaultparams in canvas,chart2
Change-Id: Id66a706171b73affeb508812744028d9f30133af
Reviewed-on: https://gerrit.libreoffice.org/27868
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05 06:26:59 +00:00
Noel Grandin
cd71034b26 comphelper::OBaseMutex -> cppu::BaseMutex
convert usage of deprecated class, and remove the old class

Change-Id: I19fb9271090d19e5531622b58492e1a848d306e2
Reviewed-on: https://gerrit.libreoffice.org/26843
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-07-04 06:49:07 +00:00
Caolán McNamara
b030ba2e13 Resolve: "TODO(Q1): Make GetSystemData method virtual"
and remove the casting silliness, allowing the removal of
cairo_cairo.?xx

If anything is to go wrong I'd guess it'll be the windows directx stuff.

Change-Id: I3e22c07b9c26ade9b27a245fdd8408de540643f4
2016-05-19 15:53:14 +01:00
Caolán McNamara
aea9c5ecdc rename to two GetSystemData methods to find all call-sites
anyplace calling GetSystemChildSystemData on a SystemChildWindow is definitely
right

anyplace calling GetWindowSystemData on a Window *might* have intended to call
GetSystemChildSystemData on a Window casted back to an underlying
SystemChildWindow.

Change-Id: I7dcf3a50d0b7ed29bc08cfdb15cc0dcb86be8fa7
Reviewed-on: https://gerrit.libreoffice.org/25158
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-05-19 14:45:54 +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
9b640c03e0 loplugin:passstuffbyref in canvas
Change-Id: Idde288ab4bb7935e5da2a84190fd4b398961d358
2016-04-13 13:27:51 +02:00
Jochen Nitschke
f9b200ce54 tdf#94306 replace boost::noncopyable in canvas
Replace with C++11 delete copy-constructur
and copy-assignment.
Some helper classes had boost/noncopyable.hpp
included but didn't use it.

Change-Id: I339f2c413a944649d9d63c046e8b7f7ee6e46791
Reviewed-on: https://gerrit.libreoffice.org/23866
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-07 07:28:35 +00:00
Noel Grandin
b2bb094f6b convert GradientType to scoped enum
Change-Id: Icef1d8d38481022104a957ac9deac1c03dc2d6fb
Reviewed-on: https://gerrit.libreoffice.org/22632
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-23 10:17:24 +00:00
David Ostrovsky
a3c70e760f Fix missing iterator include on MSVC 14.0
Change-Id: I55de612aef52038fd9979426950d4ae4131ca586
Reviewed-on: https://gerrit.libreoffice.org/22448
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Ostrovsky <david@ostrovsky.org>
2016-02-17 23:43:45 +00: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
697d445ed0 vcl: take into account the font width is the average font width
I'm changing the Font class function names:

- SetSize       -> SetFontSize
- GetSize       -> GetFontSize
- SetHeight     -> SetFontHeight
- GetHeight     -> GetFontHeight
- SetWidth      -> SetAverageFontWidth
- GetWidth      -> GetAverageFontWidth

That's because it really makes no sense to say that there is a
single constant font width because obviously proportional fonts
don't have one - the best we can do is an average font width,
which is what folks like Microsoft sort of do already. On a fixed
font, the average is still accurate, for obvious reasons :-)

I'm also not a fan of GetSize/SetSize as I find it a might too
generic.

Change-Id: Ib80a604ba62d6883fd6cbc7994da763976be5c70
Reviewed-on: https://gerrit.libreoffice.org/22069
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-04 03:17:26 +00:00
Chris Sherlock
d1a49df683 vcl: add text alignment functions to ImplFont and FontAttributes
ImplFont and FontAttributes now have GetAlignment and SetAlignment,
and I have renamed Font::GetAlign to Font::GetAlignment, and
Font::SetAlign to Font::SetAlignment.

See commit description in 8bfccd3a71d911b6d ("vcl: Create accessor
and mutator for font scaling in FontMetric") for reasoning behind
patch.

Unit test added to vcl/qa/cppunit/font.cxx to test text alignment.

Change-Id: I6272c84fc9416c90616d957d1897eba9469fe7ba
Reviewed-on: https://gerrit.libreoffice.org/21876
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-29 01:59:55 +00:00
Michael Stahl
de6c48976c canvas: replace BOOST_CURRENT_FUNCTION with OSL_THIS_FUNC
Change-Id: Ib90ad48866718f69160f57e7b0db3a7f342eb7be
Reviewed-on: https://gerrit.libreoffice.org/21882
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-28 20:05:02 +00:00
Michael Stahl
863e1f0035 Revert "canvas: replace BOOST_CURRENT_FUNCTION with __func__"
This reverts commit d01f7db4b5f51d1be8ba210625f4ad1ebf5c6e8f.

Revert "tools: replace BOOST_CURRENT_FUNCTION with __func__"

This reverts commit 10303054067258016fbbae018ea848f74adc4964.

Surprisingly MSVC 2013 does not support __func__ - need 2015.

Change-Id: I7084d7b79784b34a8f40fb986d10ffefbabae7fb
2016-01-28 11:34:10 +01:00
Michael Stahl
d01f7db4b5 canvas: replace BOOST_CURRENT_FUNCTION with __func__
Change-Id: I384472894288081423ae9467cc439b10d637f6e0
2016-01-28 10:10:27 +01:00
Julien Nabet
4af3fd71eb Remove useless extra var for loop
Take benefit of returned iterator from erase method

Change-Id: I77eaa5b4500cfc66ae66e5f388915e0ade79b23c
Reviewed-on: https://gerrit.libreoffice.org/21239
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2016-01-08 06:06:28 +00:00
Stephan Bergmann
b8793748b0 Seems more natural to pass a homogenous list by initializer_list
...than by template parameter pack (even if that requires using ServiceDecl*, as
initializer_list cannot take reference types)

Change-Id: Ia986201b52d8daedfe925f132ebc79bc2c0ba378
2015-11-20 13:39:52 +01:00
Stephan Bergmann
c40c7a8c36 loplugin:nullptr (automatic rewrite)
Change-Id: I9e064592c4ee18a600aadfa20b3c89ecafc818d4
2015-11-10 10:31:18 +01:00
Mario J. Rugiero
ae78051c22 Replaced boost::bind by std::bind in canvas/source/opengl/ogl_canvashelper.cxx
Chose not to use lambdas instead because the number of arguments in these calls
would have made it way too verbose, hurting readability.

Change-Id: I8662a937ec10ca0fac6cd7e0d78b6268e8023ada
Reviewed-on: https://gerrit.libreoffice.org/19707
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: David Tardon <dtardon@redhat.com>
2015-11-02 18:21:45 +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
bff4c13475 Replace "SAL_DELETED_FUNCTION" with "= delete" in LIBO_INTERNAL_ONLY code
Change-Id: I328ac7a95ccc87732efae48b567a0556865928f3
2015-10-12 17:52:26 +02:00
Andrea Gelmini
2957be02c5 Fix typos
Change-Id: I776c517ba87838c0c3391f79010a30fa7fe2abd3
Reviewed-on: https://gerrit.libreoffice.org/18939
Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-10-02 08:54:51 +00:00
Caolán McNamara
22b80ac8e2 boost->std
Change-Id: I3fd9e1599c5ad812879a58cf1dabbcd393105e1c
Reviewed-on: https://gerrit.libreoffice.org/18564
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-14 12:54:25 +00:00
Michael Meeks
82d25c02f8 tdf#94006 - need an explicit dispose for GLContext's SystemChildWindow.
Previously we would get an explicit ~OpenGLContext - and potentially
leave FMR's around for other OGC users, now we treat the other users
properly - we need an explicit dispose() to get Window::dispose ordering
right.

Change-Id: I5edcbd73399b6db3dbcfb391570f364f9ab0c70d
Reviewed-on: https://gerrit.libreoffice.org/18412
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2015-09-08 15:47:49 +00:00
Michael Meeks
56900a441d tdf#94006 - fix OpenGLContext mis-use in several places.
gltf rendering, OpenGL canvas, GL transitions & GL capable (charts)
Avoid GLX operations on un-initialized contexts.

Change-Id: I7f523640f66ab656896181e5c865879234f6640e
2015-09-08 13:04:02 +01:00
Daniel Robertson
b7f4940c15 canvas: replace while loops with range-based for
Change-Id: Ide16bee666cf4df41646f9336a585e22a7fe53bd
Reviewed-on: https://gerrit.libreoffice.org/18131
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-30 13:03:22 +00:00
Daniel Robertson
720cea21f3 canvas: replace for_each with range-based for-loop
Replace ::std::for_each for a more readable range-based for loop in
cases in which the function object to be applied by for_each is more
readable as the body of a for loop.

Change-Id: I5ea0f6a464855b8cc8af38f211bb784dd91eca0d
Reviewed-on: https://gerrit.libreoffice.org/17775
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-08-16 18:30:15 +00:00
Norbert Thiebaud
e5ec630414 stop inclduing canvas/verbosetraces.hxx and canvas/debug.hxx
also clean-up and 'standardize' the include sections of canvas' source code

Change-Id: Ib437a41ea41ae2ea6528f755ae5b2828775aaf73
Reviewed-on: https://gerrit.libreoffice.org/17633
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-11 03:57:18 +00:00
Norbert Thiebaud
326777b5d9 remove VERBOSE use from canva
in preparation to kill --enable-verbose in configure.ac
convert modules that use VERBOSE-YES/NO (uppercase) env variable
to do things differently at compile time
Convert canvas to use SAL_INFO/SAL_WARN mechanism instead of its
home-grown 'verbose logging'.

Change-Id: I2898d2309d421457839e3cd7078166c6da919882
Reviewed-on: https://gerrit.libreoffice.org/17619
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-10 17:14:18 +00:00
Michael Stahl
c2966acc46 canvas: replace boost::function with std::function
Change-Id: I1a4a3007a07a796d80d06ab7554953925bb8be3d
2015-07-31 21:35:42 +02:00
Michael Stahl
9e90038b73 canvas: replace boost::function with std::function
Change-Id: Ia3644bc0d9db2159aa4e9f05ca2f36e60b63e6f4
2015-07-31 21:24:26 +02:00
Noel Grandin
a60cc5d62a com::sun::star->css in canvas
Change-Id: I23c3f774834bb7e84e2f02fe05fa9d844adadc9d
Reviewed-on: https://gerrit.libreoffice.org/17259
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-22 09:04:57 +00:00
Michael Stahl
7aa9f04538 do not include boost/utility.hpp
It just includes a bunch of other boost headers; mostly we need
boost/noncopyable.hpp so include that directly.

This eliminates 831 MB(!) of boost/preprocessor/seq/fold_left.hpp
completely, which is the 2nd biggest header after ustring.hxx.

Change-Id: I3df55770adcb46e56f389af828e8ba80da2dc1f2
2015-07-10 23:25:22 +02:00
Takeshi Abe
b854086df8 tdf#88206 replace cppu::WeakImplHelper* etc.
with the variadic variants, in canvas.

Change-Id: I8604e6b6e0f45539e3411c98a166518b837b6758
Reviewed-on: https://gerrit.libreoffice.org/16798
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-07-10 07:39:31 +00:00
Michael Stahl
e8eb49995a canvas: remove boost::bind from headers
Change-Id: Ieaa8a74d59ee9c74fafe823e01db4a349c49821e
2015-07-09 10:18:05 +02:00
Andrea Gelmini
5d5dc059cb Fix typos
Change-Id: I80995af6459af9f647e66d1c85da2eedad2647b9
Reviewed-on: https://gerrit.libreoffice.org/16523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2015-06-28 12:35:58 +00:00
Takeshi Abe
0980095619 Replace boost::scoped_array<T> with std::unique_ptr<T[]>
This may reduce some degree of dependency on boost.
Done by running a script like:

git grep -l '#include  *.boost/scoped_array.hpp.' \
 | xargs sed -i -e 's@#include  *.boost/scoped_array.hpp.@#include <memory>@'
git grep -l '\(boost::\)\?scoped_array<\([^<>]*\)>' \
 | xargs sed -i -e 's/\(boost::\)\?scoped_array<\([^<>]*\)>/std::unique_ptr<\2[]>/'

... and then killing duplicate or unnecessary includes,
while changing manually
m_xOutlineStylesCandidates in xmloff/source/text/txtimp.cxx,
extensions/source/ole/unoconversionutilities.hxx, and
extensions/source/ole/oleobjw.cxx.

Change-Id: I3955ed3ad99b94499a7bd0e6e3a09078771f9bfd
Reviewed-on: https://gerrit.libreoffice.org/16289
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-06-17 15:50:45 +00:00
Noel Grandin
1afb790a11 inline COMPHELPER_SERVICEDECL_ macro
it was not adding any value

Change-Id: I6a911aac81e883f9155ed0cf24bfb7904efb3f92
2015-06-15 09:46:14 +02:00