summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2022-04-27tdf#53970 PPTX: fix import of linked media filesTünde Tóth
Linked media files were imported as images in documents created with Impress after PPTX export. Change-Id: If4920c2e40f45fff73eca4a5fa987d524177597e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132635 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 9564747d2fd5d2c859a359dd7fa6242c6859c0d7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133410 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-27tdf#109169 export Type encoded shading to OOXMLRegina Henschel
A shape might have the shading information not in commands in the enhanced-path, but generated in ctor of EnhancedCustomShape2d from the Type value of the shape. This shading information is a 32 bit value with first the number of the shadings and then the shadings. A shading is encoded with 1,2,3,4,5,6,7 for lighten 10 to 70 and 8,9,a,b,c,d,e,f for darken -80 to -10. To get this information from EnhanceCustomShape2d I have made its method GetLuminanceChange() public. Because OOXML only has darken, darkenLess, lighten and lightenLess our values are mapped: -10, -20, -30 to darkenLess -40, -50, -60, -70, -80 to darken 10, 20, 30 to lightenLess 40, 50, 60, 70 to lighten The bupreport mentions only 'Octagon Bevel' and 'Diamond Bevel'. But the patch fixes missing shading for shapes of Types 'ActionButton*' as well. Such shapes come in from MS binary import. Change-Id: I03f19496b915f3ced6346222e8806832b4ee2827 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133220 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/+/133366
2022-04-27tdf#147586: Initialize mbBulletColorFollowText to falseXisco Fauli
Otherwise, once it's set to true, it's never reset Change-Id: Ie8a752da4162775f40c2f84f480e6a103eb55942 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133422 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit a0bae88a9cd47185a71cbfd4c86bbd86ae44d30e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133404 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-27Do not start a:path with lnTo in export to OOXMLRegina Henschel
This is a follow up to commit 2029b2f6dd0109c5892e5ac5640022b31fe42fd2 The commands A, W, T or L of a draw:enhanced-path draw a line from current point to start of the arc or end of line, respectivly. If there is no current point the path is faulty and behavior is not defined in ODF. LibreOffice is tolerant and makes a move to the start point of the arc or to the end point of the line. With this patch we do the same now in export to OOXML, so the user gets the same shape geometry as in LO. If a path starts with lnTo, MS Office will show nothing. I wouldn't care about user-created faulty paths, but LO produces such faulty path when an EllipseRibbon shape from binary MS Office is imported. Even when that will be fixed, we need the fix here, because the faulty path had been written to document markup and will be used when such document is opened. Change-Id: Ic52ec3bc78231b26efb592ddadee2e3042fdc065 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133349 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/+/133370
2022-04-27Extract 'switch' block out of WriteCustomGeometryRegina Henschel
This is a follow up to commit 2029b2f6dd0109c5892e5ac5640022b31fe42fd2. That commit has increased the line count of WriteCustomGeometry to more than 500. This patch splits it to a main part of about 230 lines and a new method for the previous 'switch' block of about 300 lines. That makes the loops in the main part better readable. Change-Id: Ied4378f54e7c8dc7965a5b1db15baf0b35f63f59 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132274 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133369
2022-04-25tdf#148685: Unset CharUnderlineColor and CharUnderlineHasColor propertiesXisco Fauli
Change-Id: Iebf482434cd393f55ae3e4690580b573624d78b1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133219 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit 1c924efe1f80207a5e104d755615b1eb9a91d418) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133282 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2022-04-19tdf#109169 use custGeom for Octagon Bevel shapeRegina Henschel
The shapes 'Octagon Bevel', type col_60da8460, and 'Diamond Bevel', type col-502ad400, are LO specific preset shapes. They have neither a counterpart in MS binary nor in OOXML. So they need to be exported with custGeom. To force custGeom these shape types are moved from vDenylist to vAllowlist. These shapes were exported as prst='rect' before. Change-Id: I9619345812b6dba8f14ec2cc6a92ae808a56b595 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133069 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/+/133113
2022-04-19oox: move DataTableConverter into own fileTomaž Vajngerl
Change-Id: I3dce87ecd5b8f69862f26edb66fe54c6acee8660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133117 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 2e9e057913d5f31490f62ad60d2bae39ae81afee) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133155 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-19oox: move DataTable{Context,Model} into own file, prop. "showKeys"Tomaž Vajngerl
Move DataTableContext and DataTableModel into its own files and add the missing "showKeys" property of the data table (dTable). Change-Id: I44fb436000c7f00a596fc9b12489d15ea1368e68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133021 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 32e38ec654cfd467aad74da59366bd41142b3bdc) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133061 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
2022-04-14tdf#147766 Export empty lines as line with noFillGülşah Köse
We have a case that 0 width line but has auto color. If that case exported there is no line over there, LO handles normally but MSO draws back borders as default. To prevent this we have to export them as line with noFill. testTableBorderLineStyle change reverts a workaround for 3faf005a367cbd28077403bf93810bbaf4805851 testBnc480256 Cell(1,0) still invisible. We are just checking this with another way. Change-Id: If5f6d2dbdba5c295d58307fcfe3b37629ede8a8e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131532 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132886
2022-04-14Revert "Revert "tdf#135843 Implement inside horizontal vertical borders.""Gülşah Köse
This reverts commit ea5a3e0247b1230c1fe7e2cb0afc597e56d0b4c2. Change-Id: Ibd333c1e7b1530a2b6d9b8c5efbf4d9c822fa058 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132885 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com>
2022-04-12sc: add support for xr2 namespace and read uid of sparkline groupTomaž Vajngerl
Change-Id: I470819a89338f4fb1d9b2486ffb4d93f8eb42844 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132504 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 1d25d32b4dcfbc750b8344cd79279aad0d621edf) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132843 Tested-by: Tomaž Vajngerl <quikee@gmail.com>
2022-04-10sc: support reading sparklines from OOXML documentTomaž Vajngerl
Read sparklines and sparkline groups from the OOXML document and add store it into a (temporary local) doc. model. Change-Id: Id2d34db70300957735571875d6defb3d560fbb26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131161 Tested-by: Tomaž Vajngerl <quikee@gmail.com> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com> (cherry picked from commit 04b3a9baf5731696418bc1a6db8c8b1bf65dc7c4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132546
2022-04-09tdf#148342 docx export: fix puzzle shapeAttila Bakos (NISZ)
There is an exporter class for preset shapes, namely the DMLPresetShapeExporter, which in its ctor calls the msfilter::GetShapeName() converter method where the puzzle cause exception. To avoid this return with false to export it with custgeom in time. Change-Id: I8d29bf551638a66abf381c9cb8f6a0eebc881195 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132567 Tested-by: Jenkins Reviewed-by: Attila Bakos <bakos.attilakaroly@nisz.hu> Reviewed-by: Regina Henschel <rb.henschel@t-online.de> (cherry picked from commit 9592da0a8e596869a1cd0859619dd28a541d7234) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132606 Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-06tdf#53970 PPTX: fix broken export of linked media filesTünde Tóth
Missing TargetMode="External" in the export of linked media files resulted corrupted PPTX. Change-Id: I76246db331d199810a5b413d44bec95283e88e47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132402 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit c2e8a96a8107a37901e475c65a8e61211fc3b132) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132383 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-04-06tdf#53970 PPTX: fix export of embedded media filesTünde Tóth
Embedded media files lost in documents created with Impress after PPTX export. Change-Id: I453b58f9cfa6a33653e9216fb82b66970a9ec31b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132095 Tested-by: Jenkins 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/+/132319
2022-03-30fixAndras Timar
Change-Id: I74ad7cc53c438f22f1de13f1b9b3d52cb9547b7d
2022-03-30tdf#147978 export subpaths individually in custGeomRegina Henschel
...and implement export of all missing commands, use existing viewBox if suitable, use one EnhancedCustomShape2d move WriteCustomGeometryPoint to protected, make GetCustomGeometryPointValue local The fix solves tdf#100390 too. Without the fix the entire enhanced-path was exported as one element <a:path>. The command F was applied to the whole drawing but should affect only the subpath. The implementation is changed so that each subpath gets its own element <a:path> and command F acts only on its subpath. Support for export of handles and equations is still a long way off. Thus there is no reason to tread shapes with and without handles different. Shapes with handles had used method WritePolyPolygon, but that is not able to handle subpaths. So have desided to use method WriteCustomGeometry for all cases. To get shapes exported regardless of path commands I have added the export for the missing commands. I have removed the no longer used method WritePolyPolygon. The special treatment of shapes "moon" and "mso-spt89" (right up arrow) in export is no longer needed. Related code parts are removed. The unit test testFlipAndRotateCustomShape is adapted. In case the method WriteCustomGeometry fails, the enhanced-path is invalid. In that case an minimal custGeom is written in case of docx. Shapes whose drawing does not touch all edges of the snap rectangle were exported with wrong position and size of the drawing inside the snap rectangle. That is fixed by using an existing ViewBox for the OOXML path size. The old way of creating a path size from point coordinates is only used if the shape has no suitable ViewBox. The point values in unit test SdOOXMLExportTest2::testTdf111798 are adapted to path size 21600 x 21600 and traverse direction of the points is corrected. The resulting shape outline is still the same as before. The expected xml is updated for file tdf92001.odp in SdImportTest::testDocumentLayout. The resulting shape outline is the same, because the shape touches the edges of the snap rectangle. The case, that the shape outline does not touch a edge of the snap rectangle is tested in SdOOXMLExportTest3::testEnhancedPathViewBox. Still missing is the case, that ViewBox has other left,top than 0,0. In that case all coordinates would have to be shifted because the path size in OOXML has only width and height but not left,top. That will not be included in this patch. Change-Id: Ib1736d6a08371f4d98411d2769275f0580cd0030 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131837 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit 2029b2f6dd0109c5892e5ac5640022b31fe42fd2) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132048 Reviewed-by: Bartosz Kosiorek <gang65@poczta.onet.pl>
2022-03-09Revert "tdf#135843 Implement inside horizontal vertical borders."Xisco Fauli
This reverts commit 90f19b66d81b0a4958cacc40d2be0516f281d702. Reason for revert: See tdf#147766. Reverting in 7.3 branch only Change-Id: Ibda51d5cf4544383bdeb7896e1be31de759575a8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131129 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-09cid#1500690 Explicit null dereferencedCaolán McNamara
this may stem from: commit fcc31cd0e0a6544a13dac0fdc66005d77f6f5cf9 Date: Fri Sep 7 18:41:58 2018 +0200 Revert "clang-tidy performance-move-const-arg" This reverts commit 3d604d1cd6cc70ef96782ef769f0479b509987a8. which didn't 100% revert 3d604d1cd6cc70ef96782ef769f0479b509987a8 so we went from: LayoutFragmentHandler::LayoutFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath, SlidePersistPtr pMasterPersistPtr) : SlideFragmentHandler( rFilter, rFragmentPath, std::move(pMasterPersistPtr), Layout ) to LayoutFragmentHandler::LayoutFragmentHandler(XmlFilterBase& rFilter, const OUString& rFragmentPath, const SlidePersistPtr& pMasterPersistPtr) : SlideFragmentHandler(rFilter, rFragmentPath, std::move(pMasterPersistPtr), Layout) Change-Id: I90cb437c467f88c75d248ed138d078bf56705a21 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/131007 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2022-03-09tdf#147121 PPTX: fix regression of font size export of empty linesAttila Bakos (NISZ)
If the empty line has got direct formatted font size, don't forget to export it, unless the master setting is applied. Regression from commit b6b02e0b4c9d739836e1f61a886ea45b01e6696e "tdf#111903 tdf#137152 PPTX export: fix placeholders". Change-Id: If686e487bca9c198fd7c96860a21e4efe91381bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130005 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit f29c14e8c36819296d0c66bb995201acf0a2647e) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130675 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-03-09tdf#135843 Implement inside horizontal vertical borders.Gülşah Köse
wholeTbl as TableStylePart should be handled in different way. Before left border of the whole table was handling like all cells left border but it should be left border of the first column. insideV and and insideH properties are imported but never handled. I added the inside vertical and horizontal borders handling. Change-Id: I5aea5cbefc746db637eac6c1438fa70a7d741bc0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128971 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 3faf005a367cbd28077403bf93810bbaf4805851) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130860
2022-03-09tdf#135843 Do not export unused border lines.Gülşah Köse
Setting as XML_solidFill all borders caused wrong exported borders. All table parts aren't used for all table styles. We should set borderline if only they had used. Change-Id: I35b247f520c7d7862599ade2c6fdfb0d7efcd5c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129227 Tested-by: Jenkins Reviewed-by: Gülşah Köse <gulsah.kose@collabora.com> (cherry picked from commit 48575b3eb856406d9de406cb1d2de23866b0178f) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130859
2022-03-09tdf#103800 PPTX shape import: fix regression of text colorTünde Tóth
defined by list styles. Properties in a:lstStyle of p:txBody should take precedence over the same properties defined in a:fontRef of style elements. Change-Id: I02cc886eb9eba94f49fe413a63bf7c46c9e3c127 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130237 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/+/130712 Tested-by: Jenkins
2022-02-20tdf#146690: pptx export: fix endParaRPr size value for empty paragraphsSarper Akdemir
Fixes paragraphs made from a single new line, not getting the correct sz(text size) value in EndParagraphRunProperties on pptx export Change-Id: I31ebb5735ad392e081aa2f43b0b60a845e4de9c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128265 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-02-18tdf#132557: PPTX import: Workaround for slide footer shape presetsSarper Akdemir
It appears that placeholder shapes with service names: - com.sun.star.presentation.TitleTextShape - com.sun.star.presentation.DateTimeShape - com.sun.star.presentation.FooterShape - com.sun.star.presentation.SlideNumberShape ... Are unable to have custom shapes in Impress. (i.e. can't be ellipse, triangle etc.). These presets get specified in OOXML with <a:prstGeom prst="ellipse"/> inside spPr (shape properties). Therefore with similar results to the PPT import, a workaround is applied where slide footers which have non default shapes are imported with com.sun.star.drawing.CustomShapes service. The layout/master footers are left as is since if they were to be imported as CustomShapes they would appear on each slide even if the slide had those footers enabled or not. Change-Id: Ic8a8ab3f6dfb7367ecd2c619ce888bf77abef460 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129889 Tested-by: Jenkins Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 6df267780c4d41b41101c1be0a954b2f16ee8012) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129931 Reviewed-by: Andras Timar <andras.timar@collabora.com>
2022-02-14vba: fix registering shortcuts keys defined by the vba macrosTomaž Vajngerl
On issue with registering was that the registering happened when the macro source was in the process to be read into the library, which is just a bit too early, because the macro wasn't found and not registered. Another issue was with searching for the macro method (hasMacro), which doesn't search the same when the module name is known and when it isn't. This was changed so we just iterate through the modules and call the same "FindMethod" method without any extra restrictions. Change-Id: I2f4f2f6d8186b289867456ebdccad27ce8eee231 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129197 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-02-03tdf#146822 OOXML: fix export of the transparency in hatch fillTünde Tóth
The transparency value of the hatch was not exported. Follow-up to commit 001afbed910b7e565f602c1b11b1b4538cd59442 "tdf#127989 OOXML: fix import of transparent hatching". Change-Id: I9b82a3422de8e4f85c534f861c45c0c097ceb02f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128504 Tested-by: Jenkins 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/+/129396
2022-02-03tdf#112209 PPTX import: fix grayscale effect on image filled shapeTünde Tóth
Some image filled shapes with grayscale effect in PPTX documents created with PowerPoint were not grayscale in Impress. Change-Id: I0a89f283f525eb47c21c5d5fa788484d8074a7e4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128616 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 1bce0e3004e3ec9d62a3c43801f8f2e8ef5f7fdb) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129342 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-03tdf#137675 PPTX export: adding missing fill="none" to a:pathTibor Nagy
Follow-up to commit 9310e47e2ce71348a16e5412131946348833f4b2 "tdf#101122 DOCX custom shape export: remove bad fill". Change-Id: I2acdae3964c31ee366387d9938fe366405dcace9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127944 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 22b66d4083d34cbce2b7b48daeed3152bf9877b7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129330 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-02-01tdf#141652 partial revert "Reset ShapeProperty priority...Justin Luth
... and handle only crop case." This reverts a portion of a tdf#134210 related, LO 7.2/7.1.2ish commit b90a67838e189f3aee6a50724c78c0a50d416970 that was introduced for no apparent reason. I have no understanding about shapes, and so I have no idea why setting FillBitmap to an xGraphic is different from setting it to a name, but it makes a huge difference on the image size, and the crop values aren't scaled to the reduced size. Since this section of code looks like a cut/paste relic of early stages of developing the fix, lets just revert this portion since the original author has made no response at all to the regression report. Change-Id: I9488c419ceb41bd4ebd7b10494a52fb816654832 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128260 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> (cherry picked from commit 18cc1240565e697859dd7d17058f91d5e01df929) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129254 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2022-01-11tdf#146534 pptx import: make Z rotation work with rotation transformSarper Akdemir
Expands previous idea from a9c5c0d814a266096483572b84c72875ef8efd77 (tdf#133037 OOXML shape import: camera rotation along Z) and uses it also for shapes that have a true bUseRotationTransform flag Also fixes same Z rotation exporting twice from InteropGrabBag to both spPr and textBody causing text overrotating on roundtrip. Change-Id: If0f192af029ca86b932a63613f961be1f5003c5b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127880 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128219
2022-01-11test: move parseExportStream() from SdModelTestBaseXML up to MacrosTestMiklos Vajna
Move parseExportStream() from SdModelTestBaseXML up to MacrosTest, so oox/ test code can use it as well. Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126215 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit f36767fde87191258ea21f3faac0be6ad79328e0) Change-Id: I8ba7d6f3b535456ddaa7cd0f0bb5d56fce7a7766 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128173 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/128255 Tested-by: Jenkins
2022-01-04tdf#146223 PPTX import: fix master objects visible propertyTibor Nagy
Master objects were always visible after the import, which could change the background of the slides. Change-Id: Idc5260718f2916e207f751286044e9a7fabdee89 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126833 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 4574a1ea408c2ac30042dca32d02207ec7add4da) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127777 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-21tdf#104823: support for sdt plain text fieldsVasily Melenchuk
This is a squashed commit containing set of changes: * Create a input field from sdt text block. * Advanced support for reading field data from data bindings which can point to custom xml or properties xml. For this XOOXMLDocumentPropertiesImporter idl interface was extrended with extra getterrs to get properties as xml dom elements. * Support for exporting of this feature back to docx. For this some extra parameters for sdt block are kept in newly introduced grabbag for input fields. If field does not contain grabbag it being exported as before (FILLIN or whatsoever), otherwise sdt block is counstructed based on data from grabbag. * Basic support for updating custom xml values back into custom xmls with usage of xslt transformations. To achieve this extra parameters were introduced to XXSLTTransformer: now it is able to support in-memory transformation stylesheets. Some unittests were corrected: since sdt plain text edit area is a field located inside paragraph in outout corresponding sdt is also located inside paragraph (instead of Word's approach with paragraph inside sdt). Seems this is not critical. Change-Id: I1a73ef300db3619804f7adf18579bea708764c14 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127015 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127127
2021-12-21tdf#127989 OOXML: fix import of transparent hatchingTünde Tóth
Set FillBackground property of hatching fill to false, if the alpha value is 0 in the <a:bgClr> element, i.e. if it's a transparent hatching. This way the previous non-transparent hatching is transparent now. Change-Id: I483d5c654be55e74c9073769b06f185526429635 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126550 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 001afbed910b7e565f602c1b11b1b4538cd59442) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127247 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-12-17VML import: handle <v:imagedata gain="..." blacklevel="...">Miklos Vajna
Map it to (the UNO API of) GraphicDrawMode::Watermark, similar to what the binary import does in SvxMSDffManager::ImportGraphic() and how the drawingML import does it in oox::drawingml::GraphicProperties::pushToPropMap(). On export, the drawingML export is used, and that already maps GraphicDrawMode::Watermark to <a:lum bright="70000" contrast="-70000">. Change-Id: I33986a03bf3d3863da5c5b1f0a2e0da0fa595c9e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126908 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins (cherry picked from commit 90556b6df0f6378fb60d7dee18b2f5d275ece530) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126942
2021-12-09tdf#129430 PPTX export: fix workaround for "At least" line spacingTibor Nagy
to avoid bad overlapping lines. PPTX does not have the option "At least", so line spacing with this setting is converted to fixed line spacing. Improve this workaround to use single line spacing, if the "At least" value is lower than the size of the characters, like "At least" is handled by Impress. Change-Id: I29b41225d48fd9a447e7f6ef3a8a7cc7ba9ef354 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125553 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit fc1e5202cbfb36b28b0e597811f39895c19ae6ba) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126588 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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/+/126524 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/+/126141
2021-11-29tdf#118045 PPTX export: fix proportional line spacingTibor Nagy
If line spacing differs from the default 100%, export it as direct paragraph formatting (similar to the other paragraph style properties). Change-Id: Id5db9ae36018c8a20b832470685bdfbba19d80f3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125438 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org> (cherry picked from commit 5db7694a6377d32bdef293b4ece27b471c3ea427) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125992 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2021-11-24tdf#124781 PPTX export: fix superscript and subscript positionsTibor Nagy
"Raise/lower by" character settings were saved incorrectly when the automatic checkbox is checked. Change-Id: Ia7260504cde85e14867936c83eaf8735142e2c53 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125302 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2021-11-24PPTX import: implement native handling of a color's luminance offsetMiklos Vajna
This was already handled in oox/ at import-time: this adds it to the doc model, including UNO API and PPTX import. This is a dependency PPTX export and UI, and also the last transform which is easy to generate from the PowerPoint UI and we didn't import to the doc model. Change-Id: Ica4e738d8dc8e0409160ceab941a82f2475ddc68 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125749 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-23O[U]String::replaceAt overloads that take string_viewNoel Grandin
which results in lots of nice string_view improvements picked up by the plugins Change-Id: Ib0ec3887816b3d4436d003b739d9814f83e244b2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125657 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2021-11-23PPTX import: implement native handling of a color's luminance modulationMiklos Vajna
This was already handled in oox/ at import-time: this adds it to the doc model, including UNO API and PPTX import. This is a dependency PPTX export and UI. Change-Id: I5d875b53d715beb10c13ef616d06cf958d43f70f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125684 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
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>
2021-11-22Use less DegreeN::get()Mike Kaganski
Change-Id: I97b8d6282c72307cc29a913af221d283523f2fae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125653 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2021-11-22PPTX: implement native handling of <a:clrScheme> childrenMiklos Vajna
This was already handled by converting them to raw colors at import time. This commit imports the color scheme contents (the 12 colors) into the doc model. This is a dependency to export them back to PPTX and to be able to update these colors on the UI by picking a different theme. Change-Id: I177de4f15d5f0e628669998d1cda7db24220b2eb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125651 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2021-11-20tdf#118776 drawingml: treat XML_nofill as (mostly) transparentJustin Luth
100% transparent typically ends up as COL_AUTO which certainly doesn't do what is intended. So set as 99% transparent to get effectively the same invisible effect. Adapted patch and re-used unit test from an earlier commit authored by Xisco. This depends on tdf#137438 not spamming the text properties with outline props. Only one existing unit test that matched this condition: -export-tests-ooxml1.cxx customxml.pptx -empty textbox - text entered here SHOULD be invisible. Change-Id: I077b748e500713188421f0eeefdfd85c46555e84 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125301 Tested-by: Jenkins Tested-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-by: Justin Luth <jluth@mail.com>
2021-11-19Use more basegfx::deg2rad<N> and basegfx::rad2deg<N>Mike Kaganski
Change-Id: I9dc57628b98f67994d546f6887e96389be1efe62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/125568 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>