summaryrefslogtreecommitdiff
path: root/oox
AgeCommit message (Collapse)Author
2024-02-10tdf#141908: replace usage of sal_Int32 with colorsvarshneydevansh
Change-Id: I71d94239c155f41d4535c023ea3aa8f974fcf2da Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163082 Tested-by: Jenkins Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
2024-02-06elide some OString temporariesNoel Grandin
Change-Id: I2ecb6af11c95605c84e935b850fe94a1831a1497 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/163043 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2024-02-02sw: do not redline ContentControl itemsAshod Nakashian
When we redline the ContentControl item itself, we break docx XML. Instead, we only need to redline the placeholder, which we already do. This simply disables redlining when inserting the ContentControl item while leaving it otherwise enabled while inserting the placeholder. Before: <w:body> <w:p> <w:pPr> <w:pStyle w:val="Normal"/> <w:rPr></w:rPr> </w:pPr> ==> <w:ins w:id="-1" w:author="Unknown Author" w:date="2024-01-24T19:43:08Z"> <w:sdt> <w:sdtPr> <w12:checkbox> <w12:checked w14:val="0"/> <w12:checkedState w14:val="2612"/> <w12:uncheckedState w14:val="2610"/> </w12:checkbox> </w:sdtPr> <w:sdtContent> <w:r> <w:rPr></w:rPr> </w:r> ==> </w:ins> ==> <w:ins w:id="0" w:author="Unknown Author" w:date="2024-01-24T19:43:08Z"> <w:r> <w:rPr></w:rPr> <w:t>☐</w:t> </w:r> ==> </w:ins> <w:r> <w:rPr></w:rPr> </w:r> </w:sdtContent> </w:sdt> </w:p> </w:body> The first <w:ins> and its closing tag is not seen in the reference docx file, and we can see that it's invalid XML here. After: <w:body> <w:p> <w:pPr> <w:pStyle w:val="Normal"/> <w:rPr></w:rPr> </w:pPr> <w:sdt> <w:sdtPr> <w12:checkbox> <w12:checked w14:val="0"/> <w12:checkedState w14:val="2612"/> <w12:uncheckedState w14:val="2610"/> </w12:checkbox> </w:sdtPr> <w:sdtContent> <w:r> <w:rPr></w:rPr> </w:r> ==> <w:ins w:id="0" w:author="Unknown Author" w:date="2024-01-24T19:43:08Z"> <w:r> <w:rPr></w:rPr> <w:t>☐</w:t> </w:r> ==> </w:ins> <w:r> <w:rPr></w:rPr> </w:r> </w:sdtContent> </w:sdt> </w:p> </w:body> Only the valid <w:ins> around the placeholder exists. Signed-off-by: Ashod Nakashian <ashod.nakashian@collabora.co.uk> Change-Id: I1404e41aec3b5efdc2e4115236102ffa2733b15c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162802 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-02-01tdf#154587: allow directory entries in ZIP packagesMike Kaganski
The problem in the bugdoc was the directory entries. These entries are valid in ZIP packages (even if not common); they may be useful to e.g. define per-directory permissions (ACLs). In normal mode, ZipFile reads central directory; there we can read if the entry has FAT file attributes; and then, if the entry is a directory. Then it is OK to skip it. In repair mode, central directory is not used, local file headers don't contain a "directory" flag. A workaround is used, checking if there are entries that represent directories of other entries. Also this change fixes some places that didn't pass the recovery flag correctly. Change-Id: I324671841a2c4d0f279b03801d95c8f2eeb99b46 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162888 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-02-01check that rtl_random_getBytes() was successfulMichael Stahl
... everywhere it is used to generate material for encryption. Change-Id: Id3390376bb2f3a5fa1bbfd735850fce886ef7db2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162873 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
2024-01-30tdf#146756 pie chart2 import: use manualLayout Width for pie chart labelsJustin Luth
... and use a compatible 1/5 width if not specified. This patch depends on the previous oox patch (commit 301e27cbebf7d6e4c9b82290d7cd555c43f0c999) which actually reads the width into the model. Fixes a 7.2 regression from commit b0068342398786ca50304260434a18880dddf74d author Tünde Tóth on Wed Dec 16 18:26:26 2020 +0100 tdf#138777 pie chart: improve long data label width and is basically a re-write of 7.1's commit 20da1a5dd37c7edac620566c992d5a53b23a5f12 author Tünde Tóth <toth.tunde@nisz.hu> on Fri Oct 09 09:24:18 2020 +0200 tdf#134978 Chart OOXML Import: fix pie chart label custom position This is very risky, but then ANYTHING changing chart2 is risky. There were a lot of changes made in 7.1, and they all invited regressions. However, our chart implementation is not in a good state, and certainly is not very interoperable, so it is worth taking the risk. Anything dealing with manualLayout at this point should have originated as a pptx, so forcing a compatible max width should be fairly safe. It probably isn't actually all that risky after all. largely copied code from commit 4223ff2be69f03e571464b0b09ad0d278918631b Author: Balazs Varga on Wed Jan 15 16:31:35 2020 +0100 tdf#48436 Chart: add CustomLabelPosition UNO API property Fortunately this all goes away after a round-trip since custom label placement is lost on export to OOXML, and that really helps to reduce the risk. make CppunitTest_chart2_import CPPUNIT_TEST_NAME=testTdf146487 Change-Id: I9722fc6c759c15ac3924780e6fc124f02fba07e1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162590 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com> Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2024-01-29tdf#146756 pie chart2: import extLst manualLayout W and HJustin Luth
The width of text labels in pie charts is currently determined completely arbitrarily. If the file specifies X and Y coordinates along with W and H sizing, then perhaps it is appropriate to use this? We currently import but ignore X/Y, so lets also make W/H available so we at least have a chance to ignore those too. Change-Id: I5caa48cf899e4e290eb2e8e78f731b6c5bcdd017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162589 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
2024-01-29Don't export personal metadata to OOXML in privacy modeSamuel Mehrbrodt
Change-Id: Iac0985783a0c7334bd6ee3cfcaf37c135ac452ff Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162682 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-01-27Drop std::as_const from css::uno::Sequence iterationsMike Kaganski
Obsoleted by commit 2484de6728bd11bb7949003d112f1ece2223c7a1 (Remove non-const Sequence::begin()/end() in internal code, 2021-10-15) and commit fb3c04bd1930eedacd406874e1a285d62bbf27d9 (Drop non-const Sequence::operator[] in internal code, 2021-11-05). Change-Id: Idbafef5d34c0d4771cbbf75b9db9712e504164cd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162640 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-25crashtesting: crash seen on import of forum-mso-en4-278652.xlsxCaolán McNamara
probably an issue since: commit 135ce256ce9e879663d828ec6e699de521fad867 Date: Mon Aug 14 15:59:18 2023 +0200 tdf#146487 Don't show generic diagram title when there is an empty title given Change-Id: I12d8d6e78a8435b998084221402b6bdfc4a1a433 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162526 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-22tdf#156718 PPTX import: fix the different formatting in table styleTibor Nagy
when the PPTX file only has table style id, but no table style content. Change-Id: Ia3416478716a50beb6837988e98697fd88e916d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162368 Tested-by: Jenkins Reviewed-by: Nagy Tibor <tibor.nagy.extern@allotropia.de>
2024-01-19PlotAreaConverter::mbSingleSeriesTitle is apparently read uninitializedStephan Bergmann
...in code newly introduced in 135ce256ce9e879663d828ec6e699de521fad867 "tdf#146487 Don't show generic diagram title when there is an empty title given", which caused CppunitTest_chart2_export2 to fail with > /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62: runtime error: load of value 222, which is not a valid value for type 'bool' > #0 0x7f95cd9ed87c in oox::drawingml::chart::PlotAreaConverter::isSingleSeriesTitle() const /oox/inc/drawingml/chart/plotareaconverter.hxx:78:62 > #1 0x7f95cd9e506f in oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&) /oox/source/drawingml/chart/chartspaceconverter.cxx:189:53 > #2 0x7f95cd9b6c34 in oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&, oox::drawingml::chart::ChartSpaceModel&, com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) /oox/source/drawingml/chart/chartconverter.cxx:93:20 > #3 0x7f95ce548f59 in oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /oox/source/drawingml/shape.cxx:2245:50 > #4 0x7f95438150b2 in oox::xls::Shape::finalizeXShape(oox::core::XmlFilterBase&, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) /sc/source/filter/oox/drawingfragment.cxx:113:30 > #5 0x7f95ce5267bb in oox::drawingml::Shape::createAndInsert(oox::core::XmlFilterBase&, rtl::OUString const&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, bool, bool, basegfx::B2DHomMatrix&, oox::drawingml::FillProperties const&, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:1964:9 > #6 0x7f95ce4edb54 in oox::drawingml::Shape::addShape(oox::core::XmlFilterBase&, oox::drawingml::Theme const*, com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, basegfx::B2DHomMatrix const&, oox::drawingml::FillProperties const&, std::__debug::map<rtl::OUString, std::shared_ptr<oox::drawingml::Shape>, std::less<rtl::OUString>, std::allocator<std::pair<rtl::OUString const, std::shared_ptr<oox::drawingml::Shape> > > >*, std::shared_ptr<oox::drawingml::Shape>) /oox/source/drawingml/shape.cxx:366:41 > #7 0x7f954381ef79 in oox::xls::DrawingFragment::onEndElement() /sc/source/filter/oox/drawingfragment.cxx:335:30 > #8 0x7f95cdcaee54 in oox::core::ContextHandler2Helper::implEndElement(int) /oox/source/core/contexthandler2.cxx:125:9 > #9 0x7f95cdd5c116 in oox::core::FragmentHandler2::endFastElement(int) /oox/source/core/fragmenthandler2.cxx:91:5 > #10 0x7f95caf68fca in (anonymous namespace)::Entity::endElement() /sax/source/fastparser/fastparser.cxx:514:27 > #11 0x7f95caf68998 in sax_fastparser::FastSaxParserImpl::callbackEndElement() /sax/source/fastparser/fastparser.cxx:1331:17 > #12 0x7f95caf58444 in (anonymous namespace)::call_callbackEndElement(void*, unsigned char const*, unsigned char const*, unsigned char const*) /sax/source/fastparser/fastparser.cxx:338:18 > #13 0x7f960adebeda in xmlParseEndTag2 /workdir/UnpackedTarball/libxml2/parser.c:10090:2 > #14 0x7f960ad929b5 in xmlParseTryOrFinish /workdir/UnpackedTarball/libxml2/parser.c:11868:14 > #15 0x7f960ad86334 in xmlParseChunk /workdir/UnpackedTarball/libxml2/parser.c:12151:5 > #16 0x7f95caf53231 in sax_fastparser::FastSaxParserImpl::parse() /sax/source/fastparser/fastparser.cxx:1085:21 > #17 0x7f95caf4cd18 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:890:9 > #18 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #19 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #20 0x7f95cdce5868 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 > #21 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #22 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #23 0x7f95441ceaa8 in oox::xls::WorkbookHelper::importOoxFragment(rtl::Reference<oox::core::FragmentHandler> const&) /sc/source/filter/oox/workbookhelper.cxx:1046:27 > #24 0x7f95442797f1 in oox::xls::WorksheetGlobals::finalizeDrawings() /sc/source/filter/oox/worksheethelper.cxx:1373:9 > #25 0x7f95442789e0 in oox::xls::WorksheetGlobals::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:996:5 > #26 0x7f954428744d in oox::xls::WorksheetHelper::finalizeDrawingImport() /sc/source/filter/oox/worksheethelper.cxx:1637:17 > #27 0x7f95441771de in oox::xls::WorkbookFragment::finalizeImport() /sc/source/filter/oox/workbookfragment.cxx:511:18 > #28 0x7f95cdd5b3ae in oox::core::FragmentHandler2::endDocument() /oox/source/core/fragmenthandler2.cxx:53:5 > #29 0x7f95caf4cfc2 in sax_fastparser::FastSaxParserImpl::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:896:36 > #30 0x7f95caf6e950 in sax_fastparser::FastSaxParser::parseStream(com::sun::star::xml::sax::InputSource const&) /sax/source/fastparser/fastparser.cxx:1470:13 > #31 0x7f95cdce50d1 in oox::core::FastParser::parseStream(com::sun::star::xml::sax::InputSource const&, bool) /oox/source/core/fastparser.cxx:121:15 > #32 0x7f95cdce5868 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 > #33 0x7f95cddbb234 in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&, oox::core::FastParser&) /oox/source/core/xmlfilterbase.cxx:414:21 > #34 0x7f95cddb9b8d in oox::core::XmlFilterBase::importFragment(rtl::Reference<oox::core::FragmentHandler> const&) /oox/source/core/xmlfilterbase.cxx:344:12 > #35 0x7f95435c4daa in oox::xls::ExcelFilter::importDocument() /sc/source/filter/oox/excelfilter.cxx:113:25 > #36 0x7f95cdcf953b in oox::core::FilterBase::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /oox/source/core/filterbase.cxx:488:49 > #37 0x7f95435c7733 in oox::xls::ExcelFilter::filter(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sc/source/filter/oox/excelfilter.cxx:176:25 > #38 0x7f95857c5b40 in SfxObjectShell::ImportFrom(SfxMedium&, com::sun::star::uno::Reference<com::sun::star::text::XTextRange> const&) /sfx2/source/doc/objstor.cxx:2393:34 > #39 0x7f9585781c6a in SfxObjectShell::DoLoad(SfxMedium*) /sfx2/source/doc/objstor.cxx:761:23 > #40 0x7f95859a9652 in SfxBaseModel::load(com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /sfx2/source/doc/sfxbasemodel.cxx:1980:36 > #41 0x7f95862145e9 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 > #42 0x7f95536a9900 in framework::LoadEnv::impl_loadContent() /framework/source/loadenv/loadenv.cxx:1176:37 > #43 0x7f95536a091b in framework::LoadEnv::start() /framework/source/loadenv/loadenv.cxx:412:20 > #44 0x7f9553698f59 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 > #45 0x7f95536946e7 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 > #46 0x7f955376867d 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:591:16 > #47 0x7f95537688a6 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 > #48 0x7f9569f7cafa 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 > #49 0x7f9580718c56 in UnoApiTest::loadWithParams(rtl::OUString const&, com::sun::star::uno::Sequence<com::sun::star::beans::PropertyValue> const&) /test/source/unoapi_test.cxx:126:19 > #50 0x7f9580717ef8 in UnoApiTest::load(rtl::OUString const&, char const*) /test/source/unoapi_test.cxx:108:5 > #51 0x7f9580719254 in UnoApiTest::loadFromFile(std::basic_string_view<char16_t, std::char_traits<char16_t> >, char const*) /test/source/unoapi_test.cxx:132:5 > #52 0x7f95d8bf1018 in testTdf123647::TestBody() /chart2/qa/extras/chart2export2.cxx:1242:5 (<https://ci.libreoffice.org//job/lo_ubsan/3048/>) Change-Id: I870d811e78b8c55b84627ae609f98f623465dd9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162294 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-18-Werror,-Wdeprecated-declarations (Emscripten)Stephan Bergmann
> oox/source/crypto/CryptTools.cxx:57:40: error: 'HMAC_CTX_free' is deprecated [-Werror,-Wdeprecated-declarations] > void operator()(HMAC_CTX* p) { HMAC_CTX_free(p); } > ^ > workdir/UnpackedTarball/openssl/include/openssl/hmac.h:35:1: note: 'HMAC_CTX_free' has been explicitly marked deprecated here > OSSL_DEPRECATEDIN_3_0 void HMAC_CTX_free(HMAC_CTX *ctx); > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' > # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' > # define OSSL_DEPRECATED(since) __attribute__((deprecated)) > ^ > oox/source/crypto/CryptTools.cxx:112:29: error: 'HMAC_CTX_new' is deprecated [-Werror,-Wdeprecated-declarations] > mpHmacContext.reset(HMAC_CTX_new()); > ^ > workdir/UnpackedTarball/openssl/include/openssl/hmac.h:33:1: note: 'HMAC_CTX_new' has been explicitly marked deprecated here > OSSL_DEPRECATEDIN_3_0 HMAC_CTX *HMAC_CTX_new(void); > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' > # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' > # define OSSL_DEPRECATED(since) __attribute__((deprecated)) > ^ > oox/source/crypto/CryptTools.cxx:125:9: error: 'HMAC_Init_ex' is deprecated [-Werror,-Wdeprecated-declarations] > HMAC_Init_ex(mpHmacContext.get(), rKey.data(), rKey.size(), aEvpMd, nullptr); > ^ > workdir/UnpackedTarball/openssl/include/openssl/hmac.h:43:1: note: 'HMAC_Init_ex' has been explicitly marked deprecated here > OSSL_DEPRECATEDIN_3_0 int HMAC_Init_ex(HMAC_CTX *ctx, const void *key, int len, > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' > # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' > # define OSSL_DEPRECATED(since) __attribute__((deprecated)) > ^ > oox/source/crypto/CryptTools.cxx:499:12: error: 'HMAC_Update' is deprecated [-Werror,-Wdeprecated-declarations] > return HMAC_Update(mpImpl->mpHmacContext.get(), rInput.data(), nActualInputLength) != 0; > ^ > workdir/UnpackedTarball/openssl/include/openssl/hmac.h:45:1: note: 'HMAC_Update' has been explicitly marked deprecated here > OSSL_DEPRECATEDIN_3_0 int HMAC_Update(HMAC_CTX *ctx, const unsigned char *data, > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' > # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' > # define OSSL_DEPRECATED(since) __attribute__((deprecated)) > ^ > oox/source/crypto/CryptTools.cxx:512:12: error: 'HMAC_Final' is deprecated [-Werror,-Wdeprecated-declarations] > (void) HMAC_Final(mpImpl->mpHmacContext.get(), aHash.data(), &nSizeWritten); > ^ > workdir/UnpackedTarball/openssl/include/openssl/hmac.h:47:1: note: 'HMAC_Final' has been explicitly marked deprecated here > OSSL_DEPRECATEDIN_3_0 int HMAC_Final(HMAC_CTX *ctx, unsigned char *md, > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:182:49: note: expanded from macro 'OSSL_DEPRECATEDIN_3_0' > # define OSSL_DEPRECATEDIN_3_0 OSSL_DEPRECATED(3.0) > ^ > workdir/UnpackedTarball/openssl/include/openssl/macros.h:62:52: note: expanded from macro 'OSSL_DEPRECATED' > # define OSSL_DEPRECATED(since) __attribute__((deprecated)) > ^ Change-Id: Ia9edc299b7cd4728fe32adbca8e1212170c328ba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162248 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2024-01-18tdf#146487 Don't show generic diagram title when there is an empty title givenSamuel Mehrbrodt
Bugdoc has autoTitleDeleted set to false (so title should be visible), but then an empty title is given. In this case no default string should be added to the title, only in case of Pie Charts. Any other Chart types show the default title in MS-Office. Co-authored-by: Balazs Varga <balazs.varga.extern@allotropia.de> Change-Id: Ib445099a4a3d113cff6b1ffdfd093fe41c34716b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/155681 Tested-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de> Reviewed-by: Samuel Mehrbrodt <samuel.mehrbrodt@allotropia.de>
2024-01-18tdf#140912, tdf#159219: fix import of graphic placeholder with custom promptMike Kaganski
Importing the text marks the object as not empty. Then, the object would behave as an outliner object. This includes showing in slide show; allowing text esiting; stretching the placeholder image, which required a workaround implemented in commit 7b3be7f6f3d800e2ad86f5a043e6e9b21ed4409f (tdf#140912 Better handling of the picture placeholders, 2021-12-01). Instead, drop the custom prompt. More correct solution would be making sure to mark the object as empty after setting the text; but this doesn't round- trip to ODF; and it crashes export to PPTX. Proper support for the sustom placeholder prompt feature should be done separately. The new workaround (dropping the text) makes previous workaround (special handling of the placeholder graphic) unnecessary. The unit test is updated. Change-Id: Ic7f42493af8d1d725ffa39ffab58f1ff033351cc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162202 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2024-01-17tdf#141908: replace hex colors with color keywordsLuv Sharma
Change-Id: I3d23186045c17006e50d9ef48bc26df3c79d28b9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162052 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2024-01-17tdf#134401 SD: export to pptx: autoGrow->textWordWrapAttila Szűcs
PPTX doesn't have autoGrowWidth and autoGrowHeight, but it does have TextWordWrap which is similar. If autoGrowWidth and autoGrowHeight are set in the document, then they are exported to PPTX as TextWordWrap = "none". Without this patch, PowerPoint may wrap some texts into more lines as Impress does. This is because some text may rendered at sligtly different sizes in PowerPoint as in Impress. (maybe it is just a rounding difference) Even 1% (or less) size difference is enought, because when autoGrowthWidth and autoGrowthHeight is set, then there is a good chance, the textbox rectangle is exactly as big as the text. Change-Id: I2cdba68c66c43507c5007a9e395b87ddeeea2372 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162152 Tested-by: Jenkins Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-15crashtesting: null deref of xValueSeqCaolán McNamara
since: commit 0bf4338cfe406a0d527ac78ce76ff7dd3837df03 (HEAD) Date: Mon Jan 8 13:52:03 2024 -0500 tdf#137691 chart2 export: preserve NumberFormat of DataSeries make CppunitTest_chart2_export3 CPPUNIT_TEST_NAME=tdf137691 Change-Id: Ibd65207b01885961f207da04204e7e2512c20d9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162083 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-15cid#1545843 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545976 COPY_INSTEAD_OF_MOVE cid#1546073 COPY_INSTEAD_OF_MOVE cid#1546499 COPY_INSTEAD_OF_MOVE just silence these with a hammer Change-Id: I071bc9814287944928eea0286455bc59f7f6cefb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162062 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-13cid#1546354 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546319 COPY_INSTEAD_OF_MOVE cid#1546286 COPY_INSTEAD_OF_MOVE cid#1546283 COPY_INSTEAD_OF_MOVE cid#1546191 COPY_INSTEAD_OF_MOVE cid#1545953 COPY_INSTEAD_OF_MOVE cid#1545874 COPY_INSTEAD_OF_MOVE cid#1545857 COPY_INSTEAD_OF_MOVE cid#1545781 COPY_INSTEAD_OF_MOVE cid#1545765 COPY_INSTEAD_OF_MOVE cid#1545546 COPY_INSTEAD_OF_MOVE cid#1545338 COPY_INSTEAD_OF_MOVE cid#1545190 COPY_INSTEAD_OF_MOVE cid#1545272 COPY_INSTEAD_OF_MOVE cid#1545242 COPY_INSTEAD_OF_MOVE cid#1545229 COPY_INSTEAD_OF_MOVE Change-Id: I88813d9dbd87ce10375db8198028f8b70e23f0fa Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162027 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-12cid#1545535 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545526 COPY_INSTEAD_OF_MOVE cid#1545442 COPY_INSTEAD_OF_MOVE cid#1545426 COPY_INSTEAD_OF_MOVE cid#1545425 COPY_INSTEAD_OF_MOVE cid#1545387 COPY_INSTEAD_OF_MOVE cid#1545379 COPY_INSTEAD_OF_MOVE cid#1545337 COPY_INSTEAD_OF_MOVE cid#1545334 COPY_INSTEAD_OF_MOVE cid#1545289 COPY_INSTEAD_OF_MOVE cid#1545282 COPY_INSTEAD_OF_MOVE cid#1545270 COPY_INSTEAD_OF_MOVE cid#1545237 COPY_INSTEAD_OF_MOVE Change-Id: Iae44a7347c85ae2e367bf672214b2013f30466f6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161968 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-10cid#1546141 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1546004 COPY_INSTEAD_OF_MOVE cid#1545934 COPY_INSTEAD_OF_MOVE cid#1545563 COPY_INSTEAD_OF_MOVE cid#1545533 COPY_INSTEAD_OF_MOVE cid#1545529 COPY_INSTEAD_OF_MOVE cid#1545502 COPY_INSTEAD_OF_MOVE cid#1545499 COPY_INSTEAD_OF_MOVE cid#1545479 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545324 COPY_INSTEAD_OF_MOVE cid#1545313 COPY_INSTEAD_OF_MOVE cid#1545252 COPY_INSTEAD_OF_MOVE cid#1545186 COPY_INSTEAD_OF_MOVE Change-Id: I44a783876699f88c769f239ae84eb5cae44d5f07 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161879 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-09tdf#137691 chart2 export: preserve NumberFormat of DataSeriesJustin Luth
make CppunitTest_chart2_export3 CPPUNIT_TEST_NAME=tdf137691 tdf116163.pptx is a good example if you look at the DataTable. Prior to this patch, the DataTable lost the number formatting. TODO: /chart2/qa/extras/data/docx/testSeriesIdxOrder.docx is exporting General in this case, which was unexpected. It appears to be an import problem though, not an export one. TODO: The fixme in testPPTXPercentageNumberFormats is still needed. Page 2's axis should LinkToSource and ignore the specified style. (It too is an example of this export patch working good.) Change-Id: I28730ba49ac2929bbc1c3be50f0d4819a5a205dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161806 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2024-01-09tdf#137691 chart2 import: provide NumberFormat to DataSeriesJustin Luth
make CppunitTest_chart2_export3 CPPUNIT_TEST_NAME=tdf137691 This patch provides some very foundational support to importing a chart. It will open up a lot of doors to improve LinkToSource - since now the Source key is defined. Likely the source key should default to -1 instead of 0, so that LinkToSource can know whether or not the source is defined. /chart2/qa/extras/data/docx/testSeriesIdxOrder.docx is an example of where this patchset SHOULD have worked, but somehow it is losing its key during import... Unfortunately I have run out of time and can not follow these rabbit trails. Well, at least not until this change is considered a regression for some particular document... Change-Id: Ieddf2103002616aca2a408bde1f86d45c08dfc85 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161702 Tested-by: Jenkins Reviewed-by: Justin Luth <jluth@mail.com>
2024-01-08cid#1545370 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545364 COPY_INSTEAD_OF_MOVE cid#1545363 COPY_INSTEAD_OF_MOVE cid#1545344 COPY_INSTEAD_OF_MOVE cid#1545299 COPY_INSTEAD_OF_MOVE cid#1545287 COPY_INSTEAD_OF_MOVE cid#1545267 COPY_INSTEAD_OF_MOVE cid#1545256 COPY_INSTEAD_OF_MOVE cid#1545226 COPY_INSTEAD_OF_MOVE cid#1545500 COPY_INSTEAD_OF_MOVE cid#1545538 COPY_INSTEAD_OF_MOVE cid#1545618 COPY_INSTEAD_OF_MOVE cid#1545681 COPY_INSTEAD_OF_MOVE cid#1545750 COPY_INSTEAD_OF_MOVE cid#1545778 COPY_INSTEAD_OF_MOVE cid#1545785 COPY_INSTEAD_OF_MOVE cid#1545799 COPY_INSTEAD_OF_MOVE cid#1545847 COPY_INSTEAD_OF_MOVE cid#1545958 COPY_INSTEAD_OF_MOVE cid#1545963 COPY_INSTEAD_OF_MOVE cid#1545990 COPY_INSTEAD_OF_MOVE cid#1546013 COPY_INSTEAD_OF_MOVE cid#1546029 COPY_INSTEAD_OF_MOVE cid#1546079 COPY_INSTEAD_OF_MOVE cid#1546104 COPY_INSTEAD_OF_MOVE cid#1546127 COPY_INSTEAD_OF_MOVE cid#1546133 COPY_INSTEAD_OF_MOVE cid#1546155 COPY_INSTEAD_OF_MOVE cid#1546190 COPY_INSTEAD_OF_MOVE cid#1546216 COPY_INSTEAD_OF_MOVE cid#1546273 COPY_INSTEAD_OF_MOVE cid#1546315 COPY_INSTEAD_OF_MOVE cid#1546326 COPY_INSTEAD_OF_MOVE cid#1546387 COPY_INSTEAD_OF_MOVE accept some reasonable suggestions Change-Id: I7b004086d490c7618d8fe7a21a53cfa8ac1f8408 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161748 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-07ofz#65567 unset DiagramFontHeights on exceptionCaolán McNamara
git diff -w is your friend Change-Id: I360ebb70e710a5d435ce8153090593784e2ac603 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161726 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2024-01-05Use officecfg instead of SvtFilterOptions wrapper in sfx2, sd, ooxGabor Kelemen
Change-Id: I1a404fe156c9c7859c1eb19d4dff9892f4598bc9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161591 Tested-by: Jenkins Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
2024-01-03UnoApiTest::loadFromURL -> UnoApiTest::loadFromFileMike Kaganski
The old name was misleading (it doesn't take an URL, but a filename); also, now it's easier to grep for it - doesn't get mixed with vcl::graphic::loadFromURL. Change-Id: Ib88d2194200a6a54d2326971e0306ba39f0c7025 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161578 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-31cid#1545219 COPY_INSTEAD_OF_MOVECaolán McNamara
and a bunch more like that Change-Id: If32196d407a2ae52c41204d9ee7b36e2dc514a0b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161454 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-18tdf#157740 FILESAVE PPTX: fix explosion of the number of master slidesBalazs Varga
- Export correctly the "supported" master slides with the actual slides names. - Set SlideLayout property at ODF import as well for MasterSlides layout type. - When we copy a slide with the master slide also copy the SlideLayout property value as well. Change-Id: Idb6b88ebe87a83818d8eb27a1fa087652a002c0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160290 Tested-by: Jenkins Reviewed-by: Henry Castro <hcastro@collabora.com> Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
2023-12-14Related: tdf#76115 Also pass RepairPackage to FilterDetectMike Kaganski
And drop the default argument value from ZipStorage ctor. Always pass it explicitly. Change-Id: I8bcf78dc4db7763567f9d6873841d75c328ede7e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160760 Tested-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-14tdf#76115: pass RepairPackage property from media descriptor to ZipStorageMike Kaganski
See commit 86c682273d907c77404637c89e584047de1c1099. Change-Id: I51a3beb00f635554ac73cc9ea957e18fb8e84349 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160757 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-12-10cid#1545177 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545179 COPY_INSTEAD_OF_MOVE cid#1545187 COPY_INSTEAD_OF_MOVE cid#1545188 COPY_INSTEAD_OF_MOVE cid#1545189 COPY_INSTEAD_OF_MOVE cid#1545196 COPY_INSTEAD_OF_MOVE cid#1545197 COPY_INSTEAD_OF_MOVE cid#1545204 COPY_INSTEAD_OF_MOVE cid#1545223 COPY_INSTEAD_OF_MOVE cid#1545236 COPY_INSTEAD_OF_MOVE cid#1545239 COPY_INSTEAD_OF_MOVE cid#1545253 COPY_INSTEAD_OF_MOVE cid#1545274 COPY_INSTEAD_OF_MOVE cid#1545286 COPY_INSTEAD_OF_MOVE cid#1545309 COPY_INSTEAD_OF_MOVE cid#1545311 COPY_INSTEAD_OF_MOVE cid#1545345 COPY_INSTEAD_OF_MOVE cid#1545358 COPY_INSTEAD_OF_MOVE cid#1545361 COPY_INSTEAD_OF_MOVE cid#1545365 COPY_INSTEAD_OF_MOVE cid#1545367 COPY_INSTEAD_OF_MOVE cid#1545372 COPY_INSTEAD_OF_MOVE cid#1545373 COPY_INSTEAD_OF_MOVE cid#1545377 COPY_INSTEAD_OF_MOVE cid#1545392 COPY_INSTEAD_OF_MOVE cid#1545399 COPY_INSTEAD_OF_MOVE cid#1545404 COPY_INSTEAD_OF_MOVE cid#1545408 COPY_INSTEAD_OF_MOVE cid#1545430 COPY_INSTEAD_OF_MOVE cid#1545439 COPY_INSTEAD_OF_MOVE cid#1545449 COPY_INSTEAD_OF_MOVE Change-Id: I3afe836a0bbc8bd70937035e60eb020435e413d2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160539 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-10cid#1545975 COPY_INSTEAD_OF_MOVECaolán McNamara
and cid#1545955 COPY_INSTEAD_OF_MOVE cid#1545954 COPY_INSTEAD_OF_MOVE cid#1545952 COPY_INSTEAD_OF_MOVE cid#1545948 COPY_INSTEAD_OF_MOVE cid#1545943 COPY_INSTEAD_OF_MOVE cid#1545935 COPY_INSTEAD_OF_MOVE cid#1545930 COPY_INSTEAD_OF_MOVE cid#1545928 COPY_INSTEAD_OF_MOVE cid#1545925 COPY_INSTEAD_OF_MOVE cid#1545922 COPY_INSTEAD_OF_MOVE Change-Id: I28d830504337f417829c675b1eb9c763b83b30c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160522 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-12-08Fix typosAndrea Gelmini
Change-Id: I9f61a7858a98ae6eb25cc49d237172876114c767 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160503 Tested-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-08tdf#126084 document OOXML SVG tests and importTomaž Vajngerl
Change-Id: Ief29d04f2f0693a4cdfa44c7c100ac6164da38f0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160378 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-06tdf#126084 import svg image from ooxml document that use svgBlip elem.Tomaž Vajngerl
In an OOXML document the svg image is defined in an svgBlip, which is an OOXML extension. This change checks for the svgBlip element and imports that instead the normal "blip" element that is still provided as a fallback (PNG image). Add roundtrip SVG image test for ODF and OOXML, Impress and Writer. testGraphicBlipXLSX test failed after this change, because some component was missing. Changed to enable use_rdb for all chart2 export tests, so issues like this won't happen anymore. Change-Id: Idf0e754775254d7dcfd0321dfca2ed6d00c42c09 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157238 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-04cid#1545597 Using invalid iteratorJulien Nabet
and : cid#1545537 Using invalid iterator cid#1545508 Using invalid iterator cid#1545494 Using invalid iterator cid#1545478 Using invalid iterator cid#1545427 Using invalid iterator cid#1545420 Using invalid iterator cid#1545400 Using invalid iterator cid#1545300 Using invalid iterator cid#1545258 Using invalid iterator cid#1545257 Using invalid iterator cid#1545200 Using invalid iterator cid#1545183 Using invalid iterator Change-Id: Ibf3a41902f34286967195c5c3b22e337a4b06809 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160322 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-04cid#1546021 Using invalid iteratorJulien Nabet
and : cid#1545983 Using invalid iterator cid#1545969 Using invalid iterator cid#1545949 Using invalid iterator cid#1545929 Using invalid iterator cid#1545911 Using invalid iterator cid#1545910 Using invalid iterator cid#1545886 Using invalid iterator cid#1545870 Using invalid iterator cid#1545813 Using invalid iterator Change-Id: I2ad10c2a9affd348050a4abe0917a90927a52547 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160317 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-04tdf#126084 support writing SVG images into OOXML using the MS OOXML extensionTomaž Vajngerl
SVG files aren't supported in OOXML, but we can write it using the MS OOXML extension, which is supported in the latest MSO versions. For now this only implements the support in the exporter. Change-Id: I688180fb5772f3999c2ee3020bc234f90d57cc2f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/157237 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-03Split the *Bitmap::CopyPixel functionsNoel Grandin
into the two entire separate cases they want to handle, there is no reason to mix the two different cases like this. Change-Id: I38e99e7ad6168a84e7a744f61407887825158902 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160248 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2023-12-03oox: Refactor and simplify writing to storage with GraphicExportTomaž Vajngerl
Change-Id: I743dc99e0228b59050fb4926c8ef56bed8e82060 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160252 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
2023-12-01Fix typoAndrea Gelmini
Change-Id: I19abea6905b36e9817de9531dafd389502034910 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160205 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2023-12-01[API CHANGE] Add OOXML way of curved connector routingRegina Henschel
The paths generated for curved connectors are basically incompatible between LibreOffice and OOXML. Thus it was not possible to render curved connectors the same way as MS Office. The patch adds an OOXML compatible method for calculating the path. The new method results in a different svg:d attribute when saved in ODF, but needs no change to ODF. The patch introduces the boolean connector property 'EdgeOOXMLCurve' to switch between the two methods. The property value is determined from the svg:d attribute in case of import from ODF. In case of missing svg:d attribute the property value is set to 'true', because Word currently does not write a svg:d attribute when it exports to ODF. The property value is set to 'true' for import of connectors on a drawing canvas in docx. Default value for new connectors is 'false'. The new property has no UI, but can be used via macro. Currently the new method is used for import of curved connectors on drawing canvas in docx documents. Change-Id: I53d99f44febe4d74c2b611f5fdb9de86628c4519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159708 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2023-11-30Extended loplugin:ostr: ooxStephan Bergmann
Change-Id: Ie6db1edbad5305e4935a9fdc03dab36861bf2c8a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160112 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <stephan.bergmann@allotropia.de>
2023-11-28tdf#158348 Treat wordprocessing canvas like group shapeRegina Henschel
getFullWPGSupport() is always false for mrShapeContext in case of a shape on wordprocessing canvas in table cell. On the other hand we do not need the test, because a wordprocessing canvas only occurs in docx and thus the replacement group always has FullWPGSupport. Change-Id: I0e7a9cf1c1c91a893ad7411fda7607947f053e05 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159979 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-11-26tdf#96401: allow to detect a broken ZIP packageMike Kaganski
In deep detection, first check if it's a broken ZIP package. If it is, set the RepairPackage media descriptor property to true. Pass the RepairPackage value to the OOXML filter detection. Change-Id: Ic958283f3cce92ac29ce93ac330cc9e409e3eb78 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159976 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
2023-11-24tdf#158339 setFullWPGSupport to group shape in wpcRegina Henschel
otherwise the group will create no wps shapes but draw shapes and those cannot be connected to text frames. The text frames were then located separate outside the drawing canvas instead of being bound to the shape. Change-Id: I525fac157c08c60d43ff9420775e2cbb9d891d23 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159885 Tested-by: Jenkins Reviewed-by: Regina Henschel <rb.henschel@t-online.de>
2023-11-22tdf#148000 impress: improve fontwork text placement.Attila Szűcs
Improved the calculation of positions of text characters for multi-line texts. The previous version only fitted the text to the basic outline (curve), and then scale them to the appropriate text line. This means that the text will be wider or shorter, depending on the shape of the curve, and which line it is on Now it calculates a curve for each paragraph and fits text on it. Text will be approximately the same width on each line. Except if the text is wider as the curve. Because then it shrinks the text to fit on the curve. (this can only happens on inner curves) Reused the same compat flag that was used in bug148000, now it serves as a Powerpoint compatible mode for FontWork, so no need to create new compat flag every time FontWork has improve. That means that the Fontwork in old documents has remains the same Refactored horizontal/vertical alignment, but had to keep the old hacks as well. Note: if there are too many lines of text, and the vertical alignment causes internal curves, then curves can shrink to 0 length (center point of a circle) or even to negative length, These cases are impossible to display normally, so it will be glitchy similar to how it was before this patch. MS PowerPoint avoid these cases by not allowing vertical alignments that would result internal (smaller) curves. Added unittest to check legacy-odb / new-odp / pptx file. It change the display of fontwork, so in some cases it may feel like a regression. Change-Id: Iac2d9bc751bbc2b6f747c33958f969cb3543fae5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159776 Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
2023-11-19Extended loplugin:ostr: ooxStephan Bergmann
Change-Id: Ic3ee80433571767dba9de1ecfb00d2d96beae4db Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159690 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>