Commit Graph

320 Commits

Author SHA1 Message Date
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
2ed35ad17e loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: If18ea216cc3416e4a7e2041e50b5a64b1e90886a
2016-07-07 18:59:55 +02:00
40f9be70ef uitest: move the uitest files to vcl
This allows us to use them in vcl as well without introducing dependency
problems.

Change-Id: Ib97af2d559902f1a6b47f9255bb0426411670647
2016-06-18 17:01:20 +02:00
dde9b4d86f uitest: some more work for the UI testing
Change-Id: I79193190f8f614b2d6a71032f05a0518eb9d1a1d
2016-06-18 16:59:48 +02:00
d5c3f1bf26 uitest: add groundwork for ui testing framework
Change-Id: I51b81da870fd220d56b32c20b9e6c4604912a014
2016-06-18 16:59:48 +02:00
c3453ea246 Add MS binary format validator support in test fixture
bffvalidator (Microsoft Office Binary File Format Validator) can now be
used for verification of MS binary export tests

Change-Id: Ibc65e64726a454cdd33946006b36427b9cc6fbd2
Reviewed-on: https://gerrit.libreoffice.org/26405
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
Tested-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2016-06-17 11:20:06 +00:00
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
53f9762889 SVGIO: Add support for font-family in unittests and unify...
.. textsimpleportion's assert

Change-Id: I97d4c76dcfaa6d3ebebfe3eebfabc8ee7799589d
Reviewed-on: https://gerrit.libreoffice.org/25691
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-05-31 07:41:56 +00:00
43b4903db3 teach stylepolice plugin about ref-counted-pointer naming
Change-Id: I6e91d22fc1826038c05ddb6fc065563c6a250752
Reviewed-on: https://gerrit.libreoffice.org/24459
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-28 09:31:16 +00:00
e7f55f15cc tdf#45904 Move java XViewPane test to c++
Change-Id: I3c99fb4c611a3b45d31412731c548b59e95d7179
Reviewed-on: https://gerrit.libreoffice.org/24285
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-27 00:28:03 +00:00
da81ff5c0e Some more sal_Bool -> bool
Change-Id: I4ee61f3f1d14cf4a90224199ed72e4de0890b5af
2016-04-25 16:42:40 +02:00
c838f2ed9f loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: Ie66903c2aae5535a507e1549b58d892b80237842
2016-04-20 17:27:27 +02:00
97abbec956 tdf#94306 replace boost::noncopyable in stoc to xmlsec..
Replace with C++11 delete copy-constructur
and copy-assignment.
Remove boost/noncopyable.hpp includes.
Add missing default ctors.

With this commit there should be no users
of boost::noncopyable left.

Change-Id: I6b1e47824912a6a80cc3f00f34938ebc048d8975
Reviewed-on: https://gerrit.libreoffice.org/24051
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-13 11:19:04 +00:00
1d5767c6e4 tdf#45904 move java based api tests to c++
Change-Id: Ibd9411e844c8e42fe625ffd979e936f827099ee9
Reviewed-on: https://gerrit.libreoffice.org/22604
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-20 00:00:30 +00:00
60b1c95cc4 Extract Directories from BootstrapFixtureBase
(as some tests derive from the latter only for the Directories part, not for the
setUp/tearDown overrides: those tests will be cleaned up next)

Change-Id: Ib6b78eea868b8bc21d4cc6e8fd9e1d025deca05f
Reviewed-on: https://gerrit.libreoffice.org/23078
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10 08:04:40 +00:00
5f0c3172b3 SVGIO: Check minX, minY, maxX and maxY in polypolygon
Change-Id: I768bef34ad0ba7708134e73981dabf0d47c2f259
Reviewed-on: https://gerrit.libreoffice.org/22952
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-06 15:16:22 +00:00
31e037c348 SVGIO: Check height and width of polypolygoncolor
Change-Id: Ibc5844d4e4a89fae7bbc8d2b854384d0c433500f
Reviewed-on: https://gerrit.libreoffice.org/22883
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-03-03 23:35:11 +00:00
ddc363b2b2 test: dump MetaPolyPolygonAction too
Change-Id: I3ecafc104c91d7f4e93805b2e03359cf60d2db4b
2016-03-02 15:07:03 +01:00
fe3ac07886 Fix the import of line joins and caps from EMF files
Change-Id: I976336d35366b661e402db484820b4dd9a7b0228
Reviewed-on: https://gerrit.libreoffice.org/22821
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2016-03-02 12:20:05 +00:00
5978b78eb2 use better assert macros
Change-Id: I6fcfcced0c9017003472e19ab5619ecb26a992eb
Reviewed-on: https://gerrit.libreoffice.org/22741
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Tested-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-02-28 00:41:23 +00:00
5969fc79cf coverity#1352306 Unchecked dynamic_cast
and

