summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2021-12-09tdf#145162 PPTX export: fix extra bullet regressionAttila Bakos (NISZ)
Placeholders have bullet by default in MSO, so write <a:buNone/> for paragraphs where numbering/bullet is disabled to avoid extra bullets in Impress. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e (tdf#111903 tdf#137152 PPTX export: fix placeholders). Change-Id: Ib4c563cba475d61bc475ca05623e7c7b20fded30 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126528 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126525 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-03tdf#140912 Better handling of the picture placeholders.gulsahkose
To see icon and placeholder text at the center of picture placeholder shape, we set the TextContourFrame and GraphicCrop properties. Change-Id: I49e3d08c9020e593232c60c97af3f45fb620075e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126165 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 7b3be7f6f3d800e2ad86f5a043e6e9b21ed4409f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126138
2021-11-23tdf#138223 oox: don't set highlight color if it is transparentJustin Luth
Probably when this was first implemented in 6.4, it should have set a transparency threshold of when to accept the color as the background (perhaps at 50%). But since this has already been running for a while, I only cancel it if it is fully transparent. No existing unit tests matched this scenario. I'm not making a unit test because the color really ought to be set - it should just be transparent. LO doesn't seem to have a character highlight transparency capability, so this needs to be emulated. Change-Id: I7b295894e529f8345cadc9b30bc43598a9a02e2b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125670 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit 283586c89a0542efb2d57a36ee3aad7cc5153ed5) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125465 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-16Avoid some -Werror,-Wdeprecated-copy-with-user-provided-dtorStephan Bergmann
...after e6968f0485cfb2f6c941d11c438386e14a47095d "PPTX import: fix handling of theme overrides in the chart import" introduced a use of std::make_shared<Theme> Change-Id: I5f6384b81e02034b6b2fdf3a3bad0148de4eb584 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125228 Tested-by: Tor Lillqvist <tml@collabora.com> Reviewed-by: Tor Lillqvist <tml@collabora.com> (cherry picked from commit 829ea811e19fead7ad35049342136b592077674b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125303 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-11-16tdf#127512: PPTX import: fix handling of theme overrides in the chart importMiklos Vajna
A problem since commit 08818d8a45e034ad825c7fafbb76766f106f1d1d (bnc#882383: Do not ignore themeOverride for charts in .pptx, 2014-07-04), an override for one chart should not affect later drawingML objects. Change-Id: I22b70c8c82e8e8520179c628f566d7f6663c887f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125218 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/+/125223
2021-10-19tdf#125582 use TextVerticalAlign_BOTTOM for textCircleRegina Henschel
PowerPoint aligns the bottom of the text to the path for prstTxWarp 'textCircle'. That preset type is mapped to 'fontwork-circle-curve' on import with additional attribute ScaleX=true. Currently the property TextVerticalAlign is only evaluated in case ScaleX=true. Therefore I have written the condition similar as the already existing with 'fontwork-arch-up-curve'. If it will be necessary later, all those conditions can be changed to use rPresetType instead of rClass. The rendering is slightly different compared to PowerPoint, because descenders and paragraphs line-spacing are handled differently. The rendering has still the problem, that in PowerPoint the letters are placed without gap, but in LO they have additional distances from each other. The needed ODF attribute draw:text-path-mode is not yet implemented in LO. Its value 'normal' would be needed here. Change-Id: I1f03d4845312885eff9ee8dbe1d51ddd437ed8e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123726 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 9142d19ddc751e05041471aa1bbeca2f06729522) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123775 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2021-09-10tdf#126426: support for hyperlinks in TextParagraphContextVasily Melenchuk
Usually hyperlinks are processed by TextBodyContext, but for grouped shape we accidentaly gone into TextParagraphContext It has almost all possibilities to process txbxContent, but not hyperlinks. Additionally some hyperlink char attributes (color and underline) can expand to follow up ordinal text. Additional small hack applied to avoid this. Unfortunately this is not a final solution: such document fails roundtrip and hyperlinks are lost after saving to DOCX. Conflicts: oox/source/drawingml/textbodycontext.cxx Change-Id: Ie954f53696bd872cb1f59cb586fb55f6cd7c73bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121172 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121904
2021-08-31tdf#142645 PPTX import: convert "ctrTitle" text to slide nameTibor Nagy
(i.e. centered title) similar to <p:ph type="title"/>. See commit 7eb0e52527e729a21973e70d5be8e0a6779ec748 "tdf#142648 PPTX: import long slide names to avoid broken link export", commit 253bee65bc24d999c3629a4d503d0fa01b355cfc "tdf#142646 PPTX import: count repeating slide names" etc. Change-Id: I5f25f04f23981ce2ff64dc792fe8464682d749a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121295 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit e5cfda76aefd6996813f461198816be24cd6ad43) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121289 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-24tdf#142351 chart ooxml import: fix category axis cross positionBalazs Varga
Set PROP_CrossoverPosition value regardless of the mrModel.mbAuto value, which is a different thing. This element specifies that this axis is a date or text axis based on the data that is used for the axis labels, not a specific choice. Change-Id: Ifa291aac2f4bb3981d968de3489b23f1af485104 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120592 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 e701732725dd641741f39020d7dc965bc4db765d) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120875 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-20tdf#142648 PPTX: import long slide names to avoid broken link exportTibor Nagy
PPTX import renames the slides using their short title text. Apply this for the titles with 64 or more characters, too, abbreviating the title text instead of using the default slide name "page1", "page2" etc., because the default slide names result broken hyperlinks during the PPTX export. To test the fix manually, create a new hyperlink using text selection and Insert Hyperlink (Ctrl-K), clicking on Target in Document button on the Document pane, and selecting a slide name. Note: the problem still exists for the duplicated or newly inserted slides, which get default slide names. Change-Id: Iec1fab5a2ee862353766ed7e13b1501b3a325d0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118548 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/+/120750 Tested-by: Jenkins
2021-08-17tdf#143860 non-primitive needs custGeom not prstGeomRegina Henschel
Error was, that for a custom shape with type 'non-primitive' method DMLPresetShapeExporter::WriteShape() was called. For such shapes the method GetOOXMLPresetGeometry() returns preset type 'rect' and in case the shape had no handles, that preset geometry was written. In my solution I exclude shapes of type 'non-primitive' from using DMLPresetShapeExporter, because such shapes never belong to a OOXML preset shape. Change-Id: I714f69c98fe15c2b7e70dc0a474a7f85ad757034 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120511 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120547
2021-08-09tdf#142915 PPTX import: support for presentation's timing attributeTibor Nagy
See Slide Show->Slide Show Settings...->Change slides manually, which is disabled by default. Now <p:showPr useTimings="false"> is imported correctly, i.e. with enabled "Change slides manually". Note: it seems, com::sun::star::presentation::IsAutomatic UNO attribute has got a bad name and documentation: if it's value is TRUE, "Change slides manually" is enabled, and vice versa. Check with the following Basic code: ' show presentation-level automatic transition (IsAutomatic = False) print ThisComponent.getPresentation().IsAutomatic ' show slide-level automatic transition (Change = 1) Dim oDrawPages as Object, oDrawPage as Object oDrawPages = ThisComponent.getDrawPages() oDrawPage = oDrawPages.getByIndex(0) print oDrawPage.Change Change-Id: Ie4a687a29077cad89f11e77b856c28a1fe09376b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119321 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f8ddaaf0f5e1fb61e0d4404ea28757bc652ae4be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120237 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-08-09tdf#132696 PPTX import: fix missing SmartArt when it's part of a group shapeMiklos Vajna
Regression from commit e9986153e44d7ec6ca9c5f1373971de74dcbacda (PPTX import: import SmartArt drawing into single GroupShape, 2019-03-14), the problem was that oox::ppt::PPTShape::addShape() and oox::drawingml::Shape::addShape() were not in sync. PPTShape unconditionally maps SmartArt to shapes, while the shared Shape class defaults to converting it to a non-editable metafile. The above commit changed the handling of in-groupshape SmartArts to go via Shape::addShape() instead of PPTShape::addShape(), which exposed the underlying problem that the convert-to-metafile mechanism is currently only working in the DOCX case. Fix the problem by again ignoring the convert-to-metafile flag for the PPTX import case. This also exposed a previously hidden problem: make -C oox -sr CppunitTest_oox_drawingml CPPUNIT_TEST_NAME="testGroupShapeSmartArt testTdf131082" started to make testTdf131082 fail. The tweak in Shape::createAndInsert() fixes the testcase failure, but likely there is a deeper problem there, unrelated to the regression. Change-Id: I4e1e9645eaa266d0d7560767c3c59ba9549ccdb4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120122 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 030cdbc7f8782eb196f09661bc2f116d790de9be) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120145 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-07-13tdf#141786 correct position of child elements in groupRegina Henschel
...in export to docx. Rotated child elements need a correction to the position values, because LO uses left/top of snap rectangle as position, but Word uses left/top of unrotated shape. For the group itself it is done in DocxSdrExport::startDMLAnchorInline. But child elements' position is exported in DrawingML::WriteShapeTransformation. And there this correction was missing. Position is relative to anchor in Writer and relative to group in Word. The adaption is contained in WriteShapeTransformation. But PolyPolygon and Connector have no explicit rotation and therefore they do not use DrawingML::WriteShapeTransformation but call directly DrawingML::WriteTransformation. So they missed this adaption. I have added the adapation directly to these shapes. Unittest testDmlTextshapeB in sw-ooxmlexport6: I have adapted the values. The position of the connectors relative to the group is better now. You see this, if you compare it with a screenshot of the original file in Word. The handles of the connectors are still wrong and the whole group is still shifted. The patch does not fix the wrong position of rotated legacy ovals, because that error exists independent of groups. Change-Id: Iaf843dcf04bac596427dd35ccfa6cd20e3a4cdc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118748 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118826
2021-07-08tdf#142235 PPTX export: fix styles with placeholdersAttila Bakos (NISZ)
inserting icons and alignment. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e (tdf#111903 tdf#137152 PPTX export: fix placeholders). Note: in the unit test document, check fixed vertical position of the second text boxes of Slide 2–4. Change-Id: I3c649db69f94a2e9f49ae7aa11d9cd9d9f6d80d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116828 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/+/118446 Tested-by: Jenkins
2021-07-02tdf#143028 DOCX: fix corrupt export of shape "bracePair" etc.Attila Bakos (NISZ)
Regression from commit 63cd67e5e18f01aca303131e148c80398a181a41 (tdf#92525 tdf#142398: fix export of simple custom shapes) Missing property in the shape export property list caused an exception. The return value false led to writing the shape transformation again, resulting a corrupt DOCX file. Optional values have been introduced and if one of the required value is unset, writing of the transformation happens only once. Thanks to Regina Henschel for reporting the problem. (cherry-picked from commit 99a459dfdfd9f82ed3506708e131dd52a1a62384 "tdf#143028 DOCX: fix corrupt export of shape "bracePair" etc." and commit e190196f255b7d0147d61fd967a2b2a61a932185 "tdf#143028 DOCX export: fix RangeY regression of preset shapes") Change-Id: Ifcb81a5df9dc568f8f21c39e072d58009ed04237 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118232 Tested-by: Jenkins Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-29tdf#121715 XLSX: support custom first page header/footerDaniel Arato (NISZ)
Add XLSX import/export support for a different header or footer (activated separately) on the first page. Print preview is also extended to support this. Note: only ODS export is supported, yet. Follow-up commits are going to add ODS import and UI support. Change-Id: Icd3a40131bdbcd5d5a42f98c86a71345a5745051 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116842 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 19fa853ce12136b5c14e0c5a0aa906c296b75388) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118067 Tested-by: Jenkins
2021-06-29tdf#142913 PPTX: slideshow setting “Start from” not importedTibor Nagy
Note: see Slide Show->Slide Show Settings...->Range->From: on the UI, or press Shift-F5 after loading the unit test document sd/qa/unit/data/pptx/tdf142913.pptx. Change-Id: I2e10a4353c26600bf405475cb89990413c81dc1e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117705 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 3d55149dcf19cffefcc19c16a3abbe8851453c5e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118062 Tested-by: Jenkins
2021-06-28tdf#142646 PPTX import: count repeating slide namesTibor Nagy
instead of using the default slide name "Slide n". PPTX slides are named after their titles. Now repeating titles got a number instead of using the default slide name "Slide n". E.g. "Title", "Title", "Title" will be slide names "Title", "Title (2)", Title (3)", and not "Title", "Slide 2", "Slide 3". Follow-up to commit I98511c3c9a59598ea113e7387db5202d7f8a7cd4 "tdf#103347: PTX import: fix duplicated slide name" Change-Id: I449d6f7d7599291b3dae7df65ad6ff86a4269fb8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117317 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 253bee65bc24d999c3629a4d503d0fa01b355cfc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117972 Tested-by: Jenkins
2021-06-24tdf#92525 tdf#142398: fix export of simple custom shapesAttila Bakos (NISZ)
Most of the custom shapes were exported with DrawingML custom geometry instead of DOCX preset shapes, losing their preset type, adjust handles and text position. Add a preset exporter class to handle all possible preset shapes later, and fix the export of the following shapes now: "bevel", "blockArc", "bracePair", "bracketPair", "hexagon", "octagon", "parallelogram", "plus", "roundRect" and "triangle". tdf#92525: keep text position in triangles with different adjustments, too. tdf#142398: part 1: export simple shapes as preset shapes. Change-Id: I6aee74f7670bea8c1fe5909cbf307778ea728669 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115606 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 63cd67e5e18f01aca303131e148c80398a181a41) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117715 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-21tdf#142590 PPTX import: fix custom slide show use as defaultTibor Nagy
If the PPTX file contains a custom slideshow, which set by default and opening in Impress, this setting wasn't imported. See also commit 312334f8488a668e9b5302959b60292ce151e4fc "tdf#47365 PPTX export: support loop attribute" and commit a4b66458a7b8da2f5580014813e5dabe3fa670b6 "tdf#125071 PPTX: fix missing custom slide show export". Change-Id: I9c2b3773f6883ee795f119df5b8534fcdfa6618f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117172 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 8bf44b9cdceb7926fe52ef0bd4a38af24e7c700a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117562 Tested-by: Jenkins
2021-06-21tdf#137000: clean-up "XML shape export: fix upright"Szabolcs Toth
See commit ff5ca4e5fc6a9fb24b0eb6eb629210b024473f67 "tdf#137000 XLSX shape export: fix upright". Change-Id: Ie050da66f1eef4fc325b2acfd0a97d299c268153 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117135 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 20d2c2fe481eb66f518c554f8588ec87e0ee125a) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117561 Tested-by: Jenkins
2021-06-21fix loading calc files with embedded form macrosNoel Grandin
GraphicHelper was trying to use the current frame/ window to convert values, but during initial load there is no current window. Change-Id: I8a79501df1d2e83a13d3cfb64ae8e66152c60561 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117470 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 8fa14ac550ddc43790b65858f18d23f522aff1f2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117553
2021-06-18tdf#127864 - Export custom document properties using utf8 text encodingAndreas Heinisch
Change-Id: Iaca1f9251e87ec199b55888c1ab6421a654d1f9f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117071 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de> (cherry picked from commit d50501d1b4c015232c31c75a16b96143d43f7a3f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117416 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-16tdf#142361 export: prevent shadow to rotate with shapeRegina Henschel
OOXML has the feature to rotate a shadow together with the shape. The associated attribute rotWithShape has the default value 'true'. So if this attribute is missing, MS Office shows the shadow rotated. As LibreOffice never rotates a shadow, we need to write this attribute always. Because LibreOffice cannot rotate shadows, the error is only visible in MS Office. Here the attribute is added for the case of documents, which have no InteropGrabBag or no effects in it. When a shadow is generated in MS Office, MSO adds the attribute with value 'false' (0) to the file. MS Office has no UI to set this attribute. Problem is with cases, where the document comes from MS Office, has effects in InteropGrabBag, but the shadow was set in LibreOffice. To add the attribute in such cases too, bug tdf#142858 has to be fixed. Change-Id: I5f1df416bca8ea15a305242afb140d852cfd84c0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117206 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 58eeec036c3780188feccb0e1a752cfdee90a49b) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117225 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-06-10tdf#140623 Chart OOXML import: set text overlap to falseTünde Tóth
of category axis label unless the rotation is 0 in xml. Regression from commit: 21620f9d2f50e66dffc45a5afb539edb8d54434c (tdf#138194 Chart OOXML import: set text break to true) Change-Id: I18db7483f49c84a83760200037f8858a3b471994 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116575 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-10tdf#142713 OOXML: export secondary axis of all chart typesBalazs Varga
where the secondary axis is supported by the chart model and OOXML. Change-Id: Ifbcc905139487965510063aa87991ce6f8df73ee Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116809 Tested-by: Jenkins Reviewed-by: Balazs Varga <varga.balazs3@nisz.hu>
2021-06-10loplugin:unusedmethodsNoel Grandin
Change-Id: I2890e29b3e18cdf7822bf93ee7c17cd8221497a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-06-09Simplify Sequences initializations (i*->p*)Julien Nabet
Change-Id: I6bf0eaa2233de2487d90a2f9ae7de263b4ddf1bd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116865 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-08tdf#47365 PPTX export: support loop attributeTibor Nagy
Follow-up to commit ad2809b4b6dc4837b0c1cadd89a14a234d995fb2 "tdf#47365: import support for PPTX presentation's loop attribute". Change-Id: I7f75acc2bbd6301384883691d5ef4069b1757a05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116560 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-06-08editengine-columns: PPTX support (tdf#118458)Mike Kaganski
The unit tests that used to check the workaround using tables to emulate columns (implemented in tdf#120028) are changed to test import of the columns. This reverts some commits related to the mentioned workaround, namely aef569ed83a3ccc02639e5b2a1c7cc131ba262fc, c50ae6a282ed83762bf634fed5c91033eb305c88, 7b64bd90637a6722438bf873b1ded74ab3424c46, 33696b2820ce3c8b21b753d2c2bf92345ecb9276, 99dff69b561a8fe2d9437e6aa67a9581a6666f41. Change-Id: I97693ad4a981780e822070938992f274920df5a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116738 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-06Fix and unify the two methods that get scaled text sizeMike Kaganski
GetTextFitToSizeScale and SdrTextObj::GetFontScaleY both didn't initialize outliners properly, and thus returned wrong results. Change-Id: I6fe63c51ed838a0d0fafdfa03597cac97ce29831 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116765 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-06-05Potentially uninitialized local variable 'aEvpMd' usedJulien Nabet
Seen on Win10: cd C:/cygwin/home/serva/lode/dev/core/oox && C:/cygwin/home/serva/lode/opt/bin/make -j 1 -rs build [build DEP] LNK:Library/ooxlo.dll [build CXX] oox/source/crypto/CryptTools.cxx C:\cygwin\home\serva\lode\dev\core\oox\source\crypto\CryptTools.cxx(122) : error C2220: the following warning is treated as an error C:\cygwin\home\serva\lode\dev\core\oox\source\crypto\CryptTools.cxx(122) : warning C4701: potentially uninitialized local variable 'aEvpMd' used C:\cygwin\home\serva\lode\dev\core\oox\source\crypto\CryptTools.cxx(122) : warning C4703: potentially uninitialized local pointer variable 'aEvpMd' used make[1]: *** [C:/cygwin/home/serva/lode/dev/core/solenv/gbuild/LinkTarget.mk:301: C:/cygwin/home/serva/lode/dev/core/workdir/CxxObject/oox/source/crypto/CryptTools.o] Error 2 make: *** [Makefile:122: oox.build] Error 2 Change-Id: Id9409c95aa3edf866671ef8418e7ade3cbc1e718 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116740 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2021-06-04test: introduce XmlTestTools::registerOOXMLNamespaces() to reduce copy&pasteMiklos Vajna
sc/ could potentially benefit from this as well, that's not yet done here. Change-Id: I03d0b4afa21a02c74d34aab6e03ab53991df29dd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116679 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-05-26tdf137314 Add margin to CppunitTest assertionsJan-Marek Glogowski
The test had multiple failures on Windows with: oox/qa/unit/vml.cxx(79) : error : Assertion Test name: tdf137314_vml_rotation_unit_fd::TestBody equality assertion failed - Expected: 1490 - Actual : 1491 So add a 1px margin to all value checks. Change-Id: I70298db253299a57cc37eed482c0816d902fbeab Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116192 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-05-26tdf#96061 Unset the highlight propertyGülşah Köse
When we have highlight property on specific part of the text the following texts were highligthing. To prevent this we unset the highlight property when we have not highlight property anymore. Change-Id: I802cde1c784afe47201a9ba4f41827dd0c705035 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115800 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2021-05-25tdf#131390 PPTX: fix custom slide show is not imported.Tibor Nagy
Change-Id: I62e1bfaae23d1b18e71a2c16651d01144a26907c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115475 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-25tdf#141644 OOXML shape import: fix upright text rotate angleSzabolcs Toth
Text rotate angle was not imported correctly with "upright" setting, e.g. resulting horizontal text in shapes of XLSX documents instead of vertical. Change-Id: I2ad9ba3465278220e64123c4400acff4125310d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115777 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-25tdf#137314 apply conversion from vml angle unit 'fd'Regina Henschel
Fixes wrong rotation in tdf#109129 and tdf#142432 too, but they have further, unrelated errors. Change-Id: I7bd56876bb42b261fe425f80cf9beb639c3ac276 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116078 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2021-05-20fix leak in CppunitTest_oox_cryptoNoel Grandin
Change-Id: I41d4fe581842cb7822ae899dc6ee6a43e485d211 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115856 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-14Improve loplugin:stringviewStephan Bergmann
Issue the "instead of O[U]String, pass [u16]string_view" diagnostic also for operator call arguments. (The "rather than copy, pass subView()" diagnostic is already part of handleSubExprThatCouldBeView, so no need to repeat it explicitly for operator call arguments.) (And many call sites don't even require an explicit [u16]string_view, esp. with the recent ad48b2b02f83eed41fb1eb8d16de7e804156fcf1 "Optimized OString operator += overloads". Just some test code in sal/qa/ that explicitly tests the O[U]String functionality had to be excluded.) Change-Id: I8d55ba5a7fa16a563f5ffe43d245125c88c793bc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115589 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-05-11tdf#141463 avoid skew in shape group in ooxml import ..Regina Henschel
and implement special resize handling for rotation angles larger 45deg. This solves tdf#93952 and tdf#141953 too. Change-Id: I798f6d2cea29c4a5285f530e9cf7bb10e7f6c41d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115296 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2021-05-06crashtesting: failure on export of ooo26119-1.sxc to xlsxCaolán McNamara
since... commit 3a24211a1d49f33ca52e4fb2c927d50304f005df Date: Thu Apr 29 17:26:59 2021 +0200 tdf#54037 PPTX export: fix internal hyperlinks calc XDrawPage doesn't support XNamed apparently Change-Id: I796b65682f099deebee0da2e84bfbe391108c4cf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115181 Tested-by: Jenkins Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2021-05-06Removed duplicated includeAndrea Gelmini
Change-Id: I8bcbbcff598ea472f9476c0d5e57fbfc0a9dcc0d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115162 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2021-05-04tdf#54037 PPTX export: fix internal hyperlinksTibor Nagy
exported as external by accident: after reloading the bad export, clicking on the hyperlink opened the same file in another document, because the exported link contained also the full file name reference instead of the slide name, according to the OOXML Relationship TargetMode="External". Change-Id: I08cf1537cd307b0b6f51ba1c3f61d89e220d44fd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114891 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-04tdf#103347 PPTX import: fix duplicated slide nameTibor Nagy
PPTX import uses title text as slide names, but this resulted duplicated slide names in the case of repeating title text, which forbidden by UNO API: == GenericDrawPage.idl == /** Gets or sets the name of this page. <p>Duplicated page names inside a document are not allowed. */ [optional] interface com::sun::star::container::XNamed; Now the import code skips the duplicated title text, resulting default numbered slide names instead of the duplicated title names. Note: it seems, this hasn't fixed the jumping slide selection, e.g. sometimes pressing Shift-F5 still presents the first slide instead of the actual one. Change-Id: I98511c3c9a59598ea113e7387db5202d7f8a7cd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114810 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-05-03loplugin:stringadd improvement for appending numbersNoel Grandin
I was wrong, the Concat framework already optimised appending numbers by stack-allocating small buffers, so include them in the plugin Change-Id: I922edbdde273c89abfe21d51c5d25dc01c97db25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-03loplugin:unnecessaryparen small improvementNoel Grandin
when calling a function, and passing only one arg, but the function has defaulted args, we were ignoring this case. Change-Id: I86517f18e30531127664088ddc09ef96dbd8bdf5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115033 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-05-02throw() -> noexcept, part 2/3: Automatic loplugin:noexcept rewriteStephan Bergmann
Change-Id: I076f16d0536b534abf0ced4d76051eadb4c0e033 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114949 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2021-04-29loplugin:stringadd simplify some *StringBuffer operationsNoel Grandin
pulled from a larger patch which I created with a more permissive variant of this plugin Change-Id: I7abf1f3f09e84703b6e0e52fe9587dff691b2187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114875 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>