summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2022-07-29cid#1507491 cut and paste typo triggering 'Constant' variable guards dead codeCaolán McNamara
Change-Id: I9b833575f3cc3ba886b355eefdfa9155d2dffae1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137587 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2022-07-29cid#1507492 Improper use of negative valueCaolán McNamara
Change-Id: I7c44307917df3397cfc9c99a982c54f51693e660 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137589 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-29Revert "tdf#141652 partial revert "Reset ShapeProperty priority..."Justin Luth
This reverts 7.4 commit 18cc1240565e697859dd7d17058f91d5e01df929. Someone backported it to 7.3 as well. Change-Id: Ie04595e11dd9d2e15fa940b8ada71714bd434f6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137581 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2022-07-28oox export: export line/fill and text props. of a data tableTomaž Vajngerl
Change-Id: I02a4c35693b599578e073d52a2d22ad59bc31786 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137409 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-26oox export: add export of basic properties of a data tableTomaž Vajngerl
Change-Id: I2c8b76125fc788a9e4df164171d6cbd351bc1c4a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137406 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-25tdf#135953 move txXfrm to compensate TextRotateAngleRegina Henschel
The text rectangle specified by the txXfrm element rotates around its center. We not directly use this rectangle but we use the text area rectangle of the preset geometry and crop it by setting distances so, that the result equals the txXfrm rectangle. But the text area rectangle still rotates at its original center. So we shift the txXfrm rectangle so, that it would be at it original place, when rotated with TextRotateAngle. We then can use the shifted one to calculate the needed distance values. This patch contains the calculation of the text area rectangle for type 'rightArrow' in addition. That fixes tdf#132302. Change-Id: I59d9aecaaa7ce2ef4502651088ff9576b90873f7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137396 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-07-25sw content controls, plain text: add DOCX importMiklos Vajna
- the core of this is the writerfilter/ change to call PopSdt() for SdtControlType::plainText, which maps inline plain text SDTs to Writer content controls, not to input fields - disable the grab-bag in this case, otherwise we would run duplicated <w:sdt> elements on export - fix CppunitTest_sw_ooxmlexport7's testSdtAndShapeOverlapping by postponing the SDT start in DocxAttributeOutput::WriteContentControlStart() in case a shape is anchored at the same position as the SDT start: if the shape should start inside the content control, then it should be anchored after the dummy character - reduce the debug output in VMLExport::Commit(), which could write control characters to the terminal on test failure, potentially breaking it (requiring a 'reset' to recover) - fix CppunitTest_sw_ooxmlexport5's testSdt2Run: now we merge two runs inside a plain text content control into a single one, and there is no problem with that, so adapt the test instead - fix CppunitTest_sw_ooxmlexport17's testTdf148361: plain text inline SDT is now a content control, not a field - fix CppunitTest_sw_ooxmlfieldexport's testfdo82492: explicitly assert that there is 1 text run inside the SDT and there is a shape after it (outside). Also extend DocxAttributeOutput::EndContentControl(), so it ends the content control at the correct, earlier position in case it's followed by an as-char shape - fix CppunitTest_sw_ooxmlfieldexport's testfdo82123: again assert that the SDT has 1 run with text, and there is a drawing after the SDT - fix CppunitTest_sw_ooxmlfieldexport's testTdf104823: this revealed that some more complex logic is needed to support data bindings, so exclude text-with-databinding from the scope of this commit and continue to map those to input fields for now - fix CppunitTest_sw_ooxmlfieldexport's testFdo81945: this had a similar problem as as-char shapes, but this time a new SDT is starting right after a previous SDT. Adapt DocxAttributeOutput::EndContentControl() accordingly, though perhaps this should be generalized later, so we always close SDTs in the previous run, unless this is the last run, or something similar Change-Id: Ifaf581be884a683de6c8b932008a03ba43734b75 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137399 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-07-24Fix typoAndrea Gelmini
Change-Id: Ia6c5e8615cc1438664f2208b6b1fc5f0383840ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137392 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-23tdf#149538 no text area rotation if upright exportedRegina Henschel
This is a followup to commit 7e23cbdb. With that commit the attribute 'upright' is correctly emulated by a rotation of the text area rectangle. But I forgot to remove this rotation when the 'upright' attribute is used on export. Change-Id: I46d0f421be8ef6b44537134c73dc1e4326ba7e1d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137368 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-07-22tdf#149697 PPTX export: fix changing place of connection pointsTibor Nagy
Place of the connection point of a polygon changed during a PPTX round-trip, connecting other vertices of e.g. a square or a hexagon, as before. See also commit c3f73f75772d076dfb2ed0538e7d515503edc038 "tdf#149128 PPTX export: fix <stCxn> and <endCxn> connector properties". Change-Id: I64fc6377417a99d32e84ea71fbed13cf36760118 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136474 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-07-22elide some makeStringAndClear() callsNoel Grandin
Change-Id: I3b80d0f5b6d39c071242bc6ccc1e4333886c835d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137309 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-21Fix typosAndrea Gelmini
Change-Id: I626c182fc8c9b8fd17000f3ab3739c1bfb334a37 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137243 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2022-07-21One more -Werror,-Wunused-resultStephan Bergmann
...similar to cf69bb4f503eb8b3966d5caf825e0c05264a369e "-Werror,-Wunused-result", after c6965c5bcc95430c2a2d01051791d23f2c2f5a5b "tdf#145528 add round1Rect to SmartArt text area corrections" Change-Id: I59292c7e4aae07be2ea46ae5c3db9629fa129a58 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137295 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-21tdf#145528 add round1Rect to SmartArt text area correctionsRegina Henschel
Some SmartArt types use text area rectangles different from defaults. The new rectangle is available in element <txXfrm>. This patch adds the needed corrections for type round1Rect. It is four times used in SmartArt 'Titled Matrix' with rotations 0deg, 90deg, 180deg and 270deg. Change-Id: I8c82b446a982ad93026e976b2a47d509b858858d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137287 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2022-07-21-Werror,-Wunused-resultStephan Bergmann
...when building against a recent libc++ that marks std::clamp [[nodiscard]], in code newly introduced in 7e23cbdbb6ec0247a29ed8a8f744c01e10963ea0 "tdf#149551 separate TextRotateAngle from TextPreRotateAngle" Change-Id: Ifdce627b5d76fac269f1403e7bb98d4576dfa682 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137257 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-07-20tdf#149551 separate TextRotateAngle from TextPreRotateAngleRegina Henschel
The import filter had only one member for both and had it mapped to TextPreRotateAngle. That resulted in lost text area rotation when a shape had both types of rotations, and sheared text when only text area rotation existed. The patch introduces a new 'moTextAreaRotation' member for the 'rot' attribute of the <bodyPr> element. It is mapped to 'TextRotateAngle' property. It becomes the 'draw:text-rotate-angle' attribute of the <draw:enhanced-geometry> element for a shape and 'style:rotate-angle' for chart elements in ODF. It must also be used to simulate 'upright' and is used for the 'rot' attribute in <txXfrm> of diagram shapes. The 'moRotation' member is now only used for the 'TextPreRotateAngle' property. That angle describes a rotation of the text without changing the text area. Valid values are multiples of 90deg. It is used for simulating vertical writing modes that are not yet implemented. It has no corresponding attribute in ODF. To make the meaning clear in code, the member is renamed to 'moTextPreRotation'. MS Office recalutes a diagram on file opening from layout.xml and data.xml. That is not yet implemented in LO, but we use drawing.xml, which gives the state of the diagram at time of saving. The patch handles the 'rot' attribute of <txXfrm> element as well. It has to be mapped to moTextAreaRotation, because it might contain angles, which are not multiples of 90deg, for example diagram 'Gear'. The <off> and <ext> child elements of <txXfrm> describe the actual used text area rectangle. The existing import calculates the difference of the actual used text area rectangle to the predefined one and incorporates it into the TextArea*Distance attributes. The patch adds calculating the current values of the text area rectangle as it would be using the preset markup. At that time in import there is no SdrObjCustomShape object, thus we cannot use its GetTextBounds() method. So it is down manually, covering most of those types, which are used in diagrams of MS Office. Remarks to unit tests: Now the rotation introduced by txXfrm is no longer in TextPreRotateAngle, but in TextRotateAngle. According changes are in SdImportTest::testN86510_2 Test, testFdo87488 Now the correct preset text area rectangles are used. That requires adaption of the needed distances. Done in SdImportTest::testBnc870237() SdImportTest::testTdf93830() SdImportTestSmartArt::testTdf134221() The buggy 'upright' export is fixed. Adaption in ScExportTest2::testTdf137000_handle_upright() Change-Id: I79df1559f88b76e96988fe745304dc4162de6316 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136447 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2022-07-17oox: support reading text and shape properties for a data tableTomaž Vajngerl
Change-Id: I740d3bd6af11457ecb54878be648ad1e22b9d4b8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137153 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-17oox: add data table and props. with the new UNO DataTable serviceTomaž Vajngerl
Refactor filling of the old data table UNO properties to use the new service DataTable and its properties. Change-Id: Iee611c88bec6f58a50b5ae09d3acffd16e0b6dd9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136790 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-07-17cid#1506711 Uncaught exceptionCaolán McNamara
and cid#1506712 Uncaught exception cid#1506713 Uncaught exception Change-Id: I8f9753369cb3c85e5f6b910b00aaf553db62750b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137144 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-07-14tdf#149985 pptx crash on a one-slide presentation (with a chart)Noel Grandin
regression from commit 04073c5fedd33654f242fecb7e39afb07cf0e273 Date: Tue Jun 21 13:17:09 2022 +0200 replace oox::OptValue with std::optional Change-Id: I830713495ca04771433018f1091faadf0f6bd71e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137051 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-12elide some temporary OUStringsNoel Grandin
Change-Id: I93ee61a04dfc1bb3dc758fd83a503f7374824ae8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136999 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-07-11tools: rename getHeight/Width() to GetOpenHeight/Width()Chris Sherlock
By default Rectangle uses closed interval, if we really want to use half open intervals then we should specifically say as such in the name. Change-Id: Id7a91120ba1a1a4bc330014216b73a692dbf03a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-06-30tdf#149785 Read Error importing documentNoel Grandin
after commit 04073c5fedd33654f242fecb7e39afb07cf0e273 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Jun 21 13:17:09 2022 +0200 replace oox::OptValue with std::optional and add a SAL_WARN to make this easier to diagnose in the future Change-Id: Ia5be0b82e3a5df34f50bc8a2decb1de98e0c5556 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136665 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-28use utl::TempFile directly in packageNoel Grandin
so we can (a) control the lifetime of the temp file properly and (b) we don't need to use file URLs which means we stay on the efficient path on Windows Change-Id: I2b1eed5f5afc8f89f53bde35ebb44e9922889817 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136557 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-27Integer division could cancel small values of wrong signMike Kaganski
... as seen at some documents where the values are like -1. There the checks in pushToPropMap may pass (the division result would be 0), but the original small negative values would fail the asserts that were introduced in commit 5772cef244dbee5834efbc693bc714d89ae6301d Author Mike Kaganski <mike.kaganski@collabora.com> Date Wed Jun 15 18:33:38 2022 +0300 tdf#134210: Reimplement cropping from srcRect and fillRect Change-Id: I114588862b5cfd2b2e4491424430cc139bdbaae9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136492 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-27tdf#149692 crash importing document with vba formsNoel Grandin
This bug appears to date back to commit a43cc9ec8dde4f311bcf8ff96e6a26d56b2abdcf Author: Noel Power <noel.power@suse.com> Date: Wed Apr 17 17:08:59 2013 +0100 implement MultiPage, Page & TabStrip import for oox Change-Id: Ia4784e4c34189f05e516704fa2e2485e4560fa4b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136500 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-27replace oox::OptValue with std::optionalNoel Grandin
Change-Id: I16e7179b2851640b4d73665685dcc1e84042ddaf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136270 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-25use SAL_WARN instead of printf for loggingNoel Grandin
Change-Id: Ic6134cae251b8096b720005b62ce282def6b7ac1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136368 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-24make oox::OptValue::value() assert if emptyNoel Grandin
as part of replacing OptValue with std::optional, we need to mimc the behaviour of std::optional::value(), which will throw bad_optional_access Change-Id: Icf5141cefd4623a6a1bb7b3a3449d3af382e01c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136365 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-24tdf#149311 PPTX export: fix internal hyperlink on textsTibor Nagy
by converting "Slide [digits]" URLs to slide[digits].xml See also commit 4142d728f003166ebe520bfdaf672505e585b807 "tdf#149314 PPTX import: fix internal hyperlink on texts". Change-Id: I39e095c960b04e728b3e28fa0a657d37d9c71ba1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135250 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-24almost nobody is using the oox::AttributeList::get methods properlyNoel Grandin
Most of the call sites just ignore the fact that we are returning an optional value here. Which means that when an attribute is missing, they get an empty string or zero. And we seem to be fine with that. So make a plugin that warns about calling value() on a temporay OptValue. And add a utility method so we don't have to pay the cost of passing a default value to getString() The need for this is driven by wanting to change to std::optional, which will throw an exception if code attempts to read an empty std::optional Change-Id: Idb0a5ad1eac66b5caa93d6195928bad9e0b2ad70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-23tdf#149314 PPTX import: fix internal hyperlink in editorTibor Nagy
Hyperlinks on text weren't imported correctly if the linked slides have default slide name, resulting broken links in the editor (hyperlinks work well in slide shows without this fix, too). Change-Id: I797fa94134c1346bc83729c713e65b2a268a14c2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135245 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-23tdf#149126 fix export of PPTX preset shapesTibor Nagy
Follow-up to commit 63cd67e5e18f01aca303131e148c80398a181a41 "tdf#92525 tdf#142398: fix export of simple custom shapes" and commit 744e6c0b758fefe6011f09860b44f03ab70fbcfe "tdf#147459 PPTX: add "glue points" to some basic shapes". Thanks to Regina Henschel for the code pointer. Change-Id: I378ffffc2ba09fcffcaa4e5dcf74bfd19e9f704d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135361 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-06-22rename oox::OptValue::get to valueNoel Grandin
as a step in replacing OptValue with std::optional Change-Id: Ia5d05c28a88beaced11ae1d0414de66106cc9e20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-22rename oox::OptValue::get(Type) to value_orNoel Grandin
as a step towards replacing OptValue with std::optional Change-Id: Ic4afaca87034b1b794432ee4261a6495058b26fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136268 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-22make oox::OptValue::assignIfUsed a free functionNoel Grandin
as a step towards making OptValue into std::optional. Change-Id: I3eae4034a846dd63a16e501abe4a6eba9d186a49 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136266 Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-22remove OptValue(bool,Type) constructorNoel Grandin
as a step towards converting it to std::optional Change-Id: I6f377967f2a495d8c29979444607c991aaaf5d63 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136267 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-22replace oox::OptValue::useNoel Grandin
with emplace and operator* as a step towards converting it to std::optional Change-Id: I3fca397c7dcfe200962e2b81a423322e29787f20 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136215 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21remove oox::OptValue::setNoel Grandin
as a step towards converting it to std::optional Change-Id: I49db0b13338388c92108fc2c27d8e662dcd954d7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136214 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21remove oox::OptValue::differsFromNoel Grandin
as a step towards converting it to std::optional Change-Id: I198abb4ae85b1d82f465577ebd0eec37b78c1111 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-21rename oox::OptValue::has() to has_valueNoel Grandin
as a step towards converting it to std::optional Change-Id: I9b2201c29827fcddae3b46480065c90b2907e6cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136210 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2022-06-18o3tl: ensure that the initializer of enumarray contains enough elementsMichael Stahl
Currently this silently succeeds. Turns out oox already contains some too-short initializers, let's guess the missing properties are all invalid. One downside of the templated parameter pack approach in the enumarray ctor, as witnessed in vcl/win/window/salframe.cxx, is that argument types can no longer be implicitly deduced and thus need to be spelled explicitly now in certain cases. There were also three uses of enumarry with V being unsigned short (aka sal_uInt16) that started to cause narrowing conversion errors now and needed to be adapted: In editeng/source/uno/unonrule.cxx the obvious fix was to use the proper type for V. In sw/source/core/unocore/unosett.cxx with its odd mix of saL_Int16 and USHRT_MAX, lets keep things that way for now (probably awaiting later clean up) and use casts to avoid the implicit narrowing. And in sw/source/filter/ww8/wrtw8esh.cxx the ESCHER_Prop_* values, while presumably conceptionally of type sal_uInt16, are plain #defines (thus of type int), so rather than changing V to int it looked more consistent to explicitly cast the ESCHER_Prop_* vlaues to sal_uInt16. (And in tools/source/fsys/urlobj.cxx the poor loplugin:redundantfcast started to unhelpfully kick in for (only) the first argument now.) Change-Id: If06c29e673ec7e565e283c6f447889cf1f777cb7 Co-authored-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135970 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2022-06-17tdf#134210: Reimplement cropping from srcRect and fillRectMike Kaganski
This avoids the scaling after the crop, since scaling is performed anyway when applying BitmapMode_STRETCH. This improves resulting bitmap quality. Also consider the "crop to zero" case (when the sum of cropped parts is equal to 100%). In that case, just use an empty graphic as the fill bitmap. This makes the differences between srcRect and fillRect processing explicit, simplifies the code, avoids extra rounding inaccuracies, and takes care of the edge cases that were considered in commit 2859ec288f2c1323ea3123d82cb1684b349ff598 Author Miklos Vajna <vmiklos@collabora.com> Date Wed Jun 15 15:52:18 2022 +0200 oox: fix div by zero in lclCalculateCropPercentage() The change in SdImportTest2::testTdf134210 is because we now don't scale the cropped image. The previous value was an interpolated color, while the new value is the actual color of pixel [0, 41] of the original image. Change-Id: I24fa9928cff32bcaa6a7b3e34def14700fddd7ca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135917 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-16tdf#128150 Add OOXML import/export for "use background fill"Samuel Mehrbrodt
and allow editing this fill property in area dlg Change-Id: Ic63ba11e9d499d4a0fb22f6739587e3e25140b8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134406 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2022-06-16Correct parsing of ST_PercentageMike Kaganski
Change-Id: I227b2abd493d3a4ce6f4e4dcd256aa29653fdce0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135886 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2022-06-15oox: fix div by zero in lclCalculateCropPercentage()Miklos Vajna
Similar to what oox::vml::ShapeType::getAbsRectangle() already does. Crashreport signature: Fatal signal received: SIGFPE code: 1 for address: 0x7fcd55eeff59 program/libooxlo.so oox::drawingml::GraphicProperties::pushToPropMap(oox::PropertyMap&, oox::GraphicHelper const&, bool, bool) const oox/source/drawingml/fillproperties.cxx:103 Change-Id: I0f82cbc955d9e60bad103682638b07153a5589e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135910 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2022-06-13crashtesting: assert seen on loading forum-mso-en-2633.pptxCaolán McNamara
probably since: commit 855a56fea4561135a63cb729d7a625a950b210e7 Date: Fri May 13 08:12:17 2022 +0200 tdf#148965 PPTX import: fix internal hyperlinks on shapes Change-Id: I920cbbb5544cbe9d76f37b3d524c9ccebd426132 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135682 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2022-06-08tdf148321: convert OOXML inset values to text distance valuesTomaž Vajngerl
Inset values for top, bottom are calcualted differently in OOXML and need to be coverted on import to the text distance LO values, that place the text relative to the shape correctly. At export, the values can be converted back to the OOXML inset compatible values, but the values are not always converted back to the same values as the conversion is not bijective, however they do render the same. This also adds the test for the conversion when importing and checks that the exported values are expected. Change-Id: Ic64eec1a2a80ddad997f916da3e87dc30aaa12be Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135463 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2022-05-31tdf#147991 PPTX export: fix bullet indent regressionAttila Bakos (NISZ)
Instead of exporting the inherited master slide indent values of the placeholders, export 0 indent value for removed/disabled bullets to fix interoperability. Regression from commit f57cfddb51b7d7409b7b425dc200aa73406a13bd "tdf#145162 PPTX export: fix extra bullet regression". Change-Id: Icbf823adc07f19fd10d1a60da9cff17616a2aef6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135025 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2022-05-31Revert 6eeb0942c35f07dfbadb13f35fc6aa3703dac945Thorsten Behrens
Change-Id: I096f25d38f19fb728110e209a189f89a8e8d402f