3587 Commits

Author SHA1 Message Date
Noel Grandin
96e9ffa647 loplogin:singlevalfields in include/
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc
Reviewed-on: https://gerrit.libreoffice.org/28931
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16 06:19:38 +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
Caolán McNamara
107e5981b4 default dtors are fine here
Change-Id: I503f954a2729aa2737d783ed8c72f62d8a68da4c
2016-08-30 19:26:41 +01:00
Stephan Bergmann
bbecf93134 loplugin:stringconstant: adapt to improved OUStringLiteral1 (oox)
Change-Id: I1a3190f136b69702615cdf796ff45abfd89155dc
2016-08-30 15:28:22 +02:00
Jochen Nitschke
33b38082ca put StreamMode masks in scope of enum class
Change-Id: I77682f7e289a59b986bb84edf014029a20266470
Reviewed-on: https://gerrit.libreoffice.org/28420
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-27 12:06:15 +00: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
Caolán McNamara
16e6f1fb6b coverity#1371374 Resource leak
Change-Id: I6b96ab51c2013577b9d0299a86e545b4a899939a
2016-08-19 13:00:44 +01:00
Mark Hung
2b4f9d0b2b Convert handles of built-in shapes in Impress when exporting to PPTX.
For those shapes exported as OOXML preset shapes, their AdjustmentValues
property was exported as the list of adjustment values ( avLst )
in the exported PPTX file. This works for shapes imported from
PPTX, whose AdjustmentValues is exactly the same as avLst of the
original PPTX file.

For built-in shapes in Impress, avLst and AdjustmentValues would not
be the same because the path and the equation created by LibreOffice
and OOXML are not the same.

This patch convert position of handles to adjustment values according to
the shape type case by case. It also adds default values if the built-in
shape in Impress has fewer handles then the exported preset shape because
Powerpoint seems to be very strict about the number of values in avLst,
and deemed the file as corrupted if any of defined adjustment values is
missing.

Round-rectangular-callouts, rectangular-callout, and round-callouts
are added to the blacklist so that they are exported as preset shapes.

Change-Id: Icd1284790607e927b6a9a614ac463a96cadedd81
Reviewed-on: https://gerrit.libreoffice.org/26479
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-08-11 12:37:22 +00:00
Noel Grandin
f12476f0f6 loplugin:countusersofdefaultparams in oox..sd
Change-Id: I4504939a3957606979c6ac36af6611e1fe072d01
Reviewed-on: https://gerrit.libreoffice.org/27902
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-08-05 11:50:45 +00: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
Miklos Vajna
79fdf19e94 oox: avoid pointless multiplication at int precision in WpsContext
When the output would be used at long precision anyway.

Change-Id: I6eefda0533b8ee70b878f7ce7c6487f8b99a6025
Reviewed-on: https://gerrit.libreoffice.org/27360
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-07-21 08:39:52 +00:00
Miklos Vajna
f8847d3ab4 oox: indentation fixes
These files had consistently no space between the "const" and "&", keep
it that way.

Change-Id: I5463c488d807344d67fb22ad544c049ea749be94
2016-07-08 09:05:43 +02:00
Stephan Bergmann
607ef95608 loplugin:passstuffbyref also for {css::uno,rtl}::Reference
Change-Id: I19eaebdb25db8881d84625a4b9d0df0a588aab4f
2016-07-07 18:59:55 +02:00
Mark Hung
0381026924 tdf#100179 correct cell merging in pptx.
Change-Id: I7a5bc6fb33c64d1ff398986eff5b960fe037df4d
Reviewed-on: https://gerrit.libreoffice.org/25791
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Hung <marklh9@gmail.com>
2016-06-30 14:55:41 +00:00
Miklos Vajna
79e8a15ae4 RTF export: it's enough to pass these by const ref, no need to copy
Change-Id: I6854c3c8e9a2b5c6d478551c5f9bba19e114152c
Reviewed-on: https://gerrit.libreoffice.org/26787
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-30 07:06:41 +00:00
Caolán McNamara
65a88b51b3 warn->info: its just a fact
Change-Id: Id3f468cc4bb4f6f0b34bcc8486817c3f9c994020
2016-06-24 15:21:26 +01:00
Zhengqiang Wang
45909a8e7e tdf#100153 modify noSmoking shape
*modify customshapeproperties.cxx
 fix compile error : make oox dbglevel=2
 The define of dumpCode() has been removed by c714b43b0137ad253f51e1c65417c9874b8509e5
