Browse Source

initial package creation

Signed-off-by: Toshaan Bharvani <toshaan@powerel.org>
master
Toshaan Bharvani 11 months ago
commit
dd733dccee
  1. 69
      SOURCES/0001-CVE-2021-25636.patch
  2. 53
      SOURCES/0001-EditTextObjectImpl-copy-ctor-doesn-t-exactly-copy-Ed.patch
  3. 1309
      SOURCES/0001-Get-rid-of-apache-commons-logging.patch
  4. 36
      SOURCES/0001-Only-pass-I.-arguments-to-g-ir-scanner-by-using-pkg-.patch
  5. 162
      SOURCES/0001-Replace-inet_ntoa-with-inet_ntop.patch
  6. 26
      SOURCES/0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch
  7. 123
      SOURCES/0001-Resolves-tdf-140250-don-t-share-adjustments-between-.patch
  8. 63
      SOURCES/0001-Resolves-tdf-145567-restore-focus-to-the-usual-frame.patch
  9. 1262
      SOURCES/0001-Revert-tdf-101630-gdrive-support-w-oAuth-and-Drive-A.patch
  10. 39
      SOURCES/0001-Simplify-construction-of-a-hardcoded-IPv4-address.patch
  11. 143
      SOURCES/0001-annocheck-warning-about-missing-.note.gnu.property-s.patch
  12. 58
      SOURCES/0001-default-to-sifr-for-gnome-light-mode.patch
  13. 145
      SOURCES/0001-disable-libe-book-support.patch
  14. 26
      SOURCES/0001-disble-tip-of-the-day-dialog-by-default.patch
  15. 45
      SOURCES/0001-document-new-shouldn-t-get-prefixed-to-become-libreo.patch
  16. 37
      SOURCES/0001-don-t-suppress-crashes.patch
  17. 40
      SOURCES/0001-fix-comparison-when-searching-cache.patch
  18. 40
      SOURCES/0001-fix-detecting-qrcodegen.patch
  19. 118
      SOURCES/0001-gtk3-workaround-missing-gdk_threads_enter-calls-in-e.patch
  20. 111
      SOURCES/0001-make-with-idlc-cpp-cpp-work-for-gcc-cpp-as-a-ucpp-re.patch
  21. 39
      SOURCES/0001-math.desktop-include-Spreadsheet-category.patch
  22. 26
      SOURCES/0001-rhbz-1918152-fix-FTBFS.patch
  23. 428
      SOURCES/0001-rhbz-1980800-allow-convert-to-csv-to-write-each-shee.patch
  24. 72
      SOURCES/0001-tdf-121546-sw-don-t-use-undo-array-s-m_pOutlineNodes.patch
  25. 301
      SOURCES/0001-tdf-158302-fix-build-against-system-libxml-2.12.patch
  26. 51
      SOURCES/gpgkey-C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3.gpg.asc
  27. 16
      SOURCES/kahansum_test_fix_for_aarc64_s390x.patch
  28. 16
      SOURCES/libreoffice-multiliblauncher.sh
  29. 32
      SOURCES/limit-tests-giving-dubious-results-to-x86_64.patch
  30. 19
      SOURCES/lo-7.6-ppc64le-tests.patch
  31. 22
      SOURCES/pdfdoc.patch
  32. 5039
      SPECS/libreoffice.spec

69
SOURCES/0001-CVE-2021-25636.patch

@ -0,0 +1,69 @@ @@ -0,0 +1,69 @@
From 26c9da40d44f1469df97398362667c74553be7d2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 20 Dec 2021 17:05:44 +0000
Subject: [PATCH] only use X509Data

Change-Id: I52e6588f5fac04bb26d77c1f3af470db73e41f72
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127193
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit be446d81e07b5499152efeca6ca23034e51ea5ff)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127178
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit b0404f80577de9ff69e58390c6f6ef949fdb0139)
---
.../source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx | 6 ++++++
xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx | 6 ++++++
2 files changed, 12 insertions(+)

diff --git a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
index c699c950f351..9f816479f9dd 100644
--- a/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
+++ b/xmlsecurity/source/xmlsec/mscrypt/xmlsignature_mscryptimpl.cxx
@@ -22,6 +22,8 @@
#include <rtl/uuid.h>
#include <xmlsec-wrapper.h>
+#include <xmlsec/mscng/x509.h>
+
#include <com/sun/star/xml/crypto/SecurityOperationStatus.hpp>
#include <com/sun/star/xml/crypto/XXMLSignature.hpp>
@@ -233,6 +235,10 @@ SAL_CALL XMLSignature_MSCryptImpl::validate(
// We do certificate verification ourselves.
pDsigCtx->keyInfoReadCtx.flags |= XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS;
+ // limit possible key data to valid X509 certificates only, no KeyValues
+ if (xmlSecPtrListAdd(&(pDsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecMSCngKeyDataX509GetKlass()) < 0)
+ throw RuntimeException("failed to limit allowed key data");
+
//Verify signature
//The documentation says that the signature is only valid if the return value is 0 (that is, not < 0)
//AND pDsigCtx->status == xmlSecDSigStatusSucceeded. That is, we must not make any assumptions, if
diff --git a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
index b41d754f7407..975c17272dc7 100644
--- a/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
+++ b/xmlsecurity/source/xmlsec/nss/xmlsignature_nssimpl.cxx
@@ -20,6 +20,8 @@
#include <sal/config.h>
#include <xmlsec-wrapper.h>
+#include <xmlsec/nss/x509.h>
+
#include <xmlelementwrapper_xmlsecimpl.hxx>
#include <xmlsec/xmlstreamio.hxx>
#include <xmlsec/errorcallback.hxx>
@@ -247,6 +249,10 @@ SAL_CALL XMLSignature_NssImpl::validate(
// We do certificate verification ourselves.
pDsigCtx->keyInfoReadCtx.flags |= XMLSEC_KEYINFO_FLAGS_X509DATA_DONT_VERIFY_CERTS;
+ // limit possible key data to valid X509 certificates only, no KeyValues
+ if (xmlSecPtrListAdd(&(pDsigCtx->keyInfoReadCtx.enabledKeyData), BAD_CAST xmlSecNssKeyDataX509GetKlass()) < 0)
+ throw RuntimeException("failed to limit allowed key data");
+
//Verify signature
int rs = xmlSecDSigCtxVerify( pDsigCtx.get() , pNode );
--
2.35.1

53
SOURCES/0001-EditTextObjectImpl-copy-ctor-doesn-t-exactly-copy-Ed.patch

@ -0,0 +1,53 @@ @@ -0,0 +1,53 @@
From 3925cf39742ebee935498b14571f13f3e8b64b49 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sat, 19 Feb 2022 20:43:33 +0000
Subject: [PATCH] EditTextObjectImpl copy ctor doesn't exactly copy
EditTextObjectImpl
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

and this is apparently relied on, so eliding the copy gives unexpected
results.

EditTextObjectImpl::Clone returns a copy of *this, but the
EditTextObjectImpl copy ctor explicitly does not copy the "PortionInfo"
member, so in:

commit fb8973f31f111229be5184f4e4223e963ced2c7b
Author: Caolán McNamara <caolanm@redhat.com>
Date: Sat Oct 10 19:21:38 2020 +0100

ofz#23492 the only user of this ctor throws away the original of the clone

so we can take ownership of the original instead

where the copy was optimized away we want from a state where there was a
new EditTextObjectImpl with an empty PortionInfo member to one where the
PortionInfo of the EditTextObjectImpl was retained.

So explicitly clear this unwanted info.

It's very hard to make rational judgements about code if a copy behaves
differently than the orignal :-(

Change-Id: I642d60841d6bdccbf830f8a2ccdbd9f542a8aa18
---
editeng/source/outliner/outliner.cxx | 1 +
1 file changed, 1 insertion(+)

diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 9c474131352c..d48e4a542723 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -383,6 +383,7 @@ std::unique_ptr<OutlinerParaObject> Outliner::CreateParaObject( sal_Int32 nStart
aParagraphDataVector[nPara-nStartPara] = *GetParagraph(nPara);
}
+ xText->ClearPortionInfo(); // tdf#147166 the PortionInfo is unwanted here
std::unique_ptr<OutlinerParaObject> pPObj(new OutlinerParaObject(std::move(xText), aParagraphDataVector, bIsEditDoc));
pPObj->SetOutlinerMode(GetMode());
--
2.35.1

1309
SOURCES/0001-Get-rid-of-apache-commons-logging.patch

File diff suppressed because one or more lines are too long

36
SOURCES/0001-Only-pass-I.-arguments-to-g-ir-scanner-by-using-pkg-.patch

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
From caddaaa6afd2709f72dfb6160a485d405ac03966 Mon Sep 17 00:00:00 2001
From: Rico Tzschichholz <ricotz@ubuntu.com>
Date: Tue, 11 Jul 2023 20:21:15 +0200
Subject: [PATCH] Only pass -I... arguments to g-ir-scanner by using
pkg-config's --cflags-only-I
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Otherwise it is possible that e.g. -Wl,--export-dynamic is passed which is fatal.

Change-Id: I1735641e3149c86456e1164b67509a719e09d446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154340
Reviewed-by: René Engelhard <rene@debian.org>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
---
sysui/CustomTarget_share.mk | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysui/CustomTarget_share.mk b/sysui/CustomTarget_share.mk
index b86521a3a80f..912048b2ad66 100644
--- a/sysui/CustomTarget_share.mk
+++ b/sysui/CustomTarget_share.mk
@@ -167,7 +167,7 @@ $(share_WORKDIR)/%/LOKDocView-0.1.gir: \
mkdir -p $(dir $@)
PYTHONWARNINGS=default g-ir-scanner "${SRCDIR}/include/LibreOfficeKit/LibreOfficeKitGtk.h" \
"${SRCDIR}/libreofficekit/source/gtk/lokdocview.cxx" \
- `${PKG_CONFIG} --cflags gobject-introspection-1.0 gtk+-3.0` \
+ `${PKG_CONFIG} --cflags-only-I gobject-introspection-1.0 gtk+-3.0` \
-I"${SRCDIR}/include/" \
--include=GLib-2.0 --include=GObject-2.0 --include=Gio-2.0 \
--library=libreofficekitgtk --library-path="${INSTDIR}/program" \
--
2.41.0

162
SOURCES/0001-Replace-inet_ntoa-with-inet_ntop.patch

@ -0,0 +1,162 @@ @@ -0,0 +1,162 @@
From 366e9237399a948d2ef616b758d390bd7d0978a5 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 31 May 2021 09:36:28 +0200
Subject: [PATCH] Replace inet_ntoa with inet_ntop

...as inet_ntoa is potentially not thread-safe; and add a test

Change-Id: I9df945b006ba7194c3b1444c4886101c08339ad0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116425
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 33bf4f0bcf941ee4609f558442035514f54cbc8a)

and

Replace inet_addr with inet_pton

...as inet_addr is deprecated (it does not allow to distinguish successful
return for "255.255.255.255" from -1 error return); and update tests

Change-Id: I605cb2ba18fe9bd11d2d68c8f1c94271c4503509
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116441
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 1fef071c01caf6c293dd941ee7c8340e6894afc3)

fix leak in SocketTest

Change-Id: I8c5e2d4c4687beab08876fe3e945d19a1629bc36
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116514
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
(cherry picked from commit 313eaf979ea2d69e4ffa88a5e87cc09ffe0ff088)
---
sal/CppunitTest_sal_osl.mk | 1 +
sal/osl/unx/socket.cxx | 16 +++++++----
sal/qa/osl/socket.cxx | 58 ++++++++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 5 deletions(-)
create mode 100644 sal/qa/osl/socket.cxx

diff --git a/sal/CppunitTest_sal_osl.mk b/sal/CppunitTest_sal_osl.mk
index 2e4b77509f56..d8c2627d9e0f 100644
--- a/sal/CppunitTest_sal_osl.mk
+++ b/sal/CppunitTest_sal_osl.mk
@@ -23,6 +23,7 @@ $(eval $(call gb_CppunitTest_add_exception_objects,sal_osl,\
sal/qa/osl/process/osl_Thread \
sal/qa/osl/profile/osl_old_testprofile \
sal/qa/osl/setthreadname/test-setthreadname \
+ sal/qa/osl/socket \
))
$(eval $(call gb_CppunitTest_use_libraries,sal_osl,\
diff --git a/sal/osl/unx/socket.cxx b/sal/osl/unx/socket.cxx
index 56a8f6cd63ac..9fafc6d1db81 100644
--- a/sal/osl/unx/socket.cxx
+++ b/sal/osl/unx/socket.cxx
@@ -437,7 +437,10 @@ oslSocketAddr SAL_CALL osl_createInetBroadcastAddr (
&pDottedAddr, strDottedAddr->buffer, strDottedAddr->length,
RTL_TEXTENCODING_UTF8, OUSTRING_TO_OSTRING_CVTFLAGS);
- nAddr = inet_addr (pDottedAddr->buffer);
+ in_addr buf;
+ if (inet_pton (AF_INET, pDottedAddr->buffer, &buf) == 1) {
+ nAddr = buf.s_addr;
+ }
rtl_string_release (pDottedAddr);
}
@@ -505,11 +508,11 @@ oslSocketAddr osl_psz_createInetSocketAddr (
sal_Int32 Port)
{
oslSocketAddr pAddr = nullptr;
- sal_Int32 Addr = inet_addr(pszDottedAddr);
- if(Addr != -1)
+ in_addr buf;
+ if(inet_pton(AF_INET, pszDottedAddr, &buf) == 1)
{
/* valid dotted addr */
- pAddr = createSocketAddrWithFamily( osl_Socket_FamilyInet, htons(Port) , Addr );
+ pAddr = createSocketAddrWithFamily( osl_Socket_FamilyInet, htons(Port) , buf.s_addr );
}
return pAddr;
}
@@ -1090,7 +1093,10 @@ oslSocketResult SAL_CALL osl_getDottedInetAddrOfSocketAddr(oslSocketAddr Addr, r
return osl_Socket_Error;
}
- rtl_uString_newFromAscii(ustrDottedInetAddr,inet_ntoa(pSystemInetAddr->sin_addr));
+ char buf[INET_ADDRSTRLEN];
+ auto const text = inet_ntop(AF_INET, &pSystemInetAddr->sin_addr, buf, INET_ADDRSTRLEN);
+ assert(text != nullptr);
+ rtl_uString_newFromAscii(ustrDottedInetAddr,text);
return osl_Socket_Ok;
diff --git a/sal/qa/osl/socket.cxx b/sal/qa/osl/socket.cxx
new file mode 100644
index 000000000000..ed31c9ede7ae
--- /dev/null
+++ b/sal/qa/osl/socket.cxx
@@ -0,0 +1,58 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * 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/.
+ */
+
+#include <cppunit/TestAssert.h>
+#include <cppunit/TestFixture.h>
+#include <cppunit/extensions/HelperMacros.h>
+
+#include <osl/socket.h>
+#include <rtl/ustring.hxx>
+
+namespace
+{
+class SocketTest : public CppUnit::TestFixture
+{
+ CPPUNIT_TEST_SUITE(SocketTest);
+ CPPUNIT_TEST(test_createInetSocketAddr);
+ CPPUNIT_TEST(test_createInetBroadcastAddr);
+ CPPUNIT_TEST_SUITE_END();
+
+ void test_createInetSocketAddr()
+ {
+ OUString const in("123.4.56.78");
+ auto const addr = osl_createInetSocketAddr(in.pData, 100);
+ CPPUNIT_ASSERT(addr != nullptr);
+ CPPUNIT_ASSERT_EQUAL(osl_Socket_FamilyInet, osl_getFamilyOfSocketAddr(addr));
+ OUString out;
+ auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData);
+ CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res);
+ CPPUNIT_ASSERT_EQUAL(in, out);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), osl_getInetPortOfSocketAddr(addr));
+ osl_destroySocketAddr(addr);
+ }
+
+ void test_createInetBroadcastAddr()
+ {
+ OUString const in("123.4.56.78");
+ auto const addr = osl_createInetBroadcastAddr(in.pData, 100);
+ CPPUNIT_ASSERT(addr != nullptr);
+ CPPUNIT_ASSERT_EQUAL(osl_Socket_FamilyInet, osl_getFamilyOfSocketAddr(addr));
+ OUString out;
+ auto const res = osl_getDottedInetAddrOfSocketAddr(addr, &out.pData);
+ CPPUNIT_ASSERT_EQUAL(osl_Socket_Ok, res);
+ CPPUNIT_ASSERT_EQUAL(OUString("123.255.255.255"), out);
+ CPPUNIT_ASSERT_EQUAL(sal_Int32(100), osl_getInetPortOfSocketAddr(addr));
+ osl_destroySocketAddr(addr);
+ }
+};
+
+CPPUNIT_TEST_SUITE_REGISTRATION(SocketTest);
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
--
2.31.1

