summaryrefslogtreecommitdiff
path: root/xmloff
AgeCommit message (Collapse)Author
2023-04-21Fix some getImplementationNameStephan Bergmann
...to match the corresponding .component entries Change-Id: I58e9f3a137b31b5867817dc0f87190573c54c3ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150698 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-19add a route to get calc Floating Frame links under 'manage links'Caolán McNamara
much harder than writer because the organization and ordering of properties and object activation etc is different. This ended up ugly, but functions. We set FrameURL before AddShape, we have to do it again later because it gets cleared when the SdrOle2Obj is attached to the XShape. But we want FrameURL to exist when AddShape triggers SetPersistName which itself triggers SdrOle2Obj::CheckFileLink_Impl and at that point we want to know what URL will end up being used. So bodge this by setting FrameURL to the temp pre-SdrOle2Obj attached properties and we can smuggle it eventually into SdrOle2Obj::SetPersistName at the right point after PersistName is set but before SdrOle2Obj::CheckFileLink_Impl is called in order to inform the link manager that this is an IFrame that links to a URL Change-Id: I67fc199fef9e67fa12ca7873f0fe12137aa16d8f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-18create the FloatingFrameShape in a separate step to inserting itCaolán McNamara
this is derived from the path taken by the AddShape(const OUString&) function for this case. No change in behavior is intended. Change-Id: Id09ae0c65a55a37743ad7c184070fb8dd97d8a7f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-18fix brain malfunctionNoel Grandin
in commit 01a3cc1e55034f7703219d4bbb209de7c37bf07b Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Tue Nov 29 16:09:10 2022 +0200 tdf#133343 collect autostyle prop names before scanning for autostyles. That way we can collect only the property state we are interested in, instead of all properties. where I apparently wrote the code at the beginning of the call-chain to collect autostyle prop names, and I wrote the code at the end of the call-chain to filter on those names, but I never hooked it up in the middle. (which just means that the initial commit had no effect at all) Unfortunately, fixing the middle part results in unit test failures, so for now, just revert it. Change-Id: Ia1d655f70d2f5a1656e910d45817c3c4627b85fb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150531 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-18convert XmlShapeType to scoped enumNoel Grandin
Change-Id: I1fd3d995508eed507d07de11c4f60f05d075b84f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150528 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-18no need to perform lookup twice in XMLShapeExport::seekShapesNoel Grandin
Change-Id: I833da530fdc43233e14482a17a60beadb6ef6043 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150530 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-17Remove some unused includesMiklos Vajna
Mostly com/sun/star/frame/Desktop.hpp is unused after inheriting from UnoApiTest. Change-Id: I71b75fa5c880337ff294583b96af09c90b5059c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150514 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-17crashtesting: crash on export of forum-mso-de-102589.docx to odtCaolán McNamara
recurses to death Change-Id: I4474de502df0924176cbe8d6c9244d0b73838458 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150460 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-17xmloff: prefix members of SvXMLNumFmtExportMiklos Vajna
See tdf#94879 for motivation. Change-Id: I8aa01371f310bf928cb78f149ea25bf0835cd6aa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150465 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-04-17use more string_viewNoel Grandin
Change-Id: If4523dc2c89d1fb1c5e11665ee60044834fcecd4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150458 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-15just use a reference instead of an always dereferenced pointerCaolán McNamara
Change-Id: I105873fc890d67b39b796864f8eae4bd12aecd26 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150425 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-14loplugin:stringviewparam improvementsNoel Grandin
improve the check by checking for methods that exclude using string_view, rather than checking for methods that __can__ use string_view, which leads to exposing some holes in our o3tl/string_view.hxx coverage. Change-Id: Ic9dd60441c671f502692f9cd2a1bb67301c4b960 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-13remove unnecessary exportStyleFamily methodNoel Grandin
Change-Id: I59c75494ffd3f132a041beebb4336714c1e94143 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150338 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-13-Werror,-Wunused-variableStephan Bergmann
Unused ever since it got introduced in 463178fef5c22f1a04d10e54491852d56e2038b0 "xmloff, sw: ODF import/export of fieldmark separator". (Found with an experimental Clang build supporting __attribute__((warn_unused)) on individual ctors rather than just whole class types, and the corresponding css::uno::Reference ctor marked accordingly.) Change-Id: I8d665d12f923725773f6a55f7edee70ebc72e3ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150303 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-12xmloff: ODF import/export for style:overflow-behavior "clip"Sarper Akdemir
Adds initial support for style:overflow-behavior According to OpenDocument-v1.3-part3 style:overflow-behavior can take values of: - "clip" - "auto-create-new-frame" This patch doesn't properly implement support "auto-create-new-frame", only "clip". If "clip" is set, TextClipVerticalOverflow is set to true, causing the vertical overflowing text to be clipped. "auto-create-new-frame" is treated the same as omitting the style:overflow-behavior attribute, setting TextClipVerticalOverflow to false. Change-Id: Iea298f41fbf0cf18dc07f41788ba0b665515db8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150122 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12loplugin:stringview whitelist getLength and isEmptyNoel Grandin
Change-Id: I38f3410c0b25ff579879b9de1f266af4d8fd51e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150256 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-10Use more *string_viewMike Kaganski
Change-Id: I1172febd45da4dba006f8495427fe45c6d9b9fa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150187 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10crashreporting: getUsedFontList() crashCaolán McNamara
e.g. https://crashreport.libreoffice.org/stats/crash_details/3a3c07aa-0f96-4efa-b55b-c3fe4e4b6ed8 ... Crash Reason EXCEPTION_ACCESS_VIOLATION_READ Crash Address 0x0 ... XMLFontAutoStylePool::getUsedFontList() xmloff\source\style\XMLFontAutoStylePool.cxx:334 XMLFontAutoStylePool::exportXML() xmloff\source\style\XMLFontAutoStylePool.cxx:408 Change-Id: I5d057b8e639260f6d00e731c3af7bab7203a8814 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150177 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-09elide temporary OString in TokenMap::TokenMapNoel Grandin
Change-Id: I6c5ae545d559f408a1ffd5f0132ab0c9a52de4dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150166 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-08use shared_ptr for model::Theme instead of unique_ptrTomaž Vajngerl
Also change other cases to use the shared_ptr so there is no need to do copies and replace some of docmodel/theme/Theme.hxximports with forward declarations. Change-Id: I4588cb25e05e5f3e535011fffb68a8075b05aecc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147691 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-05avmedia,*: guess the mime type of media files based on file nameMichael Stahl
.. at least for the most popular types, and do it automatically in MediaItem::setURL(). This should work in practice in most cases and is much simpler than adding some type detection or calling into platform dependent avmedia backends. Remove the parameter that was only ever set to "application/vnd.sun.star.media" anyway, the same value that would be used if it's missing. Stop using that silly type for everything, only use it when guessing fails. In case an ODF document is loaded, it will use the mime type loaded from the file (see setting of MediaMimeType in SdXMLPluginShapeContext) and not guess it because that would require updating the entry in manifest.xml as well. Change-Id: I8ce29cf7425678ae11dda1d8c875be818f8623af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150049 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-04-03xmloff: prefix members of XMLTextParagraphExportMiklos Vajna
See tdf#94879 for motivation. Change-Id: I894665f1af47cf1e5f0f191bfdf3100e426fa6d1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149946 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-03-30loplugin:stringadd in xmloffNoel Grandin
when applying my upcoming patch to also consider O[U]StringBuffer Change-Id: Id38d983e59386554c61e9bdcd9333554bbf4665c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149756 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-27xmloff: prefix members of NameSpaceEntry, SinglePropertySetInfoCache, ...Miklos Vajna
... SvXMLAutoStylePoolP and SvXMLNamespaceMap See tdf#94879 for motivation. Change-Id: I306ceadd6d3753b76188fed3707b4df63c10bb8c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149621 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-03-24related tdf#102261: xmloff: ODF import/export for ParaTabStopDefaultDistanceSarper Akdemir
Introduces ODF import/export for ParaTabStopDefaultDistance (loext:tab-stop-distance). Also adds a unit test that covers import & export of the property. Change-Id: I8a69a9e2b73e8f1172f92dc35fada901f4b887f4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148540 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-23rtl::Static to thread-safe-staticNoel Grandin
Change-Id: Ife02e6d2be3ebfbb08522ab0183ef4aa31a99e19 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-23sc drawstyles: ODF import and exportMaxim Monastirsky
Change-Id: Id92088a7d70c550682fe707d81e94157edc7caa8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149330 Tested-by: Jenkins Reviewed-by: Maxim Monastirsky <momonasmon@gmail.com>
2023-03-16xmloff: ODF export: produce alt text and description for MediaShapeMichael Stahl
... and others where it was inexplicably missing (PluginShape, AppletShape, FrameShape). Change-Id: Idf1c44488370a81bc90fb316ab6056994d782a1c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148917 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-16XmlTestTools: factor out common codeXisco Fauli
Change-Id: Ie212c86c6c0ac20878be88d88ade5eb1c989942d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148935 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-03-13make more use of OUStringBuffer::append(OUStringConcat)Noel Grandin
where we can avoid constructing temporary OUStrings Change-Id: I0eacd68a8d1b450894c2ea769055f16886b78ad0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148780 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-10xmloff: fix -Wmaybe-uninitializedMiklos Vajna
In case operator >>=() of uno::Any fails, it leaves nTabIndex uninitialized and it seems gcc notices this sometimes: In file included from include/com/sun/star/uno/Any.h:30, from include/com/sun/star/uno/Any.hxx:35, from include/o3tl/any.hxx:21, from xmloff/source/text/txtparae.cxx:22: include/rtl/ustring.hxx: In member function ‘void XMLTextParagraphExport::ExportContentControl(const com::sun::star::uno::Reference<com::sun::star::beans::XPropertySet>&, bool, bool, bool&)’: include/rtl/ustring.hxx:3044:22: warning: ‘nTabIndex’ may be used uninitialized in this function [-Wmaybe-uninitialized] 3044 | return number( static_cast< unsigned long long >( i ), radix ); | ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ xmloff/source/text/txtparae.cxx:3999:20: note: ‘nTabIndex’ was declared here 3999 | sal_uInt32 nTabIndex; | ^~~~~~~~~ Change-Id: Ia39e85575bde4011247583265497ddf4d0d4c52b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148598 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-03-10Moved target-url and use-target-url into loext namespaceVojtěch Doležal
Change-Id: I4307a20f34543d4a187b5e59f117b43371f6f6fc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148559 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-08Bibliography Marks: Added tests for target-url and use-target-urlVojtěch Doležal
Change-Id: Iaebc9224beac1705bc2399358e414f526ad46e13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148392 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-07tdf#153396 - Bibliography marks improvementsVojtěch Doležal
Adds option to separate function of "URL" into (listed) "URL" and "Target URL" to allow for more flexibility (in that case if target URL is empty, bibliography mark hyperlink leads to bibliography table row if possible) When writing tests also found and fixed bug where exporting new file with anchor link bibliography mark crashes LO. Change-Id: Ic1b5c8c9590c0338dcfc4fa3a981142bddae0113 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147868 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-03tdf#153925 xmloff,sw: decorative flag on frame stylesMichael Stahl
* sw API SwXStyle property "Decorative" * UI checkbox "Decorative" - split up the GtkFrame to always show it * ODF import/export as loext:decorative on style:graphic-properties * test for ODF filters Change-Id: If124cb50ee7776b5807720e65f41a07e7b9f4cf9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148143 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-03-02allocate DocumentInfo inlineNoel Grandin
it is only one word big Change-Id: I8b5fec4f44fcdeb2c22c00db2323e7427b11d209 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148084 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28no need to allocate XMLTextColumnsArray_Impl separatelyNoel Grandin
an empty vector is only 2 words big Change-Id: I3e4a9d42b9ecb44c57ce11c400a17a4c8b053eca Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147972 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28no need to allocate tabstops vector separatelyNoel Grandin
an empty vector is only 2 words big Change-Id: Ib8309d0819c88fe6a4f7cd322c37dd52190bd060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147971 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-02-28tdf#114287 xmloff: ODF import: fix text:list override of list styleMichael Stahl
The problem is that the list element applies a list style, which should override the list style that's set in the common style "myStyleWithNumbering" of the paragraph, but these happend to be the same list styles and so the override was skipped, resulting in bad text formatting. <text:list xml:id="list3425910577850" text:continue-numbering="true" text:style-name="Numbering_20_123"> The same problem exists if the list-item element has a style-override. This is similar to bug i#101349 which fixed it for an automatic paragraph style applying the same list style as its parent style. Change-Id: Idc6f10f93976de7e7bdceccbe3012c4157f61ad1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147930 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-02-23sw floattable: teach the ODT filter about SwFormatFlySplitMiklos Vajna
Map the IsSplitAllowed text frame property to <draw:frame loext:may-break-between-pages="...">. This is meant to be always a direct formatting, so doesn't go to the style / autostyle. Change-Id: I439fe372271e4b7db511b5e2150e2a3c2e0acf25 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147499 Reviewed-by: Miklos Vajna <vmiklos@collabora.com> Tested-by: Jenkins
2023-02-16Drop 'using namespace ::std' in dirs [u-x]*Gabor Kelemen
Change-Id: I8c044369826b00241496cfc7ba2463e507c0d1a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147077 Tested-by: Jenkins Reviewed-by: Gabor Kelemen <kelemeng@ubuntu.com>
2023-02-15tdf#153179 ODP export regression: fix lost shape at missing objectTünde Tóth
If the object is missing, it's still possible to keep its shape by exporting its preview graphic, as before the regression. Regression from commit adc042f95d3dbd65b778260025d59283146916e5 "tdf#124333 PPTX import: fix Z-order of embedded OLE objects". See also commit 907da02bf8b33c080538731864225b3c44251328 "tdf#152436 PPTX export regression: fix lost shape at missing object" Change-Id: I614730435a857c6cdf01d4cdfc525fc452dffa29 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146247 Tested-by: Jenkins Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-02-01xmloff: import of theme structure + import/export/round-trip testsTomaž Vajngerl
Change-Id: I50e8c53c534895098613e81fd97b346fd3d7d05f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146287 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-31sd: use XTheme to transport the theme to xmloff import/exportTomaž Vajngerl
Refactor the existing places and tests in Impress code (sd) to use it instead. Also keep the old property of construction and view of the theme with a sequence of property values, but under the new property named "ThemeUnoRepresentation". This is needed by the UI tests currently. Change-Id: I484567f4a603f1a5e2e03955fdd2b63132dcc66e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146225 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-30tdf#118324 Treat blank ? in integerLaurent Balland
Restore and update change 56352 Test of https://cgit.freedesktop.org/libreoffice/core/commit/?id=8ca6468f0f4900d4d3bb45e0e938fe35c308512c is now ok Add disambiguation between '0' and '?' in integer part XML_MAX_BLANK_INTEGER_DIGITS is added for the number of '?' XML_MIN_INTEGER_DIGITS is the number of '?' and '0' This preserve compatibility with previous versions: in previous versions '?' will be transformed in '0' It also applies to scientific and fraction numbers. Integer part for number, scientific and fraction are treated the same way Include QA unit test Change-Id: Iab3127bf07223caac60e409306a1bee2edc37428 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145932 Tested-by: Jenkins Reviewed-by: Eike Rathke <erack@redhat.com>
2023-01-27move Theme class to own file inside docmodelTomaž Vajngerl
Also move Theme from svx to model namespace so it is consistent with other classes in docmodel. Theme header also includes ThemeSupplementalFont, ThemeFont, FontScheme classes that are used by the Theme and were also moved to docmodel. These may be moved to its own file in the future when they are used in more places. Change-Id: Ic409bea8e5298adc2b039b529c4f7b01cf64f03e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146221 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-25tdf#153161: (Ab)use a call to XTextRange::getString to flush editsMike Kaganski
Restore the call (without checking its returned value), removed in commit d194474aabd699806cb3631bc8641dd0548b8026 ("tdf#151100: xText->getString() may be empty for content needing export", 2022-09-22), side effects of which obviously allow some object's changes to get flushed and saved. Change-Id: I62f27cd056c32ad76f79a4862e2f4a0964eaadef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146106 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-01-24tdf#153090 xmloff: ODF import/export of source style on ToXMichael Stahl
For Table of Figures/Objects/Tables. Make this similar to DOCX: only one source style is possible, so omit the intermediate text:index-source-styles element. Also a boolean attribute like text:use-index-source-styles appears as unnecessary complexity, so try to do without. Change-Id: I7cb599c7ec1261ddedc196a25c3eafe35f35fbe9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146013 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2023-01-24xmloff: extract XMLThemeContext into own classTomaž Vajngerl
Change-Id: Iee30a84915148297ad5c105d29fdf48098261a9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146051 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-01-24tdf#150806 ODT export: fix fallback svg:width/height for zero layout sizeMiklos Vajna
The reported problem was that once tracked changes is enabled and an image is deleted, its aspect ratio changes on save. What happens here is that the image's frame is marked as a redline deletion, so when the ODT export writes the file, it'll have a zero size. But this zero size is nothing we should take into account on save, XMLTextParagraphExport::addTextFrameAttributes() expected to always have a valid layout size if the LayoutSize property is available. Fix the problem by adding one more condition where we ignore the layout size, which was already there since commit 80550ade305b9e68c6281a258d162bc2c413713a (tdf#150990 ODT export: fix zero layout size of scale/scale images, 2022-09-20). Note that this way the written side will be the original one, so only the aspect ratio will be correct, but that was accepted as a compromise earlier. Change-Id: I108dc2428ce0cb07a044bfef216575fdba19267b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146043 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>