summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2021-01-14oox smartart: fix crash in pyra algorithm with a single child shapeMiklos Vajna
Regression from commit 14a56533ff2c9c859d22cd3039ada75b99e94bc0 (SmartArt Pyramid: Now lays out shapes, 2018-07-10), the added pyramid algorithm by first centering the topmost children, then decrementing the horizontal postion of each additional shape, with the end goal of having 0 horizontal position of the last children. This means that simply avoiding the division in the 1-child case leads to correct results, because in this case the only child is also the last child at the sane time. (cherry picked from commit f2e04fe98e313cffa3f98d55eae641415142a431) Change-Id: Ifd0027e9616b0909dbfde43e1555427b50de4dad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109183 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-01-08tdf138773 Chart OOXML import: set text overlap to falseTünde Tóth
of category axis label, if the rotation is undefined in xml, to avoid e.g. missing rotation of them. Regression from commit: 21620f9d2f50e66dffc45a5afb539edb8d54434c (tdf#138194 Chart OOXML import: set text break to true) Change-Id: I5b03614eca547a206afc0d8118e3f6c055ed5348 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108792 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 2752fd1b665694a4db3a4e34c7fdc8780a86492e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108992 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-17tdf#129961 oox: add PPTX export for table shadow as direct formatMiklos Vajna
Custom shapes export shadow as part of WriteShapeEffects(), so use the same for table shapes as well. This needs fixing the effect export up a bit, because table shapes have no interop grab-bag, glow or soft edge properties, but the rest of the code can be shared. (cherry picked from commit 252cdd5f43d65095543e317d37e1a0ea4fd839e0) Change-Id: Icf0b90c5b44e3d9c4115c9f3b0d56ba0852ab640 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107865 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-17tdf#138889 OOXML chart: fix import of rotated shapesBalazs Varga
in charts, resulted e.g. distorted arrows. Change-Id: I2d25aeeef8aed9fccacf3cc9f735123e8d891de5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107670 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit fbe77e5d61ca63a688c12be721e760935d78e780) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107801 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-12-11tdf#129961 oox: add PPTX import for table shadow as direct formatMiklos Vajna
PPTX export and ODP filter is still missing. (cherry picked from commit b273e82aaa916b0f6198097dc32740faced73741) Change-Id: I451b334ada80d9d228b7d7f36b5f26473b575ef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107566 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-11oox: make effectpropertiescontext available to everyone in oox/Miklos Vajna
I plan to use this from oox/source/drawingml/table/tablecontext.cxx for tdf#129961. (cherry picked from commit f2e1685e489c054ea10afc0df52451c74da10cc0) Change-Id: Id5177467341f9ddf73c6043796ad35e9cc655d37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107562 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-12-10tdf#41466 DOCX import: fix VML v:shape/v:textboxRegényi Balázs
VML v:shape/v:textbox element was imported only as a text frame, losing (otherwise recognized) preset shape geometry, i.e. replacing a callout bubble (wedgeRectCallout) and other special shapes with a plain rectangle. Thanks to Attila Bakos for the initial help. Change-Id: I03a608822ed54a20ed07406a08c3539e72958f5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105299 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit bda05ba17362222b74727872579b65b3fa14e3d8) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107486
2020-11-30tdf#138561 OOXML Chart import: fix custom shape positionBalazs Varga
and size within charts. Use default page size for custom shapes, too, like in the case of other shapes (legend, titles, etc.), until we get the actual size of the embedded chart. Follow up commit: a01ccdfa5fd5a0260b7aedf955e1e5aa0df072c3 (tdf#138307 Chart import: fix disappeared text from custom shape) Change-Id: Id6da7322326fbe8dfa570264107db59cc45dff31 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106704 Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu> Tested-by: Balazs Varga <varga.balazs3@nisz.hu> (cherry picked from commit f1a5bb0b79c212a0459b1a17dd15f1159e663dbd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106820 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-24tdf#138194 Chart OOXML import: set text break to trueTünde Tóth
of rotated category axis label, if the rotation is 90 or 270 degree and the inner size of the chart is not fixed. Change-Id: I02e1fd940af8a277435aa46d4ad93a42b6723710 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106422 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 21620f9d2f50e66dffc45a5afb539edb8d54434c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106446 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-24tdf#138181 Chart OOXML: fix deleted legend entries of pie chartsTünde Tóth
The legend of the pie chart showed deleted legend entries too when VaryColorsByPoint was false. Change-Id: I6fc978af0db6e2d39d7f451e765d7ef81c73a05c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105943 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 3be5e428d669accd841949662d601a6f6e1cdb3f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106443 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2020-11-22oox: VML export: Output coordsize even when top/left is 0,0Dr. David Alan Gilbert
For a polyline which is written as a shape with a path, the path coordinates are defined by the coordsize; if it's missing we end up writing hmm's when the reader is probably expecting 1000th of parent. Note groups are still very broken. (e.g. try ./sw/qa/extras/ooxmlexport/data/kde216114-1.odt) This fixes the offsetting seen in part 3 of tdf#138374 Change-Id: I61ba36527ee7716db0bda491df7fd9c7e4652dd1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106330 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-22Fix ESCHER_Prop_pVertices/ESCHER_Prop_pSegmentInfo outputDr. David Alan Gilbert
Commit f1ec5dcfca45e reworked the output code to: OString pathString = aPath.makeStringAndClear(); if ( !aPath.isEmpty() && pathString != "xe" ) Unfortunately the 'AndClear' means that the isEmpty is always true so we never get the path string. This happens on complex polygons; e.g. the orange arrows in tdf#138374 Change-Id: I41e69f2e5eb73b49ff512d2c1ca94423bc0bb202 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106212 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-19tdf#123936 Formatting files in module oox with clang-formatPhilipp Hofer
Change-Id: Ie061189450e0f9004ca503bb28164885812f2acc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105694 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2020-11-18tdf#128213 Fix text camera z rotation import and export.Gülşah Köse
Text3DProperties is added to distinguish shape and text 3D effects. Before there was implementation error about text camera z rotation support. We were using shape effects for text. We already have not support shape 3D rotation but we have text camera z rotation. This patch includes import and export filter changes about text camera z rotation. Change-Id: I623392b82edf4585888d2f15ad91ffb2109d8f96 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106033 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-11-17tdf#138204 Chart OOXML Import: doesn't show placeholderBalazs Varga
for CELLRANGE data label field type. Add CELLRANGE to enum com::sun::star::chart2::DataPointCustomLabelFieldType, like we do at CELLREF, while both of them are not implemented, see commit 790f9abeb1a1167ad5ab84c5fb855b36669c125b (tdf#114821 import complex data labels in bar chart). Regression from commit: 0d2340998415fb4b2f794054c62ef61c83e32155 (tdf#136061 Chart ODF/OOXML: fix missing custom labels) Change-Id: I8e0f4ca9db6e613a190cbda31504a7542fc13a86 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105934 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-17loplugin:stringviewparam check methods tooNoel
not just functions Change-Id: Icca295dd159002b428b73f2c95d40725434f04d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105789 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16replace std::min(std::max()) with std::clampNoel
Change-Id: I76e34e8020d98292e8ffde387542b7029f85a42d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105754 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-16replace std::max(std::min()) with std::clampNoel
Change-Id: I890d19f5e2177294dc1175c90c98b964347f9e85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105751 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-14tdf#138148 Protect aspect ratio of graphic bullets.Gülşah Köse
Change-Id: I166d547cdc01853fd81436c6cdc8d64b0fe817be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105618 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-11-12New loplugin:stringviewparamStephan Bergmann
...to "Find functions that take rtl::O[U]String parameters that can be generalized to take std::[u16]string_view instead." (Which in turn can avoid costly O[U]String constructions, see e.g. loplugin:stringview and subView.) Some of those functions' call sites, passing plain char string literals, needed to be adapted when converting them. Change-Id: I644ab546d7a0ce9e470ab9b3196e3e60d1e812bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105622 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-11-11loplugin:stringviewNoel
Add new methods "subView" to O(U)String to return substring views of the underlying data. Add a clang plugin to warn when replacing existing calls to copy() would be better to use subView(). Change-Id: I03a5732431ce60808946f2ce2c923b22845689ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105420 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-11disable O(U)String::concat for internal codeNoel Grandin
in favour of the more widely used, and better optimised, operator+ Change-Id: I6a1b37e0f3d253af1f7a0892443f59b620efea63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105523 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-11-10tdf#42949 Fix new IWYU warnings in directories [h-r]*Gabor Kelemen
Found with bin/find-unneeded-includes Only removal proposals are dealt with here. Change-Id: I886b6f446293d3b1cfbf4ae05e8dbd7fabab9f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105510 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-11-06tdf#137917 Chart OOXML: fix export of TimeIncrement of Date axisBalazs Varga
Export of Major, Minor interval and baseTimeUnit of date axis as required by the OOXML standard. Change-Id: I09820ad99777874e76176dcd8b64cbe864eaefdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105284 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-11-05tdf#128213 Fix export rotation problem.Gülşah Köse
Export code has written for case that we have normal rotation angle and camera z rotation together. If object has not normal rotation but have camera z rotation, problem occurs. Camera z rotation info is already exist between <scene3d> tags. If we have not <xfrm rot="..."> (normal rotation angle) we shouldn't add camera rotation here. Change-Id: I1819953c937783d30b6e7ced978758300bb56d7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105341 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2020-11-05clean up some temp files after running testsAndras Timar
Change-Id: Ia28e96cf1f6ec476f202e99877fa80e93d691278 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105314 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2020-11-03tdf#128877 DOCX import: fix lost position of image cropped to shapeMiklos Vajna
Regression from commit f4ba484183a1e7b9824f10580d633466c266828f (ooxml import: supprt cropping to shape, 2019-05-13), which changed the type of a cropped-to-shape image from drawing.GraphicObjectShape to drawing.CustomShape. drawing.GraphicObjectShape worked because GraphicImport::lcl_attribute() in writerfilter/ had a check for drawing.GraphicObjectShape and did an explicit setPosition(). Doing the same for bitmap-filled custom shapes would be an option, but it would be ugly: scaling/translation/rotation/mirroring can only work together if they are only applied once, and that should happen in oox/, that's why we already have a mechanism to send the position from writerfilter/ to oox/ for WPS shapes. (<a:xfrm> contains the size, but not the position of the shape, so oox/ in itself could not know the position.) Fix the problem by improving ShapeContextHandler instead the pass the position from writerfilter/ to oox/ for <pic:pic> as well, the same is done for <wps:wsp> already since commit 6c4f737ec88a4f4dc5da8b2295ca5e7de2d4c24f (DOCX drawingML shape import: fix position when CustomShapeGeometry is set, 2013-11-21). Change-Id: I74a60136d0ca8383e58948711b47858823f42437 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105263 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2020-10-30tdf#126133 Chart OOXML import: set default text rotation to 0°Tünde Tóth
for the horizontal axis title, even if the position of the axis is left or right. With this, OOXML charts generated by third-party tools imported without bad rotated title text (as previously in commit fdb6d6ccf45e679ff3e369a876482b6801e08e25 [tdf#137734 Chart OOXML import: fix variable color charts], without bad variable colors). Change-Id: Id348fe037e4f1eb2d7253957224298aa95db5b15 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105012 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-30tdf#137734 Chart OOXML import: fix variable color chartsTünde Tóth
generated by third-party tools by setting VaryColorsByPoint, if the c:varyColors element is missing. Change-Id: Ia5031d26699b8926054b96ba38320ac848b4f228 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104892 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-30tdf#137642 VML shape import: fix alignment from top marginSzabolcs Toth
Use the new define PAGE_PRINT_AREA_TOP at import. Everything else is handled in the previous patches. Change-Id: Ie801ab71a33a657551dbc5bfb63d1491aaa73abd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104923 Tested-by: Jenkins Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu>
2020-10-29tdf#137765 DOCX VML shape import: fix rotation handlingRegényi Balázs
Change-Id: I78c89d4f795a67ff44ae9cef9daf44bf9f1d5c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104807 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-28std::set->o3tl::sorted_vector in ooxNoel Grandin
Change-Id: Id7cdf8c4787d89adc9c343a5417093bee2aa603a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104905 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-28convert some more long -> tools::LongNoel
grepping for stuff in template params this time Change-Id: Ia37bfd85480b3a72c3c465489581d56ad8dde851 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-27tdf#137678 DOCX VML shape import: fix missing horizontal mirroringRegényi Balázs
The MirroredY property is set (in the CustomShapeGeometry property), but it is not supported for the LineShape by UNO, so we have to make the mirroring during importing. Change-Id: Iaa7e3a352598ad12c5e0d40b4fcd43fd197c4df9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104662 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-26tdf#97517 DOCX VML shape import: fix missing vertical mirroringRegényi Balázs
The MirroredX property is set (in the CustomShapeGeometry property), but it is not supported for the LineShape by UNO, so we have to make the mirroring during importing. Change-Id: I65a1f9a115a003c056ae31f4bc217206a0e6dcd8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104656 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-22tdf#103987 Avoid duplication of the Custom Properties during OOXML exportBartosz Kosiorek
The MS Office is case insensitive for Properties. As a result properties names: ContentType and contentType are treated as the same properties. Additionally some Core and Extended File Properties does not exist in LibreOffice standard. To resolve that such properties are stored in LibreOffice Custom File Properties. For example: - category - contentStatus - contentType - identifier - version Unfortunately if user specify Custom Property which differ only with case, there will be conflict. To solve that the properties were renamed to be unique: - OOXMLCorePropertiesCategory - OOXMLCorePropertiesContentStatus - OOXMLCorePropertiesContentType - OOXMLCorePropertiesIdentifier - OOXMLCorePropertiesVersion Additionally if internal property have default value, then the value will not be imported into Custom File Property. During export to OOXML (eg. docx) The values which are already stored in Core or Extended File Properties, are not stored into Custom File Properties to avoid duplication. Change-Id: Ifc2b88ab74aa41d12ba968fff199062ce8dc96ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104384 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de> Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2020-10-22long->tools::Long in hwpfilter..ooxNoel
Change-Id: I9ab8876aac7b2f8b488db6dfa9c6fd0cecd2238b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104626 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-21new tools::Degree10 strong typedefNoel Grandin
partly to flush some use of "long" out the codebase, but also to make it obvious which units are being used for angle values. Change-Id: I1dc22494ca42c4677a63f685d5903f2b89886dc2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104548 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-20tdf#137417 oox smartart: avoid considering rules in vertical linear layoutsMiklos Vajna
Regression from commit 0024c48b4822062995effed7db4f1281196384bb (oox smartart: consider rules when scaling in linear layout, 2020-07-31), the problem is that I only tested horizontal layouts and this is not working for vertical layouts. Just disable the vertical case for now, to avoid unwanted side effects. Change-Id: I31a894157996a2371b8d0ec482ee91dc4d5b053e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104541 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-10-17tdf#133377 OOXML Fix storage of date in Custom PropertiesBartosz Kosiorek
During exporting documents into OOXML formats (docx, xlsx, pptx), if custom properties have Date format, the day and year were switched. This commit fixes that. Change-Id: Id497602eb3354de78bfd52bf5ef61d32aafd957d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104450 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-10-16fix some *printf which are using "%l" ie. long specifiersNoel
which are not portable between Linux and Windows because long is not portable. In preparation for converting long -> tools::Long Change-Id: I8bf1aa1570946ca887a6c83dd5f99c024d437336 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104374 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-13tdf#101122 DOCX custom shape export: remove bad fillRegényi Balázs
of (simplified export) of not filled custom shapes by adding missing fill="none" to a:path. Note: in OpenDocument, unfilled shape path is defined by draw:enhanced-path command "F", see section 19.145 in ODF v1.2. Co-authored-by: Szabolcs Tóth Change-Id: I0be2aada3deb06828216e0441c91c389a673f87c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104205 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-09tdf#99810 DOCX export: fix lost arrow shapeRegényi Balázs
by saving connector shape as shape element wps:wps instead of the invalid wps:cxnSp. Co-author-by: Szabolcs Tóth Change-Id: I0ed435eff8e4284f04f71f8fa8c1dc4cfbee5af9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104032 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-09tdf#133037 OOXML shape import: camera rotation along ZDaniel Arato (NISZ)
Instead of implementing proper OOXML 3D rotation (which would be an entirely new feature if I understand correctly), I merely interpret attribute "rev" of the rotation element a:camera/a:rot as a directive to rotate the entire shape the usual 2D way. That is already implemented and works well. This isn't the same thing Word does, but it might be good enough for now. This is kind of a mock solution, but it will be very easy to revert if it turns out to cause problems. Note: the export worked well previously, too (moreover, reloading the first LO export fixed the import). Change-Id: I2a99c119880bbed1c5b6430c4638cfbd10b7ac06 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103627 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-09tdf#134978 Chart OOXML Import: fix pie chart label custom positionTünde Tóth
Follow-up of commit dff7a46fb46d1fa2a3ad674ee493ae2d59150fe3 (tdf#130032 Chart OOXML Import: fix data label custom position). Change-Id: Iaaf4ae654ac0c1b4896a53be6034e6c027412df0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102981 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-06loplugin:const* make some params and methods constNoel
Change-Id: Idec482c21c270912f9bcaeb980077c1616f67c8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-10-06Drop unused codeMike Kaganski
... a leftover in commit 3187eeab10df77a6c0dd6397be993a68276d7141, copypasted in commit 4f4a668e04bdd68655a0f574027f486cea953857. Change-Id: I7a634ba432cb4736ec85a420b0f77288cd1e0802 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/104004 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2020-10-06tdf#105875 DOCX VML shape import: fix missing rotationRegényi Balázs
Also to avoid bad resizing of the rotated shape, remove obsolete(?) code part from commit 0423a6741fc08a35b123556f9b10219d090ee42a (Import bezier curves from .docx.). Co-authored-by: Szabolcs Toth Change-Id: I77266ba65e558cf9e6dd0e1c37fad85abd038819 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103693 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-06tdf#137000 XLSX shape export: fix uprightSzabolcs Toth
Upright is an XML attribute of xdr:txBody/a:bodyPr. It is set in MSO when in a textbox menu we choose "Do not rotate this element". LO import uses a text rotation opposite shape rotation to create upright text, but when exporting the attribute "upright" we must make sure that the text rotation in bodyPr is 0, not the temporary opposite value. Otherwise MSO rotates the text. Note: integer precision of rotation is enough for interoperability, because it's possible to rotate the shapes only by whole degrees in MSO. Follow-up of commit 8c23be49fb5a9044989532e6e20feb1e3ff64f2b (tdf#106197 XLSX shape import: keep text upright). Co-authored-by: Balázs Regényi Change-Id: I0ffae41f83d3fc3a1fa37f413a8fc9fd8ccd9b6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103094 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-10-06tdf#137023 PPTX import: fix unexpected center alignment of shape text, 2nd tryMiklos Vajna
Regression from commit 10bb02efd8afd42e633e370480104e2575546d8e (tdf#129685 PPTX import: fix unexpected centering of shape text, 2020-09-18), now the problem was that some text should be left aligned, but was centered. Fix the problem by reverting most of the above commit: XML changes, changes to SdImportTest::testTdf113198() (manual testing show that this change is not needed after all) and changes to the TextBodyPropertiesContext ctor in oox/ (but not the testcase itself). Fix tdf#113198 again, this time in Shape::createAndInsert(), which is meant to be closer to what the binary PPT import does. With this, all cases from tdf#104722, tdf#113198, tdf#129685 and tdf#137023 are meant to be handled correctly at the same time. Change-Id: Id785252c26fc407cd74c9cfb55624091798d7773 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103996 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>