From c8545b48be0cbd9f4ff537c1416ff52efcfa4773 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Tue, 3 Nov 2020 06:53:54 -0500 Subject: [PATCH] import libreoffice-6.3.6.2-3.el8 --- .gitignore | 14 +- .libreoffice.metadata | 14 +- ...o-C-20-deleted-ostream-for-sal_Unico.patch | 59 + SOURCES/0001-Adapt-to-Python-3.patch | 23 - .../0001-AppendInfoBar-can-return-null.patch | 54 + ...-Error-dialog-appearing-on-gio-mount.patch | 40 + ...eep-order-of-GDK-input-events-intact.patch | 70 + ...elevant-part-of-external-icu-icu4c-u.patch | 67 - ...-Noto-Color-Emoji-font-work-on-Linux.patch | 374 --- ...8703-Properly-handle-failure-decodin.patch | 94 - ...98-except-cut-and-paste-as-bitmap-in.patch | 74 - ...00-recover-mangled-svg-in-presentati.patch | 67 - ...47507-try-inputted-password-as-both-.patch | 40 - ...15109-add-All-files-to-the-graphic-i.patch | 57 - ...288-don-t-merge-adjacent-properties-.patch | 255 ++ ...411-drop-CONTENT_FLOWS_TO-from-dialo.patch | 1162 ++++++++ SOURCES/0001-Upgrade-to-ICU-61.1.patch | 675 ----- SOURCES/0001-Upgrade-to-ICU-62.1.patch | 236 -- ...stead-of-hard-coded-Upgrade-to-ICU-6.patch | 43 - SOURCES/0001-We-use-ICU-61-now.patch | 43 - SOURCES/0001-cov-scan-help-warnings.patch | 25 - SOURCES/0001-cov-scan-warnings.patch | 2547 ----------------- SOURCES/0001-disable-libe-book-support.patch | 67 +- ...ble-tip-of-the-day-dialog-by-default.patch | 26 + ...epoint-fix-out-of-bounds-read-in-ICU.patch | 74 - SOURCES/0001-gtk3-only-for-3.20.patch | 26 - ...xport-of-underline-for-outlined-font.patch | 48 - ...uno-script-processing-below-base-uri.patch | 70 - SOURCES/0001-limit-forms-to-http-s.patch | 48 + ...tallation-of-langpack-via-packagekit.patch | 946 ------ ...-53029-ui-prompt-for-printer-authent.patch | 400 --- SOURCES/0001-rhbz-1775767-null-deref.patch | 160 ++ ...sh-assert-inserting-document-with-in.patch | 329 +++ ...1820868-deref-of-null-xLayoutManager.patch | 26 + ...import-fix-loss-of-free-form-text-in.patch | 334 --- ...69-always-produce-utf-8-from-gettext.patch | 31 + ...ger-persist-to-determine-the-Referer.patch | 46 + ...8703-Properly-handle-failure-encodin.patch | 124 - ...8703-Properly-handle-failure-encodin.patch | 284 -- ...18703-Properly-handle-failure-en-dec.patch | 204 -- ...ow-to-use-OpenSSL-as-backend-for-rtl.patch | 684 ----- SOURCES/CVE-2019-9848.patch | 47 - SOURCES/CVE-2019-9849.patch | 165 -- SOURCES/CVE-2019-9850.patch | 68 - SOURCES/CVE-2019-9851.patch | 99 - SOURCES/CVE-2019-9852.patch | 39 - SOURCES/CVE-2019-9853.patch | 89 - SOURCES/CVE-2019-9854.patch | 86 - SOURCES/CVE-2019-9855.patch | 33 - SOURCES/libreoffice-6.0.6.1.tar.xz.asc | 16 - SOURCES/libreoffice-6.3.6.2.tar.xz.asc | 16 + SOURCES/libreoffice-base-symbolic.svg | 27 + SOURCES/libreoffice-calc-symbolic.svg | 27 + SOURCES/libreoffice-draw-symbolic.svg | 26 + SOURCES/libreoffice-help-6.0.6.1.tar.xz.asc | 16 - SOURCES/libreoffice-help-6.3.6.2.tar.xz.asc | 16 + SOURCES/libreoffice-impress-symbolic.svg | 25 + SOURCES/libreoffice-main-symbolic.svg | 24 + SOURCES/libreoffice-math-symbolic.svg | 25 + ...ibreoffice-translations-6.0.6.1.tar.xz.asc | 16 - ...ibreoffice-translations-6.3.6.2.tar.xz.asc | 16 + SOURCES/libreoffice-writer-symbolic.svg | 28 + SPECS/libreoffice.spec | 453 +-- 63 files changed, 2728 insertions(+), 8589 deletions(-) create mode 100644 SOURCES/0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch delete mode 100644 SOURCES/0001-Adapt-to-Python-3.patch create mode 100644 SOURCES/0001-AppendInfoBar-can-return-null.patch create mode 100644 SOURCES/0001-General-Internet-Error-dialog-appearing-on-gio-mount.patch create mode 100644 SOURCES/0001-Keep-order-of-GDK-input-events-intact.patch delete mode 100644 SOURCES/0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch delete mode 100644 SOURCES/0001-Make-Noto-Color-Emoji-font-work-on-Linux.patch delete mode 100644 SOURCES/0001-Related-rhbz-1618703-Properly-handle-failure-decodin.patch delete mode 100644 SOURCES/0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch delete mode 100644 SOURCES/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch delete mode 100644 SOURCES/0001-Resolves-rhbz-1647507-try-inputted-password-as-both-.patch delete mode 100644 SOURCES/0001-Resolves-rhbz-1715109-add-All-files-to-the-graphic-i.patch create mode 100644 SOURCES/0001-Resolves-tdf-132288-don-t-merge-adjacent-properties-.patch create mode 100644 SOURCES/0001-Resolves-tdf-133411-drop-CONTENT_FLOWS_TO-from-dialo.patch delete mode 100644 SOURCES/0001-Upgrade-to-ICU-61.1.patch delete mode 100644 SOURCES/0001-Upgrade-to-ICU-62.1.patch delete mode 100644 SOURCES/0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch delete mode 100644 SOURCES/0001-We-use-ICU-61-now.patch delete mode 100644 SOURCES/0001-cov-scan-help-warnings.patch delete mode 100644 SOURCES/0001-cov-scan-warnings.patch create mode 100644 SOURCES/0001-disble-tip-of-the-day-dialog-by-default.patch delete mode 100644 SOURCES/0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch delete mode 100644 SOURCES/0001-gtk3-only-for-3.20.patch delete mode 100644 SOURCES/0001-implement-pdf-export-of-underline-for-outlined-font.patch delete mode 100644 SOURCES/0001-keep-pyuno-script-processing-below-base-uri.patch create mode 100644 SOURCES/0001-limit-forms-to-http-s.patch delete mode 100644 SOURCES/0001-request-installation-of-langpack-via-packagekit.patch delete mode 100644 SOURCES/0001-rhbz-1691287-tdf-53029-ui-prompt-for-printer-authent.patch create mode 100644 SOURCES/0001-rhbz-1775767-null-deref.patch create mode 100644 SOURCES/0001-rhbz-1810732-crash-assert-inserting-document-with-in.patch create mode 100644 SOURCES/0001-rhbz-1820868-deref-of-null-xLayoutManager.patch delete mode 100644 SOURCES/0001-tdf-121203-DOCX-import-fix-loss-of-free-form-text-in.patch create mode 100644 SOURCES/0001-tdf-131069-always-produce-utf-8-from-gettext.patch create mode 100644 SOURCES/0001-use-the-LinkManager-persist-to-determine-the-Referer.patch delete mode 100644 SOURCES/0002-Related-rhbz-1618703-Properly-handle-failure-encodin.patch delete mode 100644 SOURCES/0003-Related-rhbz-1618703-Properly-handle-failure-encodin.patch delete mode 100644 SOURCES/0004-iRelated-rhbz-1618703-Properly-handle-failure-en-dec.patch delete mode 100644 SOURCES/0005-rhbz-1618703-Allow-to-use-OpenSSL-as-backend-for-rtl.patch delete mode 100644 SOURCES/CVE-2019-9848.patch delete mode 100644 SOURCES/CVE-2019-9849.patch delete mode 100644 SOURCES/CVE-2019-9850.patch delete mode 100644 SOURCES/CVE-2019-9851.patch delete mode 100644 SOURCES/CVE-2019-9852.patch delete mode 100644 SOURCES/CVE-2019-9853.patch delete mode 100644 SOURCES/CVE-2019-9854.patch delete mode 100644 SOURCES/CVE-2019-9855.patch delete mode 100644 SOURCES/libreoffice-6.0.6.1.tar.xz.asc create mode 100644 SOURCES/libreoffice-6.3.6.2.tar.xz.asc create mode 100644 SOURCES/libreoffice-base-symbolic.svg create mode 100644 SOURCES/libreoffice-calc-symbolic.svg create mode 100644 SOURCES/libreoffice-draw-symbolic.svg delete mode 100644 SOURCES/libreoffice-help-6.0.6.1.tar.xz.asc create mode 100644 SOURCES/libreoffice-help-6.3.6.2.tar.xz.asc create mode 100644 SOURCES/libreoffice-impress-symbolic.svg create mode 100644 SOURCES/libreoffice-main-symbolic.svg create mode 100644 SOURCES/libreoffice-math-symbolic.svg delete mode 100644 SOURCES/libreoffice-translations-6.0.6.1.tar.xz.asc create mode 100644 SOURCES/libreoffice-translations-6.3.6.2.tar.xz.asc create mode 100644 SOURCES/libreoffice-writer-symbolic.svg diff --git a/.gitignore b/.gitignore index c957830..3ecbd17 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,8 @@ SOURCES/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip SOURCES/185d60944ea767075d27247c3162b3bc-unowinreg.dll +SOURCES/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf SOURCES/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip SOURCES/gpgkey-C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3.gpg.asc -SOURCES/libreoffice-6.0.6.1.tar.xz -SOURCES/libreoffice-base-symbolic.svg -SOURCES/libreoffice-calc-symbolic.svg -SOURCES/libreoffice-draw-symbolic.svg -SOURCES/libreoffice-help-6.0.6.1.tar.xz -SOURCES/libreoffice-impress-symbolic.svg -SOURCES/libreoffice-main-symbolic.svg -SOURCES/libreoffice-math-symbolic.svg -SOURCES/libreoffice-translations-6.0.6.1.tar.xz -SOURCES/libreoffice-writer-symbolic.svg +SOURCES/libreoffice-6.3.6.2.tar.xz +SOURCES/libreoffice-help-6.3.6.2.tar.xz +SOURCES/libreoffice-translations-6.3.6.2.tar.xz diff --git a/.libreoffice.metadata b/.libreoffice.metadata index 1b9b4ba..d45e2c5 100644 --- a/.libreoffice.metadata +++ b/.libreoffice.metadata @@ -1,14 +1,8 @@ 7168b0f40aa5c72267899601c116d2348d2f56ec SOURCES/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip 0619ed3a89644bef318df67db12045b2b590585b SOURCES/185d60944ea767075d27247c3162b3bc-unowinreg.dll +d336802a36ed2c87dd243e7c2f1d0542dace5cca SOURCES/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf 2d49e11b0b711970f494294dc3698f05eb294853 SOURCES/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip 7b5fd93d787fbc6d9c2d4025d543730ee8dc4559 SOURCES/gpgkey-C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3.gpg.asc -7a10bc2e3d39a2b61a507eae30c8b505dcd4f553 SOURCES/libreoffice-6.0.6.1.tar.xz -54fc749ba924f9ca4e0391caaf579ab344302038 SOURCES/libreoffice-base-symbolic.svg -9de544172d736d59589767000c1f657034a5d53d SOURCES/libreoffice-calc-symbolic.svg -0f6dc4726da0920869354fbe4b2924f9ac569b4a SOURCES/libreoffice-draw-symbolic.svg -d453fdf82bf65f79bfbf70986720436ba4d9ed51 SOURCES/libreoffice-help-6.0.6.1.tar.xz -8c74dd667c660cc643c4d715dd50491ba92146d5 SOURCES/libreoffice-impress-symbolic.svg -c77acd04a7647b09745f9424ab0f65d52dfcd397 SOURCES/libreoffice-main-symbolic.svg -3857a55644148eb25ed1a594bd00d1262761fb39 SOURCES/libreoffice-math-symbolic.svg -9dbf1c8f3b373a3ec15e989f86c1a34a7d7aa761 SOURCES/libreoffice-translations-6.0.6.1.tar.xz -d4f0674ad46a832120db956cc01a27fdc2060458 SOURCES/libreoffice-writer-symbolic.svg +79aa683b98c465ce570652852faead9f973f8d95 SOURCES/libreoffice-6.3.6.2.tar.xz +f6f94206dad1038c4369610a90e1727e4266ea80 SOURCES/libreoffice-help-6.3.6.2.tar.xz +52b483e3d868345f7aa9ed187fd8b59d713d24fc SOURCES/libreoffice-translations-6.3.6.2.tar.xz diff --git a/SOURCES/0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch b/SOURCES/0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch new file mode 100644 index 0000000..2b32c85 --- /dev/null +++ b/SOURCES/0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch @@ -0,0 +1,59 @@ +From b8bb7fd853db5d0d7cc4ea9120efb1a707e46c22 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Tue, 3 Dec 2019 11:56:33 +0100 +Subject: [PATCH] Adapt SAL_WARN to C++20 deleted ostream << for sal_Unicode + (aka char16_t) + + "char8_t +backward compatibility remediation", as implemented now by "libstdc++: +P1423R3 char8_t remediation (2/4)" for -std=c++2a, deletes operator << overloads +that would print an integer rather than a (presumably expected) character. + +Change-Id: Ic70d3e90e4b990d297e35f07379fe4952e138820 +Reviewed-on: https://gerrit.libreoffice.org/84321 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + basegfx/source/polygon/b2dsvgpolypolygon.cxx | 2 +- + starmath/source/ooxmlimport.cxx | 4 ++-- + 2 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/basegfx/source/polygon/b2dsvgpolypolygon.cxx b/basegfx/source/polygon/b2dsvgpolypolygon.cxx +index 2fdacad3653f..490bcd69c9a6 100644 +--- a/basegfx/source/polygon/b2dsvgpolypolygon.cxx ++++ b/basegfx/source/polygon/b2dsvgpolypolygon.cxx +@@ -648,7 +648,7 @@ namespace basegfx + default: + { + SAL_WARN("basegfx", "importFromSvgD(): skipping tags in svg:d element (unknown: \"" +- << aCurrChar ++ << OUString(aCurrChar) + << "\")!"); + ++nPos; + break; +diff --git a/starmath/source/ooxmlimport.cxx b/starmath/source/ooxmlimport.cxx +index f0913f157078..731daa054120 100644 +--- a/starmath/source/ooxmlimport.cxx ++++ b/starmath/source/ooxmlimport.cxx +@@ -223,7 +223,7 @@ OUString SmOoxmlImport::handleAcc() + break; + default: + acc = "acute"; +- SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << accChr << "\'" ); ++ SAL_WARN( "starmath.ooxml", "Unknown m:chr in m:acc \'" << OUString(accChr) << "\'" ); + break; + } + OUString e = readOMathArgInElement( M_TOKEN( e )); +@@ -554,7 +554,7 @@ OUString SmOoxmlImport::handleNary() + ret = "sum"; + break; + default: +- SAL_WARN( "starmath.ooxml", "Unknown m:nary chr \'" << chr << "\'" ); ++ SAL_WARN( "starmath.ooxml", "Unknown m:nary chr \'" << OUString(chr) << "\'" ); + break; + } + if( !subHide ) +-- +2.24.1 + diff --git a/SOURCES/0001-Adapt-to-Python-3.patch b/SOURCES/0001-Adapt-to-Python-3.patch deleted file mode 100644 index c563af1..0000000 --- a/SOURCES/0001-Adapt-to-Python-3.patch +++ /dev/null @@ -1,23 +0,0 @@ -From 6deba9b85bc9d5eb4f297ea305bcddfbad0060e1 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Tue, 3 Jul 2018 09:30:37 +0200 -Subject: [PATCH] Adapt to Python 3 - -Change-Id: I7c44c23810a79242ec5ddf52a316b4bba7d838ce ---- - solenv/bin/pack_images.py | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/solenv/bin/pack_images.py b/solenv/bin/pack_images.py -index 0f493c8f3035..b66ea34e731c 100755 ---- a/solenv/bin/pack_images.py -+++ b/solenv/bin/pack_images.py -@@ -1,4 +1,4 @@ --#!/usr/bin/env python -+#!/usr/bin/env python3 - # -*- coding: utf-8 -*- - # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*- - # --- -2.17.1 - diff --git a/SOURCES/0001-AppendInfoBar-can-return-null.patch b/SOURCES/0001-AppendInfoBar-can-return-null.patch new file mode 100644 index 0000000..ccda25e --- /dev/null +++ b/SOURCES/0001-AppendInfoBar-can-return-null.patch @@ -0,0 +1,54 @@ +From 22005041f829d85e675ea27bdee1770af58a1ea0 Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Mon, 3 Jun 2019 16:21:24 +0200 +Subject: [PATCH] AppendInfoBar can return null + +e.g., when opening the old help window ("Help - LibreOffice Help" in a build +configured with --with-help to "build the old local help" (configure.ac)) + +Change-Id: Icecd224774b98811ddf9545c5fa83a85fab259fc +Reviewed-on: https://gerrit.libreoffice.org/73390 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + sfx2/source/view/viewfrm.cxx | 24 ++++++++++++++---------- + 1 file changed, 14 insertions(+), 10 deletions(-) + +diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx +index 5620f4396e8f..ed8ffa200ef6 100644 +--- a/sfx2/source/view/viewfrm.cxx ++++ b/sfx2/source/view/viewfrm.cxx +@@ -1239,16 +1239,20 @@ void SfxViewFrame::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint ) + if ((iCurrent > iLast) && !Application::IsHeadlessModeEnabled() && !bIsUITest) + { + VclPtr pInfoBar = AppendInfoBar("whatsnew", SfxResId(STR_WHATSNEW_TEXT), InfoBarType::Info); +- VclPtrInstance xWhatsNewButton(&GetWindow()); +- xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON)); +- xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize()); +- xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler)); +- pInfoBar->addButton(xWhatsNewButton); +- +- //update lastversion +- std::shared_ptr batch(comphelper::ConfigurationChanges::create()); +- officecfg::Setup::Product::ooSetupLastVersion::set(sSetupVersion, batch); +- batch->commit(); ++ if (pInfoBar) ++ { ++ VclPtrInstance xWhatsNewButton(&GetWindow()); ++ xWhatsNewButton->SetText(SfxResId(STR_WHATSNEW_BUTTON)); ++ xWhatsNewButton->SetSizePixel(xWhatsNewButton->GetOptimalSize()); ++ xWhatsNewButton->SetClickHdl(LINK(this, SfxViewFrame, WhatsNewHandler)); ++ pInfoBar->addButton(xWhatsNewButton); ++ ++ //update lastversion ++ std::shared_ptr batch(comphelper::ConfigurationChanges::create()); ++ officecfg::Setup::Product::ooSetupLastVersion::set( ++ sSetupVersion, batch); ++ batch->commit(); ++ } + } + } + +-- +2.25.1 + diff --git a/SOURCES/0001-General-Internet-Error-dialog-appearing-on-gio-mount.patch b/SOURCES/0001-General-Internet-Error-dialog-appearing-on-gio-mount.patch new file mode 100644 index 0000000..4d853be --- /dev/null +++ b/SOURCES/0001-General-Internet-Error-dialog-appearing-on-gio-mount.patch @@ -0,0 +1,40 @@ +From ac68d29966f78ac8799f31f13578e4843a49043f Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 14 Apr 2020 13:46:44 +0100 +Subject: [PATCH] "General Internet Error" dialog appearing on gio mount + +we get a GError of G_IO_ERROR_FAILED_HANDLED which is documented +as "Operation failed and a helper program has already interacted with the user. +Do not display any error dialog." PENDING seems to describe this state +better than a generic error case and results in no error dialog. + +Change-Id: Iee382e49edaa0a734526659971e0339991e2c03e +--- + ucb/source/ucp/gio/gio_content.cxx | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/ucb/source/ucp/gio/gio_content.cxx b/ucb/source/ucp/gio/gio_content.cxx +index 77a5c0127ae7..8576713974a8 100644 +--- a/ucb/source/ucp/gio/gio_content.cxx ++++ b/ucb/source/ucp/gio/gio_content.cxx +@@ -196,6 +196,9 @@ css::uno::Any convertToException(GError *pError, const css::uno::Reference< css: + css::task::InteractionClassification_ERROR, css::ucb::IOErrorCode_NAME_TOO_LONG, aArgs); + EXCEPT(aExcept); } + break; ++ case G_IO_ERROR_FAILED_HANDLED: /* Operation failed and a helper program ++ has already interacted with the user. Do not display any error ++ dialog */ + case G_IO_ERROR_PENDING: + { css::ucb::InteractiveAugmentedIOException aExcept(sMessage, rContext, + css::task::InteractionClassification_ERROR, css::ucb::IOErrorCode_PENDING, aArgs); +@@ -257,7 +260,6 @@ css::uno::Any convertToException(GError *pError, const css::uno::Reference< css: + case G_IO_ERROR_NOT_EMPTY: + case G_IO_ERROR_NOT_SYMBOLIC_LINK: + case G_IO_ERROR_NOT_MOUNTABLE_FILE: +- case G_IO_ERROR_FAILED_HANDLED: + { css::ucb::InteractiveNetworkGeneralException aExcept(sMessage, rContext, + css::task::InteractionClassification_ERROR); + EXCEPT(aExcept);} +-- +2.25.1 + diff --git a/SOURCES/0001-Keep-order-of-GDK-input-events-intact.patch b/SOURCES/0001-Keep-order-of-GDK-input-events-intact.patch new file mode 100644 index 0000000..12dac05 --- /dev/null +++ b/SOURCES/0001-Keep-order-of-GDK-input-events-intact.patch @@ -0,0 +1,70 @@ +From 0c20ed4d58f7b55bcc12fa288b93d1c6d88a7dcc Mon Sep 17 00:00:00 2001 +From: Stephan Bergmann +Date: Thu, 14 May 2020 14:47:21 +0200 +Subject: [PATCH] Keep order of GDK input events intact + +As explained at +"[Wayland] When typing fast at high CPU load, LibreOffice breaks key (letter) +order": "with a local LO master --with-lang=ALL ASan+UBSan build (i.e., which +executes somewhat slowly): When typing 'file' in Writer right after it started +up (but no longer after more typing), that gets garbled as 'fiel'." The reason +for that (but probably not for the original issue reported in that rhbz#1377293) +apparently was: + +Two GDK_KEY_PRESS events (A and B) were in the GTK event queue. +GtkInstance::AnyInput consumed only A, because it broke from the first while +loop as soon as it saw the first event of appropriate type. In the second while +loop it put A back on the end of the GTK event loop, so that it now followed B. +GtkSalFrame::signalKey (vcl/unx/gtk3/gtk3gtkframe.cxx) thus received the events +in the wrong order. + +Dropping the "break" also reveals that GtkInstance::AnyInput should obviously +use a queue (i.e., deque) rather than a stack to hold the events it consumed and +needs to re-enqueue. + +This appears to be a regression introduced with +658954e8b50fc264428402dc5a95b0d6f690d191 "Resolves: fdo#48011 writer +idle-callbacks are halting when events pending". + +Change-Id: I87d601df118a20ea3dd59e9cebbcf5176db04be8 +--- + vcl/unx/gtk/gtkinst.cxx | 9 ++++----- + 1 file changed, 4 insertions(+), 5 deletions(-) + +diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx +index 02ed688f366b..744c66b0baf0 100644 +--- a/vcl/unx/gtk/gtkinst.cxx ++++ b/vcl/unx/gtk/gtkinst.cxx +@@ -427,25 +427,24 @@ bool GtkInstance::AnyInput( VclInputFlags nType ) + return true; + + bool bRet = false; +- std::stack aEvents; ++ std::deque aEvents; + GdkEvent *pEvent = nullptr; + while ((pEvent = gdk_event_get())) + { +- aEvents.push(pEvent); ++ aEvents.push_back(pEvent); + VclInputFlags nEventType = categorizeEvent(pEvent); + if ( (nEventType & nType) || ( nEventType == VclInputFlags::NONE && (nType & VclInputFlags::OTHER) ) ) + { + bRet = true; +- break; + } + } + + while (!aEvents.empty()) + { +- pEvent = aEvents.top(); ++ pEvent = aEvents.front(); + gdk_event_put(pEvent); + gdk_event_free(pEvent); +- aEvents.pop(); ++ aEvents.pop_front(); + } + #endif + return bRet; +-- +2.25.4 + diff --git a/SOURCES/0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch b/SOURCES/0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch deleted file mode 100644 index fb453d1..0000000 --- a/SOURCES/0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch +++ /dev/null @@ -1,67 +0,0 @@ -From 811575c105b0a2bc597afda2f84a087199447ae5 Mon Sep 17 00:00:00 2001 -Message-Id: <811575c105b0a2bc597afda2f84a087199447ae5.1531842164.git.erack@redhat.com> -From: Stephan Bergmann -Date: Wed, 18 Apr 2018 16:35:55 +0200 -Subject: [PATCH] Keep the still relevant part of - external/icu/icu4c-ubsan.patch.1 -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" - -This is a multi-part message in MIME format. ---------------erAck-patch-parts -Content-Type: text/plain; charset=UTF-8; format=fixed -Content-Transfer-Encoding: 8bit - - -...which f247f08e370626bbb427acd8f4a400fd875350a3 "Upgrade to ICU 61.1" had -removed completely, in error. - -Change-Id: I7239011561851333cac58e54e4e7d590b8529dbc ---- - external/icu/UnpackedTarball_icu.mk | 1 + - external/icu/icu4c-ubsan.patch.1 | 14 ++++++++++++++ - 2 files changed, 15 insertions(+) - create mode 100644 external/icu/icu4c-ubsan.patch.1 - - ---------------erAck-patch-parts -Content-Type: text/x-patch; name="0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch" -Content-Transfer-Encoding: 8bit -Content-Disposition: attachment; filename="0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch" - -diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk -index b81cdaab6242..c789e6eb8d84 100644 ---- a/external/icu/UnpackedTarball_icu.mk -+++ b/external/icu/UnpackedTarball_icu.mk -@@ -27,6 +27,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ - external/icu/icu4c-solarisgcc.patch.1 \ - external/icu/icu4c-mkdir.patch.1 \ - external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \ -+ external/icu/icu4c-ubsan.patch.1 \ - external/icu/icu4c-icu11100.patch.1 \ - external/icu/icu4c-scriptrun.patch.1 \ - external/icu/icu4c-rtti.patch.1 \ -diff --git a/external/icu/icu4c-ubsan.patch.1 b/external/icu/icu4c-ubsan.patch.1 -new file mode 100644 -index 000000000000..ea9f13fd85cd ---- /dev/null -+++ b/external/icu/icu4c-ubsan.patch.1 -@@ -0,0 +1,14 @@ -+diff -ur icu.org/source/common/ubidiimp.h icu/source/common/ubidiimp.h -+--- icu.org/source/common/ubidiimp.h 2017-02-03 19:57:23.000000000 +0100 -++++ icu/source/common/ubidiimp.h 2017-04-21 22:46:25.374651159 +0200 -+@@ -198,8 +198,8 @@ -+ /* in a Run, logicalStart will get this bit set if the run level is odd */ -+ #define INDEX_ODD_BIT (1UL<<31) -+ -+-#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)<<31)) -+-#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)(level)<<31)) -++#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)<<31)) -++#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((uint32_t)(level)<<31)) -+ #define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT) -+ -+ #define GET_INDEX(x) ((x)&~INDEX_ODD_BIT) - ---------------erAck-patch-parts-- - - diff --git a/SOURCES/0001-Make-Noto-Color-Emoji-font-work-on-Linux.patch b/SOURCES/0001-Make-Noto-Color-Emoji-font-work-on-Linux.patch deleted file mode 100644 index dce5dea..0000000 --- a/SOURCES/0001-Make-Noto-Color-Emoji-font-work-on-Linux.patch +++ /dev/null @@ -1,374 +0,0 @@ -From 96012f88aac95147ae1fd4834cea5c5bb184d52b Mon Sep 17 00:00:00 2001 -From: Khaled Hosny -Date: Tue, 27 Aug 2019 15:19:15 +0200 -Subject: [PATCH] Make Noto Color Emoji font work on Linux -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Noto Color Emoji is a bitmap color font, Cairo knows how to scale such -fonts and FontConfig will identify them as scalable but not outline -fonts, so change the FontConfig checks to checks for scalability. - -Make sft.cxx:doOpenTTFont() accept non-outline fonts, the text will not -show in PDF but that is not worse than the status quo. - -Reviewed-on: https://gerrit.libreoffice.org/78218 -Tested-by: Jenkins -Reviewed-by: Khaled Hosny -(cherry picked from commit dcf7792da2aa2a1ef774a124f7b21f68fff0fd15) - -Change-Id: I756c718296d2c43e3165cd2f07b11bbb981318d3 - -Related: rhbz#1648281 improve fontconfig fallback for emojis - -disregard text language for emoji and tag with und-zsye to -get fontconfig to give us the default emoji font - -Change-Id: I8f94b0c41dea3204c9db77b96ad8f0d98bae2239 - -ctrl+shift+e emoji ibus engine problems converting UCS-4 positions to UTF-16 - -e.g. ctrl+shift+e type rabbit then space in writer and the len of underline -is 2 which should encompass the displayed e + 2 UTF-16 units - -Change-Id: I424db7dd6cbcc5845922ac17208fed643e672dbd - -rework IM underline impl wrt mix of UTF-8/16/32 units - -e.g. ctrl+shift+e type boy then space twice in writer. The UTF-32 units -are 0x65 0x1f466 0x1f3fb. The underline should encompass the whole range, -prior to this the trailing Emoji Modifier Fitzpatrick was separated from -the boy base emoji by an incomplete underline - -Reviewed-on: https://gerrit.libreoffice.org/78878 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 5e4d564e27d062a48fd04cb7263b769819dd3a50) - -Change-Id: I2e846e8eeedf96f341ed7f50d504883768e9eff0 ---- - vcl/source/font/fontmetric.cxx | 4 +- - vcl/source/fontsubset/sft.cxx | 5 +- - vcl/unx/generic/fontmanager/fontconfig.cxx | 60 +++++++++-------- - .../generic/glyphs/freetype_glyphcache.cxx | 6 +- - vcl/unx/gtk3/gtk3gtkframe.cxx | 64 +++++++++++++------ - 5 files changed, 87 insertions(+), 52 deletions(-) - -diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx -index cd0b9f8557e9..816525c8773e 100644 ---- a/vcl/source/font/fontmetric.cxx -+++ b/vcl/source/font/fontmetric.cxx -@@ -462,8 +462,8 @@ void ImplFontMetricData::ImplCalcLineSpacing(const std::vector& rHheaDa - if (mnAscent || mnDescent) - mnIntLeading = mnAscent + mnDescent - mnHeight; - -- SAL_INFO("vcl.gdi.fontmetric", -- "fsSelection: " << rInfo.fsSelection -+ SAL_INFO("vcl.gdi.fontmetric", GetFamilyName() -+ << ": fsSelection: " << rInfo.fsSelection - << ", typoAscender: " << rInfo.typoAscender - << ", typoDescender: " << rInfo.typoDescender - << ", typoLineGap: " << rInfo.typoLineGap -diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx -index 365b9401b95e..04921294ab21 100644 ---- a/vcl/source/fontsubset/sft.cxx -+++ b/vcl/source/fontsubset/sft.cxx -@@ -1666,7 +1666,10 @@ static int doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) - /* TODO: implement to get subsetting */ - assert(t->goffsets != nullptr); - } else { -- return SF_TTFORMAT; -+ // Bitmap font, accept for now. -+ t->goffsets = static_cast(calloc(1+t->nglyphs, sizeof(sal_uInt32))); -+ /* TODO: implement to get subsetting */ -+ assert(t->goffsets != nullptr); - } - - table = getTable(t, O_hhea); -diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx -index 2c16e040cdab..33c50d082912 100644 ---- a/vcl/unx/generic/fontmanager/fontconfig.cxx -+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx -@@ -67,7 +67,7 @@ namespace - - class FontCfgWrapper - { -- FcFontSet* m_pOutlineSet; -+ FcFontSet* m_pFontSet; - - void addFontSet( FcSetName ); - -@@ -95,19 +95,15 @@ private: - }; - - FontCfgWrapper::FontCfgWrapper() -- : -- m_pOutlineSet( nullptr ), -- m_pLanguageTag( nullptr ) -+ : m_pFontSet(nullptr) -+ , m_pLanguageTag(nullptr) - { - FcInit(); - } - - void FontCfgWrapper::addFontSet( FcSetName eSetName ) - { -- /* -- add only acceptable outlined fonts to our config, -- for future fontconfig use -- */ -+ // Add only acceptable fonts to our config, for future fontconfig use. - FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName ); - if( !pOrig ) - return; -@@ -116,10 +112,12 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName ) - for( int i = 0; i < pOrig->nfont; ++i ) - { - FcPattern* pPattern = pOrig->fonts[i]; -- // #i115131# ignore non-outline fonts -- FcBool bOutline = FcFalse; -- FcResult eOutRes = FcPatternGetBool( pPattern, FC_OUTLINE, 0, &bOutline ); -- if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) ) -+ // #i115131# ignore non-scalable fonts -+ // Scalable fonts are usually outline fonts, but some bitmaps fonts -+ // (like Noto Color Emoji) are also scalable. -+ FcBool bScalable = FcFalse; -+ FcResult eScalableRes = FcPatternGetBool(pPattern, FC_SCALABLE, 0, &bScalable); -+ if ((eScalableRes != FcResultMatch) || (bScalable == FcFalse)) - continue; - - // Ignore Type 1 fonts, too. -@@ -129,7 +127,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName ) - continue; - - FcPatternReference( pPattern ); -- FcFontSetAdd( m_pOutlineSet, pPattern ); -+ FcFontSetAdd( m_pFontSet, pPattern ); - } - - // TODO?: FcFontSetDestroy( pOrig ); -@@ -220,16 +218,16 @@ namespace - - FcFontSet* FontCfgWrapper::getFontSet() - { -- if( !m_pOutlineSet ) -+ if( !m_pFontSet ) - { -- m_pOutlineSet = FcFontSetCreate(); -+ m_pFontSet = FcFontSetCreate(); - addFontSet( FcSetSystem ); - addFontSet( FcSetApplication ); - -- ::std::sort(m_pOutlineSet->fonts,m_pOutlineSet->fonts+m_pOutlineSet->nfont,SortFont()); -+ ::std::sort(m_pFontSet->fonts,m_pFontSet->fonts+m_pFontSet->nfont,SortFont()); - } - -- return m_pOutlineSet; -+ return m_pFontSet; - } - - FontCfgWrapper::~FontCfgWrapper() -@@ -376,10 +374,10 @@ void FontCfgWrapper::clear() - { - m_aFontNameToLocalized.clear(); - m_aLocalizedToCanonical.clear(); -- if( m_pOutlineSet ) -+ if( m_pFontSet ) - { -- FcFontSetDestroy( m_pOutlineSet ); -- m_pOutlineSet = nullptr; -+ FcFontSetDestroy( m_pFontSet ); -+ m_pFontSet = nullptr; - } - delete m_pLanguageTag; - m_pLanguageTag = nullptr; -@@ -499,7 +497,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map& o - int width = 0; - int spacing = 0; - int nCollectionEntry = -1; -- FcBool outline = false; -+ FcBool scalable = false; - - FcResult eFileRes = FcPatternGetString(pFSet->fonts[i], FC_FILE, 0, &file); - FcResult eFamilyRes = rWrapper.LocalizedElementFromPattern( pFSet->fonts[i], &family, FC_FAMILY, FC_FAMILYLANG ); -@@ -510,11 +508,11 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map& o - FcResult eWeightRes = FcPatternGetInteger(pFSet->fonts[i], FC_WEIGHT, 0, &weight); - FcResult eWidthRes = FcPatternGetInteger(pFSet->fonts[i], FC_WIDTH, 0, &width); - FcResult eSpacRes = FcPatternGetInteger(pFSet->fonts[i], FC_SPACING, 0, &spacing); -- FcResult eOutRes = FcPatternGetBool(pFSet->fonts[i], FC_OUTLINE, 0, &outline); -+ FcResult eScalableRes = FcPatternGetBool(pFSet->fonts[i], FC_SCALABLE, 0, &scalable); - FcResult eIndexRes = FcPatternGetInteger(pFSet->fonts[i], FC_INDEX, 0, &nCollectionEntry); - FcResult eFormatRes = FcPatternGetString(pFSet->fonts[i], FC_FONTFORMAT, 0, &format); - -- if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eOutRes != FcResultMatch ) -+ if( eFileRes != FcResultMatch || eFamilyRes != FcResultMatch || eScalableRes != FcResultMatch ) - continue; - - #if (OSL_DEBUG_LEVEL > 2) -@@ -528,14 +526,15 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map& o - , eWeightRes == FcResultMatch ? width : -1 - , eSpacRes == FcResultMatch ? spacing : -1 - , eOutRes == FcResultMatch ? outline : -1 -+ , eScalableRes == FcResultMatch ? scalable : -1 - , eFormatRes == FcResultMatch ? (const char*)format : "" - ); - #endif - --// OSL_ASSERT(eOutRes != FcResultMatch || outline); -+// OSL_ASSERT(eScalableRes != FcResultMatch || scalable); - -- // only outline fonts are usable to psprint anyway -- if( eOutRes == FcResultMatch && ! outline ) -+ // only scalable fonts are usable to psprint anyway -+ if( eScalableRes == FcResultMatch && ! scalable ) - continue; - - if (isPreviouslyDuplicateOrObsoleted(pFSet, i)) -@@ -807,6 +806,11 @@ namespace - #endif - } - -+ bool isEmoji(sal_uInt32 nCurrentChar) -+ { -+ return u_hasBinaryProperty(nCurrentChar, UCHAR_EMOJI); -+ } -+ - //returns true if the given code-point couldn't possibly be in rLangTag. - bool isImpossibleCodePointForLang(const LanguageTag &rLangTag, sal_uInt32 currentChar) - { -@@ -855,6 +859,8 @@ namespace - - OUString getExemplarLangTagForCodePoint(sal_uInt32 currentChar) - { -+ if (isEmoji(currentChar)) -+ return "und-zsye"; - int32_t script = u_getIntPropertyValue(currentChar, UCHAR_SCRIPT); - UScriptCode eScript = static_cast(script); - OStringBuffer aBuf(unicode::getExemplarLanguageForUScriptCode(eScript)); -@@ -981,7 +987,7 @@ void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - FcCharSetAddChar( codePoints, nCode ); - //if the codepoint is impossible for this lang tag, then clear it - //and autodetect something useful -- if (!aLangAttrib.isEmpty() && isImpossibleCodePointForLang(aLangTag, nCode)) -+ if (!aLangAttrib.isEmpty() && (isImpossibleCodePointForLang(aLangTag, nCode) || isEmoji(nCode))) - aLangAttrib.clear(); - //#i105784#/rhbz#527719 improve selection of fallback font - if (aLangAttrib.isEmpty()) -diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx -index 5a55ee47bff3..0b03f428c3fa 100644 ---- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx -+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx -@@ -409,9 +409,9 @@ FreetypeFont::FreetypeFont( const FontSelectPattern& rFSD, FreetypeFontInfo* pFI - - FT_New_Size( maFaceFT, &maSizeFT ); - FT_Activate_Size( maSizeFT ); -- FT_Error rc = FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight ); -- if( rc != FT_Err_Ok ) -- return; -+ /* This might fail for color bitmap fonts, but that is fine since we will -+ * not need any glyph data from FreeType in this case */ -+ /*FT_Error rc = */ FT_Set_Pixel_Sizes( maFaceFT, mnWidth, rFSD.mnHeight ); - - FT_Select_Charmap(maFaceFT, FT_ENCODING_UNICODE); - -diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx -index 4ee63a98da95..2f80d03f542b 100644 ---- a/vcl/unx/gtk3/gtk3gtkframe.cxx -+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx -@@ -4031,34 +4031,59 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ - pThis->m_bPreeditJustChanged = true; - - bool bEndPreedit = (!pText || !*pText) && pThis->m_aInputEvent.mpTextAttr != nullptr; -- pThis->m_aInputEvent.maText = pText ? OUString( pText, strlen(pText), RTL_TEXTENCODING_UTF8 ) : OUString(); -- pThis->m_aInputEvent.mnCursorPos = nCursorPos; -- pThis->m_aInputEvent.mnCursorFlags = 0; -+ gint nUtf8Len = pText ? strlen(pText) : 0; -+ pThis->m_aInputEvent.maText = pText ? OUString(pText, nUtf8Len, RTL_TEXTENCODING_UTF8) : OUString(); -+ const OUString& rText = pThis->m_aInputEvent.maText; - -- pThis->m_aInputFlags = std::vector( std::max( 1, (int)pThis->m_aInputEvent.maText.getLength() ), ExtTextInputAttr::NONE ); -+ std::vector aUtf16Offsets; -+ for (sal_Int32 nUtf16Offset = 0; nUtf16Offset < rText.getLength(); rText.iterateCodePoints(&nUtf16Offset)) -+ aUtf16Offsets.push_back(nUtf16Offset); -+ -+ sal_Int32 nUtf32Len = aUtf16Offsets.size(); -+ aUtf16Offsets.push_back(rText.getLength()); -+ -+ // sanitize the CurPos which is in utf-32 -+ if (nCursorPos < 0) -+ nCursorPos = 0; -+ else if (nCursorPos > nUtf32Len) -+ nCursorPos = nUtf32Len; -+ -+ pThis->m_aInputEvent.mnCursorPos = aUtf16Offsets[nCursorPos]; -+ pThis->m_aInputEvent.mnCursorFlags = 0; -+ -+ pThis->m_aInputFlags = std::vector( std::max( 1, static_cast(rText.getLength()) ), ExtTextInputAttr::NONE ); - - PangoAttrIterator *iter = pango_attr_list_get_iterator(pAttrs); - do - { - GSList *attr_list = nullptr; - GSList *tmp_list = nullptr; -- gint start, end; -+ gint nUtf8Start, nUtf8End; - ExtTextInputAttr sal_attr = ExtTextInputAttr::NONE; - -- pango_attr_iterator_range (iter, &start, &end); -- if (start == G_MAXINT || end == G_MAXINT) -- { -- auto len = pText ? g_utf8_strlen(pText, -1) : 0; -- if (end == G_MAXINT) -- end = len; -- if (start == G_MAXINT) -- start = len; -- } -- if (end == start) -+ // docs say... "Get the range of the current segment ... the stored -+ // return values are signed, not unsigned like the values in -+ // PangoAttribute", which implies that the units are otherwise the same -+ // as that of PangoAttribute whose docs state these units are "in -+ // bytes" -+ // so this is the utf8 range -+ pango_attr_iterator_range(iter, &nUtf8Start, &nUtf8End); -+ -+ // sanitize the utf8 range -+ nUtf8Start = std::min(nUtf8Start, nUtf8Len); -+ nUtf8End = std::min(nUtf8End, nUtf8Len); -+ if (nUtf8Start >= nUtf8End) - continue; - -- start = g_utf8_pointer_to_offset (pText, pText + start); -- end = g_utf8_pointer_to_offset (pText, pText + end); -+ // get the utf32 range -+ sal_Int32 nUtf32Start = g_utf8_pointer_to_offset(pText, pText + nUtf8Start); -+ sal_Int32 nUtf32End = g_utf8_pointer_to_offset(pText, pText + nUtf8End); -+ -+ // sanitize the utf32 range -+ nUtf32Start = std::min(nUtf32Start, nUtf32Len); -+ nUtf32End = std::min(nUtf32End, nUtf32Len); -+ if (nUtf32Start >= nUtf32End) -+ continue; - - tmp_list = attr_list = pango_attr_iterator_get_attrs (iter); - while (tmp_list) -@@ -4088,11 +4113,12 @@ void GtkSalFrame::IMHandler::signalIMPreeditChanged( GtkIMContext*, gpointer im_ - g_slist_free (attr_list); - - // Set the sal attributes on our text -- for (int i = start; i < end; ++i) -+ // rhbz#1648281 apply over our utf-16 range derived from the input utf-32 range -+ for (sal_Int32 i = aUtf16Offsets[nUtf32Start]; i < aUtf16Offsets[nUtf32End]; ++i) - { - SAL_WARN_IF(i >= static_cast(pThis->m_aInputFlags.size()), - "vcl.gtk3", "pango attrib out of range. Broken range: " -- << start << "," << end << " Legal range: 0," -+ << aUtf16Offsets[nUtf32Start] << "," << aUtf16Offsets[nUtf32End] << " Legal range: 0," - << pThis->m_aInputFlags.size()); - if (i >= static_cast(pThis->m_aInputFlags.size())) - continue; --- -2.21.0 - diff --git a/SOURCES/0001-Related-rhbz-1618703-Properly-handle-failure-decodin.patch b/SOURCES/0001-Related-rhbz-1618703-Properly-handle-failure-decodin.patch deleted file mode 100644 index 1b45161..0000000 --- a/SOURCES/0001-Related-rhbz-1618703-Properly-handle-failure-decodin.patch +++ /dev/null @@ -1,94 +0,0 @@ -From 03ab9306c70df34d7824f700d5635e8b458e6d6d Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Thu, 23 Aug 2018 16:45:34 +0200 -Subject: [PATCH 1/5] Related rhbz#1618703: Properly handle failure decoding - master password -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -...when e.g. FIPS mode makes PasswordContainer::DecodePasswords fail by throwing -an exception which needs to be caught in PasswordContainerHelper::addRecord (in -uui/source/passwordcontainer.cxx, but which only catches NoMasterException, not -generic RuntimeException) - -Change-Id: I877bb5126e79ac2c90b11ef6d31bf81a2927f409 -Reviewed-on: https://gerrit.libreoffice.org/59511 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit e17987f4bd54fec7e0d94bdefdb94809255b3436) -Reviewed-on: https://gerrit.libreoffice.org/59568 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 24b3d08018b6350d5e60615eb375b337ab1b4f75) ---- - svl/source/passwordcontainer/passwordcontainer.cxx | 11 ++++++----- - svl/source/passwordcontainer/passwordcontainer.hxx | 2 +- - 2 files changed, 7 insertions(+), 6 deletions(-) - -diff --git a/svl/source/passwordcontainer/passwordcontainer.cxx b/svl/source/passwordcontainer/passwordcontainer.cxx -index c2e8b7100028..6d4bb02427ac 100644 ---- a/svl/source/passwordcontainer/passwordcontainer.cxx -+++ b/svl/source/passwordcontainer/passwordcontainer.cxx -@@ -417,7 +417,7 @@ void SAL_CALL PasswordContainer::disposing( const EventObject& ) - } - } - --std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd ) -+std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLine, const OUString& aMasterPasswd, css::task::PasswordRequestMode mode ) - { - if( !aMasterPasswd.isEmpty() ) - { -@@ -463,7 +463,8 @@ std::vector< OUString > PasswordContainer::DecodePasswords( const OUString& aLin - - // problems with decoding - OSL_FAIL( "Problem with decoding" ); -- throw RuntimeException("Can't decode!" ); -+ throw css::task::NoMasterException( -+ "Can't decode!", css::uno::Reference(), mode); - } - - OUString PasswordContainer::EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPasswd ) -@@ -586,7 +587,7 @@ UserRecord PasswordContainer::CopyToUserRecord( const NamePassRecord& aRecord, b - { - try - { -- ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ) ); -+ ::std::vector< OUString > aDecodedPasswords = DecodePasswords( aRecord.GetPersPasswords(), GetMasterPassword( aHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ); - aPasswords.insert( aPasswords.end(), aDecodedPasswords.begin(), aDecodedPasswords.end() ); - } - catch( NoMasterException& ) -@@ -848,7 +849,7 @@ OUString const & PasswordContainer::GetMasterPassword( const Reference< XInterac - } - else - { -- std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass ) ); -+ std::vector< OUString > aRM( DecodePasswords( aEncodedMP, aPass, aRMode ) ); - if( aRM.empty() || aPass != aRM[0] ) - { - bAskAgain = true; -@@ -1005,7 +1006,7 @@ Sequence< UrlRecord > SAL_CALL PasswordContainer::getAllPersistent( const Refere - { - sal_Int32 oldLen = aUsers.getLength(); - aUsers.realloc( oldLen + 1 ); -- aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ) ) ) ); -+ aUsers[ oldLen ] = UserRecord( aNP.GetUserName(), comphelper::containerToSequence( DecodePasswords( aNP.GetPersPasswords(), GetMasterPassword( xHandler ), css::task::PasswordRequestMode_PASSWORD_ENTER ) ) ); - } - - if( aUsers.getLength() ) -diff --git a/svl/source/passwordcontainer/passwordcontainer.hxx b/svl/source/passwordcontainer/passwordcontainer.hxx -index 67ad63e72722..a1190549eb77 100644 ---- a/svl/source/passwordcontainer/passwordcontainer.hxx -+++ b/svl/source/passwordcontainer/passwordcontainer.hxx -@@ -268,7 +268,7 @@ css::task::UrlRecord find( - const css::uno::Reference< css::task::XInteractionHandler >& Handler ); - - /// @throws css::uno::RuntimeException -- static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword ); -+ static ::std::vector< OUString > DecodePasswords( const OUString& aLine, const OUString& aMasterPassword, css::task::PasswordRequestMode mode ); - - /// @throws css::uno::RuntimeException - static OUString EncodePasswords(const std::vector< OUString >& lines, const OUString& aMasterPassword ); --- -2.17.1 - diff --git a/SOURCES/0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch b/SOURCES/0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch deleted file mode 100644 index 1d09956..0000000 --- a/SOURCES/0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 15cdcd0346b7aa98d4697edec8aeea9c810efa62 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 5 Dec 2017 17:13:28 +0000 -Subject: [PATCH] Related: tdf#105998 except cut and paste as bitmap instead of - export -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Take a drawing rectangle in draw and cut and paste as bitmap to writer. The -hairline border along the very right/bottom edge of the bitmap appear missing. - -fallback to default handlers which can distort the hairline to be visible - -Change-Id: Iedb580f65879628839c83e41092745ae7c11267c -Reviewed-on: https://gerrit.libreoffice.org/45902 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara ---- - .../source/processor2d/vclpixelprocessor2d.cxx | 25 +++++++++++++++++----- - 1 file changed, 20 insertions(+), 5 deletions(-) - -diff --git a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx -index 9c21c83ee..5c5c0bb 100644 ---- a/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx -+++ b/drawinglayer/source/processor2d/vclpixelprocessor2d.cxx -@@ -41,6 +41,7 @@ - #include "helperwrongspellrenderer.hxx" - #include - #include -+#include - #include - #include - #include -@@ -210,10 +211,6 @@ namespace drawinglayer - maBColorModifierStack.getModifiedColor( - rSource.getLineAttribute().getColor())); - -- mpOutputDevice->SetFillColor(); -- mpOutputDevice->SetLineColor(Color(aLineColor)); -- aHairLinePolyPolygon.transform(maCurrentTransformation); -- - double fLineWidth(rSource.getLineAttribute().getWidth()); - - if(basegfx::fTools::more(fLineWidth, 0.0)) -@@ -234,6 +231,24 @@ namespace drawinglayer - fLineWidth = 0.0; - } - -+ //Related: tdf#105998 cut and paste as bitmap of shape from draw to -+ //writer. If we are a hairline along the very right/bottom edge of -+ //the canvas then fallback to defaults which can distort the -+ //hairline inside the paintable area -+ if (fLineWidth == 0.0) -+ { -+ Size aSize = mpOutputDevice->GetOutputSize(); -+ basegfx::B2DRange aRange = aHairLinePolyPolygon.getB2DRange(); -+ basegfx::B2DRange aOutputRange = aRange; -+ aOutputRange.transform(maCurrentTransformation); -+ if (std::round(aOutputRange.getMaxX()) == aSize.Width() || std::round(aOutputRange.getMaxY()) == aSize.Height()) -+ return false; -+ } -+ -+ mpOutputDevice->SetFillColor(); -+ mpOutputDevice->SetLineColor(Color(aLineColor)); -+ aHairLinePolyPolygon.transform(maCurrentTransformation); -+ - bool bHasPoints(false); - bool bTryWorked(false); - --- -2.9.5 - diff --git a/SOURCES/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch b/SOURCES/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch deleted file mode 100644 index 518896e..0000000 --- a/SOURCES/0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch +++ /dev/null @@ -1,67 +0,0 @@ -From a74837a0e7c7259e4396aa5f05cf1384e256db35 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Mon, 20 Feb 2017 16:04:58 +0000 -Subject: [PATCH] Related: tdf#106100 recover mangled svg in presentations - -Change-Id: I77b452aa69a8341aa30e1e93d0d5ee8160533095 ---- - svgio/Module_svgio.mk | 4 ---- - svgio/source/svgreader/svgsvgnode.cxx | 27 +++------------------------ - 2 files changed, 3 insertions(+), 28 deletions(-) - -diff --git a/svgio/Module_svgio.mk b/svgio/Module_svgio.mk -index 29ef97d..8b827fc 100644 ---- a/svgio/Module_svgio.mk -+++ b/svgio/Module_svgio.mk -@@ -22,8 +22,4 @@ $(eval $(call gb_Module_add_targets,svgio,\ - Library_svgio \ - )) - --$(eval $(call gb_Module_add_check_targets,svgio,\ -- CppunitTest_svgio \ --)) -- - # vim: set noet ts=4 sw=4: -diff --git a/svgio/source/svgreader/svgsvgnode.cxx b/svgio/source/svgreader/svgsvgnode.cxx -index 7800666..087c621 100644 ---- a/svgio/source/svgreader/svgsvgnode.cxx -+++ b/svgio/source/svgreader/svgsvgnode.cxx -@@ -522,32 +522,11 @@ namespace svgio - } - else - { -- // There exists no parent to resolve relative width or height. -- // Use child size as fallback and expand to aspect ratio given -- // by the viewBox. No mapping. -- // We get viewport >= content, therefore no clipping. -- bNeedsMapping = false; -- const basegfx::B2DRange aChildRange( -- aSequence.getB2DRange( -- drawinglayer::geometry::ViewInformation2D())); -- const double fChildWidth(aChildRange.getWidth()); -- const double fChildHeight(aChildRange.getHeight()); -- const double fLeft(aChildRange.getMinX()); -- const double fTop(aChildRange.getMinY()); -- if ( fChildWidth / fViewBoxWidth > fChildHeight / fViewBoxHeight ) -- { // expand y -- fW = fChildWidth; -- fH = fChildWidth / fViewBoxRatio; -- } -- else -- { // expand x -- fH = fChildHeight; -- fW = fChildHeight * fViewBoxRatio; -- } -- aSvgCanvasRange = basegfx::B2DRange(fLeft, fTop, fLeft + fW, fTop + fH); -+ fW = fViewBoxWidth; -+ fH = fViewBoxHeight; -+ aSvgCanvasRange = basegfx::B2DRange(0.0, 0.0, fW, fH); - } - -- - if (bNeedsMapping) - { - // create mapping --- -2.9.3 - diff --git a/SOURCES/0001-Resolves-rhbz-1647507-try-inputted-password-as-both-.patch b/SOURCES/0001-Resolves-rhbz-1647507-try-inputted-password-as-both-.patch deleted file mode 100644 index f542832..0000000 --- a/SOURCES/0001-Resolves-rhbz-1647507-try-inputted-password-as-both-.patch +++ /dev/null @@ -1,40 +0,0 @@ -From f648553dfc356b3c5e6dd77ea96039a9977f00d6 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 8 Nov 2018 10:58:00 +0000 -Subject: [PATCH] Resolves: rhbz#1647507 try inputted password as both user and - owner password -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: Ibe1fae39d3153238e85400c9645766c260c9290d -Reviewed-on: https://gerrit.libreoffice.org/63080 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit e3ca8385fed93e61efb8200149e06b822a84a47e) ---- - sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 6 ++++-- - 1 file changed, 4 insertions(+), 2 deletions(-) - -diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx -index 16db05afe870..b536a710e832 100644 ---- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx -+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx -@@ -101,9 +101,11 @@ int main(int argc, char **argv) - : (ownerPassword[0] != '\001' - ? new GooString(ownerPassword) - : nullptr ) ); -- GooString* pUserPasswordStr( userPassword[0] != '\001' -+ GooString* pUserPasswordStr( aPwBuf[0] != 0 -+ ? new GooString( aPwBuf ) -+ : (userPassword[0] != '\001' - ? new GooString(userPassword) -- : nullptr ); -+ : nullptr ) ); - if( outputFile[0] != '\001' ) - g_binary_out = fopen(outputFile,"wb"); - --- -2.17.1 - diff --git a/SOURCES/0001-Resolves-rhbz-1715109-add-All-files-to-the-graphic-i.patch b/SOURCES/0001-Resolves-rhbz-1715109-add-All-files-to-the-graphic-i.patch deleted file mode 100644 index fb1b511..0000000 --- a/SOURCES/0001-Resolves-rhbz-1715109-add-All-files-to-the-graphic-i.patch +++ /dev/null @@ -1,57 +0,0 @@ -From bcb05a5daba9aafdc3921322676f33e055413f9f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 31 May 2019 15:33:00 +0100 -Subject: [PATCH] Resolves: rhbz#1715109 add All files to the graphic import - dialog -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -to pick up things without extensions, for consistency with file->open - -Reviewed-on: https://gerrit.libreoffice.org/73276 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit c6c14f6ae7f6d7768b450e7776db917bb662f3cf) - -Change-Id: Ib119fb0d053d1d288eee7cd17fa4f12dcb9956d7 ---- - sfx2/source/dialog/filedlghelper.cxx | 20 ++++++++++++++++---- - 1 file changed, 16 insertions(+), 4 deletions(-) - -diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx -index 3820ee4107c9..737dcb278a2a 100644 ---- a/sfx2/source/dialog/filedlghelper.cxx -+++ b/sfx2/source/dialog/filedlghelper.cxx -@@ -1872,11 +1872,23 @@ void FileDialogHelper_Impl::addGraphicFilter() - - try - { -- OUString aAllFilterName = SfxResId( STR_SFX_IMPORT_ALL ); -- aAllFilterName = ::sfx2::addExtension( aAllFilterName, aExtensions, bIsInOpenMode, *this ); -+ // if the extension is not "All files", insert "All images" -+ if (aExtensions != FILEDIALOG_FILTER_ALL) -+ { -+ OUString aAllFilterName = SfxResId(STR_SFX_IMPORT_ALL); -+ aAllFilterName = ::sfx2::addExtension( aAllFilterName, aExtensions, bIsInOpenMode, *this ); -+ xFltMgr->appendFilter( aAllFilterName, aExtensions ); -+ maSelectFilter = aAllFilterName; // and make it the default -+ } -+ -+ // rhbz#1715109 always include All files *.* or * -+ OUString aAllFilesName = SfxResId( STR_SFX_FILTERNAME_ALL ); -+ aAllFilesName = ::sfx2::addExtension( aAllFilesName, FILEDIALOG_FILTER_ALL, bIsInOpenMode, *this ); -+ xFltMgr->appendFilter( aAllFilesName, FILEDIALOG_FILTER_ALL ); - -- xFltMgr->appendFilter( aAllFilterName, aExtensions ); -- maSelectFilter = aAllFilterName; -+ // if the extension is "All files", make that the default -+ if (aExtensions == FILEDIALOG_FILTER_ALL) -+ maSelectFilter = aAllFilesName; - } - catch( const IllegalArgumentException& ) - { --- -2.21.0 - diff --git a/SOURCES/0001-Resolves-tdf-132288-don-t-merge-adjacent-properties-.patch b/SOURCES/0001-Resolves-tdf-132288-don-t-merge-adjacent-properties-.patch new file mode 100644 index 0000000..49b9edb --- /dev/null +++ b/SOURCES/0001-Resolves-tdf-132288-don-t-merge-adjacent-properties-.patch @@ -0,0 +1,255 @@ +From fd1692b657838f137c8974eae7730510b7d190df Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 24 Apr 2020 16:38:26 +0100 +Subject: [PATCH] Resolves: tdf#132288 don't merge adjacent properties for + spell checking +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +spell checking relies on each attribute chunk being unmerged with identical +adjacent chunks + +squash includes... + +nStartPosition and nEndPosition are always the same + +and + +tdf#132288 preservation of footnote depends on reverse iteration + +like TextCharAttribList::FindAttrib does which spell checking +used before + +commit 243b5b392906042ab03800e0b5765e6f3513372c +Author: Caolán McNamara +Date: Fri Jun 14 21:56:44 2019 +0100 + + weld SpellDialog + +converted to use an EditEngine instead of a TextEngine in order to +be able to host it in a native widget + +Change-Id: Ia835fa054cad0dee4304f16724b9eb0c29b46102 +--- + cui/source/dialogs/SpellDialog.cxx | 37 ++++++++++++++++-------------- + editeng/inc/editdoc.hxx | 3 +++ + editeng/source/editeng/editdoc.cxx | 12 +++++++++- + editeng/source/editeng/editeng.cxx | 4 ++++ + include/editeng/editeng.hxx | 5 ++++ + 5 files changed, 43 insertions(+), 18 deletions(-) + +diff --git a/cui/source/dialogs/SpellDialog.cxx b/cui/source/dialogs/SpellDialog.cxx +index 1bb15c934552..17bff36056fb 100644 +--- a/cui/source/dialogs/SpellDialog.cxx ++++ b/cui/source/dialogs/SpellDialog.cxx +@@ -1142,6 +1142,8 @@ void SentenceEditWindow_Impl::SetDrawingArea(weld::DrawingArea* pDrawingArea) + pDrawingArea->get_text_height() * 6); + pDrawingArea->set_size_request(aSize.Width(), aSize.Height()); + WeldEditView::SetDrawingArea(pDrawingArea); ++ // tdf#132288 don't merge equal adjacent attributes ++ m_xEditEngine->DisableAttributeExpanding(); + } + + SentenceEditWindow_Impl::~SentenceEditWindow_Impl() +@@ -1150,13 +1152,14 @@ SentenceEditWindow_Impl::~SentenceEditWindow_Impl() + + namespace + { +- const EECharAttrib* FindCharAttrib(int nStartPosition, int nEndPosition, sal_uInt16 nWhich, std::vector& rAttribList) ++ const EECharAttrib* FindCharAttrib(int nPosition, sal_uInt16 nWhich, std::vector& rAttribList) + { +- for (const auto& rTextAtr : rAttribList) ++ for (auto it = rAttribList.rbegin(); it != rAttribList.rend(); ++it) + { ++ const auto& rTextAtr = *it; + if (rTextAtr.pAttr->Which() != nWhich) + continue; +- if (rTextAtr.nStart <= nStartPosition && rTextAtr.nEnd >= nEndPosition) ++ if (rTextAtr.nStart <= nPosition && rTextAtr.nEnd >= nPosition) + { + return &rTextAtr; + } +@@ -1272,8 +1275,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt) + m_xEditEngine->GetCharAttribs(0, aAttribList); + + auto nCursor = aCurrentSelection.nStartPos; +- const EECharAttrib* pBackAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_BKGCOLOR, aAttribList); +- const EECharAttrib* pErrorAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList); ++ const EECharAttrib* pBackAttr = FindCharAttrib(nCursor, EE_CHAR_BKGCOLOR, aAttribList); ++ const EECharAttrib* pErrorAttr = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList); + const EECharAttrib* pBackAttrLeft = nullptr; + const EECharAttrib* pErrorAttrLeft = nullptr; + +@@ -1299,8 +1302,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt) + while (nCursor < aCurrentSelection.nEndPos) + { + ++nCursor; +- const EECharAttrib* pIntBackAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_BKGCOLOR, aAttribList); +- const EECharAttrib* pIntErrorAttr = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList); ++ const EECharAttrib* pIntBackAttr = FindCharAttrib(nCursor, EE_CHAR_BKGCOLOR, aAttribList); ++ const EECharAttrib* pIntErrorAttr = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList); + //if any attr has been found then BRACE + if (pIntBackAttr || pIntErrorAttr) + nSelectionType = BRACE; +@@ -1342,8 +1345,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt) + if (nCursor) + { + --nCursor; +- pBackAttrLeft = FindCharAttrib(nCursor, nCursor, EE_CHAR_BKGCOLOR, aAttribList); +- pErrorAttrLeft = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList); ++ pBackAttrLeft = FindCharAttrib(nCursor, EE_CHAR_BKGCOLOR, aAttribList); ++ pErrorAttrLeft = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList); + bHasFieldLeft = pBackAttrLeft !=nullptr; + bHasErrorLeft = pErrorAttrLeft != nullptr; + ++nCursor; +@@ -1492,8 +1495,8 @@ bool SentenceEditWindow_Impl::KeyInput(const KeyEvent& rKeyEvt) + //start position + if (!IsUndoEditMode() && bIsErrorActive) + { +- const EECharAttrib* pFontColor = FindCharAttrib(nCursor, nCursor, EE_CHAR_COLOR, aAttribList); +- const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, m_nErrorStart, EE_CHAR_GRABBAG, aAttribList); ++ const EECharAttrib* pFontColor = FindCharAttrib(nCursor, EE_CHAR_COLOR, aAttribList); ++ const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_GRABBAG, aAttribList); + if (pFontColor && pErrorAttrib) + { + m_nErrorStart = pFontColor->nStart; +@@ -1695,7 +1698,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language + auto nDiffLen = rNewWord.getLength() - m_nErrorEnd + m_nErrorStart; + //Remove spell error attribute + m_xEditEngine->UndoActionStart(SPELLUNDO_MOVE_ERROREND); +- const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, m_nErrorStart, EE_CHAR_GRABBAG, aAttribList); ++ const EECharAttrib* pErrorAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_GRABBAG, aAttribList); + DBG_ASSERT(pErrorAttrib, "no error attribute found"); + bool bSpellErrorDescription = false; + SpellErrorDescription aSpellErrorDescription; +@@ -1706,7 +1709,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language + bSpellErrorDescription = true; + } + +- const EECharAttrib* pBackAttrib = FindCharAttrib(m_nErrorStart, m_nErrorStart, EE_CHAR_BKGCOLOR, aAttribList); ++ const EECharAttrib* pBackAttrib = FindCharAttrib(m_nErrorStart, EE_CHAR_BKGCOLOR, aAttribList); + + ESelection aSel(0, m_nErrorStart, 0, m_nErrorEnd); + m_xEditEngine->QuickInsertText(rNewWord, aSel); +@@ -1721,7 +1724,7 @@ int SentenceEditWindow_Impl::ChangeMarkedWord(const OUString& rNewWord, Language + //attributes following an error at the start of the text are not moved but expanded from the + //text engine - this is done to keep full-paragraph-attributes + //in the current case that handling is not desired +- const EECharAttrib* pLangAttrib = FindCharAttrib(m_nErrorEnd, m_nErrorEnd, EE_CHAR_LANGUAGE, aAttribList); ++ const EECharAttrib* pLangAttrib = FindCharAttrib(m_nErrorEnd, EE_CHAR_LANGUAGE, aAttribList); + + if (pLangAttrib && !pLangAttrib->nStart && pLangAttrib->nEnd == nTextLen) + { +@@ -1776,7 +1779,7 @@ bool SentenceEditWindow_Impl::GetErrorDescription(SpellErrorDescription& rSpellE + std::vector aAttribList; + m_xEditEngine->GetCharAttribs(0, aAttribList); + +- if (const EECharAttrib* pEECharAttrib = FindCharAttrib(nPosition, nPosition, EE_CHAR_GRABBAG, aAttribList)) ++ if (const EECharAttrib* pEECharAttrib = FindCharAttrib(nPosition, EE_CHAR_GRABBAG, aAttribList)) + { + ExtractErrorDescription(*pEECharAttrib, rSpellErrorDescription); + return true; +@@ -1895,7 +1898,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const + const EECharAttrib* pError = nullptr; + while (nCursor < nTextLen) + { +- const EECharAttrib* pLang = FindCharAttrib(nCursor, nCursor, EE_CHAR_LANGUAGE, aAttribList); ++ const EECharAttrib* pLang = FindCharAttrib(nCursor, EE_CHAR_LANGUAGE, aAttribList); + if(pLang && pLang != pLastLang) + { + eLang = static_cast(pLang->pAttr)->GetLanguage(); +@@ -1903,7 +1906,7 @@ svx::SpellPortions SentenceEditWindow_Impl::CreateSpellPortions() const + lcl_InsertBreakPosition_Impl(aBreakPositions, pLang->nEnd, eLang); + pLastLang = pLang; + } +- pError = FindCharAttrib(nCursor, nCursor, EE_CHAR_GRABBAG, aAttribList); ++ pError = FindCharAttrib(nCursor, EE_CHAR_GRABBAG, aAttribList); + if (pError && pLastError != pError) + { + lcl_InsertBreakPosition_Impl(aBreakPositions, pError->nStart, eLang); +diff --git a/editeng/inc/editdoc.hxx b/editeng/inc/editdoc.hxx +index 089addc59c07..258fa945912c 100644 +--- a/editeng/inc/editdoc.hxx ++++ b/editeng/inc/editdoc.hxx +@@ -747,6 +747,7 @@ private: + + bool bOwnerOfPool:1; + bool bModified:1; ++ bool bDisableAttributeExpanding:1; + + private: + void ImplDestroyContents(); +@@ -761,6 +762,8 @@ public: + bool IsModified() const { return bModified; } + void SetModified( bool b ); + ++ void DisableAttributeExpanding() { bDisableAttributeExpanding = true; } ++ + void SetModifyHdl( const Link& rLink ) { aModifyHdl = rLink; } + + void CreateDefFont( bool bUseStyles ); +diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx +index 73a356054741..aacc0b2c7b6b 100644 +--- a/editeng/source/editeng/editdoc.cxx ++++ b/editeng/source/editeng/editdoc.cxx +@@ -1906,7 +1906,8 @@ EditDoc::EditDoc( SfxItemPool* pPool ) : + bIsTopToBottomVert(false), + bIsFixedCellHeight(false), + bOwnerOfPool(pPool == nullptr), +- bModified(false) ++ bModified(false), ++ bDisableAttributeExpanding(false) + { + // Don't create an empty node, Clear() will be called in EditEngine-CTOR + }; +@@ -2354,6 +2355,15 @@ void EditDoc::InsertAttribInSelection( ContentNode* pNode, sal_Int32 nStart, sal + + RemoveAttribs( pNode, nStart, nEnd, pStartingAttrib, pEndingAttrib, rPoolItem.Which() ); + ++ // tdf#132288 By default inserting an attribute beside another that is of ++ // the same type expands the original instead of inserting another. But the ++ // spell check dialog doesn't want that behaviour ++ if (bDisableAttributeExpanding) ++ { ++ pStartingAttrib = nullptr; ++ pEndingAttrib = nullptr; ++ } ++ + if ( pStartingAttrib && pEndingAttrib && + ( *(pStartingAttrib->GetItem()) == rPoolItem ) && + ( *(pEndingAttrib->GetItem()) == rPoolItem ) ) +diff --git a/editeng/source/editeng/editeng.cxx b/editeng/source/editeng/editeng.cxx +index 458f71b34d3f..f46106a5773c 100644 +--- a/editeng/source/editeng/editeng.cxx ++++ b/editeng/source/editeng/editeng.cxx +@@ -2802,6 +2802,10 @@ bool EditEngine::IsPageOverflow() { + return pImpEditEngine->IsPageOverflow(); + } + ++void EditEngine::DisableAttributeExpanding() { ++ pImpEditEngine->GetEditDoc().DisableAttributeExpanding(); ++} ++ + EFieldInfo::EFieldInfo() + { + } +diff --git a/include/editeng/editeng.hxx b/include/editeng/editeng.hxx +index f585ce8b5796..7d4129c0ad0b 100644 +--- a/include/editeng/editeng.hxx ++++ b/include/editeng/editeng.hxx +@@ -618,6 +618,11 @@ public: + sal_Int32 GetOverflowingLineNum() const; + void ClearOverflowingParaNum(); + bool IsPageOverflow(); ++ ++ // tdf#132288 By default inserting an attribute beside another that is of ++ // the same type expands the original instead of inserting another. But the ++ // spell check dialog doesn't want that behaviour ++ void DisableAttributeExpanding(); + }; + + #endif // INCLUDED_EDITENG_EDITENG_HXX +-- +2.25.3 + diff --git a/SOURCES/0001-Resolves-tdf-133411-drop-CONTENT_FLOWS_TO-from-dialo.patch b/SOURCES/0001-Resolves-tdf-133411-drop-CONTENT_FLOWS_TO-from-dialo.patch new file mode 100644 index 0000000..ad325b5 --- /dev/null +++ b/SOURCES/0001-Resolves-tdf-133411-drop-CONTENT_FLOWS_TO-from-dialo.patch @@ -0,0 +1,1162 @@ +From 0eab7dfc71e61c75d5c07093a95c64d05bc2f0c1 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Wed, 27 May 2020 17:11:34 +0100 +Subject: [PATCH] Resolves: tdf#133411 drop CONTENT_FLOWS_TO from dialog to + search results +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +in the document, looks like only the calc one actually works, and when +it works on large quantities of results calc grinds to a complete halt + +This was introduced with: + +commit b41332475783c31136673fb44cf4c411bb0148f8 +Date: Mon Dec 2 15:54:29 2013 +0000 + + Integrate branch of IAccessible2 + +and has been a problem on and off with calc's potentially ~infinite grid + +There is the on-by-default search results dialog in calc (which has a limit on +how many it shows) which provides an alternative route to iterate through the +results + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95006 +Tested-by: Jenkins +Reviewed-by: Caolán McNamara +(cherry picked from commit 0b94169d820482434dc98a37c3c1633ca46fd0dc) + +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95014 +Tested-by: Jenkins +Reviewed-by: Xisco Fauli +(cherry picked from commit f753baddc057a3bf4881ac78a15cd11fa847ee28) + +Change-Id: I2685e480d2d15220be0bddbc83baad3992e7d5d1 +--- + include/comphelper/accflowenum.hxx | 34 ---- + include/svx/srchdlg.hxx | 5 - + include/vcl/weld.hxx | 5 - + include/vcl/window.hxx | 4 - + .../ui/Accessibility/AccessibleDocument.cxx | 154 ------------------ + sc/source/ui/inc/AccessibleDocument.hxx | 7 +- + sc/source/ui/view/tabvwshe.cxx | 40 +---- + sd/IwyuFilter_sd.yaml | 1 - + .../AccessibleDocumentViewBase.cxx | 9 - + .../AccessibleDrawDocumentView.cxx | 151 ----------------- + .../ui/inc/AccessibleDocumentViewBase.hxx | 7 +- + .../ui/inc/AccessibleDrawDocumentView.hxx | 6 - + sd/source/ui/view/Outliner.cxx | 11 -- + svx/source/dialog/srchdlg.cxx | 57 ------- + sw/source/core/access/accdoc.cxx | 121 -------------- + sw/source/core/access/accdoc.hxx | 8 +- + sw/source/uibase/uiview/viewsrch.cxx | 38 ----- + .../source/awt/vclxaccessiblecomponent.cxx | 3 - + vcl/inc/window.h | 1 - + vcl/source/app/salvtables.cxx | 10 -- + vcl/source/window/window2.cxx | 15 -- + vcl/unx/gtk3/gtk3gtkinst.cxx | 29 +--- + 22 files changed, 5 insertions(+), 711 deletions(-) + delete mode 100644 include/comphelper/accflowenum.hxx + +diff --git a/include/comphelper/accflowenum.hxx b/include/comphelper/accflowenum.hxx +deleted file mode 100644 +index fc6b7ea2d8ec..000000000000 +--- a/include/comphelper/accflowenum.hxx ++++ /dev/null +@@ -1,34 +0,0 @@ +-/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +-/* +- * This file is part of the LibreOffice project. +- * +- * This Source Code Form is subject to the terms of the Mozilla Public +- * License, v. 2.0. If a copy of the MPL was not distributed with this +- * file, You can obtain one at http://mozilla.org/MPL/2.0/. +- * +- * This file incorporates work covered by the following license notice: +- * +- * Licensed to the Apache Software Foundation (ASF) under one or more +- * contributor license agreements. See the NOTICE file distributed +- * with this work for additional information regarding copyright +- * ownership. The ASF licenses this file to you under the Apache +- * License, Version 2.0 (the "License"); you may not use this file +- * except in compliance with the License. You may obtain a copy of +- * the License at http://www.apache.org/licenses/LICENSE-2.0 . +- */ +- +-#ifndef INCLUDED_COMPHELPER_ACCFLOWENUM_HXX +-#define INCLUDED_COMPHELPER_ACCFLOWENUM_HXX +- +-#include +- +-enum AccessibilityFlowTo : sal_Int32 +-{ +- FORSPELLCHECKFLOWTO = 1, +- FORFINDREPLACEFLOWTO_ITEM = 2, +- FORFINDREPLACEFLOWTO_RANGE = 3 +-}; +- +-#endif // INCLUDED_COMPHELPER_ACCFLOWENUM_HXX +- +-/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx +index 01f5b07663d5..3d1be499c399 100644 +--- a/include/svx/srchdlg.hxx ++++ b/include/svx/srchdlg.hxx +@@ -126,16 +126,11 @@ public: + + TransliterationFlags GetTransliterationFlags() const; + +- void SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand); +- void SetSrchFlag( bool bSuccess ) { mbSuccess = bSuccess; } +- bool GetSrchFlag() { return mbSuccess; } + void SetSaveToModule(bool b); + + void SetSearchLabel(const OUString& rStr); + + private: +- bool mbSuccess; +- + SfxBindings& rBindings; + bool bWriter; + bool bSearch; +diff --git a/include/vcl/weld.hxx b/include/vcl/weld.hxx +index b6c4c22d502c..bd76a44c846e 100644 +--- a/include/vcl/weld.hxx ++++ b/include/vcl/weld.hxx +@@ -147,11 +147,6 @@ public: + virtual void set_accessible_relation_labeled_by(weld::Widget* pLabel) = 0; + virtual void set_accessible_relation_label_for(weld::Widget* pLabeled) = 0; + +- virtual void +- add_extra_accessible_relation(const css::accessibility::AccessibleRelation& rRelation) +- = 0; +- virtual void clear_extra_accessible_relations() = 0; +- + virtual void set_tooltip_text(const OUString& rTip) = 0; + virtual OUString get_tooltip_text() const = 0; + +diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx +index 3b28f9a503a0..a4965b2acab8 100644 +--- a/include/vcl/window.hxx ++++ b/include/vcl/window.hxx +@@ -1253,10 +1253,6 @@ public: + void SetAccessibleRelationMemberOf( vcl::Window* pMemberOf ); + vcl::Window* GetAccessibleRelationMemberOf() const; + +- void AddExtraAccessibleRelation(const css::accessibility::AccessibleRelation &rRelation); +- const std::vector& GetExtraAccessibleRelations() const; +- void ClearExtraAccessibleRelations(); +- + // to avoid sending accessibility events in cases like closing dialogs + // by default checks complete parent path + bool IsAccessibilityEventsSuppressed( bool bTraverseParentPath = true ); +diff --git a/sc/source/ui/Accessibility/AccessibleDocument.cxx b/sc/source/ui/Accessibility/AccessibleDocument.cxx +index a63e419754be..8273d78dc8d3 100644 +--- a/sc/source/ui/Accessibility/AccessibleDocument.cxx ++++ b/sc/source/ui/Accessibility/AccessibleDocument.cxx +@@ -52,7 +52,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -1607,13 +1606,6 @@ void SAL_CALL ScAccessibleDocument::selectionChanged( const lang::EventObject& / + + uno::Any SAL_CALL ScAccessibleDocument::queryInterface( uno::Type const & rType ) + { +- uno::Any aAnyTmp; +- if(rType == cppu::UnoType::get()) +- { +- css::uno::Reference AccFromXShape = this; +- aAnyTmp <<= AccFromXShape; +- return aAnyTmp; +- } + uno::Any aAny (ScAccessibleDocumentImpl::queryInterface(rType)); + return aAny.hasValue() ? aAny : ScAccessibleContextBase::queryInterface(rType); + } +@@ -2232,152 +2224,6 @@ uno::Any SAL_CALL ScAccessibleDocument::getExtendedAttributes() + return anyAtrribute; + } + +-css::uno::Sequence< css::uno::Any > ScAccessibleDocument::GetScAccFlowToSequence() +-{ +- if ( getAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xSCTableAcc = getAccessibleChild( 0 ); // table +- if ( xSCTableAcc.is() ) +- { +- uno::Reference < XAccessibleSelection > xAccSelection( xSCTableAcc, uno::UNO_QUERY ); +- sal_Int32 nSelCount = xAccSelection->getSelectedAccessibleChildCount(); +- if( nSelCount ) +- { +- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); // selected cell +- if ( xSel.is() ) +- { +- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() ); +- if ( xSelContext.is() ) +- { +- if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL ) +- { +- sal_Int32 nParaCount = 0; +- uno::Sequence aSequence(nSelCount); +- for ( sal_Int32 i = 0; i < nSelCount; i++ ) +- { +- xSel = xAccSelection->getSelectedAccessibleChild( i ) ; +- if ( xSel.is() ) +- { +- xSelContext = xSel->getAccessibleContext(); +- if ( xSelContext.is() ) +- { +- if ( xSelContext->getAccessibleRole() == AccessibleRole::TABLE_CELL ) +- { +- aSequence[nParaCount] <<= xSel; +- nParaCount++; +- } +- } +- } +- } +- return aSequence; +- } +- } +- } +- } +- } +- } +- uno::Sequence aEmpty; +- return aEmpty; +-} +- +-css::uno::Sequence< css::uno::Any > +- SAL_CALL ScAccessibleDocument::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) +-{ +- SolarMutexGuard g; +- +- if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO) +- { +- uno::Reference< css::drawing::XShape > xShape; +- rAny >>= xShape; +- if ( xShape.is() ) +- { +- uno::Reference < XAccessible > xAcc = mpChildrenShapes->GetAccessibleCaption(xShape); +- uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY ); +- if ( xAccSelection.is() ) +- { +- if ( xAccSelection->getSelectedAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); +- if ( xSel.is() ) +- { +- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() ); +- if ( xSelContext.is() ) +- { +- //if in sw we find the selected paragraph here +- if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xSel; +- return aRet; +- } +- } +- } +- } +- } +- } +- else +- { +- if ( getSelectedAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 ); +- if ( xSel.is() ) +- { +- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() ); +- if ( xSelContext.is() ) +- { +- uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY ); +- if ( xAccChildSelection.is() ) +- { +- if ( xAccChildSelection->getSelectedAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 ); +- if ( xChildSel.is() ) +- { +- uno::Reference < css::accessibility::XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() ); +- if ( xChildSelContext.is() && +- xChildSelContext->getAccessibleRole() == css::accessibility::AccessibleRole::PARAGRAPH ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xChildSel; +- return aRet; +- } +- } +- } +- } +- } +- } +- } +- } +- } +- else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM || nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE) +- { +- bool bSuccess(false); +- rAny >>= bSuccess; +- if ( bSuccess ) +- { +- if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE) +- { +- uno::Sequence< uno::Any> aSeq = GetScAccFlowToSequence(); +- if ( aSeq.hasElements() ) +- { +- return aSeq; +- } +- } +- +- if( mpAccessibleSpreadsheet.is() ) +- { +- uno::Reference < XAccessible > xFindCellAcc = mpAccessibleSpreadsheet->GetActiveCell(); +- // add xFindCellAcc to the return the Sequence +- uno::Sequence< uno::Any> aSeq2(1); +- aSeq2[0] <<= xFindCellAcc; +- return aSeq2; +- } +- } +- } +- uno::Sequence< uno::Any> aEmpty; +- return aEmpty; +-} +- + sal_Int32 SAL_CALL ScAccessibleDocument::getForeground( ) + { + return sal_Int32(COL_BLACK); +diff --git a/sc/source/ui/inc/AccessibleDocument.hxx b/sc/source/ui/inc/AccessibleDocument.hxx +index c3441465121c..e2598051974c 100644 +--- a/sc/source/ui/inc/AccessibleDocument.hxx ++++ b/sc/source/ui/inc/AccessibleDocument.hxx +@@ -26,7 +26,6 @@ + #include + #include + #include +-#include + #include + + class ScTabViewShell; +@@ -52,7 +51,6 @@ typedef cppu::ImplHelper3< css::accessibility::XAccessibleSelection, + class ScAccessibleDocument + : public ScAccessibleDocumentBase, + public ScAccessibleDocumentImpl, +- public css::accessibility::XAccessibleGetAccFlowTo, + public accessibility::IAccessibleViewForwarder + { + public: +@@ -257,11 +255,8 @@ private: + public: + ScDocument *GetDocument() const ; + ScAddress GetCurCellAddress() const; +- //===== XAccessibleGetAccFromXShape ============================================ +- css::uno::Sequence< css::uno::Any > +- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override; + +- virtual sal_Int32 SAL_CALL getForeground( ) override; ++ virtual sal_Int32 SAL_CALL getForeground( ) override; + + virtual sal_Int32 SAL_CALL getBackground( ) override; + }; +diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx +index 516cb11e3cba..23e84b6f6dfe 100644 +--- a/sc/source/ui/view/tabvwshe.cxx ++++ b/sc/source/ui/view/tabvwshe.cxx +@@ -232,26 +232,7 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) + const SvxSearchItem* pSearchItem = static_cast(pItem); + + ScGlobal::SetSearchItem( *pSearchItem ); +- bool bSuccess = SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); +- SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( +- SvxSearchDialogWrapper::GetChildWindowId()); +- if (pChildWindow) +- { +- SvxSearchDialog* pSearchDlg = static_cast(pChildWindow->GetController().get()); +- if( pSearchDlg ) +- { +- ScTabView* pTabView = GetViewData().GetView(); +- if( pTabView ) +- { +- vcl::Window* pWin = pTabView->GetActiveWin(); +- if( pWin ) +- { +- pSearchDlg->SetDocWin( pWin, pSearchItem->GetCommand() ); +- pSearchDlg->SetSrchFlag( bSuccess ); +- } +- } +- } +- } ++ SearchAndReplace( pSearchItem, true, rReq.IsAPI() ); + rReq.Done(); + } + } +@@ -303,25 +284,6 @@ void ScTabViewShell::ExecSearch( SfxRequest& rReq ) + rReq.IsAPI() ? SfxCallMode::API|SfxCallMode::SYNCHRON : + SfxCallMode::RECORD, + { &aSearchItem }); +- SfxChildWindow* pChildWindow = SfxViewFrame::Current()->GetChildWindow( +- SvxSearchDialogWrapper::GetChildWindowId()); +- if (pChildWindow) +- { +- SvxSearchDialog* pSearchDlg = static_cast(pChildWindow->GetController().get()); +- if( pSearchDlg ) +- { +- ScTabView* pTabView = GetViewData().GetView(); +- if( pTabView ) +- { +- vcl::Window* pWin = pTabView->GetActiveWin(); +- if( pWin ) +- { +- pSearchDlg->SetDocWin( pWin, aSearchItem.GetCommand() ); +- pSearchDlg->SetSrchFlag(false); +- } +- } +- } +- } + } + else + { +diff --git a/sd/IwyuFilter_sd.yaml b/sd/IwyuFilter_sd.yaml +index 930f081dd117..f1573298c194 100644 +--- a/sd/IwyuFilter_sd.yaml ++++ b/sd/IwyuFilter_sd.yaml +@@ -145,7 +145,6 @@ blacklist: + sd/source/ui/inc/AccessibleDocumentViewBase.hxx: + # base class has to be a complete type + - com/sun/star/accessibility/XAccessibleExtendedAttributes.hpp +- - com/sun/star/accessibility/XAccessibleGetAccFlowTo.hpp + - com/sun/star/awt/XFocusListener.hpp + - com/sun/star/awt/XWindowListener.hpp + - com/sun/star/beans/XPropertyChangeListener.hpp +diff --git a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +index c271e70718cb..60cff2911b8b 100644 +--- a/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx ++++ b/sd/source/ui/accessibility/AccessibleDocumentViewBase.cxx +@@ -381,7 +381,6 @@ uno::Any SAL_CALL + static_cast(this), + static_cast(this) + ,static_cast(this) +- ,static_cast(this) + ); + return aReturn; + } +@@ -765,14 +764,6 @@ uno::Any SAL_CALL AccessibleDocumentViewBase::getExtendedAttributes() + return anyAtrribute; + } + +-css::uno::Sequence< css::uno::Any > +- SAL_CALL AccessibleDocumentViewBase::getAccFlowTo(const css::uno::Any&, sal_Int32 ) +-{ +- css::uno::Sequence< uno::Any> aRet; +- +- return aRet; +-} +- + sal_Int32 SAL_CALL AccessibleDocumentViewBase::getForeground( ) + { + return sal_Int32(COL_BLACK); +diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +index e178d93e7baf..6b644bc439d7 100644 +--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx ++++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx +@@ -30,7 +30,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -739,156 +738,6 @@ void SAL_CALL AccessibleDrawDocumentView::disposing() + AccessibleDocumentViewBase::disposing (); + } + +-css::uno::Sequence< css::uno::Any > +- SAL_CALL AccessibleDrawDocumentView::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) +-{ +- SolarMutexGuard g; +- +- if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO) +- { +- uno::Reference< css::drawing::XShape > xShape; +- rAny >>= xShape; +- if ( mpChildrenManager && xShape.is() ) +- { +- uno::Reference < XAccessible > xAcc = mpChildrenManager->GetChild(xShape); +- uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY ); +- if ( xAccSelection.is() ) +- { +- if ( xAccSelection->getSelectedAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); +- if ( xSel.is() ) +- { +- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() ); +- if ( xSelContext.is() ) +- { +- //if in sw we find the selected paragraph here +- if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xSel; +- return aRet; +- } +- } +- } +- } +- } +- uno::Reference xPara = GetSelAccContextInTable(); +- if ( xPara.is() ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xPara; +- return aRet; +- } +- } +- else +- { +- goto Rt; +- } +- } +- else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM || nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE) +- { +- sal_Int32 nChildCount = getSelectedAccessibleChildCount(); +- if ( nChildCount ) +- { +- uno::Reference < XAccessible > xSel = getSelectedAccessibleChild( 0 ); +- if ( xSel.is() ) +- { +- uno::Reference < XAccessibleSelection > xAccChildSelection( xSel, uno::UNO_QUERY ); +- if ( xAccChildSelection.is() ) +- { +- if ( xAccChildSelection->getSelectedAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xChildSel = xAccChildSelection->getSelectedAccessibleChild( 0 ); +- if ( xChildSel.is() ) +- { +- uno::Reference < XAccessibleContext > xChildSelContext( xChildSel->getAccessibleContext() ); +- if ( xChildSelContext.is() && +- xChildSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xChildSel; +- return aRet; +- } +- } +- } +- } +- } +- } +- else +- { +- uno::Reference xPara = GetSelAccContextInTable(); +- if ( xPara.is() ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xPara; +- return aRet; +- } +- } +- } +- +-Rt: +- css::uno::Sequence< uno::Any> aRet; +- return aRet; +-} +-uno::Reference AccessibleDrawDocumentView::GetSelAccContextInTable() +-{ +- uno::Reference xRet; +- sal_Int32 nCount = mpChildrenManager ? mpChildrenManager->GetChildCount() : 0; +- if ( nCount ) +- { +- for ( sal_Int32 i = 0; i < nCount; i++ ) +- { +- try +- { +- uno::Reference xObj = mpChildrenManager->GetChild(i); +- if ( xObj.is() ) +- { +- uno::Reference xObjContext( xObj, uno::UNO_QUERY ); +- if ( xObjContext.is() && xObjContext->getAccessibleRole() == AccessibleRole::TABLE ) +- { +- uno::Reference xObjSelection( xObj, uno::UNO_QUERY ); +- if ( xObjSelection.is() && xObjSelection->getSelectedAccessibleChildCount() ) +- { +- uno::Reference xCell = xObjSelection->getSelectedAccessibleChild(0); +- if ( xCell.is() ) +- { +- uno::Reference xCellSel( xCell, uno::UNO_QUERY ); +- if ( xCellSel.is() && xCellSel->getSelectedAccessibleChildCount() ) +- { +- uno::Reference xPara = xCellSel->getSelectedAccessibleChild( 0 ); +- if ( xPara.is() ) +- { +- uno::Reference xParaContext( xPara, uno::UNO_QUERY ); +- if ( xParaContext.is() && +- xParaContext->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- xRet = xPara; +- return xRet; +- } +- } +- } +- } +- } +- } +- } +- } +- catch (const lang::IndexOutOfBoundsException&) +- { +- uno::Reference xEmpty; +- return xEmpty; +- } +- catch (const uno::RuntimeException&) +- { +- uno::Reference xEmpty; +- return xEmpty; +- } +- } +- } +- +- return xRet; +-} +- + void AccessibleDrawDocumentView::UpdateAccessibleName() + { + OUString sNewName (CreateAccessibleName()); +diff --git a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx +index ee2acf119ce4..b29cc9533757 100644 +--- a/sd/source/ui/inc/AccessibleDocumentViewBase.hxx ++++ b/sd/source/ui/inc/AccessibleDocumentViewBase.hxx +@@ -33,7 +33,6 @@ + #include + + #include +-#include + + #include "Window.hxx" + +@@ -87,8 +86,7 @@ class AccessibleDocumentViewBase + public css::beans::XPropertyChangeListener, + public css::awt::XWindowListener, + public css::awt::XFocusListener, +- public css::accessibility::XAccessibleExtendedAttributes, +- public css::accessibility::XAccessibleGetAccFlowTo ++ public css::accessibility::XAccessibleExtendedAttributes + { + public: + //===== internal ======================================================== +@@ -313,9 +311,6 @@ protected: + */ + void SetAccessibleOLEObject ( + const css::uno::Reference& xOLEObject); +- //===== XAccessibleGetAccFromXShape ============================================ +- css::uno::Sequence< css::uno::Any > +- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override; + + public: + void SwitchViewActivated() { Activated(); } +diff --git a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx +index fd8b42f7161f..15097459bf76 100644 +--- a/sd/source/ui/inc/AccessibleDrawDocumentView.hxx ++++ b/sd/source/ui/inc/AccessibleDrawDocumentView.hxx +@@ -158,12 +158,6 @@ private: + + virtual void impl_dispose() override; + +- //===== XAccessibleGetAccFromXShape ============================================ +- css::uno::Sequence< css::uno::Any > +- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override; +- css::uno::Reference< css::accessibility::XAccessible > +- GetSelAccContextInTable(); +- + void UpdateAccessibleName(); + }; + +diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx +index f2094296fa0f..71e4391e3d7a 100644 +--- a/sd/source/ui/view/Outliner.cxx ++++ b/sd/source/ui/view/Outliner.cxx +@@ -501,17 +501,6 @@ bool SdOutliner::StartSearchAndReplace (const SvxSearchItem* pSearchItem) + } + mnStartPageIndex = sal_uInt16(-1); + } +- +- SfxChildWindow *pChildWin = +- SfxViewFrame::Current()->GetChildWindow( +- SvxSearchDialogWrapper::GetChildWindowId()); +- if (pChildWin) +- { +- SvxSearchDialog* pSearchDlg = +- static_cast(pChildWin->GetController().get()); +- pSearchDlg->SetDocWin( pViewShell->GetActiveWindow(), nCommand ); +- pSearchDlg->SetSrchFlag(false); +- } + } + else + mpDrawDocument->GetDocSh()->SetWaitCursor( false ); +diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx +index 445bc318718b..7501bcb6f9fd 100644 +--- a/svx/source/dialog/srchdlg.cxx ++++ b/svx/source/dialog/srchdlg.cxx +@@ -36,9 +36,6 @@ + #include + #include + #include +-#include +-#include +-#include + #include + #include + #include +@@ -48,7 +45,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -263,7 +259,6 @@ void SearchAttrItemList::Remove(size_t nPos) + SvxSearchDialog::SvxSearchDialog(weld::Window* pParent, SfxChildWindow* pChildWin, SfxBindings& rBind) + : SfxModelessDialogController(&rBind, pChildWin, pParent, + "svx/ui/findreplacedialog.ui", "FindReplaceDialog") +- , mbSuccess(false) + , rBindings(rBind) + , bWriter(false) + , bSearch(true) +@@ -2292,58 +2287,6 @@ void SvxSearchDialog::SaveToModule_Impl() + rBindings.GetDispatcher()->Execute( SID_SEARCH_ITEM, SfxCallMode::SLOT, ppArgs ); + } + +-void SvxSearchDialog::SetDocWin(vcl::Window* pDocWin, SvxSearchCmd eCommand) +-{ +- m_xDialog->clear_extra_accessible_relations(); +- +- if (!pDocWin) +- return; +- +- Reference xDocAcc = pDocWin->GetAccessible(); +- if (!xDocAcc.is()) +- { +- return; +- } +- Reference xGetAccFlowTo(xDocAcc, UNO_QUERY); +- if (!xGetAccFlowTo.is()) +- { +- return; +- } +- +- /* tdf#128313 FlowTo tries to set an a11y relation between the search dialog +- and its results. But for "find/replace" within a calc column we don't +- want to return the entire column as the result, we want the current cell. +- +- But with search/all we do want the new multi-cellselection as the result. +- */ +- AccessibilityFlowTo eFlowTo(AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM); +- switch (eCommand) +- { +- case SvxSearchCmd::FIND: +- case SvxSearchCmd::REPLACE: +- eFlowTo = AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM; +- break; +- case SvxSearchCmd::FIND_ALL: +- case SvxSearchCmd::REPLACE_ALL: +- eFlowTo = AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE; +- break; +- } +- uno::Sequence aAnySeq = xGetAccFlowTo->getAccFlowTo(Any(GetSrchFlag()), eFlowTo); +- +- sal_Int32 nLen = aAnySeq.getLength(); +- if (nLen) +- { +- uno::Sequence> aSequence(nLen); +- for (sal_Int32 i = 0; i < nLen; ++i) +- { +- uno::Reference < css::accessibility::XAccessible > xAcc; +- aAnySeq[i] >>= xAcc; +- aSequence[i] = xAcc; +- } +- m_xDialog->add_extra_accessible_relation(css::accessibility::AccessibleRelation(css::accessibility::AccessibleRelationType::CONTENT_FLOWS_TO, aSequence)); +- } +-} +- + short SvxSearchDialog::executeSubDialog(VclAbstractDialog * dialog) { + assert(!m_executingSubDialog); + comphelper::ScopeGuard g([this] { m_executingSubDialog = false; }); +diff --git a/sw/source/core/access/accdoc.cxx b/sw/source/core/access/accdoc.cxx +index 4f7f2a81a158..827e4ba0ad16 100644 +--- a/sw/source/core/access/accdoc.cxx ++++ b/sw/source/core/access/accdoc.cxx +@@ -24,7 +24,6 @@ + #include + #include + #include +-#include + #include + #include + #include +@@ -459,11 +458,6 @@ uno::Any SwAccessibleDocument::queryInterface( + uno::Reference aAttribute = this; + aRet <<= aAttribute; + } +- else if(rType == cppu::UnoType::get()) +- { +- uno::Reference AccFlowTo = this; +- aRet <<= AccFlowTo; +- } + else + aRet = SwAccessibleContext::queryInterface( rType ); + return aRet; +@@ -758,119 +752,4 @@ sal_Int32 SAL_CALL SwAccessibleDocument::getBackground() + return sal_Int32(SW_MOD()->GetColorConfig().GetColorValue( ::svtools::DOCCOLOR ).nColor); + } + +-css::uno::Sequence< css::uno::Any > +- SAL_CALL SwAccessibleDocument::getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) +-{ +- SolarMutexGuard g; +- +- SwAccessibleMap* pAccMap = GetMap(); +- if ( !pAccMap ) +- { +- return uno::Sequence< uno::Any >(); +- } +- +- if (nType == AccessibilityFlowTo::FORSPELLCHECKFLOWTO) +- { +- uno::Reference< css::drawing::XShape > xShape; +- rAny >>= xShape; +- if( xShape.is() ) +- { +- SdrObject* pObj = GetSdrObjectFromXShape(xShape); +- if( pObj ) +- { +- uno::Reference xAcc = pAccMap->GetContext(pObj, this, false); +- uno::Reference < XAccessibleSelection > xAccSelection( xAcc, uno::UNO_QUERY ); +- if ( xAccSelection.is() ) +- { +- try +- { +- if ( xAccSelection->getSelectedAccessibleChildCount() ) +- { +- uno::Reference < XAccessible > xSel = xAccSelection->getSelectedAccessibleChild( 0 ); +- if ( xSel.is() ) +- { +- uno::Reference < XAccessibleContext > xSelContext( xSel->getAccessibleContext() ); +- if ( xSelContext.is() ) +- { +- //if in sw we find the selected paragraph here +- if ( xSelContext->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- uno::Sequence aRet( 1 ); +- aRet[0] <<= xSel; +- return aRet; +- } +- } +- } +- } +- } +- catch ( const css::lang::IndexOutOfBoundsException& ) +- { +- return uno::Sequence< uno::Any >(); +- } +- //end of try...catch +- } +- } +- } +- else +- { +- uno::Reference< XAccessible > xAcc = pAccMap->GetCursorContext(); +- SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); +- if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- uno::Sequence< uno::Any > aRet(1); +- aRet[0] <<= xAcc; +- return aRet; +- } +- } +- } +- else if (nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_ITEM || nType == AccessibilityFlowTo::FORFINDREPLACEFLOWTO_RANGE) +- { +- SwCursorShell* pCursorShell = GetCursorShell(); +- if ( pCursorShell ) +- { +- SwPaM *_pStartCursor = pCursorShell->GetCursor(), *_pStartCursor2 = _pStartCursor; +- std::set vFrameList; +- do +- { +- if ( _pStartCursor && _pStartCursor->HasMark() ) +- { +- SwContentNode* pContentNode = _pStartCursor->GetContentNode(); +- SwFrame *const pFrame = pContentNode +- ? pContentNode->getLayoutFrame(pCursorShell->GetLayout(), _pStartCursor->GetPoint()) +- : nullptr; +- if ( pFrame ) +- { +- vFrameList.insert( pFrame ); +- } +- } +- } +- +- while( _pStartCursor && ( (_pStartCursor = _pStartCursor->GetNext()) != _pStartCursor2) ); +- +- if ( !vFrameList.empty() ) +- { +- uno::Sequence< uno::Any > aRet(vFrameList.size()); +- sal_Int32 nIndex = 0; +- for ( const auto& rpFrame : vFrameList ) +- { +- uno::Reference< XAccessible > xAcc = pAccMap->GetContext(rpFrame, false); +- if ( xAcc.is() ) +- { +- SwAccessibleContext *pAccImpl = static_cast< SwAccessibleContext *>( xAcc.get() ); +- if ( pAccImpl && pAccImpl->getAccessibleRole() == AccessibleRole::PARAGRAPH ) +- { +- aRet[nIndex] <<= xAcc; +- } +- } +- nIndex++; +- } +- +- return aRet; +- } +- } +- } +- +- return uno::Sequence< uno::Any >(); +-} +- + /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ +diff --git a/sw/source/core/access/accdoc.hxx b/sw/source/core/access/accdoc.hxx +index e815ebf3682d..3dc43bc6b6eb 100644 +--- a/sw/source/core/access/accdoc.hxx ++++ b/sw/source/core/access/accdoc.hxx +@@ -23,7 +23,6 @@ + #include "acccontext.hxx" + #include + #include +-#include + #include "accselectionhelper.hxx" + + // base class for SwAccessibleDocument (in this same header file) and +@@ -92,8 +91,7 @@ public: + */ + class SwAccessibleDocument : public SwAccessibleDocumentBase, + public css::accessibility::XAccessibleSelection, +- public css::accessibility::XAccessibleExtendedAttributes, +- public css::accessibility::XAccessibleGetAccFlowTo ++ public css::accessibility::XAccessibleExtendedAttributes + { + // Implementation for XAccessibleSelection interface + SwAccessibleSelectionHelper maSelectionHelper; +@@ -170,10 +168,6 @@ public: + + // XAccessibleComponent + sal_Int32 SAL_CALL getBackground() override; +- +- // XAccessibleGetAccFlowTo +- css::uno::Sequence< css::uno::Any > +- SAL_CALL getAccFlowTo(const css::uno::Any& rAny, sal_Int32 nType) override; + }; + + #endif +diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx +index 9bc9944ca36c..2370430d712d 100644 +--- a/sw/source/uibase/uiview/viewsrch.cxx ++++ b/sw/source/uibase/uiview/viewsrch.cxx +@@ -249,16 +249,6 @@ void SwView::ExecSearch(SfxRequest& rReq) + lcl_emitSearchResultCallbacks(s_pSrchItem, m_pWrtShell.get(), /* bHighlightAll = */ false); + } + rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); +-#if HAVE_FEATURE_DESKTOP +- { +- pSrchDlg = GetSearchDialog(); +- if (pSrchDlg) +- { +- pSrchDlg->SetDocWin(m_pEditWin, eCommand); +- pSrchDlg->SetSrchFlag(false); +- } +- } +-#endif + } + break; + case SvxSearchCmd::FIND_ALL: +@@ -282,16 +272,6 @@ void SwView::ExecSearch(SfxRequest& rReq) + else if (comphelper::LibreOfficeKit::isActive()) + lcl_emitSearchResultCallbacks(s_pSrchItem, m_pWrtShell.get(), /* bHighlightAll = */ true); + rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); +-#if HAVE_FEATURE_DESKTOP +- { +- pSrchDlg = GetSearchDialog(); +- if (pSrchDlg) +- { +- pSrchDlg->SetDocWin(m_pEditWin, eCommand); +- pSrchDlg->SetSrchFlag(false); +- } +- } +-#endif + } + break; + case SvxSearchCmd::REPLACE: +@@ -340,16 +320,6 @@ void SwView::ExecSearch(SfxRequest& rReq) + s_pSrchItem->SetCommand( nOldCmd ); + rReq.SetReturnValue(SfxBoolItem(nSlot, bRet)); + } +-#if HAVE_FEATURE_DESKTOP +- { +- pSrchDlg = GetSearchDialog(); +- if (pSrchDlg) +- { +- pSrchDlg->SetDocWin(m_pEditWin, eCommand); +- pSrchDlg->SetSrchFlag(false); +- } +- } +-#endif + break; + + case SvxSearchCmd::REPLACE_ALL: +@@ -409,14 +379,6 @@ void SwView::ExecSearch(SfxRequest& rReq) + SvxSearchDialogWrapper::SetSearchLabel(sText); + } + } +-#if HAVE_FEATURE_DESKTOP +- pSrchDlg = GetSearchDialog(); +- if (pSrchDlg) +- { +- pSrchDlg->SetDocWin(m_pEditWin, eCommand); +- pSrchDlg->SetSrchFlag(false); +- } +-#endif + break; + } + +diff --git a/toolkit/source/awt/vclxaccessiblecomponent.cxx b/toolkit/source/awt/vclxaccessiblecomponent.cxx +index f9b55d278655..7c963e83e9b6 100644 +--- a/toolkit/source/awt/vclxaccessiblecomponent.cxx ++++ b/toolkit/source/awt/vclxaccessiblecomponent.cxx +@@ -375,9 +375,6 @@ void VCLXAccessibleComponent::FillAccessibleRelationSet( utl::AccessibleRelation + uno::Sequence< uno::Reference< uno::XInterface > > aSequence { pMemberOf->GetAccessible() }; + rRelationSet.AddRelation( accessibility::AccessibleRelation( accessibility::AccessibleRelationType::MEMBER_OF, aSequence ) ); + } +- +- for (const auto& rExtraRelation : pWindow->GetExtraAccessibleRelations()) +- rRelationSet.AddRelation(rExtraRelation); + } + } + +diff --git a/vcl/inc/window.h b/vcl/inc/window.h +index 9c3dec48a725..4502770194fa 100644 +--- a/vcl/inc/window.h ++++ b/vcl/inc/window.h +@@ -280,7 +280,6 @@ public: + css::uno::Reference< css::accessibility::XAccessible > mxAccessible; + std::shared_ptr< VclSizeGroup > m_xSizeGroup; + std::vector> m_aMnemonicLabels; +- std::vector m_aExtraAccessibleRelations; + std::unique_ptr mpAccessibleInfos; + VCLXWindow* mpVCLXWindow; + vcl::Region maWinRegion; //< region to 'shape' the VCL window (frame coordinates) +diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx +index fb5c50bd0dda..41ffa6918af5 100644 +--- a/vcl/source/app/salvtables.cxx ++++ b/vcl/source/app/salvtables.cxx +@@ -510,16 +510,6 @@ public: + m_xWidget->SetAccessibleRelationLabelFor(pAtkLabeled); + } + +- virtual void add_extra_accessible_relation(const css::accessibility::AccessibleRelation &rRelation) override +- { +- m_xWidget->AddExtraAccessibleRelation(rRelation); +- } +- +- virtual void clear_extra_accessible_relations() override +- { +- m_xWidget->ClearExtraAccessibleRelations(); +- } +- + virtual void set_tooltip_text(const OUString& rTip) override + { + m_xWidget->SetQuickHelpText(rTip); +diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx +index a5174bb8e367..0b787c288903 100644 +--- a/vcl/source/window/window2.cxx ++++ b/vcl/source/window/window2.cxx +@@ -1966,21 +1966,6 @@ const std::vector >& Window::list_mnemonic_labels() const + return mpWindowImpl->m_aMnemonicLabels; + } + +-void Window::AddExtraAccessibleRelation(const css::accessibility::AccessibleRelation &rRelation) +-{ +- mpWindowImpl->m_aExtraAccessibleRelations.push_back(rRelation); +-} +- +-const std::vector& Window::GetExtraAccessibleRelations() const +-{ +- return mpWindowImpl->m_aExtraAccessibleRelations; +-} +- +-void Window::ClearExtraAccessibleRelations() +-{ +- mpWindowImpl->m_aExtraAccessibleRelations.clear(); +-} +- + } /* namespace vcl */ + + void DrawFocusRect(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) +diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx +index 844a9f5a493b..9f1adaca77ed 100644 +--- a/vcl/unx/gtk3/gtk3gtkinst.cxx ++++ b/vcl/unx/gtk3/gtk3gtkinst.cxx +@@ -1436,7 +1436,7 @@ private: + gulong m_nDragLeaveSignalId; + + rtl::Reference m_xDropTarget; +- std::vector m_aExtraAtkRelations; ++ rtl::Reference m_xDragSource; + + static void signalSizeAllocate(GtkWidget*, GdkRectangle* allocation, gpointer widget) + { +@@ -1941,33 +1941,6 @@ public: + g_object_unref(pRelationSet); + } + +- virtual void add_extra_accessible_relation(const css::accessibility::AccessibleRelation &rRelation) override +- { +- AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget); +- if (!pAtkObject) +- return; +- +- AtkRelationSet *pRelationSet = atk_object_ref_relation_set(pAtkObject); +- AtkRelation *pRel = atk_object_wrapper_relation_new(rRelation); +- m_aExtraAtkRelations.push_back(pRel); +- atk_relation_set_add(pRelationSet, pRel); +- g_object_unref(pRel); +- g_object_unref(pRelationSet); +- } +- +- virtual void clear_extra_accessible_relations() override +- { +- AtkObject* pAtkObject = gtk_widget_get_accessible(m_pWidget); +- if (!pAtkObject) +- return; +- +- AtkRelationSet *pRelationSet = atk_object_ref_relation_set(pAtkObject); +- for (AtkRelation* pRel : m_aExtraAtkRelations) +- atk_relation_set_remove(pRelationSet, pRel); +- m_aExtraAtkRelations.clear(); +- g_object_unref(pRelationSet); +- } +- + virtual bool get_extents_relative_to(weld::Widget& rRelative, int& x, int &y, int& width, int &height) override + { + //for toplevel windows this is sadly futile under wayland, so we can't tell where a dialog is in order to allow +-- +2.25.4 + diff --git a/SOURCES/0001-Upgrade-to-ICU-61.1.patch b/SOURCES/0001-Upgrade-to-ICU-61.1.patch deleted file mode 100644 index ed64bec..0000000 --- a/SOURCES/0001-Upgrade-to-ICU-61.1.patch +++ /dev/null @@ -1,675 +0,0 @@ -From f247f08e370626bbb427acd8f4a400fd875350a3 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Eike Rathke -Date: Tue, 17 Apr 2018 20:13:52 +0200 -Subject: [PATCH] Upgrade to ICU 61.1 -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" - -This is a multi-part message in MIME format. ---------------erAck-patch-parts -Content-Type: text/plain; charset=UTF-8; format=fixed -Content-Transfer-Encoding: 8bit - - -Change-Id: I89c1c3d13d85decc72576744de2a16d20471d29d -Reviewed-on: https://gerrit.libreoffice.org/53064 -Tested-by: Jenkins -Reviewed-by: Eike Rathke ---- - configure.ac | 4 +- - download.lst | 8 +- - external/icu/UnpackedTarball_icu.mk | 3 +- - ...patch.1 => icu4c-61-werror-shadow.patch.1} | 30 ++- - external/icu/icu4c-khmerbreakengine.patch.1 | 246 +++++++++--------- - external/icu/icu4c-ubsan.patch.1 | 91 ------- - 6 files changed, 147 insertions(+), 235 deletions(-) - rename external/icu/{icu4c-59-werror-shadow.patch.1 => icu4c-61-werror-shadow.patch.1} (50%) - delete mode 100644 external/icu/icu4c-ubsan.patch.1 - - ---------------erAck-patch-parts -Content-Type: text/x-patch; name="0001-Upgrade-to-ICU-61.1.patch" -Content-Transfer-Encoding: 8bit -Content-Disposition: attachment; filename="0001-Upgrade-to-ICU-61.1.patch" - -diff --git a/configure.ac b/configure.ac -index bdc374699cb9..458f9f3c2735 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -9001,8 +9001,8 @@ SYSTEM_GENBRK= - SYSTEM_GENCCODE= - SYSTEM_GENCMN= - --ICU_MAJOR=60 --ICU_MINOR=2 -+ICU_MAJOR=61 -+ICU_MINOR=1 - ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE" - ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE" - ICU_RECLASSIFIED_HEBREW_LETTER="TRUE" -diff --git a/download.lst b/download.lst -index 0a1fa65396d1..76f067bff4d7 100644 ---- a/download.lst -+++ b/download.lst -@@ -102,10 +102,10 @@ export HUNSPELL_SHA256SUM := 3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce - export HUNSPELL_TARBALL := hunspell-1.6.2.tar.gz - export HYPHEN_SHA256SUM := 304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705 - export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz --export ICU_SHA256SUM := f073ea8f35b926d70bb33e6577508aa642a8b316a803f11be20af384811db418 --export ICU_TARBALL := icu4c-60_2-src.tgz --export ICU_DATA_SHA256SUM := 68f42ad0c9e0a5a5af8eba0577ba100833912288bad6e4d1f42ff480bbcfd4a9 --export ICU_DATA_TARBALL := icu4c-60_2-data.zip -+export ICU_SHA256SUM := d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef -+export ICU_TARBALL := icu4c-61_1-src.tgz -+export ICU_DATA_SHA256SUM := d149ed0985b5a6e16a9d8ed66f105dd58fd334c276779f74241cfa656ed2830a -+export ICU_DATA_TARBALL := icu4c-61_1-data.zip - export JFREEREPORT_FLOW_ENGINE_SHA256SUM := 233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd - export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip - export JFREEREPORT_FLUTE_SHA256SUM := 1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133 -diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk -index a4d0b16ecb36..b81cdaab6242 100644 ---- a/external/icu/UnpackedTarball_icu.mk -+++ b/external/icu/UnpackedTarball_icu.mk -@@ -27,15 +27,14 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ - external/icu/icu4c-solarisgcc.patch.1 \ - external/icu/icu4c-mkdir.patch.1 \ - external/icu/icu4c-$(if $(filter ANDROID,$(OS)),android,rpath).patch.1 \ -- external/icu/icu4c-ubsan.patch.1 \ - external/icu/icu4c-icu11100.patch.1 \ - external/icu/icu4c-scriptrun.patch.1 \ - external/icu/icu4c-rtti.patch.1 \ - external/icu/icu4c-clang-cl.patch.1 \ - $(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \ - external/icu/icu4c-khmerbreakengine.patch.1 \ -- external/icu/icu4c-59-werror-shadow.patch.1 \ - external/icu/ofz4860.patch.2 \ -+ external/icu/icu4c-61-werror-shadow.patch.1 \ - )) - - $(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict)) -diff --git a/external/icu/icu4c-59-werror-shadow.patch.1 b/external/icu/icu4c-61-werror-shadow.patch.1 -similarity index 50% -rename from external/icu/icu4c-59-werror-shadow.patch.1 -rename to external/icu/icu4c-61-werror-shadow.patch.1 -index fb88244aff13..b00f76317eff 100644 ---- a/external/icu/icu4c-59-werror-shadow.patch.1 -+++ b/external/icu/icu4c-61-werror-shadow.patch.1 -@@ -1,33 +1,35 @@ -+# https://ssl.icu-project.org/trac/ticket/13709 -+# Werror=shadow fails for unistr.h - diff -ur icu.org/source/common/unicode/unistr.h icu/source/common/unicode/unistr.h ----- icu.org/source/common/unicode/unistr.h 2017-03-29 06:44:37.000000000 +0200 --+++ icu/source/common/unicode/unistr.h 2017-04-24 11:59:51.782076511 +0200 --@@ -3080,11 +3080,11 @@ -+--- icu.org/source/common/unicode/unistr.h 2018-03-26 15:38:29.000000000 +0200 -++++ icu/source/common/unicode/unistr.h 2018-04-18 10:44:16.321188314 +0200 -+@@ -3053,11 +3053,11 @@ - * uint16_t * constructor. - * Delegates to UnicodeString(const char16_t *, int32_t). - * @param text UTF-16 string - - * @param length string length --+ * @param length_ string length -- * @draft ICU 59 -++ * @param textLength string length -+ * @stable ICU 59 - */ - - UnicodeString(const uint16_t *text, int32_t length) : - - UnicodeString(ConstChar16Ptr(text), length) {} --+ UnicodeString(const uint16_t *text, int32_t length_) : --+ UnicodeString(ConstChar16Ptr(text), length_) {} -++ UnicodeString(const uint16_t *text, int32_t textLength) : -++ UnicodeString(ConstChar16Ptr(text), textLength) {} - #endif - -- /* --@@ -3097,11 +3097,11 @@ -+ #if U_SIZEOF_WCHAR_T==2 || defined(U_IN_DOXYGEN) -+@@ -3066,11 +3066,11 @@ - * (Only defined if U_SIZEOF_WCHAR_T==2.) - * Delegates to UnicodeString(const char16_t *, int32_t). - * @param text NUL-terminated UTF-16 string - - * @param length string length --+ * @param length_ string length -- * @draft ICU 59 -++ * @param textLength string length -+ * @stable ICU 59 - */ - - UnicodeString(const wchar_t *text, int32_t length) : - - UnicodeString(ConstChar16Ptr(text), length) {} --+ UnicodeString(const wchar_t *text, int32_t length_) : --+ UnicodeString(ConstChar16Ptr(text), length_) {} -++ UnicodeString(const wchar_t *text, int32_t textLength) : -++ UnicodeString(ConstChar16Ptr(text), textLength) {} - #endif - -- /* -+ /** -diff --git a/external/icu/icu4c-khmerbreakengine.patch.1 b/external/icu/icu4c-khmerbreakengine.patch.1 -index 6b45b3743611..9f134dd961b1 100644 ---- a/external/icu/icu4c-khmerbreakengine.patch.1 -+++ b/external/icu/icu4c-khmerbreakengine.patch.1 -@@ -1,16 +1,18 @@ - diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp ----- icu.org/source/common/dictbe.cpp 2017-01-20 01:20:31.000000000 +0100 --+++ icu/source/common/dictbe.cpp 2017-04-21 23:14:23.845894374 +0200 --@@ -29,8 +29,17 @@ -+--- icu.org/source/common/dictbe.cpp 2018-03-26 15:38:30.000000000 +0200 -++++ icu/source/common/dictbe.cpp 2018-04-17 17:55:38.620944919 +0200 -+@@ -29,7 +29,19 @@ - ****************************************************************** - */ - ---DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) { --+DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) : --+ clusterLimit(3) --+{ -+-DictionaryBreakEngine::DictionaryBreakEngine() { -++DictionaryBreakEngine::DictionaryBreakEngine() -++ : fTypes(0), clusterLimit(0) { -++} -++ -++DictionaryBreakEngine::DictionaryBreakEngine(uint32_t breakTypes) -++ : fTypes(breakTypes), clusterLimit(3) { - + UErrorCode status = U_ZERO_ERROR; -- fTypes = breakTypes; - + fViramaSet.applyPattern(UNICODE_STRING_SIMPLE("[[:ccc=VR:]]"), status); - + - + // note Skip Sets contain fIgnoreSet characters too. -@@ -20,16 +22,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - } - - DictionaryBreakEngine::~DictionaryBreakEngine() { --@@ -92,7 +101,7 @@ -- result = divideUpDictionaryRange(text, rangeStart, rangeEnd, foundBreaks); -- utext_setNativeIndex(text, current); -- } --- --+ -- return result; -- } -- --@@ -103,6 +112,169 @@ -+@@ -76,6 +88,169 @@ - fSet.compact(); - } - -@@ -199,7 +192,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - /* - ****************************************************************** - * PossibleWord --@@ -130,35 +302,35 @@ -+@@ -103,35 +278,35 @@ - public: - PossibleWord() : count(0), prefix(0), offset(-1), mark(0), current(0) {}; - ~PossibleWord() {}; -@@ -244,7 +237,7 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - // Dictionary leaves text after longest prefix, not longest word. Back up. - if (count <= 0) { - utext_setNativeIndex(text, start); --@@ -830,51 +1002,28 @@ -+@@ -803,51 +978,28 @@ - * KhmerBreakEngine - */ - -@@ -265,7 +258,8 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - -static const int32_t KHMER_MIN_WORD_SPAN = KHMER_MIN_WORD * 2; - - - KhmerBreakEngine::KhmerBreakEngine(DictionaryMatcher *adoptDictionary, UErrorCode &status) -- : DictionaryBreakEngine((1 << UBRK_WORD) | (1 << UBRK_LINE)), -+- : DictionaryBreakEngine(), -++ : DictionaryBreakEngine((1 << UBRK_WORD) | (1 << UBRK_LINE)), - fDictionary(adoptDictionary) - { - - fKhmerWordSet.applyPattern(UNICODE_STRING_SIMPLE("[[:Khmr:]&[:LineBreak=SA:]]"), status); -@@ -301,13 +295,13 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - fEndWordSet.compact(); - - fBeginWordSet.compact(); - -// fSuffixSet.compact(); --+ fIgnoreSet.compact(); --+ fBaseSet.compact(); --+ fPuncSet.compact(); -++ fIgnoreSet.compact(); -++ fBaseSet.compact(); -++ fPuncSet.compact(); - } - - KhmerBreakEngine::~KhmerBreakEngine() { --@@ -886,180 +1035,204 @@ -+@@ -859,180 +1011,204 @@ - int32_t rangeStart, - int32_t rangeEnd, - UVector32 &foundBreaks ) const { -@@ -350,17 +344,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - + foundBreaks.push(rangeEnd, status); - + return foundBreaks.size() - wordsFound; - + } --+ --+ scanStart = rangeStart; --+ scanWJ(text, scanStart, rangeEnd, before, after); --+ if (startZwsp || initAfter >= before) { --+ after = initAfter; --+ before = 0; --+ } --+ if (!endZwsp && after > finalBefore && after < rangeEnd) --+ endZwsp = true; --+ if (endZwsp && before > finalBefore) --+ before = finalBefore; - - - while (U_SUCCESS(status) && (current = (int32_t)utext_getNativeIndex(text)) < rangeEnd) { - - cuWordLength = 0; -@@ -375,7 +358,17 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - cpWordLength = words[wordsFound % KHMER_LOOKAHEAD].markedCPLength(); - - wordsFound += 1; - - } --- -++ scanStart = rangeStart; -++ scanWJ(text, scanStart, rangeEnd, before, after); -++ if (startZwsp || initAfter >= before) { -++ after = initAfter; -++ before = 0; -++ } -++ if (!endZwsp && after > finalBefore && after < rangeEnd) -++ endZwsp = true; -++ if (endZwsp && before > finalBefore) -++ before = finalBefore; -+ - - // If there was more than one, see which one can take us forward the most words - - else if (candidates > 1) { - - // If we're already at the end of the range, we're done -@@ -390,22 +383,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - words[wordsFound % KHMER_LOOKAHEAD].markCurrent(); - - wordsMatched = 2; - - } --- --- // If we're already at the end of the range, we're done --- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { --- goto foundBest; --- } --- --- // See if any of the possible second words is followed by a third word --- do { --- // If we find a third word, stop right away --- if (words[(wordsFound + 2) % KHMER_LOOKAHEAD].candidates(text, fDictionary, rangeEnd)) { --- words[wordsFound % KHMER_LOOKAHEAD].markCurrent(); --- goto foundBest; --- } --- } --- while (words[(wordsFound + 1) % KHMER_LOOKAHEAD].backUp(text)); --- } - + utext_setNativeIndex(text, rangeStart); - + int32_t numCodePts = rangeEnd - rangeStart; - + // bestSnlp[i] is the snlp of the best segmentation of the first i -@@ -415,7 +392,11 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - + for(int32_t i = 1; i <= numCodePts; i++) { - + bestSnlp.addElement(kuint32max, status); - + } --+ -+ -+- // If we're already at the end of the range, we're done -+- if ((int32_t)utext_getNativeIndex(text) >= rangeEnd) { -+- goto foundBest; -+- } - + // prev[i] is the index of the last code point in the previous word in - + // the best segmentation of the first i characters. Note negative implies - + // that the code point is part of an unknown word. -@@ -423,7 +404,17 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - + for(int32_t i = 0; i <= numCodePts; i++) { - + prev.addElement(kuint32max, status); - + } --+ -+ -+- // See if any of the possible second words is followed by a third word -+- do { -+- // If we find a third word, stop right away -+- if (words[(wordsFound + 2) % KHMER_LOOKAHEAD].candidates(text, fDictionary, rangeEnd)) { -+- words[wordsFound % KHMER_LOOKAHEAD].markCurrent(); -+- goto foundBest; -+- } -+- } -+- while (words[(wordsFound + 1) % KHMER_LOOKAHEAD].backUp(text)); -+- } - + const int32_t maxWordSize = 20; - + UVector32 values(maxWordSize, status); - + values.setSize(maxWordSize); -@@ -528,27 +519,17 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - if (cuWordLength <= 0) { - - wordsFound += 1; - - } --- --- // Update the length with the passed-over characters --- cuWordLength += chars; --- } --- else { --- // Back up to where we were for next iteration --- utext_setNativeIndex(text, current+cuWordLength); - + } while (fMarkSet.contains(c) || fIgnoreSet.contains(c)); - + values.setElementAt(BADSNLP, count); - + lengths.setElementAt(utext_getNativeIndex(text) - currix, count++); - + } else { - + values.setElementAt(BADSNLP, count); - + lengths.setElementAt(1, count++); -- } -- } -++ } -++ } - --- // Never stop before a combining mark. --- int32_t currPos; --- while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { --- utext_next32(text); --- cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; -+- // Update the length with the passed-over characters -+- cuWordLength += chars; - + for (int32_t j = 0; j < count; j++) { - + uint32_t v = values.elementAti(j); - + int32_t newSnlp = bestSnlp.elementAti(i) + v; -@@ -559,7 +540,10 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - + ++ln; - + utext_next32(text); - + c = utext_current32(text); --+ } -+ } -+- else { -+- // Back up to where we were for next iteration -+- utext_setNativeIndex(text, current+cuWordLength); - + int32_t ln_j_i = ln + i; // yes really i! - + if (newSnlp < bestSnlp.elementAti(ln_j_i)) { - + if (v == BADSNLP) { -@@ -572,9 +556,38 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - + else - + prev.setElementAt(i, ln_j_i); - + bestSnlp.setElementAt(newSnlp, ln_j_i); --+ } -+ } - } - - -+- // Never stop before a combining mark. -+- int32_t currPos; -+- while ((currPos = (int32_t)utext_getNativeIndex(text)) < rangeEnd && fMarkSet.contains(utext_current32(text))) { -+- utext_next32(text); -+- cuWordLength += (int32_t)utext_getNativeIndex(text) - currPos; -++ } -++ // Start pushing the optimal offset index into t_boundary (t for tentative). -++ // prev[numCodePts] is guaranteed to be meaningful. -++ // We'll first push in the reverse order, i.e., -++ // t_boundary[0] = numCodePts, and afterwards do a swap. -++ UVector32 t_boundary(numCodePts+1, status); -++ -++ int32_t numBreaks = 0; -++ // No segmentation found, set boundary to end of range -++ while (numCodePts >= 0 && (uint32_t)bestSnlp.elementAti(numCodePts) == kuint32max) { -++ --numCodePts; -++ } -++ if (numCodePts < 0) { -++ t_boundary.addElement(numCodePts, status); -++ numBreaks++; -++ } else { -++ for (int32_t i = numCodePts; (uint32_t)i != kuint32max; i = prev.elementAti(i)) { -++ if (i < 0) i = -i; -++ t_boundary.addElement(i, status); -++ numBreaks++; -+ } -++ U_ASSERT(prev.elementAti(t_boundary.elementAti(numBreaks - 1)) == 0); -++ } -+ - - // Look ahead for possible suffixes if a dictionary word does not follow. - - // We do this in code rather than using a rule so that the heuristic - - // resynch continues to function. For example, one of the suffix characters -@@ -616,30 +629,6 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - // Did we find a word on this iteration? If so, push it on the break stack - - if (cuWordLength > 0) { - - foundBreaks.push((current+cuWordLength), status); --+ } --+ // Start pushing the optimal offset index into t_boundary (t for tentative). --+ // prev[numCodePts] is guaranteed to be meaningful. --+ // We'll first push in the reverse order, i.e., --+ // t_boundary[0] = numCodePts, and afterwards do a swap. --+ UVector32 t_boundary(numCodePts+1, status); --+ --+ int32_t numBreaks = 0; --+ // No segmentation found, set boundary to end of range --+ while (numCodePts >= 0 && (uint32_t)bestSnlp.elementAti(numCodePts) == kuint32max) { --+ --numCodePts; --+ } --+ if (numCodePts < 0) { --+ t_boundary.addElement(numCodePts, status); --+ numBreaks++; --+ } else { --+ for (int32_t i = numCodePts; (uint32_t)i != kuint32max; i = prev.elementAti(i)) { --+ if (i < 0) i = -i; --+ t_boundary.addElement(i, status); --+ numBreaks++; --+ } --+ U_ASSERT(prev.elementAti(t_boundary.elementAti(numBreaks - 1)) == 0); --+ } --+ - + // Now that we're done, convert positions in t_boundary[] (indices in - + // the normalized input string) back to indices in the original input UText - + // while reversing t_boundary and pushing values to foundBreaks. -@@ -669,38 +658,35 @@ diff -ur icu.org/source/common/dictbe.cpp icu/source/common/dictbe.cpp - - #if !UCONFIG_NO_NORMALIZATION - diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h ----- icu.org/source/common/dictbe.h 2017-01-20 01:20:31.000000000 +0100 --+++ icu/source/common/dictbe.h 2017-04-21 23:14:23.845894374 +0200 --@@ -34,6 +34,15 @@ -+--- icu.org/source/common/dictbe.h 2018-03-26 15:38:30.000000000 +0200 -++++ icu/source/common/dictbe.h 2018-04-17 14:55:33.307639865 +0200 -+@@ -34,7 +34,8 @@ -+ * threads without synchronization.

- */ - class DictionaryBreakEngine : public LanguageBreakEngine { -- private: --+ --+ /** --+ *

Default constructor.

--+ * --+ */ --+ DictionaryBreakEngine(); --+ -+- private: - + protected: - + - /** - * The set of characters handled by this engine - * @internal --@@ -48,11 +57,63 @@ -+@@ -42,14 +43,84 @@ - -- uint32_t fTypes; -+ UnicodeSet fSet; - - + const int32_t WJ = 0x2060; - + const int32_t ZWSP = 0x200B; - + -- /** --- *

Default constructor.

--- * -++ /** -++ * The break types it was constructed with -++ * @internal -++ */ -++ uint32_t fTypes; -++ -++ /** - + * A Unicode set of all viramas - + * @internal -- */ --- DictionaryBreakEngine(); -++ */ - + UnicodeSet fViramaSet; - + - + /** -@@ -751,10 +737,26 @@ diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h - + bool scanAfterEnd(UText *text, int32_t rangeEnd, int32_t& end, bool &doBreak) const; - + void scanBackClusters(UText *text, int32_t textStart, int32_t& start) const; - + void scanFwdClusters(UText *text, int32_t textEnd, int32_t& end) const; -- -++ - public: - --@@ -83,7 +144,7 @@ -+ /** -+- *

Constructor

-++ *

Default constructor.

-++ * -+ */ -+ DictionaryBreakEngine(); -+ -+ /** -++ *

Constructor with break types.

-++ */ -++ explicit DictionaryBreakEngine(uint32_t breakTypes); -++ -++ /** -+ *

Virtual destructor.

-+ */ -+ virtual ~DictionaryBreakEngine(); -+@@ -68,7 +139,7 @@ - *

Find any breaks within a run in the supplied text.

- * - * @param text A UText representing the text. The iterator is left at -@@ -763,7 +765,7 @@ diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h - * that starts from the first character in the range. - * @param startPos The start of the run within the supplied text. - * @param endPos The end of the run within the supplied text. --@@ -245,118 +306,120 @@ -+@@ -218,118 +289,120 @@ - - }; - -@@ -997,8 +999,8 @@ diff -ur icu.org/source/common/dictbe.h icu/source/common/dictbe.h - - /******************************************************************* - diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionarydata.cpp ----- icu.org/source/common/dictionarydata.cpp 2017-01-20 01:20:31.000000000 +0100 --+++ icu/source/common/dictionarydata.cpp 2017-04-21 23:14:23.846894372 +0200 -+--- icu.org/source/common/dictionarydata.cpp 2018-03-26 15:38:30.000000000 +0200 -++++ icu/source/common/dictionarydata.cpp 2018-04-17 14:04:50.775567214 +0200 - @@ -44,7 +44,7 @@ - - int32_t UCharsDictionaryMatcher::matches(UText *text, int32_t maxLength, int32_t limit, -@@ -1046,8 +1048,8 @@ diff -ur icu.org/source/common/dictionarydata.cpp icu/source/common/dictionaryda - if (values != NULL) { - values[wordCount] = bt.getValue(); - diff -ur icu.org/source/common/dictionarydata.h icu/source/common/dictionarydata.h ----- icu.org/source/common/dictionarydata.h 2017-01-20 01:20:31.000000000 +0100 --+++ icu/source/common/dictionarydata.h 2017-04-21 23:14:23.846894372 +0200 -+--- icu.org/source/common/dictionarydata.h 2018-03-26 15:38:30.000000000 +0200 -++++ icu/source/common/dictionarydata.h 2018-04-17 14:04:50.775567214 +0200 - @@ -21,6 +21,7 @@ - #include "unicode/utext.h" - #include "unicode/udata.h" -@@ -1084,8 +1086,8 @@ diff -ur icu.org/source/common/dictionarydata.h icu/source/common/dictionarydata - private: - UChar32 transform(UChar32 c) const; - diff -ur icu.org/source/data/Makefile.in icu/source/data/Makefile.in ----- icu.org/source/data/Makefile.in 2017-04-21 23:13:03.248087545 +0200 --+++ icu/source/data/Makefile.in 2017-04-21 23:14:23.846894372 +0200 -+--- icu.org/source/data/Makefile.in 2018-04-17 12:28:37.098707466 +0200 -++++ icu/source/data/Makefile.in 2018-04-17 14:04:50.775567214 +0200 - @@ -183,7 +183,7 @@ - endif - endif -diff --git a/external/icu/icu4c-ubsan.patch.1 b/external/icu/icu4c-ubsan.patch.1 -deleted file mode 100644 -index 9f6aa3fbc9f8..000000000000 ---- a/external/icu/icu4c-ubsan.patch.1 -+++ /dev/null -@@ -1,91 +0,0 @@ --diff -ur icu.org/source/common/rbbidata.h icu/source/common/rbbidata.h ----- icu.org/source/common/rbbidata.h 2017-02-03 19:57:23.000000000 +0100 --+++ icu/source/common/rbbidata.h 2017-04-21 22:46:25.371651160 +0200 --@@ -115,7 +115,7 @@ -- /* StatusTable of the set of matching */ -- /* tags (rule status values) */ -- int16_t fReserved; --- uint16_t fNextState[2]; /* Next State, indexed by char category. */ --+ uint16_t fNextState[1]; /* Next State, indexed by char category. */ -- /* This array does not have two elements */ -- /* Array Size is actually fData->fHeader->fCatCount */ -- /* CAUTION: see RBBITableBuilder::getTableSize() */ --@@ -128,7 +128,7 @@ -- uint32_t fRowLen; /* Length of a state table row, in bytes. */ -- uint32_t fFlags; /* Option Flags for this state table */ -- uint32_t fReserved; /* reserved */ --- char fTableData[4]; /* First RBBIStateTableRow begins here. */ --+ char fTableData[1]; /* First RBBIStateTableRow begins here. */ -- /* (making it char[] simplifies ugly address */ -- /* arithmetic for indexing variable length rows.) */ -- }; --diff -ur icu.org/source/common/rbbitblb.cpp icu/source/common/rbbitblb.cpp ----- icu.org/source/common/rbbitblb.cpp 2017-01-20 01:20:31.000000000 +0100 --+++ icu/source/common/rbbitblb.cpp 2017-04-21 22:46:25.373651159 +0200 --@@ -1095,15 +1095,15 @@ -- return 0; -- } -- --- size = sizeof(RBBIStateTable) - 4; // The header, with no rows to the table. --+ size = offsetof(RBBIStateTable, fTableData); // The header, with no rows to the table. -- -- numRows = fDStates->size(); -- numCols = fRB->fSetBuilder->getNumCharCategories(); -- --- // Note The declaration of RBBIStateTableRow is for a table of two columns. --- // Therefore we subtract two from numCols when determining --+ // Note The declaration of RBBIStateTableRow is for a table of one columns. --+ // Therefore we subtract one from numCols when determining -- // how much storage to add to a row for the total columns. --- rowSize = sizeof(RBBIStateTableRow) + sizeof(uint16_t)*(numCols-2); --+ rowSize = sizeof(RBBIStateTableRow) + sizeof(uint16_t)*(numCols-1); -- size += numRows * rowSize; -- return size; -- } --@@ -1133,7 +1133,7 @@ -- } -- -- table->fRowLen = sizeof(RBBIStateTableRow) + --- sizeof(uint16_t) * (fRB->fSetBuilder->getNumCharCategories() - 2); --+ sizeof(uint16_t) * (fRB->fSetBuilder->getNumCharCategories() - 1); -- table->fNumStates = fDStates->size(); -- table->fFlags = 0; -- if (fRB->fLookAheadHardBreak) { --diff -ur icu.org/source/common/ubidiimp.h icu/source/common/ubidiimp.h ----- icu.org/source/common/ubidiimp.h 2017-02-03 19:57:23.000000000 +0100 --+++ icu/source/common/ubidiimp.h 2017-04-21 22:46:25.374651159 +0200 --@@ -198,8 +198,8 @@ -- /* in a Run, logicalStart will get this bit set if the run level is odd */ -- #define INDEX_ODD_BIT (1UL<<31) -- ---#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((int32_t)(level)<<31)) ---#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((int32_t)(level)<<31)) --+#define MAKE_INDEX_ODD_PAIR(index, level) ((index)|((uint32_t)(level)<<31)) --+#define ADD_ODD_BIT_FROM_LEVEL(x, level) ((x)|=((uint32_t)(level)<<31)) -- #define REMOVE_ODD_BIT(x) ((x)&=~INDEX_ODD_BIT) -- -- #define GET_INDEX(x) ((x)&~INDEX_ODD_BIT) --diff -ur icu.org/source/common/ucmndata.cpp icu/source/common/ucmndata.cpp ----- icu.org/source/common/ucmndata.cpp 2017-03-08 16:34:47.000000000 +0100 --+++ icu/source/common/ucmndata.cpp 2017-04-21 22:46:25.376651159 +0200 --@@ -77,7 +77,7 @@ -- typedef struct { -- uint32_t count; -- uint32_t reserved; --- PointerTOCEntry entry[2]; /* Actual size is from count. */ --+ PointerTOCEntry entry[1]; /* Actual size is from count. */ -- } PointerTOC; -- -- --diff -ur icu.org/source/common/ucmndata.h icu/source/common/ucmndata.h ----- icu.org/source/common/ucmndata.h 2017-01-20 01:20:31.000000000 +0100 --+++ icu/source/common/ucmndata.h 2017-04-21 22:46:25.377651159 +0200 --@@ -52,7 +52,7 @@ -- -- typedef struct { -- uint32_t count; --- UDataOffsetTOCEntry entry[2]; /* Actual size of array is from count. */ --+ UDataOffsetTOCEntry entry[1]; /* Actual size of array is from count. */ -- } UDataOffsetTOC; -- -- /** - ---------------erAck-patch-parts-- - - diff --git a/SOURCES/0001-Upgrade-to-ICU-62.1.patch b/SOURCES/0001-Upgrade-to-ICU-62.1.patch deleted file mode 100644 index cfbb5d0..0000000 --- a/SOURCES/0001-Upgrade-to-ICU-62.1.patch +++ /dev/null @@ -1,236 +0,0 @@ -From 86dfa34c6d83b70923d462fecad316dafd9a1fc4 Mon Sep 17 00:00:00 2001 -Message-Id: <86dfa34c6d83b70923d462fecad316dafd9a1fc4.1531839924.git.erack@redhat.com> -From: Eike Rathke -Date: Mon, 16 Jul 2018 15:20:32 +0200 -Subject: [PATCH] Upgrade to ICU 62.1 -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" - -This is a multi-part message in MIME format. ---------------erAck-patch-parts -Content-Type: text/plain; charset=UTF-8; format=fixed -Content-Transfer-Encoding: 8bit - - -Change-Id: I9426e77aa85cfe068df59db47b8ac50b59cd4eb3 -Reviewed-on: https://gerrit.libreoffice.org/57500 -Reviewed-by: Eike Rathke -Tested-by: Jenkins ---- - configure.ac | 2 +- - download.lst | 8 +++---- - external/icu/UnpackedTarball_icu.mk | 1 - - external/icu/icu4c-mkdir.patch.1 | 6 ++--- - external/icu/ofz4860.patch.2 | 25 --------------------- - i18nutil/source/utility/unicode.cxx | 23 +++++++++++++++++++ - include/svx/strings.hrc | 11 +++++++++ - svx/source/dialog/charmap.cxx | 35 +++++++++++++++++++++++++++++ - 8 files changed, 77 insertions(+), 34 deletions(-) - delete mode 100644 external/icu/ofz4860.patch.2 - - ---------------erAck-patch-parts -Content-Type: text/x-patch; name="0001-Upgrade-to-ICU-62.1.patch" -Content-Transfer-Encoding: 8bit -Content-Disposition: attachment; filename="0001-Upgrade-to-ICU-62.1.patch" - -diff --git a/configure.ac b/configure.ac -index 23b3fd4953c9..2fd11a9b3d19 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -9066,7 +9066,7 @@ SYSTEM_GENBRK= - SYSTEM_GENCCODE= - SYSTEM_GENCMN= - --ICU_MAJOR=61 -+ICU_MAJOR=62 - ICU_MINOR=1 - ICU_RECLASSIFIED_PREPEND_SET_EMPTY="TRUE" - ICU_RECLASSIFIED_CONDITIONAL_JAPANESE_STARTER="TRUE" -diff --git a/download.lst b/download.lst -index dd3519b74a8d..0d4e974ed105 100644 ---- a/download.lst -+++ b/download.lst -@@ -102,10 +102,10 @@ export HUNSPELL_SHA256SUM := 3cd9ceb062fe5814f668e4f22b2fa6e3ba0b339b921739541ce - export HUNSPELL_TARBALL := hunspell-1.6.2.tar.gz - export HYPHEN_SHA256SUM := 304636d4eccd81a14b6914d07b84c79ebb815288c76fe027b9ebff6ff24d5705 - export HYPHEN_TARBALL := 5ade6ae2a99bc1e9e57031ca88d36dad-hyphen-2.8.8.tar.gz --export ICU_SHA256SUM := d007f89ae8a2543a53525c74359b65b36412fa84b3349f1400be6dcf409fafef --export ICU_TARBALL := icu4c-61_1-src.tgz --export ICU_DATA_SHA256SUM := d149ed0985b5a6e16a9d8ed66f105dd58fd334c276779f74241cfa656ed2830a --export ICU_DATA_TARBALL := icu4c-61_1-data.zip -+export ICU_SHA256SUM := 3dd9868d666350dda66a6e305eecde9d479fb70b30d5b55d78a1deffb97d5aa3 -+export ICU_TARBALL := icu4c-62_1-src.tgz -+export ICU_DATA_SHA256SUM := 93bcaf58cfa9223972da79cb8e0f94819ace4995db6041b84f4d9bd810246d1d -+export ICU_DATA_TARBALL := icu4c-62_1-data.zip - export JFREEREPORT_FLOW_ENGINE_SHA256SUM := 233f66e8d25c5dd971716d4200203a612a407649686ef3b52075d04b4c9df0dd - export JFREEREPORT_FLOW_ENGINE_TARBALL := ba2930200c9f019c2d93a8c88c651a0f-flow-engine-0.9.4.zip - export JFREEREPORT_FLUTE_SHA256SUM := 1b5b24f7bc543c0362b667692f78db8bab4ed6dafc6172f104d0bd3757d8a133 -diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk -index c789e6eb8d84..6800c1fb5ea8 100644 ---- a/external/icu/UnpackedTarball_icu.mk -+++ b/external/icu/UnpackedTarball_icu.mk -@@ -34,7 +34,6 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ - external/icu/icu4c-clang-cl.patch.1 \ - $(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \ - external/icu/icu4c-khmerbreakengine.patch.1 \ -- external/icu/ofz4860.patch.2 \ - external/icu/icu4c-61-werror-shadow.patch.1 \ - )) - -diff --git a/external/icu/icu4c-mkdir.patch.1 b/external/icu/icu4c-mkdir.patch.1 -index 3234f151b677..7de4cf51174c 100644 ---- a/external/icu/icu4c-mkdir.patch.1 -+++ b/external/icu/icu4c-mkdir.patch.1 -@@ -1,10 +1,10 @@ - diff -ur icu.org/source/data/Makefile.in icu/source/data/Makefile.in ----- icu.org/source/data/Makefile.in 2016-06-15 20:58:17.000000000 +0200 --+++ icu/source/data/Makefile.in 2017-04-21 22:29:00.747158002 +0200 -+--- icu.org/source/data/Makefile.in 2018-06-21 11:39:15.000000000 +0200 -++++ icu/source/data/Makefile.in 2018-07-16 13:18:26.928109541 +0200 - @@ -367,6 +367,7 @@ - ifeq ($(PKGDATA_MODE),dll) - SO_VERSION_DATA = $(OUTTMPDIR)/icudata.res -- $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc -+ $(SO_VERSION_DATA) : $(MISCSRCDIR)/icudata.rc | build-dir - + mkdir -p $(OUTTMPDIR) - ifeq ($(MSYS_RC_MODE),1) - rc.exe -i$(srcdir)/../common -i$(top_builddir)/common -fo$@ $(CPPFLAGS) $< -diff --git a/external/icu/ofz4860.patch.2 b/external/icu/ofz4860.patch.2 -deleted file mode 100644 -index 14114d52878b..000000000000 ---- a/external/icu/ofz4860.patch.2 -+++ /dev/null -@@ -1,25 +0,0 @@ --From 529ba01ee606940ca273b187be8ce9ba31cf2d90 Mon Sep 17 00:00:00 2001 --From: David Tardon --Date: Fri, 19 Jan 2018 10:41:02 +0100 --Subject: [PATCH] ofz#4860 fix past-the-end read from array -- ----- -- icu4c/source/common/locmap.cpp | 2 +- -- 1 file changed, 1 insertion(+), 1 deletion(-) -- --diff --git a/icu4c/source/common/locmap.cpp b/icu4c/source/common/locmap.cpp --index cbb2b810a..6d62d8310 100644 ----- a/icu4c/source/common/locmap.cpp --+++ b/icu4c/source/common/locmap.cpp --@@ -1015,7 +1015,7 @@ static const char* -- getPosixID(const ILcidPosixMap *this_0, uint32_t hostID) -- { -- uint32_t i; --- for (i = 0; i <= this_0->numRegions; i++) --+ for (i = 0; i < this_0->numRegions; i++) -- { -- if (this_0->regionMaps[i].hostID == hostID) -- { ---- --2.14.3 -- -diff --git a/i18nutil/source/utility/unicode.cxx b/i18nutil/source/utility/unicode.cxx -index 6d90b15ca42e..876750d6119d 100644 ---- a/i18nutil/source/utility/unicode.cxx -+++ b/i18nutil/source/utility/unicode.cxx -@@ -726,6 +726,29 @@ OString unicode::getExemplarLanguageForUScriptCode(UScriptCode eScript) - case USCRIPT_ZANABAZAR_SQUARE: - sRet = "mn-Zanb"; // abugida to write Mongolian - break; -+#endif -+#if (U_ICU_VERSION_MAJOR_NUM >= 62) -+ case USCRIPT_DOGRA: -+ sRet = "dgo"; // Dogri proper -+ break; -+ case USCRIPT_GUNJALA_GONDI: -+ sRet = "wsg"; // Adilabad Gondi -+ break; -+ case USCRIPT_MAKASAR: -+ sRet = "mak"; -+ break; -+ case USCRIPT_MEDEFAIDRIN: -+ sRet = "mis-Medf"; // Uncoded with script -+ break; -+ case USCRIPT_HANIFI_ROHINGYA: -+ sRet = "rhg"; -+ break; -+ case USCRIPT_SOGDIAN: -+ sRet = "sog"; -+ break; -+ case USCRIPT_OLD_SOGDIAN: -+ sRet = "sog"; -+ break; - #endif - } - return sRet; -# Slightly adapted to rawhide/F29 libreoffice-6-0-6 -diff --git a/include/svx/strings.hrc b/include/svx/strings.hrc -index 86c2215ac1c4..18fd984a1bd8 100644 ---- a/include/svx/strings.hrc -+++ b/include/svx/strings.hrc -@@ -1656,6 +1656,17 @@ - #define RID_SUBSETSTR_SOYOMBO NC_("RID_SUBSETMAP", "Soyombo") - #define RID_SUBSETSTR_SYRIAC_SUPPLEMENT NC_("RID_SUBSETMAP", "Syriac Supplement") - #define RID_SUBSETSTR_ZANABAZAR_SQUARE NC_("RID_SUBSETMAP", "Zanabazar Square") -+#define RID_SUBSETSTR_CHESS_SYMBOLS NC_("RID_SUBSETMAP", "Chess Symbols") -+#define RID_SUBSETSTR_DOGRA NC_("RID_SUBSETMAP", "Dogra") -+#define RID_SUBSETSTR_GEORGIAN_EXTENDED NC_("RID_SUBSETMAP", "Georgian Extended") -+#define RID_SUBSETSTR_GUNJALA_GONDI NC_("RID_SUBSETMAP", "Gunjala Gondi") -+#define RID_SUBSETSTR_HANIFI_ROHINGYA NC_("RID_SUBSETMAP", "Hanifi Rohingya") -+#define RID_SUBSETSTR_INDIC_SIYAQ_NUMBERS NC_("RID_SUBSETMAP", "Indic Siyaq Numbers") -+#define RID_SUBSETSTR_MAKASAR NC_("RID_SUBSETMAP", "Makasar") -+#define RID_SUBSETSTR_MAYAN_NUMERALS NC_("RID_SUBSETMAP", "Mayan Numerals") -+#define RID_SUBSETSTR_MEDEFAIDRIN NC_("RID_SUBSETMAP", "Medefaidrin") -+#define RID_SUBSETSTR_OLD_SOGDIAN NC_("RID_SUBSETMAP", "Old Sogdian") -+#define RID_SUBSETSTR_SOGDIAN NC_("RID_SUBSETMAP", "Sogdian") - - #endif - -diff --git a/svx/source/dialog/charmap.cxx b/svx/source/dialog/charmap.cxx -index 3bf3a01d520f..fcaa955541df 100644 ---- a/svx/source/dialog/charmap.cxx -+++ b/svx/source/dialog/charmap.cxx -@@ -1744,6 +1744,41 @@ void SubsetMap::InitList() - aAllSubsets.emplace_back( 0x11A00, 0x11A4F, SvxResId(RID_SUBSETSTR_ZANABAZAR_SQUARE) ); - break; - #endif -+#if (U_ICU_VERSION_MAJOR_NUM >= 62) -+ case UBLOCK_CHESS_SYMBOLS: -+ aAllSubsets.emplace_back( 0x1FA00, 0x1FA6F, SvxResId(RID_SUBSETSTR_CHESS_SYMBOLS) ); -+ break; -+ case UBLOCK_DOGRA: -+ aAllSubsets.emplace_back( 0x11800, 0x1184F, SvxResId(RID_SUBSETSTR_DOGRA) ); -+ break; -+ case UBLOCK_GEORGIAN_EXTENDED: -+ aAllSubsets.emplace_back( 0x1C90, 0x1CBF, SvxResId(RID_SUBSETSTR_GEORGIAN_EXTENDED) ); -+ break; -+ case UBLOCK_GUNJALA_GONDI: -+ aAllSubsets.emplace_back( 0x11D60, 0x11DAF, SvxResId(RID_SUBSETSTR_GUNJALA_GONDI) ); -+ break; -+ case UBLOCK_HANIFI_ROHINGYA: -+ aAllSubsets.emplace_back( 0x10D00, 0x10D3F, SvxResId(RID_SUBSETSTR_HANIFI_ROHINGYA) ); -+ break; -+ case UBLOCK_INDIC_SIYAQ_NUMBERS: -+ aAllSubsets.emplace_back( 0x1EC70, 0x1ECBF, SvxResId(RID_SUBSETSTR_INDIC_SIYAQ_NUMBERS) ); -+ break; -+ case UBLOCK_MAKASAR: -+ aAllSubsets.emplace_back( 0x11EE0, 0x11EFF, SvxResId(RID_SUBSETSTR_MAKASAR) ); -+ break; -+ case UBLOCK_MAYAN_NUMERALS: -+ aAllSubsets.emplace_back( 0x1D2E0, 0x1D2FF, SvxResId(RID_SUBSETSTR_MAYAN_NUMERALS) ); -+ break; -+ case UBLOCK_MEDEFAIDRIN: -+ aAllSubsets.emplace_back( 0x16E40, 0x16E9F, SvxResId(RID_SUBSETSTR_MEDEFAIDRIN) ); -+ break; -+ case UBLOCK_OLD_SOGDIAN: -+ aAllSubsets.emplace_back( 0x10F00, 0x10F2F, SvxResId(RID_SUBSETSTR_OLD_SOGDIAN) ); -+ break; -+ case UBLOCK_SOGDIAN: -+ aAllSubsets.emplace_back( 0x10F30, 0x10F6F, SvxResId(RID_SUBSETSTR_SOGDIAN) ); -+ break; -+#endif - - } - - ---------------erAck-patch-parts-- - - diff --git a/SOURCES/0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch b/SOURCES/0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch deleted file mode 100644 index 2e33f8e..0000000 --- a/SOURCES/0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 1d3de59ac2d12e42e12c9642bd252236a80b096b Mon Sep 17 00:00:00 2001 -Message-Id: <1d3de59ac2d12e42e12c9642bd252236a80b096b.1531842210.git.erack@redhat.com> -From: Eike Rathke -Date: Tue, 17 Jul 2018 17:37:55 +0200 -Subject: [PATCH] Use $(ICU_MAJOR) instead of hard coded (Upgrade to ICU 62.1) -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" - -This is a multi-part message in MIME format. ---------------erAck-patch-parts -Content-Type: text/plain; charset=UTF-8; format=fixed -Content-Transfer-Encoding: 8bit - - -Change-Id: Ifea7072922388b2c0b7631fb809b23e2a5524a3c ---- - ios/CustomTarget_iOS_setup.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - - ---------------erAck-patch-parts -Content-Type: text/x-patch; name="0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch" -Content-Transfer-Encoding: 8bit -Content-Disposition: attachment; filename="0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch" - -# Slightly adapted to rawhide/F29 libreoffice-6-0-6 -diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk -index a0d1a18823ab..718bb8b90d46 100644 ---- a/ios/CustomTarget_iOS_setup.mk -+++ b/ios/CustomTarget_iOS_setup.mk -@@ -32,7 +32,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS_setup.mk - > $(IOSGEN)/native-code.h - - # generate resource files used to start/run LibreOffice -- cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt61l.dat $(IOSRES)/icudt61l.dat -+ cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt$(ICU_MAJOR)l.dat $(IOSRES)/icudt$(ICU_MAJOR)l.dat - cp $(INSTDIR)/program/types.rdb $(IOSRES)/udkapi.rdb - cp $(INSTDIR)/program/types/offapi.rdb $(IOSRES) - cp $(INSTDIR)/program/types/oovbaapi.rdb $(IOSRES) - ---------------erAck-patch-parts-- - - diff --git a/SOURCES/0001-We-use-ICU-61-now.patch b/SOURCES/0001-We-use-ICU-61-now.patch deleted file mode 100644 index 1b3f5de..0000000 --- a/SOURCES/0001-We-use-ICU-61-now.patch +++ /dev/null @@ -1,43 +0,0 @@ -From b9dde4a74cba5a771cbc85880d518f6717d19216 Mon Sep 17 00:00:00 2001 -Message-Id: -From: Tor Lillqvist -Date: Thu, 7 Jun 2018 21:51:14 +0300 -Subject: [PATCH] We use ICU 61 now -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" - -This is a multi-part message in MIME format. ---------------erAck-patch-parts -Content-Type: text/plain; charset=UTF-8; format=fixed -Content-Transfer-Encoding: 8bit - - -Change-Id: I7faf23de08db680599658206faaf3028888563f6 ---- - ios/CustomTarget_iOS_setup.mk | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - - ---------------erAck-patch-parts -Content-Type: text/x-patch; name="0001-We-use-ICU-61-now.patch" -Content-Transfer-Encoding: 8bit -Content-Disposition: attachment; filename="0001-We-use-ICU-61-now.patch" - -# Slightly adapted to rawhide/F29 libreoffice-6-0-6 -diff --git a/ios/CustomTarget_iOS_setup.mk b/ios/CustomTarget_iOS_setup.mk -index a9f98850c6d8..a0d1a18823ab 100644 ---- a/ios/CustomTarget_iOS_setup.mk -+++ b/ios/CustomTarget_iOS_setup.mk -@@ -32,7 +32,7 @@ $(IOSGEN)/native-code.h: $(BUILDDIR)/config_host.mk $(SRCDIR)/ios/CustomTarget_iOS_setup.mk - > $(IOSGEN)/native-code.h - - # generate resource files used to start/run LibreOffice -- cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt60l.dat $(IOSRES)/icudt60l.dat -+ cp $(WORKDIR)/UnpackedTarball/icu/source/data/in/icudt61l.dat $(IOSRES)/icudt61l.dat - cp $(INSTDIR)/program/types.rdb $(IOSRES)/udkapi.rdb - cp $(INSTDIR)/program/types/offapi.rdb $(IOSRES) - cp $(INSTDIR)/program/types/oovbaapi.rdb $(IOSRES) - ---------------erAck-patch-parts-- - - diff --git a/SOURCES/0001-cov-scan-help-warnings.patch b/SOURCES/0001-cov-scan-help-warnings.patch deleted file mode 100644 index cd6b21f..0000000 --- a/SOURCES/0001-cov-scan-help-warnings.patch +++ /dev/null @@ -1,25 +0,0 @@ -From fa5f426359bbe1b6a9c521130bf7bbee2e60f69f Mon Sep 17 00:00:00 2001 -From: rpmbuild -Date: Wed, 18 Jul 2018 15:31:31 +0100 -Subject: [PATCH] foo - ---- - helpcontent2/to-wiki/wikiconv2.py | 2 -- - 5 files changed, 7 insertions(+), 12 deletions(-) - -diff --git a/helpcontent2/to-wiki/wikiconv2.py b/helpcontent2/to-wiki/wikiconv2.py -index 93f72eb..55ff72f 100755 ---- a/helpcontent2/to-wiki/wikiconv2.py -+++ b/helpcontent2/to-wiki/wikiconv2.py -@@ -1071,8 +1071,6 @@ class Item(ElementBase): - sys.stderr.write('Unhandled item type. Possibly type has been localized.\n') - finally: - raise UnhandledItemType -- return replace_text(self.text) -- - - class Paragraph(ElementBase): - def __init__(self, attrs, parent): --- -2.14.4 - diff --git a/SOURCES/0001-cov-scan-warnings.patch b/SOURCES/0001-cov-scan-warnings.patch deleted file mode 100644 index 11afe49..0000000 --- a/SOURCES/0001-cov-scan-warnings.patch +++ /dev/null @@ -1,2547 +0,0 @@ -From b2549a70cb5d27f9c869451650c289ca831af97d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 26 Jul 2018 13:08:01 +0100 -Subject: [PATCH] cov scan warnings -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: If27bcfe85c5f2502ac1adb4ed4850ee42447516a - -coverity#705646 Resource leak - -Reviewed-on: https://gerrit.libreoffice.org/54139 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 1a3deaa7f7ff1d7e6ab5f5d551bcbc8c00d84052) - -Change-Id: I709b16f720cf97c05207cfb22d0c0ea15622367a - -Related: rhbz#1602589 silence error[memleak]: Memory leak: newValue - -Change-Id: I2d04c75aa9b5e1d91e06992fdb99899657ecf96d - -Related: rhbz#1602589 double_free, convert to std::vector - -Change-Id: I5fa19422d7ee61e7aad74eae86d843072e94016c - -Related: rhbz#1602589 silence coverity leaked_storage - -Change-Id: Iae694be40b32cc3821d326bb362e6091dba19a35 - -Related: rhbz#1602589 silence coverity use_after_free - -Change-Id: If5345b6515c45bee2742d1293cd181ab46e8e61b - -Related: rhbz#1602589 silence coverity copy_paste_error - -Change-Id: Idca4bfaaa9f127eae87ae879e2131aed747ce4b3 - -Related: rhbz#1602589 add comments to coverity annotations - -Change-Id: I88c941832a0d682ea4b6028c28edd48cf5df38f7 - -Related: rhbz#1602589 silence leaked_storage - -Change-Id: Ib489ebf55d3a18d2af6f34b3f6128231d6d7758c - -InsertNewTable always returns true - -Change-Id: I28b2cd46bf40011f5f813784bd5c182f18ee103f - -pDPObject can never be null - -Change-Id: Ie98da9b53e952c2fb1f8f91e4b9489060114c366 - -ScDPObject is only needed in endFastElement - -Change-Id: I8e1a7897777111c225e42ebcf81e67face6b29b9 - -Related: rhbz#1602589 silence leaked_storage - -Change-Id: I21cc4af40429fa3ef4284d6c0ea592b05bf36620 - -bodge it - -Change-Id: Ie9e4e3173a91f5380a98d629c8a67d2ebb9c6c14 - -Related: rhbz#1602589 rework to avoid bogus cppcheck double free warning - -Change-Id: Ie673de68f39b903536c2287b8989fe6afcc9fd66 - -SHELLCHECK_WARNING, VERBOSE is unused - -gengal.sh was originally based on unopkg.sh -which had this --verbose switch... - -commit 164027e48899faaee284242eaca04b8aa5545319 -Date: Fri Apr 5 16:39:24 2013 +0100 - - gengal: re-base on original tool. - - new wrapper based on unopkg.sh. - work re-based on original SUSE implementation. - -and unopkg.sh later had VERBOSE removed... - -commit 1fc195f7e830619d56cc4c56043b154bc3a72b02 -Author: Stephan Bergmann -Date: Thu Oct 17 15:34:53 2013 +0200 - - Simplify code (VERBOSE was unused) - -but gengal.sh retained its unused VERBOSE variable - -Change-Id: I56aa830aef829c7727550fcaf7aed5058fffdc78 ---- - bridges/source/cpp_uno/shared/bridge.cxx | 2 +- - bridges/source/jni_uno/jni_bridge.cxx | 4 +- - bridges/source/jni_uno/jni_info.cxx | 6 +- - comphelper/source/misc/threadpool.cxx | 2 +- - cppu/source/typelib/static_types.cxx | 2 +- - cppu/source/typelib/typelib.cxx | 9 +- - extensions/source/scanner/sanedlg.cxx | 2 +- - filter/source/svg/presentation_engine.js | 8 +- - .../accelerators/acceleratorconfiguration.cxx | 4 +- - idlc/source/parser.y | 2 +- - include/LibreOfficeKit/LibreOfficeKitInit.h | 4 +- - include/vcl/bitmap.hxx | 14 +- - pyuno/source/module/pyuno_dlopenwrapper.c | 1 + - registry/source/reflwrit.cxx | 8 +- - registry/source/regimpl.cxx | 124 ++++++--------- - sal/osl/unx/file.cxx | 4 +- - sal/osl/unx/pipe.cxx | 9 +- - sal/osl/unx/profile.cxx | 1 + - sal/osl/w32/file.cxx | 4 +- - sal/rtl/alloc_arena.cxx | 2 +- - sal/rtl/alloc_cache.cxx | 6 +- - sc/inc/dpobject.hxx | 2 +- - sc/qa/unit/ucalc_pivottable.cxx | 142 +++++++----------- - sc/source/core/data/dpobject.cxx | 3 +- - sc/source/core/tool/chgtrack.cxx | 20 ++- - sc/source/core/tool/compiler.cxx | 1 + - sc/source/filter/xml/xmldpimp.cxx | 19 +-- - sc/source/filter/xml/xmldpimp.hxx | 3 +- - sc/source/ui/docshell/dbdocfun.cxx | 4 +- - sc/source/ui/undo/undodat.cxx | 6 +- - sc/source/ui/view/viewdata.cxx | 2 + - .../ui/animations/CustomAnimationPane.cxx | 2 + - sd/source/ui/unoidl/unosrch.cxx | 71 +++------ - sfx2/source/control/itemdel.cxx | 2 +- - solenv/bin/pack_images.py | 2 +- - soltools/cpp/_unix.c | 1 + - soltools/mkdepend/parse.c | 1 + - svtools/source/svhtml/htmlout.cxx | 2 +- - svx/source/gengal/gengal.sh | 2 - - sw/source/core/text/itrform2.cxx | 2 + - sw/source/ui/index/cnttab.cxx | 9 +- - unoidl/source/legacyprovider.cxx | 32 ++-- - unotest/source/cpp/officeconnection.cxx | 2 +- - vcl/source/bitmap/BitmapScaleConvolution.cxx | 62 ++++---- - vcl/source/gdi/bitmap3.cxx | 10 +- - vcl/source/gdi/bitmap4.cxx | 53 +++---- - vcl/source/gdi/pdfwriter_impl.cxx | 1 + - vcl/unx/generic/plugadapt/salplug.cxx | 1 + - .../sun/star/wizards/agenda/TopicsControl.py | 6 +- - .../star/wizards/document/OfficeDocument.py | 1 - - 50 files changed, 306 insertions(+), 376 deletions(-) - -diff --git a/bridges/source/cpp_uno/shared/bridge.cxx b/bridges/source/cpp_uno/shared/bridge.cxx -index 556350022e48..186d89aa1956 100644 ---- a/bridges/source/cpp_uno/shared/bridge.cxx -+++ b/bridges/source/cpp_uno/shared/bridge.cxx -@@ -144,7 +144,7 @@ uno_Mapping * Bridge::createMapping( - bool bExportCpp2Uno) - { - Bridge * bridge = new Bridge(pCppEnv, pUnoEnv, bExportCpp2Uno); -- //coverity[leaked_storage] -+ // coverity[leaked_storage] - on purpose - return bExportCpp2Uno ? &bridge->aCpp2Uno : &bridge->aUno2Cpp; - } - -diff --git a/bridges/source/jni_uno/jni_bridge.cxx b/bridges/source/jni_uno/jni_bridge.cxx -index 3859b148c541..15daa8e28603 100644 ---- a/bridges/source/jni_uno/jni_bridge.cxx -+++ b/bridges/source/jni_uno/jni_bridge.cxx -@@ -551,7 +551,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping( - uno_registerMapping( - &mapping, Bridge_free, - pFrom, &pTo->pExtEnv->aBase, nullptr ); -- // coverity[leaked_storage] -+ // coverity[leaked_storage] - on purpose - } - else if ( from_env_typename == UNO_LB_UNO && to_env_typename == UNO_LB_JAVA ) - { -@@ -561,7 +561,7 @@ SAL_DLLPUBLIC_EXPORT void SAL_CALL uno_ext_getMapping( - uno_registerMapping( - &mapping, Bridge_free, - &pFrom->pExtEnv->aBase, pTo, nullptr ); -- // coverity[leaked_storage] -+ // coverity[leaked_storage] - on purpose - } - } - catch (const BridgeRuntimeError & err) -diff --git a/bridges/source/jni_uno/jni_info.cxx b/bridges/source/jni_uno/jni_info.cxx -index 82b773d6d58c..1542eebbf4e6 100644 ---- a/bridges/source/jni_uno/jni_info.cxx -+++ b/bridges/source/jni_uno/jni_info.cxx -@@ -103,7 +103,7 @@ JNI_interface_type_info::JNI_interface_type_info( - typelib_InterfaceTypeDescription * td = - reinterpret_cast< typelib_InterfaceTypeDescription * >( - m_td.get() ); -- // coverity [ctor_dtor_leak] -+ // coverity[ctor_dtor_leak] - on purpose - m_methods = new jmethodID[ td->nMapFunctionIndexToMemberIndex ]; - sal_Int32 nMethodIndex = 0; - typelib_TypeDescriptionReference ** ppMembers = td->ppMembers; -@@ -288,7 +288,7 @@ JNI_compound_type_info::JNI_compound_type_info( - td->aBase.pWeakRef, - jni_info->m_RuntimeException_type.getTypeLibType() )) - { -- // coverity [ctor_dtor_leak] -+ // coverity[ctor_dtor_leak] - on purpose - m_fields = new jfieldID[ 2 ]; - m_fields[ 0 ] = nullptr; // special Throwable.getMessage() - // field Context -@@ -860,7 +860,7 @@ JNI_info::JNI_info( - { - css::uno::TypeDescription XInterface_td( - cppu::UnoType::get()); -- // coverity [ctor_dtor_leak] -+ // coverity[ctor_dtor_leak] - on purpose - m_XInterface_type_info = - new JNI_interface_type_info( jni, XInterface_td.get() ); - } -diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx -index 23e363213206..d8e984fe58d5 100644 ---- a/comphelper/source/misc/threadpool.cxx -+++ b/comphelper/source/misc/threadpool.cxx -@@ -153,7 +153,7 @@ void ThreadPool::shutdownLocked(std::unique_lock& aGuard) - } - assert( maTasks.empty() ); - -- // coverity[missing_lock] -+ // coverity[missing_lock] - on purpose - mbTerminate = true; - - maTasksChanged.notify_all(); -diff --git a/cppu/source/typelib/static_types.cxx b/cppu/source/typelib/static_types.cxx -index 3fb0bf6ab62a..f432b766a84a 100644 ---- a/cppu/source/typelib/static_types.cxx -+++ b/cppu/source/typelib/static_types.cxx -@@ -439,7 +439,7 @@ void SAL_CALL typelib_static_interface_type_init( - typelib_TypeDescriptionReference * pBaseType ) - SAL_THROW_EXTERN_C() - { -- // coverity[callee_ptr_arith] -+ // coverity[callee_ptr_arith] - not a bug - typelib_static_mi_interface_type_init( - ppRef, pTypeName, pBaseType == nullptr ? 0 : 1, &pBaseType); - } -diff --git a/cppu/source/typelib/typelib.cxx b/cppu/source/typelib/typelib.cxx -index 4ef5aaf18ac7..8d0c8e5647de 100644 ---- a/cppu/source/typelib/typelib.cxx -+++ b/cppu/source/typelib/typelib.cxx -@@ -564,6 +564,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - osl_atomic_increment( &Init::get().nIndirectTypeDescriptionCount ); - #endif - pTmp->pType = nullptr; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -581,6 +582,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - pTmp->aBase.ppTypeRefs = nullptr; - pTmp->aBase.ppMemberNames = nullptr; - pTmp->pParameterizedTypes = nullptr; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -597,6 +599,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - pTmp->pMemberOffsets = nullptr; - pTmp->ppTypeRefs = nullptr; - pTmp->ppMemberNames = nullptr; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -611,6 +614,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - pTmp->nEnumValues = 0; - pTmp->ppEnumNames = nullptr; - pTmp->pEnumValues = nullptr; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -632,6 +636,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - pTmp->pMapMemberIndexToFunctionIndex= nullptr; - pTmp->nBaseTypes = 0; - pTmp->ppBaseTypes = nullptr; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -652,6 +657,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - pTmp->pInterface = nullptr; - pTmp->pBaseRef = nullptr; - pTmp->nIndex = 0; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -672,6 +678,7 @@ extern "C" void SAL_CALL typelib_typedescription_newEmpty( - pTmp->ppGetExceptions = nullptr; - pTmp->nSetExceptions = 0; - pTmp->ppSetExceptions = nullptr; -+ // coverity[leaked_storage] - this is on purpose - } - break; - -@@ -892,7 +899,7 @@ extern "C" void SAL_CALL typelib_typedescription_newInterface( - typelib_TypeDescriptionReference ** ppMembers ) - SAL_THROW_EXTERN_C() - { -- // coverity[callee_ptr_arith] -+ // coverity[callee_ptr_arith] - not a bug - typelib_typedescription_newMIInterface( - ppRet, pTypeName, 0, 0, 0, 0, 0, pBaseInterface == nullptr ? 0 : 1, - &pBaseInterface, nMembers, ppMembers); -diff --git a/extensions/source/scanner/sanedlg.cxx b/extensions/source/scanner/sanedlg.cxx -index e515a763af39..d4b4bf9d3156 100644 ---- a/extensions/source/scanner/sanedlg.cxx -+++ b/extensions/source/scanner/sanedlg.cxx -@@ -495,7 +495,6 @@ void SaneDlg::InitFields() - pField->SetMax( (long)pDouble[ nValue-1 ] ); - else - pField->SetMax( (long)pDouble[ 1 ] ); -- delete [] pDouble; - } - switch( i ) { - case 0: aMinTopLeft.X() = pField->GetMin();break; -@@ -513,6 +512,7 @@ void SaneDlg::InitFields() - case 3: aMaxBottomRight.Y() = (int)fValue;break; - } - } -+ delete [] pDouble; - pField->Enable(); - } - else -diff --git a/filter/source/svg/presentation_engine.js b/filter/source/svg/presentation_engine.js -index 7dbe377697dd..f4b9db25e4e0 100644 ---- a/filter/source/svg/presentation_engine.js -+++ b/filter/source/svg/presentation_engine.js -@@ -7987,7 +7987,7 @@ AnimationBaseNode3.prototype.info = function( bVerbose ) - sInfo += '; keyTimes: ' + this.getKeyTimes().join( ',' ); - - // values -- if( this.getKeyTimes().length ) -+ if( this.getValues().length ) - sInfo += '; values: ' + this.getValues().join( ',' ); - - // formula -@@ -12170,7 +12170,6 @@ SlideTransition.prototype.createSlideTransition = function( aLeavingSlide, aEnte - - case PUSHWIPE_TRANSITION: - { -- var bCombined = false; - var aDirection = null; - switch( this.eTransitionSubType ) - { -@@ -12192,10 +12191,7 @@ SlideTransition.prototype.createSlideTransition = function( aLeavingSlide, aEnte - aDirection = { x: -1.0, y: 0.0 }; - break; - } -- if( bCombined ) -- return null; -- else -- return new MovingSlideChange( aLeavingSlide, aEnteringSlide, aDirection, aDirection ); -+ return new MovingSlideChange( aLeavingSlide, aEnteringSlide, aDirection, aDirection ); - } - - case SLIDEWIPE_TRANSITION: -diff --git a/framework/source/accelerators/acceleratorconfiguration.cxx b/framework/source/accelerators/acceleratorconfiguration.cxx -index ecc33938ab75..6a5a120331c1 100644 ---- a/framework/source/accelerators/acceleratorconfiguration.cxx -+++ b/framework/source/accelerators/acceleratorconfiguration.cxx -@@ -1125,7 +1125,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_save(bool bPreferred) - - // take over all changes into the original container - SolarMutexGuard g; -- // coverity[check_after_deref] -+ // coverity[check_after_deref] - confusing but correct - if (m_pPrimaryWriteCache) - { - m_aPrimaryReadCache.takeOver(*m_pPrimaryWriteCache); -@@ -1164,7 +1164,7 @@ void XCUBasedAcceleratorConfiguration::impl_ts_save(bool bPreferred) - - // take over all changes into the original container - SolarMutexGuard g; -- // coverity[check_after_deref] -+ // coverity[check_after_deref] - confusing but correct - if (m_pSecondaryWriteCache) - { - m_aSecondaryReadCache.takeOver(*m_pSecondaryWriteCache); -diff --git a/idlc/source/parser.y b/idlc/source/parser.y -index 1e873853b46e..592a082d58f8 100644 ---- a/idlc/source/parser.y -+++ b/idlc/source/parser.y -@@ -2136,7 +2136,7 @@ at_least_one_scoped_name : - } else - { - std::list< OString >* pScopedNames = new std::list< OString >; -- // coverity [copy_paste_error] -+ // coverity[copy_paste_error] - this is not a cut and paste - pScopedNames->push_back(*$1); - $$ = pScopedNames; - } -diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h -index a0c111a9e0e2..71f4f2e68b04 100644 ---- a/include/LibreOfficeKit/LibreOfficeKitInit.h -+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h -@@ -280,13 +280,13 @@ static LibreOfficeKit *lok_init_2( const char *install_path, const char *user_p - } - free( imp_lib ); - // dlhandle is "leaked" -- // coverity[leaked_storage] -+ // coverity[leaked_storage] - on purpose - return pSym( install_path ); - } - - free( imp_lib ); - // dlhandle is "leaked" -- // coverity[leaked_storage] -+ // coverity[leaked_storage] - on purpose - return pSym2( install_path, user_profile_url ); - } - -diff --git a/include/vcl/bitmap.hxx b/include/vcl/bitmap.hxx -index 66a056448b53..d38aabac32f3 100644 ---- a/include/vcl/bitmap.hxx -+++ b/include/vcl/bitmap.hxx -@@ -667,9 +667,9 @@ public: - Bitmap& aNewBitmap, - BitmapReadAccess const * pReadAcc, - int aNumberOfContributions, -- const double* pWeights, -- int const * pPixels, -- const int* pCount ); -+ const std::vector& rWeights, -+ const std::vector& rPixels, -+ const std::vector& rCounts ); - - SAL_DLLPRIVATE bool ImplMakeMono( sal_uInt8 cThreshold ); - SAL_DLLPRIVATE bool ImplMakeGreyscales( sal_uInt16 nGreyscales ); -@@ -704,10 +704,10 @@ public: - SAL_DLLPRIVATE static void ImplBlurContributions( - const int aSize, - const int aNumberOfContributions, -- const double* pBlurVector, -- double*& pWeights, -- int*& pPixels, -- int*& pCount ); -+ const std::vector& rBlurVector, -+ std::vector& pWeights, -+ std::vector& rPixels, -+ std::vector& rCounts ); - - public: - -diff --git a/pyuno/source/module/pyuno_dlopenwrapper.c b/pyuno/source/module/pyuno_dlopenwrapper.c -index 5654cb0f8f0a..44e711653e35 100644 ---- a/pyuno/source/module/pyuno_dlopenwrapper.c -+++ b/pyuno/source/module/pyuno_dlopenwrapper.c -@@ -72,6 +72,7 @@ static void * load(void const * address, char const * symbol) { - dlclose(h); - abort(); - } -+ // coverity[leaked_storage] - this is on purpose - return func; - } - -diff --git a/registry/source/reflwrit.cxx b/registry/source/reflwrit.cxx -index 45c5ae474a2c..7f82f9cd5172 100644 ---- a/registry/source/reflwrit.cxx -+++ b/registry/source/reflwrit.cxx -@@ -376,11 +376,11 @@ void FieldEntry::setData(const OString& name, - RTValueType constValueType, - RTConstValueUnion constValue) - { -- sal_Unicode * newValue = nullptr; -+ std::unique_ptr newValue; - if (constValueType == RT_TYPE_STRING && constValue.aString != nullptr) { - sal_Int32 n = rtl_ustr_getLength(constValue.aString) + 1; -- newValue = new sal_Unicode[n]; -- memcpy(newValue, constValue.aString, n * sizeof (sal_Unicode)); -+ newValue.reset(new sal_Unicode[n]); -+ memcpy(newValue.get(), constValue.aString, n * sizeof (sal_Unicode)); - } - - m_name = name; -@@ -406,7 +406,7 @@ void FieldEntry::setData(const OString& name, - m_constValue.aString = NULL_WSTRING; - else - { -- m_constValue.aString = newValue; -+ m_constValue.aString = newValue.release(); - } - } - else -diff --git a/registry/source/regimpl.cxx b/registry/source/regimpl.cxx -index 6dec181933ea..260c7e9d2a7e 100644 ---- a/registry/source/regimpl.cxx -+++ b/registry/source/regimpl.cxx -@@ -21,6 +21,7 @@ - #include "regimpl.hxx" - - #include -+#include - #include - #include - -@@ -323,8 +324,7 @@ void dumpType(typereg::Reader const & reader, OString const & indent) { - printf( - "%s parameter count: %u\n", indent.getStr(), - static_cast< unsigned int >(reader.getMethodParameterCount(i))); -- // coverity[tainted_data] cid#1215304 unhelpfully warns about an -- // untrusted loop bound here: -+ // coverity[tainted_data] - cid#1215304 unhelpfully warns about untrusted loop bound - for (sal_uInt16 j = 0; j < reader.getMethodParameterCount(i); ++j) - { - printf( -@@ -365,8 +365,7 @@ void dumpType(typereg::Reader const & reader, OString const & indent) { - printf( - "%s exception count: %u\n", indent.getStr(), - static_cast< unsigned int >(reader.getMethodExceptionCount(i))); -- // coverity[tainted_data] cid#1215304 unhelpfully warns about an -- // untrusted loop bound here: -+ // coverity[tainted_data] - cid#1215304 unhelpfully warns about untrusted loop bound - for (sal_uInt16 j = 0; j < reader.getMethodExceptionCount(i); ++j) - { - printf( -@@ -903,7 +902,6 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey, - bool bReport) - { - OStoreStream rValue; -- sal_uInt8* pBuffer; - RegValueType valueType; - sal_uInt32 valueSize; - sal_uInt32 nSize; -@@ -937,37 +935,32 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey, - return RegError::VALUE_NOT_EXISTS; - } - -- pBuffer = static_cast(rtl_allocateMemory(VALUE_HEADERSIZE)); -+ std::vector aBuffer(VALUE_HEADERSIZE); - - sal_uInt32 rwBytes; -- if (rValue.readAt(0, pBuffer, VALUE_HEADERSIZE, rwBytes)) -+ if (rValue.readAt(0, aBuffer.data(), VALUE_HEADERSIZE, rwBytes)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - if (rwBytes != VALUE_HEADERSIZE) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - - RegError _ret = RegError::NO_ERROR; -- sal_uInt8 type = *pBuffer; -- valueType = (RegValueType)type; -- readUINT32(pBuffer+VALUE_TYPEOFFSET, valueSize); -- rtl_freeMemory(pBuffer); -+ sal_uInt8 type = aBuffer[0]; -+ valueType = static_cast(type); -+ readUINT32(aBuffer.data() + VALUE_TYPEOFFSET, valueSize); - - nSize = VALUE_HEADERSIZE + valueSize; -- pBuffer = static_cast(rtl_allocateMemory(nSize)); -+ aBuffer.resize(nSize); - -- if (rValue.readAt(0, pBuffer, nSize, rwBytes)) -+ if (rValue.readAt(0, aBuffer.data(), nSize, rwBytes)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - if (rwBytes != nSize) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - -@@ -978,19 +971,17 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey, - if (valueType == RegValueType::BINARY) - { - _ret = checkBlop( -- rValue, sTargetPath, valueSize, pBuffer+VALUE_HEADEROFFSET, -+ rValue, sTargetPath, valueSize, aBuffer.data() + VALUE_HEADEROFFSET, - bReport); - if (_ret != RegError::NO_ERROR) - { - if (_ret == RegError::MERGE_ERROR || - (_ret == RegError::MERGE_CONFLICT && bWarnings)) - { -- rtl_freeMemory(pBuffer); - return _ret; - } - } else - { -- rtl_freeMemory(pBuffer); - return _ret; - } - } -@@ -998,23 +989,19 @@ RegError ORegistry::loadAndSaveValue(ORegKey* pTargetKey, - - if (rValue.create(rTargetFile, sTargetPath, valueName, storeAccessMode::Create)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } -- if (rValue.writeAt(0, pBuffer, nSize, rwBytes)) -+ if (rValue.writeAt(0, aBuffer.data(), nSize, rwBytes)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - - if (rwBytes != nSize) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - pTargetKey->setModified(); - -- rtl_freeMemory(pBuffer); - return _ret; - } - -@@ -1031,33 +1018,30 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, - return RegError::INVALID_VALUE; - } - -- sal_uInt8* pBuffer = static_cast(rtl_allocateMemory(VALUE_HEADERSIZE)); -+ std::vector aBuffer(VALUE_HEADERSIZE); - RegValueType valueType; - sal_uInt32 valueSize; - sal_uInt32 rwBytes; - OString targetPath(OUStringToOString(sTargetPath, RTL_TEXTENCODING_UTF8)); - -- if (!rValue.readAt(0, pBuffer, VALUE_HEADERSIZE, rwBytes) && -+ if (!rValue.readAt(0, aBuffer.data(), VALUE_HEADERSIZE, rwBytes) && - (rwBytes == VALUE_HEADERSIZE)) - { -- sal_uInt8 type = *pBuffer; -- valueType = (RegValueType)type; -- readUINT32(pBuffer+VALUE_TYPEOFFSET, valueSize); -- rtl_freeMemory(pBuffer); -+ sal_uInt8 type = aBuffer[0]; -+ valueType = static_cast(type); -+ readUINT32(aBuffer.data() + VALUE_TYPEOFFSET, valueSize); - - if (valueType == RegValueType::BINARY) - { -- pBuffer = static_cast(rtl_allocateMemory(valueSize)); -- if (!rValue.readAt(VALUE_HEADEROFFSET, pBuffer, valueSize, rwBytes) && -+ aBuffer.resize(valueSize); -+ if (!rValue.readAt(VALUE_HEADEROFFSET, aBuffer.data(), valueSize, rwBytes) && - (rwBytes == valueSize)) - { -- RegistryTypeReader reader2(pBuffer, valueSize); -+ RegistryTypeReader reader2(aBuffer.data(), valueSize); - - if ((reader.getTypeClass() != reader2.getTypeClass()) - || reader2.getTypeClass() == RT_TYPE_INVALID) - { -- rtl_freeMemory(pBuffer); -- - if (bReport) - { - fprintf(stdout, "ERROR: values of blop from key \"%s\" has different types.\n", -@@ -1073,22 +1057,17 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, - { - mergeModuleValue(rValue, reader, reader2); - -- rtl_freeMemory(pBuffer); - return RegError::NO_ERROR; - } else - if (reader2.getFieldCount() > 0) - { -- rtl_freeMemory(pBuffer); - return RegError::NO_ERROR; - } else - { -- rtl_freeMemory(pBuffer); - return RegError::MERGE_CONFLICT; - } - } else - { -- rtl_freeMemory(pBuffer); -- - if (bReport) - { - fprintf(stderr, "WARNING: value of key \"%s\" already exists.\n", -@@ -1098,7 +1077,6 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, - } - } else - { -- rtl_freeMemory(pBuffer); - if (bReport) - { - fprintf(stderr, "ERROR: values of key \"%s\" contains bad data.\n", -@@ -1108,7 +1086,6 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, - } - } else - { -- rtl_freeMemory(pBuffer); - if (bReport) - { - fprintf(stderr, "ERROR: values of key \"%s\" has different types.\n", -@@ -1118,7 +1095,6 @@ RegError ORegistry::checkBlop(OStoreStream& rValue, - } - } else - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - } -@@ -1189,27 +1165,23 @@ RegError ORegistry::mergeModuleValue(OStoreStream& rTargetValue, - const sal_uInt8* pBlop = writer.getBlop(); - sal_uInt32 aBlopSize = writer.getBlopSize(); - -- sal_uInt8 type = (sal_uInt8)RegValueType::BINARY; -- sal_uInt8* pBuffer = static_cast(rtl_allocateMemory(VALUE_HEADERSIZE + aBlopSize)); -+ sal_uInt8 type = sal_uInt8(RegValueType::BINARY); -+ std::vector aBuffer(VALUE_HEADERSIZE + aBlopSize); - -- memcpy(pBuffer, &type, 1); -- writeUINT32(pBuffer+VALUE_TYPEOFFSET, aBlopSize); -- memcpy(pBuffer+VALUE_HEADEROFFSET, pBlop, aBlopSize); -+ memcpy(aBuffer.data(), &type, 1); -+ writeUINT32(aBuffer.data() + VALUE_TYPEOFFSET, aBlopSize); -+ memcpy(aBuffer.data() + VALUE_HEADEROFFSET, pBlop, aBlopSize); - - sal_uInt32 rwBytes; -- if (rTargetValue.writeAt(0, pBuffer, VALUE_HEADERSIZE+aBlopSize, rwBytes)) -+ if (rTargetValue.writeAt(0, aBuffer.data(), VALUE_HEADERSIZE+aBlopSize, rwBytes)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - - if (rwBytes != VALUE_HEADERSIZE+aBlopSize) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } -- -- rtl_freeMemory(pBuffer); - } - return RegError::NO_ERROR; - } -@@ -1325,7 +1297,6 @@ RegError ORegistry::dumpRegistry(RegKeyHandle hKey) const - RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_Int16 nSpc) const - { - OStoreStream rValue; -- sal_uInt8* pBuffer; - sal_uInt32 valueSize; - RegValueType valueType; - OUString sFullPath(sPath); -@@ -1348,33 +1319,29 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - return RegError::VALUE_NOT_EXISTS; - } - -- pBuffer = static_cast(rtl_allocateMemory(VALUE_HEADERSIZE)); -+ std::vector aBuffer(VALUE_HEADERSIZE); - - sal_uInt32 rwBytes; -- if (rValue.readAt(0, pBuffer, VALUE_HEADERSIZE, rwBytes)) -+ if (rValue.readAt(0, aBuffer.data(), VALUE_HEADERSIZE, rwBytes)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - if (rwBytes != (VALUE_HEADERSIZE)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - -- sal_uInt8 type = *pBuffer; -- valueType = (RegValueType)type; -- readUINT32(pBuffer+VALUE_TYPEOFFSET, valueSize); -+ sal_uInt8 type = aBuffer[0]; -+ valueType = static_cast(type); -+ readUINT32(aBuffer.data() + VALUE_TYPEOFFSET, valueSize); - -- pBuffer = static_cast(rtl_allocateMemory(valueSize)); -- if (rValue.readAt(VALUE_HEADEROFFSET, pBuffer, valueSize, rwBytes)) -+ aBuffer.resize(valueSize); -+ if (rValue.readAt(VALUE_HEADEROFFSET, aBuffer.data(), valueSize, rwBytes)) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - if (rwBytes != valueSize) - { -- rtl_freeMemory(pBuffer); - return RegError::INVALID_VALUE; - } - -@@ -1393,14 +1360,14 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - fprintf(stdout, "%s Data = ", indent); - - sal_Int32 value; -- readINT32(pBuffer, value); -+ readINT32(aBuffer.data(), value); - fprintf(stdout, "%ld\n", sal::static_int_cast< long >(value)); - } - break; - case RegValueType::STRING: - { - sal_Char* value = static_cast(rtl_allocateMemory(valueSize)); -- readUtf8(pBuffer, value, valueSize); -+ readUtf8(aBuffer.data(), value, valueSize); - fprintf(stdout, "%sValue: Type = RegValueType::STRING\n", indent); - fprintf( - stdout, "%s Size = %lu\n", indent, -@@ -1419,7 +1386,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - fprintf(stdout, "%s Data = ", indent); - - std::unique_ptr value(new sal_Unicode[size]); -- readString(pBuffer, value.get(), size); -+ readString(aBuffer.data(), value.get(), size); - - OString uStr = OUStringToOString(value.get(), RTL_TEXTENCODING_UTF8); - fprintf(stdout, "L\"%s\"\n", uStr.getStr()); -@@ -1433,7 +1400,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - sal::static_int_cast< unsigned long >(valueSize)); - fprintf(stdout, "%s Data = ", indent); - dumpType( -- typereg::Reader(pBuffer, valueSize), -+ typereg::Reader(aBuffer.data(), valueSize), - sIndent + " "); - } - break; -@@ -1442,7 +1409,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - sal_uInt32 offset = 4; // initial 4 bytes for the size of the array - sal_uInt32 len = 0; - -- readUINT32(pBuffer, len); -+ readUINT32(aBuffer.data(), len); - - fprintf(stdout, "%sValue: Type = RegValueType::LONGLIST\n", indent); - fprintf( -@@ -1456,7 +1423,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - sal_Int32 longValue; - for (sal_uInt32 i=0; i < len; i++) - { -- readINT32(pBuffer+offset, longValue); -+ readINT32(aBuffer.data() + offset, longValue); - - if (offset > 4) - fprintf(stdout, "%s ", indent); -@@ -1475,7 +1442,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - sal_uInt32 sLen = 0; - sal_uInt32 len = 0; - -- readUINT32(pBuffer, len); -+ readUINT32(aBuffer.data(), len); - - fprintf(stdout, "%sValue: Type = RegValueType::STRINGLIST\n", indent); - fprintf( -@@ -1488,12 +1455,12 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - - for (sal_uInt32 i=0; i < len; i++) - { -- readUINT32(pBuffer+offset, sLen); -+ readUINT32(aBuffer.data() + offset, sLen); - - offset += 4; // 4 bytes (sal_uInt32) for the string size - - sal_Char *pValue = static_cast(rtl_allocateMemory(sLen)); -- readUtf8(pBuffer+offset, pValue, sLen); -+ readUtf8(aBuffer.data() + offset, pValue, sLen); - - if (offset > 8) - fprintf(stdout, "%s ", indent); -@@ -1512,7 +1479,7 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - sal_uInt32 sLen = 0; - sal_uInt32 len = 0; - -- readUINT32(pBuffer, len); -+ readUINT32(aBuffer.data(), len); - - fprintf(stdout, "%sValue: Type = RegValueType::UNICODELIST\n", indent); - fprintf( -@@ -1526,12 +1493,12 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - OString uStr; - for (sal_uInt32 i=0; i < len; i++) - { -- readUINT32(pBuffer+offset, sLen); -+ readUINT32(aBuffer.data() + offset, sLen); - - offset += 4; // 4 bytes (sal_uInt32) for the string size - - sal_Unicode *pValue = static_cast(rtl_allocateMemory((sLen / 2) * sizeof(sal_Unicode))); -- readString(pBuffer+offset, pValue, sLen); -+ readString(aBuffer.data() + offset, pValue, sLen); - - if (offset > 8) - fprintf(stdout, "%s ", indent); -@@ -1552,7 +1519,6 @@ RegError ORegistry::dumpValue(const OUString& sPath, const OUString& sName, sal_ - - fprintf(stdout, "\n"); - -- rtl_freeMemory(pBuffer); - return RegError::NO_ERROR; - } - -diff --git a/sal/osl/unx/file.cxx b/sal/osl/unx/file.cxx -index de36b3d26a9c..d2b59dfb2851 100644 ---- a/sal/osl/unx/file.cxx -+++ b/sal/osl/unx/file.cxx -@@ -1148,10 +1148,10 @@ const off_t MAX_OFF_T = std::numeric_limits< off_t >::max(); - - namespace { - --//coverity[result_independent_of_operands] -+// coverity[result_independent_of_operands] - crossplatform requirement - template bool exceedsMaxOffT(T n) { return n > MAX_OFF_T; } - --//coverity[result_independent_of_operands] -+// coverity[result_independent_of_operands] - crossplatform requirement - template bool exceedsMinOffT(T n) - { return n < std::numeric_limits::min(); } - -diff --git a/sal/osl/unx/pipe.cxx b/sal/osl/unx/pipe.cxx -index e577e89608ba..aae01fd36439 100644 ---- a/sal/osl/unx/pipe.cxx -+++ b/sal/osl/unx/pipe.cxx -@@ -287,10 +287,11 @@ oslPipe SAL_CALL osl_psz_createPipe(const sal_Char *pszPipeName, oslPipeOptions - if (listen(pPipe->m_Socket, 5) < 0) - { - SAL_WARN("sal.osl.pipe", "listen() failed: " << strerror(errno)); -- // coverity[toctou] cid#1255391 warns about unlink(name) after -- // stat(name, &status) above, but the intervening call to bind makes -- // those two clearly unrelated, as it would fail if name existed at -- // that point in time: -+ // cid#1255391 warns about unlink(name) after stat(name, &status) -+ // above, but the intervening call to bind makes those two clearly -+ // unrelated, as it would fail if name existed at that point in -+ // time: -+ // coverity[toctou] - this is bogus - unlink(name); /* remove filesystem entry */ - close(pPipe->m_Socket); - destroyPipeImpl(pPipe); -diff --git a/sal/osl/unx/profile.cxx b/sal/osl/unx/profile.cxx -index a3d029e94da2..0671a80d264d 100644 ---- a/sal/osl/unx/profile.cxx -+++ b/sal/osl/unx/profile.cxx -@@ -181,6 +181,7 @@ static oslProfile SAL_CALL osl_psz_openProfile(const sal_Char *pszProfileName, o - if (pProfile->m_pFile == nullptr) - closeFileImpl(pFile,pProfile->m_Flags); - -+ // coverity[leaked_storage] - pFile is not leaked - return pProfile; - } - -diff --git a/sal/osl/w32/file.cxx b/sal/osl/w32/file.cxx -index 7c0b6674c23f..106e160f894e 100644 ---- a/sal/osl/w32/file.cxx -+++ b/sal/osl/w32/file.cxx -@@ -776,7 +776,7 @@ oslFileError SAL_CALL osl_closeFile(oslFileHandle Handle) - - namespace { - --//coverity[result_independent_of_operands] -+// coverity[result_independent_of_operands] - crossplatform requirement - template bool exceedsMaxSIZE_T(T n) - { return n > std::numeric_limits< SIZE_T >::max(); } - -@@ -930,7 +930,7 @@ LONGLONG const g_limit_longlong = std::numeric_limits< LONGLONG >::max(); - - namespace { - --//coverity[result_independent_of_operands] -+// coverity[result_independent_of_operands] - crossplatform requirement - template bool exceedsMaxLONGLONG(T n) - { return n > g_limit_longlong; } - -diff --git a/sal/rtl/alloc_arena.cxx b/sal/rtl/alloc_arena.cxx -index 373de6d51ad9..4967fac93293 100644 ---- a/sal/rtl/alloc_arena.cxx -+++ b/sal/rtl/alloc_arena.cxx -@@ -258,7 +258,7 @@ void rtl_arena_hash_rescale( - rtl_arena_segment_type * next = curr->m_fnext; - rtl_arena_segment_type ** head; - -- // coverity[negative_shift] -+ // coverity[negative_shift] - bogus - head = &(arena->m_hash_table[RTL_ARENA_HASH_INDEX(arena, curr->m_addr)]); - curr->m_fnext = (*head); - (*head) = curr; -diff --git a/sal/rtl/alloc_cache.cxx b/sal/rtl/alloc_cache.cxx -index 091a5bf774ee..6ffc506e2a6e 100644 ---- a/sal/rtl/alloc_cache.cxx -+++ b/sal/rtl/alloc_cache.cxx -@@ -829,7 +829,7 @@ void rtl_cache_deactivate(rtl_cache_type * cache) - /* cleanup cpu layer */ - if ((mag = cache->m_cpu_curr)) - { -- // coverity[missing_lock] -+ // coverity[missing_lock] - locking is fine - cache->m_cpu_curr = nullptr; - rtl_cache_magazine_clear (cache, mag); - rtl_cache_free (mag_cache, mag); -@@ -837,7 +837,7 @@ void rtl_cache_deactivate(rtl_cache_type * cache) - - if ((mag = cache->m_cpu_prev)) - { -- // coverity[missing_lock] -+ // coverity[missing_lock] - locking is fine - cache->m_cpu_prev = nullptr; - rtl_cache_magazine_clear (cache, mag); - rtl_cache_free (mag_cache, mag); -@@ -1279,7 +1279,7 @@ static void rtl_cache_depot_wsupdate( - RTL_MEMORY_LOCK_ACQUIRE(&(cache->m_depot_lock)); - } - } -- // coverity[missing_unlock] -+ // coverity[missing_unlock] - locking is fine - } - - /** -diff --git a/sc/inc/dpobject.hxx b/sc/inc/dpobject.hxx -index 39299c79ab26..814ad49e86c3 100644 ---- a/sc/inc/dpobject.hxx -+++ b/sc/inc/dpobject.hxx -@@ -391,7 +391,7 @@ public: - OUString CreateNewName() const; - - void FreeTable(const ScDPObject* pDPObj); -- SC_DLLPUBLIC bool InsertNewTable(ScDPObject* pDPObj); -+ SC_DLLPUBLIC void InsertNewTable(ScDPObject* pDPObj); - SC_DLLPUBLIC bool HasTable(const ScDPObject* pDPObj) const; - - SC_DLLPUBLIC SheetCaches& GetSheetCaches(); -diff --git a/sc/qa/unit/ucalc_pivottable.cxx b/sc/qa/unit/ucalc_pivottable.cxx -index 404de5d06c14..dbf991387fef 100644 ---- a/sc/qa/unit/ucalc_pivottable.cxx -+++ b/sc/qa/unit/ucalc_pivottable.cxx -@@ -221,8 +221,7 @@ void Test::testPivotTable() - m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -247,7 +246,7 @@ void Test::testPivotTable() - { "Total Result", "50", "57", "23", "130" } - }; - -- bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); -+ bool bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be only one data cache.", size_t(1), pDPs->GetSheetCaches().size()); -@@ -285,7 +284,7 @@ void Test::testPivotTable() - { "Total Result", "50", "57", "23", "130" } - }; - -- bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (from old cache)"); -+ bool bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (from old cache)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -322,7 +321,7 @@ void Test::testPivotTable() - { "Total Result", "300", "700", "1100", "2100" } - }; - -- bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (refreshed)"); -+ bool bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (refreshed)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -351,8 +350,7 @@ void Test::testPivotTable() - - pDPObj = createDPFromRange( - m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false); -- bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -402,8 +400,7 @@ void Test::testPivotTableLabels() - m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -418,7 +415,7 @@ void Test::testPivotTableLabels() - { "Total Result", "30", "20", "45", "95" } - }; - -- bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); -+ bool bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -458,8 +455,7 @@ void Test::testPivotTableDateLabels() - m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -476,7 +472,7 @@ void Test::testPivotTableDateLabels() - { "Total Result", "30", "20", "45", "95" } - }; - -- bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); -+ bool bSuccess = checkDPTableOutput<5>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -541,8 +537,7 @@ void Test::testPivotTableFilters() - m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, true); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -559,7 +554,7 @@ void Test::testPivotTableFilters() - { "Sum - Val2", "80" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (unfiltered)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (unfiltered)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -593,7 +588,7 @@ void Test::testPivotTableFilters() - { "Sum - Val2", "40" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (filtered by page)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (filtered by page)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -622,7 +617,7 @@ void Test::testPivotTableFilters() - { "Sum - Val2", "20" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (filtered by query)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (filtered by query)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -645,7 +640,7 @@ void Test::testPivotTableFilters() - { "Sum - Val2", "40" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (filtered by page)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output (filtered by page)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -701,8 +696,7 @@ void Test::testPivotTableNamedSource() - CPPUNIT_ASSERT_MESSAGE("Failed to create a new pivot table object.", pDPObj); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -977,9 +971,7 @@ void Test::testPivotTableDuplicateDataFields() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -997,7 +989,7 @@ void Test::testPivotTableDuplicateDataFields() - { "Total Count - Value", nullptr, "10" }, - }; - -- bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); -+ bool bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1021,7 +1013,7 @@ void Test::testPivotTableDuplicateDataFields() - { "Total Result", "411", "10" } - }; - -- bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); -+ bool bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1070,9 +1062,7 @@ void Test::testPivotTableNormalGrouping() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1092,7 +1082,7 @@ void Test::testPivotTableNormalGrouping() - { "Total Result", "28" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Initial output without grouping"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Initial output without grouping"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1140,7 +1130,7 @@ void Test::testPivotTableNormalGrouping() - { "Total Result", nullptr, "28" } - }; - -- bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "A, B, C grouped by Group1."); -+ bool bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "A, B, C grouped by Group1."); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1177,7 +1167,7 @@ void Test::testPivotTableNormalGrouping() - { "Total Result", nullptr, "28" } - }; - -- bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "D, E, F grouped by Group2."); -+ bool bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "D, E, F grouped by Group2."); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1232,9 +1222,7 @@ void Test::testPivotTableNumberGrouping() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1272,7 +1260,7 @@ void Test::testPivotTableNumberGrouping() - { "Total Result", "1389" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Order grouped by numbers"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Order grouped by numbers"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1317,9 +1305,7 @@ void Test::testPivotTableDateGrouping() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1389,7 +1375,7 @@ void Test::testPivotTableDateGrouping() - { "Total Result", nullptr, nullptr, "36" }, - }; - -- bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "Years, quarters and months date groups."); -+ bool bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "Years, quarters and months date groups."); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1417,7 +1403,7 @@ void Test::testPivotTableDateGrouping() - { "Total Result", nullptr, nullptr, "10" }, - }; - -- bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "Year 2012 data now hidden"); -+ bool bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "Year 2012 data now hidden"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1446,7 +1432,7 @@ void Test::testPivotTableDateGrouping() - { "Total Result", "36" } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Remove all date grouping."); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Remove all date grouping."); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1490,9 +1476,7 @@ void Test::testPivotTableEmptyRows() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1511,7 +1495,7 @@ void Test::testPivotTableEmptyRows() - { "Total Result", "10" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Include empty rows"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Include empty rows"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1533,7 +1517,7 @@ void Test::testPivotTableEmptyRows() - { "Total Result", "10" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Ignore empty rows"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Ignore empty rows"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1559,7 +1543,7 @@ void Test::testPivotTableEmptyRows() - { "Total Result", "10" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Ignore empty rows"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Ignore empty rows"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1617,9 +1601,7 @@ void Test::testPivotTableTextNumber() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1637,7 +1619,7 @@ void Test::testPivotTableTextNumber() - { "Total Result", "10" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Text number field members"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Text number field members"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1662,7 +1644,7 @@ void Test::testPivotTableTextNumber() - { "4", nullptr } - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Text number field members"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Text number field members"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1701,9 +1683,7 @@ void Test::testPivotTableCaseInsensitiveStrings() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1718,7 +1698,7 @@ void Test::testPivotTableCaseInsensitiveStrings() - { "Total Result", "3" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Case insensitive strings"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Case insensitive strings"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1792,9 +1772,7 @@ void Test::testPivotTableNumStability() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1864,9 +1842,7 @@ void Test::testPivotTableFieldReference() - m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -1884,7 +1860,7 @@ void Test::testPivotTableFieldReference() - { "Total Result", "15" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (none)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (none)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1911,7 +1887,7 @@ void Test::testPivotTableFieldReference() - { "Total Result", nullptr }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (difference from)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (difference from)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1931,7 +1907,7 @@ void Test::testPivotTableFieldReference() - { "Total Result", nullptr }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% of)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% of)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1951,7 +1927,7 @@ void Test::testPivotTableFieldReference() - { "Total Result", nullptr }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% difference from)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% difference from)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1971,7 +1947,7 @@ void Test::testPivotTableFieldReference() - { "Total Result", nullptr }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (Running total)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (Running total)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -1991,7 +1967,7 @@ void Test::testPivotTableFieldReference() - { "Total Result", "100.00%" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% of column)"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Field reference (% of column)"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -2105,9 +2081,7 @@ void Test::testFuncGETPIVOTDATA() - } - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -2122,7 +2096,7 @@ void Test::testFuncGETPIVOTDATA() - { "Total Result", "21" }, - }; - -- bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Pivot table created for GETPIVOTDATA"); -+ bool bSuccess = checkDPTableOutput<2>(m_pDoc, aOutRange, aOutputCheck, "Pivot table created for GETPIVOTDATA"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -2168,8 +2142,7 @@ void Test::testFuncGETPIVOTDATA() - pDPObj = createDPFromRange(m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - } - -- bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("InsertNewTable failed", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - aOutRange = refresh(pDPObj); - - { -@@ -2184,7 +2157,7 @@ void Test::testFuncGETPIVOTDATA() - { "Total Count - Value", nullptr, "6" }, - }; - -- bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "Pivot table refreshed"); -+ bool bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "Pivot table refreshed"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -2264,9 +2237,7 @@ void Test::testFuncGETPIVOTDATALeafAccess() - pDPObj = createDPFromRange(m_pDoc, aDataRange, aFields, SAL_N_ELEMENTS(aFields), false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new pivot table object into document.", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -2283,7 +2254,7 @@ void Test::testFuncGETPIVOTDATALeafAccess() - { "Total Result", nullptr, "10" }, - }; - -- bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "Pivot table refreshed"); -+ bool bSuccess = checkDPTableOutput<3>(m_pDoc, aOutRange, aOutputCheck, "Pivot table refreshed"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -2361,8 +2332,7 @@ void Test::testPivotTableRepeatItemLabels() - m_pDoc, ScRange(nCol1, nRow1, 0, nCol2, nRow2, 0), aFields, nFieldCount, false); - - ScDPCollection* pDPs = m_pDoc->GetDPCollection(); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new datapilot object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", - size_t(1), pDPs->GetCount()); - pDPObj->SetName(pDPs->CreateNewName()); -@@ -2388,7 +2358,7 @@ void Test::testPivotTableRepeatItemLabels() - { "Total Result", nullptr, nullptr, "220" } - }; - -- bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); -+ bool bSuccess = checkDPTableOutput<4>(m_pDoc, aOutRange, aOutputCheck, "DataPilot table output"); - CPPUNIT_ASSERT_MESSAGE("Table output check failed", bSuccess); - } - -@@ -2442,15 +2412,13 @@ void Test::testPivotTableDPCollection() - - // Add 2 DP objects - ScDPObject* pDPObj = createDPFromRange(m_pDoc, aDataRange , aFields, nFieldCount, false); -- bool bSuccess = pDPs->InsertNewTable(pDPObj); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new DP object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj); - pDPObj->SetName("DP1"); // set custom name - - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be only one data pilot table.", size_t(1), pDPs->GetCount()); - - ScDPObject* pDPObj2 = createDPFromRange(m_pDoc, aDataRange, aFields, nFieldCount, false); -- bSuccess = pDPs->InsertNewTable(pDPObj2); -- CPPUNIT_ASSERT_MESSAGE("failed to insert a new DP object into document", bSuccess); -+ pDPs->InsertNewTable(pDPObj2); - pDPObj2->SetName("DP2"); // set custom name - - CPPUNIT_ASSERT_EQUAL_MESSAGE("there should be two DP tables", size_t(2), pDPs->GetCount()); -diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx -index f86a608b156e..1cc9cf20f2ec 100644 ---- a/sc/source/core/data/dpobject.cxx -+++ b/sc/source/core/data/dpobject.cxx -@@ -3797,7 +3797,7 @@ void ScDPCollection::FreeTable(const ScDPObject* pDPObject) - maTables.erase(std::remove_if(maTables.begin(), maTables.end(), funcRemoveCondition), maTables.end()); - } - --bool ScDPCollection::InsertNewTable(ScDPObject* pDPObj) -+void ScDPCollection::InsertNewTable(ScDPObject* pDPObj) - { - const ScRange& rOutRange = pDPObj->GetOutRange(); - const ScAddress& s = rOutRange.aStart; -@@ -3805,7 +3805,6 @@ bool ScDPCollection::InsertNewTable(ScDPObject* pDPObj) - mpDoc->ApplyFlagsTab(s.Col(), s.Row(), e.Col(), e.Row(), s.Tab(), ScMF::DpTable); - - maTables.push_back(std::unique_ptr(pDPObj)); -- return true; - } - - bool ScDPCollection::HasTable(const ScDPObject* pDPObj) const -diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx -index 67fe8aee6c41..1e461fed1ff4 100644 ---- a/sc/source/core/tool/chgtrack.cxx -+++ b/sc/source/core/tool/chgtrack.cxx -@@ -339,8 +339,11 @@ bool ScChangeAction::IsDeletedIn( const ScChangeAction* p ) const - void ScChangeAction::RemoveAllDeletedIn() - { - //TODO: Not from TopContent, but really this one -- while ( pLinkDeletedIn ) -- delete pLinkDeletedIn; // Moves up by itself -+ while (pLinkDeletedIn) -+ { -+ // coverity[use_after_free] - Moves up by itself -+ delete pLinkDeletedIn; -+ } - } - - bool ScChangeAction::IsDeletedInDelType( ScChangeActionType eDelType ) const -@@ -399,8 +402,11 @@ void ScChangeAction::SetDeletedIn( ScChangeAction* p ) - - void ScChangeAction::RemoveAllDependent() - { -- while ( pLinkDependent ) -- delete pLinkDependent; // Moves up by itself -+ while (pLinkDependent) -+ { -+ // coverity[use_after_free] - Moves up by itself -+ delete pLinkDependent; -+ } - } - - DateTime ScChangeAction::GetDateTime() const -@@ -828,8 +834,11 @@ ScChangeActionDel::ScChangeActionDel( - ScChangeActionDel::~ScChangeActionDel() - { - DeleteCellEntries(); -- while ( pLinkMove ) -+ while (pLinkMove) -+ { -+ // coverity[use_after_free] - Moves up by itself - delete pLinkMove; -+ } - } - - void ScChangeActionDel::AddContent( ScChangeActionContent* pContent ) -@@ -1054,6 +1063,7 @@ void ScChangeActionDel::UndoCutOffMoves() - { // Restore cut off Moves; delete Entries/Links - while ( pLinkMove ) - { -+ // coverity[deref_arg] - the call on delete pLinkMove at the block end Moves a new entry into pLinkMode by itself - ScChangeActionMove* pMove = pLinkMove->GetMove(); - short nFrom = pLinkMove->GetCutOffFrom(); - short nTo = pLinkMove->GetCutOffTo(); -diff --git a/sc/source/core/tool/compiler.cxx b/sc/source/core/tool/compiler.cxx -index 9e9edb77dc7a..58e3bbb69976 100644 ---- a/sc/source/core/tool/compiler.cxx -+++ b/sc/source/core/tool/compiler.cxx -@@ -5697,6 +5697,7 @@ bool ScCompiler::HandleTableRef() - default: - ; // nothing - } -+ // coverity[copy_paste_error] - this is correct, aStart in both aDBRange uses - if (aColRange.aStart.Row() != aDBRange.aStart.Row() || aColRange.aEnd.Row() != aDBRange.aStart.Row()) - aRange = ScRange( ScAddress::INITIALIZE_INVALID); - else -diff --git a/sc/source/filter/xml/xmldpimp.cxx b/sc/source/filter/xml/xmldpimp.cxx -index c6d3581ca7a3..27c8804f8961 100644 ---- a/sc/source/filter/xml/xmldpimp.cxx -+++ b/sc/source/filter/xml/xmldpimp.cxx -@@ -96,7 +96,7 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, - const rtl::Reference& rAttrList ) : - ScXMLImportContext( rImport ), - pDoc(GetScImport().GetDocument()), -- pDPObject(nullptr), -+ pDPSave(new ScDPSaveData()), - pDPDimSaveData(nullptr), - sDataPilotTableName(), - sApplicationData(), -@@ -194,9 +194,6 @@ ScXMLDataPilotTableContext::ScXMLDataPilotTableContext( ScXMLImport& rImport, - } - } - } -- -- pDPObject = new ScDPObject(pDoc); -- pDPSave.reset(new ScDPSaveData()); - } - - ScXMLDataPilotTableContext::~ScXMLDataPilotTableContext() -@@ -322,7 +319,7 @@ ScDPOutputGeometry::FieldType toFieldType(sheet::DataPilotFieldOrientation nOrie - - } - --void ScXMLDataPilotTableContext::SetButtons() -+void ScXMLDataPilotTableContext::SetButtons(ScDPObject* pDPObject) - { - ScDPOutputGeometry aGeometry(aTargetRangeAddress, bShowFilter); - aGeometry.setColumnFieldCount(mnColFieldCount); -@@ -390,8 +387,7 @@ void ScXMLDataPilotTableContext::SetButtons() - } - } - -- if ( pDPObject ) -- pDPObject->RefreshAfterLoad(); -+ pDPObject->RefreshAfterLoad(); - } - - void ScXMLDataPilotTableContext::SetSelectedPage( const OUString& rDimName, const OUString& rSelected ) -@@ -455,6 +451,7 @@ void SAL_CALL ScXMLDataPilotTableContext::endFastElement( sal_Int32 /*nElement*/ - if (!bTargetRangeAddress) - return; - -+ ScDPObject* pDPObject(new ScDPObject(pDoc)); - pDPObject->SetName(sDataPilotTableName); - pDPObject->SetTag(sApplicationData); - pDPObject->SetOutRange(aTargetRangeAddress); -@@ -540,13 +537,9 @@ void SAL_CALL ScXMLDataPilotTableContext::endFastElement( sal_Int32 /*nElement*/ - if ( pDPCollection->GetByName(pDPObject->GetName()) ) - pDPObject->SetName( OUString() ); // ignore the invalid name, create a new name in AfterXMLLoading - -- if (!pDPCollection->InsertNewTable(pDPObject)) -- { -- OSL_FAIL("cannot insert DPObject"); -- DELETEZ( pDPObject ); -- } -+ pDPCollection->InsertNewTable(pDPObject); - -- SetButtons(); -+ SetButtons(pDPObject); - } - - void ScXMLDataPilotTableContext::SetGrandTotal( -diff --git a/sc/source/filter/xml/xmldpimp.hxx b/sc/source/filter/xml/xmldpimp.hxx -index 9cc139e0f08f..3c9ff0911ce8 100644 ---- a/sc/source/filter/xml/xmldpimp.hxx -+++ b/sc/source/filter/xml/xmldpimp.hxx -@@ -71,7 +71,6 @@ class ScXMLDataPilotTableContext : public ScXMLImportContext - GrandTotalItem(); - }; - ScDocument* pDoc; -- ScDPObject* pDPObject; - std::unique_ptr pDPSave; - std::unique_ptr pDPDimSaveData; - GrandTotalItem maRowGrandTotal; -@@ -139,7 +138,7 @@ public: - void AddDimension(ScDPSaveDimension* pDim); - void AddGroupDim(const ScDPSaveNumGroupDimension& aNumGroupDim); - void AddGroupDim(const ScDPSaveGroupDimension& aGroupDim); -- void SetButtons(); -+ void SetButtons(ScDPObject* pDPObject); - void SetSelectedPage( const OUString& rDimName, const OUString& rSelected ); - }; - -diff --git a/sc/source/ui/docshell/dbdocfun.cxx b/sc/source/ui/docshell/dbdocfun.cxx -index d518ff17c03a..ed6fa69b0d08 100644 ---- a/sc/source/ui/docshell/dbdocfun.cxx -+++ b/sc/source/ui/docshell/dbdocfun.cxx -@@ -1431,9 +1431,7 @@ bool ScDBDocFunc::CreatePivotTable(const ScDPObject& rDPObj, bool bRecord, bool - } - } - -- if (!rDoc.GetDPCollection()->InsertNewTable(pDestObj.release())) -- // Insertion into collection failed. -- return false; -+ rDoc.GetDPCollection()->InsertNewTable(pDestObj.release()); - - rDestObj.ReloadGroupTableData(); - rDestObj.SyncAllDimensionMembers(); -diff --git a/sc/source/ui/undo/undodat.cxx b/sc/source/ui/undo/undodat.cxx -index b7a745a87d98..c84d38cc8c80 100644 ---- a/sc/source/ui/undo/undodat.cxx -+++ b/sc/source/ui/undo/undodat.cxx -@@ -1442,11 +1442,7 @@ void ScUndoDataPilot::Undo() - // re-insert deleted object - - ScDPObject* pDestObj = new ScDPObject(*xOldDPObject); -- if ( !rDoc.GetDPCollection()->InsertNewTable(pDestObj) ) -- { -- OSL_FAIL("cannot insert DPObject"); -- DELETEZ( pDestObj ); -- } -+ rDoc.GetDPCollection()->InsertNewTable(pDestObj); - } - - if (xNewUndoDoc) -diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx -index e28704470b4e..8564c988336e 100644 ---- a/sc/source/ui/view/viewdata.cxx -+++ b/sc/source/ui/view/viewdata.cxx -@@ -176,6 +176,7 @@ ScPositionHelper::getNearestByIndex(index_type nIndex) const - } - - auto posLB = std::prev(posUB); -+ // coverity[copy_paste_error] - posUB is correct - if (posUB == mData.end()) - { - return *posLB; -@@ -206,6 +207,7 @@ ScPositionHelper::getNearestByPosition(long nPos) const - } - - auto posLB = std::prev(posUB); -+ // coverity[copy_paste_error] - posUB is correct - if (posUB == mData.end()) - { - return *posLB; -diff --git a/sd/source/ui/animations/CustomAnimationPane.cxx b/sd/source/ui/animations/CustomAnimationPane.cxx -index c00aedf6c607..14bc19266ed2 100644 ---- a/sd/source/ui/animations/CustomAnimationPane.cxx -+++ b/sd/source/ui/animations/CustomAnimationPane.cxx -@@ -2312,6 +2312,7 @@ void CustomAnimationPane::moveSelection( bool bUp ) - CustomAnimationEffectPtr pEffect = (*aIter++); - - EffectSequence::iterator aUpEffectPos( pSequence->find( pEffect ) ); -+ // coverity[copy_paste_error] - this is correct, checking if it exists - if( aUpEffectPos != rEffectSequence.end() ) - { - EffectSequence::iterator aInsertPos( rEffectSequence.erase( aUpEffectPos ) ); -@@ -2342,6 +2343,7 @@ void CustomAnimationPane::moveSelection( bool bUp ) - CustomAnimationEffectPtr pEffect = (*aIter++); - - EffectSequence::iterator aDownEffectPos( pSequence->find( pEffect ) ); -+ // coverity[copy_paste_error] - this is correct, checking if it exists - if( aDownEffectPos != rEffectSequence.end() ) - { - EffectSequence::iterator aInsertPos( rEffectSequence.erase( aDownEffectPos ) ); -diff --git a/sd/source/ui/unoidl/unosrch.cxx b/sd/source/ui/unoidl/unosrch.cxx -index a254bbe4a8b6..737710bcf4b2 100644 ---- a/sd/source/ui/unoidl/unosrch.cxx -+++ b/sd/source/ui/unoidl/unosrch.cxx -@@ -56,11 +56,10 @@ class SearchContext_impl - { - uno::Reference< drawing::XShapes > mxShapes; - sal_Int32 mnIndex; -- SearchContext_impl* mpParent; - - public: -- SearchContext_impl( uno::Reference< drawing::XShapes > const & xShapes, SearchContext_impl* pParent = nullptr ) -- : mxShapes( xShapes ), mnIndex( -1 ), mpParent( pParent ) {} -+ SearchContext_impl(uno::Reference const& xShapes) -+ : mxShapes( xShapes ), mnIndex( -1 ) {} - - uno::Reference< drawing::XShape > firstShape() - { -@@ -78,8 +77,6 @@ public: - } - return xShape; - } -- -- SearchContext_impl* getParent() const { return mpParent; } - }; - - /* ================================================================= */ -@@ -113,7 +110,7 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut - uno::Reference< drawing::XShapes > xShapes; - uno::Reference< drawing::XShape > xShape; - -- SearchContext_impl* pContext = nullptr; -+ std::vector aContexts; - if(mpPage) - { - uno::Reference< drawing::XDrawPage > xPage( mpPage ); -@@ -122,8 +119,8 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut - - if( xShapes.is() && (xShapes->getCount() > 0) ) - { -- pContext = new SearchContext_impl( xShapes ); -- xShape = pContext->firstShape(); -+ aContexts.push_back(SearchContext_impl(xShapes)); -+ xShape = aContexts.back().firstShape(); - } - else - { -@@ -154,34 +151,24 @@ sal_Int32 SAL_CALL SdUnoSearchReplaceShape::replaceAll( const uno::Reference< ut - uno::Reference< drawing::XShapes > xGroupShape( xShape, uno::UNO_QUERY ); - if( xGroupShape.is() && ( xGroupShape->getCount() > 0 ) ) - { -- pContext = new SearchContext_impl( xGroupShape, pContext ); -- xShape = pContext->firstShape(); -+ aContexts.push_back(SearchContext_impl(xGroupShape)); -+ xShape = aContexts.back().firstShape(); - } - else - { -- if( pContext ) -- xShape = pContext->nextShape(); -+ if (!aContexts.empty()) -+ xShape = aContexts.back().nextShape(); - else - xShape = nullptr; - } - - // test parent contexts for next shape if none - // is found in the current context -- while( pContext && !xShape.is() ) -+ while (!aContexts.empty() && !xShape.is()) - { -- if( pContext->getParent() ) -- { -- SearchContext_impl* pOldContext = pContext; -- pContext = pContext->getParent(); -- delete pOldContext; -- xShape = pContext->nextShape(); -- } -- else -- { -- delete pContext; -- pContext = nullptr; -- xShape = nullptr; -- } -+ aContexts.pop_back(); -+ if (!aContexts.empty()) -+ xShape = aContexts.back().nextShape(); - } - } - -@@ -210,7 +197,7 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape: - uno::Reference< drawing::XShapes > xShapes; - uno::Reference< drawing::XShape > xShape; - -- SearchContext_impl* pContext = nullptr; -+ std::vector aContexts; - if(mpPage) - { - uno::Reference< drawing::XDrawPage > xPage( mpPage ); -@@ -218,8 +205,8 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape: - - if( xShapes.is() && xShapes->getCount() > 0 ) - { -- pContext = new SearchContext_impl( xShapes ); -- xShape = pContext->firstShape(); -+ aContexts.push_back(SearchContext_impl(xShapes)); -+ xShape = aContexts.back().firstShape(); - } - else - { -@@ -259,34 +246,24 @@ uno::Reference< css::container::XIndexAccess > SAL_CALL SdUnoSearchReplaceShape: - - if( xGroupShape.is() && xGroupShape->getCount() > 0 ) - { -- pContext = new SearchContext_impl( xGroupShape, pContext ); -- xShape = pContext->firstShape(); -+ aContexts.push_back(SearchContext_impl(xGroupShape)); -+ xShape = aContexts.back().firstShape(); - } - else - { -- if( pContext ) -- xShape = pContext->nextShape(); -+ if (!aContexts.empty()) -+ xShape = aContexts.back().nextShape(); - else - xShape = nullptr; - } - - // test parent contexts for next shape if none - // is found in the current context -- while( pContext && !xShape.is() ) -+ while (!aContexts.empty() && !xShape.is()) - { -- if( pContext->getParent() ) -- { -- SearchContext_impl* pOldContext = pContext; -- pContext = pContext->getParent(); -- delete pOldContext; -- xShape = pContext->nextShape(); -- } -- else -- { -- delete pContext; -- pContext = nullptr; -- xShape = nullptr; -- } -+ aContexts.pop_back(); -+ if (!aContexts.empty()) -+ xShape = aContexts.back().nextShape(); - } - } - -diff --git a/sfx2/source/control/itemdel.cxx b/sfx2/source/control/itemdel.cxx -index 9ee76fd6a2bb..806b0895f2a5 100644 ---- a/sfx2/source/control/itemdel.cxx -+++ b/sfx2/source/control/itemdel.cxx -@@ -77,7 +77,7 @@ void DeleteItemOnIdle(SfxPoolItem* pItem) - DBG_ASSERT( 0 == pItem->GetRefCount(), "deleting item in use" ); - SfxItemDisruptor_Impl *pDesruptor = new SfxItemDisruptor_Impl(pItem); - pDesruptor->LaunchDeleteOnIdle(); -- // coverity[leaked_storage] pDesruptor takes care of its own destruction at idle time -+ // coverity[leaked_storage] - pDesruptor takes care of its own destruction at idle time - } - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/solenv/bin/pack_images.py b/solenv/bin/pack_images.py -index 0f493c8f3035..384b61db8bc6 100755 ---- a/solenv/bin/pack_images.py -+++ b/solenv/bin/pack_images.py -@@ -512,7 +512,7 @@ def parse_image_list(imagelist_filenames): - - if line.startswith('%MODULE%'): - key = line.replace('%MODULE%/', '') -- if key in global_image_list: -+ if key in module_image_list: - module_image_list[key] += 1 - else: - module_image_list[key] = 0 -diff --git a/soltools/cpp/_unix.c b/soltools/cpp/_unix.c -index 7d15d57ed45a..2ee9215524a2 100644 ---- a/soltools/cpp/_unix.c -+++ b/soltools/cpp/_unix.c -@@ -204,6 +204,7 @@ void - error(FATAL, "Can't open output file %s", argv[optind + 1]); - - dup2(fdo, 1); -+ // coverity[leaked_handle] - on purpose - } - includelist[NINCLUDE - 1].always = 0; - includelist[NINCLUDE - 1].file = dp; -diff --git a/soltools/mkdepend/parse.c b/soltools/mkdepend/parse.c -index b538c87be22b..7f87ca7e3529 100644 ---- a/soltools/mkdepend/parse.c -+++ b/soltools/mkdepend/parse.c -@@ -158,6 +158,7 @@ int find_includes(struct filepointer *filep, struct inclist *file, struct inclis - break; - } - } -+ // coverity[leaked_storage] - on purpose - return -1; - } - -diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx -index a4d030631398..4d3ff3006a73 100644 ---- a/svtools/source/svhtml/htmlout.cxx -+++ b/svtools/source/svhtml/htmlout.cxx -@@ -465,7 +465,7 @@ static OString lcl_ConvertCharToHTML( sal_uInt32 c, - // If the character could not be converted to the destination - // character set, the UNICODE character is exported as character - // entity. -- // coverity[callee_ptr_arith] -+ // coverity[callee_ptr_arith] - its ok - nLen = lcl_FlushContext(rContext, cBuffer, nFlags); - sal_Char *pBuffer = cBuffer; - while( nLen-- ) -diff --git a/svx/source/gengal/gengal.sh b/svx/source/gengal/gengal.sh -index b4d10458650a..5f644c6702bb 100755 ---- a/svx/source/gengal/gengal.sh -+++ b/svx/source/gengal/gengal.sh -@@ -55,8 +55,6 @@ for arg in "$@" - do - case "$arg" in - -env:*) BOOTSTRAPVARS=$BOOTSTRAPVARS" ""$arg";; -- -v) VERBOSE=true;; -- --verbose) VERBOSE=true;; - esac - done - -diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx -index e762ab1f5842..68850b179d3f 100644 ---- a/sw/source/core/text/itrform2.cxx -+++ b/sw/source/core/text/itrform2.cxx -@@ -722,6 +722,8 @@ void SwTextFormatter::BuildPortions( SwTextFormatInfo &rInf ) - - // Reinit the tab overflow flag after the line - rInf.SetTabOverflow( false ); -+ -+ // coverity[leaked_storage] - ownership is too complicated to hazard a fix, it definitely normally doesn't leak - } - - void SwTextFormatter::CalcAdjustLine( SwLineLayout *pCurrent ) -diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx -index bd3693404b76..934676e47033 100644 ---- a/sw/source/ui/index/cnttab.cxx -+++ b/sw/source/ui/index/cnttab.cxx -@@ -4047,8 +4047,9 @@ bool SwEntryBrowseBox::SaveModified() - pController = m_xCheckController.get(); - bVal = static_cast< ::svt::CheckBoxCellController*>(pController)->GetCheckBox().IsChecked(); - } -- AutoMarkEntry* pEntry = (nRow >= m_Entries.size()) ? new AutoMarkEntry -- : m_Entries[nRow].get(); -+ const bool bAddEntry = nRow >= m_Entries.size(); -+ std::unique_ptr xNewEntry(bAddEntry ? new AutoMarkEntry : nullptr); -+ AutoMarkEntry* pEntry = bAddEntry ? xNewEntry.get() : m_Entries[nRow].get(); - switch(nCol) - { - case ITEM_SEARCH : pEntry->sSearch = sNew; break; -@@ -4059,9 +4060,9 @@ bool SwEntryBrowseBox::SaveModified() - case ITEM_CASE : pEntry->bCase = bVal; break; - case ITEM_WORDONLY : pEntry->bWord = bVal; break; - } -- if (nRow >= m_Entries.size()) -+ if (bAddEntry) - { -- m_Entries.push_back(std::unique_ptr(pEntry)); -+ m_Entries.push_back(std::move(xNewEntry)); - RowInserted(nRow, 1, true, true); - if(nCol < ITEM_WORDONLY) - { -diff --git a/unoidl/source/legacyprovider.cxx b/unoidl/source/legacyprovider.cxx -index a7eb47fc7a88..eb9462c733f2 100644 ---- a/unoidl/source/legacyprovider.cxx -+++ b/unoidl/source/legacyprovider.cxx -@@ -259,9 +259,9 @@ rtl::Reference< Entity > readEntity( - { - sal_uInt16 m - = reader.getMethodExceptionCount(k); -- // coverity[tainted_data] cid#1213376 -- // unhelpfully warns about an untrusted loop -- // bound here: -+ // cid#1213376 unhelpfully warns about an -+ // untrusted loop bound here: -+ // coverity[tainted_data] - trusted data source - for (sal_uInt16 l = 0; l != m; ++l) { - getExcs.push_back( - reader.getMethodExceptionTypeName(k, l). -@@ -273,9 +273,9 @@ rtl::Reference< Entity > readEntity( - { - sal_uInt16 m - = reader.getMethodExceptionCount(k); -- // coverity[tainted_data] cid#1213376 -- // unhelpfully warns about an untrusted loop -- // bound here: -+ // cid#1213376 unhelpfully warns about an -+ // untrusted loop bound here: -+ // coverity[tainted_data] - trusted data source - for (sal_uInt16 l = 0; l != m; ++l) { - setExcs.push_back( - reader.getMethodExceptionTypeName(k, l). -@@ -309,8 +309,9 @@ rtl::Reference< Entity > readEntity( - std::vector< InterfaceTypeEntity::Method::Parameter > - params; - sal_uInt16 m = reader.getMethodParameterCount(j); -- // coverity[tainted_data] cid#1213376 unhelpfully warns -- // about an untrusted loop bound here: -+ // cid#1213376 unhelpfully warns about an untrusted loop -+ // bound here: -+ // coverity[tainted_data] - trusted data source - for (sal_uInt16 k = 0; k != m; ++k) { - RTParamMode mode = reader.getMethodParameterFlags(j, k); - InterfaceTypeEntity::Method::Parameter::Direction dir; -@@ -342,8 +343,9 @@ rtl::Reference< Entity > readEntity( - } - std::vector< OUString > excs; - m = reader.getMethodExceptionCount(j); -- // coverity[tainted_data] cid#1213376 unhelpfully warns -- // about an untrusted loop bound here: -+ // cid#1213376 unhelpfully warns about an untrusted loop -+ // bound here: -+ // coverity[tainted_data] - trusted data source - for (sal_uInt16 k = 0; k != m; ++k) { - excs.push_back( - reader.getMethodExceptionTypeName(j, k).replace( -@@ -607,8 +609,9 @@ rtl::Reference< Entity > readEntity( - SingleInterfaceBasedServiceEntity::Constructor:: - Parameter > params; - sal_uInt16 m = reader.getMethodParameterCount(j); -- // coverity[tainted_data] cid#1213376 unhelpfully warns -- // about an untrusted loop bound here: -+ // cid#1213376 unhelpfully warns about an untrusted -+ // loop bound here: -+ // coverity[tainted_data] - trusted data source - for (sal_uInt16 k = 0; k != m; ++k) { - RTParamMode mode - = reader.getMethodParameterFlags(j, k); -@@ -647,8 +650,9 @@ rtl::Reference< Entity > readEntity( - } - std::vector< OUString > excs; - m = reader.getMethodExceptionCount(j); -- // coverity[tainted_data] cid#1213376 unhelpfully warns -- // about an untrusted loop bound here: -+ // cid#1213376 unhelpfully warns about an untrusted -+ // loop bound here: -+ // coverity[tainted_data] - trusted data source - for (sal_uInt16 k = 0; k != m; ++k) { - excs.push_back( - reader.getMethodExceptionTypeName(j, k).replace( -diff --git a/unotest/source/cpp/officeconnection.cxx b/unotest/source/cpp/officeconnection.cxx -index a82471e3b921..c85ad7b72e5f 100644 ---- a/unotest/source/cpp/officeconnection.cxx -+++ b/unotest/source/cpp/officeconnection.cxx -@@ -78,7 +78,7 @@ void OfficeConnection::setUp() { - { - envs = &argEnv.pData; - } -- // coverity[callee_ptr_arith] -+ // coverity[callee_ptr_arith] - arith is fine - CPPUNIT_ASSERT_EQUAL( - osl_Process_E_None, - osl_executeProcess( -diff --git a/vcl/source/bitmap/BitmapScaleConvolution.cxx b/vcl/source/bitmap/BitmapScaleConvolution.cxx -index 49aed5d5940b..a8b9bc4b2494 100644 ---- a/vcl/source/bitmap/BitmapScaleConvolution.cxx -+++ b/vcl/source/bitmap/BitmapScaleConvolution.cxx -@@ -36,9 +36,9 @@ void ImplCalculateContributions( - const long aSourceSize, - const long aDestinationSize, - long& aNumberOfContributions, -- double*& pWeights, -- long*& pPixels, -- long*& pCount, -+ std::vector& rWeights, -+ std::vector& rPixels, -+ std::vector& rCounts, - const Kernel& aKernel) - { - const double fSamplingRadius(aKernel.GetWidth()); -@@ -48,9 +48,9 @@ void ImplCalculateContributions( - - aNumberOfContributions = (long(fabs(ceil(fScaledRadius))) * 2) + 1; - const long nAllocSize(aDestinationSize * aNumberOfContributions); -- pWeights = new double[nAllocSize]; -- pPixels = new long[nAllocSize]; -- pCount = new long[aDestinationSize]; -+ rWeights.resize(nAllocSize); -+ rPixels.resize(nAllocSize); -+ rCounts.resize(aDestinationSize); - - for(long i(0); i < aDestinationSize; i++) - { -@@ -74,13 +74,13 @@ void ImplCalculateContributions( - const long aPixelIndex(MinMax(j, 0, aSourceSize - 1)); - const long nIndex(aIndex + aCurrentCount); - -- pWeights[nIndex] = aWeight; -- pPixels[nIndex] = aPixelIndex; -+ rWeights[nIndex] = aWeight; -+ rPixels[nIndex] = aPixelIndex; - - aCurrentCount++; - } - -- pCount[i] = aCurrentCount; -+ rCounts[i] = aCurrentCount; - } - } - -@@ -100,13 +100,13 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc - - if(pReadAcc) - { -- double* pWeights = nullptr; -- long* pPixels = nullptr; -- long* pCount = nullptr; -+ std::vector aWeights; -+ std::vector aPixels; -+ std::vector aCounts; - long aNumberOfContributions(0); - - const long nHeight(rSource.GetSizePixel().Height()); -- ImplCalculateContributions(nWidth, nNewWidth, aNumberOfContributions, pWeights, pPixels, pCount, aKernel); -+ ImplCalculateContributions(nWidth, nNewWidth, aNumberOfContributions, aWeights, aPixels, aCounts, aKernel); - rTarget = Bitmap(Size(nNewWidth, nHeight), 24); - Bitmap::ScopedWriteAccess pWriteAcc(rTarget); - bool bResult(nullptr != pWriteAcc); -@@ -123,21 +123,21 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc - double aValueGreen(0.0); - double aValueBlue(0.0); - -- for(long j(0); j < pCount[x]; j++) -+ for(long j(0); j < aCounts[x]; j++) - { - const long aIndex(aBaseIndex + j); -- const double aWeight(pWeights[aIndex]); -+ const double aWeight(aWeights[aIndex]); - BitmapColor aColor; - - aSum += aWeight; - - if(pReadAcc->HasPalette()) - { -- aColor = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(y, pPixels[aIndex])); -+ aColor = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(y, aPixels[aIndex])); - } - else - { -- aColor = pReadAcc->GetPixel(y, pPixels[aIndex]); -+ aColor = pReadAcc->GetPixel(y, aPixels[aIndex]); - } - - aValueRed += aWeight * aColor.GetRed(); -@@ -157,9 +157,9 @@ bool ImplScaleConvolutionHor(Bitmap& rSource, Bitmap& rTarget, const double& rSc - pWriteAcc.reset(); - } - -- delete[] pWeights; -- delete[] pCount; -- delete[] pPixels; -+ aWeights.clear(); -+ aCounts.clear(); -+ aPixels.clear(); - - if(bResult) - { -@@ -186,13 +186,13 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc - - if(pReadAcc) - { -- double* pWeights = nullptr; -- long* pPixels = nullptr; -- long* pCount = nullptr; -+ std::vector aWeights; -+ std::vector aPixels; -+ std::vector aCounts; - long aNumberOfContributions(0); - - const long nWidth(rSource.GetSizePixel().Width()); -- ImplCalculateContributions(nHeight, nNewHeight, aNumberOfContributions, pWeights, pPixels, pCount, aKernel); -+ ImplCalculateContributions(nHeight, nNewHeight, aNumberOfContributions, aWeights, aPixels, aCounts, aKernel); - rTarget = Bitmap(Size(nWidth, nNewHeight), 24); - Bitmap::ScopedWriteAccess pWriteAcc(rTarget); - bool bResult(nullptr != pWriteAcc); -@@ -209,21 +209,21 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc - double aValueGreen(0.0); - double aValueBlue(0.0); - -- for(long j(0); j < pCount[y]; j++) -+ for(long j(0); j < aCounts[y]; j++) - { - const long aIndex(aBaseIndex + j); -- const double aWeight(pWeights[aIndex]); -+ const double aWeight(aWeights[aIndex]); - BitmapColor aColor; - - aSum += aWeight; - - if(pReadAcc->HasPalette()) - { -- aColor = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(pPixels[aIndex], x)); -+ aColor = pReadAcc->GetPaletteColor(pReadAcc->GetPixelIndex(aPixels[aIndex], x)); - } - else - { -- aColor = pReadAcc->GetPixel(pPixels[aIndex], x); -+ aColor = pReadAcc->GetPixel(aPixels[aIndex], x); - } - - aValueRed += aWeight * aColor.GetRed(); -@@ -248,9 +248,9 @@ bool ImplScaleConvolutionVer(Bitmap& rSource, Bitmap& rTarget, const double& rSc - } - } - -- delete[] pWeights; -- delete[] pCount; -- delete[] pPixels; -+ aWeights.clear(); -+ aCounts.clear(); -+ aPixels.clear(); - - if(bResult) - { -diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx -index b509f6059737..70225ce146c9 100644 ---- a/vcl/source/gdi/bitmap3.cxx -+++ b/vcl/source/gdi/bitmap3.cxx -@@ -2127,7 +2127,9 @@ bool Bitmap::Adjust( short nLuminancePercent, short nContrastPercent, - return bRet; - } - --bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess const * pReadAcc, int aNumberOfContributions, const double* pWeights, int const * pPixels, const int* pCount) -+bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess const * pReadAcc, int aNumberOfContributions, -+ const std::vector& rWeights, const std::vector& rPixels, -+ const std::vector& rCounts) - { - if (!pReadAcc) - return false; -@@ -2153,12 +2155,12 @@ bool Bitmap::ImplConvolutionPass(Bitmap& aNewBitmap, BitmapReadAccess const * pR - aBaseIndex = nSourceX * aNumberOfContributions; - aSum = aValueRed = aValueGreen = aValueBlue = 0.0; - -- for (int j = 0; j < pCount[nSourceX]; ++j) -+ for (int j = 0; j < rCounts[nSourceX]; ++j) - { - aIndex = aBaseIndex + j; -- aSum += aWeight = pWeights[ aIndex ]; -+ aSum += aWeight = rWeights[ aIndex ]; - -- aColor = pReadAcc->GetColor(nSourceY, pPixels[aIndex]); -+ aColor = pReadAcc->GetColor(nSourceY, rPixels[aIndex]); - - aValueRed += aWeight * aColor.GetRed(); - aValueGreen += aWeight * aColor.GetGreen(); -diff --git a/vcl/source/gdi/bitmap4.cxx b/vcl/source/gdi/bitmap4.cxx -index d5e995770993..28bd9fab7f3f 100644 ---- a/vcl/source/gdi/bitmap4.cxx -+++ b/vcl/source/gdi/bitmap4.cxx -@@ -1042,10 +1042,10 @@ bool Bitmap::ImplPopArt() - return bRet; - } - --double* MakeBlurKernel(const double radius, int& rows) { -+std::vector MakeBlurKernel(const double radius, int& rows) { - int intRadius = (int) radius + 1.0; - rows = intRadius * 2 + 1; -- double* matrix = new double[rows]; -+ std::vector matrix(rows); - - double sigma = radius / 3; - double radius2 = radius * radius; -@@ -1064,11 +1064,12 @@ double* MakeBlurKernel(const double radius, int& rows) { - } - - void Bitmap::ImplBlurContributions( const int aSize, const int aNumberOfContributions, -- const double* pBlurVector, double*& pWeights, int*& pPixels, int*& pCount ) -+ const std::vector& rBlurVector, -+ std::vector& rWeights, std::vector& rPixels, std::vector& rCounts) - { -- pWeights = new double[ aSize*aNumberOfContributions ]; -- pPixels = new int[ aSize*aNumberOfContributions ]; -- pCount = new int[ aSize ]; -+ rWeights.resize(aSize*aNumberOfContributions); -+ rPixels.resize(aSize*aNumberOfContributions); -+ rCounts.resize(aSize); - - int aLeft, aRight, aCurrentCount, aPixelIndex; - double aWeight; -@@ -1080,7 +1081,7 @@ void Bitmap::ImplBlurContributions( const int aSize, const int aNumberOfContribu - aCurrentCount = 0; - for ( int j = aLeft; j <= aRight; j++ ) - { -- aWeight = pBlurVector[aCurrentCount]; -+ aWeight = rBlurVector[aCurrentCount]; - - // Mirror edges - if (j < 0) -@@ -1102,12 +1103,12 @@ void Bitmap::ImplBlurContributions( const int aSize, const int aNumberOfContribu - aWeight = 0.0; - } - -- pWeights[ i*aNumberOfContributions + aCurrentCount ] = aWeight; -- pPixels[ i*aNumberOfContributions + aCurrentCount ] = aPixelIndex; -+ rWeights[ i*aNumberOfContributions + aCurrentCount ] = aWeight; -+ rPixels[ i*aNumberOfContributions + aCurrentCount ] = aPixelIndex; - - aCurrentCount++; - } -- pCount[ i ] = aCurrentCount; -+ rCounts[ i ] = aCurrentCount; - } - } - -@@ -1126,31 +1127,31 @@ bool Bitmap::ImplSeparableBlurFilter(const double radius) - - // Prepare Blur Vector - int aNumberOfContributions; -- double* pBlurVector = MakeBlurKernel(radius, aNumberOfContributions); -+ std::vector aBlurVector(MakeBlurKernel(radius, aNumberOfContributions)); - -- double* pWeights; -- int* pPixels; -- int* pCount; -+ std::vector aWeights; -+ std::vector aPixels; -+ std::vector aCounts; - - // Do horizontal filtering -- ImplBlurContributions( nWidth, aNumberOfContributions, pBlurVector, pWeights, pPixels, pCount); -+ ImplBlurContributions( nWidth, aNumberOfContributions, aBlurVector, aWeights, aPixels, aCounts); - - ScopedReadAccess pReadAcc(*this); - - // switch coordinates as convolution pass transposes result - Bitmap aNewBitmap( Size( nHeight, nWidth ), 24 ); - -- bool bResult = ImplConvolutionPass( aNewBitmap, pReadAcc.get(), aNumberOfContributions, pWeights, pPixels, pCount ); -+ bool bResult = ImplConvolutionPass( aNewBitmap, pReadAcc.get(), aNumberOfContributions, aWeights, aPixels, aCounts ); - - // Cleanup - pReadAcc.reset(); -- delete[] pWeights; -- delete[] pPixels; -- delete[] pCount; -+ aWeights.clear(); -+ aPixels.clear(); -+ aCounts.clear(); - - if ( !bResult ) - { -- delete[] pBlurVector; -+ aBlurVector.clear(); - return bResult; - } - -@@ -1158,18 +1159,18 @@ bool Bitmap::ImplSeparableBlurFilter(const double radius) - ImplAssignWithSize( aNewBitmap ); - - // Do vertical filtering -- ImplBlurContributions(nHeight, aNumberOfContributions, pBlurVector, pWeights, pPixels, pCount ); -+ ImplBlurContributions(nHeight, aNumberOfContributions, aBlurVector, aWeights, aPixels, aCounts ); - - pReadAcc = ScopedReadAccess(*this); - aNewBitmap = Bitmap( Size( nWidth, nHeight ), 24 ); -- bResult = ImplConvolutionPass( aNewBitmap, pReadAcc.get(), aNumberOfContributions, pWeights, pPixels, pCount ); -+ bResult = ImplConvolutionPass( aNewBitmap, pReadAcc.get(), aNumberOfContributions, aWeights, aPixels, aCounts ); - - // Cleanup - pReadAcc.reset(); -- delete[] pWeights; -- delete[] pCount; -- delete[] pPixels; -- delete[] pBlurVector; -+ aWeights.clear(); -+ aCounts.clear(); -+ aPixels.clear(); -+ aBlurVector.clear(); - - if ( !bResult ) - return bResult; -diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx -index 58711a9d862b..f6eea9242327 100644 ---- a/vcl/source/gdi/pdfwriter_impl.cxx -+++ b/vcl/source/gdi/pdfwriter_impl.cxx -@@ -6337,6 +6337,7 @@ void PDFWriterImpl::drawRelief( SalLayout& rLayout, const OUString& rText, bool - aTextLineColor = Color( COL_WHITE ); - if( aOverlineColor == COL_BLACK ) - aOverlineColor = Color( COL_WHITE ); -+ // coverity[copy_paste_error] - aReliefColor depending on aTextColor is correct - if( aTextColor == COL_WHITE ) - aReliefColor = Color( COL_BLACK ); - -diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx -index a1195dbde18a..b89e7ea4832c 100644 ---- a/vcl/unx/generic/plugadapt/salplug.cxx -+++ b/vcl/unx/generic/plugadapt/salplug.cxx -@@ -127,6 +127,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals - SAL_INFO("vcl.plugadapt", "could not load shared object " << aModule); - } - -+ // coverity[leaked_storage] - this is on purpose - return pInst; - } - -diff --git a/wizards/com/sun/star/wizards/agenda/TopicsControl.py b/wizards/com/sun/star/wizards/agenda/TopicsControl.py -index cc42aa95552a..6ba529c1428f 100644 ---- a/wizards/com/sun/star/wizards/agenda/TopicsControl.py -+++ b/wizards/com/sun/star/wizards/agenda/TopicsControl.py -@@ -458,8 +458,9 @@ class TopicsControl(ControlScroller): - - def rowDown(self, guiRow=None, control=None): - try: -- if guiRow is None and control is None: -+ if guiRow is None: - guiRow = self.lastFocusRow - self.nscrollvalue -+ if control is None: - control = self.lastFocusControl - # only perform if this is not the last row. - actuallRow = guiRow + self.nscrollvalue -@@ -490,8 +491,9 @@ class TopicsControl(ControlScroller): - - def rowUp(self, guiRow=None, control=None): - try: -- if guiRow is None and control is None: -+ if guiRow is None: - guiRow = self.lastFocusRow - self.nscrollvalue -+ if control is None: - control = self.lastFocusControl - # only perform if this is not the first row - actuallRow = guiRow + self.nscrollvalue -diff --git a/wizards/com/sun/star/wizards/document/OfficeDocument.py b/wizards/com/sun/star/wizards/document/OfficeDocument.py -index 3886f1eb1c70..acef6139f737 100644 ---- a/wizards/com/sun/star/wizards/document/OfficeDocument.py -+++ b/wizards/com/sun/star/wizards/document/OfficeDocument.py -@@ -234,7 +234,6 @@ class OfficeDocument(object): - bState = False - - else: -- xComponent.dispose() - bState = True - - return bState --- -2.17.1 - diff --git a/SOURCES/0001-disable-libe-book-support.patch b/SOURCES/0001-disable-libe-book-support.patch index dfb95ea..3f0945a 100644 --- a/SOURCES/0001-disable-libe-book-support.patch +++ b/SOURCES/0001-disable-libe-book-support.patch @@ -15,10 +15,10 @@ Change-Id: Ie915a9bd2acf7f3aeb8b0933252da33c17043bc4 7 files changed, 27 deletions(-) diff --git a/configure.ac b/configure.ac -index ac8dbc5..bb08d21 100644 +index bb17f3e..23d48da 100644 --- a/configure.ac +++ b/configure.ac -@@ -7696,9 +7696,6 @@ libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.5]) +@@ -8326,9 +8326,6 @@ libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.8]) libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1]) @@ -29,10 +29,10 @@ index ac8dbc5..bb08d21 100644 libo_CHECK_SYSTEM_MODULE([libpagemaker],[PAGEMAKER],[libpagemaker-0.0]) diff --git a/external/Module_external.mk b/external/Module_external.mk -index 590e216..8f19768 100644 +index e9d53ee..5bc469f 100644 --- a/external/Module_external.mk +++ b/external/Module_external.mk -@@ -32,7 +32,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ +@@ -31,7 +31,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\ $(call gb_Helper_optional,CPPUNIT,cppunit) \ $(call gb_Helper_optional,CT2N,ct2n) \ $(call gb_Helper_optional,CURL,curl) \ @@ -41,7 +41,7 @@ index 590e216..8f19768 100644 $(call gb_Helper_optional,EPOXY,epoxy) \ $(call gb_Helper_optional,EPUBGEN,libepubgen) \ diff --git a/filter/Configuration_filter.mk b/filter/Configuration_filter.mk -index 7b39020..588fa01 100644 +index 9702332..d250173 100644 --- a/filter/Configuration_filter.mk +++ b/filter/Configuration_filter.mk @@ -346,10 +346,6 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu @@ -67,10 +67,10 @@ index 7b39020..588fa01 100644 MWAW_Text_Document \ Palm_Text_Document \ diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk -index bf605e7..54a702e 100644 +index 2ac6bd1..6585aba 100644 --- a/writerperfect/Library_wpftwriter.mk +++ b/writerperfect/Library_wpftwriter.mk -@@ -48,7 +48,6 @@ $(eval $(call gb_Library_use_libraries,wpftwriter,\ +@@ -51,7 +51,6 @@ $(eval $(call gb_Library_use_libraries,wpftwriter,\ $(eval $(call gb_Library_use_externals,wpftwriter,\ abw \ boost_headers \ @@ -78,7 +78,7 @@ index bf605e7..54a702e 100644 epubgen \ etonyek \ icu_headers \ -@@ -67,7 +66,6 @@ $(eval $(call gb_Library_use_externals,wpftwriter,\ +@@ -71,7 +70,6 @@ $(eval $(call gb_Library_use_externals,wpftwriter,\ $(eval $(call gb_Library_add_exception_objects,wpftwriter,\ writerperfect/source/writer/AbiWordImportFilter \ @@ -87,42 +87,43 @@ index bf605e7..54a702e 100644 writerperfect/source/writer/EPUBExportFilter \ writerperfect/source/writer/EPUBExportUIComponent \ diff --git a/writerperfect/qa/unit/WpftFilterFixture.hxx b/writerperfect/qa/unit/WpftFilterFixture.hxx -index 14ad4ea..63aff41 100644 +index f324781..f42edb0 100644 --- a/writerperfect/qa/unit/WpftFilterFixture.hxx +++ b/writerperfect/qa/unit/WpftFilterFixture.hxx -@@ -27,9 +27,6 @@ - ((minor) > (req_minor) \ - || ((minor) == (req_minor) && ((micro) >= (req_micro))))) +@@ -26,10 +26,6 @@ + || ((major) == (req_major) \ + && ((minor) > (req_minor) || ((minor) == (req_minor) && ((micro) >= (req_micro))))) --#define REQUIRE_EBOOK_VERSION(major, minor, micro) \ -- REQUIRE_VERSION(EBOOK_VERSION_MAJOR, EBOOK_VERSION_MINOR, EBOOK_VERSION_MICRO, major, minor, micro) +-#define REQUIRE_EBOOK_VERSION(major, minor, micro) \ +- REQUIRE_VERSION(EBOOK_VERSION_MAJOR, EBOOK_VERSION_MINOR, EBOOK_VERSION_MICRO, major, minor, \ +- micro) - - #define REQUIRE_ETONYEK_VERSION(major, minor, micro) \ - REQUIRE_VERSION(ETONYEK_VERSION_MAJOR, ETONYEK_VERSION_MINOR, ETONYEK_VERSION_MICRO, major, minor, micro) - + #define REQUIRE_ETONYEK_VERSION(major, minor, micro) \ + REQUIRE_VERSION(ETONYEK_VERSION_MAJOR, ETONYEK_VERSION_MINOR, ETONYEK_VERSION_MICRO, major, \ + minor, micro) diff --git a/writerperfect/qa/unit/WpftWriterFilterTest.cxx b/writerperfect/qa/unit/WpftWriterFilterTest.cxx -index 515a2b8..3180a99 100644 +index 8bc4c7c..eca43ca 100644 --- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx +++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx -@@ -31,10 +31,6 @@ WpftWriterFilterTest::WpftWriterFilterTest() +@@ -30,9 +30,6 @@ WpftWriterFilterTest::WpftWriterFilterTest() void WpftWriterFilterTest::test() { -- const writerperfect::test::WpftOptionalMap_t aEBookOptional -- { -- {"FictionBook2.fb2.zip", REQUIRE_EBOOK_VERSION(0, 1, 1)}, +- const writerperfect::test::WpftOptionalMap_t aEBookOptional{ +- { "FictionBook2.fb2.zip", REQUIRE_EBOOK_VERSION(0, 1, 1) }, - }; - const writerperfect::test::WpftOptionalMap_t aEtonyekOptional - { - {"Pages_4.pages", REQUIRE_ETONYEK_VERSION(0, 1, 2)}, -@@ -58,7 +54,6 @@ void WpftWriterFilterTest::test() - }; + const writerperfect::test::WpftOptionalMap_t aEtonyekOptional{ + { "Pages_4.pages", REQUIRE_ETONYEK_VERSION(0, 1, 2) }, + { "Pages_5.pages", REQUIRE_ETONYEK_VERSION(0, 1, 8) }, +@@ -54,8 +51,6 @@ void WpftWriterFilterTest::test() - doTest("com.sun.star.comp.Writer.AbiWordImportFilter", "/writerperfect/qa/unit/data/writer/libabw/"); -- doTest("org.libreoffice.comp.Writer.EBookImportFilter", "/writerperfect/qa/unit/data/writer/libe-book/", aEBookOptional); - doTest("com.sun.star.comp.Writer.MSWorksImportFilter", "/writerperfect/qa/unit/data/writer/libwps/", aWpsOptional); - doTest("com.sun.star.comp.Writer.MWAWImportFilter", "/writerperfect/qa/unit/data/writer/libmwaw/", aMWAWOptional); - doTest("org.libreoffice.comp.Writer.PagesImportFilter", "/writerperfect/qa/unit/data/writer/libetonyek/", aEtonyekOptional); + doTest("com.sun.star.comp.Writer.AbiWordImportFilter", + "/writerperfect/qa/unit/data/writer/libabw/"); +- doTest("org.libreoffice.comp.Writer.EBookImportFilter", +- "/writerperfect/qa/unit/data/writer/libe-book/", aEBookOptional); + doTest("com.sun.star.comp.Writer.MSWorksImportFilter", + "/writerperfect/qa/unit/data/writer/libwps/", aWpsOptional); + doTest("com.sun.star.comp.Writer.MWAWImportFilter", diff --git a/writerperfect/source/writer/wpftwriter.component b/writerperfect/source/writer/wpftwriter.component index 8ab4366..2720023 100644 --- a/writerperfect/source/writer/wpftwriter.component @@ -140,5 +141,5 @@ index 8ab4366..2720023 100644 constructor="org_libreoffice_comp_Writer_PagesImportFilter_get_implementation"> -- -2.14.1 +2.24.1 diff --git a/SOURCES/0001-disble-tip-of-the-day-dialog-by-default.patch b/SOURCES/0001-disble-tip-of-the-day-dialog-by-default.patch new file mode 100644 index 0000000..92faac2 --- /dev/null +++ b/SOURCES/0001-disble-tip-of-the-day-dialog-by-default.patch @@ -0,0 +1,26 @@ +From 005507845c65714b78de36a332a5037f2f4f1a51 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 20 Mar 2020 14:24:05 +0000 +Subject: [PATCH] disble tip-of-the-day dialog by default + +Change-Id: Ie7f0e3fe3dda12c2ec88c376d2b57419253ae5cf +--- + officecfg/registry/schema/org/openoffice/Office/Common.xcs | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +index 6d54c81..04484eb 100644 +--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs ++++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs +@@ -5468,7 +5468,7 @@ + + Determines whether the Tip-Of-The-Day dialog is shown on startup. + +- true ++ false + + + +-- +2.24.1 + diff --git a/SOURCES/0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch b/SOURCES/0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch deleted file mode 100644 index c7aaec8..0000000 --- a/SOURCES/0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch +++ /dev/null @@ -1,74 +0,0 @@ -From 2b69156c43261ceae55eb4d3b644c4c2d73231ba Mon Sep 17 00:00:00 2001 -Message-Id: <2b69156c43261ceae55eb4d3b644c4c2d73231ba.1531843216.git.erack@redhat.com> -From: David Tardon -Date: Tue, 6 Mar 2018 15:17:13 +0100 -Subject: [PATCH] forcepoint: fix out-of-bounds read in ICU -MIME-Version: 1.0 -Content-Type: multipart/mixed; boundary="------------erAck-patch-parts" - -This is a multi-part message in MIME format. ---------------erAck-patch-parts -Content-Type: text/plain; charset=UTF-8; format=fixed -Content-Transfer-Encoding: 8bit - - -Change-Id: I5061d38d0e7df0de9a5c7574d522ce69934e4a24 ---- - external/icu/UnpackedTarball_icu.mk | 1 + - external/icu/ofz4860.patch.2 | 25 +++++++++++++++++++++++++ - 2 files changed, 26 insertions(+) - create mode 100644 external/icu/ofz4860.patch.2 - - ---------------erAck-patch-parts -Content-Type: text/x-patch; name="0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch" -Content-Transfer-Encoding: 8bit -Content-Disposition: attachment; filename="0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch" - -diff --git a/external/icu/UnpackedTarball_icu.mk b/external/icu/UnpackedTarball_icu.mk -index 499650976a55..a4d0b16ecb36 100644 ---- a/external/icu/UnpackedTarball_icu.mk -+++ b/external/icu/UnpackedTarball_icu.mk -@@ -35,6 +35,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,icu,\ - $(if $(filter-out ANDROID,$(OS)),external/icu/icu4c-icudata-stdlibs.patch.1) \ - external/icu/icu4c-khmerbreakengine.patch.1 \ - external/icu/icu4c-59-werror-shadow.patch.1 \ -+ external/icu/ofz4860.patch.2 \ - )) - - $(eval $(call gb_UnpackedTarball_add_file,icu,source/data/brkitr/khmerdict.dict,external/icu/khmerdict.dict)) -diff --git a/external/icu/ofz4860.patch.2 b/external/icu/ofz4860.patch.2 -new file mode 100644 -index 000000000000..14114d52878b ---- /dev/null -+++ b/external/icu/ofz4860.patch.2 -@@ -0,0 +1,25 @@ -+From 529ba01ee606940ca273b187be8ce9ba31cf2d90 Mon Sep 17 00:00:00 2001 -+From: David Tardon -+Date: Fri, 19 Jan 2018 10:41:02 +0100 -+Subject: [PATCH] ofz#4860 fix past-the-end read from array -+ -+--- -+ icu4c/source/common/locmap.cpp | 2 +- -+ 1 file changed, 1 insertion(+), 1 deletion(-) -+ -+diff --git a/icu4c/source/common/locmap.cpp b/icu4c/source/common/locmap.cpp -+index cbb2b810a..6d62d8310 100644 -+--- a/icu4c/source/common/locmap.cpp -++++ b/icu4c/source/common/locmap.cpp -+@@ -1015,7 +1015,7 @@ static const char* -+ getPosixID(const ILcidPosixMap *this_0, uint32_t hostID) -+ { -+ uint32_t i; -+- for (i = 0; i <= this_0->numRegions; i++) -++ for (i = 0; i < this_0->numRegions; i++) -+ { -+ if (this_0->regionMaps[i].hostID == hostID) -+ { -+-- -+2.14.3 -+ - ---------------erAck-patch-parts-- - - diff --git a/SOURCES/0001-gtk3-only-for-3.20.patch b/SOURCES/0001-gtk3-only-for-3.20.patch deleted file mode 100644 index f7ef00c..0000000 --- a/SOURCES/0001-gtk3-only-for-3.20.patch +++ /dev/null @@ -1,26 +0,0 @@ -From cd928ec49d4bcf8f9736c3a07ccd1b3fd5df6ad8 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Mon, 25 Sep 2017 11:20:34 +0100 -Subject: [PATCH] gtk3 only for >= 3.20 - -Change-Id: I98008c0028ed5d85fe8770197078360de70010a8 ---- - vcl/unx/gtk/gtkinst.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx -index e01a267b..7237b6c 100644 ---- a/vcl/unx/gtk/gtkinst.cxx -+++ b/vcl/unx/gtk/gtkinst.cxx -@@ -82,7 +82,7 @@ extern "C" - XInitThreads(); - - #if GTK_CHECK_VERSION(3,0,0) -- if (gtk_minor_version < 14) -+ if (gtk_minor_version < 20) - { - g_warning("require a newer gtk than 3.%d for theme expectations", gtk_minor_version); - return nullptr; --- -2.9.5 - diff --git a/SOURCES/0001-implement-pdf-export-of-underline-for-outlined-font.patch b/SOURCES/0001-implement-pdf-export-of-underline-for-outlined-font.patch deleted file mode 100644 index c91806c..0000000 --- a/SOURCES/0001-implement-pdf-export-of-underline-for-outlined-font.patch +++ /dev/null @@ -1,48 +0,0 @@ -From d01b115cb9db9200900f78d614d220b6bec1eb7d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 20 Jul 2018 14:49:17 +0100 -Subject: [PATCH] implement pdf export of underline for outlined font - -just the simplest case of a straight solid line which is outlined, -i.e. border in font color and filled with white - -Change-Id: I7d670a543475b6457cb2827e74a05bba6c4a91ea ---- - vcl/source/gdi/pdfwriter_impl.cxx | 21 +++++++++++++++++++++ - 1 file changed, 21 insertions(+) - -diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx -index 58711a9d862b..bf932ad17ef8 100644 ---- a/vcl/source/gdi/pdfwriter_impl.cxx -+++ b/vcl/source/gdi/pdfwriter_impl.cxx -@@ -7384,6 +7384,27 @@ void PDFWriterImpl::drawStraightTextLine( OStringBuffer& aLine, long nWidth, Fon - if ( !nLineHeight ) - return; - -+ // outline attribute ? -+ if (m_aCurrentPDFState.m_aFont.IsOutline() && eTextLine == LINESTYLE_SINGLE) -+ { -+ appendStrokingColor(aColor, aLine); // stroke with text color -+ aLine.append( " " ); -+ Color aNonStrokeColor(COL_WHITE); // fill with white -+ appendNonStrokingColor(aNonStrokeColor, aLine); -+ aLine.append( "\n" ); -+ aLine.append( "0.25 w \n" ); // same line thickness as in drawLayout -+ -+ // draw rectangle instead -+ aLine.append( "0 " ); -+ m_aPages.back().appendMappedLength( static_cast(-nLinePos * 1.5), aLine ); -+ aLine.append( " " ); -+ m_aPages.back().appendMappedLength( static_cast(nWidth), aLine, false ); -+ aLine.append( ' ' ); -+ m_aPages.back().appendMappedLength( static_cast(nLineHeight), aLine ); -+ aLine.append( " re h B\n" ); -+ return; -+ } -+ - m_aPages.back().appendMappedLength( (sal_Int32)nLineHeight, aLine ); - aLine.append( " w " ); - appendStrokingColor( aColor, aLine ); --- -2.17.0 - diff --git a/SOURCES/0001-keep-pyuno-script-processing-below-base-uri.patch b/SOURCES/0001-keep-pyuno-script-processing-below-base-uri.patch deleted file mode 100644 index 3cfce72..0000000 --- a/SOURCES/0001-keep-pyuno-script-processing-below-base-uri.patch +++ /dev/null @@ -1,70 +0,0 @@ -From 14c85889616de301e3a214c49fff2e6da3327d1f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Thu, 18 Oct 2018 20:39:23 +0100 -Subject: [PATCH] keep pyuno script processing below base uri -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: Icc13fb7193fb1e7c50e0df286161a10b4ed636c7 -Reviewed-on: https://gerrit.libreoffice.org/61970 -Reviewed-by: Stephan Bergmann -Reviewed-by: Thorsten Behrens -Reviewed-by: Michael Stahl -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara ---- - scripting/source/pyprov/pythonscript.py | 30 +++++++++++++++++++++++-- - 1 file changed, 28 insertions(+), 2 deletions(-) - -diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py -index 4803d0bebc23..f5aa2173333a 100644 ---- a/scripting/source/pyprov/pythonscript.py -+++ b/scripting/source/pyprov/pythonscript.py -@@ -25,6 +25,7 @@ import imp - import time - import ast - import platform -+from com.sun.star.uri.RelativeUriExcessParentSegments import RETAIN - - try: - unicode -@@ -212,8 +213,33 @@ class MyUriHelper: - - def scriptURI2StorageUri( self, scriptURI ): - try: -- myUri = self.m_uriRefFac.parse(scriptURI) -- ret = self.m_baseUri + "/" + myUri.getName().replace( "|", "/" ) -+ # base path to the python script location -+ sBaseUri = self.m_baseUri + "/" -+ xBaseUri = self.m_uriRefFac.parse(sBaseUri) -+ -+ # path to the .py file + "$functionname, arguments, etc -+ xStorageUri = self.m_uriRefFac.parse(scriptURI) -+ sStorageUri = xStorageUri.getName().replace( "|", "/" ); -+ -+ # path to the .py file, relative to the base -+ sFileUri = sStorageUri[0:sStorageUri.find("$")] -+ xFileUri = self.m_uriRefFac.parse(sFileUri) -+ if not xFileUri: -+ message = "pythonscript: invalid relative uri '" + sFileUri+ "'" -+ log.debug( message ) -+ raise RuntimeException( message ) -+ -+ # absolute path to the .py file -+ xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, True, RETAIN) -+ sAbsScriptUri = xAbsScriptUri.getUriReference() -+ -+ # ensure py file is under the base path -+ if not sAbsScriptUri.startswith(sBaseUri): -+ message = "pythonscript: storage uri '" + sAbsScriptUri + "' not in base uri '" + self.m_baseUri + "'" -+ log.debug( message ) -+ raise RuntimeException( message ) -+ -+ ret = sBaseUri + sStorageUri - log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + ret ) - return ret - except UnoException as e: --- -2.20.1 - diff --git a/SOURCES/0001-limit-forms-to-http-s.patch b/SOURCES/0001-limit-forms-to-http-s.patch new file mode 100644 index 0000000..f127ca7 --- /dev/null +++ b/SOURCES/0001-limit-forms-to-http-s.patch @@ -0,0 +1,48 @@ +From 5d101a65c31e6c2f8dd0edffe05f69055cbd481c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 11 May 2020 20:46:43 +0100 +Subject: [PATCH] limit forms to http[s] + +Change-Id: I3ed0bc626f693ec03f610dc7361f93cad914c9d8 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93993 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + forms/source/xforms/submission.cxx | 3 +++ + forms/source/xforms/submission/submission.hxx | 6 ++++++ + 2 files changed, 9 insertions(+) + +diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx +index f20b72f11973..7e8517e89481 100644 +--- a/forms/source/xforms/submission.cxx ++++ b/forms/source/xforms/submission.cxx +@@ -253,6 +253,9 @@ bool Submission::doSubmit( const Reference< XInteractionHandler >& xHandler ) + return false; + } + ++ if (!xSubmission->IsWebProtocol()) ++ return false; ++ + CSubmission::SubmissionResult aResult = xSubmission->submit( xHandler ); + + if (aResult == CSubmission::SUCCESS) +diff --git a/forms/source/xforms/submission/submission.hxx b/forms/source/xforms/submission/submission.hxx +index 77d59b1f740e..a459f471ba0d 100644 +--- a/forms/source/xforms/submission/submission.hxx ++++ b/forms/source/xforms/submission/submission.hxx +@@ -126,6 +126,12 @@ public: + , m_xContext(::comphelper::getProcessComponentContext()) + {} + ++ bool IsWebProtocol() const ++ { ++ INetProtocol eProtocol = m_aURLObj.GetProtocol(); ++ return eProtocol == INetProtocol::Http || eProtocol == INetProtocol::Https; ++ } ++ + virtual ~CSubmission() {} + + virtual SubmissionResult submit(const css::uno::Reference< css::task::XInteractionHandler >& ) = 0; +-- +2.25.4 + diff --git a/SOURCES/0001-request-installation-of-langpack-via-packagekit.patch b/SOURCES/0001-request-installation-of-langpack-via-packagekit.patch deleted file mode 100644 index f74c057..0000000 --- a/SOURCES/0001-request-installation-of-langpack-via-packagekit.patch +++ /dev/null @@ -1,946 +0,0 @@ -From 44686bc81055c7bee7f41f9e219c35115ce8119f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Wed, 20 Dec 2017 15:29:39 +0000 -Subject: [PATCH] request installation of langpack via packagekit -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -if ui is set to track the locale automatically and the current locale -has no match in installed resources but has a match in the list of -languages that libreoffice was compiled to contain - -so e.g. de_AT locale shouldn't trigger the installation of anything if -langpack-de is already installed and yue_HK shouldn't trigger install -of anything cause that not supported (at time of writing) for libreoffice - -put Fedora/RHEL/Ubuntu naming schemes in here. - -I moved the lang code from svl to svtools so I could use the restart dialog -to prompt to restart after the langpack is installed, but packagekit's blocking -mode seems to be no longer blocking and control returns immediately which is a -change since the last time I played with this stuff, so drop the restart thing -for now. The lack of a blocking modal also makes the "run this on idle when there's -a toplevel window up and running" a bit futile, but lets keep that for now anyway. - -also... - -set dbus id for existing DbusSessionHelper users - -Change-Id: I64329e21ae79b6607856de9781bee0274b9cb136 -Reviewed-on: https://gerrit.libreoffice.org/46854 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 7cf4eeed81fd333c87dedffa792f5d547b7981f0) - -Change-Id: Ice731be539850338ccdd8af87839e0b4d83f01e7 ---- - config_host/config_langs.h.in | 10 ++ - config_host/config_vendor.h.in | 10 ++ - configure.ac | 4 + - cui/source/options/optgdlg.cxx | 3 +- - desktop/source/app/langselect.cxx | 3 +- - include/svl/languageoptions.hxx | 3 - - include/svtools/langhelp.hxx | 3 + - offapi/org/freedesktop/PackageKit/XModify.idl | 22 ++-- - .../registry/data/org/openoffice/Office/Common.xcu | 3 + - .../schema/org/openoffice/Office/Common.xcs | 6 + - sfx2/source/appl/appserv.cxx | 3 +- - .../sessioninstall/SyncDbusSessionHelper.cxx | 57 +++++---- - .../sessioninstall/SyncDbusSessionHelper.hxx | 20 ++-- - svl/source/config/languageoptions.cxx | 33 ------ - svtools/source/misc/langhelp.cxx | 130 ++++++++++++++++++++- - sw/source/uibase/app/apphdl.cxx | 3 +- - vcl/inc/unx/fontmanager.hxx | 6 +- - vcl/unx/generic/fontmanager/fontconfig.cxx | 93 ++------------- - vcl/unx/generic/fontmanager/fontmanager.cxx | 2 - - 19 files changed, 235 insertions(+), 179 deletions(-) - create mode 100644 config_host/config_langs.h.in - create mode 100644 config_host/config_vendor.h.in - -diff --git a/config_host/config_langs.h.in b/config_host/config_langs.h.in -new file mode 100644 -index 0000000..d60a5c1 ---- /dev/null -+++ b/config_host/config_langs.h.in -@@ -0,0 +1,10 @@ -+/* Configuration of restriction on supported ui languages, by the -+ * --with-lang option. -+ */ -+ -+#ifndef CONFIG_LANGS_H -+#define CONFIG_LANGS_H -+ -+#define WITH_LANG "" -+ -+#endif -diff --git a/config_host/config_vendor.h.in b/config_host/config_vendor.h.in -new file mode 100644 -index 0000000..3260221 ---- /dev/null -+++ b/config_host/config_vendor.h.in -@@ -0,0 +1,10 @@ -+/* Configuration of restriction on supported ui languages, by the -+ * --with-lang option. -+ */ -+ -+#ifndef CONFIG_VENDOR_H -+#define CONFIG_VENDOR_H -+ -+#define OOO_VENDOR "" -+ -+#endif -diff --git a/configure.ac b/configure.ac -index bbb47e6..55e2aa0 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -11777,6 +11777,7 @@ if test "$enable_release_build" = "" -o "$enable_release_build" = "no"; then - ALL_LANGS=`echo $ALL_LANGS qtz` - fi - AC_SUBST(ALL_LANGS) -+AC_DEFINE_UNQUOTED(WITH_LANG,"$WITH_LANG") - AC_SUBST(WITH_LANG) - AC_SUBST(WITH_LANG_LIST) - AC_SUBST(GIT_NEEDED_SUBMODULES) -@@ -11925,6 +11926,7 @@ else - OOO_VENDOR="$with_vendor" - AC_MSG_RESULT([$OOO_VENDOR]) - fi -+AC_DEFINE_UNQUOTED(OOO_VENDOR,"$OOO_VENDOR") - AC_SUBST(OOO_VENDOR) - - if test "$_os" = "Android" ; then -@@ -12538,6 +12540,7 @@ AC_CONFIG_HEADERS([config_host/config_gio.h]) - AC_CONFIG_HEADERS([config_host/config_global.h]) - AC_CONFIG_HEADERS([config_host/config_gpgme.h]) - AC_CONFIG_HEADERS([config_host/config_java.h]) -+AC_CONFIG_HEADERS([config_host/config_langs.h]) - AC_CONFIG_HEADERS([config_host/config_lgpl.h]) - AC_CONFIG_HEADERS([config_host/config_liblangtag.h]) - AC_CONFIG_HEADERS([config_host/config_locales.h]) -@@ -12549,6 +12552,7 @@ AC_CONFIG_HEADERS([config_host/config_options.h]) - AC_CONFIG_HEADERS([config_host/config_options_calc.h]) - AC_CONFIG_HEADERS([config_host/config_test.h]) - AC_CONFIG_HEADERS([config_host/config_typesizes.h]) -+AC_CONFIG_HEADERS([config_host/config_vendor.h]) - AC_CONFIG_HEADERS([config_host/config_vcl.h]) - AC_CONFIG_HEADERS([config_host/config_vclplug.h]) - AC_CONFIG_HEADERS([config_host/config_version.h]) -diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx -index 1c90931..7965179 100644 ---- a/cui/source/options/optgdlg.cxx -+++ b/cui/source/options/optgdlg.cxx -@@ -21,6 +21,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1122,7 +1123,7 @@ namespace - LanguageTag GetInstalledLocaleForSystemUILanguage() - { - css::uno::Sequence inst(officecfg::Setup::Office::InstalledLocales::get()->getElementNames()); -- return LanguageTag(getInstalledLocaleForSystemUILanguage(inst)).makeFallback(); -+ return LanguageTag(getInstalledLocaleForSystemUILanguage(inst, false)).makeFallback(); - } - } - -diff --git a/desktop/source/app/langselect.cxx b/desktop/source/app/langselect.cxx -index 4ce877a..86ce743 100644 ---- a/desktop/source/app/langselect.cxx -+++ b/desktop/source/app/langselect.cxx -@@ -37,6 +37,7 @@ - #include - #include - #include -+#include - - #include - -@@ -103,7 +104,7 @@ bool prepareLocale() { - } - } - if (locale.isEmpty()) { -- locale = getInstalledLocaleForSystemUILanguage(inst); -+ locale = getInstalledLocaleForSystemUILanguage(inst, true); - } - if (locale.isEmpty()) { - return false; -diff --git a/include/svl/languageoptions.hxx b/include/svl/languageoptions.hxx -index f386cb6..6de8eb5 100644 ---- a/include/svl/languageoptions.hxx -+++ b/include/svl/languageoptions.hxx -@@ -131,9 +131,6 @@ public: - bool isCJKKeyboardLayoutInstalled() const; - }; - --OUString SVL_DLLPUBLIC getInstalledLocaleForLanguage(css::uno::Sequence const & installed, OUString const & locale); --OUString SVL_DLLPUBLIC getInstalledLocaleForSystemUILanguage(css::uno::Sequence const & installed); -- - #endif // INCLUDED_SVL_LANGUAGEOPTIONS_HXX - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/include/svtools/langhelp.hxx b/include/svtools/langhelp.hxx -index a3a84df..db22bb3 100644 ---- a/include/svtools/langhelp.hxx -+++ b/include/svtools/langhelp.hxx -@@ -22,6 +22,9 @@ - */ - SVT_DLLPUBLIC void localizeWebserviceURI( OUString& io_rURI ); - -+OUString SVT_DLLPUBLIC getInstalledLocaleForLanguage(css::uno::Sequence const & installed, OUString const & locale); -+OUString SVT_DLLPUBLIC getInstalledLocaleForSystemUILanguage(css::uno::Sequence const & installed, bool bRequestInstallIfMissing); -+ - #endif - - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/offapi/org/freedesktop/PackageKit/XModify.idl b/offapi/org/freedesktop/PackageKit/XModify.idl -index a712bb5..69544e9 100644 ---- a/offapi/org/freedesktop/PackageKit/XModify.idl -+++ b/offapi/org/freedesktop/PackageKit/XModify.idl -@@ -22,7 +22,7 @@ module PackageKit - * The interface used for modifying the package database. - * - * @sa -- * https://git.gnome.org/browse/gnome-software/tree/src/org.freedesktop.PackageKit.xml -+ * https://git.gnome.org/browse/gnome-software/tree/src/org.freedesktop.PackageKit.Modify2.xml - * for documentation of the corresponding D-Bus interface - */ - interface XModify : com::sun::star::uno::XInterface -@@ -32,70 +32,70 @@ interface XModify : com::sun::star::uno::XInterface - * @since LibreOffice 4.0 - */ - -- void InstallPackageFiles( [in] unsigned long xid, [in] sequence< string > files, [in] string interaction); -+ void InstallPackageFiles([in] sequence< string > files, [in] string interaction); - - /** - * Installs sequence< string > packages to provide sequence< string > files. - * @since LibreOffice 4.0 - */ - -- void InstallProvideFiles( [in] unsigned long xid, [in] sequence< string > files, [in] string interaction); -+ void InstallProvideFiles([in] sequence< string > files, [in] string interaction); - - /** - * Installs sequence< string > packages to provide sequence< string > files. - * @since LibreOffice 4.0 - */ - -- void InstallCatalogs( [in] unsigned long xid, [in] sequence< string > files, [in] string interaction); -+ void InstallCatalogs([in] sequence< string > files, [in] string interaction); - - /** - * Installs sequence< string > packages from a configured software source. - * @since LibreOffice 4.0 - */ - -- void InstallPackageNames( [in] unsigned long xid, [in] sequence< string > packages, [in] string interaction); -+ void InstallPackageNames([in] sequence< string > packages, [in] string interaction); - - /** - * Installs mimetype handlers from a configured software source. - * @since LibreOffice 4.0 - */ - -- void InstallMimeTypes( [in] unsigned long xid, [in] sequence< string > mimeTypes, [in] string interaction); -+ void InstallMimeTypes([in] sequence< string > mimeTypes, [in] string interaction); - - /** - * Installs fontconfig resources ( [in] usually fonts) from a configured software source. - * @since LibreOffice 4.0 - */ - -- void InstallFontconfigResources( [in] unsigned long xid, [in] sequence< string > resources, [in] string interaction); -+ void InstallFontconfigResources([in] sequence< string > resources, [in] string interaction); - - /** - * Installs GStreamer resources ( [in] usually codecs) from a configured software source. - * @since LibreOffice 4.0 - */ - -- void InstallGStreamerResources( [in] unsigned long xid, [in] sequence< string > resources, [in] string interaction); -+ void InstallGStreamerResources([in] sequence< string > resources, [in] string interaction); - - /** - * Installs resources of a given type from a configured software source. - * @since LibreOffice 4.0 - */ - -- void InstallResources( [in] unsigned long xid, [in] sequence< string > types, [in] sequence< string > resources, [in] string interaction); -+ void InstallResources([in] sequence< string > types, [in] sequence< string > resources, [in] string interaction); - - /** - * Removes sequence< string > packages that provide the given local sequence< string > files. - * @since LibreOffice 4.0 - */ - -- void RemovePackageByFiles( [in] unsigned long xid, [in] sequence< string > files, [in] string interaction); -+ void RemovePackageByFiles([in] sequence< string > files, [in] string interaction); - - /** - * Installs printer drivers from a configured software source. - * @since LibreOffice 4.0 - */ - -- void InstallPrinterDrivers( [in] unsigned long xid, [in] sequence< string > files, [in] string interaction); -+ void InstallPrinterDrivers([in] sequence< string > files, [in] string interaction); - }; - - } ; // PackageKit -diff --git a/officecfg/registry/data/org/openoffice/Office/Common.xcu b/officecfg/registry/data/org/openoffice/Office/Common.xcu -index 6b94ff9..26d1ba0 100644 ---- a/officecfg/registry/data/org/openoffice/Office/Common.xcu -+++ b/officecfg/registry/data/org/openoffice/Office/Common.xcu -@@ -535,6 +535,9 @@ - - true - -+ -+ true -+ - - - -diff --git a/officecfg/registry/schema/org/openoffice/Office/Common.xcs b/officecfg/registry/schema/org/openoffice/Office/Common.xcs -index f9816fc..2884179 100644 ---- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs -+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs -@@ -6382,6 +6382,12 @@ - - true - -+ -+ -+ Specifies if missing langpack installation should be triggered. -+ -+ true -+ - - - -diff --git a/sfx2/source/appl/appserv.cxx b/sfx2/source/appl/appserv.cxx -index 1e2a2ec..e48e5aa 100644 ---- a/sfx2/source/appl/appserv.cxx -+++ b/sfx2/source/appl/appserv.cxx -@@ -59,6 +59,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -196,7 +197,7 @@ namespace - using namespace svtools; - Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); - Sequence< OUString > vPackages { "libreoffice-base" }; -- xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, OUString()); -+ xSyncDbusSessionHelper->InstallPackageNames(vPackages, OUString()); - // Ill be back (hopefully)! - SolarMutexGuard aGuard; - executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_BIBLIOGRAPHY_INSTALL); -diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx -index a1211f7..1938077 100644 ---- a/shell/source/sessioninstall/SyncDbusSessionHelper.cxx -+++ b/shell/source/sessioninstall/SyncDbusSessionHelper.cxx -@@ -18,7 +18,7 @@ using namespace ::com::sun::star::uno; - - namespace - { -- struct GVariantDeleter { void operator()(GVariant* pV) { g_variant_unref(pV); } }; -+ struct GVariantDeleter { void operator()(GVariant* pV) { if (pV) g_variant_unref(pV); } }; - struct GVariantBuilderDeleter { void operator()(GVariantBuilder* pVB) { g_variant_builder_unref(pVB); } }; - template struct GObjectDeleter { void operator()(T* pO) { g_object_unref(pO); } }; - class GErrorWrapper -@@ -55,8 +55,15 @@ namespace - return proxy; - } - -+ static GVariant* pk_make_platform_data() -+ { -+ GVariantBuilder builder; -+ g_variant_builder_init(&builder, G_VARIANT_TYPE("a{sv}")); -+ return g_variant_builder_end(&builder); -+ } -+ - void request( -- char const * method, sal_uInt32 xid, -+ char const * method, - css::uno::Sequence const & resources, - OUString const & interaction) - { -@@ -70,14 +77,14 @@ void request( - } - auto iactUtf8(OUStringToOString(interaction, RTL_TEXTENCODING_UTF8)); - std::shared_ptr proxy( -- lcl_GetPackageKitProxy("Modify"), GObjectDeleter()); -+ lcl_GetPackageKitProxy("Modify2"), GObjectDeleter()); - GErrorWrapper error; -- g_dbus_proxy_call_sync( -+ std::shared_ptr result(g_dbus_proxy_call_sync( - proxy.get(), method, - g_variant_new( -- "(uass)", static_cast(xid), builder.get(), -- iactUtf8.getStr()), -- G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &error.getRef()); -+ "(asss@a{sv})", builder.get(), iactUtf8.getStr(), -+ "libreoffice-startcenter.desktop", pk_make_platform_data()), -+ G_DBUS_CALL_FLAGS_NONE, -1, nullptr, &error.getRef()), GVariantDeleter()); - } - - } -@@ -92,66 +99,66 @@ namespace shell { namespace sessioninstall - } - - void SyncDbusSessionHelper::InstallPackageFiles( -- sal_uInt32 xid, css::uno::Sequence const & files, -+ css::uno::Sequence const & files, - OUString const & interaction) - { -- request("InstallPackageFiles", xid, files, interaction); -+ request("InstallPackageFiles", files, interaction); - } - - void SyncDbusSessionHelper::InstallProvideFiles( -- sal_uInt32 xid, css::uno::Sequence const & files, -+ css::uno::Sequence const & files, - OUString const & interaction) - { -- request("InstallProvideFiles", xid, files, interaction); -+ request("InstallProvideFiles", files, interaction); - } - - void SyncDbusSessionHelper::InstallCatalogs( -- sal_uInt32 xid, css::uno::Sequence const & files, -+ css::uno::Sequence const & files, - OUString const & interaction) - { -- request("InstallCatalogs", xid, files, interaction); -+ request("InstallCatalogs", files, interaction); - } - - void SyncDbusSessionHelper::InstallPackageNames( -- sal_uInt32 xid, css::uno::Sequence const & packages, -+ css::uno::Sequence const & packages, - OUString const & interaction) - { -- request("InstallPackageNames", xid, packages, interaction); -+ request("InstallPackageNames", packages, interaction); - } - - void SyncDbusSessionHelper::InstallMimeTypes( -- sal_uInt32 xid, css::uno::Sequence const & mimeTypes, -+ css::uno::Sequence const & mimeTypes, - OUString const & interaction) - { -- request("InstallMimeTypes", xid, mimeTypes, interaction); -+ request("InstallMimeTypes", mimeTypes, interaction); - } - - void SyncDbusSessionHelper::InstallFontconfigResources( -- sal_uInt32 xid, css::uno::Sequence const & resources, -+ css::uno::Sequence const & resources, - OUString const & interaction) - { -- request("InstallFontconfigResources", xid, resources, interaction); -+ request("InstallFontconfigResources", resources, interaction); - } - - void SyncDbusSessionHelper::InstallGStreamerResources( -- sal_uInt32 xid, css::uno::Sequence const & resources, -+ css::uno::Sequence const & resources, - OUString const & interaction) - { -- request("InstallGStreamerResources", xid, resources, interaction); -+ request("InstallGStreamerResources", resources, interaction); - } - - void SyncDbusSessionHelper::RemovePackageByFiles( -- sal_uInt32 xid, css::uno::Sequence const & files, -+ css::uno::Sequence const & files, - OUString const & interaction) - { -- request("RemovePackageByFiles", xid, files, interaction); -+ request("RemovePackageByFiles", files, interaction); - } - - void SyncDbusSessionHelper::InstallPrinterDrivers( -- sal_uInt32 xid, css::uno::Sequence const & files, -+ css::uno::Sequence const & files, - OUString const & interaction) - { -- request("InstallPrinteDrivers", xid, files, interaction); -+ request("InstallPrinteDrivers", files, interaction); - } - - void SAL_CALL SyncDbusSessionHelper::IsInstalled( const OUString& sPackagename, const OUString& sInteraction, sal_Bool& o_isInstalled ) -diff --git a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx -index 731b649..72b17ba 100644 ---- a/shell/source/sessioninstall/SyncDbusSessionHelper.hxx -+++ b/shell/source/sessioninstall/SyncDbusSessionHelper.hxx -@@ -23,26 +23,26 @@ namespace shell { namespace sessioninstall - SyncDbusSessionHelper(css::uno::Reference< css::uno::XComponentContext> const&); - - // XModify Methods -- virtual void SAL_CALL InstallPackageFiles( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallPackageFiles( const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallProvideFiles( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallProvideFiles( const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallCatalogs( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallCatalogs( const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallPackageNames( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& packages, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallPackageNames( const css::uno::Sequence< OUString >& packages, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallMimeTypes( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& mimeTypes, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallMimeTypes( const css::uno::Sequence< OUString >& mimeTypes, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallFontconfigResources( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& resources, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallFontconfigResources( const css::uno::Sequence< OUString >& resources, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallGStreamerResources( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& resources, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallGStreamerResources( const css::uno::Sequence< OUString >& resources, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallResources( ::sal_uInt32 /* xid */, const css::uno::Sequence< OUString >& /* types */, const css::uno::Sequence< OUString >& /* resources */, const OUString& /* interaction */ ) override -+ virtual void SAL_CALL InstallResources( const css::uno::Sequence< OUString >& /* types */, const css::uno::Sequence< OUString >& /* resources */, const OUString& /* interaction */ ) override - { throw css::uno::RuntimeException(); } // not implemented - -- virtual void SAL_CALL RemovePackageByFiles( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; -+ virtual void SAL_CALL RemovePackageByFiles( const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; - -- virtual void SAL_CALL InstallPrinterDrivers( ::sal_uInt32 xid, const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; -+ virtual void SAL_CALL InstallPrinterDrivers( const css::uno::Sequence< OUString >& files, const OUString& interaction ) override; - - // XQuery Methods - virtual void SAL_CALL IsInstalled( const OUString& /* package_name */, const OUString& /* interaction */, sal_Bool& /* installed */ ) override; -diff --git a/svl/source/config/languageoptions.cxx b/svl/source/config/languageoptions.cxx -index 9f9fe45..74af031 100644 ---- a/svl/source/config/languageoptions.cxx -+++ b/svl/source/config/languageoptions.cxx -@@ -27,7 +27,6 @@ - #include - #include - #include --#include - - #ifdef _WIN32 - #if !defined WIN32_LEAN_AND_MEAN -@@ -256,41 +255,9 @@ bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(sal_Int16 scriptTyp - return isInstalled; - } - -- - bool SvtSystemLanguageOptions::isCJKKeyboardLayoutInstalled() const - { - return isKeyboardLayoutTypeInstalled(css::i18n::ScriptType::ASIAN); - } - --OUString getInstalledLocaleForLanguage(css::uno::Sequence const & installed, OUString const & locale) --{ -- if (locale.isEmpty()) -- return OUString(); // do not attempt to resolve anything -- -- for (sal_Int32 i = 0; i != installed.getLength(); ++i) { -- if (installed[i] == locale) { -- return installed[i]; -- } -- } -- std::vector fallbacks(LanguageTag(locale).getFallbackStrings(false)); -- for (OUString & rf : fallbacks) { -- for (sal_Int32 i = 0; i != installed.getLength(); ++i) { -- if (installed[i] == rf) { -- return installed[i]; -- } -- } -- } -- return OUString(); --} -- --OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence& rLocaleElementNames) --{ -- OUString locale = getInstalledLocaleForLanguage(rLocaleElementNames, officecfg::System::L10N::UILocale::get()); -- if (locale.isEmpty()) -- locale = getInstalledLocaleForLanguage(rLocaleElementNames, "en-US"); -- if (locale.isEmpty() && rLocaleElementNames.hasElements()) -- locale = rLocaleElementNames[0]; -- return locale; --} -- - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/svtools/source/misc/langhelp.cxx b/svtools/source/misc/langhelp.cxx -index 16a3a1d..1e4c5c5 100644 ---- a/svtools/source/misc/langhelp.cxx -+++ b/svtools/source/misc/langhelp.cxx -@@ -7,12 +7,20 @@ - * file, You can obtain one at http://mozilla.org/MPL/2.0/. - */ - -- -+#include -+#include -+#include -+#include -+#include -+#include - #include -- -+#include - #include -+#include - #include --#include -+#include -+#include -+#include - - void localizeWebserviceURI( OUString& rURI ) - { -@@ -33,4 +41,120 @@ void localizeWebserviceURI( OUString& rURI ) - rURI += aLang; - } - -+OUString getInstalledLocaleForLanguage(css::uno::Sequence const & installed, OUString const & locale) -+{ -+ if (locale.isEmpty()) -+ return OUString(); // do not attempt to resolve anything -+ -+ for (sal_Int32 i = 0; i != installed.getLength(); ++i) { -+ if (installed[i] == locale) { -+ return installed[i]; -+ } -+ } -+ std::vector fallbacks(LanguageTag(locale).getFallbackStrings(false)); -+ for (OUString & rf : fallbacks) { -+ for (sal_Int32 i = 0; i != installed.getLength(); ++i) { -+ if (installed[i] == rf) { -+ return installed[i]; -+ } -+ } -+ } -+ return OUString(); -+} -+ -+static std::unique_ptr xLangpackInstaller; -+ -+class InstallLangpack : public Idle -+{ -+ std::vector m_aPackages; -+public: -+ explicit InstallLangpack(const std::vector& rPackages) -+ : Idle("install langpack") -+ , m_aPackages(rPackages) -+ { -+ SetPriority(TaskPriority::LOWEST); -+ } -+ -+ virtual void Invoke() override -+ { -+ vcl::Window* pTopWindow = Application::GetActiveTopWindow(); -+ if (!pTopWindow) -+ pTopWindow = Application::GetFirstTopLevelWindow(); -+ if (!pTopWindow) -+ { -+ Start(); -+ return; -+ } -+ try -+ { -+ using namespace org::freedesktop::PackageKit; -+ css::uno::Reference xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); -+ xSyncDbusSessionHelper->InstallPackageNames(comphelper::containerToSequence(m_aPackages), OUString()); -+ } -+ catch (const css::uno::Exception& e) -+ { -+ SAL_INFO("svl", "trying to install a LibreOffice langpack, caught " << e); -+ } -+ xLangpackInstaller.reset(); -+ } -+}; -+ -+OUString getInstalledLocaleForSystemUILanguage(const css::uno::Sequence& rLocaleElementNames, bool bRequestInstallIfMissing) -+{ -+ OUString wantedLocale = officecfg::System::L10N::UILocale::get(); -+ OUString locale = getInstalledLocaleForLanguage(rLocaleElementNames, wantedLocale); -+ if (bRequestInstallIfMissing && locale.isEmpty() && !wantedLocale.isEmpty() && !Application::IsHeadlessModeEnabled() && -+ officecfg::Office::Common::PackageKit::EnableLangpackInstallation::get()) -+ { -+ LanguageTag aWantedTag(wantedLocale); -+ if (aWantedTag.getLanguage() != "en") -+ { -+ // We try these bases + the exact locale + fallback locale. -+ // -+ // The theory is that we can request a bunch of packages -+ // and it's a success if one of them is available -+ std::vector aPackages; -+ OUString sAvailableLocales(WITH_LANG); -+ std::vector aAvailable; -+ sal_Int32 nIndex = 0; -+ do -+ { -+ aAvailable.emplace_back(sAvailableLocales.getToken(0, ' ', nIndex)); -+ } -+ while (nIndex >= 0); -+ OUString install = getInstalledLocaleForLanguage(comphelper::containerToSequence(aAvailable), wantedLocale); -+ if (!install.isEmpty() && install != "en-US") -+ { -+ if (strcmp(OOO_VENDOR, "Red Hat, Inc.") == 0 || strcmp(OOO_VENDOR, "The Fedora Project") == 0) -+ { -+ // langpack is the typical Fedora/RHEL naming convention -+ LanguageType eType = aWantedTag.getLanguageType(); -+ if (MsLangId::isSimplifiedChinese(eType)) -+ aPackages.emplace_back("libreoffice-langpack-zh-Hans"); -+ else if (MsLangId::isTraditionalChinese(eType)) -+ aPackages.emplace_back("libreoffice-langpack-zh-Hant"); -+ else -+ aPackages.emplace_back("libreoffice-langpack-" + install); -+ } -+ //Debian would be: "The Document Foundation/Debian" -+ else if (strcmp(OOO_VENDOR, "The Document Foundation, Debian and Ubuntu") == 0) -+ { -+ // l10n is the typical Debian/Ubuntu naming convention -+ aPackages.emplace_back("libreoffice-l10n-" + install); -+ } -+ } -+ if (!aPackages.empty()) -+ { -+ xLangpackInstaller.reset(new InstallLangpack(aPackages)); -+ xLangpackInstaller->Start(); -+ } -+ } -+ } -+ if (locale.isEmpty()) -+ locale = getInstalledLocaleForLanguage(rLocaleElementNames, "en-US"); -+ if (locale.isEmpty() && rLocaleElementNames.hasElements()) -+ locale = rLocaleElementNames[0]; -+ return locale; -+} -+ - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx -index 467112e..6986807 100644 ---- a/sw/source/uibase/app/apphdl.cxx -+++ b/sw/source/uibase/app/apphdl.cxx -@@ -44,6 +44,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -420,7 +421,7 @@ void SwMailMergeWizardExecutor::ExecuteMailMergeWizard( const SfxItemSet * pArgs - using namespace svtools; - css::uno::Reference< XSyncDbusSessionHelper > xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); - const css::uno::Sequence< OUString > vPackages{ "libreoffice-base" }; -- xSyncDbusSessionHelper->InstallPackageNames(0, vPackages, OUString()); -+ xSyncDbusSessionHelper->InstallPackageNames(vPackages, OUString()); - SolarMutexGuard aGuard; - executeRestartDialog(comphelper::getProcessComponentContext(), nullptr, RESTART_REASON_MAILMERGE_INSTALL); - } -diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx -index 03d033e..14aebde 100644 ---- a/vcl/inc/unx/fontmanager.hxx -+++ b/vcl/inc/unx/fontmanager.hxx -@@ -192,14 +192,10 @@ class VCL_PLUGIN_PUBLIC PrintFontManager - static void addFontconfigDir(const OString& rDirectory); - - std::set m_aPreviousLangSupportRequests; --#if ENABLE_GIO -- std::vector m_aCurrentRequests; --#endif -+ std::vector m_aCurrentRequests; - Timer m_aFontInstallerTimer; - --#if ENABLE_GIO - DECL_LINK( autoInstallFontLangSupport, Timer*, void ); --#endif - PrintFontManager(); - public: - ~PrintFontManager(); -diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx -index 2c16e04..59acfa5 100644 ---- a/vcl/unx/generic/fontmanager/fontconfig.cxx -+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx -@@ -20,6 +20,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -31,8 +32,8 @@ - #include - #include - #include --#include - #include -+#include - - using namespace psp; - -@@ -40,10 +41,6 @@ using namespace psp; - #include - #include - --#if ENABLE_GIO --#include --#endif -- - #include - #include - -@@ -862,96 +859,28 @@ namespace - aBuf.append('-').append(pScriptCode); - return OStringToOUString(aBuf.makeStringAndClear(), RTL_TEXTENCODING_UTF8); - } -- --#if ENABLE_GIO -- guint get_xid_for_dbus() -- { -- // FIXME: Application::GetActiveTopWindow only returns something sensible if LO currently has the focus -- // (which is not the case when you are trying to debug this...). It should instead return the last active window. -- const vcl::Window *pTopWindow = Application::IsHeadlessModeEnabled() ? nullptr : Application::GetActiveTopWindow(); -- const SystemEnvData* pEnvData = pTopWindow ? pTopWindow->GetSystemData() : nullptr; -- return pEnvData ? pEnvData->aWindow : 0; -- } --#endif - } - --#if ENABLE_GIO - IMPL_LINK_NOARG(PrintFontManager, autoInstallFontLangSupport, Timer *, void) - { -- if (!officecfg::Office::Common::PackageKit::EnableFontInstallation::get()) -- return; -- -- guint xid = get_xid_for_dbus(); -- -- if (!xid) -+ try - { -- SAL_WARN("vcl", "Could not retrieve X Window ID for DBUS"); -- return; -+ using namespace org::freedesktop::PackageKit; -+ css::uno::Reference xSyncDbusSessionHelper(SyncDbusSessionHelper::create(comphelper::getProcessComponentContext())); -+ xSyncDbusSessionHelper->InstallFontconfigResources(comphelper::containerToSequence(m_aCurrentRequests), "hide-finished"); - } -- -- -- GError *error = nullptr; -- /* get the DBUS session connection */ -- GDBusConnection *session_connection = g_bus_get_sync(G_BUS_TYPE_SESSION, nullptr, &error); -- if (error != nullptr) -- { -- g_debug ("DBUS cannot connect : %s", error->message); -- g_error_free (error); -- return; -- } -- -- /* get the proxy with gnome-session-manager */ -- GDBusProxy *proxy = g_dbus_proxy_new_sync(session_connection, -- G_DBUS_PROXY_FLAGS_NONE, -- nullptr, // GDBusInterfaceInfo -- "org.freedesktop.PackageKit", -- "/org/freedesktop/PackageKit", -- "org.freedesktop.PackageKit.Modify", -- nullptr, // GCancellable -- &error); -- if (proxy == nullptr && error != nullptr) -- { -- g_debug("Could not get DBUS proxy: org.freedesktop.PackageKit: %s", error->message); -- g_error_free(error); -- return; -- } -- -- GVariantBuilder *builder = g_variant_builder_new (G_VARIANT_TYPE("as")); // 'as'=array of strings -- for (std::vector::const_iterator aI = m_aCurrentRequests.begin(); aI != m_aCurrentRequests.end(); ++aI) -- g_variant_builder_add (builder, "s", aI->getStr()); -- -- GVariant *res = g_dbus_proxy_call_sync(proxy, -- "InstallFontconfigResources", -- // Create a new variant with the following types: -- // 'u'=guint32 (xid); 'as'=array of strings (builder); 's'=string ("hide-finished") -- // See also https://people.gnome.org/~ryanl/glib-docs/gvariant-format-strings.html -- g_variant_new("(uass)", xid, builder, "hide-finished"), -- G_DBUS_CALL_FLAGS_NONE, -- -1, // Timeout -- nullptr, // GCancellable -- &error); -- -- if (res == nullptr && error != nullptr) -+ catch (const css::uno::Exception& e) - { -+ SAL_INFO("vcl", "InstallFontconfigResources problem, caught " << e); - // Disable this method from now on. It's simply not available on some systems - // and leads to an error dialog being shown each time this is called tdf#104883 - std::shared_ptr batch( comphelper::ConfigurationChanges::create() ); - officecfg::Office::Common::PackageKit::EnableFontInstallation::set(false, batch); - batch->commit(); -- g_debug("InstallFontconfigResources problem : %s", error->message); -- g_error_free(error); -- } -- else -- { -- g_variant_unref(res); - } - -- g_variant_builder_unref(builder); -- g_object_unref(G_OBJECT (proxy)); -- - m_aCurrentRequests.clear(); - } --#endif - - void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissingCodes ) - { -@@ -1107,8 +1036,7 @@ void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - } - } - OUString sStillMissing(pRemainingCodes.get(), nRemainingLen); --#if ENABLE_GIO -- if (get_xid_for_dbus()) -+ if (!Application::IsHeadlessModeEnabled() && officecfg::Office::Common::PackageKit::EnableFontInstallation::get()) - { - if (sStillMissing == rMissingCodes) //replaced nothing - { -@@ -1127,7 +1055,7 @@ void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - if (!sTag.isEmpty() && m_aPreviousLangSupportRequests.find(sTag) == m_aPreviousLangSupportRequests.end()) - { - OString sReq = OString(":lang=") + sTag; -- m_aCurrentRequests.push_back(sReq); -+ m_aCurrentRequests.push_back(OUString::fromUtf8(sReq)); - m_aPreviousLangSupportRequests.insert(sTag); - } - } -@@ -1138,7 +1066,6 @@ void PrintFontManager::Substitute( FontSelectPattern &rPattern, OUString& rMissi - m_aFontInstallerTimer.Start(); - } - } --#endif - rMissingCodes = sStillMissing; - } - } -diff --git a/vcl/unx/generic/fontmanager/fontmanager.cxx b/vcl/unx/generic/fontmanager/fontmanager.cxx -index c956345..d1743dd 100644 ---- a/vcl/unx/generic/fontmanager/fontmanager.cxx -+++ b/vcl/unx/generic/fontmanager/fontmanager.cxx -@@ -146,10 +146,8 @@ PrintFontManager::PrintFontManager() - : m_nNextFontID( 1 ) - , m_nNextDirAtom( 1 ) - { --#if ENABLE_GIO - m_aFontInstallerTimer.SetInvokeHandler(LINK(this, PrintFontManager, autoInstallFontLangSupport)); - m_aFontInstallerTimer.SetTimeout(5000); --#endif - } - - PrintFontManager::~PrintFontManager() --- -2.9.5 - diff --git a/SOURCES/0001-rhbz-1691287-tdf-53029-ui-prompt-for-printer-authent.patch b/SOURCES/0001-rhbz-1691287-tdf-53029-ui-prompt-for-printer-authent.patch deleted file mode 100644 index a8dcb0a..0000000 --- a/SOURCES/0001-rhbz-1691287-tdf-53029-ui-prompt-for-printer-authent.patch +++ /dev/null @@ -1,400 +0,0 @@ -From e2a12e931018f04b8aba1644ac22b8f1e57a0d0d Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 26 Mar 2019 12:09:03 +0000 -Subject: [PATCH] rhbz#1691287 tdf#53029 ui prompt for printer authentication - -refactor and reuse existing dialog to add potential domain entry - -Change-Id: Ib884931f8ccc62aad9b3e92ecf93d1da7ffe607b - -Related: rhbz#1691287 fill in default domain and username - -and grab focus to first entry entry - -Change-Id: Icb50766948c77072eaab9faf89436c6ecbb49ecc - -Related: tdf#53029 escape backslash in username for 'domain\username' - -Change-Id: I645623886396b55ccea273bfd697cf319b53f506 ---- - vcl/inc/printerinfomanager.hxx | 2 + - vcl/uiconfig/ui/cupspassworddialog.ui | 34 +++- - vcl/unx/generic/printer/cupsmgr.cxx | 259 +++++++++++++++++++------- - 3 files changed, 221 insertions(+), 74 deletions(-) - -diff --git a/vcl/inc/printerinfomanager.hxx b/vcl/inc/printerinfomanager.hxx -index 7691fbeebc6c..4c225a22f91e 100644 ---- a/vcl/inc/printerinfomanager.hxx -+++ b/vcl/inc/printerinfomanager.hxx -@@ -52,6 +52,8 @@ struct PrinterInfo : JobData - // a list of special features separated by ',' not used by psprint - // but assigned from the outside (currently for "fax","pdf=","autoqueue","external_dialog") - OUString m_aFeatures; -+ // auth-info-required, potential [domain],[username],[password] to prompt for to authenticate printing -+ OUString m_aAuthInfoRequired; - bool m_bPapersizeFromSetup; - - PrinterInfo() -diff --git a/vcl/uiconfig/ui/cupspassworddialog.ui b/vcl/uiconfig/ui/cupspassworddialog.ui -index f4fb757209bb..2c17d1397c3e 100644 ---- a/vcl/uiconfig/ui/cupspassworddialog.ui -+++ b/vcl/uiconfig/ui/cupspassworddialog.ui -@@ -73,7 +73,7 @@ - - - 0 -- 1 -+ 2 - - - -@@ -87,7 +87,7 @@ - - - 0 -- 2 -+ 3 - - - -@@ -114,7 +114,7 @@ - - - 1 -- 1 -+ 2 - - - -@@ -123,10 +123,36 @@ - True - True - False -+ password - - - 1 -- 2 -+ 3 -+ -+ -+ -+ -+ False -+ True -+ _Domain: -+ True -+ domain -+ 1 -+ -+ -+ 0 -+ 1 -+ -+ -+ -+ -+ True -+ True -+ True -+ -+ -+ 1 -+ 1 - - - -diff --git a/vcl/unx/generic/printer/cupsmgr.cxx b/vcl/unx/generic/printer/cupsmgr.cxx -index 328e9246e9f5..0f5a647f92a6 100644 ---- a/vcl/unx/generic/printer/cupsmgr.cxx -+++ b/vcl/unx/generic/printer/cupsmgr.cxx -@@ -319,6 +319,8 @@ void CUPSManager::initialize() - aPrinter.m_aInfo.m_aComment=OStringToOUString(pDest->options[k].value, aEncoding); - if(!strcmp(pDest->options[k].name, "printer-location")) - aPrinter.m_aInfo.m_aLocation=OStringToOUString(pDest->options[k].value, aEncoding); -+ if(!strcmp(pDest->options[k].name, "auth-info-required")) -+ aPrinter.m_aInfo.m_aAuthInfoRequired=OStringToOUString(pDest->options[k].value, aEncoding); - } - - OUStringBuffer aBuf( 256 ); -@@ -617,6 +619,143 @@ void CUPSManager::getOptionsFromDocumentSetup( const JobData& rJob, bool bBanner - } - } - -+namespace -+{ -+ class RTSPWDialog : public ModalDialog -+ { -+ VclPtr m_xText; -+ VclPtr m_xDomainLabel; -+ VclPtr m_xDomainEdit; -+ VclPtr m_xUserLabel; -+ VclPtr m_xUserEdit; -+ VclPtr m_xPassLabel; -+ VclPtr m_xPassEdit; -+ -+ public: -+ RTSPWDialog(vcl::Window* pParent, const OString& rServer, const OString& rUserName); -+ virtual void dispose() override; -+ virtual ~RTSPWDialog() override; -+ -+ OString getDomain() const -+ { -+ return OUStringToOString( m_xDomainEdit->GetText(), osl_getThreadTextEncoding() ); -+ } -+ -+ OString getUserName() const -+ { -+ return OUStringToOString( m_xUserEdit->GetText(), osl_getThreadTextEncoding() ); -+ } -+ -+ OString getPassword() const -+ { -+ return OUStringToOString( m_xPassEdit->GetText(), osl_getThreadTextEncoding() ); -+ } -+ -+ void SetDomainVisible(bool bShow) -+ { -+ m_xDomainLabel->Show(bShow); -+ m_xDomainEdit->Show(bShow); -+ } -+ -+ void SetUserVisible(bool bShow) -+ { -+ m_xUserLabel->Show(bShow); -+ m_xUserEdit->Show(bShow); -+ } -+ -+ void SetPassVisible(bool bShow) -+ { -+ m_xPassLabel->Show(bShow); -+ m_xPassEdit->Show(bShow); -+ } -+ }; -+ -+ RTSPWDialog::RTSPWDialog(vcl::Window* pParent, const OString& rServer, const OString& rUserName) -+ : ModalDialog(pParent, "CUPSPasswordDialog", "vcl/ui/cupspassworddialog.ui") -+ { -+ get(m_xText, "text"); -+ get(m_xDomainLabel, "label3"); -+ get(m_xDomainEdit, "domain"); -+ get(m_xUserLabel, "label1"); -+ get(m_xUserEdit, "user"); -+ get(m_xPassLabel, "label2"); -+ get(m_xPassEdit, "pass"); -+ -+ OUString aText(m_xText->GetText()); -+ aText = aText.replaceFirst("%s", OStringToOUString(rServer, osl_getThreadTextEncoding())); -+ m_xText->SetText(aText); -+ m_xDomainEdit->SetText("WORKGROUP"); -+ if (rUserName.isEmpty()) -+ m_xUserEdit->GrabFocus(); -+ else -+ { -+ m_xUserEdit->SetText(OStringToOUString(rUserName, osl_getThreadTextEncoding())); -+ m_xPassEdit->GrabFocus(); -+ } -+ } -+ -+ RTSPWDialog::~RTSPWDialog() -+ { -+ disposeOnce(); -+ } -+ -+ void RTSPWDialog::dispose() -+ { -+ m_xText.clear(); -+ m_xDomainLabel.clear(); -+ m_xDomainEdit.clear(); -+ m_xUserLabel.clear(); -+ m_xUserEdit.clear(); -+ m_xPassLabel.clear(); -+ m_xPassEdit.clear(); -+ ModalDialog::dispose(); -+ } -+ -+ bool AuthenticateQuery(const OString& rServer, OString& rUserName, OString& rPassword) -+ { -+ bool bRet = false; -+ -+ ScopedVclPtrInstance aDialog(nullptr, rServer, rUserName); -+ if (aDialog->Execute()) -+ { -+ rUserName = aDialog->getUserName(); -+ rPassword = aDialog->getPassword(); -+ bRet = true; -+ } -+ -+ return bRet; -+ } -+} -+ -+namespace -+{ -+ OString EscapeCupsOption(const OString& rIn) -+ { -+ OStringBuffer sRet; -+ sal_Int32 nLen = rIn.getLength(); -+ for (sal_Int32 i = 0; i < nLen; ++i) -+ { -+ switch(rIn[i]) -+ { -+ case '\\': -+ case '\'': -+ case '\"': -+ case ',': -+ case ' ': -+ case '\f': -+ case '\n': -+ case '\r': -+ case '\t': -+ case '\v': -+ sRet.append('\\'); -+ break; -+ } -+ sRet.append(rIn[i]); -+ } -+ return sRet.makeStringAndClear(); -+ } -+} -+ - bool CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTitle, FILE* pFile, const JobData& rDocumentJobData, bool bBanner, const OUString& rFaxNumber ) - { - SAL_INFO( "vcl.unx.print", "endSpool: " << rPrintername << "," << rJobTitle << " copy count = " << rDocumentJobData.m_nCopies ); -@@ -642,7 +781,56 @@ bool CUPSManager::endSpool( const OUString& rPrintername, const OUString& rJobTi - // setup cups options - int nNumOptions = 0; - cups_option_t* pOptions = nullptr; -- getOptionsFromDocumentSetup( rDocumentJobData, bBanner, nNumOptions, reinterpret_cast(&pOptions) ); -+ auto ppOptions = reinterpret_cast(&pOptions); -+ getOptionsFromDocumentSetup( rDocumentJobData, bBanner, nNumOptions, ppOptions ); -+ -+ PrinterInfo aInfo(getPrinterInfo(rPrintername)); -+ if (!aInfo.m_aAuthInfoRequired.isEmpty()) -+ { -+ bool bDomain(false), bUser(false), bPass(false); -+ sal_Int32 nIndex = 0; -+ do -+ { -+ OUString aToken = aInfo.m_aAuthInfoRequired.getToken(0, ',', nIndex); -+ if (aToken == "domain") -+ bDomain = true; -+ else if (aToken == "username") -+ bUser = true; -+ else if (aToken == "password") -+ bPass = true; -+ } -+ while (nIndex >= 0); -+ -+ if (bDomain || bUser || bPass) -+ { -+ OString sPrinterName(OUStringToOString(rPrintername, RTL_TEXTENCODING_UTF8)); -+ OString sUser = cupsUser(); -+ ScopedVclPtrInstance aDialog(nullptr, sPrinterName, sUser); -+ aDialog->SetDomainVisible(bDomain); -+ aDialog->SetUserVisible(bUser); -+ aDialog->SetPassVisible(bPass); -+ -+ if (aDialog->Execute() == RET_OK) -+ { -+ OString sAuth; -+ if (bDomain) -+ sAuth = EscapeCupsOption(aDialog->getDomain()); -+ if (bUser) -+ { -+ if (bDomain) -+ sAuth += ","; -+ sAuth += EscapeCupsOption(aDialog->getUserName()); -+ } -+ if (bPass) -+ { -+ if (bUser || bDomain) -+ sAuth += ","; -+ sAuth += EscapeCupsOption(aDialog->getPassword()); -+ } -+ nNumOptions = cupsAddOption("auth-info", sAuth.getStr(), nNumOptions, &pOptions); -+ } -+ } -+ } - - OString sJobName(OUStringToOString(rJobTitle, aEnc)); - -@@ -825,75 +1013,6 @@ bool CUPSManager::writePrinterConfig() - return PrinterInfoManager::writePrinterConfig(); - } - --namespace --{ -- class RTSPWDialog : public ModalDialog -- { -- VclPtr m_pText; -- VclPtr m_pUserEdit; -- VclPtr m_pPassEdit; -- -- public: -- RTSPWDialog(const OString& rServer, const OString& rUserName, vcl::Window* pParent); -- virtual ~RTSPWDialog() override; -- virtual void dispose() override; -- OString getUserName() const; -- OString getPassword() const; -- }; -- -- RTSPWDialog::RTSPWDialog( const OString& rServer, const OString& rUserName, vcl::Window* pParent ) -- : ModalDialog(pParent, "CUPSPasswordDialog", -- "vcl/ui/cupspassworddialog.ui") -- { -- get(m_pText, "text"); -- get(m_pUserEdit, "user"); -- get(m_pPassEdit, "pass"); -- -- OUString aText(m_pText->GetText()); -- aText = aText.replaceFirst("%s", OStringToOUString(rServer, osl_getThreadTextEncoding())); -- m_pText->SetText(aText); -- m_pUserEdit->SetText( OStringToOUString(rUserName, osl_getThreadTextEncoding())); -- } -- -- RTSPWDialog::~RTSPWDialog() -- { -- disposeOnce(); -- } -- -- void RTSPWDialog::dispose() -- { -- m_pText.clear(); -- m_pUserEdit.clear(); -- m_pPassEdit.clear(); -- ModalDialog::dispose(); -- } -- -- OString RTSPWDialog::getUserName() const -- { -- return OUStringToOString( m_pUserEdit->GetText(), osl_getThreadTextEncoding() ); -- } -- -- OString RTSPWDialog::getPassword() const -- { -- return OUStringToOString( m_pPassEdit->GetText(), osl_getThreadTextEncoding() ); -- } -- -- bool AuthenticateQuery(const OString& rServer, OString& rUserName, OString& rPassword) -- { -- bool bRet = false; -- -- ScopedVclPtrInstance aDialog(rServer, rUserName, nullptr); -- if (aDialog->Execute()) -- { -- rUserName = aDialog->getUserName(); -- rPassword = aDialog->getPassword(); -- bRet = true; -- } -- -- return bRet; -- } --} -- - const char* CUPSManager::authenticateUser() - { - const char* pRet = nullptr; --- -2.21.0 - diff --git a/SOURCES/0001-rhbz-1775767-null-deref.patch b/SOURCES/0001-rhbz-1775767-null-deref.patch new file mode 100644 index 0000000..c03e5e6 --- /dev/null +++ b/SOURCES/0001-rhbz-1775767-null-deref.patch @@ -0,0 +1,160 @@ +From fd7b2f5fbbee23fc2ab9722fcd605921b7184113 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Thu, 28 Nov 2019 09:50:36 +0000 +Subject: [PATCH] rhbz#1775767 null deref + +Change-Id: I6941055f9a02b36b5fe621fe89f49f62beb87e67 +--- + include/sfx2/sidebar/Theme.hxx | 2 +- + sfx2/source/sidebar/SidebarController.cxx | 9 +++-- + sfx2/source/sidebar/Theme.cxx | 43 ++++++++++++----------- + 3 files changed, 29 insertions(+), 25 deletions(-) + +diff --git a/include/sfx2/sidebar/Theme.hxx b/include/sfx2/sidebar/Theme.hxx +index 16a4798..b7eaf88 100644 +--- a/include/sfx2/sidebar/Theme.hxx ++++ b/include/sfx2/sidebar/Theme.hxx +@@ -175,7 +175,7 @@ public: + virtual sal_Bool SAL_CALL hasPropertyByName (const OUString& rsName) override; + + private: +- static Theme& GetCurrentTheme(); ++ static Theme* GetCurrentTheme(); + + std::vector maImages; + std::vector maColors; +diff --git a/sfx2/source/sidebar/SidebarController.cxx b/sfx2/source/sidebar/SidebarController.cxx +index 0cad779..764d4e3 100644 +--- a/sfx2/source/sidebar/SidebarController.cxx ++++ b/sfx2/source/sidebar/SidebarController.cxx +@@ -258,9 +258,12 @@ void SAL_CALL SidebarController::disposing() + mpParentWindow = nullptr; + } + +- Theme::GetPropertySet()->removePropertyChangeListener( +- "", +- static_cast(this)); ++ Reference xPropertySet = Theme::GetPropertySet(); ++ if (xPropertySet) ++ { ++ xPropertySet->removePropertyChangeListener("", ++ static_cast(this)); ++ } + + maContextChangeUpdate.CancelRequest(); + maAsynchronousDeckSwitch.CancelRequest(); +diff --git a/sfx2/source/sidebar/Theme.cxx b/sfx2/source/sidebar/Theme.cxx +index bc6236d..1ef350e 100644 +--- a/sfx2/source/sidebar/Theme.cxx ++++ b/sfx2/source/sidebar/Theme.cxx +@@ -34,9 +34,10 @@ using namespace css::uno; + + namespace sfx2 { namespace sidebar { + +-Theme& Theme::GetCurrentTheme() ++Theme* Theme::GetCurrentTheme() + { +- return SfxGetpApp()->GetSidebarTheme(); ++ SfxApplication* pApp = SfxGetpApp(); ++ return pApp ? &pApp->GetSidebarTheme() : nullptr; + } + + Theme::Theme() +@@ -67,8 +68,8 @@ Image Theme::GetImage (const ThemeItem eItem) + const PropertyType eType (GetPropertyType(eItem)); + OSL_ASSERT(eType==PT_Image); + const sal_Int32 nIndex (GetIndex(eItem, eType)); +- const Theme& rTheme (GetCurrentTheme()); +- return rTheme.maImages[nIndex]; ++ const Theme* pTheme (GetCurrentTheme()); ++ return pTheme->maImages[nIndex]; + } + + Color Theme::GetColor (const ThemeItem eItem) +@@ -76,11 +77,11 @@ Color Theme::GetColor (const ThemeItem eItem) + const PropertyType eType (GetPropertyType(eItem)); + OSL_ASSERT(eType==PT_Color || eType==PT_Paint); + const sal_Int32 nIndex (GetIndex(eItem, eType)); +- const Theme& rTheme (GetCurrentTheme()); ++ const Theme* pTheme (GetCurrentTheme()); + if (eType == PT_Color) +- return rTheme.maColors[nIndex]; ++ return pTheme->maColors[nIndex]; + else if (eType == PT_Paint) +- return rTheme.maPaints[nIndex].GetColor(); ++ return pTheme->maPaints[nIndex].GetColor(); + else + return COL_WHITE; + } +@@ -90,8 +91,8 @@ const Paint& Theme::GetPaint (const ThemeItem eItem) + const PropertyType eType (GetPropertyType(eItem)); + OSL_ASSERT(eType==PT_Paint); + const sal_Int32 nIndex (GetIndex(eItem, eType)); +- const Theme& rTheme (GetCurrentTheme()); +- return rTheme.maPaints[nIndex]; ++ const Theme* pTheme (GetCurrentTheme()); ++ return pTheme->maPaints[nIndex]; + } + + const Wallpaper Theme::GetWallpaper (const ThemeItem eItem) +@@ -104,8 +105,8 @@ sal_Int32 Theme::GetInteger (const ThemeItem eItem) + const PropertyType eType (GetPropertyType(eItem)); + OSL_ASSERT(eType==PT_Integer); + const sal_Int32 nIndex (GetIndex(eItem, eType)); +- const Theme& rTheme (GetCurrentTheme()); +- return rTheme.maIntegers[nIndex]; ++ const Theme* pTheme (GetCurrentTheme()); ++ return pTheme->maIntegers[nIndex]; + } + + bool Theme::GetBoolean (const ThemeItem eItem) +@@ -113,28 +114,28 @@ bool Theme::GetBoolean (const ThemeItem eItem) + const PropertyType eType (GetPropertyType(eItem)); + OSL_ASSERT(eType==PT_Boolean); + const sal_Int32 nIndex (GetIndex(eItem, eType)); +- const Theme& rTheme (GetCurrentTheme()); +- return rTheme.maBooleans[nIndex]; ++ const Theme* pTheme (GetCurrentTheme()); ++ return pTheme->maBooleans[nIndex]; + } + + bool Theme::IsHighContrastMode() + { +- const Theme& rTheme (GetCurrentTheme()); +- return rTheme.mbIsHighContrastMode; ++ const Theme* pTheme (GetCurrentTheme()); ++ return pTheme->mbIsHighContrastMode; + } + + void Theme::HandleDataChange() + { +- Theme& rTheme (GetCurrentTheme()); ++ Theme* pTheme (GetCurrentTheme()); + +- if ( ! rTheme.mbIsHighContrastModeSetManually) ++ if (!pTheme->mbIsHighContrastModeSetManually) + { + // Do not modify mbIsHighContrastMode when it was manually set. +- GetCurrentTheme().mbIsHighContrastMode = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); +- rTheme.maRawValues[Bool_IsHighContrastModeActive] <<= GetCurrentTheme().mbIsHighContrastMode; ++ GetCurrentTheme()->mbIsHighContrastMode = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); ++ pTheme->maRawValues[Bool_IsHighContrastModeActive] <<= GetCurrentTheme()->mbIsHighContrastMode; + } + +- GetCurrentTheme().UpdateTheme(); ++ GetCurrentTheme()->UpdateTheme(); + } + + void Theme::InitializeTheme() +@@ -369,7 +370,7 @@ void SAL_CALL Theme::disposing() + + Reference Theme::GetPropertySet() + { +- return Reference(static_cast(&GetCurrentTheme()), UNO_QUERY); ++ return Reference(static_cast(GetCurrentTheme()), UNO_QUERY); + } + + Reference SAL_CALL Theme::getPropertySetInfo() +-- +2.20.1 + diff --git a/SOURCES/0001-rhbz-1810732-crash-assert-inserting-document-with-in.patch b/SOURCES/0001-rhbz-1810732-crash-assert-inserting-document-with-in.patch new file mode 100644 index 0000000..1b2d1da --- /dev/null +++ b/SOURCES/0001-rhbz-1810732-crash-assert-inserting-document-with-in.patch @@ -0,0 +1,329 @@ +From 2a34d8f44d3f45af7bf2394a93817a6ede75baba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Fri, 6 Mar 2020 10:11:48 +0000 +Subject: [PATCH] rhbz#1810732 crash/assert inserting document with initial + graphic + +Change-Id: Idae665c926856922a25a1228ed34f3cae96e4bdd +--- + sw/qa/extras/uiwriter/data/rhbz1810732.docx | Bin 0 -> 12107 bytes + sw/qa/extras/uiwriter/uiwriter.cxx | 21 ++++++++++++++++++ + writerfilter/source/dmapper/DomainMapper.cxx | 4 +++- + .../source/dmapper/DomainMapper_Impl.cxx | 4 ++++ + .../source/dmapper/DomainMapper_Impl.hxx | 1 + + 5 files changed, 29 insertions(+), 1 deletion(-) + create mode 100644 sw/qa/extras/uiwriter/data/rhbz1810732.docx + +diff --git a/sw/qa/extras/uiwriter/data/rhbz1810732.docx b/sw/qa/extras/uiwriter/data/rhbz1810732.docx +new file mode 100644 +index 0000000000000000000000000000000000000000..2bf1d574d4911c4d042b56ae0333d3d088c5cb12 +GIT binary patch +literal 12107 +zcmaia19+Xy)^=>$XwcY3)5`HnwfEu^Y8fW81dB15T&TXfA`8LSJFe5xxgX3*n+sy#1The89%yW%p1n +zZ`4?-NO)Y&_o6pd3p59C)J4^GG5T)J%d<7 +z0`fKJbnlcysrYu;vxiNPfq`ZFLz3*uF6h;(jrUvMAY>^uRpbtH+crUG*6VpC?co{{ +zmbp$Uwl=4h+l-CKb12Fvw)KHcPXv{e7VJPPv@?cPP#Thj_-7LbGn!eVvPcD%t{GZ! +zwr`9U1E8?y5vi!QhU%0p(|HN5W%bTii +z9jYvMTVKm)fT8U`oDa2#cK5Sn;{MdtF}+TwH~czJ_1>r?G7lD-7l@z2EqHevf(_o8 +zP6|cTy8Bl{b)y;5Q6_j0pf%O{%K(kC?OM}3Kz68+x=zi3kO0J +zJbmWLVJTQ*V}2^@Kn}QdKxMXEwl8C80Adug=GJtu-ZgrD-eq0x;>u~GHU;&4#<{o( +z&P`ugTfRmejLsEn5|f?+rPL$-o}hdhf*oJwy$M~SlusUWIu9<<1Ua$g=I7W!9D03N +zZ-NNx3_0e}2u;dJ_l#4=W7p)UB9&bcV9rIpqbBTKpzH6*r3GK<@Ed+Go(&m#aDH=v +zzZ0unOS>Zv5x|Sv-!gM^@~z6KKi6~(ipDa;on@Am +zn6^;D0lFavKb|~AoYQXu#(n(3vrk*uKsUGFW|;j+rEx+6;jZG6_b^hu +z1m+b!aC8fjSGRE>#bJJnAWc0C_9U2=xfk +zjv1kTmQ9vnlp!w2e!lMj9FiR}jRY50=jz1y>Mb8nA#^H|wrnCiOP#rCh#_&fDI1Py +z=Za3}C5s|dx(J6JHnu6VyeXgN)A1t!sis;|oE%AZFw6(OKGsA4`Kx$XxHBa@C$%cg +zN+1oqD&AD|FFti%f5iG4B-iZ2>wLNqaR^VwO-hXMEt2+BJEf`ujiB{|bW&BI&i>>b +z5h2Tqg@-s6z<|`On&Yrbygf#2E|5sRc!O0KfbF9JjyV*~{;0{;VL6^Hk7w-`6N!q_ +zuAlyS#8!GFUA3IKj2y6AVU6IaRfK(QHroT686hY2Wso{fC5dI&y-wR{fFfTF74MC_f^lA!QHq9%Kjg@^q(2d3jwiU!{Jv{Pkl|q%Iqf8I7x4TmubD_*oHu1Dm?P=qQ#nG&eFX +zK*}39kc>m+Bh_7cbQTnTWIul$YyVvO2RFq4<4EcqfuAr`z_&&BOXfc(eKBhDC7CO* +zFD3B&F|{}{kFOI}GBYhx(R0XZJ1e4pFn%ZbdU;M|RJMy%h591(1IT{356zFL(1ass +zc}f=QB3Zc;Ikb-vx6vHNtt@|wG~Hh%%owE0+bFX0%VvT +z&J2TpQG)n07KotQ%W8JGd$3F(s=@3sRr1C(SR!Vv4%8 +z+4P7;v9esVyN%;X5zqBn-yFd)U_5rPa>rsseSfm{-691e!ejzeiIqI7e^q!RH{QTz +znQxW +zD6$ZQAuh|*;@+wg@jOGDU1%4p{5J09RaYY8RYxqz(C41cn_X?2!(eDczOd@j!`5`z +zWCaI1Q`7p@9j>wZAUh;vVgGmp&FOpfQ{}8RFCACmy2GQG9*jmR2&REBGs}S5uSTnv +z+pO1259l2{8R(rB9pbj{D5G3Sy1OVxntts8>0hTEM@dRLwdV_)stZ>Sui(oTUj_B~ +zYDOm)U5$a$Ey(IPDo?G`)!d@@7Y1o=aDUM7es>y6*;Zs43Drw+=TSB8B|ny}9_2Kc +z#~%4gFtX74#Yz=_thS}Hy?;6hqbg40aXHAF9ORjTeYKdvH8URkf$jrRwc=Cz^>Xv# +zc{+Oy?kS-ZM4e?XS2ElTw@I}<1os1+lfLQ>K4RjxOiu>Yoy?k}2qUp5BifUJDBYr8;q!m)Dy33ZxI--SeK{SHsFa9 +z6v&eE#rFGFa4S<6tzLjT@#4N};c`Po@9ax3jlRM?*M@yYx_SoSq~)iBROjr^f={bV +z>=n%Lt-DQjC1ZRkAMEp5kgfnP{Y`9(bOd8buPf?i*0xzotEc{vrOC@Ru~GFw%U3IB +zCEJdNrWbBwb63y4H#jPWbt(!xR6Jw^L1gJ#S$$JSDUJ_}bg01H +zsDp!RS-B6C&&iB6D*+DzALf_&?IGx#{l)SRhQyq`1*7WQ_DAT6LAWo1{7u|{_;~9h +zm~1=R?iVKF^&DD%Q>qB_-kz&Q1LZin-q!0k_VgMIh$b?0&9wOX<^1Z=|9;OtWkp4E +zpd>msfTdrYgkHv)12qzgQ93Nu8+cMv4jU0jLCU-5G+2p!ZCFe?Zx;u|*HqN17^9~0~8R@q~d?uZv3khFg4OM +z{6{IUtg>je$bs}$3J~43g_17XqU6}caHSRUPe9lXr{0FXG^ +z!HypUHjH*`T!QfMJ6&5#!PJ>7n`5!1r41sI^Qm_2V%EJ0t)%G~m=Xump~%#NW=GeW +z;yPFA0V(ESKPU64dLt7{a>&X;I7>LDhl_hMWt9p_DL9OlVVw!MdJ7sHaYQnvN=j1# +zz6tJ!sqP(!plMd3TT+o*vV?5f=BE&02(pq@{eZB%UwRn%VsW%!plq4&)4YO$8G@r& +zSheYc<_&|mM_&-W^r;+Son57PYu%O?(X5_bxM_#)Q7=az1J?}?%o^D_@Jcx;>tZgg +z7u<2XvQ)c3*&btSMTnP$*>_cV>+T&mbFXKb_&v4vprP8Bbu1kTIL8v!y0_=V6nX&vtGLW~0WF_8PKaafv;)p0Rjn +zWv(C#kQ$jPGa1YMq*?dd?nEc?CcoNC+Of4s{!Z;5vMjM!Mq`JDZc-)D&k!2xTegwZ +znHuF)5S|prbh!Cm~q#9P>JPJss +zAQ7ZNk^S$_BO@UIlc!NH}w%dFxObJ{(+0c5q(n#Q|IPL=zGUE+gF)MI>~WiO7y9Ire5Ur7nY^q)Eqmb((NP#^Zf@r!b> +zoFd!z_lCYSYH*UgV%lGzzXyCZ(35lBTYZs>@ZSO+<)8J1v9*9y=o4 +z%YYk+uk>$m_eC^rS;tC~Y+dhZj;4G_H`xkwIp;k8=$0_CSD`zzy^+kT9PN5@N* +zL>*3Y1>KHoD4)ORIdQ2n+B$7_(VddRZ_)1@0rs0%;z<9Gwh`*n58?4A9H%g9-{-cz +z)KpG@$awhE0TK`~^jm^54m{@Ay3GxxPiBhM5|=4qx3-4JHT5^k!dO1JK3h%n=ZW)! +zGCFp#veIA{9SA3JSC{O;s~OhxNVmDcRw9nGf(-~s!WKrWkt=0ECXT*5;XIsan^GJ+ +zJgo>4QNRx12Fdwb+KP?73b)IK<`6cj8f2Fi`GuC{XL@#w +zX}~M7;k!dc=@!GWa0E^0;T9|0II4D9J3IWEJ@(to*(NCa=277NU{M50|LL!)j<0N9 +zi47PCCi632e>ti+DYG~K2i|f9CVSFy1B9Rw>nH;)!rg(C2wr71 +zP$u(PnxaA!O8FVIOz%ZgZ+S)YF3y-Ek8m>xBQRtQIT?Npv-qEYdHk}L;pR{*yTBI{ +zUk^KlJXG78(B_vhyiIqX-X!%jra7>g#9yOzKKrqEtVMOhTK+=A +zfMRFNE#@^nv8p67i(~-Vs-OUgUfdZdw1@7yhD{lb$XsCre-3+Ux6;r4)h5-1rxSlA +z%=hI=uZXI2`sS9Tw@Zj^eyFmnH30QPnO!qN=|EOiBb0{U` +zErO!Ktuk`7s317)4x#mKcykBgwvDe0>B8m`mNA#G+I|%)sE6c&u$kK@ZulK(Qy<>G5>qR!S&Qk@XmZq0eE|KLAPDjQP +zQxKtxIb!OCWNh&i(GK#fK{p(_UDZ}|MqO6iaEmbYU3AMuLo<4ZK3;*mUm8V*VwX6E +zTHuGe6A4yNpEoz%Ni%Sp2;AZDk%=j97nQfo<^}tj?n54=7hCxDbO35iR$exsIx2MM +zP#{)1+TSfll&G4usl;&yRkgQ)&-E-u1B21qV2W5!?y&M*$`xso(#Q}MRs}!Zd|qr} +zCs0Vs_Qe1!KLP#dzs2&n`vM|9WkHT`BwGPJ?+ves&u(8~vl +zuQ$`!6@ko05dD3aN@Ptw0)j!|-tS>uM=+Y$@GD$J$$(%0^DlWp*#e!_=Ej6^%}CZ= +zAGdbxCKYj0b)RZWp=hf4F1Jpl{p1D76L1bO^QI+=*`#jD9}N~~qD4~x3mRW@aT{LT +zB`WsAv}rOMUTCYWyQTRfr!_w)uN=pXOm5zt?<1);>t)Y>)k9=7?o^BUgA7RBc#`zm6qCk#zg;qUo?{!u^{9ZiH +zkJC(a2C^-WxbL%9y`HXSbvi!VjCh>P>hQikZ(q*pc;9@#9YeuNh{BeQ`s|Q|m*;un +z`wTl**wxFbyJ$#pp_kS{QWM3>5Co?wc}eVCl)Rq&t!N2k2NL8Up?jHFWP;bGUw9(< +z@n%cT_qa8^4gs^Uj=NF?2usrAd$p06M&d|Y)VW*_8sm`3i4=$`#xJB5TFD4r2u>gT +z4b;FEI^?HlBv9CRkfsva<}HIj0{LIvzu@MCzQB@`h*~KilG~ciacB4XFWN;ZnDB6%B?~eg~YCEViBRh*f7-jD->S +z#grt@hD+k4ckBnfpM{~tb0YdFDQwnl^}GSlAW&j!(LP`*gbLdP%^X0_=+qbogMl;i +z+%U}nm-Fc#b*}x0+x)YU+HI*@v)6$z169SosG5) +z=9p%hWPVlVS_L&dEe;kc8kp^U_T}u9)gm!$#)kO{z(PX`4(PP014eA`p%Y(8}^K^UBgjLqO9{ChHPxa(ZMYxnG2K%Q* +zBkJPbMob?9=mdg!4pR+-IY*5>taM97Tv570iM@lh0{tWeskdF!mW%Qh({L>YDpW~h +zwF8L&u|GEXPS(t&SssDO5I~duxi@G=J>k~W^eS1JgNXoDgO)5q;On(;pJC)Csz{$N +zHkMA8D?f0{v5>?BAwb|-G{|I7c*$~r1qS763Jhw04I3_>N25v| +zVU-Z?5jeJuwsHRa6$*E6c=}gNLo_#iW2j#}kP(?on6YAJ&eW^-@$+HX%}dd0S89+E +zP2?0-QbQ}-!t+4jg4axjrlW{yS>)y15V-2M&))nbMLouSOqvs|4Zy3x!lFVp#jMok +zmn4LK=*~u>np}`(TIwgAn=Z&7MGp04%1kn@ulDr-GcwjI^TzEljQf$-JDRA8)VeM- +zXB)6+&zUcfkjsX_QC+#TOarKehLj&-zkgXfdHSw{1a$@eva|Z0fZYnVYw#g}fU1fA +zTYf?OXMVAFaJ4Y{EB$V3N!c%QptPS>>7HkP{?(+JCrS3xWs@rEBPu7WNk{-qB_+Rv +zY)yNo7jSgEFe{M&`67vlM~Dd09%P#pPc>!N{q}5;(Z+LjNeE}!UH4<-sT{@yh4C%w +z>*MltYs_hAM0E&h`b6lfWZ>&zu=n$Y3vumk0E|qd$;O8527RrC<>w(Md#d(n*w4 +zKISz#?T}HLki0S4h`U<8$}^j$G6fvRH7s;aIy!k-pELp;Ll04m6uK@AwK{n9_Cn%F +zF}oUUG(ESSJzmeU?37&X_Yp>g_fTpL=xk8rQVoxUSs;sDRe>9=f=4!Pdu#8jQqlx@ +z{Mg$4saq^Wj67j2L#$Os?{1r%iJ)ig@M}~(keow3I8dp)?#ZZ`(;#B8?IDksFr22IZ6v43GfWwhrhwfK$MC?`^mZfPxqMcJG;?zD1+~uNO1JMTzpklzm>94$~+f$aWH#rZL +zhY`znvjG7P-Ekp>EBKzn(w5#M?fYQ?jHGRVrj@?i@X<87deakscujFW<5zMFqEg68 +zAx`6^tzKVq&4tKU={%Qqni5~wp6o>yFjWDF_Clg~P&lDIb~C~o@9}ugZ3Cg#;K+sG +zXF^sp!tz`HhcB0EJ1ztJtZ#%My=%|ZJy*?8Z}kh@3O`n`tT&4FQJS#6syBqn*3=_b +z5R*M~A0Up)Obj3|dra|zx(vU}HMGHiwYq|TW`SH +z_GQ5rN1N`L|MMZa$4ieYJ2A{a3$)zXj8sTqlU436#Tz0Hof|3EMTm&>Ty)Ifh#zVL +zo*$_nSD!eP9ZV3#8Y+Nvh2dL2l68n5@d^^SOdByqri%~_>3Ic`3>>jHWHM08!?if3+SKFxeebBZygG~ +z!QVT4hyT{_KZk|{CC~;8mHY1_I%*U`{=dfy6+pBC1Sa=(L;rjCLHySZ0>^by#U_iH +zIJ(DX)hEH09^TfUx~v_f6@~?y<8lFAb^%U(g|`^q8&BQLR!1i-5FyNpJQDhqP4hgU +z)$2KyL*ANhI>olFTC+BOIoGP3borwPpysvuH*K*u%B`)QR~3h*w?s1Wr~E2AiU!lr +zRUBYSij$tSve&zcgC)wp08NhqSa$Ma|U?l-z9$5#(!+l%t&3RA1n*=aId40 +z(iiQlm}X?D{n@M&KL|y5;L4L{pE>F0&NOCP%I1%${DPWjjLJ0zBN(RLwtQ)pgVJE9 +zn~J9O#IMjewqc%bF(n5|LajMC4pYEK6{D1HI%mN|J;sa|!aPC@wR~;)l++Ne)|64^ +z+CD59NZiVs@B9$`DTZ`Cy~Oh=sn*ZwPTkO>WH%ikECSnpy*g!i0pK@WebIH_tdvjS +zrZGlzZ@i)efhF6li9vl#$A>&7Ci6P%V);e_+d;}*XQ+|ABV^lv8PE*`p{IQ#e=_|c +zhADOVvnbGyZ7G>m-bj7!@F3aJT6R2mQRIqhm6RIGdwa)%pd2LuzFf(tKs=*VG<;7= +zd^4l$5(BiIgu?+Ht8Fa6jcS^B$Bt0v3rpJuk3E6A_P3KcdukH~C)P*MU_JA0XoeyX +zStSa5!YK~#Mv8a?`-%XP&OvS{%+|&iU~`SupXqYx4w~N%pDdQZ^IDc1wZ0v8AfITe +zmNl4Cvbj~3U#~!!pCIoJW^gi7+7nLc7Y<7q9+Oi^+P3tbek9-(N}-bvfc&D;#0_8T +zAay$x$Mm{)<-{DVnZlA|=?5}X%xlO8|*lT{-hk(Mcr +z1Zy;v_YY9Fm7Rhlr|Vjdk&e~H+9$00pk~a&X{rLj!ChmwR_$Saw8UaWu8$(^yn>rg +zs}ePYRlGuNHwR~qKR!Gd4x%dp3^dy_ADu5dguE>B{==~toqLPLc@C?QHo?b2E@L5W&Q{7hFXZx0!D +z1GCdahq|>F?z`+T<~hWTvJQ`Id|sS~t0(_7g?bao*J8L-n@YC+skXA2$K8rDTZZY! +z+xh8jg +zCg~G?>61_Uiq1&ioQCSrXLp1jcQ?8Ah+~gqv#D!;+}|I@W|UU2rQzh+W|AG-duEG| +zpEyTaN?*x5HW(J2?q$4SyA@fcLqoPt;j%Egm#%cD^MH!o!fAUN;k79TAmCGCWeNlw +zj24%VAF>jf_md$^k%$$F?G89NGjJ)vynMQb5=D>tiiFSQnHn)$kS}F!A +znY81LJw>KsmgTE3am|3GYj>QU#Fn1?QismirMU?*%frnP{5D$TegxxBgw5nv-JFJ3 +zcZi|InyovR-JGOX=#|08F}5%1=P+BTnUK5DSt^4kh>O-LYdBGsp0#wqLgRR0Z}1DW|sPmnq0CmrZq +z@2}T&$c9{zHn=pr!fSm=)T-70Q#}?^yeSv*<_onvV8si&Jg!o_2 +zeWCvDZUaYq2W!iBk2g$7S@#fOL7qK+66tLhEK@RHz_DcIKC13Z;?DaO+rSUBoNBb{ +z>CoWDG9N$HEAhfdg!F^&aF|oBAZ3m53<8QH9yNy9E2P`1)v2g!0^$-+#cv9WMbY2& +z0^r#)zW*c^r@w4m?2Ibn5la(upe!p}V;O=h8aN3H>Xxd4Rd&=kR%{+y +zuG2Odf`e;a+`YLW-RD;B_EomY9kL0|Hrud;Y90t3wP<5CACOs{z>-5^>;0f!n~hvb +z!Iw#y*>(MEc)WSK8{b}AOPP*nyVd2mNS+imGQN7b&|So6OXM~Lk!s9W0HXUMfsN3R +z9OIM&2QC>tAiUK!FVnpdvxsV7)lpsFE88`=16nR)e)Yo2X1tfa;#-_XjGho-#8-C* +zAsZ0|+-qGMJ79_O1$OsE|5@wAr#EsA5{i%UOo;z&0?PhRHuGQW-N4%JFYY}<{x9ym +z?GpX1^oa|~rTU^-l5LlRf+9j>HLy|`)K_EC1b8L*2pG-dwO!1>9_vUSLv%zx62P4p +z1R;})0EsSN7fb|q)28pmhKVSMohpry%_hNO`KZFFfNjpgb0F&52qL)_kw277HU3s| +z>sicUn3;VjivGI9(o#56(9#!HE29pQ*>?_K*)1@L;`!kQJ>~107WO +zLV*N(il6qZ3)@iWTa2r?_34a+F!?zt!X`^Z(V<~#!K@mS`^b6LZN@qhd#XjrPHvn_ +zz5ypzVPNe^bpA(gV7jVe8fU9RFhiHlJu-rW6E!&lm6HoxU=LfovUF6h#)p7s_vVRg +z`YJv87M;(r9mO)OGe1tAL6h-!E<(dAs?p)juri+|FTmgDhXfuVr1v&I+y7^PXb8Ot +zBX8%fbQE1}jO?}E1Ef7cO5yF16mZs$iF3n=fqBh>K9_TPY*_G!@uq{{^fKD;x`&eD@7FT8jD% +zCV|RI8m=H-8NYmz87K@%U}LPCM*|sSeESs2;I@s6NU}0Pyo|?L$oF}CGzaa+J+IIa +zTFh-*hs7OmMFIr_v+m;W4A63uC3Ui`ygh*%+|y)-!}5x3oRug8T2GP;rAxq2*j%uO +z%VF%G%dzA>sUMfDs5yic%$`XSlKHg-Ka%p=@@eHGT5?j>-{^|%zj&T@?dKxFH5=Q9 +z#x^K;vB=tcb4kPRy9C_A?z#Q=+?DgO3Tt}a?tn8PL4!hBB*|y4RK)e4n_Z|h +zJwDeP{A_95RofGHGdr_3mak_umWABKov4u5fS0IEnfK|-`GGI%^)`LdkniaP7z7RI +z@1wuJpLu;h`up$p+d<$zfxjQfd(T9F8}VCLe;$zi6aBls{;pE|ZS8MT&|m1^Wu8Cb +zzpHis-Z>5YKj6Pf@_(X#SDoG!y}u3rZ7ly7`fvK)pZMR!mv?RIZ;N|t?l1g*P^$iH +z>35al-`z0!mTvxP>38YoPx$X7)Vq}Nw;iMX1OBJ5@n;jiZ#CZ8s=rMN_n#y97kBk1 +z`1i#5@6%99_W$lp{zU)&)PGN|e;fA4-_U=j+CLlk{jv1#-bHL0BA|4WdHyG + +literal 0 +HcmV?d00001 + +diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx +index 0a646fd..93339d7 100644 +--- a/sw/qa/extras/uiwriter/uiwriter.cxx ++++ b/sw/qa/extras/uiwriter/uiwriter.cxx +@@ -319,6 +319,7 @@ public: + void testCreateDocxAnnotation(); + void testTdf107976(); + void testTdf108524(); ++ void testRhbz1810732(); + #if HAVE_MORE_FONTS + void testTableInSection(); + void testTableInNestedSection(); +@@ -527,6 +528,7 @@ public: + CPPUNIT_TEST(testCreateDocxAnnotation); + CPPUNIT_TEST(testTdf107976); + CPPUNIT_TEST(testTdf108524); ++ CPPUNIT_TEST(testRhbz1810732); + #if HAVE_MORE_FONTS + CPPUNIT_TEST(testTableInSection); + CPPUNIT_TEST(testTableInNestedSection); +@@ -6041,6 +6043,25 @@ void SwUiWriterTest::testTdf113877_Standard_style() + CPPUNIT_ASSERT_EQUAL(listId1, listId3); + } + ++// just care that this does crash/assert ++void SwUiWriterTest::testRhbz1810732() ++{ ++ load(DATA_DIRECTORY, "tdf113877_blank.odt"); ++ ++ // set a page cursor into the end of the document ++ uno::Reference xModel(mxComponent, uno::UNO_QUERY); ++ uno::Reference xTextViewCursorSupplier(xModel->getCurrentController(), uno::UNO_QUERY); ++ uno::Reference xCursor(xTextViewCursorSupplier->getViewCursor(), uno::UNO_QUERY); ++ xCursor->jumpToEndOfPage(); ++ ++ // insert the same document at current cursor position ++ { ++ const OUString insertFileid = m_directories.getURLFromSrc(DATA_DIRECTORY) + "rhbz1810732.docx"; ++ uno::Sequence aPropertyValues(comphelper::InitPropertySequence({ { "Name", uno::makeAny(insertFileid) } })); ++ dispatchCommand(mxComponent, ".uno:InsertDoc", aPropertyValues); ++ } ++} ++ + void SwUiWriterTest::testTdf108524() + { + createDoc("tdf108524.odt"); +diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx +index 81193ea..4edc51a 100644 +--- a/writerfilter/source/dmapper/DomainMapper.cxx ++++ b/writerfilter/source/dmapper/DomainMapper.cxx +@@ -3744,7 +3744,9 @@ uno::Reference < lang::XMultiServiceFactory > const & DomainMapper::GetTextFacto + + uno::Reference< text::XTextRange > DomainMapper::GetCurrentTextRange() + { +- return m_pImpl->GetTopTextAppend()->getEnd(); ++ if (m_pImpl->HasTopText()) ++ return m_pImpl->GetTopTextAppend()->getEnd(); ++ return m_pImpl->m_xInsertTextRange; + } + + OUString DomainMapper::getOrCreateCharStyle( PropertyValueVector_t& rCharProperties, bool bAlwaysCreate ) +diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx +index 15c6ae130ecd..743c07de9959 100644 +--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx ++++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx +@@ -667,6 +667,10 @@ PropertyMapPtr DomainMapper_Impl::GetTopContextOfType(ContextType eId) + return pRet; + } + ++bool DomainMapper_Impl::HasTopText() const ++{ ++ return !m_aTextAppendStack.empty(); ++} + + uno::Reference< text::XTextAppend > const & DomainMapper_Impl::GetTopTextAppend() + { +diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.hxx b/writerfilter/source/dmapper/DomainMapper_Impl.hxx +index 456ab3df371e..fac34be0adac 100644 +--- a/writerfilter/source/dmapper/DomainMapper_Impl.hxx ++++ b/writerfilter/source/dmapper/DomainMapper_Impl.hxx +@@ -684,6 +684,7 @@ public: + } + PropertyMapPtr GetTopContextOfType(ContextType eId); + ++ bool HasTopText() const; + css::uno::Reference const & GetTopTextAppend(); + FieldContextPtr const & GetTopFieldContext(); + +-- +2.24.1 + diff --git a/SOURCES/0001-rhbz-1820868-deref-of-null-xLayoutManager.patch b/SOURCES/0001-rhbz-1820868-deref-of-null-xLayoutManager.patch new file mode 100644 index 0000000..10301cf --- /dev/null +++ b/SOURCES/0001-rhbz-1820868-deref-of-null-xLayoutManager.patch @@ -0,0 +1,26 @@ +From 1a1a8a95d6f36411e1110bf9b6d27b7d58dd685b Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Sat, 4 Apr 2020 19:27:41 +0100 +Subject: [PATCH] rhbz#1820868 deref of null xLayoutManager + +Change-Id: Ib396ef9f5b019b08a181eeb5a8eb983bdb401db4 +--- + svx/source/dialog/srchdlg.cxx | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx +index 1f95fbe21a7c..445bc318718b 100644 +--- a/svx/source/dialog/srchdlg.cxx ++++ b/svx/source/dialog/srchdlg.cxx +@@ -2440,6 +2440,8 @@ OUString SvxSearchDialogWrapper::GetSearchLabel() + pViewFrame->GetFrame().GetFrameInterface(), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::frame::XLayoutManager > xLayoutManager; + xPropSet->getPropertyValue("LayoutManager") >>= xLayoutManager; ++ if (!xLayoutManager.is()) ++ return; + css::uno::Reference< css::ui::XUIElement > xUIElement = + xLayoutManager->getElement("private:resource/toolbar/findbar"); + if (!xUIElement.is()) +-- +2.25.1 + diff --git a/SOURCES/0001-tdf-121203-DOCX-import-fix-loss-of-free-form-text-in.patch b/SOURCES/0001-tdf-121203-DOCX-import-fix-loss-of-free-form-text-in.patch deleted file mode 100644 index 7fdfd6b..0000000 --- a/SOURCES/0001-tdf-121203-DOCX-import-fix-loss-of-free-form-text-in.patch +++ /dev/null @@ -1,334 +0,0 @@ -From 920f64d73cbb1b41f5a9eb26f8069aef45f29ff0 Mon Sep 17 00:00:00 2001 -From: Miklos Vajna -Date: Mon, 12 Nov 2018 23:01:12 +0100 -Subject: [PATCH] tdf#121203 DOCX import: fix loss of free-form text in date - control - -Date SDT from DOCX is imported as date control since commit -3ec2d26dc2017ac4a27483febfc63328632f352d (bnc#779630 initial DOCX import -of w:sdt's w:date, 2013-04-30). - -One detail I missed there is our date control is strict: it doesn't -allow free-form text. However, DOCX date SDT has an optional ISO date, -but the actual value can be free-form text. This means that importing -free-form text without an ISO date is lost on import. - -Fix the data loss by restricting the creation of the date control: only -do this if we recognize the date format or in case we have an ISO date. -Otherwise just show the free-form text to avoid data loss. - -Change-Id: I8125bdc749954a6a1c496de74b6682744adb7680 -Reviewed-on: https://gerrit.libreoffice.org/63311 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna ---- - sw/qa/extras/ooxmlimport/data/tdf121203.docx | Bin 0 -> 12702 bytes - writerfilter/source/dmapper/DomainMapper.cxx | 2 +- - writerfilter/source/dmapper/SdtHelper.cxx | 44 ++++++++++++++++--- - writerfilter/source/dmapper/SdtHelper.hxx | 4 ++ - 4 files changed, 44 insertions(+), 6 deletions(-) - create mode 100644 sw/qa/extras/ooxmlimport/data/tdf121203.docx - -diff --git a/sw/qa/extras/ooxmlimport/data/tdf121203.docx b/sw/qa/extras/ooxmlimport/data/tdf121203.docx -new file mode 100644 -index 0000000000000000000000000000000000000000..5aa3b2ed74744972aca0224e6f7c4102aedb7462 -GIT binary patch -literal 12702 -zcmeHtWmufqvTozJdmtgWTX1)GclY4#?lclyf;$9)y9R<2+;3<0%$b?&+4tW6 -zXE#sxS9E{%QdC#1dTXtcmx6%A1V95|0RR9Q0FE*=z#j|%h=BqCFaWUNn(u6FoQ!Rp -zbd}xhj2*R^+^nrg^C7`$asl9=`~Um+U+jT~L>ak2A=Hpls%MzG4-m^9ECY$xxmTq! -zmFMkD?-qxAj7%S{PKhL?%JYgeI$}Swo<58rumw&@rc8nJ(^)Fc$$2nci{}JHM*7Uid32ONtpiPcRfbyT3c1` -z-X>+Z0_BlwU<1!pLl1U<-Hj({`R8dqjT#50w%fA;kE>s-51ftRu -zDoJ-f2iSkuZ&o=GQR{ga?NT@jcMaHK$5%Sn>46J>VTlrL#UTIE4zaHFVCraP6r(T{?Pl9f4mw{T5gEX10zUdrYf==#u3xtIdOtgew-{kw>8eS>~sqU0KB|F0ObFc -zxx{h!O&6eWlm#Uw0w{BJ9gM9UnVEjR{x@U)7pLi8{`IK%Wl0EO#E?^{b^Rf4u4Q=g -z>BTkiJXi8Vh@iA1FjwTU!lllR0@7CbWu0%Ad!ur58G#uyd?ozQHTvqaxeFP3V(XS} -z)=iNx^6EpH=>eulViQ1f8{0W%{B?f<VocmMBxR3^yC1+n~VnV)XMRMn1Nti$10tf)R;VN@~;N_HARdG5ffhabs@VUjUP -z@0|Q9(WcQgt8xiW99{4zMiAwgj>VY`}_an&7e)G5bL-yKZd^-!}Jb`MtGHblqp~ADMkjcoy!! -z)rq3`gtbwS_e0cDerE7xCH;puid$6F9ZA9dP=~P76{Zglb#@PezpclIA2u>2gcEyC -zUnZtiPs+0gKUhj`S;>ZfSXh1WNb2~e6NDnDb&dSj7z2P9RJoIxOlUECl`m)wPJ;me -z&_Gf4Ta5iRx>S_m01znrJDNYA&Ta?*FvxvSJVF|Q;;cwz*k+jpwPTMSat%wOx(PNe -zkW(~(FbZ47gUKu+K1`lcc-m#P<}^&B3euk-r*CnsJ&jDP$<u`zUrZi=JC-o!f`-PuNu}4LUY*dYO{1$g@kYH&!&D -zy6?-e7zei88FzTkIFxv>yWlM)xE%w_UGGTL#-l=t(ng2)an!mY=p-H!5z5Y!At?5n -zKdg#3wEo~zK$|#ji-J5yh5P=kpjk%$0?weW+u!3|gzL-_pM+vN4EqKyH)MjhB)+N1hY`ff}Mj -zUu;>IRT|E^Fb;cTQ*_)gLiK~q2hFcCG7Au+8`HR8%LzL2AaOg{Ub+)io*!}eH;%;; -zhS@8tMZxwK(I>jY*9SfgOD-r+v1>F-_5J9%-cr?|AJzHBPN0Smp#;z8``TWemG)R@ -z%ylljL_K_G7B{*lXs-Gl{UZ*^r#9S7xcfkL@R_bLKI(b=d59a9fNSGsd(IcX+1WRL -zXA~@}?`TV*0f0gR000XVoWDh~lbNx#G4pS)uYazUN9uC6%bb{9C=0HnPPT^BF8DCc -z5eu~$j4}j$Hlf7k;mHf~`9jkY-ULhAeqg<=`k`10)}i{E{@4pe5A2J)RzzQFfMSaA -z{c1Y#oC^_Ef|TfY+Yc|qBxM!zCxeJY=w!5VOFB;u$E(EG%vJ8nqHosQBIZ>@3;5tBNHX(Q<4i&dewBk(MssqjJ=P-YLBp^MZJaH -zAFwiSQPtFrcrC-9xPd#ghX1il?u&fFC8xud0CY`wyvJu#gIoy=)8KAs80Y9%rA1?K -zB7?bWKe^8zLv}iUp!O$s?I)!MLmve31CwoB7oC5M(*`145SSe0za -zS1aQ>wR~tJ5(3BDPfHetj*Hy{vHe_oXVDWTO>GAoNJCp6_RgN@t7bzYxpKp%cJz>| -zh?Y)GXAp)`>yIUG@juU7;CY1vn9<}*)#F}>Fh+dBUEj_}0U#NvO+l8KOAaiA(wuC$ -zQPRvIp7C}U;qmQ^wvde@Na%i1{?vh@goyXL;O5}&rY8H%`$3d!qBpnSZ#R3lVcuxG -zohY}?4BAy;?s__!93&}tlkIcyV+v>1O?}|yzL&b|@zI?Fb=s6_B9b}h@%m^uvPSUf -zsZ9*)OvYc#_%?PxBtK&Z_V@x9lTFqB6*Yx@Csr@)*B=q%l!@Hk=~7Tn*%5@7fP8=q9wUjmV#V+X5+_@!sEWQ~i4jdbL -zsr9!-Vhnb5NWeR@p-73H+lUapzQL8nM3#7qIqmr97Yl!UqIj_2oN^x^C8)a3^qxqX -zUWT=hf;!zKve6vTCr$M`;^rDWH;@|XkzEIK`zKMlF&Br~qSAkmJwF%jGJ%fU-?asHe_1!H>5OubA{O;RbEa+Uv6|cS^cAn;7G*yzL-dA%DJzSeUEXICBy=rr5f%0@J9rt-)vqFN -z)8dd{Nwx&_=HpctR-J#jrT3h%I(QdWMTlOZO}wy)C6JlJ0naL0{)N!YQItOYvwB*U -z)^J#WO-*lQbucemQ!Cmy=KE01ygJTWp2WamgjqcxkcyoHR)Y-qgD&%q!;8JO?OpG%(92EZQvEj0^RAuVOmv2Y!dmp=%{v?#giOxUnZ5O -z9^h64DV_s8W!M(lCWk}oS3sw_YZex&0Mq@=&LH|&!dW6P9X;o^uQNFe;fGJ#> -zVG*AM7RZO^d*YcaTp-WIv+LzZr(S!rM0i`mN0Kp?o2VHo^Dbez3$@k^#iXrV+ctU6 -z(^ef#;I(BvzPl=*ep>a*$n-PEd+t3|OZvIYfzfd-?z64-0TwlO5!w|pvL~49H*{Vm -zT`v1b&Oz(J<3c)5tNo_H}`rsqD0tOO?*ks-s+o2q#VmozziP -zulORnCe4rXc^nscTHN9WCK!$umSPy$Ioz&|B6_}XzZt?EOr12^WmflcLLuycT1TXk -zmcWoc%aYXF&x4^tA-!W1t9ROF1{JP}!>xK45X>&Aoax%9ub^KY@ -z8dR5Umbp>AnSn2)`|d;%FlUrkKBE1`lc(~%D>@Qs`6t3+T -zOiLe4!^=*~V_p{&k0ZiWtDdE+ksaYTEdQEVu}b&i(Uh&dljba%Sz4SooZ_5+Oe -z1M&eTe$3Vn#@sS#n&)FLP>mFkP3=(NaVA!PoZzDaIldzQ2Jj4vQtUe{ml>`qW6qfn -z;ZRC_KAlAOO{_#~3FZ|dbAl42bVAsHH#r{PY#~lH4K49;{9QIVh?JE$?#zps3~oGLT@toJlC` -z+*DmRjv6o}GbDrHhBe7mxSxq8H&9H|0 -zJuX09$z~jB8CtED447djhTx_U;dph2HabZdh?47xQGg^QT}TsLfgOqVk=}LGIDWa) -zIzFXG;YD_q{(cug3{0&yEhXwi&6~9iUwTEAn(l4wb@!?FoSPVt+9(Jqk^jnZ|ylzdXGUgsemAK736Dm=9qzVGj9G6oUjKBWd#Jf;n; -z({}cF8sIvd-cWFM#st{wFCEF(!>klWIfSCLY%0gYXjSg=Blegv4k_H6gjb3E82A>> -zUeHHItCD*W?uZ-cySsJcGFWSzQD9Z#{OBpIWp{{gV&}+*q~@TOEF21v^sK4%1j@vJ -z&rzIQY*}zn`&|ioV*Zh%uEqvRe@WA*FWr(5uTh~l+BWzYTACJ<$m^V%NEOe?1MUIl -zE-nOPMm^FNm2$RA<)k_uqm*eM(|lX*g>*Y0A`8Bhndnr&2NZP&mnqdSA1+3hQ>L-t -z%7O8If>Ee={$Y@|jF@36UiO$+P9v<*khN5dsae%;0~S3-`D@SS0an_HB#b!)##>~p>Zr62xo_Of -zv~G>l``^H38KdKWZD%Nu!}t!NvXpV}_O^zu;kXwwY^aAJ0tAJ^7{~M)*m@pZZvAK^1Bk+kaQPZt -z4R2J!4UcUTmF$Q)01dG=JU3nBR<}_C^z6Sb1oh6!UG7O|Km?^^dyk -z@!l+Z*nG^C{;FDZ@4>r9X{(hqieJa84)bs>GeG&C*L(fRp!=ILwj -zH6&TTsI`tFMYbFUt@VT27>q{v&jrVqV+vT`J7LPsid@I%8Bpq!y`^muwhYfDUM|!{ -z)eo$g)ehk7VbH-<--1DR>4=uuZ4yjOAF*Otou&|6&8^wCvsb7+(0FaiV!nPtu@bD+ -z+ng}jO`zZHt}q3QBpxy4=WW$h6;N-!o`OGO(n=;|WKOCLN3MTtLbrLObGt3n4o`!j -zN8z^0vPUJ8f87rkG;(5v9AP5(I5N9a$DaTtLI6;kW$>yT=QhKjnVqKL^ctOCFT5Fg -zGKSV=&>9a2z2RyKkA)lB@9}<6eZ9FEAG%d>=3R|1a(*PZ1e^0xzd7YS^0a!9lkg2O7^`@e^ -zd=*8WKq_DOZ6qnEqmc(8h>~YnYwt|vaKB?ql!Iv6PElzO!@8#6Rp_y80=!#(`;*)H -zVH*8Ml3#PbCM3(!hL+$@(* -zQG9He{x->rHzgaUt404HF*7nN2AyWd2{%H=>Q-$?qHK6A5fzO`m}4&LGk)`O$EIbe2CmoXqssIj+brGOOtEgv8dAcNA#0pmhX&Z)+2z!hh -zh0t~w7x-^NZ+{yJYqlGOnvpdyT?5M&QoQT!oyvMZ`BpR_?o)TE_BmHU-KjbKYS&5( -z=^6-JSms<*erVAg!xmDi>up&O{-`8T0LR}j|1)?P0}8hCzy8QnNXJ&yhbLPcTgc$d -z++sHhnw_H=$XOdjGzNzN3kLc%*kqqzMMNkm9IjWT_I(6sQ`{hvqAAv3zx))Ca87-O -z+_s|iKt@_vsI;Sz*72*!|90g(!m{na^=be -zp%lpR#oE!({=Z>GeSU>)|J`0^*twr}eeWS;Sc8rA*#*Svyia5Y0f&VRpxHv2HM`xs -z8vr>ivJy#EsRDFo+-~>pUKY-(55CCX-!A)_O#V5WjYf_m*S|iQQs4i*U)OCqwOvK* -zO%5_1ECU54s^$m;!Il^;3DHXT$=76X;etLoR7H~SK2s%5bU0|TdqiAtC(oS@o#_ZH -z(e|x{IyvqB%kO3n-`;z~w{k=Jm@vQAS_~ge*d4*wLRGwJji490m)%Fwf~BjzD(ybV -zMrki)R>Ass^|Fkue2W+6p@*?+?YG+|04YXHQnr#VnE5w|1l~M9A(Az5?CCpOp8qd$6l-E$OoOJ1s -za-B -zYTl39+~eabw~?}vW~`|3+%VbrOr&@d(?eN5Hbf3_`8EA`RIg1B;PjLF7qSo1w2xCk -zS+d(YmX33Q5Dy!DLRRTi=5;nvEN{9=BKPKPX4OjP=%GvLxJNtAIFz9}`Flr?J3IaF -z1O*_$^sr0k8<(VNt3Dl$Otj1$GZGS5w;&`H&?Gw8jlpmCB6+SVkOM6b9?1!vU-`Wu -zWM=evXHAXZIrSVG;ZzmEax|m9@DZLLzIdl2*mOt0(@SGQfkR@Lor+SnL@IuFQ9HXh -z=UBAhey&iEOs@V(_uQw_4SRna&v)zq#6ka^oyt-~2lIhGvE~H;Q2x$Nf9tt3)*Ul` -zQc~M*&oCi3GqqU*^U|xb>5cPa4IK@#-?EKk4Q0UWNx39m?lr4e$n^BMzLcbrEPYgM -zyRSYHuUTIkjJr`XX_+3L>a77D$8SRUST`?rM2m^L*k=w&%pJpcDuJDN$~JS|-@EnRsLzDmQePIiCi -zcDOdki=Q65EYzn_6)tw{c+LDdE&On*FFoMfSHnk4u}&Nq)0C$0i9X(d?zW8VTU))I -zw?yqJ1htXUHq7-EmCX#*XOm)CsVi-K81A_<9Eh~IVOR_IPT4ynq11{y-}palZS+=o -zA8sU&a$#AXDwjTnzxvko`I{UXb?ee`# -z18>s+)&93<+y2$d@C&|M3cw@NMWUZs}1%0LoUEj%~iWgHZjEmI9^5u5mQ(aS-SanE>C)GRet$n-?Y -z)|yP6O5UR@eL{v-$j6&5@4g*o2565I-2Lb8;Ps>-$fQ+eLo?Q+LIDu -zA-kBB5PNRh%#^xabO|^d7`VmOCG||$p**a^y{&N#6lObAm<4MXJvj7g4o}#m(n03( -zALg@S!0z<~YZYWCXX2t$mq00>@|Ws7;2zU;F08bk8p>b8jxPKT65>EY;yy_50||aN -zjb?pKP46i(vlzksdsHU#d19c=4Rq--B$hjs{E8ups%bdZl7{-Msivz;5iC2FwGCR9 -zs*tKGXi6q=Mw5n}9G3aW<+F}wyc?-}!@gDxVO7R^g!pjU?bjTa4?gfI=`$Y`Np*(E -zHM8)j^;DCi4OPXwO>>|BvGzW3>bc@t)h20bxy4`qsnVutK-0Q*=ekE$6S~8jGV^JY -zZt(SfrgRBo^(7v4|5?K;W)L5Y%UkMy$Rn#1mCed#>(P3rhtn3i-xpHK)8^3u1j}vS -z0Br<7HOTFE(KC5Ha1JCsw<%sqKLkCu^;}6mq>`+j8`F<_-cBFH70(9mlUM`HR5VpwU8?6~1&Ia`^Ja%YTe -zN6x~Ca`7z(^pL)4K!-85uJ6hj`(kWkLnwcDs9NO9+GC^uyb5awd2ak#?29B|ImJ)6 -z%j%ya>@c$tO)CF=YWV}pckG5g1r))Rj5~z3}PmprUKdK+|_BLK%Cm48o+Y*liSbHZo*DjRe)MwJ2q -zQ5Bh8?*8fw75Nr)Qa2C}#P~@F!G05dCxjSkR@O8epXk;gQ9FC?%5_0hMFvp&sk==3 -zJY%Z!BroZNxrri-%fAO%Ua1`p)5U42FXMC12kta^!z4v9JrM7K1o1SPpM>o%g5CK^ -zXcYAtB(^4jq)b%=7g%3%C_0D`g2U==n)M2w52(K^_h$&{!<5plLBjL#atJfxltE(i -z32~@`-oWnckq8M09v-*1AUvn~f7-1{ED0inaHNf#gqXIOQC-?U?et6ElF0=YC}GSf -z?!hv+_*qmcw!<-ufe4`tV3U3l%AOxY2;qqT$L!yEri@BPEz~PPfko2s~~}ICLyE?ptjeBk0gdqnDFd|IZzvhz3#~ -z^4eY{S12DFYdzQENsSUU#3Z+qPheJxlz75ebe%FOo1gc39(IsFvoGmO3aq+Al!TTK -z2A{db3vfd|v7^uuE=t_+jaG4RlNwDrV~P2lg{{0Igr$qQS{S&_L}?ETEst2f^<55t -z&+!jK$|%)Cs07H0IOj$no$eA-uAJz=G#y0@#_$slFSyn(5WO^qIGhSB7A!8>8oCC! -zUgEh%xW>eV)-;!L^1+7I1EstLf?}&ET>B6OwW!G4U_&9#yG)o;H#_W#H|~O?@|nR= -z3h}ZUyYPpj?d3`a)xa!^=az7Znwlo<0=chuV!^~iElgL6obv_b; -zRFV0^ui0O%>dYrA=f+$bu3zW;-~vs7{X?A%*~8cx15v_!NB{u+k2-4t8st>gH?aDR -z6DB6C+HA3)2A_Udat-s+-3n@uDhMez5Iz{!sa%3#86caxr~ZLk*X}*&l8bW*gFY-d -z;U+tfBTG#DVwrRt3}G(wE&}dV8q11J;UeeGm9aA$1)iG;r?ff+z5}Wd@!lI>ene-> -z=upH5q?vTC!i&zD3qm()_Q3Gt;BEuUEE8hgRnGabr{ycIm4j^emSoBMcRGq5Vxk1D -z;gQyw!~M3St{S)`502EByc!T$N1OYcT3eiIP2aOXEO)X}<;Pd)^aL4&EIjk!EU4vs -zIASU}jNNYdWd!`32J*CTR~K_?gLCkUNblc&qiD7&Mfys^lp1eIZJ1{|5I_TLG%Y7< -zD5Up@v}~s5MWP=Lgg8xw*!)P4GD_JbE#=Hz&LZxoykE4ps<6&R-78cE=@1!ARB8S$ -z8LFs3t4drkB1D;npHWsa{9VzZ&kCCWZ7Lxl!+jrPzxSmul=lD=erHLqv8)}_ETKw?Xj>S3CVKxx~C#0+X|w)S+LJEaoac|=!2u- -z45RQA-!BOZc!68v;aH<0Y^mP+MM7Xi_e{2U@aSvbHfxi2G -zP&WyvD5e6Hr -znk-(jWxj@x+T1pHlfrvOlzXO(;UdRs>QIEwU)|S3YMh|$kVT`{?rFU%|*1-#}u&@ -zvB{LDQflIZIR?|eY<*u->QHxs^QOFmx|fjds2vUN&eC>pEJ=z87#BS9N}q0(OczxE -zTrC{ha1sg1t2GzdjYe-Vg48Jg@smKKv!}i>FfxzygD|`B?X{V;2r#*4BVKgx6APOE6DrUt3&&-0c(07SqvrO6 -z{^pCRBma+#%&6NkrMBz0@hQ5!vTkZhq@_bo633x_)E-fK_w=+h%elPAcgy?R54b+B -zbhRcBG(y{D2?d63wQspV{{B}d00zzo+Q={3&%6Gi`19Hd -zS`_~>{raoo--iJIs<;LkcKN@J1pY)KhWL3F@lT^(xW7SxQV&q*{}wc&`wxR(Q2!eI -z`eo?rR|9{YyZO^ZM8y9vh4U-KujiY8LhOMG!f%%S^|bR>^3Cf()g?LuVwU4 -w<$l`VmH$>$f7So{Qv9bj0MJeU7u$bdnB}FQK;Z`fAcB6#KoM-p^z*m>14q_gcK`qY - -literal 0 -HcmV?d00001 - -diff --git a/writerfilter/source/dmapper/DomainMapper.cxx b/writerfilter/source/dmapper/DomainMapper.cxx -index abfc8694535c..52c36c55d03d 100644 ---- a/writerfilter/source/dmapper/DomainMapper.cxx -+++ b/writerfilter/source/dmapper/DomainMapper.cxx -@@ -3339,7 +3339,7 @@ void DomainMapper::lcl_utext(const sal_uInt8 * data_, size_t len) - } - } - // Form controls are not allowed in headers / footers; see sw::DocumentContentOperationsManager::InsertDrawObj() -- else if (!m_pImpl->m_pSdtHelper->getDateFormat().isEmpty() && !IsInHeaderFooter()) -+ else if (m_pImpl->m_pSdtHelper->validateDateFormat() && !IsInHeaderFooter()) - { - /* - * Here we assume w:sdt only contains a single text token. We need to -diff --git a/writerfilter/source/dmapper/SdtHelper.cxx b/writerfilter/source/dmapper/SdtHelper.cxx -index 2e93f1b98c83..86d153092ddb 100644 ---- a/writerfilter/source/dmapper/SdtHelper.cxx -+++ b/writerfilter/source/dmapper/SdtHelper.cxx -@@ -17,6 +17,29 @@ - #include - #include - -+#include "DomainMapper_Impl.hxx" -+#include "StyleSheetTable.hxx" -+ -+namespace -+{ -+/// Maps OOXML values to UNO date format values. -+sal_Int16 getUNODateFormat(const OUString& rDateFormat) -+{ -+ // See com/sun/star/awt/UnoControlDateFieldModel.idl, DateFormat; sadly -+ // there are no constants. -+ sal_Int16 nDateFormat = -1; -+ -+ if (rDateFormat == "M/d/yyyy" || rDateFormat == "M.d.yyyy") -+ // MMDDYYYY -+ nDateFormat = 8; -+ else if (rDateFormat == "dd/MM/yyyy") -+ // DDMMYYYY -+ nDateFormat = 7; -+ -+ return nDateFormat; -+} -+} -+ - namespace writerfilter - { - namespace dmapper -@@ -85,6 +108,14 @@ void SdtHelper::createDropDownControl() - m_aDropDownItems.clear(); - } - -+bool SdtHelper::validateDateFormat() -+{ -+ bool bRet = !m_sDate.isEmpty() || getUNODateFormat(m_sDateFormat.toString()) != -1; -+ if (!bRet) -+ m_sDateFormat.setLength(0); -+ return bRet; -+} -+ - void SdtHelper::createDateControl(OUString const& rContentText, const beans::PropertyValue& rCharFormat) - { - uno::Reference xControlModel; -@@ -107,14 +138,17 @@ void SdtHelper::createDateControl(OUString const& rContentText, const beans::Pro - xPropertySet->setPropertyValue("Dropdown", uno::makeAny(true)); - - // See com/sun/star/awt/UnoControlDateFieldModel.idl, DateFormat; sadly there are no constants -- sal_Int16 nDateFormat = 0; - OUString sDateFormat = m_sDateFormat.makeStringAndClear(); -- if (sDateFormat == "M/d/yyyy" || sDateFormat == "M.d.yyyy") -- // Approximate with MM.dd.yyy -- nDateFormat = 8; -- else -+ sal_Int16 nDateFormat = getUNODateFormat(sDateFormat); -+ if (nDateFormat == -1) -+ { - // Set default format, so at least the date picker is created. - SAL_WARN("writerfilter", "unhandled w:dateFormat value"); -+ if (m_sDate.isEmpty()) -+ return; -+ else -+ nDateFormat = 0; -+ } - xPropertySet->setPropertyValue("DateFormat", uno::makeAny(nDateFormat)); - - util::Date aDate; -diff --git a/writerfilter/source/dmapper/SdtHelper.hxx b/writerfilter/source/dmapper/SdtHelper.hxx -index b6691b55770b..8942c059e510 100644 ---- a/writerfilter/source/dmapper/SdtHelper.hxx -+++ b/writerfilter/source/dmapper/SdtHelper.hxx -@@ -88,6 +88,10 @@ public: - { - return m_sDateFormat; - } -+ -+ /// Decides if we have enough information to create a date control. -+ bool validateDateFormat(); -+ - OUStringBuffer& getLocale() - { - return m_sLocale; --- -2.17.1 - diff --git a/SOURCES/0001-tdf-131069-always-produce-utf-8-from-gettext.patch b/SOURCES/0001-tdf-131069-always-produce-utf-8-from-gettext.patch new file mode 100644 index 0000000..ced84f5 --- /dev/null +++ b/SOURCES/0001-tdf-131069-always-produce-utf-8-from-gettext.patch @@ -0,0 +1,31 @@ +From dc8db8308840516115a3f7cc9397a5c37bf99862 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Tue, 17 Mar 2020 20:14:17 +0000 +Subject: [PATCH] tdf#131069 always produce utf-8 from gettext + +Change-Id: I311e647f08b4d541825e7790d971b98b5b5bfe40 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90631 +Tested-by: Jenkins +Reviewed-by: Adolfo Jayme Barrientos +--- + unotools/source/i18n/resmgr.cxx | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/unotools/source/i18n/resmgr.cxx b/unotools/source/i18n/resmgr.cxx +index 47069489aa41..786c83df2e7b 100644 +--- a/unotools/source/i18n/resmgr.cxx ++++ b/unotools/source/i18n/resmgr.cxx +@@ -130,7 +130,10 @@ namespace Translate + OString sPath(OUStringToOString(path, osl_getThreadTextEncoding())); + gen.add_messages_path(sPath.getStr()); + #if defined UNX && !defined MACOSX && !defined IOS && !defined ANDROID ++ // allow gettext to find these .mo files e.g. so gtk dialogs can use them + bindtextdomain(pPrefixName, sPath.getStr()); ++ // tdf#131069 gtk, and anything sane, always wants utf-8 strings as output ++ bind_textdomain_codeset(pPrefixName, "UTF-8"); + #endif + gen.add_messages_domain(pPrefixName); + +-- +2.25.4 + diff --git a/SOURCES/0001-use-the-LinkManager-persist-to-determine-the-Referer.patch b/SOURCES/0001-use-the-LinkManager-persist-to-determine-the-Referer.patch new file mode 100644 index 0000000..edd284b --- /dev/null +++ b/SOURCES/0001-use-the-LinkManager-persist-to-determine-the-Referer.patch @@ -0,0 +1,46 @@ +From 3ee652e1c18186a5de47797aa4b02defcb29c210 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= +Date: Mon, 11 May 2020 17:02:50 +0100 +Subject: [PATCH] use the LinkManager persist to determine the Referer + +Change-Id: I4e93878972492a93af368ffa0560412132431a24 +Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94061 +Tested-by: Jenkins +Reviewed-by: Stephan Bergmann +--- + svx/source/svdraw/svdograf.cxx | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/svx/source/svdraw/svdograf.cxx b/svx/source/svdraw/svdograf.cxx +index 7e14a6d3bdd9..53b3e00a35fc 100644 +--- a/svx/source/svdraw/svdograf.cxx ++++ b/svx/source/svdraw/svdograf.cxx +@@ -19,8 +19,10 @@ + + #include + ++#include + #include + #include ++#include + #include + #include + #include +@@ -109,8 +111,13 @@ SdrGraphicLink::SdrGraphicLink(SdrGrafObj& rObj) + { + sfx2::LinkManager::GetDisplayNames( this, nullptr, &rGrafObj.aFileName, nullptr, &rGrafObj.aFilterName ); + ++ OUString sReferer(getReferer()); ++ SfxObjectShell * sh = pLinkManager->GetPersist(); ++ if (sh != nullptr && sh->HasName()) ++ sReferer = sh->GetMedium()->GetName(); ++ + Graphic aGraphic; +- if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, getReferer(), aGraphic, nullptr)) ++ if (sfx2::LinkManager::GetGraphicFromAny(rMimeType, rValue, sReferer, aGraphic, nullptr)) + { + rGrafObj.ImpSetLinkedGraphic(aGraphic); + } +-- +2.25.4 + diff --git a/SOURCES/0002-Related-rhbz-1618703-Properly-handle-failure-encodin.patch b/SOURCES/0002-Related-rhbz-1618703-Properly-handle-failure-encodin.patch deleted file mode 100644 index 6d9c1b8..0000000 --- a/SOURCES/0002-Related-rhbz-1618703-Properly-handle-failure-encodin.patch +++ /dev/null @@ -1,124 +0,0 @@ -From 0df85fe6a19d90d73397f8006c62d61e96976817 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Thu, 23 Aug 2018 16:55:40 +0200 -Subject: [PATCH 2/5] Related rhbz#1618703: Properly handle failure encoding - zip file -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -...when e.g. FIPS mode makes ZipFile::StaticGetCipher fail by throwing an -exception which would be caught by ZipPackageStream::saveChild (in -package/source/zippackage/ZipPackageStream.cxx) alright (and translated into -bSuccess = false), if ZipFile::StaticGetCipher didn't unhelpfully swallow and -ignore all exceptions in an outer try-catch. - -Change-Id: I14376128515df1dd4bdac921edd8ab94cc9b7617 -Reviewed-on: https://gerrit.libreoffice.org/59514 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit 3cc6d3611ac8cbbfb9803f3a084d02edde470ad3) -Reviewed-on: https://gerrit.libreoffice.org/59569 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 2b5ff36afab8888cdbc879ae2f34903ede190c04) ---- - package/source/zipapi/ZipFile.cxx | 75 ++++++++++++++----------------- - 1 file changed, 34 insertions(+), 41 deletions(-) - -diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx -index 1ef81bf582a5..8126ebba305b 100644 ---- a/package/source/zipapi/ZipFile.cxx -+++ b/package/source/zipapi/ZipFile.cxx -@@ -162,54 +162,47 @@ uno::Reference< xml::crypto::XCipherContext > ZipFile::StaticGetCipher( const un - { - uno::Reference< xml::crypto::XCipherContext > xResult; - -- try -+ if (xEncryptionData->m_nDerivedKeySize < 0) - { -- if (xEncryptionData->m_nDerivedKeySize < 0) -- { -- throw ZipIOException("Invalid derived key length!" ); -- } -+ throw ZipIOException("Invalid derived key length!" ); -+ } - -- uno::Sequence< sal_Int8 > aDerivedKey( xEncryptionData->m_nDerivedKeySize ); -- if ( !xEncryptionData->m_nIterationCount && -- xEncryptionData->m_nDerivedKeySize == xEncryptionData->m_aKey.getLength() ) -- { -- // gpg4libre: no need to derive key, m_aKey is already -- // usable as symmetric session key -- aDerivedKey = xEncryptionData->m_aKey; -- } -- else if ( rtl_Digest_E_None != rtl_digest_PBKDF2( reinterpret_cast< sal_uInt8* >( aDerivedKey.getArray() ), -- aDerivedKey.getLength(), -- reinterpret_cast< const sal_uInt8 * > (xEncryptionData->m_aKey.getConstArray() ), -- xEncryptionData->m_aKey.getLength(), -- reinterpret_cast< const sal_uInt8 * > ( xEncryptionData->m_aSalt.getConstArray() ), -- xEncryptionData->m_aSalt.getLength(), -- xEncryptionData->m_nIterationCount ) ) -- { -- throw ZipIOException("Can not create derived key!" ); -- } -+ uno::Sequence< sal_Int8 > aDerivedKey( xEncryptionData->m_nDerivedKeySize ); -+ if ( !xEncryptionData->m_nIterationCount && -+ xEncryptionData->m_nDerivedKeySize == xEncryptionData->m_aKey.getLength() ) -+ { -+ // gpg4libre: no need to derive key, m_aKey is already -+ // usable as symmetric session key -+ aDerivedKey = xEncryptionData->m_aKey; -+ } -+ else if ( rtl_Digest_E_None != rtl_digest_PBKDF2( reinterpret_cast< sal_uInt8* >( aDerivedKey.getArray() ), -+ aDerivedKey.getLength(), -+ reinterpret_cast< const sal_uInt8 * > (xEncryptionData->m_aKey.getConstArray() ), -+ xEncryptionData->m_aKey.getLength(), -+ reinterpret_cast< const sal_uInt8 * > ( xEncryptionData->m_aSalt.getConstArray() ), -+ xEncryptionData->m_aSalt.getLength(), -+ xEncryptionData->m_nIterationCount ) ) -+ { -+ throw ZipIOException("Can not create derived key!" ); -+ } - -- if ( xEncryptionData->m_nEncAlg == xml::crypto::CipherID::AES_CBC_W3C_PADDING ) -- { -- uno::Reference< uno::XComponentContext > xContext = xArgContext; -- if ( !xContext.is() ) -- xContext = comphelper::getProcessComponentContext(); -+ if ( xEncryptionData->m_nEncAlg == xml::crypto::CipherID::AES_CBC_W3C_PADDING ) -+ { -+ uno::Reference< uno::XComponentContext > xContext = xArgContext; -+ if ( !xContext.is() ) -+ xContext = comphelper::getProcessComponentContext(); - -- uno::Reference< xml::crypto::XNSSInitializer > xCipherContextSupplier = xml::crypto::NSSInitializer::create( xContext ); -+ uno::Reference< xml::crypto::XNSSInitializer > xCipherContextSupplier = xml::crypto::NSSInitializer::create( xContext ); - -- xResult = xCipherContextSupplier->getCipherContext( xEncryptionData->m_nEncAlg, aDerivedKey, xEncryptionData->m_aInitVector, bEncrypt, uno::Sequence< beans::NamedValue >() ); -- } -- else if ( xEncryptionData->m_nEncAlg == xml::crypto::CipherID::BLOWFISH_CFB_8 ) -- { -- xResult = BlowfishCFB8CipherContext::Create( aDerivedKey, xEncryptionData->m_aInitVector, bEncrypt ); -- } -- else -- { -- throw ZipIOException("Unknown cipher algorithm is requested!" ); -- } -+ xResult = xCipherContextSupplier->getCipherContext( xEncryptionData->m_nEncAlg, aDerivedKey, xEncryptionData->m_aInitVector, bEncrypt, uno::Sequence< beans::NamedValue >() ); - } -- catch( ... ) -+ else if ( xEncryptionData->m_nEncAlg == xml::crypto::CipherID::BLOWFISH_CFB_8 ) -+ { -+ xResult = BlowfishCFB8CipherContext::Create( aDerivedKey, xEncryptionData->m_aInitVector, bEncrypt ); -+ } -+ else - { -- OSL_ENSURE( false, "Can not create cipher context!" ); -+ throw ZipIOException("Unknown cipher algorithm is requested!" ); - } - - return xResult; --- -2.17.1 - diff --git a/SOURCES/0003-Related-rhbz-1618703-Properly-handle-failure-encodin.patch b/SOURCES/0003-Related-rhbz-1618703-Properly-handle-failure-encodin.patch deleted file mode 100644 index 8886ce7..0000000 --- a/SOURCES/0003-Related-rhbz-1618703-Properly-handle-failure-encodin.patch +++ /dev/null @@ -1,284 +0,0 @@ -From 7d7089282e764d5c8481602fb2067c619882e45e Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Thu, 23 Aug 2018 18:10:01 +0200 -Subject: [PATCH 3/5] Related rhbz#1618703: Properly handle failure encoding MS - file -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -...when e.g. FIPS mode makes EncryptRC4 (in sw/source/filter/ww8/wrtww8.cxx) -fail, but which hadn't been propagated out to SwWW8Writer::WriteStorage (in -sw/source/filter/ww8/wrtww8.cxx) - -Reviewed-on: https://gerrit.libreoffice.org/59518 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit 229340812f6e6cc8c868915055583f60c82a8cf3) -Conflicts: - sw/source/filter/ww8/docxexport.cxx - -...plus cherry-pick of follow-up 8114f976b897c4717368146a49d5404ef970c77a -"coverity#1438527 Nesting level does not match indentation" - -Reviewed-on: https://gerrit.libreoffice.org/59572 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara - -(cherry picked from commit 5be8cbdb874621111cb157a98013e254de3b269c) -Conflicts: - sw/source/filter/ww8/wrtww8.cxx - -Change-Id: I1123136ce1a25e181a0a27486954621a2dd095ea ---- - sw/source/filter/ww8/docxexport.cxx | 4 ++- - sw/source/filter/ww8/docxexport.hxx | 2 +- - sw/source/filter/ww8/rtfexport.cxx | 4 ++- - sw/source/filter/ww8/rtfexport.hxx | 2 +- - sw/source/filter/ww8/wrtww8.cxx | 42 +++++++++++++++++++++-------- - sw/source/filter/ww8/wrtww8.hxx | 6 ++--- - 6 files changed, 42 insertions(+), 18 deletions(-) - -diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx -index 477422bee989..0b40a58df2bf 100644 ---- a/sw/source/filter/ww8/docxexport.cxx -+++ b/sw/source/filter/ww8/docxexport.cxx -@@ -490,7 +490,7 @@ void DocxExport::OutputDML(uno::Reference const & xShape) - aExport.WriteShape(xShape); - } - --void DocxExport::ExportDocument_Impl() -+ErrCode DocxExport::ExportDocument_Impl() - { - // Set the 'Track Revisions' flag in the settings structure - m_aSettings.trackRevisions = bool( RedlineFlags::On & m_nOrigRedlineFlags ); -@@ -530,6 +530,8 @@ void DocxExport::ExportDocument_Impl() - m_pStyles = nullptr; - delete m_pSections; - m_pSections = nullptr; -+ -+ return ERRCODE_NONE; - } - - void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFormat* pFormat, sal_uLong nLnNum ) -diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx -index b553ba3f2601..8b42290594ae 100644 ---- a/sw/source/filter/ww8/docxexport.hxx -+++ b/sw/source/filter/ww8/docxexport.hxx -@@ -191,7 +191,7 @@ public: - - protected: - /// Format-dependent part of the actual export. -- virtual void ExportDocument_Impl() override; -+ virtual ErrCode ExportDocument_Impl() override; - - /// Output SwEndNode - virtual void OutputEndNode( const SwEndNode& ) override; -diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx -index 586dd01f23bd..679b96ac9a77 100644 ---- a/sw/source/filter/ww8/rtfexport.cxx -+++ b/sw/source/filter/ww8/rtfexport.cxx -@@ -660,7 +660,7 @@ void RtfExport::WritePageDescTable() - m_pTableInfo = std::make_shared(); - } - --void RtfExport::ExportDocument_Impl() -+ErrCode RtfExport::ExportDocument_Impl() - { - // Make the header - Strm() -@@ -931,6 +931,8 @@ void RtfExport::ExportDocument_Impl() - WriteMainText(); - - Strm().WriteChar('}'); -+ -+ return ERRCODE_NONE; - } - - void RtfExport::PrepareNewPageDesc(const SfxItemSet* pSet, const SwNode& rNd, -diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx -index 869a888e9b25..b470ef593f30 100644 ---- a/sw/source/filter/ww8/rtfexport.hxx -+++ b/sw/source/filter/ww8/rtfexport.hxx -@@ -117,7 +117,7 @@ public: - - protected: - /// Format-dependent part of the actual export. -- void ExportDocument_Impl() override; -+ ErrCode ExportDocument_Impl() override; - - void SectionBreaksAndFrames(const SwTextNode& /*rNode*/) override {} - -diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx -index 12a8ef8b6f89..66e4448191ba 100644 ---- a/sw/source/filter/ww8/wrtww8.cxx -+++ b/sw/source/filter/ww8/wrtww8.cxx -@@ -3110,7 +3110,7 @@ namespace - { - const sal_uLong WW_BLOCKSIZE = 0x200; - -- void EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut) -+ ErrCode EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut) - { - rIn.Seek(STREAM_SEEK_TO_END); - sal_uLong nLen = rIn.Tell(); -@@ -3121,14 +3121,17 @@ namespace - { - std::size_t nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI; - nBS = rIn.ReadBytes(in, nBS); -- rCtx.InitCipher(nBlock); -+ if (!rCtx.InitCipher(nBlock)) { -+ return ERRCODE_IO_NOTSUPPORTED; -+ } - rCtx.Encode(in, nBS, in, nBS); - rOut.WriteBytes(in, nBS); - } -+ return ERRCODE_NONE; - } - } - --void MSWordExportBase::ExportDocument( bool bWriteAll ) -+ErrCode MSWordExportBase::ExportDocument( bool bWriteAll ) - { - m_nCharFormatStart = DEFAULT_STYLES_COUNT; - m_nFormatCollStart = m_nCharFormatStart + m_pDoc->GetCharFormats()->size() - 1; -@@ -3195,7 +3198,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) - if ( m_pDoc->getIDocumentDrawModelAccess().GetDrawModel() ) - m_pDoc->getIDocumentDrawModelAccess().GetDrawModel()->GetPage( 0 )->RecalcObjOrdNums(); - -- ExportDocument_Impl(); -+ ErrCode err = ExportDocument_Impl(); - - m_aFrames.clear(); - -@@ -3208,6 +3211,8 @@ void MSWordExportBase::ExportDocument( bool bWriteAll ) - *m_pCurPam = *m_pOrigPam; - - m_pDoc->getIDocumentRedlineAccess().SetRedlineFlags(m_nOrigRedlineFlags); -+ -+ return err; - } - - bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec ) -@@ -3262,7 +3267,7 @@ bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec - return ( aEncryptionData.getLength() != 0 ); - } - --void WW8Export::ExportDocument_Impl() -+ErrCode WW8Export::ExportDocument_Impl() - { - PrepareStorage(); - -@@ -3360,6 +3365,7 @@ void WW8Export::ExportDocument_Impl() - - StoreDoc1(); - -+ ErrCode err = ERRCODE_NONE; - if ( bEncrypt ) - { - SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp; -@@ -3367,10 +3373,17 @@ void WW8Export::ExportDocument_Impl() - pTableStrmTemp = xTableStrm.get(); - pDataStrmTemp = xDataStrm.get(); - -- if ( pDataStrmTemp && pDataStrmTemp != pStrmTemp) -- EncryptRC4(aCtx, *pDataStrm, *pDataStrmTemp); -+ if ( pDataStrmTemp && pDataStrmTemp != pStrmTemp) { -+ err = EncryptRC4(aCtx, *pDataStrm, *pDataStrmTemp); -+ if (err != ERRCODE_NONE) { -+ goto done; -+ } -+ } - -- EncryptRC4(aCtx, *pTableStrm, *pTableStrmTemp); -+ err = EncryptRC4(aCtx, *pTableStrm, *pTableStrmTemp); -+ if (err != ERRCODE_NONE) { -+ goto done; -+ } - - // Write Unencrypted Header 52 bytes to the start of the table stream - // EncryptionVersionInfo (4 bytes): A Version structure where Version.vMajor MUST be 0x0001, and Version.vMinor MUST be 0x0001. -@@ -3388,7 +3401,10 @@ void WW8Export::ExportDocument_Impl() - pTableStrmTemp->WriteBytes(pSaltData, 16); - pTableStrmTemp->WriteBytes(pSaltDigest, 16); - -- EncryptRC4(aCtx, GetWriter().Strm(), *pStrmTemp); -+ err = EncryptRC4(aCtx, GetWriter().Strm(), *pStrmTemp); -+ if (err != ERRCODE_NONE) { -+ goto done; -+ } - - // Write Unencrypted Fib 68 bytes to the start of the workdocument stream - pFib->m_fEncrypted = true; // fEncrypted indicates the document is encrypted. -@@ -3398,6 +3414,7 @@ void WW8Export::ExportDocument_Impl() - - pStrmTemp->Seek( 0 ); - pFib->WriteHeader( *pStrmTemp ); -+ done:; - } - - DELETEZ( m_pGrf ); -@@ -3438,6 +3455,8 @@ void WW8Export::ExportDocument_Impl() - pDataStrm = nullptr; - GetWriter().GetStorage().Remove(SL::aData); - } -+ -+ return err; - } - - void WW8Export::PrepareStorage() -@@ -3517,16 +3536,17 @@ ErrCode SwWW8Writer::WriteStorage() - } - - // Do the actual export -+ ErrCode err = ERRCODE_NONE; - { - bool bDot = mpMedium->GetFilter()->GetName().endsWith("Vorlage"); - WW8Export aExport(this, pDoc, pCurPam, pOrigPam, bDot); - m_pExport = &aExport; -- aExport.ExportDocument( bWriteAll ); -+ err = aExport.ExportDocument( bWriteAll ); - m_pExport = nullptr; - } - - ::EndProgress( pDoc->GetDocShell() ); -- return ERRCODE_NONE; -+ return err; - } - - ErrCode SwWW8Writer::WriteMedium( SfxMedium& ) -diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx -index 7195677f4688..56bea59191d6 100644 ---- a/sw/source/filter/ww8/wrtww8.hxx -+++ b/sw/source/filter/ww8/wrtww8.hxx -@@ -574,7 +574,7 @@ public: - - public: - /// The main function to export the document. -- void ExportDocument( bool bWriteAll ); -+ ErrCode ExportDocument( bool bWriteAll ); - - /// Iterate through the nodes and call the appropriate OutputNode() on them. - void WriteText(); -@@ -788,7 +788,7 @@ public: - - protected: - /// Format-dependent part of the actual export. -- virtual void ExportDocument_Impl() = 0; -+ virtual ErrCode ExportDocument_Impl() = 0; - - /// Get the next position in the text node to output - sal_Int32 GetNextPos( SwWW8AttrIter const * pAttrIter, const SwTextNode& rNode, sal_Int32 nAktPos ); -@@ -985,7 +985,7 @@ public: - virtual bool AddSectionBreaksForTOX() const override { return false; } - private: - /// Format-dependent part of the actual export. -- virtual void ExportDocument_Impl() override; -+ virtual ErrCode ExportDocument_Impl() override; - - void PrepareStorage(); - void WriteFkpPlcUsw(); --- -2.17.1 - diff --git a/SOURCES/0004-iRelated-rhbz-1618703-Properly-handle-failure-en-dec.patch b/SOURCES/0004-iRelated-rhbz-1618703-Properly-handle-failure-en-dec.patch deleted file mode 100644 index 72ee47e..0000000 --- a/SOURCES/0004-iRelated-rhbz-1618703-Properly-handle-failure-en-dec.patch +++ /dev/null @@ -1,204 +0,0 @@ -From 9207290587ea8c8703486d60877731228eed80ce Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Fri, 24 Aug 2018 10:27:01 +0200 -Subject: [PATCH 4/5] iRelated rhbz#1618703: Properly handle failure - en-/decoding PDF file -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -...when e.g. FIPS mode makes the various calls to rtl_cipher_initARCFOUR fail. - -Reviewed-on: https://gerrit.libreoffice.org/59543 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit 185a14525f114e58b48236284ed8e8644bc40e48) -Reviewed-on: https://gerrit.libreoffice.org/59573 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara - -(cherry picked from commit 68ffc5c83ca73c58439b7c9935283541f007db44) -Conflicts: - filter/source/pdf/impdialog.cxx - sdext/source/pdfimport/pdfparse/pdfentries.cxx - vcl/source/gdi/pdfwriter_impl2.cxx - -Change-Id: Id1b2222249c151470e233ab814b21228f3a8b561 ---- - filter/source/pdf/impdialog.cxx | 7 +++ - .../source/pdfimport/pdfparse/pdfentries.cxx | 42 +++++++++++----- - vcl/source/gdi/pdfwriter_impl2.cxx | 48 +++++++++++-------- - 3 files changed, 67 insertions(+), 30 deletions(-) - -diff --git a/filter/source/pdf/impdialog.cxx b/filter/source/pdf/impdialog.cxx -index 82aaf012505a..736ac0c15f26 100644 ---- a/filter/source/pdf/impdialog.cxx -+++ b/filter/source/pdf/impdialog.cxx -@@ -23,6 +23,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1351,6 +1352,12 @@ IMPL_LINK_NOARG(ImpPDFTabSecurityPage, ClickmaPbSetPwdHdl, Button*, void) - mbHaveOwnerPassword = !aOwnerPW.isEmpty(); - - mxPreparedPasswords = vcl::PDFWriter::InitEncryption( aOwnerPW, aUserPW, true ); -+ if (!mxPreparedPasswords.is()) { -+ OUString msg; -+ ErrorHandler::GetErrorString(ERRCODE_IO_NOTSUPPORTED, msg); //TOOD: handle failure -+ ScopedVclPtrInstance(this, msg, VclMessageType::Error)->Execute(); -+ return; -+ } - - if( mbHaveOwnerPassword ) - { -diff --git a/sdext/source/pdfimport/pdfparse/pdfentries.cxx b/sdext/source/pdfimport/pdfparse/pdfentries.cxx -index 16563868f25c..074fb669c8da 100644 ---- a/sdext/source/pdfimport/pdfparse/pdfentries.cxx -+++ b/sdext/source/pdfimport/pdfparse/pdfentries.cxx -@@ -1159,9 +1159,13 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) - { - // see PDF reference 1.4 Algorithm 3.4 - // encrypt pad string -- rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, -- aKey, nKeyLen, -- nullptr, 0 ); -+ if (rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, -+ aKey, nKeyLen, -+ nullptr, 0 ) -+ != rtl_Cipher_E_None) -+ { -+ return false; //TODO: differentiate "failed to decrypt" from "wrong password" -+ } - rtl_cipher_encodeARCFOUR( pData->m_aCipher, nPadString, sizeof( nPadString ), - nEncryptedEntry, sizeof( nEncryptedEntry ) ); - bValid = (memcmp( nEncryptedEntry, pData->m_aUEntry, 32 ) == 0); -@@ -1172,8 +1176,12 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) - rtl_digest_updateMD5( pData->m_aDigest, nPadString, sizeof( nPadString ) ); - rtl_digest_updateMD5( pData->m_aDigest, pData->m_aDocID.getStr(), pData->m_aDocID.getLength() ); - rtl_digest_getMD5( pData->m_aDigest, nEncryptedEntry, sizeof(nEncryptedEntry) ); -- rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, -- aKey, sizeof(aKey), nullptr, 0 ); -+ if (rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, -+ aKey, sizeof(aKey), nullptr, 0 ) -+ != rtl_Cipher_E_None) -+ { -+ return false; //TODO: differentiate "failed to decrypt" from "wrong password" -+ } - rtl_cipher_encodeARCFOUR( pData->m_aCipher, - nEncryptedEntry, 16, - nEncryptedEntry, 16 ); // encrypt in place -@@ -1183,8 +1191,12 @@ static bool check_user_password( const OString& rPwd, PDFFileImplData* pData ) - for( sal_uInt32 j = 0; j < sizeof(aTempKey); j++ ) - aTempKey[j] = static_cast( aKey[j] ^ i ); - -- rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, -- aTempKey, sizeof(aTempKey), nullptr, 0 ); -+ if (rtl_cipher_initARCFOUR( pData->m_aCipher, rtl_Cipher_DirectionEncode, -+ aTempKey, sizeof(aTempKey), nullptr, 0 ) -+ != rtl_Cipher_E_None) -+ { -+ return false; //TODO: differentiate "failed to decrypt" from "wrong password" -+ } - rtl_cipher_encodeARCFOUR( pData->m_aCipher, - nEncryptedEntry, 16, - nEncryptedEntry, 16 ); // encrypt in place -@@ -1230,8 +1242,12 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const - sal_uInt32 nKeyLen = password_to_key( rPwd, aKey, m_pData.get(), true ); - if( m_pData->m_nStandardRevision == 2 ) - { -- rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, -- aKey, nKeyLen, nullptr, 0 ); -+ if (rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, -+ aKey, nKeyLen, nullptr, 0 ) -+ != rtl_Cipher_E_None) -+ { -+ return false; //TODO: differentiate "failed to decrypt" from "wrong password" -+ } - rtl_cipher_decodeARCFOUR( m_pData->m_aCipher, - m_pData->m_aOEntry, 32, - nPwd, 32 ); -@@ -1244,8 +1260,12 @@ bool PDFFile::setupDecryptionData( const OString& rPwd ) const - sal_uInt8 nTempKey[ENCRYPTION_KEY_LEN]; - for( unsigned int j = 0; j < sizeof(nTempKey); j++ ) - nTempKey[j] = sal_uInt8(aKey[j] ^ i); -- rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, -- nTempKey, nKeyLen, nullptr, 0 ); -+ if (rtl_cipher_initARCFOUR( m_pData->m_aCipher, rtl_Cipher_DirectionDecode, -+ nTempKey, nKeyLen, nullptr, 0 ) -+ != rtl_Cipher_E_None) -+ { -+ return false; //TODO: differentiate "failed to decrypt" from "wrong password" -+ } - rtl_cipher_decodeARCFOUR( m_pData->m_aCipher, - nPwd, 32, - nPwd, 32 ); // decrypt inplace -diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx -index e4f567d6bfd9..e85cf15e4395 100644 ---- a/vcl/source/gdi/pdfwriter_impl2.cxx -+++ b/vcl/source/gdi/pdfwriter_impl2.cxx -@@ -1443,29 +1443,39 @@ bool PDFWriterImpl::computeODictionaryValue( const sal_uInt8* i_pPaddedOwnerPass - //Step 4, the key is in nMD5Sum - //step 5 already done, data is in i_pPaddedUserPassword - //step 6 -- rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode, -- nMD5Sum, i_nKeyLength , nullptr, 0 ); -- // encrypt the user password using the key set above -- rtl_cipher_encodeARCFOUR( aCipher, i_pPaddedUserPassword, ENCRYPTED_PWD_SIZE, // the data to be encrypted -- &io_rOValue[0], sal_Int32(io_rOValue.size()) ); //encrypted data -- //Step 7, only if 128 bit -- if( i_nKeyLength == SECUR_128BIT_KEY ) -+ if (rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode, -+ nMD5Sum, i_nKeyLength , nullptr, 0 ) -+ == rtl_Cipher_E_None) - { -- sal_uInt32 i, y; -- sal_uInt8 nLocalKey[ SECUR_128BIT_KEY ]; // 16 = 128 bit key -- -- for( i = 1; i <= 19; i++ ) // do it 19 times, start with 1 -+ // encrypt the user password using the key set above -+ rtl_cipher_encodeARCFOUR( aCipher, i_pPaddedUserPassword, ENCRYPTED_PWD_SIZE, // the data to be encrypted -+ &io_rOValue[0], sal_Int32(io_rOValue.size()) ); //encrypted data -+ //Step 7, only if 128 bit -+ if( i_nKeyLength == SECUR_128BIT_KEY ) - { -- for( y = 0; y < sizeof( nLocalKey ); y++ ) -- nLocalKey[y] = (sal_uInt8)( nMD5Sum[y] ^ i ); -- -- rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode, -- nLocalKey, SECUR_128BIT_KEY, nullptr, 0 ); //destination data area, on init can be NULL -- rtl_cipher_encodeARCFOUR( aCipher, &io_rOValue[0], sal_Int32(io_rOValue.size()), // the data to be encrypted -- &io_rOValue[0], sal_Int32(io_rOValue.size()) ); // encrypted data, can be the same as the input, encrypt "in place" -- //step 8, store in class data member -+ sal_uInt32 i, y; -+ sal_uInt8 nLocalKey[ SECUR_128BIT_KEY ]; // 16 = 128 bit key -+ -+ for( i = 1; i <= 19; i++ ) // do it 19 times, start with 1 -+ { -+ for( y = 0; y < sizeof( nLocalKey ); y++ ) -+ nLocalKey[y] = (sal_uInt8)( nMD5Sum[y] ^ i ); -+ -+ if (rtl_cipher_initARCFOUR( aCipher, rtl_Cipher_DirectionEncode, -+ nLocalKey, SECUR_128BIT_KEY, nullptr, 0 ) //destination data area, on init can be NULL -+ != rtl_Cipher_E_None) -+ { -+ bSuccess = false; -+ break; -+ } -+ rtl_cipher_encodeARCFOUR( aCipher, &io_rOValue[0], sal_Int32(io_rOValue.size()), // the data to be encrypted -+ &io_rOValue[0], sal_Int32(io_rOValue.size()) ); // encrypted data, can be the same as the input, encrypt "in place" -+ //step 8, store in class data member -+ } - } - } -+ else -+ bSuccess = false; - } - else - bSuccess = false; --- -2.17.1 - diff --git a/SOURCES/0005-rhbz-1618703-Allow-to-use-OpenSSL-as-backend-for-rtl.patch b/SOURCES/0005-rhbz-1618703-Allow-to-use-OpenSSL-as-backend-for-rtl.patch deleted file mode 100644 index 3159b19..0000000 --- a/SOURCES/0005-rhbz-1618703-Allow-to-use-OpenSSL-as-backend-for-rtl.patch +++ /dev/null @@ -1,684 +0,0 @@ -From cb0fdfa1d2d98880839dda8114b0af7c4254bc86 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Wed, 22 Aug 2018 09:49:25 +0200 -Subject: [PATCH 5/5] rhbz#1618703: Allow to use OpenSSL as backend for - rtl/cipher.h -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -...with new configuration option --enable-cipher-openssl-backend - -rtl/cipher.h (which is part of the stable URE interface) offers functionality to -en-/decrypt data with Blowfish in ECB, CBC, and streaming CFB mode, and with RC4 -(aka ARCFOUR; which is a stream cipher). LO itself only uses Blowfish CFB and -RC4, so only those are wired to OpenSSL for now, for simplicity. Using Blowfish -ECB and CBC, or Blowfish CFB in DirectionBoth mode would cause failures for now -(cf. sal/qa/rtl/cipher/rtl_cipher.cxx); the assumption is that no external code -actually makes use of this functionality. - -Using NSS instead of OpenSSL could be an alternative, but there appears to be no -support in NSS for Blowfish in streaming CFB mode, only CKM_BLOWFISH_CBC for -CBC mode. - -Reviewed-on: https://gerrit.libreoffice.org/59428 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit 4bc16aeb73c1201f187742e0fefe35521fae77ac) -Reviewed-on: https://gerrit.libreoffice.org/59575 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara - -(cherry picked from commit 062ac27d7052bcdf0bdd5db978e041d4c614fd6b) -Conflicts: - sal/rtl/cipher.cxx - -Change-Id: I0bc042961539ed46844c96cb1c808209578528a0 ---- - config_host.mk.in | 1 + - configure.ac | 23 +++++ - sal/CppunitTest_sal_rtl.mk | 4 + - sal/Library_sal.mk | 8 ++ - sal/qa/rtl/cipher/rtl_cipher.cxx | 61 +++++++++++ - sal/rtl/cipher.cxx | 167 ++++++++++++++++++++++++++++++- - 6 files changed, 260 insertions(+), 4 deletions(-) - -diff --git a/config_host.mk.in b/config_host.mk.in -index 8cbbc5fee1d5..e683a5ac883c 100644 ---- a/config_host.mk.in -+++ b/config_host.mk.in -@@ -109,6 +109,7 @@ export ENABLE_AVAHI=@ENABLE_AVAHI@ - export ENABLE_BREAKPAD=@ENABLE_BREAKPAD@ - export ENABLE_CAIRO_CANVAS=@ENABLE_CAIRO_CANVAS@ - export ENABLE_CHART_TESTS=@ENABLE_CHART_TESTS@ -+export ENABLE_CIPHER_OPENSSL_BACKEND=@ENABLE_CIPHER_OPENSSL_BACKEND@ - export ENABLE_LIBCMIS=@ENABLE_LIBCMIS@ - export ENABLE_COINMP=@ENABLE_COINMP@ - export SYSTEM_COINMP=@SYSTEM_COINMP@ -diff --git a/configure.ac b/configure.ac -index 938d20571242..70890733a2a8 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -1392,6 +1392,11 @@ AC_ARG_ENABLE(openssl, - use only if you are hacking on it.]), - ,enable_openssl=yes) - -+libo_FUZZ_ARG_ENABLE(cipher-openssl-backend, -+ AS_HELP_STRING([--enable-cipher-openssl-backend], -+ [Enable using OpenSSL as the actual implementation of the rtl/cipher.h functionality. -+ Requires --enable-openssl.])) -+ - AC_ARG_ENABLE(library-bin-tar, - AS_HELP_STRING([--enable-library-bin-tar], - [Enable the building and reused of tarball of binary build for some 'external' libraries. -@@ -9240,6 +9245,24 @@ fi - - AC_SUBST([DISABLE_OPENSSL]) - -+if test "$enable_cipher_openssl_backend" = yes && test "$DISABLE_OPENSSL" = TRUE; then -+ if test "$libo_fuzzed_enable_cipher_openssl_backend" = yes; then -+ AC_MSG_NOTICE([Resetting --enable-cipher-openssl-backend=no]) -+ enable_cipher_openssl_backend=no -+ else -+ AC_MSG_ERROR([--enable-cipher-openssl-backend needs OpenSSL, but --disable-openssl was given.]) -+ fi -+fi -+AC_MSG_CHECKING([whether to enable the OpenSSL backend for rtl/cipher.h]) -+ENABLE_CIPHER_OPENSSL_BACKEND= -+if test "$enable_cipher_openssl_backend" = yes; then -+ AC_MSG_RESULT([yes]) -+ ENABLE_CIPHER_OPENSSL_BACKEND=TRUE -+else -+ AC_MSG_RESULT([no]) -+fi -+AC_SUBST([ENABLE_CIPHER_OPENSSL_BACKEND]) -+ - dnl =================================================================== - dnl Check for building gnutls - dnl =================================================================== -diff --git a/sal/CppunitTest_sal_rtl.mk b/sal/CppunitTest_sal_rtl.mk -index 43533fc5ab1c..c2eaa72daa26 100644 ---- a/sal/CppunitTest_sal_rtl.mk -+++ b/sal/CppunitTest_sal_rtl.mk -@@ -63,4 +63,8 @@ $(call gb_CppunitTest_get_target,sal_rtl) : \ - - $(eval $(call gb_CppunitTest_use_external,sal_rtl,boost_headers)) - -+ifeq ($(ENABLE_CIPHER_OPENSSL_BACKEND),TRUE) -+$(eval $(call gb_CppunitTest_add_defs,sal_rtl,-DLIBO_CIPHER_OPENSSL_BACKEND)) -+endif -+ - # vim: set noet sw=4 ts=4: -diff --git a/sal/Library_sal.mk b/sal/Library_sal.mk -index 17d89ae79e4a..bce0437a19bf 100644 ---- a/sal/Library_sal.mk -+++ b/sal/Library_sal.mk -@@ -255,4 +255,12 @@ $(eval $(call gb_Library_add_exception_objects,sal,\ - - endif # ifneq ($(OS),WNT) - -+ifeq ($(ENABLE_CIPHER_OPENSSL_BACKEND),TRUE) -+$(eval $(call gb_Library_add_defs,sal,-DLIBO_CIPHER_OPENSSL_BACKEND)) -+$(eval $(call gb_Library_use_externals,sal, \ -+ openssl \ -+ openssl_headers \ -+)) -+endif -+ - # vim: set noet sw=4 ts=4: -diff --git a/sal/qa/rtl/cipher/rtl_cipher.cxx b/sal/qa/rtl/cipher/rtl_cipher.cxx -index e8877a92c5d5..57c22eb573ac 100644 ---- a/sal/qa/rtl/cipher/rtl_cipher.cxx -+++ b/sal/qa/rtl/cipher/rtl_cipher.cxx -@@ -37,8 +37,12 @@ public: - void create_001() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - rtl_cipher_destroy(aCipher); -+#endif - } - void create_002() - { -@@ -48,8 +52,12 @@ public: - void create_003() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeCBC); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - rtl_cipher_destroy(aCipher); -+#endif - } - void create_004() - { -@@ -101,14 +109,22 @@ public: - void createBF_001() - { - rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - rtl_cipher_destroy(aCipher); -+#endif - } - void createBF_002() - { - rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeCBC); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - rtl_cipher_destroy(aCipher); -+#endif - } - void createBF_003() - { -@@ -141,6 +157,12 @@ public: - void test_encode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, rtl::OString const& _sPlainTextStr) - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+ (void) _nKeyValue; -+ (void) _nArgValue; -+ (void) _sPlainTextStr; -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -184,11 +206,18 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - - void test_encode_and_decode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, rtl::OString const& _sPlainTextStr) - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+ (void) _nKeyValue; -+ (void) _nArgValue; -+ (void) _sPlainTextStr; -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -236,6 +265,7 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - - void decode_001() -@@ -286,8 +316,12 @@ public: - void destroy_001() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeCBC); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - rtl_cipher_destroy(aCipher); -+#endif - } - // Change the following lines only, if you add, remove or rename - // member functions of the current class, -@@ -305,10 +339,14 @@ public: - void destroyBF_001() - { - rtlCipher aCipher = rtl_cipher_createBF(rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - rtl_cipher_destroyBF(aCipher); - // more proforma - // should not GPF -+#endif - } - // Change the following lines only, if you add, remove or rename - // member functions of the current class, -@@ -326,6 +364,12 @@ public: - void test_encode(sal_uInt8 _nKeyValue, sal_uInt8 _nArgValue, sal_uInt8 _nDataValue) - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+ (void) _nKeyValue; -+ (void) _nArgValue; -+ (void) _nDataValue; -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -360,6 +404,7 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - - void encode_001() -@@ -407,6 +452,9 @@ public: - void init_001() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -424,11 +472,15 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - - void init_002() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -447,10 +499,14 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - void init_003() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -469,10 +525,14 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - void init_004() - { - rtlCipher aCipher = rtl_cipher_create(rtl_Cipher_AlgorithmBF, rtl_Cipher_ModeECB); -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ CPPUNIT_ASSERT_EQUAL(rtlCipher(nullptr), aCipher); -+#else - CPPUNIT_ASSERT_MESSAGE("create failed.", aCipher != nullptr); - - sal_uInt32 nKeyLen = 16; -@@ -492,6 +552,7 @@ public: - delete [] pKeyBuffer; - - rtl_cipher_destroy(aCipher); -+#endif - } - // Change the following lines only, if you add, remove or rename - // member functions of the current class, -diff --git a/sal/rtl/cipher.cxx b/sal/rtl/cipher.cxx -index 80e096f5a3a1..9dd649848eff 100644 ---- a/sal/rtl/cipher.cxx -+++ b/sal/rtl/cipher.cxx -@@ -22,7 +22,16 @@ - #include - #include - #include -+#include -+#include -+#include -+#include - -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+#include -+#endif -+ -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - #define RTL_CIPHER_NTOHL(c, l) \ - ((l) = ((sal_uInt32)(*((c)++))) << 24, \ - (l) |= ((sal_uInt32)(*((c)++))) << 16, \ -@@ -81,6 +90,7 @@ - case 1: *(--(c)) = (sal_uInt8)(((xl) >> 24) & 0xff); \ - } \ - } -+#endif - - typedef rtlCipherError(SAL_CALL cipher_init_t) ( - rtlCipher Cipher, -@@ -182,6 +192,7 @@ void SAL_CALL rtl_cipher_destroy(rtlCipher Cipher) SAL_THROW_EXTERN_C() - pImpl->m_delete(Cipher); - } - -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - #define CIPHER_ROUNDS_BF 16 - - struct CipherKeyBF -@@ -189,9 +200,13 @@ struct CipherKeyBF - sal_uInt32 m_S[4][256]; - sal_uInt32 m_P[CIPHER_ROUNDS_BF + 2]; - }; -+#endif - - struct CipherContextBF - { -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ EVP_CIPHER_CTX * m_context; -+#else - CipherKeyBF m_key; - union - { -@@ -199,6 +214,7 @@ struct CipherContextBF - sal_uInt8 m_byte[8]; - } m_iv; - sal_uInt32 m_offset; -+#endif - }; - - struct CipherBF_Impl -@@ -207,11 +223,13 @@ struct CipherBF_Impl - CipherContextBF m_context; - }; - -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - static rtlCipherError BF_init( - CipherContextBF *ctx, - rtlCipherMode eMode, - const sal_uInt8 *pKeyData, sal_Size nKeyLen, - const sal_uInt8 *pArgData, sal_Size nArgLen); -+#endif - - static rtlCipherError BF_update( - CipherContextBF *ctx, -@@ -220,6 +238,7 @@ static rtlCipherError BF_update( - const sal_uInt8 *pData, sal_Size nDatLen, - sal_uInt8 *pBuffer, sal_Size nBufLen); - -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - static void BF_updateECB( - CipherContextBF *ctx, - rtlCipherDirection direction, -@@ -608,7 +627,9 @@ static const CipherKeyBF BF_key = - 0x9216D5D9L, 0x8979FB1BL - } - }; -+#endif - -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - static rtlCipherError BF_init( - CipherContextBF *ctx, - rtlCipherMode eMode, -@@ -675,6 +696,7 @@ static rtlCipherError BF_init( - - return rtl_Cipher_E_None; - } -+#endif - - static rtlCipherError BF_update( - CipherContextBF *ctx, -@@ -691,6 +713,31 @@ static rtlCipherError BF_update( - return rtl_Cipher_E_BufferSize; - - /* Update. */ -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ assert(eMode == rtl_Cipher_ModeStream); -+ (void) eDirection; -+ while (nDatLen > std::numeric_limits::max()) { -+ int outl; -+ if (EVP_CipherUpdate(ctx->m_context, pBuffer, &outl, pData, std::numeric_limits::max()) -+ == 0) -+ { -+ return rtl_Cipher_E_Unknown; -+ } -+ assert(outl == std::numeric_limits::max()); -+ pData += std::numeric_limits::max(); -+ nDatLen -= std::numeric_limits::max(); -+ pBuffer += std::numeric_limits::max(); -+ } -+ int outl; -+ if (EVP_CipherUpdate(ctx->m_context, pBuffer, &outl, pData, static_cast(nDatLen)) == 0) -+ { -+ return rtl_Cipher_E_Unknown; -+ } -+ assert(outl == static_cast(nDatLen)); -+ // A final call to EVP_CipherFinal_ex is intentionally missing; it wouldn't fit the rtl/cipher.h -+ // interface, and is hopefully not needed, as each individual Blowfish CFB update step doesn't -+ // hold back any data that would need to be finally flushed. -+#else - if (eMode == rtl_Cipher_ModeECB) - { - /* Block mode. */ -@@ -726,9 +773,11 @@ static rtlCipherError BF_update( - pBuffer += 1; - } - } -+#endif - return rtl_Cipher_E_None; - } - -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - static void BF_updateECB( - CipherContextBF *ctx, - rtlCipherDirection direction, -@@ -931,6 +980,7 @@ static sal_uInt32 BF(CipherKeyBF *key, sal_uInt32 x) - - return y; - } -+#endif - - /** - rtl_cipherBF (Blowfish) implementation. -@@ -943,6 +993,12 @@ rtlCipher SAL_CALL rtl_cipher_createBF(rtlCipherMode Mode) SAL_THROW_EXTERN_C() - - if (Mode == rtl_Cipher_ModeInvalid) - return nullptr; -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ if (Mode != rtl_Cipher_ModeStream) { -+ // Cannot easily support ModeECB and ModeCBC, and they aren't used in the LO code at least: -+ return nullptr; -+ } -+#endif - - pImpl = static_cast(rtl_allocateZeroMemory(sizeof (CipherBF_Impl))); - if (pImpl) -@@ -978,9 +1034,45 @@ rtlCipherError SAL_CALL rtl_cipher_initBF( - else - return rtl_Cipher_E_Direction; - -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ if (pImpl->m_cipher.m_direction == rtl_Cipher_DirectionBoth) { -+ // Cannot easily support DirectionBoth, and it isn't used in the LO code at least: -+ return rtl_Cipher_E_Direction; -+ } -+ if (nKeyLen > std::numeric_limits::max()) { -+ return rtl_Cipher_E_BufferSize; -+ } -+ if (pImpl->m_context.m_context != nullptr) { -+ EVP_CIPHER_CTX_free(pImpl->m_context.m_context); -+ } -+ pImpl->m_context.m_context = EVP_CIPHER_CTX_new(); -+ if (pImpl->m_context.m_context == nullptr) { -+ return rtl_Cipher_E_Memory; -+ } -+ unsigned char iv[8]; -+ auto const n = std::min(nArgLen, sal_Size(8)); -+ std::memcpy(iv, pArgData, n); -+ std::memset(iv + n, 0, 8 - n); -+ if (EVP_CipherInit_ex( -+ pImpl->m_context.m_context, EVP_bf_cfb(), nullptr, nullptr, iv, -+ pImpl->m_cipher.m_direction == rtl_Cipher_DirectionDecode ? 0 : 1) -+ == 0) -+ { -+ return rtl_Cipher_E_Unknown; -+ } -+ if (EVP_CIPHER_CTX_set_key_length(pImpl->m_context.m_context, static_cast(nKeyLen)) == 0) { -+ return rtl_Cipher_E_Unknown; -+ } -+ if (EVP_CipherInit_ex(pImpl->m_context.m_context, nullptr, nullptr, pKeyData, nullptr, -1) == 0) -+ { -+ return rtl_Cipher_E_Unknown; -+ } -+ return rtl_Cipher_E_None; -+#else - return BF_init( - &(pImpl->m_context), pImpl->m_cipher.m_mode, - pKeyData, nKeyLen, pArgData, nArgLen); -+#endif - } - - rtlCipherError SAL_CALL rtl_cipher_encodeBF( -@@ -1037,18 +1129,31 @@ void SAL_CALL rtl_cipher_destroyBF(rtlCipher Cipher) SAL_THROW_EXTERN_C() - if (pImpl) - { - if (pImpl->m_cipher.m_algorithm == rtl_Cipher_AlgorithmBF) -+ { -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ if (pImpl->m_context.m_context != nullptr) { -+ EVP_CIPHER_CTX_free(pImpl->m_context.m_context); -+ } -+#endif - rtl_freeZeroMemory(pImpl, sizeof(CipherBF_Impl)); -+ } - else - rtl_freeMemory(pImpl); - } - } - -+#if !defined LIBO_CIPHER_OPENSSL_BACKEND - #define CIPHER_CBLOCK_ARCFOUR 256 -+#endif - - struct ContextARCFOUR_Impl - { -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ EVP_CIPHER_CTX * m_context; -+#else - unsigned int m_S[CIPHER_CBLOCK_ARCFOUR]; - unsigned int m_X, m_Y; -+#endif - }; - - struct CipherARCFOUR_Impl -@@ -1066,6 +1171,29 @@ static rtlCipherError rtl_cipherARCFOUR_init_Impl( - ContextARCFOUR_Impl *ctx, - const sal_uInt8 *pKeyData, sal_Size nKeyLen) - { -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ if (nKeyLen > std::numeric_limits::max()) { -+ return rtl_Cipher_E_BufferSize; -+ } -+ if (ctx->m_context != nullptr) { -+ EVP_CIPHER_CTX_free(ctx->m_context); -+ } -+ ctx->m_context = EVP_CIPHER_CTX_new(); -+ if (ctx->m_context == nullptr) { -+ return rtl_Cipher_E_Memory; -+ } -+ if (EVP_CipherInit_ex(ctx->m_context, EVP_rc4(), nullptr, nullptr, nullptr, 0) == 0) { -+ // RC4 en- and decryption is identical, so we can use 0=decrypt regardless of direction, -+ // and thus also support rtl_Cipher_DirectionBoth -+ return rtl_Cipher_E_Unknown; -+ } -+ if (EVP_CIPHER_CTX_set_key_length(ctx->m_context, static_cast(nKeyLen)) == 0) { -+ return rtl_Cipher_E_Unknown; -+ } -+ if (EVP_CipherInit_ex(ctx->m_context, nullptr, nullptr, pKeyData, nullptr, -1) == 0) { -+ return rtl_Cipher_E_Unknown; -+ } -+#else - unsigned int K[CIPHER_CBLOCK_ARCFOUR]; - unsigned int *L, *S; - unsigned int x, y, t; -@@ -1106,6 +1234,7 @@ static rtlCipherError rtl_cipherARCFOUR_init_Impl( - /* Initialize counters X and Y. */ - ctx->m_X = 0; - ctx->m_Y = 0; -+#endif - - return rtl_Cipher_E_None; - } -@@ -1115,10 +1244,6 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl( - const sal_uInt8 *pData, sal_Size nDatLen, - sal_uInt8 *pBuffer, sal_Size nBufLen) - { -- unsigned int *S; -- unsigned int t; -- sal_Size k; -- - /* Check arguments. */ - if (!pData || !pBuffer) - return rtl_Cipher_E_Argument; -@@ -1126,6 +1251,32 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl( - if (!((0 < nDatLen) && (nDatLen <= nBufLen))) - return rtl_Cipher_E_BufferSize; - -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ while (nDatLen > std::numeric_limits::max()) { -+ int outl; -+ if (EVP_CipherUpdate(ctx->m_context, pBuffer, &outl, pData, std::numeric_limits::max()) -+ == 0) -+ { -+ return rtl_Cipher_E_Unknown; -+ } -+ assert(outl == std::numeric_limits::max()); -+ pData += std::numeric_limits::max(); -+ nDatLen -= std::numeric_limits::max(); -+ pBuffer += std::numeric_limits::max(); -+ } -+ int outl; -+ if (EVP_CipherUpdate(ctx->m_context, pBuffer, &outl, pData, static_cast(nDatLen)) == 0) { -+ return rtl_Cipher_E_Unknown; -+ } -+ assert(outl == static_cast(nDatLen)); -+ // A final call to EVP_CipherFinal_ex is intentionally missing; it wouldn't fit the rtl/cipher.h -+ // interface, and is hopefully not needed, as each individual RC4 update step doesn't hold back -+ // any data that would need to be finally flushed. -+#else -+ unsigned int *S; -+ unsigned int t; -+ sal_Size k; -+ - /* Update. */ - S = &(ctx->m_S[0]); - for (k = 0; k < nDatLen; k++) -@@ -1147,6 +1298,7 @@ static rtlCipherError rtl_cipherARCFOUR_update_Impl( - t = (S[x] + S[y]) % CIPHER_CBLOCK_ARCFOUR; - pBuffer[k] = pData[k] ^ ((sal_uInt8)(S[t] & 0xff)); - } -+#endif - - return rtl_Cipher_E_None; - } -@@ -1249,7 +1401,14 @@ void SAL_CALL rtl_cipher_destroyARCFOUR(rtlCipher Cipher) SAL_THROW_EXTERN_C() - if (pImpl) - { - if (pImpl->m_cipher.m_algorithm == rtl_Cipher_AlgorithmARCFOUR) -+ { -+#if defined LIBO_CIPHER_OPENSSL_BACKEND -+ if (pImpl->m_context.m_context != nullptr) { -+ EVP_CIPHER_CTX_free(pImpl->m_context.m_context); -+ } -+#endif - rtl_freeZeroMemory(pImpl, sizeof(CipherARCFOUR_Impl)); -+ } - else - rtl_freeMemory(pImpl); - } --- -2.17.1 - diff --git a/SOURCES/CVE-2019-9848.patch b/SOURCES/CVE-2019-9848.patch deleted file mode 100644 index 59ec30a..0000000 --- a/SOURCES/CVE-2019-9848.patch +++ /dev/null @@ -1,47 +0,0 @@ -From 3dd024a28a98a9d4b4efc3c7ec6acaa94d2b25fd Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 7 Jun 2019 14:04:07 +0100 -Subject: [PATCH] explictly exclude LibreLogo from XScript usage - -Change-Id: I567647f0e2f8b82e4ef2995c673abe82f4564228 -Reviewed-on: https://gerrit.libreoffice.org/73708 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann ---- - sfx2/source/doc/objmisc.cxx | 13 +++++++++++++ - 1 file changed, 13 insertions(+) - -diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx -index e245800f2fec..beea5170e44d 100644 ---- a/sfx2/source/doc/objmisc.cxx -+++ b/sfx2/source/doc/objmisc.cxx -@@ -1340,6 +1340,16 @@ namespace - } - } - -+namespace { -+ -+// don't allow LibreLogo to be used with our mouseover/etc dom-alike events -+bool UnTrustedScript(const OUString& rScriptURL) -+{ -+ return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo"); -+} -+ -+} -+ - ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL, - const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller ) - { -@@ -1352,6 +1362,9 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon - if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) ) - return ERRCODE_IO_ACCESSDENIED; - -+ if ( UnTrustedScript(_rScriptURL) ) -+ return ERRCODE_IO_ACCESSDENIED; -+ - bool bCaughtException = false; - Any aException; - try --- -2.21.0 - diff --git a/SOURCES/CVE-2019-9849.patch b/SOURCES/CVE-2019-9849.patch deleted file mode 100644 index befaf0b..0000000 --- a/SOURCES/CVE-2019-9849.patch +++ /dev/null @@ -1,165 +0,0 @@ -From 952553d3998a1d6fbb0d197f81b769438a48a372 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Fri, 7 Jun 2019 09:28:12 +0200 -Subject: [PATCH] More uses of referer URL with SvxBrushItem - -Reviewed-on: https://gerrit.libreoffice.org/73643 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit b518882de8213ef71a8003f95fbdf7689069c06d) -Conflicts: - sw/source/core/text/porfld.cxx - sw/source/core/unocore/unosett.cxx - -Change-Id: I04b524784df4ef453d8b1feec13b62f183a17e23 -Reviewed-on: https://gerrit.libreoffice.org/73860 -Tested-by: Jenkins -Reviewed-by: Miklos Vajna ---- - sw/inc/unosett.hxx | 2 +- - sw/source/core/text/porfld.cxx | 4 ++-- - sw/source/core/text/porfld.hxx | 1 + - sw/source/core/text/txtfld.cxx | 12 +++++++++++- - sw/source/core/unocore/unosett.cxx | 15 ++++++++++++--- - .../uibase/config/StoredChapterNumbering.cxx | 2 +- - 6 files changed, 28 insertions(+), 8 deletions(-) - -diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx -index 295eb06..185b5bc 100644 ---- a/sw/inc/unosett.hxx -+++ b/sw/inc/unosett.hxx -@@ -210,7 +210,7 @@ public: - - static css::uno::Sequence GetPropertiesForNumFormat( - const SwNumFormat& rFormat, OUString const& rCharFormatName, -- OUString const* pHeadingStyleName); -+ OUString const* pHeadingStyleName, OUString const & referer); - static void SetPropertiesToNumFormat( - SwNumFormat & aFormat, - OUString & rCharStyleName, -diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx -index 7771658..b29cee3 100644 ---- a/sw/source/core/text/porfld.cxx -+++ b/sw/source/core/text/porfld.cxx -@@ -755,7 +755,7 @@ SwBulletPortion::SwBulletPortion( const sal_Unicode cBullet, - - SwGrfNumPortion::SwGrfNumPortion( - const OUString& rGraphicFollowedBy, -- const SvxBrushItem* pGrfBrush, -+ const SvxBrushItem* pGrfBrush, OUString const & referer, - const SwFormatVertOrient* pGrfOrient, const Size& rGrfSize, - const bool bLft, const bool bCntr, const sal_uInt16 nMinDst, - const bool bLabelAlignmentPosAndSpaceModeActive ) : -@@ -769,7 +769,7 @@ SwGrfNumPortion::SwGrfNumPortion( - if( pGrfBrush ) - { - *pBrush = *pGrfBrush; -- const Graphic* pGraph = pGrfBrush->GetGraphic(); -+ const Graphic* pGraph = pGrfBrush->GetGraphic(referer); - if( pGraph ) - SetAnimated( pGraph->IsAnimated() ); - else -diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx -index 38fc089..4ecf25e 100644 ---- a/sw/source/core/text/porfld.hxx -+++ b/sw/source/core/text/porfld.hxx -@@ -168,6 +168,7 @@ class SwGrfNumPortion : public SwNumberPortion - public: - SwGrfNumPortion( const OUString& rGraphicFollowedBy, - const SvxBrushItem* pGrfBrush, -+ OUString const & referer, - const SwFormatVertOrient* pGrfOrient, - const Size& rGrfSize, - const bool bLeft, -diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx -index 6b2b938..14e3968 100644 ---- a/sw/source/core/text/txtfld.cxx -+++ b/sw/source/core/text/txtfld.cxx -@@ -52,6 +52,7 @@ - #include - #include - #include -+#include - #include - - static bool lcl_IsInBody( SwFrame const *pFrame ) -@@ -478,8 +479,17 @@ SwNumberPortion *SwTextFormatter::NewNumberPortion( SwTextFormatInfo &rInf ) con - - if( SVX_NUM_BITMAP == rNumFormat.GetNumberingType() ) - { -+ OUString referer; -+ if (auto const sh1 = rInf.GetVsh()) { -+ if (auto const doc = sh1->GetDoc()) { -+ auto const sh2 = doc->GetPersist(); -+ if (sh2 != nullptr && sh2->HasName()) { -+ referer = sh2->GetMedium()->GetName(); -+ } -+ } -+ } - pRet = new SwGrfNumPortion( pTextNd->GetLabelFollowedBy(), -- rNumFormat.GetBrush(), -+ rNumFormat.GetBrush(), referer, - rNumFormat.GetGraphicOrientation(), - rNumFormat.GetGraphicSize(), - bLeft, bCenter, nMinDist, -diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx -index f7376b9..44cd118 100644 ---- a/sw/source/core/unocore/unosett.cxx -+++ b/sw/source/core/unocore/unosett.cxx -@@ -55,6 +55,7 @@ - #include - #include - #include -+#include - #include - #include - #include -@@ -1316,13 +1317,21 @@ uno::Sequence SwXNumberingRules::GetNumberingRuleByIndex( - SwStyleNameMapper::FillProgName(sValue, aUString, SwGetPoolIdFromName::TxtColl); - } - -- return GetPropertiesForNumFormat(rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr); -+ OUString referer; -+ if (pDoc != nullptr) { -+ auto const sh = pDoc->GetPersist(); -+ if (sh != nullptr && sh->HasName()) { -+ referer = sh->GetMedium()->GetName(); -+ } -+ } -+ return GetPropertiesForNumFormat( -+ rFormat, CharStyleName, (pDocShell) ? & aUString : nullptr, referer); - - } - - uno::Sequence SwXNumberingRules::GetPropertiesForNumFormat( - const SwNumFormat& rFormat, OUString const& rCharFormatName, -- OUString const*const pHeadingStyleName) -+ OUString const*const pHeadingStyleName, OUString const & referer) - { - bool bChapterNum = pHeadingStyleName != nullptr; - -@@ -1454,7 +1463,7 @@ uno::Sequence SwXNumberingRules::GetPropertiesForNumFormat - //graphicbitmap - const Graphic* pGraphic = nullptr; - if(pBrush ) -- pGraphic = pBrush->GetGraphic(); -+ pGraphic = pBrush->GetGraphic(referer); - if(pGraphic) - { - uno::Reference xBmp = VCLUnoHelper::CreateBitmap( pGraphic->GetBitmapEx() ); -diff --git a/sw/source/uibase/config/StoredChapterNumbering.cxx b/sw/source/uibase/config/StoredChapterNumbering.cxx -index c575863..b972ec5 100644 ---- a/sw/source/uibase/config/StoredChapterNumbering.cxx -+++ b/sw/source/uibase/config/StoredChapterNumbering.cxx -@@ -129,7 +129,7 @@ public: - OUString dummy; // pass in empty HeadingStyleName - can't import anyway - uno::Sequence const ret( - SwXNumberingRules::GetPropertiesForNumFormat( -- *pNumFormat, *pCharStyleName, &dummy)); -+ *pNumFormat, *pCharStyleName, &dummy, "")); - return uno::makeAny(ret); - } - --- -2.20.1 - diff --git a/SOURCES/CVE-2019-9850.patch b/SOURCES/CVE-2019-9850.patch deleted file mode 100644 index 71209d6..0000000 --- a/SOURCES/CVE-2019-9850.patch +++ /dev/null @@ -1,68 +0,0 @@ -From 143eedd298113bb20c2807baa49a4c83c2cef70b Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Fri, 26 Jul 2019 13:25:31 +0100 -Subject: [PATCH 1/3] decode url escape codes and check each path segment - -Change-Id: Ie8f7cef912e8dacbc2a0bca73534a7a242a53ca1 -Reviewed-on: https://gerrit.libreoffice.org/76378 -Reviewed-by: Stephan Bergmann -Tested-by: Jenkins -(cherry picked from commit 7942929685fafb0f9c82feb8da7279e5103c87f0) -Reviewed-on: https://gerrit.libreoffice.org/76451 -Reviewed-by: Thorsten Behrens -Tested-by: Thorsten Behrens ---- - sfx2/source/doc/objmisc.cxx | 30 +++++++++++++++++++++++++++++- - 1 file changed, 29 insertions(+), 1 deletion(-) - -diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx -index 8594e9522e48..7e9288524b34 100644 ---- a/sfx2/source/doc/objmisc.cxx -+++ b/sfx2/source/doc/objmisc.cxx -@@ -41,6 +41,8 @@ - #include - #include - #include -+#include -+#include - #include - - #include -@@ -1351,7 +1353,33 @@ namespace { - // don't allow LibreLogo to be used with our mouseover/etc dom-alike events - bool UnTrustedScript(const OUString& rScriptURL) - { -- return rScriptURL.startsWithIgnoreAsciiCase("vnd.sun.star.script:LibreLogo"); -+ if (!rScriptURL.startsWith("vnd.sun.star.script:")) -+ return false; -+ -+ // ensure URL Escape Codes are decoded -+ css::uno::Reference uri( -+ css::uri::UriReferenceFactory::create(comphelper::getProcessComponentContext())->parse(rScriptURL)); -+ css::uno::Reference sfUri(uri, css::uno::UNO_QUERY); -+ -+ if (!sfUri.is()) -+ return false; -+ -+ // pyuno encodes path separator as | -+ OUString sScript = sfUri->getName().replace('|', '/'); -+ -+ // check if any path portion matches LibreLogo and ban it if it does -+ sal_Int32 nIndex = 0; -+ do -+ { -+ OUString aToken = sScript.getToken(0, '/', nIndex); -+ if (aToken.startsWithIgnoreAsciiCase("LibreLogo")) -+ { -+ return true; -+ } -+ } -+ while (nIndex >= 0); -+ -+ return false; - } - - } --- -2.21.0 - diff --git a/SOURCES/CVE-2019-9851.patch b/SOURCES/CVE-2019-9851.patch deleted file mode 100644 index 82736c7..0000000 --- a/SOURCES/CVE-2019-9851.patch +++ /dev/null @@ -1,99 +0,0 @@ -From 292fe2f32df0e9096e63383eb45924eceb2179db Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Tue, 23 Jul 2019 15:31:05 +0100 -Subject: [PATCH 2/3] expand LibreLogo check to global events -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Reviewed-on: https://gerrit.libreoffice.org/76189 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 4a66c7eda6ccde26a42c4e31725248c59940255d) - -Change-Id: I7f436983ba0eb4b76b02d08ee52626e54b103d5f -Reviewed-on: https://gerrit.libreoffice.org/76305 -Reviewed-by: Thorsten Behrens -Tested-by: Thorsten Behrens ---- - include/sfx2/objsh.hxx | 2 ++ - sfx2/source/doc/objmisc.cxx | 6 +----- - sfx2/source/notify/eventsupplier.cxx | 18 ++++++++++++------ - 3 files changed, 15 insertions(+), 11 deletions(-) - -diff --git a/include/sfx2/objsh.hxx b/include/sfx2/objsh.hxx -index d04758567c80..ed09fc6e2acb 100644 ---- a/include/sfx2/objsh.hxx -+++ b/include/sfx2/objsh.hxx -@@ -404,6 +404,8 @@ public: - */ - bool AdjustMacroMode(); - -+ static bool UnTrustedScript(const OUString& rScriptURL); -+ - SvKeyValueIterator* GetHeaderAttributes(); - void ClearHeaderAttributesForSourceViewHack(); - void SetHeaderAttributesForSourceViewHack(); -diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx -index 7e9288524b34..9b82742302ab 100644 ---- a/sfx2/source/doc/objmisc.cxx -+++ b/sfx2/source/doc/objmisc.cxx -@@ -1348,10 +1348,8 @@ namespace - } - } - --namespace { -- - // don't allow LibreLogo to be used with our mouseover/etc dom-alike events --bool UnTrustedScript(const OUString& rScriptURL) -+bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL) - { - if (!rScriptURL.startsWith("vnd.sun.star.script:")) - return false; -@@ -1382,8 +1380,6 @@ bool UnTrustedScript(const OUString& rScriptURL) - return false; - } - --} -- - ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptContext, const OUString& _rScriptURL, - const Sequence< Any >& aParams, Any& aRet, Sequence< sal_Int16 >& aOutParamIndex, Sequence< Any >& aOutParam, bool bRaiseError, const css::uno::Any* pCaller ) - { -diff --git a/sfx2/source/notify/eventsupplier.cxx b/sfx2/source/notify/eventsupplier.cxx -index 78667a1d8036..2656e9c213ec 100644 ---- a/sfx2/source/notify/eventsupplier.cxx -+++ b/sfx2/source/notify/eventsupplier.cxx -@@ -207,18 +207,24 @@ void SfxEvents_Impl::Execute( uno::Any const & aEventData, const document::Docum - else if (aType == "Service" || - aType == "Script") - { -- if ( !aScript.isEmpty() ) -+ bool bAllowed = false; -+ util::URL aURL; -+ if (!aScript.isEmpty()) - { -- SfxViewFrame* pView = pDoc ? -- SfxViewFrame::GetFirst( pDoc ) : -- SfxViewFrame::Current(); -- - uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getProcessComponentContext() ) ); - -- util::URL aURL; - aURL.Complete = aScript; - xTrans->parseStrict( aURL ); - -+ bAllowed = !SfxObjectShell::UnTrustedScript(aURL.Complete); -+ } -+ -+ if (bAllowed) -+ { -+ SfxViewFrame* pView = pDoc ? -+ SfxViewFrame::GetFirst( pDoc ) : -+ SfxViewFrame::Current(); -+ - uno::Reference - < frame::XDispatchProvider > xProv; - --- -2.21.0 - diff --git a/SOURCES/CVE-2019-9852.patch b/SOURCES/CVE-2019-9852.patch deleted file mode 100644 index 2333556..0000000 --- a/SOURCES/CVE-2019-9852.patch +++ /dev/null @@ -1,39 +0,0 @@ -From 3a827091172b9ce3982323b838ed55d896d585d4 Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Sat, 3 Aug 2019 16:37:48 +0100 -Subject: [PATCH 3/3] keep name percent-encoded -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: I470c4b24192c3e3c9b556a9bbb3b084359e0033b -Reviewed-on: https://gerrit.libreoffice.org/77006 -Tested-by: Jenkins -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 315c51731384230194af26b86a976bf5d06c9dcc) -Reviewed-on: https://gerrit.libreoffice.org/77090 -Reviewed-by: Thorsten Behrens -Tested-by: Thorsten Behrens ---- - scripting/source/pyprov/pythonscript.py | 4 +++- - 1 file changed, 3 insertions(+), 1 deletion(-) - -diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py -index f1b2bfc75ee3..64e1337d642e 100644 ---- a/scripting/source/pyprov/pythonscript.py -+++ b/scripting/source/pyprov/pythonscript.py -@@ -219,7 +219,9 @@ class MyUriHelper: - - # path to the .py file + "$functionname, arguments, etc - xStorageUri = self.m_uriRefFac.parse(scriptURI) -- sStorageUri = xStorageUri.getName().replace( "|", "/" ); -+ # getName will apply url-decoding to the name, so encode back -+ sStorageUri = xStorageUri.getName().replace("%", "%25") -+ sStorageUri = sStorageUri.replace( "|", "/" ) - - # path to the .py file, relative to the base - sFileUri = sStorageUri[0:sStorageUri.find("$")] --- -2.21.0 - diff --git a/SOURCES/CVE-2019-9853.patch b/SOURCES/CVE-2019-9853.patch deleted file mode 100644 index 58a6975..0000000 --- a/SOURCES/CVE-2019-9853.patch +++ /dev/null @@ -1,89 +0,0 @@ -From 8f98c29cea1e46e5a2bcde10039840145776f56b Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Tue, 6 Aug 2019 13:29:22 +0200 -Subject: [PATCH] Properly obtain location -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: I9fb0d883a3623394343cd54ef61e5610544198c8 -Reviewed-on: https://gerrit.libreoffice.org/77019 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit a9cde2557242a0c343d99533f3ee032599c66f42) -Reviewed-on: https://gerrit.libreoffice.org/77024 -Reviewed-by: Caolán McNamara -Reviewed-by: Michael Stahl -Reviewed-by: Christian Lohmaier -Tested-by: Christian Lohmaier ---- - .../source/protocolhandler/scripthandler.cxx | 9 ++++++-- - sfx2/source/doc/objmisc.cxx | 21 +++++++++++-------- - 2 files changed, 19 insertions(+), 11 deletions(-) - -diff --git a/scripting/source/protocolhandler/scripthandler.cxx b/scripting/source/protocolhandler/scripthandler.cxx -index f8ad8c7fd63d..332d4833a6f2 100644 ---- a/scripting/source/protocolhandler/scripthandler.cxx -+++ b/scripting/source/protocolhandler/scripthandler.cxx -@@ -49,6 +49,7 @@ - - #include - #include -+#include - #include - - #include -@@ -135,8 +136,12 @@ void SAL_CALL ScriptProtocolHandler::dispatchWithNotification( - { - try - { -- bool bIsDocumentScript = ( aURL.Complete.indexOf( "document" ) !=-1 ); -- // TODO: isn't this somewhat strange? This should be a test for a location=document parameter, shouldn't it? -+ css::uno::Reference urifac( -+ css::uri::UriReferenceFactory::create(m_xContext)); -+ css::uno::Reference uri( -+ urifac->parse(aURL.Complete), css::uno::UNO_QUERY_THROW); -+ auto const loc = uri->getParameter("location"); -+ bool bIsDocumentScript = loc == "document"; - - if ( bIsDocumentScript ) - { -diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx -index 9869f76606bf..08f4d8c21297 100644 ---- a/sfx2/source/doc/objmisc.cxx -+++ b/sfx2/source/doc/objmisc.cxx -@@ -1380,19 +1380,22 @@ ErrCode SfxObjectShell::CallXScript( const Reference< XInterface >& _rxScriptCon - SAL_INFO("sfx", "in CallXScript" ); - ErrCode nErr = ERRCODE_NONE; - -- bool bIsDocumentScript = ( _rScriptURL.indexOf( "location=document" ) >= 0 ); -- // TODO: we should parse the URL, and check whether there is a parameter with this name. -- // Otherwise, we might find too much. -- if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) ) -- return ERRCODE_IO_ACCESSDENIED; -- -- if ( UnTrustedScript(_rScriptURL) ) -- return ERRCODE_IO_ACCESSDENIED; -- - bool bCaughtException = false; - Any aException; - try - { -+ css::uno::Reference urifac( -+ css::uri::UriReferenceFactory::create(comphelper::getProcessComponentContext())); -+ css::uno::Reference uri( -+ urifac->parse(_rScriptURL), css::uno::UNO_QUERY_THROW); -+ auto const loc = uri->getParameter("location"); -+ bool bIsDocumentScript = loc == "document"; -+ if ( bIsDocumentScript && !lcl_isScriptAccessAllowed_nothrow( _rxScriptContext ) ) -+ return ERRCODE_IO_ACCESSDENIED; -+ -+ if ( UnTrustedScript(_rScriptURL) ) -+ return ERRCODE_IO_ACCESSDENIED; -+ - // obtain/create a script provider - Reference< provider::XScriptProvider > xScriptProvider; - Reference< provider::XScriptProviderSupplier > xSPS( _rxScriptContext, UNO_QUERY ); --- -2.21.0 - diff --git a/SOURCES/CVE-2019-9854.patch b/SOURCES/CVE-2019-9854.patch deleted file mode 100644 index 0d7d3c4..0000000 --- a/SOURCES/CVE-2019-9854.patch +++ /dev/null @@ -1,86 +0,0 @@ -From f107a8c90168124462ddd00db015810081d4be2f Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= -Date: Mon, 12 Aug 2019 20:32:54 +0100 -Subject: [PATCH 1/2] construct final url from parsed output -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Change-Id: Ifd733625a439685ad307603eb2b00bf463eb9ca9 -Reviewed-on: https://gerrit.libreoffice.org/77373 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit 87959e5deea6d33cd35dbb3b8423056f9566710e) -Reviewed-on: https://gerrit.libreoffice.org/77377 -(cherry picked from commit c03acb9b8a97254cfcf7c45ef920b93b7f1dd344) - -an absolute uri is invalid input - -Change-Id: I392be4282be8ed67e3451b28d2c9f22acd4c87fc -Reviewed-on: https://gerrit.libreoffice.org/77564 -Reviewed-by: Stephan Bergmann -Tested-by: Stephan Bergmann -(cherry picked from commit 3c076e54f736980e208f5c27ecf179aa90aea103) -Reviewed-on: https://gerrit.libreoffice.org/77572 -Tested-by: Jenkins -(cherry picked from commit 5445f7ffd09e891b220dabb19cd013bcf591fc08) - -Improve check for absolute URI - -Change-Id: I4dee44832107f72f8f3fb68554428dc1e646c346 -Reviewed-on: https://gerrit.libreoffice.org/77706 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit c79efeb66f7951305d0334bc288aee1c571a8728) -Reviewed-on: https://gerrit.libreoffice.org/77724 -Reviewed-by: Caolán McNamara -Tested-by: Caolán McNamara -(cherry picked from commit 52f7aa318722bd17c77ee5c4fa8307936e7b53af) ---- - scripting/source/pyprov/pythonscript.py | 17 +++++++++++++++-- - 1 file changed, 15 insertions(+), 2 deletions(-) - -diff --git a/scripting/source/pyprov/pythonscript.py b/scripting/source/pyprov/pythonscript.py -index 64e1337d642e..acb6184bf437 100644 ---- a/scripting/source/pyprov/pythonscript.py -+++ b/scripting/source/pyprov/pythonscript.py -@@ -224,13 +224,24 @@ class MyUriHelper: - sStorageUri = sStorageUri.replace( "|", "/" ) - - # path to the .py file, relative to the base -- sFileUri = sStorageUri[0:sStorageUri.find("$")] -+ funcNameStart = sStorageUri.find("$") -+ if funcNameStart != -1: -+ sFileUri = sStorageUri[0:funcNameStart] -+ sFuncName = sStorageUri[funcNameStart+1:] -+ else: -+ sFileUri = sStorageUri -+ - xFileUri = self.m_uriRefFac.parse(sFileUri) - if not xFileUri: - message = "pythonscript: invalid relative uri '" + sFileUri+ "'" - log.debug( message ) - raise RuntimeException( message ) - -+ if not xFileUri.hasRelativePath(): -+ message = "pythonscript: an absolute uri is invalid '" + sFileUri+ "'" -+ log.debug( message ) -+ raise RuntimeException( message ) -+ - # absolute path to the .py file - xAbsScriptUri = self.m_uriRefFac.makeAbsolute(xBaseUri, xFileUri, True, RETAIN) - sAbsScriptUri = xAbsScriptUri.getUriReference() -@@ -241,7 +252,9 @@ class MyUriHelper: - log.debug( message ) - raise RuntimeException( message ) - -- ret = sBaseUri + sStorageUri -+ ret = sAbsScriptUri -+ if funcNameStart != -1: -+ ret = ret + "$" + sFuncName - log.debug( "converting scriptURI="+scriptURI + " to storageURI=" + ret ) - return ret - except UnoException as e: --- -2.21.0 - diff --git a/SOURCES/CVE-2019-9855.patch b/SOURCES/CVE-2019-9855.patch deleted file mode 100644 index 75f64eb..0000000 --- a/SOURCES/CVE-2019-9855.patch +++ /dev/null @@ -1,33 +0,0 @@ -From 1686c4273b8e0b8218853669e50d4bf405525dde Mon Sep 17 00:00:00 2001 -From: Stephan Bergmann -Date: Mon, 26 Aug 2019 10:18:09 +0200 -Subject: [PATCH 2/2] Improve check - -Change-Id: I8280a81eef2ced0ff0ace51ea9f094421abafe13 -Reviewed-on: https://gerrit.libreoffice.org/78108 -Tested-by: Jenkins -Reviewed-by: Stephan Bergmann -(cherry picked from commit 761e6dd25782420bf06e4a2ff3205a79b6cbb136) -Reviewed-on: https://gerrit.libreoffice.org/78129 -Reviewed-by: Michael Stahl -(cherry picked from commit ffad51e9e625a22f1efab3da7886baf4134b444f) ---- - sfx2/source/doc/objmisc.cxx | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/sfx2/source/doc/objmisc.cxx b/sfx2/source/doc/objmisc.cxx -index 9b82742302ab..4f2a05909a74 100644 ---- a/sfx2/source/doc/objmisc.cxx -+++ b/sfx2/source/doc/objmisc.cxx -@@ -1370,7 +1370,7 @@ bool SfxObjectShell::UnTrustedScript(const OUString& rScriptURL) - do - { - OUString aToken = sScript.getToken(0, '/', nIndex); -- if (aToken.startsWithIgnoreAsciiCase("LibreLogo")) -+ if (aToken.startsWithIgnoreAsciiCase("LibreLogo") || aToken.indexOf('~') != -1) - { - return true; - } --- -2.21.0 - diff --git a/SOURCES/libreoffice-6.0.6.1.tar.xz.asc b/SOURCES/libreoffice-6.0.6.1.tar.xz.asc deleted file mode 100644 index 5caf103..0000000 --- a/SOURCES/libreoffice-6.0.6.1.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIcBAABAgAGBQJbRQRlAAoJEPQ0oe+v7q6j9CYP/jVao6G/9bad2JfIxhr6X9kb -7iVBNh4jVTzrOC+sPGykshAZ/WqehJ0XJNm5xB0PfPIZ1rc7tYmpaHnaakw7jH0q -kLGsbBMgfnNrcboiO7qiVUdgeU5idBLUH8Md/REVLJ34GueMdfvklEcMjoquv3n7 -4h5y0+St8FBLjefp4FyB7LLAnLfcSELZ73idn3w2t+sRp5QvCfYgWKdmarqrbZtk -bwAFFgsCjSMFz7eqV+xNU1JtuphOGThFHdhe016VmEURQegHHYord3FUf7PGFklp -xWVfkectZkgOfQCewvNQuYKOUxptkhDRYr8OR0FGRV1yKXJlMZksqvumcEF6scEp -7+kBtnY8BL50jCMG29hhJ8fkFKsSfTlstkHLpHq1lzKdjpuD1/90gdJCbgowjDbe -XfmIhH4brEpwxow9RjZ9glb/Akpql7JrUscgta2pLzmQrLEuiAyE61qDAkrKj8nZ -H5Jpt3zRO5CKpm2kEKkx6auOjvJFIWruMmkPeH5M0eBYjTuZb09f7rEkSPFctOMn -DXuDa40+Mr+lt9gOp8HtktN+bpIGiwZHLjDcAR1+TEhlriEXo7ydxRl2gjThN8u5 -EqzQ7390B/xrFQ8P13Vqc2ICqM1S3m64tDTmTOZk2kzDAcmjUbg8/a/7kRr3UF7f -BO4UJvoNZxPlopo/jxM7 -=Z/eu ------END PGP SIGNATURE----- diff --git a/SOURCES/libreoffice-6.3.6.2.tar.xz.asc b/SOURCES/libreoffice-6.3.6.2.tar.xz.asc new file mode 100644 index 0000000..ea04adb --- /dev/null +++ b/SOURCES/libreoffice-6.3.6.2.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl6gIF4ACgkQ9DSh76/u +rqN6sBAAyAGXPcw8Uyd3KCczDuYBJa+lDkO3RJj5CD+69XFCD4Mp+Wo1pGZWhJdT +k1xU/KC+w5BkUP8B5Hf0HVXAt+nwAjZMafhUJssogKr2/2NTrjJ1xovo60/DVZCp +eRu/pAudlR1b8B+giwrO0dDKJ1DvbrOUUIbdqXmKQcb2XA0Actyxa5zBcg19/iPN +zL3Sv1ExsXTG67pqMU19ch/GfqcaQeH6KZCIpJTLFg8hfY6q3stJ1s7jpxPvPlcY +fV9NR3bpO7GGvcOoo2SOr7oV95jCP3G3f/qUTLo7VgVsKIWOUGBPl5MfsHDNIxt+ +MAmlWaEMjxA82LZ8A1aGu4vvGS9ejytEiKv8tkEfaq6Ixaizh30iZecBoATJFA28 +CT3yTaHBImvHzot+zDc3TNMKXJjQ5MSTGNLRXN+gNpaa/NUPUgJ4csMgQVjTwwEP +2qqSvJB23I+6DVJnxUJC/cHL7SV0JPJ08ccQi4kAAJ+9f45/hTCQsP24RG+ZHIlS +wxsS55Py2jHOd7HySYjJzLHxXum9zSMRqDi4qGTi8TTUGJKLiANW/SdlS96UUgjG +Xby+jHEvqClWBryygyj7MndlXjOYU4QS1YezIaO6lSFNb4IA+zYAOqfXr2aM2xZK +GnhCCvJNFqe0IX+ZAYIjWBMaBTNZ2SJ61C9hM+4WncO0acekaMQ= +=+JKG +-----END PGP SIGNATURE----- diff --git a/SOURCES/libreoffice-base-symbolic.svg b/SOURCES/libreoffice-base-symbolic.svg new file mode 100644 index 0000000..16f3cef --- /dev/null +++ b/SOURCES/libreoffice-base-symbolic.svg @@ -0,0 +1,27 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + diff --git a/SOURCES/libreoffice-calc-symbolic.svg b/SOURCES/libreoffice-calc-symbolic.svg new file mode 100644 index 0000000..bf56588 --- /dev/null +++ b/SOURCES/libreoffice-calc-symbolic.svg @@ -0,0 +1,27 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + diff --git a/SOURCES/libreoffice-draw-symbolic.svg b/SOURCES/libreoffice-draw-symbolic.svg new file mode 100644 index 0000000..7ca94ee --- /dev/null +++ b/SOURCES/libreoffice-draw-symbolic.svg @@ -0,0 +1,26 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + diff --git a/SOURCES/libreoffice-help-6.0.6.1.tar.xz.asc b/SOURCES/libreoffice-help-6.0.6.1.tar.xz.asc deleted file mode 100644 index 953e1ab..0000000 --- a/SOURCES/libreoffice-help-6.0.6.1.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIcBAABAgAGBQJbRQRsAAoJEPQ0oe+v7q6jxGoQAIxhQNVCN8BB4QqbJDILOg81 -IJvogAAlSSC/n105SumrWnrDMmdYx5Sq8kKSKLJaVBUbNwG6f6GYe4eu03QTSG10 -WJ36tvUisx8E7b+ur8kLzGaE7v6S6q0OKkf711ieUnZn/YC1mDNoOr7yYAuNpcCn -iTdt5war6i1DswCG4wiVrO2fMiZ8oHlvfpHU3TDNPHL+0qcYaGtce6/N5v4jnVLh -JIqNmQWAbquD+Tljk4AYsL/5vnj8qzTH4VWrL3bjJPBCBDbNoUXlaI6vo5o9AGRN -OVASSyMahFyNsDRWv7zD9MKkNQ5E5gASgUE8YqyMS1xW++uUARW1cmk7zhGFDd1D -BTCi9S9hBmEZoNtsIzClInEExugwV5PcY5ShNiXEvN5QyjQMvKmvWLJtYaBVdJUD -Bcxs52fNyBGsxqzQvfX3+QHXReOIoNCDB8jpatNxaEUYvO+rcaaoRBqfhCiM44fv -fMbTRCAtCY/9PXK//YWihk303OT2/ZF3+AEHsRPOm9Ykh3EdH1naU9ewM3ZTkDIO -fSiTLVQTEX5qIo09UgKMpPm0bZnFMHObic5wAYZ56kmEOHVmiGhsHwmHFQe8PlF8 -phb4TLIaaKHQaugonBkX0Gg/9WPz3MT1wCh2kiZSt5Ix/qJgewIav9EMWc/P/LsZ -wBpki/58B7YsIyEazAK1 -=NeOu ------END PGP SIGNATURE----- diff --git a/SOURCES/libreoffice-help-6.3.6.2.tar.xz.asc b/SOURCES/libreoffice-help-6.3.6.2.tar.xz.asc new file mode 100644 index 0000000..6fbb0e2 --- /dev/null +++ b/SOURCES/libreoffice-help-6.3.6.2.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl6gIGQACgkQ9DSh76/u +rqPMoQ/+OpSwyMQ5fy2eaJF+tVRJWroNZw/PmyXpwoinNX2EQNe6f6Nswej4u+YA +sYU1QCxmEMBY27LOli9Fa4ll5fAW2X8kThdxDiGPRs9+NMnZv7uEnf5eWvvjh9aT +BZLF01BOR798u+ympR6w+6xBRs5sPIqE4Lv7oOafAr5P9nEFAmR7aF9KiIQZWgcK +dUUBm8xhfXkd8/2uAFNJQg+SfMYgbipU18mImRorFwU27WLaNLCqrDTPbA76sdf/ +LvvXDJi8t49x+vvquWgOUND+96u/oESQhXveaRgXYLWUt+pFghw7E3P3BZPf6VOX +3hWngv9llNyFccgVMpvUqRSkwbG9TYnWPAXlyYEPF+E6JUe+n3D4UAWn8rJquf6F +ZdmHFNuqQR8XB8Vtc0fwsEu+l0MMg/OmF9R7oeYXx6orAe2WtnpLD45G6lxdoGDx +JVAPvNAq8ys8Hj8xoIO3AuXR/QHeNdxQi3/VXoC8hjfowhsRfvL4TmvT2TIE+/J6 +fTyOP1gKeI5aBTYHlIwwTFoPntlOLQ56Kck8YlZMQl6KdaUN1CJRdYjg36HPgXHg +cF9ZxR3rT4dxC8qmtnlAl8SWI37uvbiUM1IjyT9dmGSFBHPm5ph2dRaGeWWVE/Z3 +D3qdN2c0+AW7UXk4r0h5KVfFEvTBsbNUk2jPcup7sf3S8ZSXZ0o= +=+b1s +-----END PGP SIGNATURE----- diff --git a/SOURCES/libreoffice-impress-symbolic.svg b/SOURCES/libreoffice-impress-symbolic.svg new file mode 100644 index 0000000..9a16f76 --- /dev/null +++ b/SOURCES/libreoffice-impress-symbolic.svg @@ -0,0 +1,25 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + diff --git a/SOURCES/libreoffice-main-symbolic.svg b/SOURCES/libreoffice-main-symbolic.svg new file mode 100644 index 0000000..6bd3103 --- /dev/null +++ b/SOURCES/libreoffice-main-symbolic.svg @@ -0,0 +1,24 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + diff --git a/SOURCES/libreoffice-math-symbolic.svg b/SOURCES/libreoffice-math-symbolic.svg new file mode 100644 index 0000000..66cd9e7 --- /dev/null +++ b/SOURCES/libreoffice-math-symbolic.svg @@ -0,0 +1,25 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + diff --git a/SOURCES/libreoffice-translations-6.0.6.1.tar.xz.asc b/SOURCES/libreoffice-translations-6.0.6.1.tar.xz.asc deleted file mode 100644 index c6e7351..0000000 --- a/SOURCES/libreoffice-translations-6.0.6.1.tar.xz.asc +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIcBAABAgAGBQJbRQRvAAoJEPQ0oe+v7q6jLwgQALn0L72pJHBauDOR0RTBI3ha -2umJnT6QM2N30H5Fe4IiqqH2X0C7kToCRzxZWIbLibMYqjuNbxClOzUsSsQLduJS -QzfjQSBDwXJy4US650n934vDsyxObKj1e8oVKAyCEen3HGsAPojkKD/C5BaUjDAv -gzRp2eHKRc75hKDpM5d57o34VSO6cvnhS0t1fOFNzA1xyK+WIuOw401rRNvrcCyu -Mu273oFREqdDMUjE67s2Pl9H92Xf7aqSKqix+U5eOygSTdBFt91v2ST1/i9Fp0Ra -PTE7JjR1Cr1pWSzSwZBvXXHXColCr05DWYebOEmbMUzrlxh7VpHkQD85QdN9sHPP -FYCYfy+oF47lW3mU+2NnTKWoQQKOrIofv8ONJow68VHjoTtW1ktK0S/gz9agwJD3 -L8IGmWDLO+G4QfgKF1/3aMVz/ctoXgpkWEENTm0rUdTB6Fz9QkSQh/ku/krhhF57 -E8/ZCbD48GY97lnRaZdNBCm9+ZV+21bo3ImbpozfWLcF7hxE4w43sn2ms1aeAWdd -dnGKIOAMHk5YrBbskbLZ1IlgfQnomK5jQ+wspwweGyquucIkTlVhDtINEDjvt9rk -gliphVVy6WhgFbwblPNq+LEAhN/pSaKwOjE3PMHx2pP+ocS1Uy6kyTOx8JCkDtUH -GQ8RJwQQPabbGNWiQwjP -=R9e8 ------END PGP SIGNATURE----- diff --git a/SOURCES/libreoffice-translations-6.3.6.2.tar.xz.asc b/SOURCES/libreoffice-translations-6.3.6.2.tar.xz.asc new file mode 100644 index 0000000..7c4deac --- /dev/null +++ b/SOURCES/libreoffice-translations-6.3.6.2.tar.xz.asc @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCAAdFiEEwoOeytlAj76VMcPp9DSh76/urqMFAl6gIGUACgkQ9DSh76/u +rqPyqQ/9GeLFssbtcXE3IO2ZJMTgRQZyfAZ3bP0kI8LG8vYXskHj+HQdpe0qg0ik +EKUZWh+gy37TTX88FhZqZ4FErZ67rSBAqW9yvq3+T17+bCSoxynEJzrDy2yhirru +XHhkDC1QO0n1aY2Fe7p/Qw0cb5jzxnPyIf55fOH0gwWTq/ZQiA+qRej8TMvTd1vW +zaOU9k4zd4rMxdaQg+WpOmwf/QuxK4jPbU9dB5dMFW7JxBYWjgplhH5DI4wVysvn +8S3LVgwKB5t0mMK0SAm5jAa9urIDdH9F1ZDnPSsngGQ0PmiSIQnRcfA7SbfZ4IIA +SehTcW0rNoqeCv6H+vOX5EIIVehtBun5bJXFZ/y9a3PHxPqDR0xtjF7H95a3+Vrq +Yf0/52MowGpgEwPgLWrdLJId0xdVymhKw5k4rZu5l5DEGS0PteGUJ7C50P+HMeAm +6RuP+CaSFW31+pEJMYCgMtmUK3s+ru9dj/rUdEDHXi5IUZQ8IEtCLou3Uwzs47Tb +kf2m3r9a9jQIhv5Cba2yAluhIbsKC2WmZbRzioPwnHV7ULUDy+E/Pz1tEQ0Vy4/M +Xed4RDoukZRy8VzsVqyneNOTMia22P1oy1xXtNzQ/CA+6vByQrByGTnt3ro3/frm +jwbFTSyuYgWuX0l++nxjt6dSVxwczouqFjR0UJU/dADnxsHqMc8= +=FOsh +-----END PGP SIGNATURE----- diff --git a/SOURCES/libreoffice-writer-symbolic.svg b/SOURCES/libreoffice-writer-symbolic.svg new file mode 100644 index 0000000..e97b545 --- /dev/null +++ b/SOURCES/libreoffice-writer-symbolic.svg @@ -0,0 +1,28 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + + + + + + diff --git a/SPECS/libreoffice.spec b/SPECS/libreoffice.spec index 5b60a8e..96d7a3b 100644 --- a/SPECS/libreoffice.spec +++ b/SPECS/libreoffice.spec @@ -1,5 +1,9 @@ +# This package depends on automagic byte compilation +# https://fedoraproject.org/wiki/Changes/No_more_automagic_Python_bytecompilation_phase_2 +%global _python_bytecompile_extra 1 + # download path contains version without the last (fourth) digit -%global libo_version 6.0.6 +%global libo_version 6.3.6 # Should contain .alphaX / .betaX, if this is pre-release (actually # pre-RC) version. The pre-release string is part of tarball file names, # so we need a way to define it easily at one place. @@ -13,17 +17,9 @@ %if 0%{?fedora} %global vendoroption --with-vendor="The Fedora Project" %endif -%if 0%{?rhel} && 0%{?rhel} < 8 -%global libo_use_python3 %{nil} -%global libo_python python -%global libo_python_executable %{__python2} -%global libo_python_sitearch %{python_sitearch} -%else -%global libo_use_python3 1 %global libo_python python3 %global libo_python_executable %{__python3} %global libo_python_sitearch %{python3_sitearch} -%endif # rhbz#465664 jar-repacking breaks help by reordering META-INF/MANIFEST.MF %global __jar_repack %{nil} # make it easier to download sources from pre-release site @@ -34,12 +30,6 @@ %endif # URL for external projects' tarballs %global external_url http://dev-www.libreoffice.org/src -%if 0%{?rhel} && 0%{?rhel} < 8 -%nil -%else -%global weak_deps 1 -%global file_triggers 1 -%endif %global girapiversion 0.1 # get english only and no-langpacks for a faster smoketest build @@ -63,8 +53,8 @@ Summary: Free Software Productivity Suite Name: libreoffice Epoch: 1 -Version: %{libo_version}.1 -Release: 20%{?libo_prerelease}%{?dist} +Version: %{libo_version}.2 +Release: 3%{?libo_prerelease}%{?dist} License: (MPLv1.1 or LGPLv3+) and LGPLv3 and LGPLv2+ and BSD and (MPLv1.1 or GPLv2 or LGPLv2 or Netscape) and Public Domain and ASL 2.0 and MPLv2.0 and CC0 URL: http://www.libreoffice.org/ @@ -86,7 +76,8 @@ Source11: %{external_url}/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip #Unfortunately later versions of hsqldb changed the file format, so if we use a later version we loose #backwards compatability. Source12: %{external_url}/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip -%global bundling_options %{?bundling_options} --without-system-hsqldb +Source13: %{external_url}/884ed41809687c3e168fc7c19b16585149ff058eca79acbf3ee784f6630704cc-opens___.ttf +%global bundling_options %{?bundling_options} --without-system-hsqldb --disable-libnumbertext Provides: bundled(hsqldb) = 1.8.0 %if 0%{?fedora} @@ -103,33 +94,6 @@ Source46: https://raw.githubusercontent.com/gnome-design-team/gnome-icons/ Source47: https://raw.githubusercontent.com/gnome-design-team/gnome-icons/master/apps-symbolic/Adwaita/scalable/apps/libreoffice-math-symbolic.svg Source48: https://raw.githubusercontent.com/gnome-design-team/gnome-icons/master/apps-symbolic/Adwaita/scalable/apps/libreoffice-writer-symbolic.svg -%if 0%{?rhel} - -%if 0%{?rhel} < 8 -Source200: %{external_url}/mdds-1.3.1.tar.bz2 -Source201: %{external_url}/harfbuzz-1.7.0.tar.bz2 -Source202: %{external_url}/graphite2-minimal-1.3.10.tgz -Source203: %{external_url}/gpgme-1.9.0.tar.bz2 -Source204: %{external_url}/libgpg-error-1.27.tar.bz2 -Source205: %{external_url}/libassuan-2.4.3.tar.bz2 -Source206: %{external_url}/cppunit-1.14.0.tar.gz -Source207: %{external_url}/libqxp-0.0.1.tar.xz -Source208: %{external_url}/libepubgen-0.1.0.tar.bz2 -Source209: %{external_url}/liborcus-0.13.3.tar.gz -%global bundling_options %{?bundling_options} --without-system-mdds --without-system-harfbuzz --without-system-graphite --without-system-gpgmepp --without-system-cppunit --without-system-libqxp --without-system-libepubgen --without-system-orcus - -Provides: bundled(gpgme) = 1.9.0 -Provides: bundled(graphite2) = 1.3.10 -Provides: bundled(harfbuzz) = 1.7.0 -Provides: bundled(libassuan) = 2.4.3 -Provides: bundled(libepubgen) = 0.1.0 -Provides: bundled(libgpg-error) = 1.27 -Provides: bundled(liborcus) = 0.13.3 -Provides: bundled(libqxp) = 0.0.1 -Provides: bundled(mdds) = 1.3.1 -%endif -%endif - # build tools BuildRequires: autoconf BuildRequires: automake @@ -149,8 +113,10 @@ BuildRequires: gperf BuildRequires: icu BuildRequires: libtool-ltdl-devel BuildRequires: make +BuildRequires: mariadb-connector-c-devel BuildRequires: perl(Digest::MD5) %if 0%{?fedora} +BuildRequires: glibc-all-langpacks BuildRequires: libappstream-glib %endif BuildRequires: ucpp @@ -179,7 +145,6 @@ BuildRequires: pkgconfig(glu) BuildRequires: pkgconfig(gobject-introspection-1.0) BuildRequires: pkgconfig(gstreamer-1.0) BuildRequires: pkgconfig(gstreamer-plugins-base-1.0) -BuildRequires: pkgconfig(gtk+-2.0) BuildRequires: pkgconfig(gtk+-3.0) BuildRequires: pkgconfig(hunspell) BuildRequires: pkgconfig(ice) @@ -212,7 +177,6 @@ BuildRequires: pkgconfig(libzmf-0.0) BuildRequires: pkgconfig(mythes) BuildRequires: pkgconfig(neon) BuildRequires: pkgconfig(nss) -BuildRequires: pkgconfig(openssl) BuildRequires: pkgconfig(poppler) BuildRequires: pkgconfig(poppler-cpp) BuildRequires: pkgconfig(redland) @@ -227,23 +191,26 @@ BuildRequires: %{libo_python_executable} # libs / headers - conditional %if 0%{?fedora} -BuildRequires: kdelibs4-devel BuildRequires: pkgconfig(libe-book-0.1) +BuildRequires: qt5-qtbase-devel +BuildRequires: qt5-qtx11extras-devel +BuildRequires: kf5-kconfig-devel +BuildRequires: kf5-kcoreaddons-devel +BuildRequires: kf5-kdelibs4support-devel +BuildRequires: kf5-ki18n-devel +BuildRequires: kf5-kio-devel +BuildRequires: kf5-kwindowsystem-devel %endif -%if 0%{?rhel} && 0%{?rhel} < 8 -%nil -%else BuildRequires: gpgmepp-devel BuildRequires: pkgconfig(cppunit) >= 1.14.0 BuildRequires: pkgconfig(graphite2) BuildRequires: pkgconfig(harfbuzz) BuildRequires: pkgconfig(libeot) BuildRequires: pkgconfig(libepubgen-0.1) -BuildRequires: pkgconfig(liborcus-0.13) BuildRequires: pkgconfig(libqxp-0.0) -BuildRequires: pkgconfig(mdds-1.2) -%endif +BuildRequires: pkgconfig(liborcus-0.14) +BuildRequires: pkgconfig(mdds-1.4) # java stuff BuildRequires: ant @@ -270,43 +237,20 @@ Requires: %{name}-emailmerge%{?_isa} = %{epoch}:%{version}-%{release} # not upstreamed: upstream wants an automatic restart after a crash; we # want a nice abrt report Patch0: 0001-don-t-suppress-crashes.patch -# not upstreamed -Patch1: 0001-Related-tdf-106100-recover-mangled-svg-in-presentati.patch -# not upstreamed +Patch1: 0001-disble-tip-of-the-day-dialog-by-default.patch Patch2: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch -# not upstreamed -Patch3: 0001-gtk3-only-for-3.20.patch -Patch4: 0001-Related-tdf-105998-except-cut-and-paste-as-bitmap-in.patch -Patch5: 0001-request-installation-of-langpack-via-packagekit.patch -Patch6: 0001-forcepoint-fix-out-of-bounds-read-in-ICU.patch -Patch7: 0001-Upgrade-to-ICU-61.1.patch -Patch8: 0001-Keep-the-still-relevant-part-of-external-icu-icu4c-u.patch -Patch9: 0001-We-use-ICU-61-now.patch -Patch10: 0001-Upgrade-to-ICU-62.1.patch -Patch11: 0001-Use-ICU_MAJOR-instead-of-hard-coded-Upgrade-to-ICU-6.patch -Patch12: 0001-implement-pdf-export-of-underline-for-outlined-font.patch -Patch13: 0001-cov-scan-help-warnings.patch -Patch14: 0001-cov-scan-warnings.patch -Patch15: 0001-Adapt-to-Python-3.patch -Patch16: 0001-Related-rhbz-1618703-Properly-handle-failure-decodin.patch -Patch17: 0002-Related-rhbz-1618703-Properly-handle-failure-encodin.patch -Patch18: 0003-Related-rhbz-1618703-Properly-handle-failure-encodin.patch -Patch19: 0004-iRelated-rhbz-1618703-Properly-handle-failure-en-dec.patch -Patch20: 0005-rhbz-1618703-Allow-to-use-OpenSSL-as-backend-for-rtl.patch -Patch21: 0001-Resolves-rhbz-1647507-try-inputted-password-as-both-.patch -Patch22: 0001-tdf-121203-DOCX-import-fix-loss-of-free-form-text-in.patch -Patch23: 0001-keep-pyuno-script-processing-below-base-uri.patch -Patch24: 0001-rhbz-1691287-tdf-53029-ui-prompt-for-printer-authent.patch -Patch25: 0001-Resolves-rhbz-1715109-add-All-files-to-the-graphic-i.patch -Patch26: CVE-2019-9848.patch -Patch27: CVE-2019-9849.patch -Patch28: CVE-2019-9850.patch -Patch29: CVE-2019-9851.patch -Patch30: CVE-2019-9852.patch -Patch31: CVE-2019-9853.patch -Patch32: CVE-2019-9854.patch -Patch33: CVE-2019-9855.patch -Patch34: 0001-Make-Noto-Color-Emoji-font-work-on-Linux.patch +Patch3: 0001-rhbz-1775767-null-deref.patch +Patch4: 0001-Adapt-SAL_WARN-to-C-20-deleted-ostream-for-sal_Unico.patch +Patch5: 0001-rhbz-1810732-crash-assert-inserting-document-with-in.patch +Patch6: 0001-AppendInfoBar-can-return-null.patch +Patch7: 0001-General-Internet-Error-dialog-appearing-on-gio-mount.patch +Patch8: 0001-rhbz-1820868-deref-of-null-xLayoutManager.patch +Patch9: 0001-Resolves-tdf-132288-don-t-merge-adjacent-properties-.patch +Patch10: 0001-tdf-131069-always-produce-utf-8-from-gettext.patch +Patch11: 0001-Keep-order-of-GDK-input-events-intact.patch +Patch12: 0001-Resolves-tdf-133411-drop-CONTENT_FLOWS_TO-from-dialo.patch +Patch13: 0001-limit-forms-to-http-s.patch +Patch14: 0001-use-the-LinkManager-persist-to-determine-the-Referer.patch %if 0%{?rhel} # not upstreamed @@ -325,13 +269,6 @@ Patch500: 0001-disable-libe-book-support.patch %global lodatadocdir %{_pkgdocdir} %global name %{oldname} -# rhbz#1085420 make sure we do not provide bundled libraries -%if 0%{?rhel} && 0%{?rhel} < 8 -%global libo_bundled_libs_filter ^liborcus(-parser)?-0\\.13\\.so.*$ -%global __provides_exclude %{libo_bundled_libs_filter} -%global __requires_exclude %{libo_bundled_libs_filter} -%endif - %if 0%{?__isa_bits} == 64 %global mark64 ()(64bit) %endif @@ -365,7 +302,7 @@ Summary: Core modules for LibreOffice Requires: %{name}-%{fontname}-fonts = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-data = %{epoch}:%{version}-%{release} -Requires: %{name}-gtk3%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-plugin%{?_isa} = %{epoch}:%{version}-%{release} Requires: liberation-sans-fonts, liberation-serif-fonts, liberation-mono-fonts Requires: dejavu-sans-fonts, dejavu-serif-fonts, dejavu-sans-mono-fonts Requires: google-crosextra-caladea-fonts, google-crosextra-carlito-fonts @@ -376,8 +313,8 @@ Obsoletes: libreoffice-headless < 1:4.4.0.0 Provides: libreoffice-headless = %{epoch}:%{version}-%{release} Provides: libreoffice-headless%{?_isa} = %{epoch}:%{version}-%{release} %if 0%{?rhel} -Obsoletes: libreoffice-bsh < 1:6.0.6.2 -Obsoletes: libreoffice-rhino < 1:6.0.6.2 +Obsoletes: libreoffice-bsh < 1:6.2.2.3 +Obsoletes: libreoffice-rhino < 1:6.2.2.3 %endif %description core @@ -497,6 +434,7 @@ mathematical symbols. Summary: LibreOffice Word Processor Application Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-data = %{epoch}:%{version}-%{release} +Requires: %{name}-pdfimport%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-pyuno%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} @@ -515,6 +453,7 @@ Enables the LibreOffice writer module to mail-merge to email. Summary: LibreOffice Spreadsheet Application Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-data = %{epoch}:%{version}-%{release} +Requires: %{name}-pdfimport%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-pyuno%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} @@ -525,8 +464,8 @@ The LibreOffice Spreadsheet application. Summary: LibreOffice Drawing Application Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-data = %{epoch}:%{version}-%{release} -Requires: %{name}-pyuno%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-pdfimport%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-pyuno%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-graphicfilter%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} @@ -537,6 +476,7 @@ The LibreOffice Drawing Application. Summary: LibreOffice Presentation Application Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-data = %{epoch}:%{version}-%{release} +Requires: %{name}-pdfimport%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-pyuno%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-graphicfilter%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} @@ -547,6 +487,7 @@ The LibreOffice Presentation Application. %package math Summary: LibreOffice Equation Editor Application Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-pdfimport%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-pyuno%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} @@ -653,50 +594,46 @@ Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} Provides: %{name}-plugin = %{epoch}:%{version}-%{release} Provides: %{name}-plugin%{?_isa} = %{epoch}:%{version}-%{release} -%if 0%{?weak_deps} Supplements: (%{name}-core%{?_isa} and Xserver) -%endif %description x11 A plug-in for LibreOffice that enables generic X11 support. -%package gtk2 -Summary: LibreOffice GTK+ 2 integration plug-in -Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} -Requires: %{name}-x11%{?_isa} = %{epoch}:%{version}-%{release} -Provides: %{name}-plugin = %{epoch}:%{version}-%{release} -Provides: %{name}-plugin%{?_isa} = %{epoch}:%{version}-%{release} -%if 0%{?weak_deps} -Supplements: (%{name}-core%{?_isa} and gtk2%{?_isa}) -%endif - -%description gtk2 -A plug-in for LibreOffice that enables integration into GTK+ 2 environment. - %package gtk3 Summary: LibreOffice GTK+ 3 integration plug-in Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} Requires: gstreamer1(element-gtksink)%{?mark64} -%if 0%{?weak_deps} +Obsoletes: libreoffice-gtk2 < 1:6.2.0.0 +Obsoletes: libreoffice-gtk2-debuginfo < 1:6.2.0.0 Supplements: (%{name}-core%{?_isa} and gtk3%{?_isa}) -%endif %description gtk3 A plug-in for LibreOffice that enables integration into GTK+ 3 environment. %if 0%{?fedora} -%package kde4 -Summary: LibreOffice KDE integration plug-in +%package kde5 +Summary: LibreOffice KDE5 integration plug-in Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} Provides: %{name}-plugin = %{epoch}:%{version}-%{release} Provides: %{name}-plugin%{?_isa} = %{epoch}:%{version}-%{release} +Obsoletes: libreoffice-kde4 < 1:6.3.0.0 -%description kde4 -A plug-in for LibreOffice that enables integration into the KDE desktop environment. +%description kde5 +A plug-in for LibreOffice that enables integration into the KDE5 desktop environment. + +%package kf5 +Summary: LibreOffice KDE Frameworks 5 integration plug-in +Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} +Requires: %{name}-ure%{?_isa} = %{epoch}:%{version}-%{release} +Provides: %{name}-plugin = %{epoch}:%{version}-%{release} +Provides: %{name}-plugin%{?_isa} = %{epoch}:%{version}-%{release} +#Supplements: (libreoffice-core and plasma-workspace) + +%description kf5 +A plug-in for LibreOffice that enables integration into the KDE Frameworks 5. %endif @@ -727,9 +664,7 @@ Summary: Additional support for debugging with gdb Requires: gdb%{?_isa} Requires: %{libo_python}-six Requires: libreoffice-core%{?_isa} = %{epoch}:%{version}-%{release} -%if 0%{?weak_deps} Supplements: libreoffice-debuginfo%{?_isa} -%endif %description gdb-debug-support This package provides gdb pretty printers for package %{name}. @@ -813,10 +748,12 @@ Requires: %{name}-core%{?_isa} = %{epoch}:%{version}-%{release} \ %{-r:Requires: %{-r*}} \ %{-p:Provides: %{name}-langpack-%{-p*} = %{epoch}:%{version}-%{release}} \ %{-p:Provides: %{name}-langpack-%{-p*}%{?_isa} = %{epoch}:%{version}-%{release}} \ -%if 0%{?weak_deps} \ %{-p:Supplements: (%{name}-core%{?_isa} and langpacks-%{-p*})} \ %{!-p:Supplements: (%{name}-core%{?_isa} and langpacks-%{lang})} \ +%if 0%{?rhel} \ %{-T:Requires: %{name}-help-%{lang}} \ +%else \ +%{-T:Recommends: %{name}-help-%{lang}} \ %endif \ \ %description %{pkgname} \ @@ -967,12 +904,17 @@ Rules for auto-correcting common %{langname} typing errors. \ %autocorr -l cs -n Czech %autocorr -l da -n Danish %autocorr -l de -n German -L +%define autocorr_lang Lower Sorbian +%autocorr -l dsb -n %{autocorr_lang} -L +%autocorr -l el -n Greek %autocorr -l es -n Spanish -L %autocorr -l fa -n Farsi %autocorr -l fi -n Finnish %autocorr -l fr -n French -L %autocorr -l ga -n Irish %autocorr -l hr -n Croatian +%define autocorr_lang Upper Sorbian +%autocorr -l hsb -n %{autocorr_lang} -L %autocorr -l hu -n Hungarian %autocorr -l is -n Icelandic %autocorr -l it -n Italian -L @@ -1048,7 +990,6 @@ sed -i -e /CppunitTest_services/d postprocess/Module_postprocess.mk # i686 sed -i -e /CppunitTest_sd_export_ooxml2/d sd/Module_sd.mk # i686 sed -i -e /CppunitTest_sw_ooxmlexport4/d sw/Module_sw.mk sed -i -e /CppunitTest_xmlsecurity_signing/d xmlsecurity/Module_xmlsecurity.mk -sed -i -e /CppunitTest_xmlsecurity_signing/d xmlsecurity/Module_xmlsecurity.mk %if 0%{?rhel} sed -i -e /CppunitTest_desktop_lib/d desktop/Module_desktop.mk sed -i -e s/CppunitTest_editeng_core// editeng/Module_editeng.mk @@ -1069,13 +1010,6 @@ mv .git .git-rpm # path to external tarballs EXTSRCDIR=`dirname %{SOURCE0}` -%if 0%{?fedora} -# KDE bits -export QT4DIR=%{_qt4_prefix} -export KDE4DIR=%{_kde4_prefix} -export PATH=$QT4DIR/bin:$PATH -%endif - #use the RPM_OPT_FLAGS but remove the OOo overridden ones for i in $RPM_OPT_FLAGS; do case "$i" in @@ -1092,27 +1026,26 @@ export CFLAGS=$ARCH_FLAGS export CXXFLAGS=$ARCH_FLAGS %if 0%{?rhel} -%define distrooptions --disable-eot --enable-python=system --with-system-ucpp --disable-scripting-beanshell --disable-scripting-javascript -%else # fedora -%define distrooptions --enable-eot --enable-kde4 --with-system-ucpp +%define distrooptions --disable-eot --disable-scripting-beanshell --disable-scripting-javascript +%else +# fedora +%define distrooptions --enable-eot --enable-kde5 --enable-gtk3-kde5 %endif %if %{with langpacks} %define with_lang --with-lang='%{langpack_langs}' %endif -%if ! 0%{libo_use_python3} -export PYTHON=%{_bindir}/python -export PYTHON_CFLAGS=`pkg-config --cflags python` -export PYTHON_LIBS=`pkg-config --libs python` -%endif - aclocal -I m4 autoconf SMP_MFLAGS=%{?_smp_mflags} SMP_MFLAGS=$[${SMP_MFLAGS/-j/}] +%if 0%{?flatpak} +%define flatpakoptions --with-boost-libdir=%{_libdir} --with-jfreereport-jar=/app/share/java/flow-engine.jar --with-libbase-jar=/app/share/java/libbase.jar --with-libfonts-jar=/app/share/java/libfonts.jar --with-libformula-jar=/app/share/java/libformula.jar --with-liblayout-jar=/app/share/java/liblayout.jar --with-libloader-jar=/app/share/java/libloader.jar --with-librepository-jar=/app/share/java/librepository.jar --with-libserializer-jar=/app/share/java/libserializer.jar --with-libxml-jar=/app/share/java/libxml.jar FIREBIRDCONFIG=%{_libdir}/fb_config QT4INC=%{_includedir} +%endif + # TODO: enable coinmp? # avoid running autogen.sh on make touch autogen.lastrun @@ -1122,10 +1055,11 @@ touch autogen.lastrun --with-parallelism=$SMP_MFLAGS \ --disable-coinmp \ --disable-fetch-external \ + --disable-openssl \ --disable-firebird-sdbc \ --disable-pdfium \ --disable-systray \ - --enable-cipher-openssl-backend \ + --disable-gtk \ --enable-dconf \ --enable-evolution2 \ --enable-ext-nlpsolver \ @@ -1144,11 +1078,15 @@ touch autogen.lastrun --with-system-libs \ --without-export-validation \ --without-fonts \ + --without-lxml \ --with-gdrive-client-secret="GYWrDtzyZQZ0_g5YoBCC6F0I" \ --with-gdrive-client-id="457862564325.apps.googleusercontent.com" \ + --enable-python=system \ + --with-system-ucpp \ %{distrooptions} \ %{?bundling_options} \ - %{?archoptions} + %{?archoptions} \ + %{?flatpakoptions} ulimit -c unlimited || true @@ -1264,7 +1202,7 @@ pushd %{buildroot}%{baseinstdir}/share/autocorr %make_autocorr_aliases -l nl-NL nl-AW %make_autocorr_aliases -l sv-SE sv-FI %else -rm -f acor_[a-df-z]*.dat acor_e[su]*.dat +rm -f acor_[a-df-z]*.dat acor_e[lsu]*.dat %endif popd #rhbz#484055 make these shared across multiple applications @@ -1308,8 +1246,8 @@ rm -rf %{buildroot}%{baseinstdir}/share/fonts/truetype/*.ttf install -m 0755 -d %{buildroot}%{datadir} rm -f %{buildroot}%{baseinstdir}/CREDITS.fodt %{buildroot}%{baseinstdir}/LICENSE* %{buildroot}%{baseinstdir}/NOTICE # rhbz#1473749 ensure display of files in license/about dialogs works -ln -sr %{buildroot}%{lodatadocdir}/LICENSE.fodt %{buildroot}%{baseinstdir}/LICENSE.fodt ln -sr %{buildroot}%{lodatadocdir}/CREDITS.fodt %{buildroot}%{baseinstdir}/CREDITS.fodt +ln -sr %{buildroot}%{lodatadocdir}/LICENSE.html %{buildroot}%{baseinstdir}/LICENSE.html #ensure that no sneaky un-prelinkable, un-fpic or non executable shared libs #have snuck through @@ -1356,6 +1294,10 @@ chmod a+x unopkg sed -e s/LAUNCHER/soffice/g -e s/BRAND/libreoffice/g %{SOURCE8} > libreoffice chmod a+x libreoffice +%if 0%{?flatpak} +sed -i -e 's|/usr/lib|/app/lib|g' unopkg libreoffice +%endif + # rhbz#499474 provide a /usr/bin/soffice for .recently-used.xbel ln -s %{baseinstdir}/program/soffice soffice # rhbz#499474 provide a /usr/bin/openoffice.org for backwards compat @@ -1403,7 +1345,7 @@ install -m 0644 -p mime/packages/libreoffice$PRODUCTVERSION.xml %{buildroot}%{_d %if 0%{?fedora} # restrict abipkgdiff to shared objects that actually have a stable ABI -for pkg in core base officebean ogltrans pdfimport calc writer impress math graphicfilter postgresql ure pyuno x11 gtk2 gtk3 kde4 libreofficekit; do +for pkg in core base officebean ogltrans pdfimport calc writer impress math graphicfilter postgresql ure pyuno x11 gtk3 kde5 libreofficekit; do cat > %{buildroot}%{baseinstdir}/program/${pkg}.abignore << _EOF [suppress_file] file_name_not_regexp=.*\.so\.[0-9]+ @@ -1425,6 +1367,7 @@ install -m 0644 -p include/LibreOfficeKit/* %{buildroot}%{_includedir}/LibreOffi rm -rf %{buildroot}%{baseinstdir}/readmes rm -rf %{buildroot}%{baseinstdir}/licenses +rm -rf %{buildroot}%{baseinstdir}/share/theme_definitions # to-do, remove this in libreoffice 4.4 when --without-ppds is gone, it'll do the right thing on its own then install -m 0755 -d %{buildroot}%{baseinstdir}/share/psprint/driver @@ -1496,7 +1439,7 @@ done %check %ifnarch ppc64 s390x aarch64 -make +# make # we don't need this anymore rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %endif @@ -1508,7 +1451,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %files core %dir %{baseinstdir} %{baseinstdir}/CREDITS.fodt -%{baseinstdir}/LICENSE.fodt +%{baseinstdir}/LICENSE.html %dir %{baseinstdir}/help %{baseinstdir}/help/idxcaption.xsl %{baseinstdir}/help/idxcontent.xsl @@ -1558,6 +1501,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libctllo.so %{baseinstdir}/program/libcuilo.so %{baseinstdir}/program/libdbalo.so +%{baseinstdir}/program/libdbahsqllo.so %{baseinstdir}/program/libdbaselo.so %{baseinstdir}/program/libdbaxmllo.so %{baseinstdir}/program/libdbmmlo.so @@ -1597,7 +1541,8 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libmozbootstraplo.so %{baseinstdir}/program/libmsfilterlo.so %{baseinstdir}/program/libmtfrendererlo.so -%{baseinstdir}/program/libmysqllo.so +%{baseinstdir}/program/libmysql_jdbclo.so +%{baseinstdir}/program/libmysqlclo.so %{baseinstdir}/program/libodbclo.so %{baseinstdir}/program/liboglcanvaslo.so %{baseinstdir}/program/liboffacclo.so @@ -1606,7 +1551,6 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libpcrlo.so %{baseinstdir}/program/libpdffilterlo.so %{baseinstdir}/program/libprotocolhandlerlo.so -%{baseinstdir}/program/librecentfile.so %{baseinstdir}/program/libsaxlo.so %{baseinstdir}/program/libscnlo.so %{baseinstdir}/program/libscriptframe.so @@ -1643,13 +1587,6 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libxmlfalo.so %{baseinstdir}/program/libxmlfdlo.so %{baseinstdir}/program/libxoflo.so -%{baseinstdir}/program/libxsec_fw.so -%if 0%{?rhel} && 0%{?rhel} < 8 -%{baseinstdir}/program/libassuan.so.0 -%{baseinstdir}/program/libgpg-error.so.0 -%{baseinstdir}/program/libgpgme.so.11 -%{baseinstdir}/program/libgpgmepp.so.6 -%endif %{baseinstdir}/program/libxsec_xmlsec.so %{baseinstdir}/program/libxsltdlglo.so %{baseinstdir}/program/libxsltfilterlo.so @@ -1661,65 +1598,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libmsformslo.so %{baseinstdir}/program/opencl %dir %{baseinstdir}/program/opengl -%{baseinstdir}/program/opengl/areaHashCRC64TFragmentShader.glsl -%{baseinstdir}/program/opengl/areaScaleFragmentShader.glsl -%{baseinstdir}/program/opengl/areaScaleFastFragmentShader.glsl -%{baseinstdir}/program/opengl/backgroundFragmentShader.glsl -%{baseinstdir}/program/opengl/backgroundVertexShader.glsl -%{baseinstdir}/program/opengl/blendedTextureFragmentShader.glsl -%{baseinstdir}/program/opengl/blendedTextureVertexShader.glsl -%{baseinstdir}/program/opengl/combinedFragmentShader.glsl -%{baseinstdir}/program/opengl/combinedTextureFragmentShader.glsl -%{baseinstdir}/program/opengl/combinedTextureVertexShader.glsl -%{baseinstdir}/program/opengl/combinedVertexShader.glsl -%{baseinstdir}/program/opengl/commonFragmentShader.glsl -%{baseinstdir}/program/opengl/commonVertexShader.glsl -%{baseinstdir}/program/opengl/convolutionFragmentShader.glsl -%{baseinstdir}/program/opengl/debugFragmentShader.glsl -%{baseinstdir}/program/opengl/debugVertexShader.glsl -%{baseinstdir}/program/opengl/diffTextureFragmentShader.glsl -%{baseinstdir}/program/opengl/dumbVertexShader.glsl -%{baseinstdir}/program/opengl/dummyVertexShader.glsl -%{baseinstdir}/program/opengl/greyscaleFragmentShader.glsl -%{baseinstdir}/program/opengl/invert50FragmentShader.glsl -%{baseinstdir}/program/opengl/lineFragmentShader.glsl -%{baseinstdir}/program/opengl/lineVertexShader.glsl -%{baseinstdir}/program/opengl/linearGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/linearMultiColorGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/linearTwoColorGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/maskedTextureFragmentShader.glsl -%{baseinstdir}/program/opengl/maskedTextureVertexShader.glsl -%{baseinstdir}/program/opengl/maskFragmentShader.glsl -%{baseinstdir}/program/opengl/pickingFragmentShader.glsl -%{baseinstdir}/program/opengl/pickingVertexShader.glsl -%{baseinstdir}/program/opengl/radialGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/radialMultiColorGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/radialTwoColorGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/rectangularMultiColorGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/rectangularTwoColorGradientFragmentShader.glsl -%{baseinstdir}/program/opengl/renderTextureFragmentShader.glsl -%{baseinstdir}/program/opengl/renderTextureVertexShader.glsl -%{baseinstdir}/program/opengl/replaceColorFragmentShader.glsl -%{baseinstdir}/program/opengl/screenTextFragmentShader.glsl -%{baseinstdir}/program/opengl/screenTextVertexShader.glsl -%{baseinstdir}/program/opengl/shape3DFragmentShader.glsl -%{baseinstdir}/program/opengl/shape3DFragmentShaderBatch.glsl -%{baseinstdir}/program/opengl/shape3DFragmentShaderBatchScroll.glsl -%{baseinstdir}/program/opengl/shape3DFragmentShaderV300.glsl -%{baseinstdir}/program/opengl/shape3DVertexShader.glsl -%{baseinstdir}/program/opengl/shape3DVertexShaderBatch.glsl -%{baseinstdir}/program/opengl/shape3DVertexShaderBatchScroll.glsl -%{baseinstdir}/program/opengl/shape3DVertexShaderV300.glsl -%{baseinstdir}/program/opengl/solidFragmentShader.glsl -%{baseinstdir}/program/opengl/symbolFragmentShader.glsl -%{baseinstdir}/program/opengl/symbolVertexShader.glsl -%{baseinstdir}/program/opengl/textFragmentShader.glsl -%{baseinstdir}/program/opengl/textFragmentShaderBatch.glsl -%{baseinstdir}/program/opengl/textVertexShader.glsl -%{baseinstdir}/program/opengl/textVertexShaderBatch.glsl -%{baseinstdir}/program/opengl/textureFragmentShader.glsl -%{baseinstdir}/program/opengl/textureVertexShader.glsl -%{baseinstdir}/program/opengl/transformedTextureVertexShader.glsl +%{baseinstdir}/program/opengl/*.glsl %{baseinstdir}/program/types/offapi.rdb %{baseinstdir}/program/libpasswordcontainerlo.so %{baseinstdir}/program/pagein-common @@ -1745,7 +1624,6 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/libvbaeventslo.so %{baseinstdir}/program/libvclcanvaslo.so %{baseinstdir}/program/versionrc -%{baseinstdir}/program/xid-fullscreen-on-all-monitors %dir %{baseinstdir}/share %dir %{baseinstdir}/share/classification %{baseinstdir}/share/classification/example*.xml @@ -1761,13 +1639,20 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %dir %{baseinstdir}/share/config %{baseinstdir}/share/config/images_breeze.zip %{baseinstdir}/share/config/images_breeze_dark.zip +%{baseinstdir}/share/config/images_colibre.zip %{baseinstdir}/share/config/images_elementary.zip -%{baseinstdir}/share/config/images_galaxy.zip %{baseinstdir}/share/config/images_helpimg.zip -%{baseinstdir}/share/config/images_hicontrast.zip +%{baseinstdir}/share/config/images_karasa_jaga.zip +%{baseinstdir}/share/config/images_karasa_jaga_svg.zip %{baseinstdir}/share/config/images_sifr.zip %{baseinstdir}/share/config/images_sifr_dark.zip +%{baseinstdir}/share/config/images_sifr_svg.zip %{baseinstdir}/share/config/images_tango.zip +%{baseinstdir}/share/config/images_breeze_svg.zip +%{baseinstdir}/share/config/images_colibre_svg.zip +%{baseinstdir}/share/config/images_elementary_svg.zip +%dir %{baseinstdir}/share/tipoftheday +%{baseinstdir}/share/tipoftheday/*.png %dir %{baseinstdir}/share/config/soffice.cfg %{baseinstdir}/share/config/soffice.cfg/modules %{baseinstdir}/share/config/soffice.cfg/*/ui @@ -1852,6 +1737,7 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{baseinstdir}/program/setuprc %{baseinstdir}/program/intro.png %{baseinstdir}/program/intro-highres.png +%{baseinstdir}/program/opencltest %{baseinstdir}/program/soffice %{baseinstdir}/program/soffice.bin %{baseinstdir}/program/sofficerc @@ -1877,14 +1763,6 @@ rm -f %{buildroot}%{baseinstdir}/program/classes/smoketest.jar %{_mandir}/man1/ooffice.1* %{_mandir}/man1/ooviewdoc.1* -%if ! 0%{?file_triggers} -%post core -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun core -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %files base %{baseinstdir}/program/classes/hsqldb.jar %{baseinstdir}/program/classes/reportbuilder.jar @@ -1907,14 +1785,6 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{_bindir}/oobase %{_mandir}/man1/oobase.1* -%if ! 0%{?file_triggers} -%post base -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun base -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %if 0%{?fedora} %files bsh %{baseinstdir}/program/classes/ScriptProviderForBeanShell.jar @@ -1993,10 +1863,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{baseinstdir}/program/libdatelo.so %{baseinstdir}/program/libforlo.so %{baseinstdir}/program/libforuilo.so -%if 0%{?rhel} && 0%{?rhel} < 8 -%{baseinstdir}/program/liborcus-0.13.so.* -%{baseinstdir}/program/liborcus-parser-0.13.so.* -%endif +%{baseinstdir}/program/libnumbertextlo.so %{baseinstdir}/program/libpricinglo.so %{baseinstdir}/program/libsclo.so %{baseinstdir}/program/libscdlo.so @@ -2014,14 +1881,6 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{_bindir}/oocalc %{_mandir}/man1/oocalc.1* -%if ! 0%{?file_triggers} -%post calc -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun calc -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %files draw %{baseinstdir}/share/registry/draw.xcd %{baseinstdir}/program/pagein-draw @@ -2031,14 +1890,6 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{_bindir}/oodraw %{_mandir}/man1/oodraw.1* -%if ! 0%{?file_triggers} -%post draw -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun draw -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %files emailmerge %{baseinstdir}/program/mailmerge.py* %{baseinstdir}/program/msgbox.py* @@ -2064,14 +1915,6 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{_bindir}/oowriter %{_mandir}/man1/oowriter.1* -%if ! 0%{?file_triggers} -%post writer -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun writer -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %files impress %if 0%{?fedora} %{baseinstdir}/program/impress.abignore @@ -2092,14 +1935,6 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{_bindir}/ooimpress %{_mandir}/man1/ooimpress.1* -%if ! 0%{?file_triggers} -%post impress -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun impress -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %files math %if 0%{?fedora} %{baseinstdir}/program/math.abignore @@ -2112,14 +1947,6 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{_bindir}/oomath %{_mandir}/man1/oomath.1* -%if ! 0%{?file_triggers} -%post math -update-desktop-database %{_datadir}/applications &> /dev/null || : - -%postun math -update-desktop-database %{_datadir}/applications &> /dev/null || : -%endif - %files graphicfilter %if 0%{?fedora} %{baseinstdir}/program/graphicfilter.abignore @@ -2237,7 +2064,7 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %{libo_python_sitearch}/uno.py* %{libo_python_sitearch}/unohelper.py* %{libo_python_sitearch}/officehelper.py* -%if 0%{libo_use_python3} +%if ! 0%{?flatpak} %{libo_python_sitearch}/__pycache__/uno.cpython-* %{libo_python_sitearch}/__pycache__/unohelper.cpython-* %{libo_python_sitearch}/__pycache__/officehelper.cpython-* @@ -2264,25 +2091,17 @@ update-desktop-database %{_datadir}/applications &> /dev/null || : %dir %{datadir} %doc instdir/CREDITS.fodt %doc instdir/LICENSE.html -%doc instdir/LICENSE.fodt %doc instdir/LICENSE %doc instdir/NOTICE %license instdir/LICENSE %post data -%if ! 0%{?file_triggers} -touch --no-create %{_datadir}/mime/packages &> /dev/null || : -%endif for theme in hicolor locolor; do touch --no-create %{_datadir}/icons/$theme &>/dev/null || : done %postun data if [ $1 -eq 0 ] ; then -%if ! 0%{?file_triggers} - touch --no-create %{_datadir}/mime/packages &> /dev/null || : - update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : -%endif for theme in hicolor locolor; do touch --no-create %{_datadir}/icons/$theme &>/dev/null || : gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || : @@ -2290,9 +2109,6 @@ if [ $1 -eq 0 ] ; then fi %posttrans data -%if ! 0%{?file_triggers} -update-mime-database %{?fedora:-n} %{_datadir}/mime &> /dev/null || : -%endif for theme in hicolor locolor; do gtk-update-icon-cache -q %{_datadir}/icons/$theme &>/dev/null || : done @@ -2303,12 +2119,6 @@ done %endif %{baseinstdir}/program/libvclplug_genlo.so -%files gtk2 -%if 0%{?fedora} -%{baseinstdir}/program/gtk2.abignore -%endif -%{baseinstdir}/program/libvclplug_gtklo.so - %files gtk3 %if 0%{?fedora} %{baseinstdir}/program/gtk3.abignore @@ -2317,12 +2127,17 @@ done %if 0%{?fedora} -%files kde4 +%files kde5 %if 0%{?fedora} -%{baseinstdir}/program/kde4.abignore +%{baseinstdir}/program/kde5.abignore %endif -%{baseinstdir}/program/libkde4be1lo.so -%{baseinstdir}/program/libvclplug_kde4lo.so +%{baseinstdir}/program/libkde5be1lo.so +%{baseinstdir}/program/libvclplug_kde5lo.so +%{baseinstdir}/program/libvclplug_qt5lo.so + +%files kf5 +%{baseinstdir}/program/libvclplug_gtk3_kde5lo.so +%{baseinstdir}/program/lo_kde5filepicker %endif @@ -2339,6 +2154,38 @@ done %{_includedir}/LibreOfficeKit %changelog +* Wed Jul 08 2020 Caolán McNamara - 1:6.3.6.2-3 +- Obsoletes any libreoffice-gtk2-debuginfo along with libreoffice-gtk2 + +* Tue Jun 02 2020 Caolán McNamara - 1:6.3.6.2-2 +- Resolves: rhbz#1841907 always produce utf-8 from gettext + +* Tue Apr 28 2020 Caolán McNamara - 1:6.3.6.2-1 +- rhbz#1796893 latest stable release + +* Tue Apr 14 2020 Caolán McNamara - 1:6.3.5.2-7 +- rhbz#1796893 don't show error dialog on G_IO_ERROR_FAILED_HANDLED + +* Wed Apr 01 2020 Caolán McNamara - 1:6.3.5.2-6 +- rhbz#1819798 Start Center crash after pressing Help button before + using any topevel module + +* Fri Mar 27 2020 Caolán McNamara - 1:6.3.5.2-5 +- rhbz#1796893 spreadsheetml2ooo.xsl was not well formed xml +- rhbz#1796893 fix impress print dialog range + +* Mon Mar 23 2020 Caolán McNamara - 1:6.3.5.2-4 +- rhbz#1796893 fix help->licence info->license + +* Fri Mar 20 2020 Caolán McNamara - 1:6.3.5.2-3 +- rhbz#1796893 disable tip of the day by default + +* Thu Mar 19 2020 Caolán McNamara - 1:6.3.5.2-2 +- rhbz#1796893 improve langpack requires + +* Fri Mar 06 2020 Caolán McNamara - 1:6.3.5.2-1 +- rhbz#1796893 latest stable release + * Mon Oct 14 2019 Caolán McNamara - 1:6.0.6.1-20 - Resolves: rhbz#1743958 CVE-2019-9849, etc. - Resolves: rhbz#1648281 Junk character gets added when some emojis are inserted