26
SOURCES/0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
From 87b90b6fbf010effd44ef0e2bd3d75b27562a82b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 27 Mar 2017 11:47:01 +0100
Subject: [PATCH] Resolves: rhbz#1432468 disable opencl by default

Change-Id: Ie037fcabdd219f195425979dd721501fb5527573
---
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 99b4104f6499..ef7ada84c2f3 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5652,7 +5652,7 @@
<desc>Determines whether OpenCL can be used, when available, to speed up
some operations.</desc>
</info>
- <value>true</value>
+ <value>false</value>
</prop>
<prop oor:name="OpenCLDenyList" oor:type="oor:string-list" oor:nillable="false">
<!-- UIHints: Tools - Options General OpenCL -->
--
2.29.2

123
SOURCES/0001-Resolves-tdf-140250-don-t-share-adjustments-between-.patch

@ -0,0 +1,123 @@ @@ -0,0 +1,123 @@
From 197efb35e6f9661ecbeac2897d36a25bc2f6433e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sun, 14 Nov 2021 14:59:38 +0000
Subject: [PATCH] Resolves: tdf#140250 don't share adjustments between
differerent spinbuttons

Change-Id: Ib684c746ff3176cf45ea9364efc12f2d6dde1f70
---
cui/uiconfig/ui/breaknumberoption.ui | 18 ++++++++++++++++--
cui/uiconfig/ui/calloutpage.ui | 14 ++++++++++++--
svx/uiconfig/ui/sidebareffect.ui | 7 ++++++-
3 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/cui/uiconfig/ui/breaknumberoption.ui b/cui/uiconfig/ui/breaknumberoption.ui
index 2641babeeb5d..23fe294ec702 100644
--- a/cui/uiconfig/ui/breaknumberoption.ui
+++ b/cui/uiconfig/ui/breaknumberoption.ui
@@ -9,6 +9,20 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="lower">2</property>
+ <property name="upper">9</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="lower">2</property>
+ <property name="upper">9</property>
+ <property name="value">1</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkDialog" id="BreakNumberOption">
<property name="can_focus">False</property>
<property name="border_width">6</property>
@@ -134,7 +148,7 @@
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="activates_default">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="adjustment">adjustment2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="afterbreak-atkobject">
@@ -179,7 +193,7 @@
<property name="can_focus">True</property>
<property name="halign">start</property>
<property name="activates_default">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="adjustment">adjustment3</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="wordlength-atkobject">
diff --git a/cui/uiconfig/ui/calloutpage.ui b/cui/uiconfig/ui/calloutpage.ui
index 87d4eff64eb4..00898dc3390c 100644
--- a/cui/uiconfig/ui/calloutpage.ui
+++ b/cui/uiconfig/ui/calloutpage.ui
@@ -7,6 +7,16 @@
<property name="step_increment">0.5</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment2">
+ <property name="upper">2400</property>
+ <property name="step_increment">0.5</property>
+ <property name="page_increment">10</property>
+ </object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="upper">2400</property>
+ <property name="step_increment">0.5</property>
+ <property name="page_increment">10</property>
+ </object>
<object class="GtkBox" id="CalloutPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
@@ -231,7 +241,7 @@
<property name="can_focus">True</property>
<property name="activates_default">True</property>
<property name="text">0.00</property>
- <property name="adjustment">adjustment1</property>
+ <property name="adjustment">adjustment2</property>
<property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
@@ -277,7 +287,7 @@
<property name="can_focus">True</property>
<property name="activates_default">True</property>
<property name="text">0.00</property>
- <property name="adjustment">adjustment1</property>
+ <property name="adjustment">adjustment3</property>
<property name="digits">2</property>
<property name="truncate-multiline">True</property>
<child internal-child="accessible">
diff --git a/svx/uiconfig/ui/sidebareffect.ui b/svx/uiconfig/ui/sidebareffect.ui
index 0e633242cd5c..1e041a2a8726 100644
--- a/svx/uiconfig/ui/sidebareffect.ui
+++ b/svx/uiconfig/ui/sidebareffect.ui
@@ -12,6 +12,11 @@
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
+ <object class="GtkAdjustment" id="adjustment3">
+ <property name="upper">150</property>
+ <property name="step_increment">1</property>
+ <property name="page_increment">10</property>
+ </object>
<!-- n-columns=1 n-rows=1 -->
<object class="GtkGrid" id="EffectPropertyPanel">
<property name="visible">True</property>
@@ -195,7 +200,7 @@
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="truncate-multiline">True</property>
- <property name="adjustment">adjustment1</property>
+ <property name="adjustment">adjustment3</property>
</object>
<packing>
<property name="left_attach">1</property>
--
2.33.1

63
SOURCES/0001-Resolves-tdf-145567-restore-focus-to-the-usual-frame.patch

@ -0,0 +1,63 @@ @@ -0,0 +1,63 @@
From ea6cfca48017b76bfeb8898e6d9e47b3011a3add Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Sat, 6 Nov 2021 21:32:21 +0000
Subject: [PATCH] Resolves: tdf#145567 restore focus to the usual frame focus
widget

when tearing down the start center. Don't leave the focus in an
arbitrary widget.

Change-Id: I82c30c94121dc43b2ea1b4fbc66a0a3e79f7e664
---
vcl/unx/gtk3/gtk3gtkinst.cxx | 28 ++++++++++++++++++++++++++++
1 file changed, 28 insertions(+)

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index a5d233e2f95e..0fddb27aaa2d 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -1899,6 +1899,26 @@ GdkDragAction VclToGdk(sal_Int8 dragOperation)
return eRet;
}
+GtkWindow* get_active_window()
+{
+ GtkWindow* pFocus = nullptr;
+
+ GList* pList = gtk_window_list_toplevels();
+
+ for (GList* pEntry = pList; pEntry; pEntry = pEntry->next)
+ {
+ if (gtk_window_has_toplevel_focus(GTK_WINDOW(pEntry->data)))
+ {
+ pFocus = GTK_WINDOW(pEntry->data);
+ break;
+ }
+ }
+
+ g_list_free(pList);
+
+ return pFocus;
+}
+
class GtkInstanceWidget : public virtual weld::Widget
{
protected:
@@ -16635,6 +16655,14 @@ private:
// rehook handler and let vcl cycle its own way through this widget's
// children
pFrame->AllowCycleFocusOut();
+
+ // tdf#145567 if the focus is in this hierarchy then, now that we are tearing down,
+ // move focus to the usual focus candidate for the frame
+ GtkWindow* pFocusWin = get_active_window();
+ GtkWidget* pFocus = pFocusWin ? gtk_window_get_focus(pFocusWin) : nullptr;
+ bool bHasFocus = pFocus && gtk_widget_is_ancestor(pFocus, pTopLevel);
+ if (bHasFocus)
+ pFrame->GrabFocus();
}
static void signalUnmap(GtkWidget*, gpointer user_data)
--
2.33.1

1262
SOURCES/0001-Revert-tdf-101630-gdrive-support-w-oAuth-and-Drive-A.patch

File diff suppressed because it is too large Load Diff

39
SOURCES/0001-Simplify-construction-of-a-hardcoded-IPv4-address.patch

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
From 68a6c70f25762374f7aed0d4d755345c6f37c78d Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 31 May 2021 10:56:38 +0200
Subject: [PATCH] Simplify construction of a hardcoded IPv4 address

Change-Id: I822313ee708935dd4ecb636c13a961fdd054d660
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116434
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
sd/source/ui/remotecontrol/DiscoveryService.cxx | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)

diff --git a/sd/source/ui/remotecontrol/DiscoveryService.cxx b/sd/source/ui/remotecontrol/DiscoveryService.cxx
index 9ed2ae727761..cf0043387403 100644
--- a/sd/source/ui/remotecontrol/DiscoveryService.cxx
+++ b/sd/source/ui/remotecontrol/DiscoveryService.cxx
@@ -119,17 +119,7 @@ void DiscoveryService::setupSockets()
struct ip_mreq multicastRequest;
-// the Win32 SDK 8.1 deprecates inet_addr()
-#if defined(_WIN32)
- IN_ADDR addr;
- INT ret = InetPtonW(AF_INET, L"239.0.0.1", & addr);
- if (1 == ret)
- {
- multicastRequest.imr_multiaddr.s_addr = addr.S_un.S_addr;
- }
-#else
- multicastRequest.imr_multiaddr.s_addr = inet_addr( "239.0.0.1" );
-#endif
+ multicastRequest.imr_multiaddr.s_addr = htonl((239U << 24) | 1U); // 239.0.0.1
multicastRequest.imr_interface.s_addr = htonl(INADDR_ANY);
rc = setsockopt( mSocket, IPPROTO_IP, IP_ADD_MEMBERSHIP,
--
2.31.1

143
SOURCES/0001-annocheck-warning-about-missing-.note.gnu.property-s.patch

@ -0,0 +1,143 @@ @@ -0,0 +1,143 @@
From 6de192ad5ffe9ec04328bfd178050cb8a33e1cbb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 15 Dec 2021 12:46:24 +0000
Subject: [PATCH] annocheck warning about missing .note.gnu.property section
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

copy and paste recommendation from:
https://sourceware.org/annobin/annobin.html/Test-cf-protection.html

and adapt like:
https://github.com/openssl/openssl/commit/51994e505dbb1cd0dd76869ec962e2948b77b585
where https://bugs.ruby-lang.org/attachments/8962 is similar

Intel docs have "The ENDBR32 and ENDBR64 (collectively ENDBRANCH) are
two new instructions that are used to mark valid indirect CALL/JMP
target locations in the program."

Change-Id: Ie867c263a888763db4478720ba189c9ec6cc974d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/126859
Tested-by: Jenkins
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit af55dc3891f7950d392175004b2090cb0e54828e)
---
.../source/cpp_uno/gcc3_linux_intel/call.s | 16 ++++++++++++++++
.../source/cpp_uno/gcc3_linux_x86-64/call.s | 19 +++++++++++++++++++
config_host.mk.in | 1 +
configure.ac | 14 ++++++++++++++
solenv/gbuild/platform/com_GCC_class.mk | 1 +
5 files changed, 51 insertions(+)

