3587 Commits

Author SHA1 Message Date
Noel Grandin
f07ff7ed8a clang-tidy modernize-loop-convert in oox to sax
Change-Id: If0d87b6679765fc6d1f9300c6972845cf3742b9c
Reviewed-on: https://gerrit.libreoffice.org/24674
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-05 12:44:25 +00:00
Jorenz Paragas
af1174b2de tdf#42949: clean up includes in include/oox/drawingml with iwyu
Add includes in other files to fix compiler errors.

Change-Id: I566e2e081094cb074d20afbe7ceee49f759c725b
Reviewed-on: https://gerrit.libreoffice.org/24510
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-05-03 20:17:37 +00:00
Matus Uzak
554158f7d3 tdf#99030: PPTX import: Fixed lost slide background color
Regression from commit f3d1ac7

Change-Id: I5cb9fe1bb6c753c34b49e72194a9fbe4c10c1654
Reviewed-on: https://gerrit.libreoffice.org/23930
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-04-29 11:59:11 +00:00
Matus Uzak
f9c8651506 tdf#90736: PPTX import: Improved table border line style support
Map preset line dash values from ooxml to the smaller set of LO's
predefined table border line styles.  Map custom dashing scheme
to a simple dashed line style.

Change-Id: Ia81d94cb7e20b05f1c2cc0c20c8ad398c5613d6c
Reviewed-on: https://gerrit.libreoffice.org/24048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-04-29 10:57:47 +00:00
Noel Grandin
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
Maxim Monastirsky
579c2de3a8 tdf#80999 Canceling password prompt should abort detection
... instead of continuing the detection loop and being
"detected" as plain text. The detection API will from now
return a type based on the file extension only, which is
far more useful than "plain text" anyway. Plus the media
descriptor has a flag to indicate that the detection wasn't
completed, which can be also used by the loading code to
abort the loading process.

Change-Id: Ida37e2687bd5cd86b5780620724e9bce82e11946
Reviewed-on: https://gerrit.libreoffice.org/24428
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2016-04-27 18:36:57 +00:00
Jorenz Paragas
6a4a15c87c tdf#42949: clean up includes in include/oox/crypto with iwyu
The includes in CryptTools.hxx that are within #if/#endif directives
are not altered. iwyu suggested replacing the includes for nss.h,
pk11pub.h, and sechash.h with hasht.h, pkcs11t.h, seccomon.h,
and secmodt.h. I decided not to because it might make CryptTools.hxx
harder to refactor in exchange for little gain.

Before creating this commit, I ran 'make check' after passing
--with-tls=openssl to ./autogen.sh to ensure that building with
either OpenSSL or NSS (the default except on iOS and Android) works.

Change-Id: I20260d18f073ffd8077bbcc597e7a8e4954e2ec5
Reviewed-on: https://gerrit.libreoffice.org/24386
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-04-26 11:53:52 +00:00
Noel Grandin
e8fd5a07ec update loplugin stylepolice to check local pointers vars
are actually pointer vars.

Also convert from regex to normal code, so we can enable this
plugin all the time.

Change-Id: Ie36a25ecba61c18f99c77c77646d6459a443cbd1
Reviewed-on: https://gerrit.libreoffice.org/24391
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-26 10:55:58 +00:00
Stephan Bergmann
da0e5863d8 Some more sal_Bool -> bool
Change-Id: Iaae2c92e011c55f8739ecb7972ef9a3f71300765
2016-04-25 16:41:31 +02:00
Jorenz Paragas
474eca1f9b tdf#42949: clean up includes in include/oox/core using iwyu
This allows the headers in that folder to stand on their own and
not depend on any transitively included headers. All changes to
other files are needed to fix compiler errors related to missing
includes that occurred afterwards.

Change-Id: I2083b30763f0b2c1aacdff00226e5f567ae52db4
Reviewed-on: https://gerrit.libreoffice.org/24355
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Tested-by: Michael Meeks <michael.meeks@collabora.com>
2016-04-25 08:51:32 +00:00
Stephan Bergmann
ff1356ab02 Avoid reserved identifiers
Change-Id: Ie1664e06dc02f7070e4ef77155e6541c70b2f8e8
2016-04-22 10:11:13 +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
398027e8b2 loplugin:salbool: Automatic rewrite of sal_False/True
Change-Id: I379e89e1e6b9fd8668ba7ac59af33f63487a4f66
2016-04-20 17:25:45 +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
Jochen Nitschke
150ac9cf05 clean-up: unused using declarations and includes
Searched source for using declarations.
Checked if those symbols reappear in the source file,
even in comments or dead code but not in #include statements.
If they don't reappear, remove the declaration.
Remove includes whose symbol got removed.

Change-Id: Ibb77163f63c1120070e9518e3dc0a78c6c59fab0
Reviewed-on: https://gerrit.libreoffice.org/24148
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-18 07:25:24 +00: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
Noel Grandin
d60d957a68 loplugin:passstuffbyref in oox
Change-Id: Iec989e9060c77dd5b010224b37633179cee4f7e9
2016-04-13 13:27:52 +02:00
Rohan Kumar
aba0c20fb0 tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals
I disentangled my previous patch to make one patch per module. I also
modified the patch according to new directions given by Sweet5hark

