summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2019-05-14tdf#100084 XLSX import: fix missing charts clean-upBalazs Varga
Clean-up the b2fc2ad7beceaff660de684435a5c37d69cf8ae9 commit. Change-Id: I625373d9661cbe4528ca487af0aef356b40af2e7 Reviewed-on: https://gerrit.libreoffice.org/72237 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-05-13ooxml import: supprt cropping to shapeTamas Bunth
Change-Id: I7bdc959921ecb0cbf19037a78b63eaeb8fc52814 Reviewed-on: https://gerrit.libreoffice.org/72206 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com>
2019-05-13tdf#100084 XLSX import: fix missing chartsBalazs Varga
caused by case-sensitive path handling of relationship files. OOXML documents contain case-insensitive file paths, for example, uppercase "Sheet.xml" can have a lowercase "sheet.xml.rels" in the ZIP archive, as in the case of the XLSX documents generated by IBM Cognos. Change-Id: I4210e3b96fb512d61e1687ec8d41a3c77292ec0c Reviewed-on: https://gerrit.libreoffice.org/72100 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-05-13fix wrong SET/QUERY flags passed to uno::ReferenceNoel Grandin
By creating deleted methods for the wrong calls. Avoids the compiler needing to construct a temporary Change-Id: I3b8c648d6bb22d22827bf74f21ea5a2a17fc0f6a Reviewed-on: https://gerrit.libreoffice.org/72103 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-10tdf#125173 fix hyperlink inserted to text boxTünde Tóth
Hyperlink inserted to text box lost after export. Change-Id: I796e54339292cb4a5e98de1ead6558d66587d353 Reviewed-on: https://gerrit.libreoffice.org/72033 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-05-10SmartArt: support diagram backgroundGrzegorz Araminowicz
Solved by adding additional shape filling whole diagram. MS PowerPoint does the same when converting SmartArt to shapes. Background shape is also copied when loading from drawingML fallback, appearently there is no background information. Corrected SmartArt import tests, so that they are aware of extra shape. Change-Id: I6154f8e1b34e5867ab582d6fc54459c7c93edbac Reviewed-on: https://gerrit.libreoffice.org/72012 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-10tdf#62699 Drop pass-through header file include/svx/svdattr.hxxGabor Kelemen
Change-Id: I04289589196ac69b31f75989d9252c79d03c890f Reviewed-on: https://gerrit.libreoffice.org/71633 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-05-09loplugin:unusedmethodsNoel Grandin
Change-Id: I7b4d2e5e611935284e2902b0089950768dfb7717 Reviewed-on: https://gerrit.libreoffice.org/72036 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-05-09regenerate PCH headers for the 4 new levelsLuboš Luňák
Plus some build fixes triggered by this. Change-Id: I59b21def706598ceffd45ae5b1f0262ec9c1ad50 Reviewed-on: https://gerrit.libreoffice.org/71581 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-05-07PPTX: Fix import / export of image transparencyTamás Zolnai
Change-Id: Ib07c606083b833389fcb82aac57ca8535d6e861f Reviewed-on: https://gerrit.libreoffice.org/71916 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2019-04-30PPTX import: store OOXTheme in InteropGrabBag for SmartArt re-generationGrzegorz Araminowicz
Change-Id: I343dc3a275ecbbb483e179d8cc2deebfb71b9c8f Reviewed-on: https://gerrit.libreoffice.org/71530 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-30implement std::hash for css::uno::Reference and rtl::ReferenceNoel Grandin
The declaration in BarChart.cxx is particularly suspicious, because it was using a < for the KeyEqual template parameter. Been there since: commit b2c3233e5f267b5d244d722a94424a3b224b3314 Date: Thu Dec 21 20:08:33 2017 +0900 chart2: suspend/resume setting rects dirty for 3D shapes comphelper::OInterfaceCompare is no longer necessary Change-Id: I8278c4a3d9113a18570ca237cd05d553ec8f3975 Reviewed-on: https://gerrit.libreoffice.org/71537 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-29tdf#124398 DOCX drawingML import: handle charts in group shapesMiklos Vajna
Regression from commit 8c73b16f5f18f3bc1dbf9ff6c1475db56b44d304 (DOCX import: declare wpg as a supported feature, 2013-12-05), the problem was that <wpg:graphicFrame> did not forward to to the relevant oox context, and also Writer had no idea how to create a com.sun.star.drawing.OLE2Shape. Fix the later by using the same service name that's in use for the non-groupshape case. Change-Id: Id3536854da7c1f01525bb38d801496ecebd4c161 Reviewed-on: https://gerrit.libreoffice.org/71505 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-04-28rename animate.hxx to animate/Animation.hxx, more changes followTomaž Vajngerl
This is the first step of refactoring Animation where it is needed to separate AnimationBitmap(s) from the Animation class, which is also responsible for displaying of animation. General idea is to make Graphic work only with AnimationBitmaps, which can be freely be swapped out and in, make copies - all transparantly from the actually displaying them and possibly it will also remove the need to copy the animation objects. Change-Id: If5d55ac1a5b26c3880d4f7602be57742b086f9da Reviewed-on: https://gerrit.libreoffice.org/71406 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2019-04-26sw btlr writing mode: implement DOCX shape import for tbrlMiklos Vajna
Now that the btlr writing mode works reasonably well in table cells, the next context is shape text. But turns out that DOCX shape text lacked support in the easier tbrl case, so add that first. Also remove the char-level text rotation code in oox, that is effectively dead code since we import drawingML shapes as shape + Writer TextBox. Change-Id: I30c7793221cc3aceedfcfd9e4e1725634ebb3309 Reviewed-on: https://gerrit.libreoffice.org/71329 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-25ofz#14422 null derefCaolán McNamara
Change-Id: Icd00e2aaa5932564668cd12ce4ee63aecc34419a Reviewed-on: https://gerrit.libreoffice.org/71226 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-04-23tdf#123684 PPTX import: fix wrong background color for <p:sp useBgFill="1">Miklos Vajna
Regression from commit 59339dec1ce56213dc74a06af2f0d35ac1c534d7 (tdf#105150 PPTX import: try harder to handle <p:sp useBgFill="1">, 2017-01-06), the problem was that we gave a white solid fill to a shape which is meant to be transparent. Fix the problem by limiting the scope of the mentioned commit to solid colors only, and also extend to code to look for background fill from the masterpage as well. This allows not hardcoding the white solid fill and leaves the fill style of shapes as transparent where the slide background is a bitmap or other more complex fill type. Change-Id: I0063e88d510250652d2b14856df3bd431681422d Reviewed-on: https://gerrit.libreoffice.org/71107 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-04-19Further cleanup of FastSerializerHelper's startElement/singleElement[NS]Mike Kaganski
Drop FSEND_t: C-style varargs code was replaced since version 6.0 in commit d43fc40718217d89cc95cc3c0bc0b8e7926abcc0, so it's time to remove the last bits. Drop int-to-string macros that are simple wrappers over OString::number. Avoid unnecessary string type conversions. Change-Id: I86478577b8e469f99b5a90619e5f78a61f4f23fb Reviewed-on: https://gerrit.libreoffice.org/70964 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-17tdf#123828 XLSX combined chart export: fix order of axis typesBalazs Varga
Also fix tdf#123833 and tdf#123837. In combined charts, now axis types are exported in the right order (catAx[1], valAx[1], catAx[2], valAx[2]). The Y axes are exported correctly with the correct axIDs of the chart types: the first one with the primary axId, the second one with the secondary axId. X category axis crosses the Y axis at the right place, all data series are attached to the right Y axis, and the Y major grid doesn't disappear. Note: don't export the CrossoverPosition/CrossoverValue, if the axis is deleted and invisible, because MSO will show the secondary X axis, even if the axis doesn't exist. The problem was the unnecessary export of the axis with the default css::chart::ChartAxisPosition_END CrossoverPosition value. Change-Id: Id429e654ff0ba45b5f9db877b7c4dd6e65433408 Reviewed-on: https://gerrit.libreoffice.org/70814 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-04-17tdf#123645 XLSX export: fix hyperlink inserted to charttundet
Hyperlink inserted to chart lost after export. chart_hyperlink.xlsx: Test file from Excel 2016. Change-Id: Ideca10e544193ba43d7c2ef6e9dd8e393383edc1 Reviewed-on: https://gerrit.libreoffice.org/70648 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-04-15SmartArt: better detecting connector arrow typeGrzegorz Araminowicz
* basing on provided conn alg params * also moved setting arrow direction from getConnectorType() to algorithms Change-Id: I76898a4ccad961edd389677c31e7d8c05bcdf5fe Reviewed-on: https://gerrit.libreoffice.org/70598 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-15tdf#114181 XLSX combined chart: fix swapped primary and secondary axes etc.Balazs Varga
In combined charts, now X category axis crosses the Y axis at the right place, all data series are attached to the right Y axis, and the Y major grid isn't lost. Note: Let's check which axis is attached to the first charttype (in case of combined chart, the first one is a column chart) and create that axis first. In OOXML standard, the first CT_valAx tag contains the axID of the primary axis and the second CT_valAx tag contains the axID of the secondary axis. Change-Id: Ib123f95ec41ef5dbbf0599efd7a646f4640a9b70 Reviewed-on: https://gerrit.libreoffice.org/70464 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-04-15improve loplugin simplifyconstructNoel Grandin
to find stuff like OUString s = OUString("xxx") Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04 Reviewed-on: https://gerrit.libreoffice.org/70697 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-14tdf#120703 PVS: Silence V522 warningsMike Kaganski
V522 There might be dereferencing of a potential null pointer. Change-Id: Ie4bc74a734a6d5a73838a27e0d80cc8e51595839 Reviewed-on: https://gerrit.libreoffice.org/70730 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-13loplugin:sequentialassign in oox..reportdesignNoel Grandin
Change-Id: I59ef0a6da411b8af8bdf8d8efb1d733db7475d9c Reviewed-on: https://gerrit.libreoffice.org/70707 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-04-12tdf#42949 Fix IWYU warnings in include/avmedia/Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: Ia418fdf7077d1c0c169671770237381c4da7b7b0 Reviewed-on: https://gerrit.libreoffice.org/70582 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-12SmartArt: improve cycle algorithmGrzegorz Araminowicz
connector arrows are now correctly positioned and rotated Change-Id: I6407ec5e2d6e29d250f751f8dc5feae878d3c74c Reviewed-on: https://gerrit.libreoffice.org/70525 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-12SmartArt: save diagram dump to working dir instead of /tmpGrzegorz Araminowicz
so that it works on Windows as well Change-Id: Ia919677067c90a2c9478e3666bfe50489996756f Reviewed-on: https://gerrit.libreoffice.org/70599 Tested-by: Jenkins Reviewed-by: Grzegorz Araminowicz <grzegorz.araminowicz@collabora.com>
2019-04-10SmartArt: omit last atom in forEach loop only when necessaryGrzegorz Araminowicz
now all transition arrows are created in cycle diagrams Change-Id: I69e932f0060786b702dbecae72245bb624fa602b Reviewed-on: https://gerrit.libreoffice.org/70457 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-08tdf#124466 XLSX: fix broken export by removing chart type data redundancyBalazs Varga
XLSX import created a redundant series container for data series with the same chart type, when they were attached to a different axis. Modifying the loaded chart by the user, ie. attaching one of its data series to a different axis resulted broken OOXML export later, because based on the new axis, splitDataSeriesByAxis splitted the first or the redundant series container further. Now the import creates only a single series container for the series with the same chart type, preventing potential export problems. Change-Id: If951feaca3cb3b5df7718e9d7bfd59620ef3c4d3 Reviewed-on: https://gerrit.libreoffice.org/70141 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-04-08PPTX export: save SmartArt as diagram instead of group of shapesGrzegorz Araminowicz
preserving SmartArt allows editing it in PowerPoint after saving as pptx file * moved common parts for docx and pptx export to oox/drawingml * fixed export tests that expected shapes on output Change-Id: I3e70a9f4177bebf5e1671232f4cd0ef0e7212626 Reviewed-on: https://gerrit.libreoffice.org/69598 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-04-06Follow 4a4b1df72909fe96acdbcb95f90e30bd1a79c5ebJulien Nabet
Change-Id: I46d62ec8b7f5347fe7a69e6eb7ac0f1affcfd5b8 Reviewed-on: https://gerrit.libreoffice.org/70342 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Jenkins
2019-04-06Fix 6a9cf9ba2d37fee9b7c2f190b347e0d7c4a2676aJulien Nabet
Change-Id: If025c21f3961372f861c8bb9df722fbdae5cc3cb Reviewed-on: https://gerrit.libreoffice.org/70339 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-04-06tdf#91634 XLSX export: fix hyperlink inserted to imagetundet
Hyperlink inserted to image lost after export. image_hyperlink.xlsx: Test file from Excel. Change-Id: I8dc47528dafc8de5d1e01720697ef57f0ad9628d Reviewed-on: https://gerrit.libreoffice.org/70248 Tested-by: Jenkins Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
2019-04-04Get rid of USS macroMike Kaganski
The helper marco is used in export code to convert UTF-16 internal string representation to UTF-8 used in XML encoding. I suppose that all strings here should be already valid UTF-16 (an invalid input should have been validated at import/input stage). An invalid string at this stage means a programming error in another part of code that breaks this precondition, and should not be handled at export stage. (See also commit 0267a2326b5282023e8b08a147eca178c5db1980.) This effectively changes flags used in conversion from UTF-16 to UTF-8, so that now RTL_UNICODETOTEXT_FLAGS_INVALID_ERROR is used instead of RTL_UNICODETOTEXT_FLAGS_INVALID_DEFAULT, so that the result would be truncated on invalid bytes instead of inserting U+FFFD, and would fail assertion in debug builds. Other changed flags don't affect UTF-16-to-UTF-8 conversion. Change-Id: I12b2cc5378208904c3266924187d6402700ed6f3 Reviewed-on: https://gerrit.libreoffice.org/69801 Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Tested-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-04-02tdf#124463 XLSX export: fix splitDataSeriesByAxisBalazs Varga
splitDataSeriesByAxis couldn't split series correctly into two sequences, because it put all series into the first created sequence, except the first series of the newer sequence. Other improvement: first sequence of the return vector always contains the series attached to the primary axis. Change-Id: I6e107aa990f9a1a1db49cae2a4f3c9d8a35fb54c Reviewed-on: https://gerrit.libreoffice.org/70059 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-03-31tdf#120703 PVS: remove redundant static castsMike Kaganski
V572 It is odd that the object which was created using 'new' operator is immediately cast to another type. Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c Reviewed-on: https://gerrit.libreoffice.org/69989 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2019-03-28return unique_ptr from CreateTableStyleNoel Grandin
Change-Id: I31b12fa3f80dc450fff27128efb2fbebc711b249 Reviewed-on: https://gerrit.libreoffice.org/69859 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-26loplugin:unnnecessaryvirtualNoel Grandin
Change-Id: I2aa9a8f14b6db2098931a14c6eed522a9d2653ed Reviewed-on: https://gerrit.libreoffice.org/69682 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-25tdf#42949 Fix IWYU warnings in include/sfx2/[a-D]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I444cb71bc3d045072a4b1f9eed279ed7e425a0d4 Reviewed-on: https://gerrit.libreoffice.org/69481 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-25new loplugin:unoqueryNoel Grandin
look for places we are doing code like: Reference<XProperty>(model, css::uno::UNO_QUERY)->getAsProperty() which might result in a SIGSEGV is the query fails Change-Id: I5cbdbc9e64bd0bed588297c512bf60cbacb9442e Reviewed-on: https://gerrit.libreoffice.org/69044 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-20tdf#123909 fix event source that refers to a timenode.Mark Hung
p:tn (see below) were treated as delay value instead of timenode id. <p:stCondLst> <p:cond evt="begin" delay="0"> <p:tn val="5"/> </p:cond> </p:stCondLst> Just convert the timenode id to XAnimationNode and set the event source properly. Change-Id: Ib408be6714c6ac70dad7018e544e560cf59a40c0 Reviewed-on: https://gerrit.libreoffice.org/69340 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-03-20Further reducion of OString copying by in-string comparisonMatteo Casalin
Only copy string for SAL_WARN call, to not print unneeded information Change-Id: I962ac8a7ed9bc8ee08d1ea31f4f13a0670cbdf3a Reviewed-on: https://gerrit.libreoffice.org/69232 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-20Reduce OString copying by using in-string comparisonMatteo Casalin
Change-Id: I75dbafe00609c6f85ec7cc0cca492bc01cb62052 Reviewed-on: https://gerrit.libreoffice.org/69231 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
2019-03-18tdf#81437 XLSX import: fix missing chart borderBalazs Varga
of MSO 2007/2010 documents with "automatic" chart area formatting, setting also the default 0.75 pt border width and light gray border color. Note: MSO 2007/2010 and MSO 2013/2016 have different "automatic" border colors. This fix uses the last, light gray version instead of the dark one. Change-Id: I579f3745d5fcb2a36e1b4d519320631d20e60fd4 Reviewed-on: https://gerrit.libreoffice.org/69341 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-03-18PPTX import: save also OOXDrawing in InteropGrabBagGrzegorz Araminowicz
Change-Id: Ieaf341dd13e06046044f3523c3aad74476160402 Reviewed-on: https://gerrit.libreoffice.org/69328 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-14PPTX import: import SmartArt drawing into single GroupShapeGrzegorz Araminowicz
before that there were imported two GroupShapes: - empty one with properties like id, name, InteropGrapBag - second one with actual shapes also fixed tests that relyed on that behaviour Change-Id: I2b94a53e21666b16725c4353448d75e916e4f9df Reviewed-on: https://gerrit.libreoffice.org/69252 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-12tdf#115012 XLSX chart import: workaround for no gapLászló Németh
DispBlanksAs=gap mode of OOXML is different from treat-empty-cells=leave-gap mode of OpenDocument, because formulas with no numerical values and strings are no gaps in OOXML line charts, but zeroes. When the data source of the line charts contains formulas with no numerical values or strings, but it doesn't contain empty cells, as a workaround, the charts will be imported with the treat-empty-cells=use-zero setting to get the same line chart as in MSO. Note: now result of ScChart2DataSequence::getData(), a sequence of Any values contains UNO void values for empty cells instead empty strings, allowing the distinction of the empty cells and cells with empty string values. Change-Id: If9a101d66b5b750051928fa7b10b05cea6040071 Reviewed-on: https://gerrit.libreoffice.org/69054 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2019-03-11PPTX import: save SmartArt markup into InteropGrabBagGrzegorz Araminowicz
it will allow to preserve SmartArt when saving PPTX files Change-Id: I9bb66c59d202b4ce426864599014d042d4aa04b0 Reviewed-on: https://gerrit.libreoffice.org/68916 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-03-07log nice exception messages whereever possibleNoel Grandin
Change-Id: Idd125c18bee1a39b9ea8cc4f8c55cddfd37c33e1 Reviewed-on: https://gerrit.libreoffice.org/68579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>