coverity#1352307 Unchecked dynamic_cast

Change-Id: I0b072e432fe5d510a2a55ad33628ec93b706c860
2016-02-14 20:59:29 +00:00
b6a62f0755 tdf#97542: SVGIO: First check the current fill attribute
Differenciate when gradient is defined in the text element or in its parents

Add unit tests

Change-Id: I85b09f72fbb1a3c8d2fa7350b4396b5bf924277f
Reviewed-on: https://gerrit.libreoffice.org/22131
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
Reviewed-by: Xisco Faulí <anistenis@gmail.com>
2016-02-11 17:17:06 +00:00
05554bc478 SVGIO: tdf#79163: Add import test
Change-Id: I891425f331e9be21c160eb0b11f05dba280bef23
Reviewed-on: https://gerrit.libreoffice.org/22196
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09 17:23:00 +00:00
8fbbb923ea SVGIO: tdf#85770: Add import test
Change-Id: Ifffe1d461ae6fa30a9cc61df2ece5716078031ab
Reviewed-on: https://gerrit.libreoffice.org/22190
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-02-09 14:27:01 +00:00
805b328858 SVGIO: Add import test for Fontsize keywords
Change-Id: I042a1deeec1c07f73f09ddd2fb71b9d2eba6b8c6
Reviewed-on: https://gerrit.libreoffice.org/22187
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-02-09 07:10:41 +00:00
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
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
45654a1d4d revert vcl patch series that brok Mac and Windows
revert:
9bc2f3de8672e812f3a67541c6d7069b434a7e42
 vcl: add comment about ImplFontMetric::{Get|Set}LineHeight()
26371f105bc44e04469ec03fc5bb12505e651c6b
 vcl: FontAttributes::GetSlantType() -> FontAttributes::GetItalic()
2dd0b4317372b8022efe3911b38b4fa02956d8b9
 vcl: font.hxx and metric.hxx cleanup, make ctors explicit and the dtor virtual
5ab13bf3ead3539e4ad847656da81e7eb6029652
 vcl: tabify font.hxx
f99550dae55e40e49bf9c9875053fe2abb4c71ca
 vcl: change Font::SetName() to Font::SetFamilyName()
2b297116cb6bb1061c43e5714e2609c8ee9f57d2
 vcl: rename Font::GetName to Font::GetFamilyName

Change-Id: I23f38921187d66b970ca815eb30dda4222a2da62
2016-01-16 12:20:45 -06:00
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
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
38e4f62709 test: change maName to more descriptive variable name
Change-Id: I93b553c74bfa6f046092c6a550d229278e413446
Reviewed-on: https://gerrit.libreoffice.org/20956
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
Tested-by: Chris Sherlock <chris.sherlock79@gmail.com>
2015-12-26 17:44:27 +00:00
5bd5cd1622 unused code
Primitive2dXmlDump::filterActionType(unsigned short, bool)
   Primitive2dXmlDump::filterAllActionTypes()

used code

   OutputDevice::LogicToLogic(basegfx::B2DPolyPolygon const&, MapMode const&, MapMode const&)
at
   http://opengrok.libreoffice.org/xref/core/vcl/source/gdi/pdfwriter_impl.cxx#1388

tested under windows with enable-dbgutil

Change-Id: Ife200e5851323dfcfe138f5c978d028513213295
Reviewed-on: https://gerrit.libreoffice.org/20781
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2015-12-20 16:20:21 +00:00
58d8d8ac67 tdf#69977: uno::Sequence is expensive
when used as a mutable data-structure. Plain std::vector halves the time
taken to display the chart dialog

