Commit Graph

1425 Commits

Author SHA1 Message Date
Andrea Gelmini
b2e86d2e26 Fix typos
Change-Id: Iea11112a1bf1ff934de0e355b9e81979aa1966a3
Reviewed-on: https://gerrit.libreoffice.org/24286
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-04-22 06:47:06 +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
5abc669599 new plugin stylepolice
check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
a30148d3fc loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ie7f382fb47463d9bc315dc767c1d0550145ec935
2016-04-20 17:25:36 +02:00
Ryan McCoskrie
bb92c93a96 - Removed the only-used-once FontLevelVector typedef
Change-Id: I78bdd690cd80b7caee816b005790b0130dffefeb
Reviewed-on: https://gerrit.libreoffice.org/24177
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-04-18 07:02:26 +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
Armin Le Grand
ebe94af4ec tdf#99165 initialize nLastX, nLastY
... even when inited in 1st loop run to avoid warning 'maybe-uninitialized'

Change-Id: I67607767b8091d220efcf4c4ca70f570f955e297
2016-04-13 13:48:05 +02:00
Noel Grandin
9b640c03e0 loplugin:passstuffbyref in canvas
Change-Id: Idde288ab4bb7935e5da2a84190fd4b398961d358
2016-04-13 13:27:51 +02:00
Armin Le Grand
9cda847a0b tdf#99165 always provide control points for beziers
Some graphic sub systems cannot handle cases where control points of
bezier curves are not set and produce wrong geometry for fat line drawing
when MITER or similar LineCap and/or LineJoin is used. To avoid that,
provide the mathematically correct fallback control points instead.

Change-Id: Iabc724e51fb89e702f858db820c920f7b5b7d302
Reviewed-on: https://gerrit.libreoffice.org/24031
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Armin Le Grand <Armin.Le.Grand@cib.de>
2016-04-13 10:28:06 +00:00
Jochen Nitschke
b4ddacbc55 fix copy assignment signatures
get value by reference

introduced in
commit 8c2f2e1dd7 and
commit f9b200ce54

Change-Id: Iba84dd752f4cbdde9f3676c434d107efabe63a38
Reviewed-on: https://gerrit.libreoffice.org/23974
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11 07:05:40 +00:00
Rohan Kumar
f0de4374ff tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I removed the OSL_DEBUG_LEVEL > 1 conditionals with OSL_DEBUG_LEVEL > 0
or SAL_INFO macros

Change-Id: Ia2a483ea0f992bf182a6beed2b4558a4fb7c5680
Reviewed-on: https://gerrit.libreoffice.org/23079
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-07 12:15:50 +00: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
Oliver Specht
96c1ae1d8e fix headless build
disables OpenGL and glew usage, lets --without-gui do what
--without-x did before and disables X related test

Change-Id: I680b47c9962a0d43c8ece593db0b82e347ceebdb
Reviewed-on: https://gerrit.libreoffice.org/23474
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
2016-03-25 11:05:47 +00:00
Noel Grandin
5adde1bf69 loplugin:unuseddefaultparams various
Change-Id: Ibf8489c957b307156689de4c7cb8440ddd4e4546
Reviewed-on: https://gerrit.libreoffice.org/22852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-03 11:39:56 +00:00
Stephan Bergmann
9582fd9807 -Werror,-Wshadow
Change-Id: I007ea13a059d8b067e4819fb61f0ea2e15c638a5
2016-03-01 17:19:31 +01:00
Stephan Bergmann
377bb64b54 -Werror,-Wnon-virtual-dtor
Change-Id: Ibeed52359852451b800e083ddc4c221dea41a294
2016-03-01 17:19:12 +01:00
Stephan Bergmann
6d1a9af30e -Werror,-Wunused-macros
Change-Id: I0269ae5c13c75327648c0018007d78dbf37f1648
2016-03-01 17:18:53 +01:00
David Ostrovsky
d375cafef6 werror: declaration hides previous declaration
Change-Id: I0f8422a4f8c27ec253d917985d2593d8d87bb5f0
Reviewed-on: https://gerrit.libreoffice.org/22685
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2016-02-25 12:18:07 +00:00
David Ostrovsky
fbe9f840d5 werror: declaration hides previous declaration
Change-Id: Ia0fe8847f2a58fbccb25ecc6237f3b14a08da076
Reviewed-on: https://gerrit.libreoffice.org/22688
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
2016-02-25 12:13:23 +00:00
David Ostrovsky
bd276bf04c werror: declaration of 'nWidth' hides previous declaration
Change-Id: Ida3b031f0425aae8d8372410311312b4d7a13d2f
Reviewed-on: https://gerrit.libreoffice.org/22683
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-02-25 08:33:51 +00:00
Noel Grandin
5c43ca5518 convert SpriteChangeRecord::ChangeType to scoped enum
Change-Id: I29696f37a023317bdaa8f53d753ccaeb8e68a3c2
2016-02-24 11:48:37 +02:00
Noel Grandin
81b7de3d9f convert canvas::IRenderModule::PrimitiveType to scoped enum
Change-Id: Idf2e7449ce5b595386f437597ce7ccf00d141db0
Reviewed-on: https://gerrit.libreoffice.org/22634
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-24 08:11:12 +00:00
Noel Grandin
02a320777f convert canvas::IColorBuffer::Format to scoped enum
Change-Id: I0013c0b14992062be97977bf00f4af89fb2766f5
Reviewed-on: https://gerrit.libreoffice.org/22633
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-23 11:23:11 +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
Noel Grandin
2087484c65 use consistent #define checks for the Windows platform
stage 2 of replacing usage of various checks for the windows platform
with the compiler-defined '_WIN32' macro

In this stage we focus on replacing usage of the WIN macro