*modify presetShapeDefinitions.xml
 fix noSmoking shape
*modfiy oox-drawingml-cs-presets
 this file is generated by presetShapeDefinitions.xml

Change-Id: I383d6b6961b546585035afd8c1a4398385a11914
Reviewed-on: https://gerrit.libreoffice.org/25801
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-23 10:06:29 +00:00
Noel Grandin
46bf504e03 simplify
Change-Id: I67de532443cbb9e64bed67fe28ee94fef38f5eae
2016-06-21 13:00:58 +02:00
Markus Mohrhard
bdcb8d2197 fix indentation
Change-Id: I3a65eae9a7d55aa42540567a19052d6339ecdbec
2016-06-18 17:01:56 +02:00
Jorenz Paragas
cef14b816a tdf#42949: clean up includes in include/filter with iwyu
Change-Id: Id08a999764bfeeff3bb3409b46f48b278009ccbe
Reviewed-on: https://gerrit.libreoffice.org/26238
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-06-15 09:32:21 +00:00
Andrea Gelmini
d3c96c9f82 Fix typos
Change-Id: Ic3efae53430fbb2c1eb7962c3cf69bf99315e55b
Reviewed-on: https://gerrit.libreoffice.org/26202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-13 06:04:07 +00:00
Stephan Bergmann
0def3a7dc4 Clean up uses of Any::getValue() in oox
Change-Id: I76d83ad472eb0cd44b593a86dac1f8c1ee8c3585
2016-06-10 18:55:01 +02:00
Jorenz Paragas
5b156b37d4 tdf#42949: clean up includes in include/oox/vml with iwyu
Change-Id: I753880ce146fef6523561290b8e13310d9f7219c
Reviewed-on: https://gerrit.libreoffice.org/26142
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10 08:35:44 +00:00
jan iversen
4bcb4774a3 Revert "Slideshow: Add 'Oval' Shape Transition variant"
The patch caused problems with the export filter tests, to check that you need to add --with-export-validation to your autopen.input 

see https://cgit.freedesktop.org/libreoffice/contrib/dev-tools/tree/export-validation for more info on how to set it up

This reverts commit 248c5ea771255b54e64394458a321ccf829bbd02.

Change-Id: Ib3b8fa7bf80630feeca1f24dfb1ceb5a945d7162
Reviewed-on: https://gerrit.libreoffice.org/26114
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-09 15:25:23 +00:00
Mayank Gupta
248c5ea771 Slideshow: Add 'Oval' Shape Transition variant
Change-Id: Ibc3d617d3bb94bdd0702bb4d60ce5fbe2eea8e24
Reviewed-on: https://gerrit.libreoffice.org/23661
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-09 09:54:55 +00: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
Stephan Bergmann
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02: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
Mark Hung
005ae2fa19 tdf#93883 don't add space to empty paragraph when bullet is turned off.
Change-Id: Ia1bad61cb5585dae0501e8cd657fc84bfea60ab2
Reviewed-on: https://gerrit.libreoffice.org/25679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-31 16:32:43 +00:00
Noel Grandin
fe6ac2d11a Convert GfxLinkType to scoped enum
Change-Id: Iae074ef0927a55f1fbf401cb66f4f183213f547c
Reviewed-on: https://gerrit.libreoffice.org/25656
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:26:25 +00:00
Noel Grandin
0b23eec200 teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.

Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?

Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:25:45 +00:00
Noel Grandin
850a8d27ca Convert GRAPHIC to scoped enum
Change-Id: I1fd09a729cbda00f99841532e0dd3fa66bce7bea
Reviewed-on: https://gerrit.libreoffice.org/25534
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-27 12:59:23 +00:00
Jorenz Paragas
5c05f1b201 tdf#42949: clean up includes in include/oox/ppt with iwyu
Change-Id: Ib2cf76418e8406b925113ae7a9e3c5b07ffd2de2
Reviewed-on: https://gerrit.libreoffice.org/25011
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-26 20:42:18 +00:00
Noel Grandin
509f0c6a8a loplugin:unusedreturntypes
and clean up the python script

