summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2021-03-10Reset ShapeProperty priority and handle only crop case.Gülşah Köse1-7/+16
With 2c96bd26ec488d865370fe9d394e7c4e228e05ab we changed the ShapeProperty priority uncessarily. Reset the priority as use FillBitmapName if supported. BlipFillProperties::moFillRect negative GraphicCrop values means stretched. BlipFillProperties::moClipRect positive GraphicCrop values means stretched. We add a control to handle only stretched cases. Change-Id: I2eb1233d0477acf093ada36b4cc29ff34f767037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111479 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112242
2021-03-10Prevent the unnecessary lclCropGraphic call.Gülşah Köse1-9/+10
In case text::GraphicCrop aGraphCrop( 0, 0, 0, 0 ) we don't need to call lclCropGraphic. Change-Id: I9960900f9b5c5b770824c76ffeb9ec9b51cbaef3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111401 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112240
2021-03-05tdf#139940 oox: mark end before growing largest segment backwardsJustin Luth1-1/+3
This fixes a regression in 7.1 (backported to 7.0.1) caused by commit 73993fdb5d4b507694cd0edf80887d19f7e2bf9a for tdf#134183. The largest segment has already been found, so we know where the next segment starts. Now if we grow it backwards, that shouldn't affect where it ends. So flag the end before growing the start, otherwise we would have to recalculate the end again. Change-Id: Iaae401d0438e533c7498be56f48fa153f7d3ff0a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110004 Tested-by: Justin Luth <justin_luth@sil.org> Reviewed-by: Justin Luth <justin_luth@sil.org> (cherry picked from commit 247963e53cce24c199a751c8ffb17f58b3a7d473) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111926 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-03-01tdf#136570 OOXML import: fix height of OLE objectsAttila Bakos (NISZ)1-1/+1
e.g. OLE icons or math formulas by skipping unset border properties. Regression from 636d16efe45a55c1a5a7a451c46fbb8618bf0393 (tdf#135653 OOXML import: fix OLE background color). Change-Id: I64bd68037d063de81fbb302b90d65b77af50a622 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111119 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit ca7855c24af858f52a11a593761ee9e6b9d6ba79) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/111581 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-02-16tdf#134210 Handle greyscale effect on bitmap filled custom shapes.Gülşah Köse1-0/+19
Change-Id: Ia4a0828dad80e32cc0c7fe12227ffca717d62e03 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110572 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110975
2021-02-16tdf#134210 Import crop position of bitmap filled shape.Gülşah Köse2-34/+89
Change-Id: I6a62d68cd0f57e53934851a2f53dae05bf7d3730 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110262 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110973
2021-02-16tdf#134210 Apply mirror property to custom cropped graphic.Gülşah Köse3-4/+38
Change-Id: I5bf2ba8fa432af8b6a560cc60c18bef799834fd0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110039 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110972
2021-02-03tdf#134210 Import support for custom stretch values.Gülşah Köse3-3/+36
Change-Id: I33ced8d667e37b7fb79f4c87b689f45966ac0097 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109658 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 2c96bd26ec488d865370fe9d394e7c4e228e05ab) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109806 Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-01-21tdf#128550 set sub item on the ancestor node.Mark Hung1-8/+49
The target of a animation node may resolved to a subitem. However it only has effect on a iterate container or animate node, not on any other containers. Subitem setting like background and paragraph got ignored, so everything were shown together. The patch find the ancestor node that is iterate container or animate, and set the subitem on it. Change-Id: Iaaa52aed3a34eb2d70b3b318b8336246e17e1e98 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109444 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com> (cherry picked from commit 9b19bf0283b569a5c134de6b5cce1d72d8f37879) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109679 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-01-20oox smartart: composite algo: handle right constraint when left+width is givenMiklos Vajna1-0/+42
The bugdoc had this constraint: <dgm:constr type="l" for="ch" forName="text" refType="r" refFor="ch" refForName="img"/> While img has no "r", it has: <dgm:constr type="w" for="ch" forName="img" refType="w" refFor="ch" refForName="box" fact="0.2"/> <dgm:constr type="l" for="ch" forName="img" refType="h" refFor="ch" refForName="box" fact="0.1"/> Which is enough to fix the x position of the text to not overlap with img. (cherry picked from commit 1359e8c566970fcef860f7ba7f54a07d8e6e0513) Change-Id: I80db290bd1695884ffb7b1eabaffa09462e8883d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109671 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-01-18PPTX export: fix mime type of slide narrationsMiklos Vajna1-0/+5
Import was working already for the audio stream. Change-Id: I43ac6561c4e39decfd99587e489cb2888805bb0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109374 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109447
2021-01-18tdf#61028 OOXML export: fix lost arcTo shapeTünde Tóth1-1/+27
a:custGeom was exported without the a:arcTo element and its attributes. Note: see customshapegeometry.cxx for import of a:arcTo attributes. Change-Id: I611ea9fb6a81d45cfd52a16abbb37071ea0ce7d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108874 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/109446 Tested-by: Jenkins
2021-01-14oox smartart: fix crash in pyra algorithm with a single child shapeMiklos Vajna1-1/+4
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óth1-1/+6
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 Vajna3-13/+42
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 Varga1-0/+9
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 Vajna3-0/+24
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 Vajna4-7/+4
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ázs6-33/+122
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 Varga1-1/+5
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óth5-39/+32
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óth2-2/+16
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 Gilbert1-1/+1
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 Gilbert1-1/+1
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 Hofer25-177/+159
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öse9-24/+126
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 Varga2-0/+5
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 tooNoel2-3/+3
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::clampNoel1-1/+1
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::clampNoel1-1/+1
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öse4-2/+53
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 Bergmann1-4/+4
...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:stringviewNoel4-5/+5
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 Grandin1-1/+1
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 Kelemen10-15/+25
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 Varga1-0/+75
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öse1-1/+1
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 Timar1-0/+1
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 Vajna3-0/+32
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óth1-0/+4
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óth2-2/+2
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 Toth1-0/+4
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ázs1-13/+21
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 Grandin2-9/+14
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::LongNoel2-2/+2
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ázs1-26/+27
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ázs1-6/+29
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 Kosiorek2-37/+140
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..ooxNoel6-8/+9
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 Grandin2-3/+3
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>