Change-Id: Id690f7c1e87230e4d10e1c9fe472f35d1d1caa8b
Reviewed-on: https://gerrit.libreoffice.org/22924
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-12 11:49:21 +00:00
Miklos Vajna
bb646c1472 tdf#99135 VML import: handle image crop
The spec says in theory a % suffix could be also supported, but let's
wait till that is seen in a real-world document.

Change-Id: Ie026915e38dcb03c99085a1740075364b00e1c8d
2016-04-12 09:18:58 +02: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
Noel Grandin
9f877f6773 clang-tidy performance-unnecessary-value-param in oox
Change-Id: I1ac86906ea21c00f8d77834c94583be7d9e9974e
2016-04-11 11:38:57 +02:00
Jochen Nitschke
d84ef731d8 tdf#94306 replace boost::noncopyable ...
... in modules editeng to oox.
Replace with C++11 delete copy-constructur and
copy-assignment.
Remove boost/noncopyable.hpp includes and
one unused boost/checked_delete.hpp include in linguistic.

Change-Id: I5a38d8e5ac1b4286bdeb3858d56490a53d13fe80
Reviewed-on: https://gerrit.libreoffice.org/23928
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-11 07:22:50 +00:00
Markus Mohrhard
753c474b19 fix many ooxml validation errors
This code was just horribly broken. Every requested property would
return the color value which if interepreted as an alpha value gave
invalid values.

This now contains an assert that might trigger in the next set of crash
testing.

Change-Id: I959084dbce2d28878b50ec52ece71397d4ace561
Reviewed-on: https://gerrit.libreoffice.org/23909
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-08 03:41:00 +00:00
Miklos Vajna
4e444871a4 Use std::size_t
And include <cstddef> where necessary.

Change-Id: Icc1208528d6a8b04375d55ccbf3cd6ef046b454f
Reviewed-on: https://gerrit.libreoffice.org/23796
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
2016-04-04 09:11:51 +00:00
Jochen Nitschke
f7a75a66fa cleanup: remove unused Reference.h(xx) includes
and unused using-declarations from Reference.h

Change-Id: I297a7ae6044fa329d245ecf08fd5c4cb930f5b19
Reviewed-on: https://gerrit.libreoffice.org/23735
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-04-02 19:01:24 +00:00
Wastack
1271eadfac tdf#97966 Drop 'static' keywords
Including no keywords from extern "C" blocks

Change-Id: Id9dd5a53d6ea5134ebb473bd0463f8f42965a211
Reviewed-on: https://gerrit.libreoffice.org/23674
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:45:46 +00:00
Stephan Bergmann
4c363dd65a Typo in HAVE_BROKEN_STATIC_INITILIZER_LIST
Change-Id: Ia29868d1832b529d438a5a5448b751683c226846
2016-03-31 15:47:54 +02:00
Noel Grandin
1aa4df615f use SAL_N_ELEMENTS in for loops
for with
  git grep -n 'for.*sizeof'

Change-Id: I6211024385e03ac5eeeb38690d2c1c699e015c2f
Reviewed-on: https://gerrit.libreoffice.org/23569
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-31 08:00:13 +00:00
Matus Uzak
bc14ec0f86 tdf#95932: PPTX import: Incorrect inheritance of shape style
Inheritance Order: 1. Reference Shape's properties, 2. Shape style,
3. Shape properties.

You MUST NOT inherit reference shape's style, because it's already
part of inherited reference shape's properties.  That would overwrite
shape properties applied at point 3, at slide layout/master level.

Change-Id: Id1ab550295988b0087a67c6819dfe32f84825e4e
Reviewed-on: https://gerrit.libreoffice.org/23182
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-03-29 12:18:28 +00:00
Matus Uzak
f3d1ac75c4 tdf#93868: PPTX import: Incorrect inheritance of shape fill properties
DrawingML: The useBgFill attribute specifies that the shape fill
should be set to that of the slide background.

Change-Id: I8b568e730f00326d51e7b604579f4ff990b26f8a
Reviewed-on: https://gerrit.libreoffice.org/23039
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-03-23 06:49:01 +00:00
Noel Grandin
52e438caaf remove unnecessary parentheses in case labels
Change-Id: I987bf68c767709080c67c8b183c036a4109c6caa
2016-03-15 08:52:23 +02:00
Noel Grandin
218cd09611 inline some use-once macros
Change-Id: I7ebd8fe70b083a772118a1aab8cdfbf795d6f1e5
Reviewed-on: https://gerrit.libreoffice.org/23235
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-14 11:06:48 +00:00
Matus Uzak
6802f760a6 tdf#89927: PPTX import: Incorrect inheritance of text run fill properties
Make use of FillProperties in TextCharacterProperties.  DrawingML:
Fill related elements in Text Run Properties are in sync with Table
Cell Properties and all of Line Properties.