Change-Id: I0a7068153290fbbb60bfeb4c8bda1c24d514500f
Reviewed-on: https://gerrit.libreoffice.org/25439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:26:47 +00:00
Michael Stahl
4384ee727c oox: replace boost::array with std::array
Change-Id: Id9a8f7dbbf13890e7c9787d9b0737f1087e4a509
2016-05-25 13:45:40 +02:00
Noel Grandin
4a8caa37fe warning C4334: '<<': result of 32-bit shift implicitly converted to 64 bits
in VisualStudio

reported by Luke Benes

Change-Id: I908039750a3e89e4d1b77631f7d309191735c765
2016-05-20 10:58:57 +02:00
Noel Grandin
d96c114171 clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 06:58:44 +00:00
Jorenz Paragas
96d5516429 tdf#42949: clean up includes in include/oox/ole with iwyu
Change-Id: I9cbdc78b540b0f735c451ac561f0f0ccdaf7efbd
Reviewed-on: https://gerrit.libreoffice.org/24911
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-13 10:05:35 +00:00
Jorenz Paragas
7b9ea3348a tdf#42949: clean up includes in include/oox/mathml with iwyu
Change-Id: Iefb4e7184009318c0b8859aa895e0b25fc9d9213
Reviewed-on: https://gerrit.libreoffice.org/24871
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-11 07:07:16 +00:00
Jorenz Paragas
4bf7614503 tdf#42949: clean up includes in include/oox/helper with iwyu
...and fix the many compiler errors that occurred as a result.

Change-Id: I497c326272b2f02737ca3765720d6815b735423b
Reviewed-on: https://gerrit.libreoffice.org/24735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-10 19:20:40 +00:00
Stephan Bergmann
d2cc57bf42 Silence Clang -Wimplicit-fallthrough in gperf-generated code
...in preparation of eventually enabling -Wimplicit-fallthrough for Clang.

Change-Id: Idca352d011505e83dbe275cb19626c8b9d8560c8
2016-05-10 16:53:52 +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
Stephan Bergmann
0f3ac23d73 Insert explicit "break" when falling through to empty next case
...which itself only contains a "break" (or nothing at all at the end of the
"switch"), as otherwise Clang -Wimplicit-fallthrough would warn about these.

Change-Id: I25c1cf2ca74dfeba7ca0385ca8f1c1bf30bbf91b
2016-05-10 14:57:26 +02:00
Tor Lillqvist
08977ff115 loplugin:rangedforcopy
Loop variable passed by value, pass by reference instead.

Change-Id: I12d1cb639cbe7a5686a1854168362b85322fa2e5
2016-05-10 13:15:37 +03:00
Jochen Nitschke
22188da241 remove STATIC_ARRAY_END and usages
used in loops, rewrite to range based loop

oox/source/drawingml/color.cxx has some mappings in plain arrays
make them arrays of pairs which can be used in range based loops

Change-Id: Ib6693197d890f595c27ca24b9f9b4e0763747f4c
Reviewed-on: https://gerrit.libreoffice.org/24809
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Jochen Nitschke <j.nitschke+logerrit@ok.de>
2016-05-10 09:40:00 +00:00
Michael Stahl
58080e8f78 basegfx,oox,slideshow: replace boost::next/prior with std::next/prev
Change-Id: I38fde54d0fdbb9c61e3df004242a70e14429f52f
2016-05-06 23:37:10 +02:00
Jorenz Paragas
1aeca4b64a tdf#42949: clean up includes in include/oox/export with iwyu
...and fix the usual compiler errors that occurred as a result.

Change-Id: I54781d3f01e9f5a87fd008870c825b2d8154fd59
Reviewed-on: https://gerrit.libreoffice.org/24686
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-06 06:58:53 +00: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