summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2023-04-14Fix typoAndrea Gelmini
Change-Id: I36ff6c3ccec07426b1a59b823f90882d817e6e13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150399 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-14Fix typoAndrea Gelmini
Change-Id: Ib001ad971640f6e76a8e58549edbe3fb4b248e6f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150400 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-14Fix typoAndrea Gelmini
Change-Id: I9ff6b3a0720e9edec11edc0c81ba2995a3aad5e8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150401 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-14Fix typoAndrea Gelmini
Change-Id: I13fc79ab0fc9ede2a977424627fca0765ad90f1f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150398 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-14Fix typoAndrea Gelmini
Change-Id: I6d2119f12d92572ec89db3773196896f28b35319 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150396 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-14Fix typoAndrea Gelmini
Change-Id: I99f24d3df72385ea650abb2224a724892146f220 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150397 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-04-14MCGR: Adaptions to oox exportArmin Le Grand (allotropia)
This is a 1st version and might need more fine-tuning, so it is still 'hidden' behind the MCGR_TEST env var being set (as the import is, too). Still, when used, it can now import a MCGR with transparence and export it again. I will now do extended testing/experimenting, fine-tuning where needed and prepare final change/drive forward. The current state in master should not be changed as long as the mentioned env var is not set, but this will need to be checked, too, due to changes to the export api in oox. Corrected an error in GetAlphaFromTransparenceGradient method(s), css::rendering::RGBColor is [0.0 .. 1.0] Corercted an error in WriteSolidFill where transparence gradient gets checked. This should really check if TrGr is used, but only checks for 'empty/unused' color instead (assuming COL_BLACK is 'unused'). All usages of GetAlphaFromTransparenceGradient should be checked and adapted. Change-Id: If59d7a06b9207e2efe9e71f3f8ddeca4476408f3 Change-Id: If97f8abdd0e1597aa1fd865b7e884e06a22b71f5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150391 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.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-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-12OUString::intern is a relicNoel Grandin
and a pessimisation. Remove usage thereof. Change-Id: I98f6197aa375349b909a7ef1403ec06ca37890d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150269 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-12oox: add model::EffectStyle and import effect style elements of a themeTomaž Vajngerl
Extends the SwCoreThemeTest with effect style use-cases- Change-Id: Ifcb96a860fcbc0aae65e8ec276e069f7f60fb950 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149361 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12oox: add model::LineStyle and import line style elements of a themeTomaž Vajngerl
Also extend the SwCoreThemeTest with asserts for the LineStyles for the example theme. Change-Id: I72aa64345d39fea84544e39b0a37a22f3e6baa5d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149360 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12oox: add model::BlipFilll and import blip (graphic) fill elementsTomaž Vajngerl
Change-Id: I610b732b1fd4eebcfcc55acb6f04a8acf84f92b7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147954 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-12oox: add model::PatternFill and import pattern fill elementsTomaž Vajngerl
Change-Id: I49ef33fd81509599f4081e6a913b05dae1e4a642 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147953 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-11tdf#154469 DOCX export: fix hyperlink in group shapeTünde Tóth
Hyperlink inserted to shape lost after export, if the shape was inside a group shape. Follow-up to commit 7f4f88b883f81fbce975f72aea0f66a54e269ead "tdf#145147 DOCX import: fix hyperlink in group shape". Change-Id: I48b582c04b6f779cb5393179f65a32d7a7eca5ce Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149716 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-04-11tdf#154363 sd: fix line connectors regression of mirrored shapesTibor Nagy
caused by commit cbf66ec3e60d07efb7c3cceed9b4f0fb4f0510c8 (tdf#89449 PPTX import: fix line connectors). Note: partial revert of commit 9ab16e2738b4b9bd324c9aded8acb2ecba0fd2b0 "oox: fix crash in lcl_GetGluePointId by removing unused code". Change-Id: Icc45c93c4fa3a22c0f34866ccb64ea6b9037d936 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149676 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2023-04-11avoid some OString<->OUString back and forth conversionNoel Grandin
Change-Id: I20d2611ca88df7daca7c56e7475fb85f98fbf888 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150226 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-11Avoid UB converting from double to sal_Int16Stephan Bergmann
...e.g. during CppunitTest_sd_import_tests, > /oox/source/drawingml/colorchoicecontext.cxx:280:78: runtime error: 35000 is outside the range of representable values of type 'short' > #0 0x7f3b8abf6278 in oox::drawingml::ColorValueContext::onCreateContext(int, oox::AttributeList const&) /oox/source/drawingml/colorchoicecontext.cxx:280:78 > #1 0x7f3b8abf6534 in non-virtual thunk to oox::drawingml::ColorValueContext::onCreateContext(int, oox::AttributeList const&) /oox/source/drawingml/colorchoicecontext.cxx > #2 0x7f3b8a94baff in oox::core::ContextHandler2Helper::implCreateChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx:100:34 > #3 0x7f3b8a94eabb in oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx:204:12 > #4 0x7f3b8a950484 in non-virtual thunk to oox::core::ContextHandler2::createFastChildContext(int, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastAttributeList> const&) /oox/source/core/contexthandler2.cxx > #5 0x7f3b43e81c45 in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:164:67 > #6 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #7 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #8 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #9 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #10 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #11 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #12 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #13 0x7f3b43e8299e in DOM::CElement::fastSaxify(DOM::Context&) /unoxml/source/dom/element.cxx:181:20 > #14 0x7f3b43df8a50 in DOM::CDocument::fastSaxify(DOM::Context&) /unoxml/source/dom/document.cxx:289:20 > #15 0x7f3b43e117af in DOM::CDocument::fastSerialize(com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastDocumentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastTokenHandler> const&, com::sun::star::uno::Sequence<com::sun::star::beans::StringPair> const&, com::sun::star::uno::Sequence<com::sun::star::beans::Pair<rtl::OUString, int> > const&) /unoxml/source/dom/document.cxx:1023:9 > #16 0x7f3b8aa55f81 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, com::sun::star::uno::Reference<com::sun::star::xml::sax::XFastSAXSerializable> const&) /oox/source/core/xmlfilterbase.cxx:470:23 > #17 0x7f3b8bd30d0f in oox::ppt::PresentationFragmentHandler::importSlide(unsigned int, bool, bool) /oox/source/ppt/presentationfragmenthandler.cxx:357:41 > #18 0x7f3b8bd3cd16 in oox::ppt::PresentationFragmentHandler::finalizeImport() /oox/source/ppt/presentationfragmenthandler.cxx:543:17 > #19 0x7f3b8a9f79ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #20 0x7f3b548344f0 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:897:36 > #21 0x7f3b54855150 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1469:13 > #22 0x7f3b8a97ff11 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #23 0x7f3b8a9806a8 in oox::core::FastParser::parseStream(com::sun::star::uno::Reference<com::sun::star::io::XInputStream> const&, rtl::OUString const&) /oox/source/core/fastparser.cxx:129:5 > #24 0x7f3b8aa548a4 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:412:21 > #25 0x7f3b8aa531fd in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:342:12 > #26 0x7f3b8bcbaf54 in oox::ppt::PowerPointImport::importDocument() /oox/source/ppt/pptimport.cxx:109:17 > #27 0x7f3b8a99493c in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #28 0x7f3b8bcbe067 in oox::ppt::PowerPointImport::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/ppt/pptimport.cxx:192:24 > #29 0x7f3b7a89c1c6 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2272:34 > #30 0x7f3b82834e18 in sd::DrawDocShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sd/source/ui/docshell/docshel4.cxx:429:39 > #31 0x7f3b7a85bd64 in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:739:23 > #32 0x7f3b7aa63c10 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1940:36 > #33 0x7f3b7b1c142c in (anonymous namespace)::SfxFrameLoader_Impl::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&) /sfx2/source/view/frmload.cxx:720:28 > #34 0x7f3b4ff0f5fb in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #35 0x7f3b4ff059fb in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #36 0x7f3b4fefd8bc in framework::LoadEnv::startLoading(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&, com::sun::star::uno::Reference<com::sun::star::frame::XFrame> const&, rtl::OUString const&, int, LoadEnvFeatures) /framework/source/loadenv/loadenv.cxx:308:5 > #37 0x7f3b4fef8c50 in framework::LoadEnv::loadComponentFromURL(com::sun::star::uno::Reference<com::sun::star::frame::XComponentLoader> const&, com::sun::star::uno::Reference<com::sun::star::uno::XComponentContext> const&, rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/loadenv/loadenv.cxx:168:14 > #38 0x7f3b4ffc334d in framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx:593:16 > #39 0x7f3b4ffc3576 in non-virtual thunk to framework::Desktop::loadComponentFromURL(rtl::OUString const&, rtl::OUString const&, int, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /framework/source/services/desktop.cxx > #40 0x7f3b5feedd95 in unotest::MacrosTest::loadFromDesktop(rtl::OUString const&, rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /unotest/source/cpp/macros_test.cxx:71:62 > #41 0x7f3b75b0aef9 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:115:11 > #42 0x7f3b75b0baf4 in UnoApiTest::loadFromURL(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:127:5 > #43 0x7f3b95d2f402 in SdModelTestBase::createSdImpressDoc(char const*, char const*) /sd/qa/unit/sdmodeltestbase.hxx:54:13 > #44 0x7f3b95d025c8 in testBnc584721_1::TestBody() /sd/qa/unit/import-tests.cxx:1281:5 (<https://ci.libreoffice.org/job/lo_ubsan/2741/>). Presumably it was just a typo that f707834e8538c0a183716b26ebdf04381482ca6d "oox: write color transforms to model::ColorDefinition" used 10.0 rather than 10 as divisor. Change-Id: I42de6daaa6db86bf4444243ec2c9173d6d514b02 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150216 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2023-04-10Use of O(U)StringNumber for float/double is actually a pessimisationMike Kaganski
They use rtl_(u)str_valueOf(Float|Double), to fill the buffer, and the latter use doubleToString, which creates an rtl_(u)String, copies to the buffer, and releases the rtl_(u)String. So instead just use the rtl_(u)String from rtl_math_doubleTo(U)String directly. Even when the end result is not needed as O(U)String, this would avoid an extra copy step. Also, this avoids separate LIBO_INTERNAL_ONLY implementations. Change-Id: Ib1d9ecebd7876dfff7dc758f89ee4c1536647a50 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150150 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-10pptx import/export: consider TextClipVerticalOverflow for vertOverflowSarper Akdemir
Also adds a unit test that tests TextClipVerticalOverflow on 4 different scenarios. Change-Id: I6232935765641c796046d90fe2207d67ae4b3eb5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150107 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-09new loplugin:unnecessarygetstrNoel Grandin
which prevents constructing unnecessary temporaries via getStr() Change-Id: I9ca70893a10e954b5ee0e6ad6098660ee24c2bef Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150170 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-04-09cid#1524676 try to convince coverity of the error of its waysCaolán McNamara
Change-Id: I098636732a3f704c9743cce93d7ba248455c9212 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150168 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-09oox: write color transforms to model::ColorDefinitionTomaž Vajngerl
Change-Id: I438c10b5181ffd20f2aa041479da2df62a92b156 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147952 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-08oox: add FormatScheme test case and make sure FillStyle is imortedTomaž Vajngerl
Extends ThemeTest in sw with the use cases relevant for import of FormatScheme into the model::Theme (as much as it is implemented currently). Change-Id: I888f64c24ba455913d688be256f095d9c298dc2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147693 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-04-08oox: add model::Theme to oox::Theme and remove createSvxThemeTomaž Vajngerl
This is the start of the change where oox::Theme is only a holder of model::Theme and not a oox structure. This is probably the easiest way how to refactor that. In this commit only prepare that and make the code work the same as it did before. Change-Id: I926a35fd0db383ddb182dc83b36411b2d40b8530 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147692 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
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-06Use more *string_viewMike Kaganski
Change-Id: Ic82bbb1b8d6b03066e66f5eb93e9a94b16b1a9f2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150072 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-04-06cid#1524677 attempt to silence Explicit null dereferencedCaolán McNamara
ctor iterator to point to start of container Change-Id: I37f55b572d76958cf0b8ea5139ccd291ef546c65 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150104 Tested-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2023-04-06tdf#145538 Use range based for loopsektagoel12
Change-Id: Ib74318a36898270c7b6e45e5e064ddd696a91be8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/145905 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2023-04-06oox: drop macrosXisco Fauli
Change-Id: Ic8eeb34bef91807b54823a4114acc1200bec9de9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150065 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
2023-04-06oox: fix crash in lcl_GetGluePointId by removing unused codeXisco Fauli
See https://crashreport.libreoffice.org/stats/signature/oox::drawingml::lcl_GetGluePointId Change-Id: I7737568b12a18a2195f24f023917d30dd838ea12 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150064 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
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-02MCGR: 1st additions to OOXML MCGR importArmin Le Grand (allotropia)
This change provides 1st changes to get Gradients with muti color stops imported from MSO in the oox import filter. It supports currently multiple ColorStops and transparency. Also 'border'(s) should work, but -remember- this is work in progress. Since it is work in progress it is currently and temporaily secured by ENV VAR "MCGR_TEST=0", so when not using this the master version will not be touched at all. The number defines various ColorStop tests, 0 for none, but some changes are active, e.g. MSO import. You may try 1 or 16 to see all your Gradients hard replaced by something using that feature. I will take care fo cleaning this up again when the feature progresses/gets complete. Change-Id: I92e10d8cd5150733741a6def20a542abf97bd903 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149682 Tested-by: Jenkins Reviewed-by: Armin Le Grand <Armin.Le.Grand@me.com>
2023-03-27tdf#145147 DOCX import: fix hyperlink in group shapeTünde Tóth
Hyperlink inserted to shape lost, if the shape was inside a group shape. Test: ungroup the grouped shape and move the mouse over the shapes, or use Edit Hyperlink... in their context menu. Change-Id: I45d816f18a1e1bc1c442943b31c9e0ae7de199e6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148552 Reviewed-by: László Németh <nemeth@numbertext.org> Tested-by: László Németh <nemeth@numbertext.org>
2023-03-27tdf#153362 oox: remove dead link from ooxml-export-notes.txtIlmari Lauhakangas
Change-Id: Iccb91f586bdbd2533f7684a9ef0307d8e492a7a6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149627 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2023-03-27loplugin:stringadd in oox..pyunoNoel Grandin
after my patch to merge the bufferadd loplugin into stringadd Change-Id: I5fdc0a33923fe00e7b588f4576607515a93e5c13 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149579 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-27tdf#153466 PPTX import: fix "Custom position/size" background imageTibor Nagy
Custom sized background with the value "tile" was imported as "stretched", losing the preset size. Restore also the exported preset positions, and map the other values to the preset positions supported by OpenDocument/Impress. Follow-up to commit 11451781d4c562f506a3aae3732e35b92387b4db (tdf#153105 PPTX export: fix "Custom position/size" background image) Change-Id: Ibf9b487ecd31b3ad7b06bda668c51e6b7a98c4af Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148482 Tested-by: László Németh <nemeth@numbertext.org> Reviewed-by: László Németh <nemeth@numbertext.org>
2023-03-26tdf#90407 Change the auto-fit alg. to match better with OOXMLTomaž Vajngerl
The auto-fit algorithm has been tweaked to be more in-line with the expectations of OOXML. This means a couple of changes to what properties are scaled by the algorithm have been made: - most properties that influence the X axis position or size (for example indent) are not scaled down or changed by scaling. - properties that influence y axis position and size are scaled by a separate parameter (like in the OOXML). This is used in the auto-fit algorithm in a different way. - if line spacing is proportional, it is now scaled with the spacing parameter. Fixed line spacing doesn't get scaled. - the main scaling X,Y parameter only scales the fonts. - trying hard to scale the fonts to the nearest pt (point) value With this change the scaling is much more stable than it was before - for example it doesn't matter what the unscaled font size is, when it is scaled down to the text box size, it (should) always look the same (for example scaling from 32pt -> 10pt or 64pt -> 10pt or even 999pt -> 10pt). The algorithm is also rewritten to be better at finding a fit and is also better at find a good fit, but it can take more iterations by doing so (there are ways to improve it however). Previous algorithm used a linear search to converge to the best fit in less iterations, but the issue with that was that it could in some cases miss a solution (especially since change to floating point scaling parameter). The new algorithm now uses a binary search - always trying the middle of the search space. OOXML export and import was also changed to take advantage of the font scaling and spacing scaling parameters. The additional scaling at export that was needed to have consistent OOXML support was removed. Change-Id: I8f3bb8d43a01931f18bd7ffdf8e0ba40caa73d8b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149207 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.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-23oox: import gradient fill to model::FormatSchemeTomaž Vajngerl
Change-Id: I90bc7cf4239f08efbc7239928c34ccdbec20cb2c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147575 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-22oox: introduce FormatScheme - use in Theme importTomaž Vajngerl
Introduces model::FormatScheme as an member of model::Theme, which is used in the theme import. As an first step it imports FillStyleList, but only SolidFill and NoFill. Change-Id: I14a75782ebabcf7ff69b0872752d411183653a47 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147573 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-03-20tdf#154071 UI rename gradient back to 'Rectangular'...Regina Henschel
Commit e97e62a4707e09739f9c00f8fc4a943f0123a9cf had wrongly changed 'Rectangular' to 'Square' (API RECT, ODF rectangle) and 'Square' to 'Quadratic' (API SQUARE, ODF square). This patch reverts 'Square' to 'Rectangular' and 'Quadratic' to 'Square (Quadratic)'. It uses 'Square (Quadratic)' instead of simple 'Square' to help users to find the correct type. In addition, use of the wrong type names in comments is fixed. Change-Id: Ibbd90be2cceb65c9857e473cb74c39df1b9530f1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149004 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-03-18loplugin:stringadd use more O[U]StringCharNoel Grandin
Change-Id: I196e4539ad430a39415eff9d7170b33df7228230 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149062 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-03-16tdf#102261: pptx export: implement defTabSz ParaTabStopDefaultDistanceSarper Akdemir
Adds export of ParaTabStopDefaultDistance property into defTabSz. Also adds a unit test that checks pptx roundtrip of the property. Change-Id: I5be9ea88b15e3e8cab25af79488983a71b96dae1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148539 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-16tdf#102261: pptx import: handle defTabSzSarper Akdemir
Introduce import of defTabSz using ParaTabStopDefaultDistance. Change-Id: Ied59c2bc5d9dfffa6254ef87849c3dbad4c48d07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148059 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
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-14tdf#139618 Add WordArt fill types in pptx importRegina Henschel
This fix uses a similar approach as in WpsContext::onEndElement, only that here moTextOutlineProperties and maFillProperties are still available whereas in WpsContext the properties need to be collected from CharInteropGrabBag. I have adapted unit test testTdf125573_FontworkScaleX because now the gradient is imported, see comment in former version of the test. Change-Id: I989ee475867c97b9f93c7e65cd25483611eec7bf Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148687 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-03-11Fix typoAndrea Gelmini
Change-Id: Id5fdd50fb17dc62281f986ddb79e417705b0c194 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148546 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-11Fix typoAndrea Gelmini
Change-Id: I815a6871546a6010601054983560ecfb7ec21239 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148544 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-03-11Fix typoAndrea Gelmini
Change-Id: I7508ed457b2aa17bb199b135c6dff89909d4729a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148543 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>