summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2020-05-12tdf#130058 Import shadow size.Gülşah Köse5-1/+25
Change-Id: Ie1cee377a33567088fb76ea47f0e6fc51d47f0fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92188 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93419 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Miklos Vajna <vmiklos@collabora.com>
2020-05-11oox: add PPTX import/export for semi-transparent shape textMiklos Vajna7-2/+167
And start a drawingml test suite in oox, so the test and the tested code is close to each other (just like how it's done in chart2/ already). (cherry picked from commit 1e64d9ebaa231caef5fb062009b8f76465e415f4) Conflicts: oox/Module_oox.mk Change-Id: I9a2810691f12604d240e4394e6a5ff4e7f52f1c1
2020-05-07tdf#79082 Export paragraph tab stops to ooxmlSamuel Mehrbrodt2-0/+41
Change-Id: I7d25dc1ab3c960aafc07a3be69b54f5aceef23fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93462 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 2c14bbd5820f854be3a4b1c0f49b9d9afa05b08c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93526 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-05-06tdf#132282: Revert fix for tdf#131554Xisco Fauli1-3/+1
912217285b3058efa54c2336f91fda4efdad6ff0 fixed the root cause of tdf#131554 and 69b83dc2d3014dd9b18402534e15c937dc082464 is no longer needed The unittest still passes Change-Id: I7c723b0c3cc2b56022978bbeb8bf6b3f6f93f1c5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93063 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93073 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-29tdf#119087 Don't treat OOXML strict namespace as custom XMLSamuel Mehrbrodt1-1/+2
Change-Id: I5037ac09f57c92e02e330cbc906da3afbe4c747c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93056 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit 9be543a27ab18427a1c4e66a70cc49b0332b6aa1) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93128 Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-04-28tdf#132174 Chart DOCX import: fix label number formatBalazs Varga1-0/+4
The inner data table of charts has no own cell number format, unlike the MSO embedded XLSX, so we always have to set the link number format to false, if we have an inner data table. Regression from commit: 9c1063ba13028244346528e307d5563d6faf949d (tdf#129173 tdf#129175 Fix number format of data labels) Change-Id: I5e7865cb8c19fc6fae5b68305c7dc302516c0ad4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92695 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: Tünde Tóth <tundeth@gmail.com> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit e0da00d655ecca5986eea3812a8a670c6adbc40f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93007 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-28tdf#78749 DOCX: import VML background imageAttila Bakos1-2/+7
of text boxes. DOCX relationship identifier wasn't handled earlier, only XLSX. Co-developer: Tibor Nagy Change-Id: I72f246e6f69d70d1e203087516ee93a57563f777 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91933 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 9283cd9e13cd3e0dd7d6b831d930128931862a40) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92771 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-04-27tdf#131936 Correctly detect OOXML variant on importSamuel Mehrbrodt2-2/+34
Change-Id: I29a6b0454bf741ce8ad49078597b3412a83dedb9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92278 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> (cherry picked from commit ff93e4977cb1e23f355d248a77e8d0e56bb0f4b9) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92766 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-23tdf#119187 fix: Top-aligned text in PPTX becomes bottom-alignednd1011-44/+81
Change-Id: Ic6c03e512ce3f6e240d86186fb16e24c86942343 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92051 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92725
2020-04-02tdf#131554 placeholder iteration fails to stop when a match is foundnd1011-1/+3
Wrong placeholder is returned due to iteration not stopping when a match is found. It causes a text element position to be incorrectly set. Change-Id: I58be6825cec7a61f48b46418bdf28964c1afe4ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91023 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: Michael Stahl <michael.stahl@cib.de> Tested-by: Jenkins Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91472 Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-01tdf#100751 DOCX VML shape import: fix arrow directionSzabolcs Toth1-13/+6
Flips along both the y- and x-axis weren't imported, resulting wrong direction of arrow and other shapes. Co-Author: Balázs Regényi Change-Id: Iac222ac2a6a6110289969c32b40828b83da0aefd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90646 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga991@gmail.com> (cherry picked from commit cb441c4d0adf698e6af9073c6c3285a66b76871e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91391 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2020-03-25tdf#131553 a null pointer crashes Impressnd1011-5/+8
When constructing a shape object from property EmbeddedObject, it may return null object. Check the returned value first. Change-Id: I9d7a2d9c0c919007ae2a34a0af86dea5639b1bd6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91024 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit df1be683ab935fe5362750360508ba69eb415afb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90959 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-24Fix build with boost < 1.68Rico Tzschichholz1-2/+2
Follow-up fix for 73cac1031131021819a0fbd4d60554196aea230c "tdf130839: Corrects second level left margin in Smartart" Change-Id: Ie194062ba33cf505ad33fbfdc73c2f764b61d0aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90770 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-18tdf#131118 VML import: fix size of non-autosize shapes containing textMiklos Vajna3-3/+21
Regression from commit b92293b3943423324064a8513c2e114d18817179 (tdf#103983 VML import: handle <v:textbox style="mso-fit-shape-to-text:t">, 2020-01-20), the problem was that in case we disable autosize too late, then the size will be already set during adding text to the shape. Do it before adding text, this way adding text won't change the shape size, so it'll be correct at the end of the import. (cherry picked from commit 4ee7ee1c4a515479bc174543af4dbc400035c0ba) Change-Id: I9410fc695c3edfa5089d845864bf237e71c533c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90602 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-03-11tdf#130986 Chart OOXML export: fix number format of custom labelBalazs Varga1-0/+3
Export correct sourceLinked attribute in c:dLbls/c:dLbl/c:numFmt, as in c:dLbls/c:numFmt. Change-Id: I0e52720b3cb2c99550a779763f01ba12f762050d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89638 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/+/89947 Tested-by: Jenkins
2020-03-04tdf#84399 VML import: map <v:shape o:spt="202"> to TextShapeMiklos Vajna5-1/+48
This partially reverts commit 81f9fe3a14f0fc99afbfa7ce3a26a9c7855d0919 (fdo#74401 VML groupshape import: only handle v:rect as TextShape, 2014-03-19), which wanted to map triangles to custom shapes. It was overlooked that we can have not only explicit rectangles and custom shapes, but also <v:shape> elements which have their shape type explicitly set to TextBox. The later is now again handled similar to rectangles. This keeps the triangle case working, but fixes the <v:shape o:spt="202"> case. We need to make this decision while parsing the XML, so some rework is needed to have earlier access to its container (group shape or draw page) and also to its shape type. (cherry picked from commit 198685ded79d64b21023ee85e9a15fa1b32705a0) Conflicts: include/oox/vml/vmlshapecontainer.hxx Change-Id: I33a4b3cd03b0df5d93cffa19e7ea834113df2bdc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89876 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-26tdf#130657 OOXML chart import: fix charts without CrossBetweenBalazs Varga1-1/+3
by using default values for ShiftedCategoryPosition. Regression from commit 111c260ab2883b7906f1a66e222dbf4dc3c58c4f (tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts) Change-Id: Idd48a8343e7d6609b487daf7182e9716f2f5e01f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88709 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 8163f4ad81487ae187d00d3ce86214e520cb8b69) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89517 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-26tdf#130105 Chart OOXML Import: Fix data label positionBalazs Varga2-12/+11
The position of datapoint labels was overwritten with the position of series placement. Do not overwrite datapoint labels placement, if we have explicit datapoint label placement. Regression from commit: 70944a849dc59fa686e3f316a3983dbc8a47017f (tdf#109858: Override default point label placement setting...) Change-Id: Ic27c8a7eb93e8c3776389d1b3d285d120568f024 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87137 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit a4cdd4d1266e77330d4745f369db85ee7dba265c) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87594 Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga991@gmail.com> Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-02-24tdf130839: Corrects second level left margin in SmartartGülşah Köse1-3/+9
Change-Id: Ifec339759427336fd53012e0a8a906d240be9654 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89085 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit eeaa7aba6e7ace8b69d7056645b15be2f996d8fb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89277
2020-02-21tdf#130776 Show the bullet on second level in smartart.Gülşah Köse1-0/+3
Change-Id: Ie35867862d30d490a97dc6f245b50c7311dafe50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88993 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 7865c662a4fdc9dc07f59d6ecd76b9c56d0020ae) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88962
2020-01-28tdf#103983 VML import: handle <v:textbox style="mso-fit-shape-to-text:t">Miklos Vajna1-0/+3
We used to always always set TextAutoGrowHeight to true, only do that when the matching VML attribute is detected, default to false. This helps the exporter, so it writes the correct markup on save of the bugdoc. Also adapt testGroupshapeChildRotation, which in practice tested the automatic height of the shape. The point of "auto" is that it changes as needed, hardcoding that value in a test is not a great idea. Rather test that the height is no longer automatic (there is no explicit markup in the file, and the default is false). (cherry picked from commit b92293b3943423324064a8513c2e114d18817179) Conflicts: sw/qa/extras/ooxmlimport/ooxmlimport.cxx Change-Id: Ie39408b7da53f4923a2ade503e520c704a86bcf4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87120 Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-01-17tdf#128304 export TB_RL writing mode as eaVirtMark Hung2-2/+8
and import eaVirt to TextWritingMode instead of TextPreRotateAngle (-90) degree of CustomShapeGeometry. CJK text in TB_RL writing mode are upright in Writer. It corresponds to eaVirt by its defintion. Change-Id: I2a8bc6676ad6af06b06e023adaa2f201a028d426 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86637 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: xisco <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86960
2020-01-14tdf#129516 DOCX import: fix incorrect z-order with textboxesMiklos Vajna5-0/+131
Commit 3272c1eb5563f3bda2caa24f32b1018372622109 (related tdf#100074: prepare group shapes text input via writerfilter, 2018-10-01) tweaked the oox code, so that later it'll be able to call back to writerfilter to parse group shape text. That makes sense, but it also removed the reset of the group shape context, which means that two subsequent group shapes are now imported as a single group shape with a merged child list. Reset the group shape context again when writerfilter asks for the XShape from oox. If this causes a problem for the above scenario later, then it could be considered to handle this in ShapeContextHandler::endFastElement(). (cherry picked from commit 5960c6f4ca9dd6ab4b4081d3be7253468cd212c4) Change-Id: I14f7f0bab2c66c8430313d5b2daffe3160a58c27 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86746 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@cib.de>
2020-01-10oox: add missing nullptr checksXisco Fauli1-1/+2
See http://crashreport.libreoffice.org/stats/signature/oox::drawingml::chart::PlotAreaConverter::convertFromModel(oox::drawingml::chart::View3DModel%20&) Regression from 11473832b5717cb3222ce72baee885bc9e8e2386 Change-Id: I6cf08582fb384203ca1ce5736b88b85c11ff56da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86483 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit aa499120c4cb3935cd942751859b6d5d3689ea43) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86523 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-01-07tdf#107604 Handle predefined table styles.Gülşah Köse3-138/+919
Handle table styles that we have just style-id and have not corresponding style defination in tableStyle.xml Change-Id: Id06f5508d5eb1330b5bac1634c520c3066c09139 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86068 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86325
2020-01-07tdf#125444 Percentage as custom chart labelTamas Bunth1-0/+2
Support importing ooxml charts with a field of type "PERCENTAGE" as custom label. Change-Id: Ie8931f77e3b6199d98635422d11d776e675f6e5c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86067 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86124 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2020-01-07tdf#129708 speed-up: check if we could create outline instead of creation of itSerge Krot2-2/+2
Change-Id: I0629b4e6ccae4ab9be0142fe39c627f2f9a8f5ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86199 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit 92ccf53b2a8102299ac2c3e2612bb507d3a79c0f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86278
2019-12-17tdf#129143 FILESAVE: PPTX: bullets have a black border after RTNoel Grandin1-1/+3
Revert "no need to use AlphaMask in DrawingML::WriteParagraphNumbering" This reverts commit 126818d293982e578dfb4d977ee0ea64a1cff0de. Change-Id: I7326e7dbf2f00629ca5d08cff680e68c679f321a Reviewed-on: https://gerrit.libreoffice.org/85258 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 5c54778aad677d6bb6e6687f0f43dffad1aefa1e) Reviewed-on: https://gerrit.libreoffice.org/85269 Tested-by: Xisco Faulí <xiscofauli@libreoffice.org> Tested-by: Jenkins Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-12-14tdf#121991 Chart OOXML import: fix deleted legend entriesTünde Tóth7-3/+112
The legend showed deleted legend entries too. Change-Id: I1e205cdfc4262c73d2bb189237d6bc316781931d Reviewed-on: https://gerrit.libreoffice.org/84516 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit cea1ae2a4f7abdcfc3874d714bdafef801910c1c) Reviewed-on: https://gerrit.libreoffice.org/85024 Tested-by: Jenkins Reviewed-by: Tünde Tóth <tundeth@gmail.com>
2019-12-06tdf#127237 fix table background color in Impress importnd1014-0/+11
When the background color is set at the table level in PPTX, instead of at cell level, the background color fails to show up in Impress. Change-Id: I2838e5b56e4a2414494ee99c0f8975b7256ac6dc Reviewed-on: https://gerrit.libreoffice.org/78377 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 4c2254cbebca53c34fa48a1dd90cebe434f24274) Reviewed-on: https://gerrit.libreoffice.org/84644 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-12-03tdf#128429 VML import: let mso-layout-flow-alt:bottom-to-top imply verticalMiklos Vajna5-6/+145
Normally layout flow is set to vertical to denote TBRL, and then optionally there is a layout flow alt to denote BTLR, but the bugdoc shows that the first may be missing. So map to BTLR even in case only the alt layout flow is found in the file. (cherry picked from commit ca7004569b39721c3e7247551a43d544fd3204fe) Conflicts: oox/Module_oox.mk Change-Id: I06fce738fca9aedc0de90ccebda3a24e99425326 Reviewed-on: https://gerrit.libreoffice.org/84317 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-28tdf#113198 set default shape paragraph alignment..Tamas Bunth1-1/+1
to center when importing oox document. Using MS Office, the default aligment of a (text) paragraph inside a shape is centered. Change-Id: Id9bcaaab109df65f4124f733b2cfee438e82b79b Reviewed-on: https://gerrit.libreoffice.org/83193 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> (cherry picked from commit 89f0af144c18efafe2573801641689a1432c0cae) Reviewed-on: https://gerrit.libreoffice.org/83971 Reviewed-by: Xisco Faulí <xiscofauli@libreoffice.org>
2019-11-28tdf#127090 Export textbox rotation attribute.Gülşah Köse1-5/+8
In case "rotated textbox in a custom shape" handle draw:text-rotate-angle attribute while exporting ODP to PPTX. Change-Id: I13b99da586af5e77e51a7cc93a751ab21bed7170 Reviewed-on: https://gerrit.libreoffice.org/83888 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 9b2f5d27cf0a0adcced813e18108d5878061d1ee) Reviewed-on: https://gerrit.libreoffice.org/83950
2019-11-22tdf#128952 Set the position of shape for 180 deg.Gülşah Köse1-1/+1
If the rotation value is 180, 540, 900... degree with mirror pShape->GetRotateAngle() returns 0. In that control 0 means no rotation but that is not true. For that cases (180, 540, 900) after the angle conversition GetRotateAngle() returns 0. We should recalculate the position for 0 too. Change-Id: I14e981235b2d6cd8382d4c9e151bccd2e73a3fd9 Reviewed-on: https://gerrit.libreoffice.org/83468 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit aca2e4d270f472b2cbdb9084a55f1855529ea705) Reviewed-on: https://gerrit.libreoffice.org/83534 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-11-22tdf#123774 OOXML chart export: keep digits of percentages of data points Balazs Varga1-2/+12
by exporting PercentageNumberFormat, checking the "Label" format directly and taking the respective number format based on that. Note: also fix the "LinkNumberFormatToSource" property. If we create a pie chart with data labels and set the "Show value as number" or "Show value as percentage" and check on/off "Source format", this move is not set the property in the XPropertySet. Because of this, it fixes also the export of correct value of "link-data-style-to-source" property into ODS files. But this patch doesn't fix the export of old ODS files to OOXML, because they contain wrong (always true) "link-data-style-to-source" value. Change-Id: I4098a245dec5bf35cde20c9ccb79aca726230118 Reviewed-on: https://gerrit.libreoffice.org/82703 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org> (cherry picked from commit a59eb39c6ec01ae2a9d8ddbb61a9c27f527c9caa) Reviewed-on: https://gerrit.libreoffice.org/83410
2019-11-20tdf#128820: use wps namespace for simple text shapesMike Kaganski1-17/+18
Without that, simple text shapes inside groups were written in <pic:wsp> elements, with many child elements also having pic:: prefix. Change-Id: I114cf3499e03aa5ca042211d7b134aaf5b0e7fbf Reviewed-on: https://gerrit.libreoffice.org/82980 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Also consider saved exceptions when terminating parse As with previous commit 18ae77a065cb8ae6940d4067f6ab7e99a3f74047, this will start showing parse errors on invalid files which previously just opened without warnings, silently losing the invalid stream part. Any bug bisected to this commit is not a regression from this commit! The real problem was already before, and was just disclosed by this (which is the actual goal). Also simplify unit test data for tdf#128820, which will now be enough after the change. A unit test (testN779627) revealed unexpected throws when parsing; this was fixed. Change-Id: I5a21b9001874ec6e3b8273c10043ef930bf1cc82 Reviewed-on: https://gerrit.libreoffice.org/82981 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> tdf#128820: improve unit test to not depend on opening bad file failing ... also test exported XML directly Change-Id: I50237593dd111e7c7974452769c8d49c22012713 Reviewed-on: https://gerrit.libreoffice.org/83005 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Fix UBSan build after 9fdf8c0a5cc036ea9bd1e11dd8f2c1a6e601fae2 The said commit simplified a testdoc to testTdf128820, using a smallest possible SVG in it. This seems to produce the smallest possible PNG of size 8, which is passed into GraphicDescriptor::ImpDetectPNG. There its size is read into nTemp32 past the end of the file without checks, which keeps last value of the variable (which was the magic number 0x0d0a1a0a), which is then saved into the descriptor. Then that value is used in ImpGraphic::ImplGetSizePixel, and later multiplying it in lclConvertScreenPixelToHmm causes UB. Fix by checking all the reads in GraphicDescriptor::ImpDetectPNG. Change-Id: Ib4740fac2b87fbef57d5150151129b9852f3ecb8 Reviewed-on: https://gerrit.libreoffice.org/83119 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/83296
2019-11-17tdf128684: Rotate text in not preset custom shapeTamas Bunth1-0/+2
The TextPreRotateAngle property should be set in case of a not preset custom shape as well during ooxml import. Also add unit test for testing the TextPreRotateAngle property. Change-Id: Ib5b822286f8a78fe8398bf7e2014a36d7e0a24d5 Reviewed-on: https://gerrit.libreoffice.org/82643 Tested-by: Jenkins Reviewed-by: Tamás Bunth <btomi96@gmail.com> (cherry picked from commit 742f59eaa38a3f13b6110573b1428de45c55b035) Reviewed-on: https://gerrit.libreoffice.org/83020 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2019-11-14tdf#117658 PPTX import: fix duplicated math object handlingMiklos Vajna11-18/+47
We used to recurse into both arms of <mc:AlternateContent>: while the intention is that an importer either reads <mc:Choice> or <mc:Fallback>. Fix this by converting PPTShapeGroupContext to be a FragmentHandler2, this way FragmentHandler2::prepareMceContext() is invoked, which knows how to do this correctly. This requires declaring "a14" as a supported namespace, e.g. SdOOXMLExportTest2::testMathObject() would fail without it. This also requires keeping "a14" unsupported in the Calc case, e.g. ScFiltersTest::testControlImport() would fail without it. Finally the "Convert this to FragmentHandler2" TODO in SlideFragmentHandler::onCreateContext() from 2011 can be removed with this. Change-Id: I883237902c71cb515e810a8e34443c9eeaca48b0 Reviewed-on: https://gerrit.libreoffice.org/82623 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 4038d6c393c3cf6330671124ba69cdba98b24960) Reviewed-on: https://gerrit.libreoffice.org/82633 Tested-by: Miklos Vajna <vmiklos@collabora.com>
2019-11-13tdf#128732 Chart OOXML import: fix rounding error of color transparencyBalazs Varga1-1/+1
Change-Id: I52efb541d62a9536c2eb5f99453dc2cb594e6fe4 Reviewed-on: https://gerrit.libreoffice.org/82500 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-13tdf#128619 Chart OOXML export: fix gradient positionBalazs Varga1-1/+1
Export the gradient border value as gradient stop position of the first color at LINEAR GradientStyle. Change-Id: I1a2b986a004fecbf68050c6bf95be549684fea70 Reviewed-on: https://gerrit.libreoffice.org/82446 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-12tdf#128627 tdf#128634 Fix OOXML import of CrossBetweenBalazs Varga1-1/+8
Set default 'midCat' value during the import, for Radar charts, because MSO created them with default 'midCat', but exported a 'between' value. Set default 'between' value during the import, for 3D Bar and Stock charts, because sometimes the OOXML file can contain a wrong CrossBetween value, but MSO import them with default values. tdf#128627 regression from commit: 830e539547c463b932ce643517f880789185032d (tdf#127393 OOXML chart import: fix X axis position setting "CrossBetween") tdf#128634 regression from commit: 111c260ab2883b7906f1a66e222dbf4dc3c58c4f (tdf#127777 OOXML chart export: fix "CrossBetween" for not imported charts) Change-Id: Ie9763197b79c3a661e66043da7b89b4f0f00ba33 Reviewed-on: https://gerrit.libreoffice.org/82211 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-11Related: tdf#117658 PPTX import: ignore math text outside <m:t>Miklos Vajna5-10/+122
This way a pretty-printed bug document doesn't assert on import with: soffice.bin: /home/vmiklos/git/libreoffice/master/oox/source/mathml/importutils.cxx:335: void oox::formulaimport::XmlStreamBuilder::appendCharacters(const rtl::OUString&): Assertion `!tags.empty()' failed. Change-Id: Icf8b11f3c56076b1ad2dddad196260ee87540020 Reviewed-on: https://gerrit.libreoffice.org/82437 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2019-11-10tdf#106638 oox: reset font settings if necessary.Mark Hung1-50/+45
Direct formatting was used when symbols were inserted. However when there wasn't any direct formatting of Latin fonts in the following runs, it didn't know how to reset the font. Get the default font with XPropertyState and try to reset to the default value if symbol fonts are set. Change-Id: I83c9317ba61a96375128f1cc3ed478d958ddaa5c Reviewed-on: https://gerrit.libreoffice.org/81956 Tested-by: Jenkins Reviewed-by: Mark Hung <marklh9@gmail.com>
2019-11-08tdf#128618 OOXML chart export: deleted automatic title returns on saveBalazs Varga1-22/+25
If there is no main title and/or subtitle, write out autoTitleDeleted with a true value. Regression from the commit 96a29c12a9d8734c9d2a812f38fc6654b5df9c48 (tdf#101322 Chart OOXML Export: fix missing subtitle) Change-Id: I0094014fc4da4cb66d31e4249f916452d00758c7 Reviewed-on: https://gerrit.libreoffice.org/82142 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-08tdf#128633 Chart OOXML Export: Fix position of bar in chartsBalazs Varga1-1/+1
Fix export of c:crossBetween tag if the category axis is deleted. Regression from commit: e0b0502516a10181bbd1737b93b38b2bba4c98e8 (tdf#128016 Chart OOXML Import: fix duplicated category labels) Change-Id: I46ab45f3ba4f3d0fdde3ddf017a7f512b6e2e403 Reviewed-on: https://gerrit.libreoffice.org/82194 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-06loplugin:indentation find broken if statementsNoel Grandin1-1/+1
so I don't read the "then" block as being a sequential statements Change-Id: Ib2004acd3518bd4ebd2246f02a26c2c0a8bbab4c Reviewed-on: https://gerrit.libreoffice.org/82069 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-05tdf#108065 tdf#128609 OOXML chart export: fix transparent color gradientBalazs Varga2-22/+53
Linear and axial color gradients keep their solid or gradient transparencies. Change-Id: I37dfe016864bded49c767cea5c8c865455281de0 Reviewed-on: https://gerrit.libreoffice.org/81308 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2019-11-03make some classes module-privateNoel Grandin1-2/+2
improve the script, but it still generates some false positives Change-Id: If8ee1cba8c04ac0be11f73220149e6de15f24f44 Reviewed-on: https://gerrit.libreoffice.org/81929 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03size some stringbuffer to prevent re-allocNoel Grandin3-9/+7
I started with 32 and kept doubling the size until the site did not need re-alloc, but clamped it at 512. Change-Id: I55fe36b31cd3d40f86e5729337a927cf920f2af6 Reviewed-on: https://gerrit.libreoffice.org/81960 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-11-03find symbols that can be privateNoel Grandin2-5/+2
update the script and make private standalone functions Change-Id: Icb26ce258107700c90f89ad4e0d3329d075a2eb1 Reviewed-on: https://gerrit.libreoffice.org/81879 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>