Change-Id: Ie8a4a63198a6de96bd158ecd707dadafb9c8ea84
Reviewed-on: https://gerrit.libreoffice.org/22393
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-17 11:33:57 +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
88730cdae3 vcl: bmpacc.hxx -> bitmapaccess.hxx
Change-Id: I4bb19d6103c4a6a902d86b62a857e3478493924c
2016-02-06 21:04:09 +11: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
Tor Lillqvist
37b465b3ee Remove leftover printf-style %f
But seriously, who builds with OSL_DEBUG_LEVEL > 2?

Either debugging printouts inside such ifdefs are completely pointless
and should be removed, or then the information might actually be
useful, and the ifdefs should be removed, so that the information can
be selected to be printed using the normal SAL_LOG environment
variable mechanism (in a build where SAL_INFO is functional).

Change-Id: Ia5d2c7c7b525ed133fe3f077a005f583b8a856e7
2016-02-02 08:42:44 +02:00
aybuke
91c072b473 tdf#43157: Fix format string violations in OSL_TRACE etc.
Change-Id: Idffbfb78b2386020fd099077a67bf8a89917bdab
Reviewed-on: https://gerrit.libreoffice.org/21999
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-02 06:10:21 +00:00
Caolán McNamara
1fd280f2c6 boost::tuple -> std::tuple
Change-Id: Ia08c184b792ff73d3ed49d6a5d54dec1a35943e9
Reviewed-on: https://gerrit.libreoffice.org/21955
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-31 17:25:52 +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 8bfccd3a71 ("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 d01f7db4b5.

Revert "tools: replace BOOST_CURRENT_FUNCTION with __func__"

This reverts commit 1030305406.

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
Noel Grandin
90d892664a loplugin: unused return values
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7
Reviewed-on: https://gerrit.libreoffice.org/21628
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-21 07:18:38 +00:00
Chris Sherlock
28c96fc255 vcl: rename Font::GetName to Font::GetFamilyName
Change-Id: Ie20871a3078bf875c1782b7761d60591a9c9704f
Reviewed-on: https://gerrit.libreoffice.org/21529
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-17 23:35:37 +00:00
Norbert Thiebaud
45654a1d4d revert vcl patch series that brok Mac and Windows
revert:
9bc2f3de86
 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight()
26371f105b
 vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()
2dd0b43173
 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual
5ab13bf3ea
 vcl: tabify font.hxx
f99550dae5
 vcl: change Font::SetName() to Font::SetFamilyName()
2b297116cb
 vcl: rename Font::GetName to Font::GetFamilyName

Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16 12:20:45 -06:00
Chris Sherlock
2b297116cb vcl: rename Font::GetName to Font::GetFamilyName
Change-Id: I83927e0992dfe0a2a79d139818a9f45d3761aae5
Reviewed-on: https://gerrit.libreoffice.org/21509
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-16 16:11:28 +00:00
Chris Sherlock
08bbdaa2f9 vcl: Create accessor and mutator for int and ext leading in FontMetric
Accessor and mutator created for external and internal leading space in
FontMetric.

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

Unit tests
- check to ensure that can set external and leading space
- check equality operator on FontMetric after setting both external
  and internal leading space
- enhanced tests to also check the inequality operator

Change-Id: I973970dd0b0631c5eca3e89039dce57ac3a3eb63
Reviewed-on: https://gerrit.libreoffice.org/21454
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-01-13 19:50:18 +00: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
Caolán McNamara
5ee8e22a26 cppcheck: noExplicitConstructor
Change-Id: I94db78ca12e0f3389f00ea5c557f0b64d452f613
Reviewed-on: https://gerrit.libreoffice.org/21150
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-01-07 09:11:53 +00:00
Andrzej Hunt
9d0b06e9f7 new loplugin rangedforcopy - use reference in range based for
Inspired by 6e6ae98037

Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01
Reviewed-on: https://gerrit.libreoffice.org/20190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-01-05 11:06:52 +00:00
Andrea Gelmini
92e60e1b80 Fix typos
Change-Id: I1b79005d9c4e32325b8dadcc4f805975d6bf2727
Reviewed-on: https://gerrit.libreoffice.org/21103
Reviewed-by: Andras Timar <andras.timar@collabora.com>
Tested-by: Andras Timar <andras.timar@collabora.com>
2016-01-05 07:32:28 +00:00
Caolán McNamara
f22d153a07 Resolves: tdf#93703 0 scaling is CAIRO_STATUS_INVALID_MATRIX
so more drawing to the surface fails

prior to 4ac876084b we had
a new cairo context each time to the error was thrown away
along with the context and the new one would work

Change-Id: I90ab1a943e8908e87f391bdfb8ccd5f3818e13d5
2015-12-21 21:24:27 +00:00
Noel Grandin
7f8c4b8445 Use comphelper::containerToSequence()
Change-Id: I18d6ef04ff00f971a4c54ba259733c07501c6c1a
2015-12-03 13:57:22 +02:00
Stephan Bergmann
a6aa29db42 Remove unused FMT_R8G8B8
...since 5b4d4af3e8 "bin agg"

Change-Id: If86d294f812a670917b181f3bd140883ad2df71d
Reviewed-on: https://gerrit.libreoffice.org/20348
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-12-02 07:48:42 +00:00
Stephan Bergmann
8fa059fe65 C++17 nested namespace definition
Change-Id: I49fd2093d619743d0d5aaaa4784bd5ef5bb330c6
2015-11-28 08:44:43 +01:00
Stephan Bergmann
e54e5ee959 Unused forward decl
Change-Id: Id332cdff634be042e026faf7cc75d8eaeb44a13e
2015-11-28 08:44:42 +01:00