Create a class to represent the std::vector we are going to be passing
around, and move some of the utility methods into it to make the code
prettier.
Also create an optimised append(&&) method for the common case of
appending small temporaries.

Change-Id: I7f5b43fb4a8a84e40e6a52fcb7e9f974091b4485
2015-12-11 10:11:23 +02:00
a508f639a0 mark UNO structs as SAL_WARN_UNUSED, where possible
Change-Id: Ie3de518f60c9f1313c68df54dbdc1fb2804f1f0d
2015-11-26 13:26:25 +02:00
5d353ff608 loplugin:nullptr (automatic rewrite)
Change-Id: I31e61fc91dff70f32143d84ccf308f2bbc9c740e
2015-11-10 10:31:53 +01:00
a76f4c6708 com::sun::star->css in testtools/
Change-Id: I9a44e44b2478b007fba7f86eefcf4fa04d77b37b
Reviewed-on: https://gerrit.libreoffice.org/19852
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-11-09 07:20:51 +00:00
8fb415a88f loplugin:stringconstant: elide explicit ctor usage (automatic rewrite)
Change-Id: I9cd49febb66007a2993bd87e354ed4a84b958501
2015-11-06 09:38:01 +01:00
b37b7b5cd5 use uno::Reference::set method instead of assignment
Change-Id: Id036f867e75d03d8347cc32a1011c5cdda1dcc73
2015-11-05 11:18:41 +02:00
20635ed90b Reduce scope of #include <tools/stream.hxx>
Change-Id: I0752cbb0cb2e0f89607d81d9eda7ce7091449fd6
2015-10-27 13:59:10 +01:00
d9e17c5b76 loplugin:defaultparams
Change-Id: I742a25440d6c321549bb32a2e5ce86207bfb711c
2015-10-20 11:47:07 +02:00
b36963c0a6 Replace "SAL_OVERRIDE" with "override" in LIBO_INTERNAL_ONLY code
Change-Id: I2ea407acd763ef2d7dae2d3b8f32525523ac8274
2015-10-12 17:52:29 +02:00
74ce05b940 convert Link<> to typed
Change-Id: I280473a7a9069a86388f608bddc8e48879771bc9
Reviewed-on: https://gerrit.libreoffice.org/18815
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-09-24 16:20:51 +00:00
55dda8e8d0 convert Link<> to typed
Change-Id: I92df586295c11bc9e9276770656901c2e4e714b9
2015-09-22 20:21:55 +02:00
3a00aaef2a boost->std
Change-Id: Ie490bf2c6921f393bdeed96b1a8815996b701bf0
Reviewed-on: https://gerrit.libreoffice.org/18670
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2015-09-18 07:59:14 +00:00
9ea0390f17 convert Link<> to typed
Change-Id: Iaca21344f6a38f508f79e6d5983e515162a6dca3
2015-09-10 08:30:11 +02:00
37e94841db percheck: produce similar stats than off-tree callgrind
Change-Id: I7035ea6f2d9ffe92282533064d69b75e2c1989e1
2015-09-02 14:31:21 -05:00
013efe75eb test: hack to avoid VCLXToolkit calling CreateMainLoopThread
... for the PythonTest, similar to what vclbootstrapprotector does for
CppunitTest; actually no idea if this is a good idea or a bad idea.

Change-Id: Ia4e2e50fdc9c8deb9faf580a2f3f3308533265eb
Reviewed-on: https://gerrit.libreoffice.org/17540
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2015-08-19 19:35:46 +00:00
ef46917ff3 Put Polygon from tools under tools:: namespace
Polygon is one of these names that Clash with some system objects
A similar work has been done earlier with PolyPolygon.

Change-Id: Icf2217cb2906292b7275760f1a16be0e150312f5
Reviewed-on: https://gerrit.libreoffice.org/17789
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com>
2015-08-17 02:07:43 +00:00
7a044db51d loplugin:simplifybool
Change-Id: Idb065bab0285a5db209e75e29a9f6f4d72091e8c
2015-07-16 14:00:22 +02:00
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