summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)AuthorFilesLines
2018-08-08forcepoint#59 the "matrix" is always one row in heightCaolán McNamara1-23/+17
so it can be a vector instead, and by using vector::at() instead of matrix::at() vector bounds checking is performed, unlike matrix::at() which does no checking Change-Id: Ic767c2dd884bffbf1cdff65c0980b21170612f4d Reviewed-on: https://gerrit.libreoffice.org/58399 Tested-by: Jenkins Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit ccfdc4b675233131fb99c998d2dc48affb0ac7af) (cherry picked from commit 58b4de56a389463eaef6dd228ffb7f37c1ba6103)
2018-04-07forcepoint #31 survive missing control modelCaolán McNamara1-2/+8
Change-Id: I37e4af560b46b4f6d9e0b87fe58493818f366d3c Reviewed-on: https://gerrit.libreoffice.org/51878 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <Michael.Stahl@cib.de> (cherry picked from commit d98cfa4df4e6f7391b7790c625c1f8a650514e88)
2018-04-05oox: don't segfault when failing to open a custom fragmentAshod Nakashian1-6/+9
Change-Id: Ie05d1feea2e930b117b3754c6e0db86bdb85bc61 Reviewed-on: https://gerrit.libreoffice.org/51681 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit f82888653c853f236ab0035bb578a7129ec72fa5) Reviewed-on: https://gerrit.libreoffice.org/52227 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 6ac27e7d3deb8e137860d8b31f1c5eace616de53) Reviewed-on: https://gerrit.libreoffice.org/52449
2018-03-27tdf#104792 Double check for target shapeSzymon Kłos1-2/+8
Change-Id: Ibe23377c7752d9ce97c7b100af4b2759b3ce946f Reviewed-on: https://gerrit.libreoffice.org/51241 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/51454 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com> (cherry picked from commit 03a5a78a78808e1ec0c1cd4ee41c05cfa49143bd)
2018-03-08oox customXml: Don't write the Relationship to DOCX files twice.Jan Holesovsky1-2/+0
Change-Id: Id3da40138e86c142707e377aa897df372aacb704 Reviewed-on: https://gerrit.libreoffice.org/50943 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2018-03-07oox: preserve the ContentType of custom filesAshod Nakashian1-12/+26
Generic logic to preserve custom files with their correct ContentType. Standard default file extensions with respective ContentType preserved in [Content_Types].xml. Change-Id: I651ed691e9a4745cd2cb4b3c4d4c5fd7287b66c2 Reviewed-on: https://gerrit.libreoffice.org/50896 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-22Fix build.Jan Holesovsky1-4/+4
Change-Id: I1048970fdfa431d20ff4f7861b7f1788aadedf4e Reviewed-on: https://gerrit.libreoffice.org/50173 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-02-22oox: preserve custom oox fragments and packagesAshod Nakashian1-1/+173
Reviewed-on: https://gerrit.libreoffice.org/49236 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit 335a2b80fa900848a8b60d8fd5db6656bc30a95a) Change-Id: Ic4c75d136601a9b7d772aab577c9fbebc7391eaf Reviewed-on: https://gerrit.libreoffice.org/50151 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-22oox: move putPropertiesToDocumentGrabBag to XmlFilterBaseAshod Nakashian1-0/+30
Reviewed-on: https://gerrit.libreoffice.org/49235 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com> (cherry picked from commit e26a95360e60e0c17e70e72f36fb988bb664ddb5) Change-Id: Ic3cbabc420c7856682b889528043563622997c14 Reviewed-on: https://gerrit.libreoffice.org/50150 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2018-02-19PPTX export scale for TextFitToSizeSzymon Kłos1-1/+18
MSO requires to save fontScale attribute to have all the text shown properly (with FitToSize property) Values are approximated, after any modification in MSO scale is recalculated. Squashed: 7a510effa4566d405d2033b6635b42c08d34dec8 2c2919cb591d88b11bb2e25e45d6f75923821457 Change-Id: I73657fdd663b540b436747cfeeef3c76e8fe388c Reviewed-on: https://gerrit.libreoffice.org/49742 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/49917 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-02-15tdf#51340: Line spacing is imported incorrectly from PPTXTamás Zolnai4-9/+24
Move the line spacing member to the TextParagraphProperties class which is used to do the inheritance from master / layout slides. Reviewed-on: https://gerrit.libreoffice.org/49692 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 53551d49d3be2301985f2cf2d8bb23ff374ecfd1) Change-Id: I0bf92420963163eae78e06ebc7fdfa1f2c72fdf8 Reviewed-on: https://gerrit.libreoffice.org/49746 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-02-12tdf#114821 import/export/place complex data labels in chartsSzymon Kłos4-14/+208
Change-Id: Ia44abcebb4febcabb1704aef85e396730ac2cd6f
2018-02-12tdf#115394 correct transition in case of 0sSzymon Kłos1-1/+8
Change-Id: I23d18acef0bd5db4a4ad6fc67d409e7ed5c93949 Reviewed-on: https://gerrit.libreoffice.org/49462 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/49524 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-02-12tdf#115394 import custom slide transition time in PPTXSzymon Kłos3-8/+29
* custom values are imported correctly * standard (fast, slow, medium) values are changed to match values in the MSO Change-Id: I004242afbbf641fe414abc8df248a2844c104502 Reviewed-on: https://gerrit.libreoffice.org/49139 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/49521 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2018-02-09PPTX Fix export of rotated group shapesPaul Trojahn1-1/+1
The rotation is already applied to the child shapes and must not be added to the group. Reviewed-on: https://gerrit.libreoffice.org/42765 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 465092047d5fa6ec6dd369372e712d76554570ff) Change-Id: Ic564cbcf31a81a248878f0179fdd21144f076b61
2017-12-22tdf#114613: Repair function does not work after opening PPTX fileTamás Zolnai1-0/+18
We need to disable undo handling during file import. Same is done for other file formats (e.g. PPT, XLSX). Change-Id: I1969c17b4a25b59b0d216ee847b3664e9c2207ca Reviewed-on: https://gerrit.libreoffice.org/46882 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 02ea9bc36ab47d68940da55f5012677dfaf0a8b8) Reviewed-on: https://gerrit.libreoffice.org/46973 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-12-20tdf#105517: overwrite existing scheme colors in vectorAron Budea1-1/+5
Theme overrides stopped working once ClrScheme::maClrScheme was changed to vector, and colors were always appended to it. Regression from f3121049828596b369e3ea844355d61666e49795. Reviewed-on: https://gerrit.libreoffice.org/44242 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com> (cherry picked from commit 021081823aeebcfa395662d0c04535a243977c2e) Change-Id: Iae850dcabf57b12d8a564e84acf38d9988cfe963 Reviewed-on: https://gerrit.libreoffice.org/46845 Reviewed-by: Aron Budea <aron.budea@collabora.com> Tested-by: Aron Budea <aron.budea@collabora.com>
2017-12-18convert INetURLObject::EncodeMechanism to scoped enumNoel Grandin1-1/+1
(cherry picked from commit 803215142efa6437515348f63bd70ffdcf5d45f1) (cherry picked from commit 736cd289d4cdb0db61d92134bcc9d48aa7e79613) Change-Id: I50ea17c7779c7b5cacddf548f1773fd7d6c8bade
2017-12-18convert PolyFlags to scoped enumNoel Grandin1-4/+4
and remove the XPolyFlags enum, which has the same values and was being converted to PolyFlags anyhow Change-Id: Iaead84933c79a7603698a4e50257dd944df89c41 Reviewed-on: https://gerrit.libreoffice.org/31627 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit a08cb3b52ea4a071ce8eb5a1786ea45fd211ab78) (cherry picked from commit e13bb8d5290b27281d7742a9b7034929561d51aa)
2017-12-10tdf#114308 Export Watermark size as isSzymon Kłos4-68/+32
* refactoring * removed size hack * export/import "trim" attribute * DOC: export set of parameters to fit shape & frame Change-Id: Ib00654626ae1e10ac5110d22eada7528e03357e7 Reviewed-on: https://gerrit.libreoffice.org/46036 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/46154 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-12-07tdf#113037 Unify Watermark in DOC & DOCXSzymon Kłos1-6/+9
* use correct font for calculations Reviewed-on: https://gerrit.libreoffice.org/45698 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 923ca4efe2095998e3da75c372cd7d716db9abb3) Change-Id: Idd370678c000bf22c460c3323bd55cd827ba7153 Reviewed-on: https://gerrit.libreoffice.org/45996 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-12-07tdf#113037 DOCX Watermark correct ratioSzymon Kłos2-2/+84
Import and export Watermark with padding like MSO does. Shape is scaled to save correct ratio. Reviewed-on: https://gerrit.libreoffice.org/44319 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit a3a917748892a6a3194ebfc4db64cfd764cc054a) Change-Id: Iebd8eb5f168e0030320406d4fd6b287e451267bd Reviewed-on: https://gerrit.libreoffice.org/45995 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-12-05vector::data seems more natural than &vector::frontCaolán McNamara3-4/+4
Change-Id: I0ce48075ad186cf1f9bd3e13fa76269fa9819af1 (cherry picked from commit 3a74745367a73ed9351379fc32bbe9253cdae697) (cherry picked from commit 3437713c11d60f99470fc1d0e2a8e5c56d5a6fe8)
2017-11-06PPTX export: correct position of rotated groupsSzymon Kłos1-0/+17
* added testcase for tdf#113263 Change-Id: I7abf68d8fb4ffd8b883cfbf4d69916912add8182 Reviewed-on: https://gerrit.libreoffice.org/43794 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/44322 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-11-06PPTX export: remember color schemes in themeSzymon Kłos2-1/+77
Remember color scheme from loaded pptx file or use default values. Change-Id: Icb69c51603afc5f332c20c75e4ed5f659f4b5614 Reviewed-on: https://gerrit.libreoffice.org/43470 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/44321 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-11-01SmartArt: export text rotation in the PPTXSzymon Kłos2-22/+4
Change-Id: I74bfc172fe7434d14de468ecfd3412636e53780c Reviewed-on: https://gerrit.libreoffice.org/43202 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> (cherry picked from commit 3cbb6e73ecbff5d83be817c0dab680c5d925c6fa) Reviewed-on: https://gerrit.libreoffice.org/43984 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-09-26tdf#112647: Fixed line spacing is saved incorrectly to PPTXTamás Zolnai3-7/+12
The values were not converted to the right unit. Also the spcPts attribute means an exact value not a minimum one. Reviewed-on: https://gerrit.libreoffice.org/42763 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit ef2e9b19a52e04ae0ed45900bcf64bf375a910ef) Change-Id: Ia49683e66153611e96a830f821e3a2487adec505 Reviewed-on: https://gerrit.libreoffice.org/42812 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-09-26tdf#112089 add charts to the ShapeMapSzymon Kłos2-10/+2
Charts weren't added to the collection what resulted in missing ids during export (target field). Change-Id: Ie96a4e33a52c5448342a3c3dcec0d8e8b244e270 Reviewed-on: https://gerrit.libreoffice.org/42552 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
2017-09-26tdf#112333 PPTX export fill.type & fill.onSzymon Kłos3-5/+42
Change-Id: I2407d0227e10204354ee69fd9a2af9ca93077221 Reviewed-on: https://gerrit.libreoffice.org/42432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/42526 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-09-26tdf#112088 gradient stop map -> multimapSzymon Kłos4-13/+32
When two gradientstops were set to position 50% only one was stored and the exported file was detected as broken by MSO. Change-Id: I5fd1acde6051f734a5f3e4cff9bde01b675e1984 Reviewed-on: https://gerrit.libreoffice.org/42210 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/42473 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-09-23tdf#112552: Shape's gray background is lost after saving to PPTXTamás Zolnai2-48/+43
Reviewed-on: https://gerrit.libreoffice.org/42598 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 31919b8909fa7b34412dd52c3d4dff17bc5b6fab) Change-Id: I30f371ad301eede82ddcece4d91ffcd32e164115 Reviewed-on: https://gerrit.libreoffice.org/42649 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-09-18tdf#112311 oox: fix UAF of std::shared_ptrMichael Stahl2-14/+20
OOXMLFastContextHandlerShape::sendShape() deletes the parent context's ShapeTypeContext::mrTypeModel. It looks like the sendShape() can't be delayed because writerfilter wants to import the v:textbox content into a text frame. Keep the shape alive until the end of the containing context. Not sure if it's going to process the v:fill element properly, but at lest valgrind is happy. (probably regression from CWS writerfilter32bugfixes01) Change-Id: Ifeab84751a1b20b2f272c4dd74b7097deb5eece0 (cherry picked from commit 88c84e71e2559ec6d0b4f8c5101a149daa4a2b2b) Reviewed-on: https://gerrit.libreoffice.org/42245 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 7c7c19d80e6a6327be563a18febc3854d9a38daf)
2017-09-07tdf#99617 convert powerpoint angle to degreeRegina Henschel1-6/+6
1 powerpoint angle unit = 1/60000 degree Roundtrip test not yet possible because of tdf#106002. Change-Id: I5854c4f9f013f1a2db7e9536fc9cf5198c7a02ed Reviewed-on: https://gerrit.libreoffice.org/34279 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/42078 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-07tdf#106867: Export videos in PPTX.Jan Holesovsky5-9/+141
Contains also: tdf#106867: Implement pptx export of AnimationNodeType::COMMAND. tdf#106867: Import target for commands in PPTX. tdf#106867: Write also the extended markup to fully support embedded videos. tdf#106867: Unit test for the export of embedded videos. Change-Id: I7f4f389a72aa7ecef65d87f07bb69ba8f3374a14 Reviewed-on: https://gerrit.libreoffice.org/42017 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-07tdf#111884: Implement export of group shapes in pptx.Jan Holesovsky2-21/+52
Contains also: tdf#111884: Unit test. related tdf#111884: GroupShapes are now handled in oox. Change-Id: If12984c0670db6396cbfd0dcb8ae1f5a9b591705 Reviewed-on: https://gerrit.libreoffice.org/41766 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/41997 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-09-06Revert "tdf#111798 Fix deformed export of flipped custom shapes to pptx"Jan Holesovsky2-13/+3
This work is incomplete, rather I'll fix my conflicts. This reverts commit 9c0387ef602d84d0079828f0ad4b53ada7ab1d8a. Change-Id: I20961cee4a5c28fc5486ca385974e9fcd5827dbe Reviewed-on: https://gerrit.libreoffice.org/42012 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-06Fix PageShape export to pptxPaul Trojahn1-1/+2
The export code is not called, because the PageShape is actually of type presentation.PageShape and not drawing.PageShape. A PageShape has no text at all, which results in an empty p:txBody element that fails validation, so it needs to be checked first if the shape actually has text. Change-Id: I559f15c2396739c74d5c4f36eb952754bc040ce8 Reviewed-on: https://gerrit.libreoffice.org/38574 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> Reviewed-on: https://gerrit.libreoffice.org/42002 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-09-06tdf#111798 Fix deformed export of flipped custom shapes to pptxPaul Trojahn2-3/+13
Shapes were deformed because flipping wasn't considered when removing the rotation. Also WriteShapeTransformation needs information about flipping to convert the angle correctly. Change-Id: I7d485e93c00e02b9ec6c73ad6ae2876e5bc6360a Reviewed-on: https://gerrit.libreoffice.org/41462 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/41996 Reviewed-by: Jan Holesovsky <kendy@collabora.com> Tested-by: Jan Holesovsky <kendy@collabora.com>
2017-08-25tdf#50097: DOCX: export form controls as MSO ActiveX controlsTamás Zolnai5-43/+133
* Use the same structure for export what MSO uses ** Position and size information are exported as VML shape properties ** Different handling of inline and floating controls (pict or object) ** Do some changes on VML shape export to match how MSO exports these controls ** Write out activeX.xml and activeX.bin to store control properties ** Use persistStorage storage type defined in activeX.xml * Drop grabbaging of activex.XML and activeX.bin * Cleanup control related test code Signed-off-by: Tamás Zolnai <tamas.zolnai@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/41256 Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit c0cc02e2934aeb12dda44818955e5964496c186a) Change-Id: I38bb2b2ffd2676c5459b61ec2549c31348bab41c This test intended to be an export test Change-Id: Ib233bd603185efdb85ed30f3d00c28512d57a0ac Reviewed-on: https://gerrit.libreoffice.org/41355 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit a7e8c5304b740cb4e03e25b7217ce6071c29c09b) Fix two issues in ActiveX DOCX import / export code * Inline anchored VML shape had wrong vertical position ** In MSO inline shapes are positioned to the top of the baseline * During export all shape ids were the same (shape_0) ** VML shapes used to be exported only as fallback, I guess that's why it did not cause any issue before. ** Override the shapeid generator with a new one, which actually generates unique shapeids. Reviewed-on: https://gerrit.libreoffice.org/41319 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 2d1fe7fb67ec1ff1b96912c0945d17d54aecb12e) Change-Id: I752f39d092d0b61d91824141655dae662dbeafbc DOCX: Fix an other test case of ActiveX control export When LO control is anchored to the end of the run, it is exported into a new run. Reviewed-on: https://gerrit.libreoffice.org/41472 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit b129421764ae78a1422812169fce8eb4914a6b22) Change-Id: I9269fd1b34924780aad61c452d1e2094dc8e4aad Reviewed-on: https://gerrit.libreoffice.org/41484 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-08-25tdf#91384: DOCX: import ActiveX controlsTamás Zolnai4-6/+25
Reviewed-on: https://gerrit.libreoffice.org/40930 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 4a764319cbad4e2589cc105145ac27defbf49ff6) Change-Id: Iebf2ff65fcec3231acfc962fb2f1abc2ed2dc67a Avoid warning in OleHandler Related to ActiveX controls. Change-Id: Ief7ee67ca8e4f086a1d5e0400d0eaf3ebc8cdaaf Reviewed-on: https://gerrit.libreoffice.org/40934 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 368b583b992f2e9cad46c2362c9529a07c36d7a9) Reviewed-on: https://gerrit.libreoffice.org/41483 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-08-25tdf#111548: PPTX: ActiveX checkbox control appear as pictureTamás Zolnai3-1/+23
Make ActiveX controls import working again (PPTX / XLSX) It used to work earlier, but there were an issue with the shape id and so controls were not find. Also in PPTX import the persistStorage attribute was handled only for parent controls and not for other kind of controls. Reviewed-on: https://gerrit.libreoffice.org/40751 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit c8e3633a352c2fda3aebb9781288a926e7a88c42) tdf#111548: Better fix for PPTX / XLSX import of ActiveX controls Follow up fix for: c8e3633a352c2fda3aebb9781288a926e7a88c42 Revert part of it and fix the real issue: shapid was messed up. Reviewed-on: https://gerrit.libreoffice.org/40929 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 286c27e805c4501451857abff19c23b3719146a3) Change-Id: I9784166b65407b79b6dfed8a38087b55b1b69835 Reviewed-on: https://gerrit.libreoffice.org/41117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/41482 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-08-23VML, Watermark: detect shapetype from other subdocumentsSzymon Kłos1-0/+8
In some documents Watermark wasn't visible because shapetype wasn't detected. It was impossible to use shapetype defined in header1.xml in shape placed in the header2.xml. Change-Id: Ib406c8fc702968684ad46efd0857b768af2820f5 Reviewed-on: https://gerrit.libreoffice.org/41395 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit 87f1f7fdb34fe452ac540524224e1e808ce5d3a2) Reviewed-on: https://gerrit.libreoffice.org/41465
2017-08-04tdf#107723 Import font name from text portions in shapesSamuel Mehrbrodt2-0/+20
Reviewed-on: https://gerrit.libreoffice.org/40439 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 178b361c6379bc963c8a48925f1807c583f2d09f) Reviewed-on: https://gerrit.libreoffice.org/40529 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 07e656c99f86a59039decd462f66fa272ee2fbed) Change-Id: Ib9b73b5c05ec2e6846ea3adc950ccab5d1c0a9b0
2017-08-04tdf#109223: PPTX: Vertical flip of child shape is not imported correctlyTamás Zolnai1-0/+6
Group shape level vertical flip is not handled well. Recent handling of group shape's transformation makes it hard to import this attribute, but we can import the right text direction at least. Reviewed-on: https://gerrit.libreoffice.org/40554 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> (cherry picked from commit d742c0019435d0bc90c9342492583636099a057f) Change-Id: Ib9e39e3dcb28a95fabc61c13152a3f7296fbd4c3 Reviewed-on: https://gerrit.libreoffice.org/40556 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit c49f2c00067cbe5de714525807290b71aec57ea3)
2017-07-20sd pptm: Preserve the VBA stream on export.Jan Holesovsky1-11/+26
This actually implements the reading of the VBA stream in Impress too, so the user will get a warning when opening such a file (that the it contains macros). Change-Id: I1638199529196ed217cbd9ebef88eb7c88f2179a Reviewed-on: https://gerrit.libreoffice.org/40197 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-07-20sd pptm: Add a separate PPTM filter.Jan Holesovsky2-6/+18
Similarly to commit 697173f6fdfae581022cfdb5ec5171c5a3be58f0, we have to preserve the correct content-type which is not the same for PPTX and PPTM. This commit also changes sdfilt.component to use the constructor feature. Change-Id: I4b334540ec07a53d308e6b9dd6403294842bddf8 Reviewed-on: https://gerrit.libreoffice.org/40195 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-06-23Related: tdf#108269 DOCM filter: preserve VBA streamMiklos Vajna2-8/+15
This is a combination of 3 commits (initial support, then two refactor commits to not duplicate code.) 1st commit: This means 2 new streams when roundtripping DOCM files that actually have macros: word/vbaProject.bin and word/vbaData.xml (+ the relation pointing to the second from the first). Reviewed-on: https://gerrit.libreoffice.org/38360 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> (cherry picked from commit 8a59b30bb1af55f7afd8b98e4b60234f98d84c76) Conflicts: sw/qa/extras/ooxmlexport/ooxmlexport9.cxx Change-Id: Iba24eea4c5bca8f743a53027c71ed2aae48f1934 2nd commit: Related: tdf#108269 DOCM filter: reuse oox code for VBA preservation With this, the project stream import is shared between DOCM and XLSM. Change-Id: I8fbffefc5acf28adea4875fa6bc4148a99b5ebef Reviewed-on: https://gerrit.libreoffice.org/38495 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit e4adb8d9e77bab353dda26375e11a6b7a456368f) 3rd commit: Related: tdf#108269 DOCM filter: reuse oox code for VBA data preservation Which means the DOCM-specific code to roundtrip VBA things (project, data) can be removed. The oox part has to be extended a bit, as at least for this DOCM bugdoc there is an XML relation of the binary data, while existing shared code assumed the full VBA project is just a single OLE blob. Reviewed-on: https://gerrit.libreoffice.org/38504 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 0129c2cd9dd95355412b194c595f4b986403ba1e) Conflicts: writerfilter/inc/ooxml/OOXMLDocument.hxx writerfilter/source/ooxml/OOXMLDocumentImpl.hxx Change-Id: I4085e4dba24475e6fd555e5f34fe7ad0f305c57d Reviewed-on: https://gerrit.libreoffice.org/38558 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-06-23Related: tdf#108269 oox: ignore case when checking .docm extensionMiklos Vajna1-2/+11
Also check for ".docm", not "docm" as a suffix. Change-Id: Ib9d3474cfe3139ee1ea51210a5606cd52243fee5 Reviewed-on: https://gerrit.libreoffice.org/38430 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> (cherry picked from commit 1c768b975827c74e58944b8b12ab254891389edc) Reviewed-on: https://gerrit.libreoffice.org/38557 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
2017-06-21tdf#89064 Fix import of pages with comments and notesPaul Trojahn1-2/+2
importSlide removes the shapes on the page. It was used to import the comments and authors, which resulted in an empty notes page. Reviewed-on: https://gerrit.libreoffice.org/38648 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de> (cherry picked from commit c2da33ead8b093b12ebb9a0ea9c06d156c41a3e6) Change-Id: I7d68085b482e5497d46e92328c413c87440714a0
2017-06-10coverity#1412145 Result is not floating pointCaolán McNamara1-1/+1
Change-Id: Ia2b4c4f14f5a59dd5d24c0d0749922e0d190f53a Reviewed-on: https://gerrit.libreoffice.org/38635 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>