summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2016-04-18clang-tidy performance-unnecessary-copy-initializationNoel Grandin2-18/+16
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-18clean-up: unused using declarations and includesJochen Nitschke14-50/+0
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-13tdf#94306 remove unused boost dependenciesJochen Nitschke1-1/+0
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-13loplugin:passstuffbyref in ooxNoel Grandin7-8/+8
Change-Id: Iec989e9060c77dd5b010224b37633179cee4f7e9
2016-04-12tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionalsRohan Kumar3-13/+11
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-12tdf#99135 VML import: handle image cropMiklos Vajna2-0/+39
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-12cleanup: remove unused com/sun/star/uno includesJochen Nitschke5-6/+0
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-11clang-tidy performance-unnecessary-value-param in ooxNoel Grandin20-128/+128
Change-Id: I1ac86906ea21c00f8d77834c94583be7d9e9974e
2016-04-11tdf#94306 replace boost::noncopyable ...Jochen Nitschke1-2/+3
... 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-08fix many ooxml validation errorsMarkus Mohrhard1-2/+13
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-04Use std::size_tMiklos Vajna1-2/+2
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-02cleanup: remove unused Reference.h(xx) includesJochen Nitschke5-7/+0
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-01tdf#97966 Drop 'static' keywordsWastack1-1/+1
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-03-31Typo in HAVE_BROKEN_STATIC_INITILIZER_LISTStephan Bergmann1-2/+2
Change-Id: Ia29868d1832b529d438a5a5448b751683c226846
2016-03-31use SAL_N_ELEMENTS in for loopsNoel Grandin1-1/+1
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-29tdf#95932: PPTX import: Incorrect inheritance of shape styleMatus Uzak1-1/+0
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-23tdf#93868: PPTX import: Incorrect inheritance of shape fill propertiesMatus Uzak3-9/+6
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-15remove unnecessary parentheses in case labelsNoel Grandin1-1/+1
Change-Id: I987bf68c767709080c67c8b183c036a4109c6caa
2016-03-14inline some use-once macrosNoel Grandin1-1/+1
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-10tdf#89927: PPTX import: Incorrect inheritance of text run fill propertiesMatus Uzak9-30/+33
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-10These tests can just derive from plain CppUnit::TestFixtureStephan Bergmann2-31/+4
...and then no longer need to override any base class setUp/tearDown Change-Id: Iaea19dfb341325bb45062d0ac0b5fa1eed0d34e0
2016-03-10Extract Directories from BootstrapFixtureBaseStephan Bergmann1-14/+14
(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-04tdf#62255,tdf#92058: PPTX import: Incorrect inheritance of default table styleMatus Uzak1-2/+3
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-04PPTX import: Table cell props: Override default graphic style if applicable.Matus Uzak1-0/+2
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-04loplugin:unuseddefaultparam in oox/reportdesign/sdNoel Grandin5-38/+28
Change-Id: Ia26cf182ddc7c903d86bf74a8175858adb88121c
2016-03-03loplugin:unuseddefaultparams in ooxNoel Grandin12-56/+34
Change-Id: If05662102e161d3dd56bbb6ed3964e63ba853cf9
2016-02-25Avoid hard-coded perl path, check with envcoypu2-2/+2
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-24convert DocPasswordRequestType to scoped enumNoel Grandin1-1/+1
Change-Id: I25d217ca2cf3e8cc4dfaccc6dc7d5453ffdc6cb6
2016-02-24convert DocPasswordVerifierResult to scoped enumNoel Grandin1-2/+2
Change-Id: Ib5a595819dec8511d284ed1022d8f7c624f8d8f9
2016-02-24convert EConfigurationModes to scoped enumNoel Grandin1-1/+1
Change-Id: I1e81c8d637e738f536f7efad8b67d0c9183e6483
2016-02-23new loplugin: commaoperatorNoel Grandin1-3/+6
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-22add Wildcards / PROP_Wildcards, tdf#72196Eike Rathke1-0/+1
Change-Id: I7045042cba991a834f24f237d983ac3693f4b93d
2016-02-22loplugin:write only fieldsNoel Grandin4-22/+16
Change-Id: I45895e9845a9037da207f001fece427452ed499f
2016-02-19tdf#97703 Removed a few redundant calls to setUp and tearDownJaskaran1-1/+0
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-16Related: tdf#59699 DOCX import: fix linked graphics with relative URLsMiklos Vajna2-28/+18
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-09Remove excess newlinesChris Sherlock25-108/+0
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-09Formatting changes across all modulesChris Sherlock1-2/+2
+ 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-08Export and import of additional fields in ImpressRosemary Sebastian2-0/+27
These include - Author - Page Count - Page Name Export and import of slide number was already implemented. A test for the same has been added along with the tests for the newly implemented field exports. In sdmodeltestbase.hxx a new method getTextFieldFromPage has been added to reduce copy-paste code Change-Id: Icf54b91a7db4b3cccd9d0666a2706e3cc2a89d9a Reviewed-on: https://gerrit.libreoffice.org/22065 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-02-03oox: replace boost::bind with C++11 lambdaMichael Stahl3-21/+8
Change-Id: I8b3c029db18f62cc41e5fc12582e10bf2a67d2c7
2016-02-03Improve DrawingML export of rotated/flipped customshapesAndras Timar1-4/+14
When we export the customshape as polypolygon, we need to take into account, that the polypolygon of the shape already has flipped coordinates, but coordinates has to be relative to the rotated bounding rectangle. Change-Id: I4f3b015e439d3d6041adc67eddd460f5bd4dfca1 Reviewed-on: https://gerrit.libreoffice.org/21905 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Andras Timar <andras.timar@collabora.com>
2016-02-02remove B2DLineJoin::MiddleCaolán McNamara1-1/+1
and consistently map css::drawing::LineJoint_MIDDLE to the same thing that css::drawing::LineJoint_MITRE points to everywhere else Change-Id: I77b7586ea13f3fe84c0529172758256666488d36
2016-02-02Export and import of file name fieldRosemary Sebastian2-0/+39
Change-Id: Ic2c8ce0ff2a54079ef81f6ce2770497a9d22c7b6 Reviewed-on: https://gerrit.libreoffice.org/21902 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-01-31unnecessary use of OUString constructorNoel Grandin1-2/+2
Change-Id: Idd31b0a53c8318af69bbcd32f6798721ec8eb8e1 Reviewed-on: https://gerrit.libreoffice.org/21945 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-30Remove unused includesMiklos Vajna1-1/+0
Change-Id: I38784900d5b4fcf99d5fc881f0ec7a9833fe2d5b Reviewed-on: https://gerrit.libreoffice.org/21917 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org>
2016-01-29oox: replace boost::bind with std::bindMichael Stahl2-8/+8
Change-Id: Ic402cfd6900cdf1741264b409f6fbe8f2db7e17a
2016-01-27Format the datetime fields properly on importRosemary Sebastian1-2/+17
Make sure that, after export, the datetime fields in impress are imported with the correct number format. Change-Id: I5565fef69b3a62e7dd59ea0d39cde151fb0af976 Reviewed-on: https://gerrit.libreoffice.org/21610 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2016-01-21oox: import Math objects from PPTX filesMichael Stahl6-2/+173
This is quite hacky and limited: in OOXML these are not OLE objects but occur inside text boxes, and PPT 2010 allows inserting multiple Math objects into one text box but Impress does not have as-character anchored objects, so we can't import that properly; for now only import Math if there is nothing else in the text box. Also for now only import them as children of TextParagraphContext (a:p); it's not clear what the possible parent elements could be since the OOXML standard only lists WordProcessingML parent elements :( Change-Id: I847f810084c9ddae4b60f93896fb73a742683cc2
2016-01-21oox: fix indentation of PPTShape::addShape()Michael Stahl1-195/+197
Change-Id: Ic878535d3bc2d57dc24cc1821d8ce8403482b253
2016-01-21oox, writerfilter: incorrect a14 namespaceMichael Stahl1-1/+1
Change-Id: I813ca0510b6cfc26c307c510f3511c01c0f65c85
2016-01-15oox: getEntryName() could throw a WrongStateExceptionMichael Stahl1-7/+16
let's guard against that. Change-Id: I970fb801a642592d9c23390572867f0e21f03132