diff --git a/bridges/source/cpp_uno/gcc3_linux_intel/call.s b/bridges/source/cpp_uno/gcc3_linux_intel/call.s
index 6be583247733..0a5870defcf3 100644
--- a/bridges/source/cpp_uno/gcc3_linux_intel/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_intel/call.s
@@ -290,3 +290,19 @@ privateSnippetExecutorClass:
.align 4
.LEFDEc:
.section .note.GNU-stack,"",@progbits
+ .section .note.gnu.property,"a"
+ .p2align 2
+ .long 1f - 0f
+ .long 4f - 1f
+ .long 5
+0:
+ .string "GNU"
+1:
+ .p2align 2
+ .long 0xc0000002
+ .long 3f - 2f
+2:
+ .long 0x3
+3:
+ .p2align 2
+4:
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
index 447ac0cecfdd..2e9346dff8a0 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/call.s
@@ -22,6 +22,9 @@
.type privateSnippetExecutor, @function
privateSnippetExecutor:
.LFB3:
+#if defined(END_BRANCH_INS_SUPPORT)
+ endbr64
+#endif
pushq %rbp
.LCFI0:
movq %rsp, %rbp
@@ -115,3 +118,19 @@ privateSnippetExecutor:
.align 8
.LEFDE1:
.section .note.GNU-stack,"",@progbits
+ .section .note.gnu.property,"a"
+ .p2align 3
+ .long 1f - 0f
+ .long 4f - 1f
+ .long 5
+0:
+ .string "GNU"
+1:
+ .p2align 3
+ .long 0xc0000002
+ .long 3f - 2f
+2:
+ .long 0x3
+3:
+ .p2align 3
+4:
diff --git a/config_host.mk.in b/config_host.mk.in
index d6edba704b21..6ac2a90695e2 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -260,6 +260,7 @@ export GTK3_CFLAGS=$(gb_SPACE)@GTK3_CFLAGS@
export GTK3_LIBS=$(gb_SPACE)@GTK3_LIBS@
export USING_X11=@USING_X11@
export HAMCREST_JAR=@HAMCREST_JAR@
+export HAVE_ASM_END_BRANCH_INS_SUPPORT=@HAVE_ASM_END_BRANCH_INS_SUPPORT@
export HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED=@HAVE_BROKEN_GCC_WMAYBE_UNINITIALIZED@
export HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR=@HAVE_CLANG_DEBUG_INFO_KIND_CONSTRUCTOR@
export HAVE_LO_CLANG_DLLEXPORTINLINES=@HAVE_LO_CLANG_DLLEXPORTINLINES@
diff --git a/configure.ac b/configure.ac
index bd28bc6eb38e..ef03408e8e98 100644
--- a/configure.ac
+++ b/configure.ac
@@ -7730,6 +7730,20 @@ _ACEOF
CPPFLAGS="$save_CPPFLAGS"
+ AC_MSG_CHECKING([if CET endbranch is recognized])
+cat > endbr.s <<_ACEOF
+endbr32
+_ACEOF
+ HAVE_ASM_END_BRANCH_INS_SUPPORT=
+ if $CXX -c endbr.s -o endbr.o >/dev/null 2>&5; then
+ AC_MSG_RESULT([yes])
+ HAVE_ASM_END_BRANCH_INS_SUPPORT=TRUE
+ else
+ AC_MSG_RESULT([no])
+ fi
+ rm -f endbr.s endbr.o
+ AC_SUBST(HAVE_ASM_END_BRANCH_INS_SUPPORT)
+
AC_LANG_POP([C++])
fi
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index c29e2a979fd9..e2056abf9682 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -44,6 +44,7 @@ $(call gb_Helper_abbreviate_dirs,\
-x assembler-with-cpp \
$(gb_LTOFLAGS) \
$(gb_AFLAGS) \
+ $(if $(HAVE_ASM_END_BRANCH_INS_SUPPORT),-DEND_BRANCH_INS_SUPPORT) \
-c $(3) \
-o $(1)) \
$(INCLUDE) && \
--
2.33.1

58
SOURCES/0001-default-to-sifr-for-gnome-light-mode.patch

@ -0,0 +1,58 @@ @@ -0,0 +1,58 @@
From ffceb48dd576ababe346c9548b12ca18f31d3293 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Fri, 10 Mar 2023 11:41:45 +0000
Subject: [PATCH] default to sifr for gnome light mode

https://pagure.io/fedora-workstation/issue/361

"Fedora Workstation currently uses the rather outdated-looking
Elementary icon theme for LibreOffice, instead of the Sifr icon theme
which was designed to fit in with GNOME's icons. The Sifr theme saw a
nice update with LibreOffice 7.5, the version being shipped in Fedora
Linux 38, which makes the icons fit better with the current GNOME design
language."

Change-Id: Ic37bbe8e7ad754ab070ead06dc0b006c6ccf3adb
---
vcl/qa/cppunit/app/test_IconThemeSelector.cxx | 4 ++--
vcl/source/app/IconThemeSelector.cxx | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
index 72ee344b1437..8d1aea0c3889 100644
--- a/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
+++ b/vcl/qa/cppunit/app/test_IconThemeSelector.cxx
@@ -85,7 +85,7 @@ IconThemeSelectorTest::ElementaryIsReturnedForGnomeDesktop()
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
vcl::IconThemeSelector s;
OUString r = s.SelectIconThemeForDesktopEnvironment(themes, "gnome");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is returned for gnome desktop", OUString("elementary"), r);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'sifr' theme is returned for gnome desktop", OUString("sifr"), r);
}
void
@@ -96,7 +96,7 @@ IconThemeSelectorTest::ThemeIsOverriddenByPreferredTheme()
s.SetPreferredIconTheme(preferred, false);
std::vector<vcl::IconThemeInfo> themes = GetFakeInstalledThemes();
OUString selected = s.SelectIconThemeForDesktopEnvironment(themes, "gnome");
- CPPUNIT_ASSERT_EQUAL_MESSAGE("'elementary' theme is overridden by breeze", preferred, selected);
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("'sifr' theme is overridden by breeze", preferred, selected);
}
void
diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx
index 6b8dfc0f42c7..ee30e577f3f5 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -86,7 +86,7 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvi
desktopEnvironment.equalsIgnoreAsciiCase("mate") ||
desktopEnvironment.equalsIgnoreAsciiCase("unity") ) {
if (!bPreferDarkIconTheme)
- r = "elementary";
+ r = "sifr";
else
r = "sifr_dark";
} else
--
2.40.1

145
SOURCES/0001-disable-libe-book-support.patch

@ -0,0 +1,145 @@ @@ -0,0 +1,145 @@
From 0b613b941c3ffbe432934269f8865bc1f9e59cde Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Tue, 27 Sep 2022 15:13:59 -0700
Subject: [PATCH] disable libe-book support

---
configure.ac | 3 ---
external/Module_external.mk | 1 -
filter/Configuration_filter.mk | 8 --------
writerperfect/Library_wpftwriter.mk | 2 --
writerperfect/qa/unit/WpftFilterFixture.hxx | 4 ----
writerperfect/qa/unit/WpftWriterFilterTest.cxx | 5 -----
writerperfect/source/writer/wpftwriter.component | 6 ------
7 files changed, 29 deletions(-)