Change-Id: I7c513ecfc5f94cf49e98a657384b5c0f5dddc1c7
Reviewed-on: https://gerrit.libreoffice.org/22979
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-03-10 10:20:46 +00:00
Stephan Bergmann
3d82b08bce These tests can just derive from plain CppUnit::TestFixture
...and then no longer need to override any base class setUp/tearDown

Change-Id: Iaea19dfb341325bb45062d0ac0b5fa1eed0d34e0
2016-03-10 11:06:29 +01:00
Stephan Bergmann
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
Matus Uzak
87d0df65a9 tdf#62255,tdf#92058: PPTX import: Incorrect inheritance of default table style
The default table style defined in tableStyles.xml file can be used
when a table is initially inserted into a document.  It must not be
applied by default to any of the tables not referencing a table style
explicitly from the tableStyleId element.

Change-Id: I025cdfba352c87a32f9a1e297fbc8b9fc2c8c0a4
Reviewed-on: https://gerrit.libreoffice.org/22619
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-03-04 22:22:18 +00:00
Matus Uzak
01157183ea PPTX import: Table cell props: Override default graphic style if applicable.
If no fill type is defined for a table cell, then set it to XML_noFill
explicitly, in order to override the fill type defined by the default
graphic style or the graphic style named standard, added by LO and
exported into ODP.

Change-Id: I9c5aa4c2a939ee7b8c75ae686d845cd14a718254
Reviewed-on: https://gerrit.libreoffice.org/22618
Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Tested-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-03-04 22:21:21 +00:00
Noel Grandin
1fd781e7cd loplugin:unuseddefaultparam in oox/reportdesign/sd
Change-Id: Ia26cf182ddc7c903d86bf74a8175858adb88121c
2016-03-04 14:01:19 +02:00
Noel Grandin
2b7215e6fa loplugin:unuseddefaultparams in oox
Change-Id: If05662102e161d3dd56bbb6ed3964e63ba853cf9
2016-03-03 08:11:02 +02:00
coypu
48aae2225f Avoid hard-coded perl path, check with env
Change-Id: If39a4991b487b14d21572d6e3d785df4c287f190
Reviewed-on: https://gerrit.libreoffice.org/22238
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-02-25 13:51:25 +00:00
Noel Grandin
3b168bc685 convert DocPasswordRequestType to scoped enum
Change-Id: I25d217ca2cf3e8cc4dfaccc6dc7d5453ffdc6cb6
2016-02-24 11:48:38 +02:00
Noel Grandin
dc1f1cde63 convert DocPasswordVerifierResult to scoped enum
Change-Id: Ib5a595819dec8511d284ed1022d8f7c624f8d8f9
2016-02-24 11:48:38 +02:00
Noel Grandin
0839f90394 convert EConfigurationModes to scoped enum
Change-Id: I1e81c8d637e738f536f7efad8b67d0c9183e6483
2016-02-24 11:48:38 +02:00
Noel Grandin
c45d3badc9 new loplugin: commaoperator
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Eike Rathke
5eaab67daa add Wildcards / PROP_Wildcards, tdf#72196
Change-Id: I7045042cba991a834f24f237d983ac3693f4b93d
2016-02-22 21:30:30 +01:00
Noel Grandin
f17f977d0a loplugin:write only fields
Change-Id: I45895e9845a9037da207f001fece427452ed499f
2016-02-22 08:18:08 +02:00
Jaskaran
9fe9f487a2 tdf#97703 Removed a few redundant calls to setUp and tearDown
Calls to CppUnit::TextFixture::setUp and CppUnit::TextFixture::tearDown
have been removed. I hope that saves a few milliseconds of build time :)

Change-Id: I611db2f5c5673ab86bf8f92beb4f6e8a70443b34
Reviewed-on: https://gerrit.libreoffice.org/22496
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-19 06:26:04 +00:00
Miklos Vajna
6083a8f188 Related: tdf#59699 DOCX import: fix linked graphics with relative URLs
Because the writerfilter::ooxml::OOXMLFastContextHandlerShape
constructor only sent the input stream (and not the full media
descriptor) to oox::shape::ShapeContextHandler, it's startFastElement()
tried to reconstruct a media descriptor from just the input stream. As a
result, the base URL of the document got lost at the time the
oox::drawingml::BlipContext constructor tried to call getAbsoluteUrl(),
to convert the relative URL to an absolute one.

Fix the problem by sending not only the input stream, but the full media
descriptor to the shape importer. As a bonus that makes code simpler,
too.

Change-Id: I1f06c04d0745aa7e2e06d4848cf454790d5073ca
2016-02-16 09:16:43 +01: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
538f276ae0 Formatting changes across all modules
+ Removed comment cruft
+ Tab formatting in number of files
+ Some commented out code removed
+ Tab characters replaced with spaces
+ Newline cleanup in quite a few files
+ Tweak header guard #endifs

Change-Id: I3208ff2f047da890edcc49b73389aca22442f5fc
Reviewed-on: https://gerrit.libreoffice.org/22221
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-09 08:11:34 +00:00