summaryrefslogtreecommitdiffstats
path: root/oox
Commit message (Collapse)AuthorAgeFilesLines
* tdf#97703 Removed a few redundant calls to setUp and tearDownJaskaran2016-02-191-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>
* Related: tdf#59699 DOCX import: fix linked graphics with relative URLsMiklos Vajna2016-02-162-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
* Remove excess newlinesChris Sherlock2016-02-0925-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>
* Formatting changes across all modulesChris Sherlock2016-02-091-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>
* Export and import of additional fields in ImpressRosemary Sebastian2016-02-082-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>
* oox: replace boost::bind with C++11 lambdaMichael Stahl2016-02-033-21/+8
| | | | Change-Id: I8b3c029db18f62cc41e5fc12582e10bf2a67d2c7
* Improve DrawingML export of rotated/flipped customshapesAndras Timar2016-02-031-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>
* remove B2DLineJoin::MiddleCaolán McNamara2016-02-021-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
* Export and import of file name fieldRosemary Sebastian2016-02-022-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>
* unnecessary use of OUString constructorNoel Grandin2016-01-311-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>
* Remove unused includesMiklos Vajna2016-01-301-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>
* oox: replace boost::bind with std::bindMichael Stahl2016-01-292-8/+8
| | | | Change-Id: Ic402cfd6900cdf1741264b409f6fbe8f2db7e17a
* Format the datetime fields properly on importRosemary Sebastian2016-01-271-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>
* oox: import Math objects from PPTX filesMichael Stahl2016-01-216-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
* oox: fix indentation of PPTShape::addShape()Michael Stahl2016-01-211-195/+197
| | | | Change-Id: Ic878535d3bc2d57dc24cc1821d8ce8403482b253
* oox, writerfilter: incorrect a14 namespaceMichael Stahl2016-01-211-1/+1
| | | | Change-Id: I813ca0510b6cfc26c307c510f3511c01c0f65c85
* oox: getEntryName() could throw a WrongStateExceptionMichael Stahl2016-01-151-7/+16
| | | | | | let's guard against that. Change-Id: I970fb801a642592d9c23390572867f0e21f03132
* oox: export Math objects to PPTX filesMichael Stahl2016-01-151-3/+64
| | | | | | | These hit the assert in lcl_StoreOwnAsOOXML now so better implement some export. Change-Id: I10c005a547e8a85f2a82198a49f9a03fc46a61d7
* oox: coverity#1348468 copy-paste errorMichael Stahl2016-01-151-1/+1
| | | | Change-Id: Ibea6944c4e61e9848aac936e399ed08192ec5812
* oox: move enum DocumentType out of drawingml.hxxMichael Stahl2016-01-151-2/+2
| | | | | | ... which has nasty dependencies. Change-Id: I84ba0302142ade6e15291b782453dbe3bac753dd
* loplugin:unusedmethods unused return value in oox,packageNoel Grandin2016-01-152-6/+3
| | | | Change-Id: I63862c3ce32a1106b7de037f422e7e5480e8bfd6
* loplugin:unusedmethods unused return value in include/ooxNoel Grandin2016-01-1210-41/+24
| | | | Change-Id: I22acb6b94774c5944d8276827c53a419f0803f83
* oox: deterministic oleObject stream numberingMichael Stahl2016-01-111-4/+2
| | | | | | ... like in sw. Change-Id: I4ba5d404c4160e907330832b7710c1d96430badf
* crashtesting: don't fail on export of fdo65321-3.ods to xlsxCaolán McNamara2016-01-101-118/+128
| | | | | | with broken ole object Change-Id: I8dc9e1035893d5cb931d13eafcc3e3ec1c9c00d4
* Fix typosAndrea Gelmini2016-01-103-3/+3
| | | | | | | Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* deleting a null pointer is fineMarkus Mohrhard2016-01-081-4/+1
| | | | Change-Id: Iba329fae2d6882799a0d470590bb7bcfe88d1e92
* tdf#96674 drawingML import: fix handling of zero width/height linesMiklos Vajna2016-01-051-1/+12
| | | | Change-Id: If3d9f6272031e08ab228cfa58963d60ceede2498
* these fields can be static constantsNoel Grandin2016-01-041-3/+4
| | | | | | | Change-Id: Id56e219782d7f858cdeb26232c7aabd4f643c9d9 Reviewed-on: https://gerrit.libreoffice.org/21020 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* oox: change instances of maName to more descriptive namesChris Sherlock2015-12-262-6/+6
| | | | | | | Change-Id: Iee410ec4d256eb5b663d88e048d5bf6200845256 Reviewed-on: https://gerrit.libreoffice.org/20959 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
* loplugin:unusedfieldsNoel Grandin2015-12-241-42/+19
| | | | | | | Change-Id: I979592adb978c3757a1e54615021ee424a2e02bf Reviewed-on: https://gerrit.libreoffice.org/20892 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* crashtesting: export of ooo40765-1.sxw to docx failsCaolán McNamara2015-12-231-3/+3
| | | | Change-Id: I57d5e085e612908e7a22f444c771ec9fa45485ce
* tdf#96051: FILESAVE: Roundtrip any PPTX file with Shapes creates invalid OOXMLZolnai Tamás2015-12-221-3/+6
| | | | | | | | | | Revert "bnc#584721: Import subtitle block to master slides" This reverts commit b3d50feaa87b670baf68288974005ac26ad31736. It seems the imported subtitle block makes export corrupt the output. Better to have a valid output. Change-Id: I1a3d4f03e4fa0c4431a5394495682a1b9d7677bc
* loplugin:unusedfields in oox,packageNoel Grandin2015-12-2213-34/+3
| | | | Change-Id: I8f8c3ff9ded455a09f3df81c501da17cca0b2310
* loplugin:unusedmethodsNoel Grandin2015-12-212-48/+0
| | | | Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
* Bin leftover commented-out debugging call to dump_pset()Tor Lillqvist2015-12-201-1/+0
| | | | | | | Most likely wouldn't have compiled anyway if un-commented-out as I see no dump_pset here. Change-Id: I45a998251fb241a534d8f8ee9e57c2f4cba7df5c
* oox: fix indentation of ShapeExport::WriteOLE2ShapeMichael Stahl2015-12-201-134/+133
| | | | Change-Id: I9057cd9d574d545929a9f43f40f49164179a6dcc
* oox: save ProgId on import, and use it in ShapeExport::WriteOLE2Shape()Michael Stahl2015-12-203-6/+63
| | | | | | | | | | | Uses the same approach as DOCX import to preserve the ProgID; it would be much better if the MediaType of the stream were preserved instead and the other things derived from that, but this here was rather quick to do... This makes the round-tripping of OOXML OLEs in PPTX work again, which was broken by an earlier commit. Change-Id: Ic7d0362f0c14bf0e522185713666bcd58db2cf64
* move saveInteropProperties from writerfilter to ooxMichael Stahl2015-12-201-0/+40
| | | | Change-Id: I4f9769ad496198d2d002775dee4ee0a2f08d6f3b
* oox: stop pointlessly loading embedded objects to check if it's a chartMichael Stahl2015-12-201-4/+12
| | | | | | | This fixes SdExportTest::testBnc822341 again, because the conversion TryToConvertToOOo() in OleEmbeddedObject no longer breaks it. Change-Id: Ib968722af426123afa08865290e5a4e762f19070
* oox: replace incomplete implementation of ShapeExport::WriteOLE2Shape()Michael Stahl2015-12-201-84/+38
| | | | | | | | | | | ... with oox::GetOLEObjectStream(), and add the "progId" attribute while at it. Not sure what the "name" attribute is good for, it appears more like a unique name than some kind of type classification? This makes SdExportTest::testBnc822341 fail temporarily, and also breaks roundtripping of OOXML OLEs in PPTX files. Change-Id: I20043b2a414cf5a28eaa24adaf2ddeb737986250
* factor out oox::GetOLEObjectStream() without sw dependenciesMichael Stahl2015-12-201-0/+225
| | | | Change-Id: I32fa4b6b6d755b613b46b32d3b5961976335c76e
* loplugin:findoncontainerNoel Grandin2015-12-151-2/+1
| | | | Change-Id: Ie32abd917bf86ab0c44be80a00e5f35354bc3cdc
* don't be creative and use a simple lookup tableDavid Tardon2015-12-141-2/+21
| | | | | | | The original code breaks at least in optimized build on Fedora x86, because there nBits for 256 is computed as 9, not 8. Change-Id: Ib157c415bc9e231bf7fd544349810e6bc83c8fcc
* No need for a separate <vcl/graph.h>Tor Lillqvist2015-12-111-1/+0
| | | | Change-Id: I962544005b5d408f7c044a02eefe09b87d8a81fe
* Prefer STL container to manual reallocMiklos Vajna2015-12-041-30/+12
| | | | Change-Id: Id586934c8ff635b1ec2b645b0956cc60960f6078
* oox: better warning message on unhandled element in docprophandlerMiklos Vajna2015-11-301-1/+1
| | | | Change-Id: I7ddd5290134ae3cc3b9f7427055537e79919b480
* export date and time fields in impressRosemary2015-11-301-2/+36
| | | | | | | | | | | | only those fields that are currently implemented in editeng/source/items/flditem.cxx and also match with those in the specification are exported Change-Id: I542cb0f827e161005e55452b5b6961dc642cd4e7 Reviewed-on: https://gerrit.libreoffice.org/20062 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
* Resolves: tdf#96072 export Chart format codes in Excel notationEike Rathke2015-11-271-8/+21
| | | | | | | | | As for the change in chart2/qa/extras/chart2export.cxx Chart2ExportTest::testAxisNumberFormatXLSX() unit test: also Excel writes string parts of format codes quoted, including minus sign in negative subformat. Change-Id: I201bb012df818129cbc65de0eee8eca59e57d829
* loplugin:unusedfields in include/oox/Noel Grandin2015-11-241-5/+4
| | | | Change-Id: Ie7a53f3ecc05d1d4f6f71aa8165315f9155c60dc
* tdf#78902 VML import: workaround for extreme top marginMiklos Vajna2015-11-241-9/+18
| | | | | | | | | | | | | | | | | | | | | | Regression from commit 2b78f2cd7b9e4bab0f3b3b9119238f36a1bbc7b2 (rhbz#988516: DOCX import: fix context stack when importing header/footer, 2014-03-05), though that just made an existing Writer layout problem visible. RTF/WW8/newer (drawingML) DOCX import doesn't have this problem, as those import pictures as sw graphics, not draw ones. <w10:wrap type="through"/> is normally mapped to our page wrap (as it uses "through" in the "not only wrap around, but also in the holes of the shape, if it has any" context, not in our "text should go through it, so no wrapping" one), but for some reason in this case (most probably due to the extreme large negative margins) Word handles the situation as our through, i.e. the text should not go to the second page, as it would normally happen with a "Word through" wrapping. Work around the strange situation by ignoring the wrapping request for extreme top margin values. Change-Id: I20555b1fa7a769e20c40a3a5ff3873807403e937