diff --git a/configure.ac b/configure.ac
index 8babc85..e7733de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9606,9 +9606,6 @@ libo_PKG_VERSION([ETONYEK], [libetonyek-0.1], [0.1.10])
libo_CHECK_SYSTEM_MODULE([libfreehand],[FREEHAND],[libfreehand-0.1])
-libo_CHECK_SYSTEM_MODULE([libebook],[EBOOK],[libe-book-0.1])
-libo_PKG_VERSION([EBOOK], [libe-book-0.1], [0.1.2])
-
libo_CHECK_SYSTEM_MODULE([libabw],[ABW],[libabw-0.1])
libo_CHECK_SYSTEM_MODULE([libpagemaker],[PAGEMAKER],[libpagemaker-0.0])
diff --git a/external/Module_external.mk b/external/Module_external.mk
index 366fff2..bc987d1 100644
--- a/external/Module_external.mk
+++ b/external/Module_external.mk
@@ -31,7 +31,6 @@ $(eval $(call gb_Module_add_moduledirs,external,\
$(call gb_Helper_optional,CURL,curl) \
$(call gb_Helper_optional,DRAGONBOX,dragonbox) \
dtoa \
- $(call gb_Helper_optional,EBOOK,libebook) \
$(call gb_Helper_optional,EPM,epm) \
$(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 a58b839..526b447 100644
--- a/filter/Configuration_filter.mk
+++ b/filter/Configuration_filter.mk
@@ -359,10 +359,6 @@ $(eval $(call filter_Configuration_add_types,fcfg_langpack,fcfg_writer_types.xcu
writer_OOXML_Template \
writer_layout_dump_xml \
writer_indexing_export_xml \
- writer_BroadBand_eBook \
- writer_FictionBook_2 \
- writer_PalmDoc \
- writer_Plucker_eBook \
writer_ApplePages \
MWAW_Text_Document \
Palm_Text_Document \
@@ -409,10 +405,6 @@ $(eval $(call filter_Configuration_add_filters,fcfg_langpack,fcfg_writer_filters
OOXML_Text_Template \
writer_layout_dump \
writer_indexing_export \
- BroadBand_eBook \
- FictionBook_2 \
- PalmDoc \
- Plucker_eBook \
ApplePages \
MWAW_Text_Document \
Palm_Text_Document \
diff --git a/writerperfect/Library_wpftwriter.mk b/writerperfect/Library_wpftwriter.mk
index 840a86f..70a8933 100644
--- a/writerperfect/Library_wpftwriter.mk
+++ b/writerperfect/Library_wpftwriter.mk
@@ -64,7 +64,6 @@ endif
$(eval $(call gb_Library_use_externals,wpftwriter,\
abw \
boost_headers \
- ebook \
$(if $(ENABLE_WASM_STRIP_SWEXPORTS),,etonyek) \
icu_headers \
icui18n \
@@ -93,7 +92,6 @@ endif
ifneq ($(ENABLE_WASM_STRIP_SWEXPORTS),TRUE)
$(eval $(call gb_Library_add_exception_objects,wpftwriter,\
writerperfect/source/writer/AbiWordImportFilter \
- writerperfect/source/writer/EBookImportFilter \
writerperfect/source/writer/MSWorksImportFilter \
writerperfect/source/writer/MWAWImportFilter \
writerperfect/source/writer/PagesImportFilter \
diff --git a/writerperfect/qa/unit/WpftFilterFixture.hxx b/writerperfect/qa/unit/WpftFilterFixture.hxx
index 2fdd6a2..dbdd672 100644
--- a/writerperfect/qa/unit/WpftFilterFixture.hxx
+++ b/writerperfect/qa/unit/WpftFilterFixture.hxx
@@ -25,10 +25,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_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 78d24dc..39924f9 100644
--- a/writerperfect/qa/unit/WpftWriterFilterTest.cxx
+++ b/writerperfect/qa/unit/WpftWriterFilterTest.cxx
@@ -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 aEtonyekOptional{
{ "Pages_4.pages", REQUIRE_ETONYEK_VERSION(0, 1, 2) },
{ "Pages_5.pages", REQUIRE_ETONYEK_VERSION(0, 1, 8) },
@@ -59,8 +56,6 @@ void WpftWriterFilterTest::test()
doTest("com.sun.star.comp.Writer.AbiWordImportFilter",
u"/writerperfect/qa/unit/data/writer/libabw/");
- doTest("org.libreoffice.comp.Writer.EBookImportFilter",
- u"/writerperfect/qa/unit/data/writer/libe-book/", aEBookOptional);
doTest("com.sun.star.comp.Writer.MSWorksImportFilter",
u"/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 176d487..0c89217 100644
--- a/writerperfect/source/writer/wpftwriter.component
+++ b/writerperfect/source/writer/wpftwriter.component
@@ -42,12 +42,6 @@
<service name="com.sun.star.document.ImportFilter"/>
<optional/>
</implementation>
- <implementation name="org.libreoffice.comp.Writer.EBookImportFilter"
- constructor="org_libreoffice_comp_Writer_EBookImportFilter_get_implementation">
- <service name="com.sun.star.document.ExtendedTypeDetection"/>
- <service name="com.sun.star.document.ImportFilter"/>
- <optional/>
- </implementation>
<implementation name="org.libreoffice.comp.Writer.PagesImportFilter"
constructor="org_libreoffice_comp_Writer_PagesImportFilter_get_implementation">
<service name="com.sun.star.document.ExtendedTypeDetection"/>
--
2.31.1

26
SOURCES/0001-disble-tip-of-the-day-dialog-by-default.patch

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
From d6e2cdb0023e422546e3ece5bf9915f7c490ced8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
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 e7c339e2e22e..9aa88ef1aa02 100644
--- a/officecfg/registry/schema/org/openoffice/Office/Common.xcs
+++ b/officecfg/registry/schema/org/openoffice/Office/Common.xcs
@@ -5570,7 +5570,7 @@
<info>
<desc>Determines whether the Tip-of-the-Day dialog is shown on startup.</desc>
</info>
- <value>true</value>
+ <value>false</value>
</prop>
<prop oor:name="LastTipOfTheDayShown" oor:type="xs:int" oor:nillable="false">
<info>
--
2.24.1

45
SOURCES/0001-document-new-shouldn-t-get-prefixed-to-become-libreo.patch

@ -0,0 +1,45 @@ @@ -0,0 +1,45 @@
From ce37356f6bcaaef62a80814d7d54d3aa6d53167d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 12 Oct 2021 09:52:53 +0100
Subject: [PATCH] document-new shouldn't get prefixed to become
libreoffice-document-new

seen by rpminspect as .desktop "references icon libreoffice-document-new
but no subpackages contain libreoffice-document-new"

introduced by:

commit f767d5e2b017c0d0cfd23ff3318cb30901847722
Date: Sun Sep 1 11:30:12 2019 +0200

Add icons to New Document desktop file actions

in the [Desktop Action NewDocument] section

Change-Id: I64ce5e2dbaca32083b2f76e960c33a815f8a3773
---
sysui/desktop/share/brand.pl | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/sysui/desktop/share/brand.pl b/sysui/desktop/share/brand.pl
index 9d73e619c495..b17a7374fd62 100644
--- a/sysui/desktop/share/brand.pl
+++ b/sysui/desktop/share/brand.pl
@@ -81,9 +81,11 @@ while ($arg = shift) {
# remove possible Windows line-ends
chomp;
- # patch all occurrences of openoffice in ICON line with
- # $prefix
- s/Icon=/Icon=$iconprefix/;
+ # patch all icons in ICON line with $prefix
+ if (! /Icon=document-new/ ) { # except for Icon=document-new which
+ # is a stock icon, not one of ours
+ s/Icon=/Icon=$iconprefix/;
+ }
# patch all occurrences of openoffice in icon_filename
# line with $prefix
--
2.32.0

37
SOURCES/0001-don-t-suppress-crashes.patch

@ -0,0 +1,37 @@ @@ -0,0 +1,37 @@
From a6f2cba43d79347b6975b3b8069b423c94a7dba6 Mon Sep 17 00:00:00 2001
From: David Tardon <dtardon@redhat.com>
Date: Tue, 8 Nov 2016 11:50:06 +0100
Subject: [PATCH] don't suppress crashes

An automatic restart after a crash makes the crash invisible to abrt.

Change-Id: I3854e619356049b144b08575879d289a3c12e4c9
---
desktop/source/app/app.cxx | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index c54aea9dd4f7..a613fe12cef2 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1165,8 +1165,6 @@
if( bRestart )
{
RequestHandler::Disable();
- if( pSignalHandler )
- osl_removeSignalHandler( pSignalHandler );
restartOnMac(false);
#if !ENABLE_WASM_STRIP_SPLASH
@@ -1174,7 +1172,7 @@
m_rSplashScreen->reset();
#endif
- _exit( EXITHELPER_CRASH_WITH_RESTART );
+ return;
}
else
{
--
2.29.2

40
SOURCES/0001-fix-comparison-when-searching-cache.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
From a94b58277c7aeaa83ce14347cd0b8f7137969d03 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lubo=C5=A1=20Lu=C5=88=C3=A1k?= <l.lunak@collabora.com>
Date: Fri, 29 Oct 2021 14:20:57 +0200
Subject: [PATCH] fix comparison when searching cache
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

This made the cache always fail and re-cache, making CJK text layout
slower over time. A mistake from ef513fd4b049b214a03fbe6e that
converted !strcmp() to != instead of ==.

Change-Id: Ib70579cd36d7b1df062e4d067e03f5c65e34b142
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124432
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Tested-by: Luboš Luňák <l.lunak@collabora.com>
(cherry picked from commit 5b38b5744af1e896892df708c16b83e1b551d2c7)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/124206
Tested-by: Jenkins
---
i18npool/source/breakiterator/xdictionary.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/i18npool/source/breakiterator/xdictionary.cxx b/i18npool/source/breakiterator/xdictionary.cxx
index 947a23c5073b..6b57433370c7 100644
--- a/i18npool/source/breakiterator/xdictionary.cxx
+++ b/i18npool/source/breakiterator/xdictionary.cxx
@@ -152,7 +152,7 @@ void xdictionary::initDictionaryData(const char *pLang)
osl::MutexGuard aGuard( osl::Mutex::getGlobalMutex() );
for(const datacache & i : aLoadedCache)
{
- if( i.maLang != pLang )
+ if( i.maLang == pLang )
{
data = i.maData;
return;
--
2.33.1

40
SOURCES/0001-fix-detecting-qrcodegen.patch

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
From 2f11e4247b6332b06a5b23c33207fa10767244a6 Mon Sep 17 00:00:00 2001
From: Thierry Vignaud <thierry.vignaud@gmail.com>
Date: Thu, 30 Jan 2020 11:19:20 +0000
Subject: [PATCH] fix detecting qrcodegen

Change-Id: Ib945b57420083489273cefc5655eb50932b5a3f8
---
configure.ac | 2 +-
cui/source/dialogs/QrCodeGenDialog.cxx | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5a14369..ebd1b55 100644
--- a/configure.ac
+++ b/configure.ac
@@ -10250,7 +10250,7 @@ else
AC_MSG_RESULT([external])
SYSTEM_QRCODEGEN=TRUE
AC_LANG_PUSH([C++])
- AC_CHECK_HEADER(qrcodegen/QrCode.hpp, [],
+ AC_CHECK_HEADER(qrcodegencpp/QrCode.hpp, [],
[AC_MSG_ERROR(qrcodegen headers not found.)], [#include <stdexcept>])
AC_CHECK_LIB([qrcodegencpp], [main], [:],
[ AC_MSG_ERROR(qrcodegen C++ library not found.) ], [])
diff --git a/cui/source/dialogs/QrCodeGenDialog.cxx b/cui/source/dialogs/QrCodeGenDialog.cxx
index 7f3f6a8..b79a356 100644
--- a/cui/source/dialogs/QrCodeGenDialog.cxx
+++ b/cui/source/dialogs/QrCodeGenDialog.cxx
@@ -19,7 +19,7 @@
#if ENABLE_QRCODEGEN
#if defined(SYSTEM_QRCODEGEN)
-#include <qrcodegen/QrCode.hpp>
+#include <qrcodegencpp/QrCode.hpp>
#else
#include <QrCode.hpp>
#endif
--
2.26.2

118
SOURCES/0001-gtk3-workaround-missing-gdk_threads_enter-calls-in-e.patch

@ -0,0 +1,118 @@ @@ -0,0 +1,118 @@
From b06e5e2b9761d242d9269b091da9a98ec705d2b1 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 1 Jun 2021 13:20:43 +0100
Subject: [PATCH] gtk3: workaround missing gdk_threads_enter calls in external
code
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

with gtk3 file dialog. file, open, +other locations,
type davs://somewhere + return

#0 0x00007ffff7a6e2a2 in raise () at /lib64/libc.so.6
#1 0x00007ffff7a578a4 in abort () at /lib64/libc.so.6
#2 0x00007ffff7a57789 in _nl_load_domain.cold () at /lib64/libc.so.6
#3 0x00007ffff7a66a16 in () at /lib64/libc.so.6
#4 0x00007fffd9be7672 in GtkYieldMutex::ThreadsLeave() (this=0x513480) at vcl/unx/gtk3/gtkinst.cxx:354
#5 0x00007fffd9be6a53 in GdkThreadsLeave() () at vcl/unx/gtk3/gtkinst.cxx:116
#6 0x00007fffd947ac2d in gtk_dialog_run (dialog=0xa984310) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkdialog.c:1397
^^^ this also (see #30) calls gdk_threads_leave before g_main_loop_run, but no gdk_threads_enter has been called, presumably emit_show_error_message should have called it (?) ^^^
#7 0x00007fffd94a6dc6 in error_message_with_parent (detail=0xa97f9b0 "HTTP Error: Error resolving “nowhere”: Name or service not known", msg=<optimized out>, parent=<optimized out>)
at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkfilechooserwidget.c:763
#8 error_message (impl=<optimized out>, msg=<optimized out>, detail=0xa97f9b0 "HTTP Error: Error resolving “nowhere”: Name or service not known") at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkfilechooserwidget.c:786
#9 0x00007fffe996ec2f in g_closure_invoke () at /lib64/libgobject-2.0.so.0
#10 0x00007fffe998aea6 in signal_emit_unlocked_R () at /lib64/libgobject-2.0.so.0
#11 0x00007fffe998c76a in g_signal_emit_valist () at /lib64/libgobject-2.0.so.0
#12 0x00007fffe998c983 in g_signal_emit () at /lib64/libgobject-2.0.so.0
#13 0x00007fffd9561fc7 in emit_show_error_message (secondary_message=0x7fffbc0566f0 "HTTP Error: Error resolving “nowhere”: Name or service not known", primary_message=<optimized out>, view=0x900a240)
at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkplacesview.c:171
#14 server_mount_ready_cb (source_file=0x7fffbc05b4c0, res=<optimized out>, user_data=0x900a240) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkplacesview.c:1232
#15 0x00007fffe9a64a7a in g_task_return_now () at /lib64/libgio-2.0.so.0
#16 0x00007fffe9a64c7b in g_task_return () at /lib64/libgio-2.0.so.0
#17 0x00007fffd80653b8 in mount_reply () at /usr/lib64/gio/modules/libgvfsdbus.so
#18 0x00007fffe9a64a7a in g_task_return_now () at /lib64/libgio-2.0.so.0
#19 0x00007fffe9a64c7b in g_task_return () at /lib64/libgio-2.0.so.0
#20 0x00007fffe9acd2dd in reply_cb () at /lib64/libgio-2.0.so.0
#21 0x00007fffe9a64a7a in g_task_return_now () at /lib64/libgio-2.0.so.0
#22 0x00007fffe9a64c7b in g_task_return () at /lib64/libgio-2.0.so.0
#23 0x00007fffe9ac4c34 in g_dbus_connection_call_done () at /lib64/libgio-2.0.so.0
#24 0x00007fffe9a64a7a in g_task_return_now () at /lib64/libgio-2.0.so.0
#25 0x00007fffe9a64abd in complete_in_idle_cb () at /lib64/libgio-2.0.so.0
#26 0x00007fffe987074b in g_idle_dispatch () at /lib64/libglib-2.0.so.0
#27 0x00007fffe98744cf in g_main_context_dispatch () at /lib64/libglib-2.0.so.0
#28 0x00007fffe98c84e8 in g_main_context_iterate.constprop () at /lib64/libglib-2.0.so.0
#29 0x00007fffe9873a93 in g_main_loop_run () at /lib64/libglib-2.0.so.0
#30 0x00007fffd947ac37 in gtk_dialog_run (dialog=0x1604460) at /usr/src/debug/gtk3-3.24.29-1.fc34.x86_64/gtk/gtkdialog.c:1398
^^^ this will call gdk_threads_leave before g_main_loop_run, (gdk_threads_enter has been called earlier, and gdk_threads_enter will be called after g_main_loop_run) ^^^
#31 0x00007fffd9bdbd96 in RunDialog::run() (this=0x9134f00) at vcl/unx/gtk3/fpicker/SalGtkPicker.cxx:199
#32 0x00007fffd9bbf23f in SalGtkFilePicker::execute() (this=0x9004690) at vcl/unx/gtk3/fpicker/SalGtkFilePicker.cxx:953
#33 0x00007ffff474741a in sfx2::FileDialogHelper_Impl::implDoExecute() (this=0x1667470) at sfx2/source/dialog/filedlghelper.cxx:1279

#14 presumably server_mount_ready_cb of gtkplacesview.c should protect its gtk
calls with gdk_threads_enter/gdk_threads_leave like enclosing_volume_mount_cb
of gtkfilesystem.c does.

Seeing as gdk_threads_leave/gdk_threads_enter is gone in gtk4 I doubt
there's any point looking for a fix in gtk3 and we should just try and
survive the problem.

Change-Id: I007be4dee4f615d4431e27034dcf7f3d446c3e9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116559
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
(cherry picked from commit 08b7529f628eda1d209cf27f9bbe52ee336fef62)
---
vcl/unx/gtk3/gtk3gtkinst.cxx | 30 ++++++++++++++++++++++--------
1 file changed, 22 insertions(+), 8 deletions(-)

diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx
index 2d4dc36ce5fe..bba4e07f3003 100644
--- a/vcl/unx/gtk3/gtk3gtkinst.cxx
+++ b/vcl/unx/gtk3/gtk3gtkinst.cxx
@@ -314,20 +314,34 @@ thread_local std::stack<sal_uInt32> GtkYieldMutex::yieldCounts;
void GtkYieldMutex::ThreadsEnter()
{
acquire();
- if (!yieldCounts.empty()) {
- auto n = yieldCounts.top();
- yieldCounts.pop();
- assert(n > 0);
- n--;
- if (n > 0)
- acquire(n);
+ if (yieldCounts.empty())
+ return;
+ auto n = yieldCounts.top();
+ yieldCounts.pop();
+
+ const bool bUndoingLeaveWithoutEnter = n == 0;
+ // if the ThreadsLeave bLeaveWithoutEnter of true condition occurred to
+ // create this entry then return early undoing the initial acquire of the
+ // function
+ if G_UNLIKELY(bUndoingLeaveWithoutEnter)
+ {
+ release();
+ return;
}
+
+ assert(n > 0);
+ n--;
+ if (n > 0)
+ acquire(n);
}
void GtkYieldMutex::ThreadsLeave()
{
- assert(m_nCount != 0);
+ const bool bLeaveWithoutEnter = m_nCount == 0;
+ SAL_WARN_IF(bLeaveWithoutEnter, "vcl.gtk", "gdk_threads_leave without matching gdk_threads_enter");
yieldCounts.push(m_nCount);
+ if G_UNLIKELY(bLeaveWithoutEnter) // this ideally shouldn't happen, but can due to the gtk3 file dialog
+ return;
release(true);
}
--
2.31.1

111
SOURCES/0001-make-with-idlc-cpp-cpp-work-for-gcc-cpp-as-a-ucpp-re.patch

@ -0,0 +1,111 @@ @@ -0,0 +1,111 @@
From 748a9fd3a8e90e52a126190dbe0d97da6e0941ff Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 11 Aug 2021 20:55:14 +0100
Subject: [PATCH] make --with-idlc-cpp=cpp work for gcc cpp as a ucpp
replacement

e.g. the example of
https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1524638
has the same output .urd using cpp with these flags as ucpp created

Change-Id: Iadfd2deba7d365c66c3260fd6736c031987e107c
---
config_host.mk.in | 1 +
configure.ac | 14 ++++++++++++++
idlc/Executable_idlc.mk | 8 ++++++++
idlc/source/idlccompile.cxx | 8 ++++++++
4 files changed, 31 insertions(+)

diff --git a/config_host.mk.in b/config_host.mk.in
index 58ca1d1c14fb..6810660067b0 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -635,6 +635,7 @@ export SYSTEM_RHINO=@SYSTEM_RHINO@
export SYSTEM_SERF=@SYSTEM_SERF@
export SYSTEM_STAROFFICE=@SYSTEM_STAROFFICE@
export SYSTEM_UCPP=@SYSTEM_UCPP@
+export SYSTEM_UCPP_IS_GCC=@SYSTEM_UCPP_IS_GCC@
export SYSTEM_VISIO=@SYSTEM_VISIO@
export SYSTEM_WPD=@SYSTEM_WPD@
export SYSTEM_WPG=@SYSTEM_WPG@
diff --git a/configure.ac b/configure.ac
index 3d2bf7e24555..ac226fd46ace 100644
--- a/configure.ac
+++ b/configure.ac
@@ -8807,9 +8807,22 @@ dnl ===================================================================
dnl Check for C preprocessor to use
dnl ===================================================================
AC_MSG_CHECKING([which C preprocessor to use in idlc])
+SYSTEM_UCPP_IS_GCC=
if test -n "$with_idlc_cpp"; then
AC_MSG_RESULT([$with_idlc_cpp])
AC_PATH_PROG(SYSTEM_UCPP, $with_idlc_cpp)
+ AC_MSG_CHECKING([if $with_idlc_cpp is GCC CPP])
+ # ucpp will accept -v (to output version), warn about the others as unknown
+ # and return 1 (due to -v)
+ # gcc will accept -v (as verbose), --version (to output version) and -nostdinc
+ # and return 0 (due to --version ) if all options are supported
+ $SYSTEM_UCPP -v --version -nostdinc >/dev/null 2>/dev/null
+ if test $? -eq 0; then
+ SYSTEM_UCPP_IS_GCC=TRUE
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
else
AC_MSG_RESULT([ucpp])
AC_MSG_CHECKING([which ucpp tp use])
@@ -8822,6 +8835,7 @@ else
fi
fi
AC_SUBST(SYSTEM_UCPP)
+AC_SUBST(SYSTEM_UCPP_IS_GCC)
dnl ===================================================================
dnl Check for epm (not needed for Windows)
diff --git a/idlc/Executable_idlc.mk b/idlc/Executable_idlc.mk
index e194e9049c77..f2f79dcb8911 100644
--- a/idlc/Executable_idlc.mk
+++ b/idlc/Executable_idlc.mk
@@ -35,10 +35,18 @@ $(eval $(call gb_Executable_add_scanners,idlc,\
))
ifneq (,$(SYSTEM_UCPP))
+
$(eval $(call gb_Executable_add_defs,idlc,\
-DSYSTEM_UCPP \
-DUCPP=\"file://$(SYSTEM_UCPP)\" \
))
+
+ifneq ($(SYSTEM_UCPP_IS_GCC),)
+$(eval $(call gb_Executable_add_defs,idlc,\
+ -DSYSTEM_UCPP_IS_GCC \
+))
+endif
+
endif
$(eval $(call gb_Executable_add_exception_objects,idlc,\
diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index bf3325d6821a..1902d63e0cad 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -237,7 +237,15 @@ sal_Int32 compileFile(const OString * pathname)
::std::vector< OUString> lCppArgs;
lCppArgs.emplace_back("-DIDL");
lCppArgs.emplace_back("-C");
+#ifdef SYSTEM_UCPP_IS_GCC
+ // -nostdinc Do not search the standard system directories for header files
+ lCppArgs.emplace_back("-nostdinc");
+ // with gcc cpp, even when not explicitly including anything, /usr/include/stdc-predef.h
+ // gets inserted without -nostdinc
+#else
+ // -zI Do not use the standard (compile-time) include path.
lCppArgs.emplace_back("-zI");
+#endif
Options* pOptions = idlc()->getOptions();
--
2.31.1

39
SOURCES/0001-math.desktop-include-Spreadsheet-category.patch

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
From f586051919d047e2b67d32637817c3d96a898494 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 9 Jun 2021 09:13:23 +0100
Subject: [PATCH] math.desktop include "Spreadsheet" category

but it's not a spreadsheet

since...

commit dad7fe7227fb80a32d3c2c777584dc9d74b9e929
Date: Thu Jan 2 16:16:55 2014 +0100

Fix math categories to make SUSE rpm check happy

Change-Id: I0397ea12cd7f29f4b0c1f0e0ad76a3429b55c455
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116884
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 2df2ce1b51d13bc9e203fab1b7eb3c88c906588c)
---
sysui/desktop/menus/math.desktop | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sysui/desktop/menus/math.desktop b/sysui/desktop/menus/math.desktop
index d2391be5c234..5a8192ae4abc 100644
--- a/sysui/desktop/menus/math.desktop
+++ b/sysui/desktop/menus/math.desktop
@@ -21,7 +21,7 @@ Terminal=false
NoDisplay=false
Icon=math
Type=Application
-Categories=Office;Spreadsheet;Education;Science;Math;X-Red-Hat-Base;X-MandrivaLinux-Office-Other;
+Categories=Office;Education;Science;Math;X-Red-Hat-Base;X-MandrivaLinux-Office-Other;
Exec=${UNIXBASISROOTNAME} --math %%FILE%%
MimeType=application/vnd.oasis.opendocument.formula;application/vnd.sun.xml.math;application/vnd.oasis.opendocument.formula-template;text/mathml;application/mathml+xml;
Name=%PRODUCTNAME Math
--
2.31.1

26
SOURCES/0001-rhbz-1918152-fix-FTBFS.patch

@ -0,0 +1,26 @@ @@ -0,0 +1,26 @@
From 8b8a49e14c1010c5ab325b64fc3b65524a6a6049 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 20 Jan 2021 09:19:25 +0000
Subject: [PATCH] rhbz#1918152 fix FTBFS

Change-Id: I5c03c810d3b2572b0e58c62293add49bd7025e70
---
vcl/source/gdi/bitmap3.cxx | 2 --
1 file changed, 2 deletions(-)

diff --git a/vcl/source/gdi/bitmap3.cxx b/vcl/source/gdi/bitmap3.cxx
index ec80b03c6008..8ea5c31bee3e 100644
--- a/vcl/source/gdi/bitmap3.cxx
+++ b/vcl/source/gdi/bitmap3.cxx
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include <math.h>
-
#include <vcl/bitmapaccess.hxx>
#include <vcl/bitmapex.hxx>
#include <vcl/bitmap.hxx>
--
2.28.0

428
SOURCES/0001-rhbz-1980800-allow-convert-to-csv-to-write-each-shee.patch

@ -0,0 +1,428 @@ @@ -0,0 +1,428 @@
From aec3e189e6e9aa1eb2fe91cbb1c46f308b074cd5 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Tue, 13 Jul 2021 12:38:07 +0100
Subject: [PATCH] rhbz#1980800 allow --convert-to csv to write each sheet to a
separate file

Related: tdf#135762 except only currently implemented for command line use

sample usage:
soffice --convert-to csv:"Text - txt - csv (StarCalc)":44,34,UTF8,1,,0,false,true,false,false,false,-1 sample.ods
where the new (11th!) final token ("-1") enables writing each sheet to a
new file based on the suggested target name so output in this example
is files sample-Sheet1.csv and sample-Sheet2.csv

Only -1 for 'all sheets' vs 0 for existing 'current sheet only' (which
is always sheet 0 from the command line) are currently options but the
token could be expanded in the future to select specific sheets to
export.

Change-Id: Ib99a120f1a2c8d1008a7a3c59a6b39f572fb346e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118850
Tested-by: Jenkins
Reviewed-by: Eike Rathke <erack@redhat.com>
(cherry picked from commit b8903bc106dad036acb3d117e5c4fc955697fe02)

Related: tdf#135762 Allow --convert-to csv to specify 1-based sheet number

Same multifile mechanism as for -1 all sheets is used, so

soffice --convert-to csv:"Text - txt - csv (StarCalc)":44,34,UTF8,1,,0,false,true,false,false,false,2 sample.ods

writes a file sample-Sheet2.csv

Change-Id: Ib9248c9561e4e340c88458ac5dfd159e443a4cfd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118971
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit fda91f8be16ba760e360940ebafd6244c648cb8c)

Related: tdf#135762 Suppress cout if not command line

Change-Id: I9431221aadf97739bb197871f25fa151ef4c391c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119294
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit 0cda081c9aa3b3dcb363f97bac60c845ce9a13e0)
---
desktop/source/app/dispatchwatcher.cxx | 50 +++++++--
sc/source/ui/dbgui/imoptdlg.cxx | 16 ++-
sc/source/ui/docshell/docsh.cxx | 141 +++++++++++++++++++++----
sc/source/ui/inc/docsh.hxx | 2 +-
sc/source/ui/inc/imoptdlg.hxx | 6 +-
5 files changed, 179 insertions(+), 36 deletions(-)

diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 50b92ecb7834..3df4f34ccf83 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -30,6 +30,7 @@
#include "officeipcthread.hxx"
#include <rtl/ustring.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <comphelper/synchronousdispatch.hxx>
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/util/XCloseable.hpp>
@@ -598,6 +599,8 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
aFilter = impl_GuessFilter( aOutFile, aDocService );
}
+ bool bMultiFileTarget = false;
+
if (aFilter.isEmpty())
{
std::cerr << "Error: no export filter" << std::endl;
@@ -605,29 +608,54 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
else
{
sal_Int32 nFilterOptionsIndex = aFilter.indexOf(':');
- sal_Int32 nProps = ( 0 < nFilterOptionsIndex ) ? 3 : 2;
+ sal_Int32 nProps = ( 0 < nFilterOptionsIndex ) ? 4 : 3;
if ( !aImgOut.isEmpty() )
nProps +=1;
Sequence<PropertyValue> conversionProperties( nProps );
- conversionProperties[0].Name = "Overwrite";
- conversionProperties[0].Value <<= true;
+ conversionProperties[0].Name = "ConversionRequestOrigin";
+ conversionProperties[0].Value <<= OUString("CommandLine");
+ conversionProperties[1].Name = "Overwrite";
+ conversionProperties[1].Value <<= true;
- conversionProperties[1].Name = "FilterName";
+ conversionProperties[2].Name = "FilterName";
if( 0 < nFilterOptionsIndex )
{
- conversionProperties[1].Value <<= aFilter.copy(0, nFilterOptionsIndex);
+ OUString sFilterName = aFilter.copy(0, nFilterOptionsIndex);
+ OUString sFilterOptions = aFilter.copy(nFilterOptionsIndex + 1);
+
+ if (sFilterName == "Text - txt - csv (StarCalc)")
+ {
+ sal_Int32 nIdx(0);
+ // If the 11th token is '-1' then we export a file
+ // per sheet where the file name is based on the suggested
+ // output filename concatenated with the sheet name, so adjust
+ // the output and overwrite messages
+ // If the 11th token is not present or numeric 0 then the
+ // default sheet is exported with the output filename. If it
+ // is numeric >0 then that sheet (1-based) with the output
+ // filename concatenated with the sheet name. So even if
+ // that is a single file, the multi file target mechanism is
+ // used.
+ const OUString aTok(sFilterOptions.getToken(11, ',', nIdx));
+ // Actual validity is checked in Calc, here just check for
+ // presence of numeric value at start.
+ bMultiFileTarget = (!aTok.isEmpty() && aTok.toInt32() != 0);
+ }
+
+ conversionProperties[2].Value <<= sFilterName;
- conversionProperties[2].Name = "FilterOptions";
- conversionProperties[2].Value <<= aFilter.copy(nFilterOptionsIndex + 1);
+ conversionProperties[3].Name = "FilterOptions";
+ conversionProperties[3].Value <<= sFilterOptions;
}
else
{
- conversionProperties[1].Value <<= aFilter;
+ conversionProperties[2].Value <<= aFilter;
}
if ( !aImgOut.isEmpty() )
{
+ assert(conversionProperties[nProps-1].Name.isEmpty());
conversionProperties[nProps-1].Name = "ImageFilter";
conversionProperties[nProps-1].Value <<= aImgOut;
}
@@ -639,9 +667,11 @@ bool DispatchWatcher::executeDispatchRequests( const std::vector<DispatchRequest
OString aTargetURL8 = OUStringToOString(aTempName, osl_getThreadTextEncoding());
if (aDispatchRequest.aRequestType != REQUEST_CAT)
{
- std::cout << "convert " << aSource8 << " -> " << aTargetURL8;
+ std::cout << "convert " << aSource8;
+ if (!bMultiFileTarget)
+ std::cout << " -> " << aTargetURL8;
std::cout << " using filter : " << OUStringToOString(aFilter, osl_getThreadTextEncoding()) << std::endl;
- if (FStatHelper::IsDocument(aOutFile))
+ if (!bMultiFileTarget && FStatHelper::IsDocument(aOutFile))
std::cout << "Overwriting: " << OUStringToOString(aTempName, osl_getThreadTextEncoding()) << std::endl ;
}
try
diff --git a/sc/source/ui/dbgui/imoptdlg.cxx b/sc/source/ui/dbgui/imoptdlg.cxx
index 071f1b0257bc..a362e4df0ee7 100644
--- a/sc/source/ui/dbgui/imoptdlg.cxx
+++ b/sc/source/ui/dbgui/imoptdlg.cxx
@@ -20,6 +20,7 @@
#include <imoptdlg.hxx>
#include <asciiopt.hxx>
#include <comphelper/string.hxx>
+#include <unotools/charclass.hxx>
#include <osl/thread.h>
#include <global.hxx>
@@ -43,6 +44,7 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
bSaveNumberAsSuch = true;
bSaveFormulas = false;
bRemoveSpace = false;
+ nSheetToExport = 0;
sal_Int32 nTokenCount = comphelper::string::getTokenCount(rStr, ',');
if ( nTokenCount < 3 )
return;
@@ -77,6 +79,16 @@ ScImportOptions::ScImportOptions( const OUString& rStr )
bSaveFormulas = rStr.getToken(0, ',', nIdx) == "true";
if ( nTokenCount >= 11 )
bRemoveSpace = rStr.getToken(0, ',', nIdx) == "true";
+ if ( nTokenCount >= 12 )
+ {
+ const OUString aTok(rStr.getToken(0, ',', nIdx));
+ if (aTok == "-1")
+ nSheetToExport = -1; // all
+ else if (aTok.isEmpty() || CharClass::isAsciiNumeric(aTok))
+ nSheetToExport = aTok.toInt32();
+ else
+ nSheetToExport = -23; // invalid, force error
+ }
}
}
@@ -99,7 +111,9 @@ OUString ScImportOptions::BuildString() const
"," +
OUString::boolean( bSaveFormulas ) + // "save formulas": not in ScAsciiOptions
"," +
- OUString::boolean( bRemoveSpace ); // same as "Remove space" in ScAsciiOptions
+ OUString::boolean( bRemoveSpace ) + // same as "Remove space" in ScAsciiOptions
+ "," +
+ OUString::number(nSheetToExport) ; // Only available for command line --convert-to
return aResult;
}
diff --git a/sc/source/ui/docshell/docsh.cxx b/sc/source/ui/docshell/docsh.cxx
index 91020db0b2e0..5fdfddd0c89b 100644
--- a/sc/source/ui/docshell/docsh.cxx
+++ b/sc/source/ui/docshell/docsh.cxx
@@ -44,6 +44,7 @@
#include <sfx2/objface.hxx>
#include <sfx2/viewfrm.hxx>
#include <svl/documentlockfile.hxx>
+#include <svl/fstathelper.hxx>
#include <svl/sharecontrolfile.hxx>
#include <svl/urihelper.hxx>
#include <osl/file.hxx>
@@ -119,6 +120,7 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <unotools/configmgr.hxx>
+#include <unotools/ucbstreamhelper.hxx>
#include <uiitems.hxx>
#include <dpobject.hxx>
#include <markdata.hxx>
@@ -1925,7 +1927,7 @@ void escapeTextSep(sal_Int32 nPos, const StrT& rStrDelim, StrT& rStr)
}
-void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt )
+void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt, SCTAB nTab )
{
sal_Unicode cDelim = rAsciiOpt.nFieldSepCode;
sal_Unicode cStrDelim = rAsciiOpt.nTextSepCode;
@@ -1971,7 +1973,6 @@ void ScDocShell::AsciiSave( SvStream& rStream, const ScImportOptions& rAsciiOpt
SCCOL nStartCol = 0;
SCROW nStartRow = 0;
- SCTAB nTab = GetSaveTab();
SCCOL nEndCol;
SCROW nEndRow;
m_aDocument.GetCellArea( nTab, nEndCol, nEndRow );
@@ -2389,35 +2390,129 @@ bool ScDocShell::ConvertTo( SfxMedium &rMed )
}
else if (aFltName == pFilterAscii)
{
- SvStream* pStream = rMed.GetOutStream();
- if (pStream)
+ OUString sItStr;
+ SfxItemSet* pSet = rMed.GetItemSet();
+ const SfxPoolItem* pItem;
+ if ( pSet && SfxItemState::SET ==
+ pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
{
- OUString sItStr;
- SfxItemSet* pSet = rMed.GetItemSet();
- const SfxPoolItem* pItem;
- if ( pSet && SfxItemState::SET ==
- pSet->GetItemState( SID_FILE_FILTEROPTIONS, true, &pItem ) )
+ sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
+ }
+
+ if ( sItStr.isEmpty() )
+ {
+ // default for ascii export (from API without options):
+ // ISO8859-1/MS_1252 encoding, comma, double quotes
+
+ ScImportOptions aDefOptions( ',', '"', RTL_TEXTENCODING_MS_1252 );
+ sItStr = aDefOptions.BuildString();
+ }
+
+ weld::WaitObject aWait( GetActiveDialogParent() );
+ ScImportOptions aOptions( sItStr );
+
+ if (aOptions.nSheetToExport)
+ {
+ // Only from command line --convert-to
+ bRet = true;
+
+ // Verbose only from command line, not UI (in case we actually
+ // implement that) nor macro filter options.
+ bool bVerbose = false;
+ const css::uno::Sequence<css::beans::PropertyValue> & rArgs = rMed.GetArgs();
+ const auto pProp = std::find_if( rArgs.begin(), rArgs.end(),
+ [](const css::beans::PropertyValue& rProp) { return rProp.Name == "ConversionRequestOrigin"; });
+ if (pProp != rArgs.end())
{
- sItStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
+ OUString aOrigin;
+ pProp->Value >>= aOrigin;
+ bVerbose = (aOrigin == "CommandLine");
}
- if ( sItStr.isEmpty() )
+ SCTAB nStartTab;
+ SCTAB nCount = m_aDocument.GetTableCount();
+ if (aOptions.nSheetToExport == -1)
{
- // default for ascii export (from API without options):
- // ISO8859-1/MS_1252 encoding, comma, double quotes
-
- ScImportOptions aDefOptions( ',', '"', RTL_TEXTENCODING_MS_1252 );
- sItStr = aDefOptions.BuildString();
+ // All sheets.
+ nStartTab = 0;
+ }
+ else if (0 < aOptions.nSheetToExport && aOptions.nSheetToExport <= nCount)
+ {
+ // One sheet, 1-based.
+ nCount = aOptions.nSheetToExport;
+ nStartTab = nCount - 1;
+ }
+ else
+ {
+ // Usage error, no export but log.
+ if (bVerbose)
+ {
+ if (aOptions.nSheetToExport < 0)
+ std::cout << "Bad sheet number string given." << std::endl;
+ else
+ std::cout << "No sheet number " << aOptions.nSheetToExport
+ << ", number of sheets is " << nCount << std::endl;
+ }
+ nStartTab = 0;
+ nCount = 0;
+ SetError(SCERR_EXPORT_DATA);
+ bRet = false;
}
- weld::WaitObject aWait( GetActiveDialogParent() );
- ScImportOptions aOptions( sItStr );
- AsciiSave( *pStream, aOptions );
- bRet = true;
+ INetURLObject aURLObject(rMed.GetURLObject());
+ OUString sExt = aURLObject.CutExtension();
+ OUString sBaseName = aURLObject.GetLastName();
+ aURLObject.CutLastName();
- if (m_aDocument.GetTableCount() > 1)
- if (!rMed.GetError())
- rMed.SetError(SCWARN_EXPORT_ASCII);
+ for (SCTAB i = nStartTab; i < nCount; ++i)
+ {
+ OUString sTabName;
+ if (!m_aDocument.GetName(i, sTabName))
+ sTabName = OUString::number(i);
+ INetURLObject aSheetURLObject(aURLObject);
+ OUString sFileName = sBaseName + "-" + sTabName;
+ if (!sExt.isEmpty())
+ sFileName = sFileName + "." + sExt;
+ aSheetURLObject.Append(sFileName);
+
+ // log similar to DispatchWatcher::executeDispatchRequests
+ OUString aOutFile = aSheetURLObject.GetMainURL(INetURLObject::DecodeMechanism::NONE);
+ if (bVerbose)
+ {
+ OUString aDisplayedName;
+ if (osl::FileBase::E_None != osl::FileBase::getSystemPathFromFileURL(aOutFile, aDisplayedName))
+ aDisplayedName = aOutFile;
+ std::cout << "Writing sheet " << OUStringToOString(sTabName, osl_getThreadTextEncoding()) << " -> "
+ << OUStringToOString(aDisplayedName, osl_getThreadTextEncoding())
+ << std::endl;
+
+ if (FStatHelper::IsDocument(aOutFile))
+ std::cout << "Overwriting: " << OUStringToOString(aDisplayedName, osl_getThreadTextEncoding())
+ << std::endl ;
+ }
+
+ std::unique_ptr<SvStream> xStm = ::utl::UcbStreamHelper::CreateStream(aOutFile, StreamMode::TRUNC | StreamMode::WRITE);
+ if (!xStm)
+ {
+ SetError(ERRCODE_IO_CANTCREATE);
+ bRet = false;
+ break;
+ }
+ AsciiSave(*xStm, aOptions, i);
+ }
+ }
+ else
+ {
+ SvStream* pStream = rMed.GetOutStream();
+ if (pStream)
+ {
+ AsciiSave(*pStream, aOptions, GetSaveTab());
+ bRet = true;
+
+ if (m_aDocument.GetTableCount() > 1)
+ if (!rMed.GetError())
+ rMed.SetError(SCWARN_EXPORT_ASCII);
+ }
}
}
else if (aFltName == pFilterDBase)
diff --git a/sc/source/ui/inc/docsh.hxx b/sc/source/ui/inc/docsh.hxx
index 41c0b30a42a8..3aa5f6caf311 100644
--- a/sc/source/ui/inc/docsh.hxx
+++ b/sc/source/ui/inc/docsh.hxx
@@ -227,7 +227,7 @@ public:
ScDrawLayer* MakeDrawLayer();
- void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt );
+ void AsciiSave( SvStream& rStream, const ScImportOptions& rOpt, SCTAB nTab );
void Execute( SfxRequest& rReq );
void GetState( SfxItemSet &rSet );
diff --git a/sc/source/ui/inc/imoptdlg.hxx b/sc/source/ui/inc/imoptdlg.hxx
index bac941c2a377..382067d67813 100644
--- a/sc/source/ui/inc/imoptdlg.hxx
+++ b/sc/source/ui/inc/imoptdlg.hxx
@@ -32,7 +32,8 @@ public:
ScImportOptions( sal_Unicode nFieldSep, sal_Unicode nTextSep, rtl_TextEncoding nEnc )
: nFieldSepCode(nFieldSep), nTextSepCode(nTextSep),
bFixedWidth(false), bSaveAsShown(false), bQuoteAllText(false),
- bSaveNumberAsSuch(true), bSaveFormulas(false), bRemoveSpace(false)
+ bSaveNumberAsSuch(true), bSaveFormulas(false), bRemoveSpace(false),
+ nSheetToExport(0)
{ SetTextEncoding( nEnc ); }
ScImportOptions& operator=( const ScImportOptions& rCpy ) = default;
@@ -51,6 +52,9 @@ public:
bool bSaveNumberAsSuch;
bool bSaveFormulas;
bool bRemoveSpace;
+ // "0" for 'current sheet', "-1" for all sheets (each to a separate file),
+ // or 1-based specific sheet number (to a separate file).
+ sal_Int32 nSheetToExport;
};
#endif // INCLUDED_SC_SOURCE_UI_INC_IMOPTDLG_HXX
--
2.31.1

72
SOURCES/0001-tdf-121546-sw-don-t-use-undo-array-s-m_pOutlineNodes.patch

@ -0,0 +1,72 @@ @@ -0,0 +1,72 @@
From bced744fea67d50242701ed55271d40e803ac14e Mon Sep 17 00:00:00 2001
From: Michael Stahl <michael.stahl@allotropia.de>
Date: Mon, 15 Nov 2021 17:29:59 +0100
Subject: [PATCH] tdf#121546 sw: don't use undo array's m_pOutlineNodes

It's pointless.

Change-Id: I304c123bffc16e6133d2953bc9a4f7a3afad14ef
---
sw/source/core/docnode/ndnum.cxx | 2 ++
sw/source/core/docnode/nodes.cxx | 18 ++++++++++++------
2 files changed, 14 insertions(+), 6 deletions(-)

diff --git a/sw/source/core/docnode/ndnum.cxx b/sw/source/core/docnode/ndnum.cxx
index b3d66affa66e..a7b898ee5f0a 100644
--- a/sw/source/core/docnode/ndnum.cxx
+++ b/sw/source/core/docnode/ndnum.cxx
@@ -38,6 +38,8 @@ bool SwOutlineNodes::Seek_Entry(SwNode* rP, size_type* pnPos) const
void SwNodes::UpdateOutlineNode(SwNode & rNd)
{
+ assert(IsDocNodes()); // no point in m_pOutlineNodes for undo nodes
+
SwTextNode * pTextNd = rNd.GetTextNode();
if (!(pTextNd && pTextNd->IsOutlineStateChanged()))
diff --git a/sw/source/core/docnode/nodes.cxx b/sw/source/core/docnode/nodes.cxx
index a7a2078b2091..ab3eb62ac9f2 100644
--- a/sw/source/core/docnode/nodes.cxx
+++ b/sw/source/core/docnode/nodes.cxx
@@ -109,6 +109,16 @@ SwNodes::~SwNodes()
m_pEndOfContent.reset();
}
+static bool IsInsertOutline(SwNodes const& rNodes, sal_uLong const nIndex)
+{
+ if (!rNodes.IsDocNodes())
+ {
+ return false;
+ }
+ return nIndex < rNodes.GetEndOfRedlines().StartOfSectionNode()->GetIndex()
+ || rNodes.GetEndOfRedlines().GetIndex() < nIndex;
+}
+
void SwNodes::ChgNode( SwNodeIndex const & rDelPos, sal_uLong nSz,
SwNodeIndex& rInsPos, bool bNewFrames )
{
@@ -124,9 +134,7 @@ void SwNodes::ChgNode( SwNodeIndex const & rDelPos, sal_uLong nSz,
// NEVER include nodes from the RedLineArea
sal_uLong nNd = rInsPos.GetIndex();
- bool bInsOutlineIdx = (
- rNds.GetEndOfRedlines().StartOfSectionNode()->GetIndex() >= nNd ||
- nNd >= rNds.GetEndOfRedlines().GetIndex() );
+ bool const bInsOutlineIdx = IsInsertOutline(rNds, nNd);
if( &rNds == this ) // if in the same node array -> move
{
@@ -478,9 +486,7 @@ bool SwNodes::MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
// NEVER include nodes from the RedLineArea
sal_uLong nNd = aIdx.GetIndex();
- bool bInsOutlineIdx = ( rNodes.GetEndOfRedlines().
- StartOfSectionNode()->GetIndex() >= nNd ||
- nNd >= rNodes.GetEndOfRedlines().GetIndex() );
+ bool const bInsOutlineIdx = IsInsertOutline(rNodes, nNd);
if( bNewFrames )
// delete all frames
--
2.33.1

301
SOURCES/0001-tdf-158302-fix-build-against-system-libxml-2.12.patch

@ -0,0 +1,301 @@ @@ -0,0 +1,301 @@
From c8f7408db73d2f2ccacb25a2b4fef8dfebdfc6cb Mon Sep 17 00:00:00 2001
From: Miklos Vajna <vmiklos@collabora.com>
Date: Mon, 27 Nov 2023 08:02:59 +0100
Subject: [PATCH] tdf#158302 fix build against system-libxml-2.12

Seen in a fedora:40 container, using --with-system-libcmis,
--with-system-liblangtag and --with-system-xmlsec.

Change-Id: I9d748d3dc0b70dbfdfcb6b99c9ce8440bda6f326
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159980
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
---
drawinglayer/source/tools/primitive2dxmldump.cxx | 1 +
filter/source/xsltfilter/LibXSLTTransformer.cxx | 2 +-
helpcompiler/source/HelpLinker.cxx | 4 ++++
include/xmloff/xmltoken.hxx | 2 +-
sax/source/fastparser/fastparser.cxx | 2 +-
sc/source/core/tool/interpr7.cxx | 1 +
sc/source/filter/xml/XMLExportDataPilot.cxx | 2 +-
sc/source/filter/xml/XMLExportDatabaseRanges.cxx | 2 +-
sc/source/filter/xml/xmlfilti.cxx | 6 +++---
unoxml/source/dom/attr.cxx | 1 +
unoxml/source/dom/document.cxx | 1 +
unoxml/source/dom/documentbuilder.cxx | 1 +
unoxml/source/dom/entity.cxx | 1 +
unoxml/source/xpath/xpathapi.cxx | 7 ++++++-
xmloff/source/core/xmltoken.cxx | 2 +-
xmloff/source/style/PageMasterStyleMap.cxx | 2 +-
xmlsecurity/inc/xmlsec-wrapper.h | 1 +
xmlsecurity/inc/xmlsec/saxhelper.hxx | 1 +
18 files changed, 28 insertions(+), 11 deletions(-)

diff --git a/drawinglayer/source/tools/primitive2dxmldump.cxx b/drawinglayer/source/tools/primitive2dxmldump.cxx
index 76aefec902ea..f3b9ef1bc919 100644
--- a/drawinglayer/source/tools/primitive2dxmldump.cxx
+++ b/drawinglayer/source/tools/primitive2dxmldump.cxx
@@ -15,6 +15,7 @@
#include <math.h>
#include <memory>
+#include <libxml/parser.h>
#include <sal/log.hxx>
#include <drawinglayer/primitive2d/bitmapprimitive2d.hxx>
diff --git a/filter/source/xsltfilter/LibXSLTTransformer.cxx b/filter/source/xsltfilter/LibXSLTTransformer.cxx
index 1a7c34805f1b..5e9a7c4bcd35 100644
--- a/filter/source/xsltfilter/LibXSLTTransformer.cxx
+++ b/filter/source/xsltfilter/LibXSLTTransformer.cxx
@@ -333,7 +333,7 @@ namespace XSLT
}
else
{
- xmlErrorPtr lastErr = xmlGetLastError();
+ const xmlError* lastErr = xmlGetLastError();
OUString msg;
if (lastErr)
msg = OStringToOUString(lastErr->message, RTL_TEXTENCODING_UTF8);
diff --git a/helpcompiler/source/HelpLinker.cxx b/helpcompiler/source/HelpLinker.cxx
index 3d52834dbe6b..898a8b26392a 100644
--- a/helpcompiler/source/HelpLinker.cxx
+++ b/helpcompiler/source/HelpLinker.cxx
@@ -815,7 +815,11 @@ static const HelpProcessingException* GpXMLParsingException = nullptr;
extern "C" {
+#if LIBXML_VERSION >= 21200
+static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, const xmlError* error)
+#else
static void StructuredXMLErrorFunction(SAL_UNUSED_PARAMETER void *, xmlErrorPtr error)
+#endif
{
std::string aErrorMsg = error->message;
std::string aXMLParsingFile;
diff --git a/include/xmloff/xmltoken.hxx b/include/xmloff/xmltoken.hxx
index 4e6441841774..ba42fae4d035 100644
--- a/include/xmloff/xmltoken.hxx
+++ b/include/xmloff/xmltoken.hxx
@@ -744,7 +744,7 @@ namespace xmloff::token {
XML_EMBEDDED_VISIBLE_AREA,
XML_EMBOSSED,
XML_EMISSIVE_COLOR,
- XML_EMPTY,
+ XML_TOKEN_EMPTY,
XML_EMPTY_LINE_REFRESH,
XML_ENABLE_NUMBERING,
XML_ENABLED,
diff --git a/sax/source/fastparser/fastparser.cxx b/sax/source/fastparser/fastparser.cxx
index ec8065016a12..e0338e053cf0 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -578,7 +578,7 @@ Event& Entity::getEvent( CallbackType aType )
OUString lclGetErrorMessage( xmlParserCtxtPtr ctxt, std::u16string_view sSystemId, sal_Int32 nLine )
{
const char* pMessage;
- xmlErrorPtr error = xmlCtxtGetLastError( ctxt );
+ const xmlError* error = xmlCtxtGetLastError( ctxt );
if( error && error->message )
pMessage = error->message;
else
diff --git a/sc/source/core/tool/interpr7.cxx b/sc/source/core/tool/interpr7.cxx
index 352c7cf70e45..ecb4ea346396 100644
--- a/sc/source/core/tool/interpr7.cxx
+++ b/sc/source/core/tool/interpr7.cxx
@@ -31,6 +31,7 @@
#include <cstring>
#include <memory>
#include <string_view>
+#include <libxml/parser.h>
using namespace com::sun::star;
diff --git a/sc/source/filter/xml/XMLExportDataPilot.cxx b/sc/source/filter/xml/XMLExportDataPilot.cxx
index da65bec0dab7..bd5f16d828ff 100644
--- a/sc/source/filter/xml/XMLExportDataPilot.cxx
+++ b/sc/source/filter/xml/XMLExportDataPilot.cxx
@@ -123,7 +123,7 @@ void ScXMLExportDataPilot::WriteDPCondition(const ScQueryEntry& aQueryEntry, boo
if (aQueryEntry.IsQueryByEmpty())
{
- rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_EMPTY));
+ rExport.AddAttribute(XML_NAMESPACE_TABLE, XML_OPERATOR, GetXMLToken(XML_TOKEN_EMPTY));
}
else if (aQueryEntry.IsQueryByNonEmpty())
{
diff --git a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
index 6905e02d651b..e4307065bd92 100644
--- a/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
+++ b/sc/source/filter/xml/XMLExportDatabaseRanges.cxx
@@ -376,7 +376,7 @@ private:
case SC_EQUAL:
{
if (rEntry.IsQueryByEmpty())
- return GetXMLToken(XML_EMPTY);
+ return GetXMLToken(XML_TOKEN_EMPTY);
else if (rEntry.IsQueryByNonEmpty())
return GetXMLToken(XML_NOEMPTY);
diff --git a/sc/source/filter/xml/xmlfilti.cxx b/sc/source/filter/xml/xmlfilti.cxx
index 7585ce0c50fa..61f7cfe4a349 100644
--- a/sc/source/filter/xml/xmlfilti.cxx
+++ b/sc/source/filter/xml/xmlfilti.cxx
@@ -370,7 +370,7 @@ void ScXMLConditionContext::GetOperator(
rEntry.eOp = SC_BOTPERC;
else if (IsXMLToken(aOpStr, XML_BOTTOM_VALUES))
rEntry.eOp = SC_BOTVAL;
- else if (IsXMLToken(aOpStr, XML_EMPTY))
+ else if (IsXMLToken(aOpStr, XML_TOKEN_EMPTY))
rEntry.SetQueryByEmpty();
else if (aOpStr == u">")
rEntry.eOp = SC_GREATER;
@@ -422,7 +422,7 @@ void SAL_CALL ScXMLConditionContext::endFastElement( sal_Int32 /*nElement*/ )
if (maQueryItems.empty())
{
ScQueryEntry::Item& rItem = rEntry.GetQueryItem();
- if (IsXMLToken(sOperator, XML_EMPTY))
+ if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
return;
if (IsXMLToken(sDataType, XML_NUMBER))
{
@@ -753,7 +753,7 @@ void SAL_CALL ScXMLDPConditionContext::endFastElement( sal_Int32 /*nElement*/ )
else
aFilterField.eConnect = SC_AND;
pFilterContext->SetIsCaseSensitive(bIsCaseSensitive);
- if (IsXMLToken(sOperator, XML_EMPTY))
+ if (IsXMLToken(sOperator, XML_TOKEN_EMPTY))
aFilterField.SetQueryByEmpty();
else if (IsXMLToken(sOperator, XML_NOEMPTY))
aFilterField.SetQueryByNonEmpty();
diff --git a/unoxml/source/dom/attr.cxx b/unoxml/source/dom/attr.cxx
index dd974d910edb..d8d873cdf055 100644
--- a/unoxml/source/dom/attr.cxx
+++ b/unoxml/source/dom/attr.cxx
@@ -22,6 +22,7 @@
#include <string.h>
#include <memory>
+#include <libxml/entities.h>
#include <osl/diagnose.h>
#include <sal/log.hxx>
diff --git a/unoxml/source/dom/document.cxx b/unoxml/source/dom/document.cxx
index cb48bd1635f8..0825fc2cd7ed 100644
--- a/unoxml/source/dom/document.cxx
+++ b/unoxml/source/dom/document.cxx
@@ -41,6 +41,7 @@
#include <eventdispatcher.hxx>
#include <string.h>
+#include <libxml/xmlIO.h>
#include <osl/diagnose.h>
diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index c3cd7663d2fc..3898d58e4be4 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -22,6 +22,7 @@
#include <string.h>
#include <libxml/xmlerror.h>
+#include <libxml/parser.h>
#include <memory>
diff --git a/unoxml/source/dom/entity.cxx b/unoxml/source/dom/entity.cxx
index ccc8a0872499..98909dfe8f12 100644
--- a/unoxml/source/dom/entity.cxx
+++ b/unoxml/source/dom/entity.cxx
@@ -22,6 +22,7 @@
#include <osl/diagnose.h>
#include <string.h>
+#include <libxml/entities.h>
using namespace css::uno;
using namespace css::xml::dom;
diff --git a/unoxml/source/xpath/xpathapi.cxx b/unoxml/source/xpath/xpathapi.cxx
index a60083983882..c2b753783176 100644
--- a/unoxml/source/xpath/xpathapi.cxx
+++ b/unoxml/source/xpath/xpathapi.cxx
@@ -26,6 +26,7 @@
#include <libxml/xmlerror.h>
#include <libxml/xpath.h>
#include <libxml/xpathInternals.h>
+#include <libxml/xmlIO.h>
#include <com/sun/star/xml/xpath/XPathException.hpp>
@@ -217,7 +218,7 @@ namespace XPath
return selectSingleNode(contextNode, expr);
}
- static OUString make_error_message(xmlErrorPtr pError)
+ static OUString make_error_message(const xmlError* pError)
{
OUStringBuffer buf;
if (pError) {
@@ -259,7 +260,11 @@ namespace XPath
SAL_WARN("unoxml", "libxml2 error: " << str);
}
+#if LIBXML_VERSION >= 21200
+ static void structured_error_func(void *, const xmlError* error)
+#else
static void structured_error_func(void *, xmlErrorPtr error)
+#endif
{
SAL_WARN("unoxml", "libxml2 error: " << make_error_message(error));
}
diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
index 6879f37db295..e11dc0d16111 100644
--- a/xmloff/source/core/xmltoken.cxx
+++ b/xmloff/source/core/xmltoken.cxx
@@ -756,7 +756,7 @@ namespace xmloff::token {
TOKEN( "embedded-visible-area", XML_EMBEDDED_VISIBLE_AREA ),
TOKEN( "embossed", XML_EMBOSSED ),
TOKEN( "emissive-color", XML_EMISSIVE_COLOR ),
- TOKEN( "empty", XML_EMPTY ),
+ TOKEN( "empty", XML_TOKEN_EMPTY ),
TOKEN( "empty-line-refresh", XML_EMPTY_LINE_REFRESH ),
TOKEN( "enable-numbering", XML_ENABLE_NUMBERING ),
TOKEN( "enabled", XML_ENABLED ),
diff --git a/xmloff/source/style/PageMasterStyleMap.cxx b/xmloff/source/style/PageMasterStyleMap.cxx
index 7b2cab4751aa..6f631289672b 100644
--- a/xmloff/source/style/PageMasterStyleMap.cxx
+++ b/xmloff/source/style/PageMasterStyleMap.cxx
@@ -157,7 +157,7 @@ const XMLPropertyMapEntry aXMLPageMasterStyleMap[] =
PLMAP( PROP_FootnoteLineRelativeWidth, XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_PERCENT8|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_WIDTH ),
PLMAP( PROP_FootnoteLineTextDistance, XML_NAMESPACE_STYLE, XML__EMPTY, XML_TYPE_MEASURE|MID_FLAG_SPECIAL_ITEM, CTF_PM_FTN_LINE_DISTANCE ),
PLMAP( PROP_FootnoteLineWeight, XML_NAMESPACE_STYLE, XML_FOOTNOTE_SEP, XML_TYPE_MEASURE16|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_WEIGHT ),
- PLMAP( PROP_FootnoteLineStyle, XML_NAMESPACE_STYLE, XML_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
+ PLMAP( PROP_FootnoteLineStyle, XML_NAMESPACE_STYLE, XML_TOKEN_EMPTY, XML_TYPE_STRING|MID_FLAG_ELEMENT_ITEM, CTF_PM_FTN_LINE_STYLE ),
PLMAP_EXT(PROP_GutterMargin, XML_NAMESPACE_LO_EXT, XML_MARGIN_GUTTER, XML_TYPE_MEASURE, CTF_PM_MARGINGUTTER),
//////////////////////////////////////////////////////////////////////////
diff --git a/xmlsecurity/inc/xmlsec/saxhelper.hxx b/xmlsecurity/inc/xmlsec/saxhelper.hxx
index a49ccef1894c..a5863ffd0e2a 100644
--- a/xmlsecurity/inc/xmlsec/saxhelper.hxx
+++ b/xmlsecurity/inc/xmlsec/saxhelper.hxx
@@ -23,6 +23,7 @@
#include <string_view>
+#include <libxml/parser.h>
#include <libxml/tree.h>
#include <rtl/ustring.hxx>
--
2.42.0

--- libreoffice-7.6.3.2/xmlsecurity/inc/xmlsec-wrapper.h~ 2023-11-16 17:06:03.000000000 -0600
+++ libreoffice-7.6.3.2/xmlsecurity/inc/xmlsec-wrapper.h 2023-11-27 10:23:27.919378638 -0600
@@ -28,6 +28,7 @@
#define XMLSEC_NO_SIZE_T
#endif
+#include <libxml/parser.h>
#include <xmlsec/base64.h>
#include <xmlsec/bn.h>
#include <xmlsec/errors.h>

51
SOURCES/gpgkey-C2839ECAD9408FBE9531C3E9F434A1EFAFEEAEA3.gpg.asc

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----

mQINBEyzEr0BEADT441wUITsTwDA2nM3kmUhGrzTdxZB5xv/E1ZJCw63qWdmdTdW
NZDfNDuLs4r2VjlEoA3xGK6jgnQvyAoNj0yiEbW/JedHHgOiVdXDlkgkY58myafT
FXqDLzTXVrsNnay0GS8XrNjptZJPhEPBvNUdkqpA9B7RTkfaXj779Pf/AeFMZVLl
UAci5RA0NNF910GHwoXT6SEv2PGoawsphnfmMVdKh9wz7asbtKXEmotCwX3k045x
LsIVK5ANOi+BI9C3LkrrFJWw2XHqDW2ulwCJ0L5QNSjOuY/v8REODwIXamvvdZOz
XBKSIzDOalJqFCHls3YlGyFw1knr6BAOmVOm32YtNTCLbVA/iK55fZWnUCjD3a4G
xz4qpQYWfpxhOmlHpk5JkraSNHzCc7SB43DwcHF5ecXHttMhO8MoN/bAZBgCuLGF
EwNvwFbDwIWo07mlv7wD8i1rtUCvLywJc5YL2PbjCLfB1Q4YzDX1EWnjKdnAsxxK
ftrx1DFlxzUF+TaHbLTPttUcsWQaL8wITznoWIwdIWlo2woPgWIpUXMOYwYV31Oo
fgmroHa3V4NOvkke09uhaZawg5yZCoRFohhfKPqT1ZrJ9SnRbW/WR3VTVY76ht5k
RuV3eb2VWBmPU9zn56Tbe6dvFkBuzHH1JdECAqy1BzFcmQQFBebFzf1XAQARAQAB
tEhMaWJyZU9mZmljZSBCdWlsZCBUZWFtIChDT0RFIFNJR05JTkcgS0VZKSA8YnVp
bGRAZG9jdW1lbnRmb3VuZGF0aW9uLm9yZz6JAjcEEwEKACEFAkyzEr0CGwMFCwkI
BwMFFQoJCAsFFgIDAQACHgECF4AACgkQ9DSh76/urqOc4w//X+74QlyRalcuLNw3
oJKB1+1z6xxhhpwg1kw5cMMrGu0w0YoPvLDKaiS02DdkIaXDECcQTOoEh7/bYbZq
6OtE1WyxqHYYOPK5yul5FRwZ5k5HZ7pDFcKCQ72UgWhz+QznRhgZ0jwEWl5Ln3rw
JpSynIvTXHmQogId0xmcrNQPyckzzugGx4qZFinSOmDGwTgG14NU3vat2iek37Ph
BLh5V8ohlEoccwwPejtKEWQudg0Q8K7uBuqLUhnJoZodEytqpOvtysuPtGxGXnmD
7oXtBVEF3X6eFRXDIp81cx2isHK4Krf4z4T9KUimNLHjWRa+ZQtp2pZLHQlblfsn
CUf6TYZ0Yi909EhcM/hxAgBZXellOCQ/8U2cJsTUyN5Dp1wbf6X0uK4uaed1/037
EGLAO6PP6WQz6jWd1/hhsQ5oAmdjkzlMFEfKNeIIDuKMOjXcTvM8/KRXhufwICvS
FBlSIveHfDFWCvOVgq0VjAY7NFMFKRUnRHB58qBamtyhOyscRIvT5QH8HYfUA/YN
l9FguczYUIQi3t+H1hoHIywdtmRuhYx5WlIUe8FO9QD5RMPbBjVbkCYgdHdxgnJD
KCoRGsoKlLB7UZc4Ak9j6plZbYtFRonm2MjU4zxblCFNuEqVQ0V/y6/OIGpBYF9Y
aEAtTgEJd9OmmDCM3d8O0zZHYma5Ag0ETLMSvQEQAMDp0HxSDWd+2Od/aJutCMFe
8tfw7+nP9gfHOCUqesb88QvRMJgVY6z1aNdMllxTKlsxUiuA6uNcrUAkzDp/qRWR
58rWIO642PLifng3urJ1cDbSKC+K4RHpQC+hXllMKLqq8dwNy1LO4fPo9SdtUF4B
ev6enKmo4yCiOGv2tvztPh9gMGYoDncaOsS0t2UPr2MMQIVUmmIzfJBkdOxbZiWO
doeNbWsYJHQaO+Ahal6SjPHKzhdjeXhZzHl1vqeDkV4MXHprrOwXNXwPiEpkZe2O
dc7yaMkQc0k8WRrfKHApbnwDx6Mi8HYaf+LvRq7P0eMO9osD1q44wQQvVzk199zp
MMHS5/kAv7RBNmDOSJQIZ4zT4lzRDODjMf01Ljn02zon12GfJo0WbbpmLulta7uj
HgMrUU54by8WPFGW0fljXiDX0EpkHhxUsUsfaNfBsFnE+sRxQjNF/ljvofkyApI2
1OjtEa9krwvgDqaXsL+a2076OsoFpORlTZ30REb0eRS6rEt8M+7s4xTaA7GFxlY/
N+bnaM8m+ItygfFHHW4H0wLbbgajDeooSTgaheVNF5V9HS0EkN4MNVvtJH7J6drd
iR1QVhX87n7+JtQzTtCOyfeKjaB+kcbAm/2VOFOeHdig5+BygpXt3IixVq72xmGz
h0jhY565MjXrqg5O3pvLABEBAAGJAh8EGAEKAAkFAkyzEr0CGwwACgkQ9DSh76/u
rqPaeg//avI2/a94XlSYtSZb2hVdW3qa9AEypQurqtVrKJfEKFV+ZQBPXbPRy8Mz
5LMEH1sfD6B4SVGIGJ8opSyieJkcKIke+GMekTWvSqDpFOgY2rw7eHNn/33ZJs3O
zQOyWz8smE/AIM/5lyiVGuSlU7RjYncf1V9bIBc91q9Edqk4IYUo/7W+yafC0VW/
8oHUFYjHNaujiOsEoLiXsh9Y0R/6Jxs6fvE4XbCANV/ecN5UX+9BBrNZNN/9GbNr
6CYGZ57M2f1Pgywy/XvOnEPnJ8aWXUyGLqq34KvMPFPSOeAmFbkFEsB4mdDMFaDw
rzziiZE/zS8/nKiH4X2JgmLgFsadEihdfYxeDcGbhREK/qA1f3bGnr1j05V07yko
2FFZdiOr4OgiT5ymgwVUXQ2Aiz+J/C8URjfpcPxetmuDQT9AYfgmMKPNVXPFWuNQ
dzN5GZbI+E1/cb5+uLNknvjngw2G4PR/4uPHX1HCSftlNawBqWzyun1k+B7/u3Oe
FebWXcdqSmZuLQ7l0Pkuz/Nlp6M6cKpceL+9zCgaiR5+v9h94VvtXKd/mw9ZLACc
VcOANiwCtsJP3lt7jRSHtkuUe6vUm5tLS582RfXxoI1BlPjNtG9xAQ3JKBHIXbal
T18pAFO3t74cxg3h0iI1G51F3oL0DwILP2MBBmardVEp5CMnB/M=
=1iQB
-----END PGP PUBLIC KEY BLOCK-----

16
SOURCES/kahansum_test_fix_for_aarc64_s390x.patch

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
diff -U 3 -dHrN a/sc/inc/arraysumfunctor.hxx b/sc/inc/arraysumfunctor.hxx
--- a/sc/inc/arraysumfunctor.hxx 2023-09-22 21:07:01.000000000 +0200
+++ b/sc/inc/arraysumfunctor.hxx 2023-10-01 09:13:03.523493665 +0200
@@ -85,8 +85,12 @@
inline KahanSum sumArray(const double* pArray, size_t nSize)
{
size_t i = 0;
+#if 0
const double* pCurrent = pArray;
KahanSum fSum = executeFast(i, nSize, pCurrent);
+#else
+ KahanSum fSum = 0.0;
+#endif
// sum rest of the array
for (; i < nSize; ++i)

16
SOURCES/libreoffice-multiliblauncher.sh

@ -0,0 +1,16 @@ @@ -0,0 +1,16 @@
#!/bin/sh
OOO_ARCH=$(uname -m)
case $OOO_ARCH in
x86_64 | s390x | sparc64 | aarch64)
OOO_LIB_DIR="/usr/lib64"
SECONDARY_LIB_DIR="/usr/lib"
;;
* )
OOO_LIB_DIR="/usr/lib"
SECONDARY_LIB_DIR="/usr/lib64"
;;
esac
if [ ! -x $OOO_LIB_DIR/BRAND/program/LAUNCHER ]; then
OOO_LIB_DIR="$SECONDARY_LIB_DIR"
fi
exec $OOO_LIB_DIR/BRAND/program/LAUNCHER "$@"

32
SOURCES/limit-tests-giving-dubious-results-to-x86_64.patch

@ -0,0 +1,32 @@ @@ -0,0 +1,32 @@
From 3426c96d0e32e0c83e4ce5fdb3405787a0c81e6c Mon Sep 17 00:00:00 2001
From: Dan Horák <dan@danny.cz>
Date: Fri, 01 Sep 2023 18:45:42 +0200
Subject: [PATCH] limit tests giving dubious results to x86_64

We have confirmed that ArrayFunctionsTest::testDubiousArrayFormulasFODS
gives different results depending on the -ffp-contract setting on
ppc64le and likely also on s390x in addition to aarch64. Thus limit the
check only to x86_64 where it's known to give consistent results.

Change-Id: Iedb63fb4340cfe9a88e374c7498d97574bcdfcc7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156453
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---

diff --git a/sc/qa/unit/functions_array.cxx b/sc/qa/unit/functions_array.cxx
index 7584c4e..2053c44 100644
--- a/sc/qa/unit/functions_array.cxx
+++ b/sc/qa/unit/functions_array.cxx
@@ -27,8 +27,9 @@
{
//TODO: sc/qa/unit/data/functions/array/dubious/fods/linest.fods produces widely different
// values when built with -ffp-contract enabled (-ffp-contract=on default on Clang 14,
- // -ffp-contract=fast default when building with optimizations on GCC) on at least aarch64:
-#if !((defined __clang__ || defined __GNUC__) && defined __aarch64__)
+ // -ffp-contract=fast default when building with optimizations on GCC) on at least aarch64
+ // and ppc64le. Thus limit the check only to platforms with consistent results.
+#if defined X86_64
OUString aDirectoryURL
= m_directories.getURLFromSrc(u"/sc/qa/unit/data/functions/array/dubious/fods/");
recursiveScan(test::pass, "OpenDocument Spreadsheet Flat XML", aDirectoryURL,

19
SOURCES/lo-7.6-ppc64le-tests.patch

@ -0,0 +1,19 @@ @@ -0,0 +1,19 @@
diff -up libreoffice-7.6.0.3/testtools/source/bridgetest/bridgetest.cxx.orig libreoffice-7.6.0.3/testtools/source/bridgetest/bridgetest.cxx
--- libreoffice-7.6.0.3/testtools/source/bridgetest/bridgetest.cxx.orig 2023-08-21 13:15:31.738062821 +0200
+++ libreoffice-7.6.0.3/testtools/source/bridgetest/bridgetest.cxx 2023-08-21 13:15:56.607246816 +0200
@@ -469,6 +469,7 @@ static bool performTest(
equals(aData, aSV2ret) && equals(aData, aRet2),
"getValues2 test");
}
+#if 0
{
TwoFloats aIn(1.1f, 2.2f);
TwoFloats aOut = xLBT->echoTwoFloats(aIn);
@@ -479,6 +480,7 @@ static bool performTest(
FourFloats aOut = xLBT->echoFourFloats(aIn);
bRet = check( memcmp(&aIn, &aOut, sizeof(FourFloats)) == 0, "four floats struct test" ) && bRet;
}
+#endif
{
MixedFloatAndInteger aIn(7.7f, 8);
MixedFloatAndInteger aOut = xLBT->echoMixedFloatAndInteger(aIn);

22
SOURCES/pdfdoc.patch

@ -0,0 +1,22 @@ @@ -0,0 +1,22 @@
--- libreoffice-7.6.3.1/sw/qa/core/text/itrform2.cxx 2023-11-02 16:37:04.000000000 -0500
+++ core/sw/qa/core/text/itrform2.cxx 2023-11-07 10:31:14.018505043 -0600
@@ -124,6 +124,10 @@
// Then make sure all the expected text is there on page 2:
std::unique_ptr<vcl::pdf::PDFiumDocument> pPdfDocument = parsePDFExport();
+ if (!pPdfDocument)
+ {
+ return;
+ }
std::unique_ptr<vcl::pdf::PDFiumPage> pPage2 = pPdfDocument->openPage(1);
int nTextCount = 0;
for (int i = 0; i < pPage2->getObjectCount(); ++i)
@@ -143,7 +147,7 @@
CPPUNIT_TEST_FIXTURE(Test, testSplitFlyAnchorLeftMargin)
{
- // Given a document with a floating table, anchor para is followed by an other para with a left
+ // Given a document with a floating table, anchor para is followed by another para with a left
// margin:
createSwDoc("floattable-anchor-left-margin.docx");

5039
SPECS/libreoffice.spec

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save