libreoffice package is retired on branch c10s for CS-2551

This commit is contained in:
Johnny Hughes 2024-10-02 16:39:55 +00:00
parent cdf4c73ea2
commit e6b5005e36
22 changed files with 4 additions and 5327 deletions

14
.gitignore vendored
View File

@ -1,14 +0,0 @@
/35c94d2df8893241173de1d16b6034c0-swingExSrc.zip
/798b2ffdc8bcfe7bca2cf92b62caf685-rhino1_5R5.zip
/a7983f859eafb2677d7ff386a023bc40-xsltml_2.1.2.zip
/17410483b5b5f267aa18b7e00b65e6e0-hsqldb_1_8_0.zip
/185d60944ea767075d27247c3162b3bc-unowinreg.dll
/f543e6e2d7275557a839a164941c0a86e5f2c3f2a0042bfc434c88c6dde9e140-opens___.ttf
/libreoffice-multiliblauncher.sh
/dtoa-20180411.tgz
/libreoffice-7.1.8.1.tar.xz
/libreoffice-7.1.8.1.tar.xz.asc
/libreoffice-help-7.1.8.1.tar.xz
/libreoffice-help-7.1.8.1.tar.xz.asc
/libreoffice-translations-7.1.8.1.tar.xz
/libreoffice-translations-7.1.8.1.tar.xz.asc

View File

@ -1,69 +0,0 @@
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

View File

@ -1,63 +0,0 @@
From 77f30ada1156ca1e1357776fea8e9dc113f6898d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Thu, 3 Mar 2022 14:22:37 +0000
Subject: [PATCH 1/5] CVE-2022-26305 compare authors using Thumbprint
Change-Id: I338f58eb07cbf0a3d13a7dafdaddac09252a8546
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130929
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit 65442205b5b274ad309308162f150f8d41648f72)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130866
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit a7aaa78acea4c1d51283c2fce54ff9f5339026f8)
---
.../component/documentdigitalsignatures.cxx | 23 +++++++++++++++----
1 file changed, 19 insertions(+), 4 deletions(-)
diff --git a/xmlsecurity/source/component/documentdigitalsignatures.cxx b/xmlsecurity/source/component/documentdigitalsignatures.cxx
index b9066ea92cac..5a21c8421bec 100644
--- a/xmlsecurity/source/component/documentdigitalsignatures.cxx
+++ b/xmlsecurity/source/component/documentdigitalsignatures.cxx
@@ -19,9 +19,10 @@
#include <resourcemanager.hxx>
-#include <digitalsignaturesdialog.hxx>
+#include <certificate.hxx>
#include <certificatechooser.hxx>
#include <certificateviewer.hxx>
+#include <digitalsignaturesdialog.hxx>
#include <macrosecurity.hxx>
#include <biginteger.hxx>
#include <strings.hrc>
@@ -666,9 +667,23 @@ sal_Bool DocumentDigitalSignatures::isAuthorTrusted(
Sequence< SvtSecurityOptions::Certificate > aTrustedAuthors = SvtSecurityOptions().GetTrustedAuthors();
return std::any_of(aTrustedAuthors.begin(), aTrustedAuthors.end(),
- [&xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) {
- return xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->getIssuerName())
- && ( rAuthor[1] == sSerialNum );
+ [this, &xAuthor, &sSerialNum](const SvtSecurityOptions::Certificate& rAuthor) {
+ if (!xmlsecurity::EqualDistinguishedNames(rAuthor[0], xAuthor->getIssuerName()))
+ return false;
+ if (rAuthor[1] != sSerialNum)
+ return false;
+
+ DocumentSignatureManager aSignatureManager(mxCtx, {});
+ if (!aSignatureManager.init())
+ return false;
+ uno::Reference<css::security::XCertificate> xCert = aSignatureManager.getSecurityEnvironment()->createCertificateFromAscii(rAuthor[2]);
+
+ auto pAuthor = dynamic_cast<xmlsecurity::Certificate*>(xAuthor.get());
+ auto pCert = dynamic_cast<xmlsecurity::Certificate*>(xCert.get());
+ if (pAuthor && pCert)
+ return pCert->getSHA256Thumbprint() == pAuthor->getSHA256Thumbprint();
+
+ return xCert->getSHA1Thumbprint() == xAuthor->getSHA1Thumbprint();
});
}
--
2.37.3

View File

@ -1,93 +0,0 @@
From dbf825c25195e29a00228f31112c5aaa2102f692 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Mon, 21 Feb 2022 11:55:21 +0100
Subject: [PATCH] Avoid unnecessary empty -Djava.class.path=
Change-Id: Idcfe7321077b60381c0273910b1faeb444ef1fd8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130242
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
.../plugins/sunmajor/pluginlib/sunjavaplugin.cxx | 16 +++++++++++++---
jvmfwk/source/framework.cxx | 8 ++++++--
jvmfwk/source/fwkbase.cxx | 3 +++
3 files changed, 22 insertions(+), 5 deletions(-)
diff --git a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
index f47b0a3..843f6d1 100644
--- a/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
+++ b/jvmfwk/plugins/sunmajor/pluginlib/sunjavaplugin.cxx
@@ -713,17 +713,22 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
// all versions below 1.5.1
options.emplace_back("abort", reinterpret_cast<void*>(abort_handler));
bool hasStackSize = false;
+#ifdef UNX
+ // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
+ // in the class path in order to have applet support:
+ OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
+#endif
for (int i = 0; i < cOptions; i++)
{
OString opt(arOptions[i].optionString);
#ifdef UNX
- // Until java 1.5 we need to put a plugin.jar or javaplugin.jar (<1.4.2)
- // in the class path in order to have applet support:
if (opt.startsWith("-Djava.class.path="))
{
- OString sAddPath = getPluginJarPath(pInfo->sVendor, pInfo->sLocation,pInfo->sVersion);
if (!sAddPath.isEmpty())
+ {
opt += OStringChar(SAL_PATHSEPARATOR) + sAddPath;
+ sAddPath.clear();
+ }
}
#endif
if (opt == "-Xint") {
@@ -768,6 +773,11 @@ javaPluginError jfw_plugin_startJavaVirtualMachine(
}
#endif
}
+#ifdef UNX
+ if (!sAddPath.isEmpty()) {
+ options.emplace_back("-Djava.class.path=" + sAddPath, nullptr);
+ }
+#endif
std::unique_ptr<JavaVMOption[]> sarOptions(new JavaVMOption[options.size()]);
for (std::vector<Option>::size_type i = 0; i != options.size(); ++i) {
diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx
index 5a7cef4..478b42b 100644
--- a/jvmfwk/source/framework.cxx
+++ b/jvmfwk/source/framework.cxx
@@ -189,8 +189,12 @@ javaFrameworkError jfw_startVM(
//In direct mode the options are specified by bootstrap variables
//of the form UNO_JAVA_JFW_PARAMETER_1 .. UNO_JAVA_JFW_PARAMETER_n
vmParams = jfw::BootParams::getVMParameters();
- sUserClassPath =
- "-Djava.class.path=" + jfw::BootParams::getClasspath();
+ auto const cp = jfw::BootParams::getClasspath();
+ if (!cp.isEmpty())
+ {
+ sUserClassPath =
+ "-Djava.class.path=" + cp;
+ }
}
else
OSL_ASSERT(false);
diff --git a/jvmfwk/source/fwkbase.cxx b/jvmfwk/source/fwkbase.cxx
index df84d7c..de1acdb 100644
--- a/jvmfwk/source/fwkbase.cxx
+++ b/jvmfwk/source/fwkbase.cxx
@@ -458,6 +458,9 @@ OString makeClassPathOption(OUString const & sUserClassPath)
sPaths = OUStringToOString(
sBufCP.makeStringAndClear(), osl_getThreadTextEncoding());
+ if (sPaths.isEmpty()) {
+ return "";
+ }
OString sOptionClassPath = "-Djava.class.path=" + sPaths;
return sOptionClassPath;
--
2.39.2

View File

@ -1,69 +0,0 @@
From 6167f5815aefa78a70517c8e2acbdd7b9c9be27d Mon Sep 17 00:00:00 2001
Message-ID: <6167f5815aefa78a70517c8e2acbdd7b9c9be27d.1703003067.git.erack@redhat.com>
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
Date: Fri, 3 Nov 2023 14:20:07 +0000
Subject: [PATCH] escape url passed to gstreamer
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
Change-Id: I3c93ee34800cc8563370f75ef3ef6f8a9220e6ec
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158894
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit f41dcadf6492a6ffd32696d50f818e44355b9ad9)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159583
erAck: backported to 7.1.8.1
---
avmedia/source/gstreamer/gstframegrabber.cxx | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-escape-url-passed-to-gstreamer.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-escape-url-passed-to-gstreamer.patch"
diff --git a/avmedia/source/gstreamer/gstframegrabber.cxx b/avmedia/source/gstreamer/gstframegrabber.cxx
index ece799d87530..25170a296e66 100644
--- a/avmedia/source/gstreamer/gstframegrabber.cxx
+++ b/avmedia/source/gstreamer/gstframegrabber.cxx
@@ -51,11 +51,9 @@ void FrameGrabber::disposePipeline()
FrameGrabber::FrameGrabber( const OUString &rURL ) :
FrameGrabber_BASE()
{
- gchar *pPipelineStr;
- pPipelineStr = g_strdup_printf(
- "uridecodebin uri=%s ! videoconvert ! videoscale ! appsink "
- "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"",
- OUStringToOString( rURL, RTL_TEXTENCODING_UTF8 ).getStr() );
+ const char pPipelineStr[] =
+ "uridecodebin name=source ! videoconvert ! videoscale ! appsink "
+ "name=sink caps=\"video/x-raw,format=RGB,pixel-aspect-ratio=1/1\"";
GError *pError = nullptr;
mpPipeline = gst_parse_launch( pPipelineStr, &pError );
@@ -66,6 +64,12 @@ FrameGrabber::FrameGrabber( const OUString &rURL ) :
}
if( mpPipeline ) {
+
+ if (GstElement *pUriDecode = gst_bin_get_by_name(GST_BIN(mpPipeline), "source"))
+ g_object_set(pUriDecode, "uri", OUStringToOString(rURL, RTL_TEXTENCODING_UTF8).getStr(), nullptr);
+ else
+ g_warning("Missing 'source' element in gstreamer pipeline");
+
// pre-roll
switch( gst_element_set_state( mpPipeline, GST_STATE_PAUSED ) ) {
case GST_STATE_CHANGE_FAILURE:
--------------erAck-patch-parts--

View File

@ -1,93 +0,0 @@
From 37d73a1ab94b43e03866d5a910cb58331543b8c3 Mon Sep 17 00:00:00 2001
Message-ID: <37d73a1ab94b43e03866d5a910cb58331543b8c3.1703086247.git.erack@redhat.com>
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolan.mcnamara@collabora.com>
Date: Fri, 3 Nov 2023 17:14:26 +0000
Subject: [PATCH] add some protocols that don't make sense as floating frame
targets
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
Change-Id: Id900a5eef248731d1184c1df501a2cf7a2de7eb9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158910
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 11ebdfef16501c6d35c3e3d0d62507f706557c71)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158900
Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
(cherry picked from commit bab433911bdecb344f7ea94dbd00690241a08c54)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159582
erAck: backported to 7.1.8.1
---
include/tools/urlobj.hxx | 5 +++++
sfx2/source/doc/iframe.cxx | 5 ++++-
tools/source/fsys/urlobj.cxx | 8 ++++++++
3 files changed, 17 insertions(+), 1 deletion(-)
--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-add-some-protocols-that-don-t-make-sense-as-floating.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-add-some-protocols-that-don-t-make-sense-as-floating.patch"
diff --git a/include/tools/urlobj.hxx b/include/tools/urlobj.hxx
index 9d6820ddf241..dfd658722826 100644
--- a/include/tools/urlobj.hxx
+++ b/include/tools/urlobj.hxx
@@ -915,6 +915,11 @@ public:
void changeScheme(INetProtocol eTargetScheme);
+ // INetProtocol::Macro, INetProtocol::Uno, INetProtocol::Slot,
+ // vnd.sun.star.script, etc. All the types of URLs which shouldn't
+ // be accepted from an outside controlled source
+ bool IsExoticProtocol() const;
+
private:
// General Structure:
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 150218b436e9..b81ce82fd32e 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -168,8 +168,11 @@ sal_Bool SAL_CALL IFrameObject::load(
xTrans->parseStrict( aTargetURL );
INetURLObject aURLObject(aTargetURL.Complete);
- if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script"))
+ if (aURLObject.IsExoticProtocol())
+ {
+ //SAL_WARN("sfx", "IFrameObject::load ignoring: " << aTargetURL.Complete);
return false;
+ }
uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
diff --git a/tools/source/fsys/urlobj.cxx b/tools/source/fsys/urlobj.cxx
index 764bb28ef623..2a9f7bc3d7dc 100644
--- a/tools/source/fsys/urlobj.cxx
+++ b/tools/source/fsys/urlobj.cxx
@@ -4829,4 +4829,12 @@ OUString INetURLObject::CutExtension()
? aTheExtension : OUString();
}
+bool INetURLObject::IsExoticProtocol() const
+{
+ return m_eScheme == INetProtocol::Slot ||
+ m_eScheme == INetProtocol::Macro ||
+ m_eScheme == INetProtocol::Uno ||
+ isSchemeEqualTo(u"vnd.sun.star.script");
+}
+
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
--------------erAck-patch-parts--

View File

@ -1,29 +0,0 @@
From 6582f7956313e16ea7df5b7cc961d368c150de0a Mon Sep 17 00:00:00 2001
From: Caolán McNamara <caolan.mcnamara@collabora.com>
Date: Wed, 27 Mar 2024 17:07:20 +0000
Subject: [PATCH] add notify for script use
Change-Id: I84af197cec7755f6803a578e1e21c03966ad5f3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165410
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
(cherry picked from commit a4a5c6b63599bca1f084bb90875f6fd8e15184ac)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167419
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
---
diff --git a/xmloff/source/draw/eventimp.cxx b/xmloff/source/draw/eventimp.cxx
index 226caca..bcf67c4 100644
--- a/xmloff/source/draw/eventimp.cxx
+++ b/xmloff/source/draw/eventimp.cxx
@@ -212,6 +212,9 @@
if( maData.mbValid )
maData.mbValid = !sEventName.isEmpty();
+
+ if (!maData.msMacroName.isEmpty())
+ rImp.NotifyMacroEventRead();
}
css::uno::Reference< css::xml::sax::XFastContextHandler > SdXMLEventContext::createFastChildContext(

View File

@ -1,79 +0,0 @@
From 1dec4285bd4c59c23a6a9a56cee9a66ebe0ba6c3 Mon Sep 17 00:00:00 2001
Message-ID: <1dec4285bd4c59c23a6a9a56cee9a66ebe0ba6c3.1723721182.git.erack@redhat.com>
From: Sarper Akdemir <sarper.akdemir@allotropia.de>
Date: Tue, 11 Jun 2024 12:39:36 +0200
Subject: [PATCH] remove ability to trust not validated macro signatures in
high security
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------erAck-patch-parts"
This is a multi-part message in MIME format.
--------------erAck-patch-parts
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit
Giving the user the option to determine if they should trust an
invalid signature in HIGH macro security doesn't make sense.
CommonName of the signature is the most prominent feature presented
and the CommonName of a certificate can be easily forged for an
invalid signature, tricking the user into accepting an invalid
signature.
in the HIGH macro security setting only show the pop-up to
enable/disable signed macro if the certificate signature can be
validated.
cherry-picked without UI/String altering bits for 24-2
Change-Id: Ia766fb701660160ee5dc9f6e077f4012a44ce721
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/168667
Tested-by: Jenkins
Reviewed-by: Sarper Akdemir <sarper.akdemir@allotropia.de>
(cherry picked from commit 2beaa3be3829303e948d401f492dbfd239d60aad)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/169525
Reviewed-by: Thorsten Behrens <thorsten.behrens@allotropia.de>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171306
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171314
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171315
---
sfx2/source/doc/docmacromode.cxx | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
--------------erAck-patch-parts
Content-Type: text/x-patch; name="0001-remove-ability-to-trust-not-validated-macro-signatur.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0001-remove-ability-to-trust-not-validated-macro-signatur.patch"
diff --git a/sfx2/source/doc/docmacromode.cxx b/sfx2/source/doc/docmacromode.cxx
index 919033cbaf5d..33d546f2920a 100644
--- a/sfx2/source/doc/docmacromode.cxx
+++ b/sfx2/source/doc/docmacromode.cxx
@@ -228,14 +228,18 @@ namespace sfx2
// check whether the document is signed with trusted certificate
if ( nMacroExecutionMode != MacroExecMode::FROM_LIST )
{
+ SignatureState nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState();
+
// the trusted macro check will also retrieve the signature state ( small optimization )
const SvtSecurityOptions aSecOption;
const bool bAllowUIToAddAuthor = nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_NO_WARN
&& (nMacroExecutionMode == MacroExecMode::ALWAYS_EXECUTE
- || !aSecOption.IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors));
+ || !aSecOption.IsReadOnly(SvtSecurityOptions::EOption::MacroTrustedAuthors))
+ && (nMacroExecutionMode != MacroExecMode::FROM_LIST_AND_SIGNED_WARN
+ || nSignatureState == SignatureState::OK);
+
const bool bHasTrustedMacroSignature = m_xData->m_rDocumentAccess.hasTrustedScriptingSignature(bAllowUIToAddAuthor);
- SignatureState nSignatureState = m_xData->m_rDocumentAccess.getScriptingSignatureState();
if ( nSignatureState == SignatureState::BROKEN )
{
if (!bAllowUIToAddAuthor)
--------------erAck-patch-parts--

View File

@ -1,364 +0,0 @@
From fee5967ab6ce7226f9baed984d7b1c49173a0c59 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Thu, 24 Feb 2022 14:31:23 +0100
Subject: [PATCH] Don't use Library_tl in URE libraries
This partly reverts 8b5e23eac31cafbd442a3acab5fbcf98bfd0af11 "log nice exception
messages whereever possible", e1eb7cb04a4c30cec238ab0f54d41a6cdc3299c1
"loplugin:logexceptionnicely in starmath..svgio",
d6d80c4e1783b4459bd4a8fbcbdfeebe416c1cb5 "OSL_FAIL.*exception ->
TOOLS_WARN_EXCEPTION", and 877f40ac3f2add2b6dc37bae280d4d98dd102286 "tdf#42949
Fix new IWYU warnings in directories [h-r]*", and adapts
loplugin:logexceptionnicely accordingly.
Change-Id: I792b853b988c7c5f77179ca0672c30cb4223b5a6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130502
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Cherry-picked from 9c431f4d3afed0aad21b5ba67a5a55328c4d0685
Conflicts:
stoc/source/javavm/javavm.cxx
---
compilerplugins/clang/logexceptionnicely.cxx | 6 +++++
io/Library_io.mk | 1 -
io/source/stm/opump.cxx | 24 ++++++++++---------
javaunohelper/Library_juhx.mk | 1 -
javaunohelper/source/bootstrap.cxx | 7 ++----
stoc/Library_bootstrap.mk | 1 -
stoc/Library_javaloader.mk | 1 -
stoc/Library_javavm.mk | 1 -
stoc/source/javaloader/javaloader.cxx | 7 +++---
stoc/source/javavm/javavm.cxx | 17 +++++++------
stoc/source/servicemanager/servicemanager.cxx | 13 +++++-----
11 files changed, 39 insertions(+), 40 deletions(-)
diff --git a/compilerplugins/clang/logexceptionnicely.cxx b/compilerplugins/clang/logexceptionnicely.cxx
index a262d276b88c..fb5b1f86ed59 100644
--- a/compilerplugins/clang/logexceptionnicely.cxx
+++ b/compilerplugins/clang/logexceptionnicely.cxx
@@ -46,6 +46,12 @@ public:
return false;
if (loplugin::hasPathnamePrefix(fn, SRCDIR "/comphelper/"))
return false;
+ if (loplugin::hasPathnamePrefix(fn, SRCDIR "/io/"))
+ return false;
+ if (loplugin::hasPathnamePrefix(fn, SRCDIR "/javaunohelper/"))
+ return false;
+ if (loplugin::hasPathnamePrefix(fn, SRCDIR "/stoc/"))
+ return false;
// can't do that here, don't have an Any
if (loplugin::hasPathnamePrefix(fn, SRCDIR
"/connectivity/source/drivers/hsqldb/HStorageMap.cxx"))
diff --git a/io/Library_io.mk b/io/Library_io.mk
index b961b437cd46..fc61f3366e1b 100644
--- a/io/Library_io.mk
+++ b/io/Library_io.mk
@@ -17,7 +17,6 @@ $(eval $(call gb_Library_use_libraries,io,\
cppu \
cppuhelper \
sal \
- tl \
))
$(eval $(call gb_Library_set_componentfile,io,io/source/io))
diff --git a/io/source/stm/opump.cxx b/io/source/stm/opump.cxx
index 7ba8752d8dfb..d120dd37f8ed 100644
--- a/io/source/stm/opump.cxx
+++ b/io/source/stm/opump.cxx
@@ -18,6 +18,8 @@
*/
+#include <sal/log.hxx>
+
#include <com/sun/star/io/IOException.hpp>
#include <com/sun/star/io/NotConnectedException.hpp>
#include <com/sun/star/io/XActiveDataSource.hpp>
@@ -32,7 +34,7 @@
#include <cppuhelper/supportsservice.hxx>
#include <osl/mutex.hxx>
#include <osl/thread.h>
-#include <tools/diagnose_ex.h>
+
using namespace osl;
using namespace std;
@@ -124,9 +126,9 @@ void Pump::fireError( const Any & exception )
{
static_cast< XStreamListener * > ( iter.next() )->error( exception );
}
- catch ( const RuntimeException & )
+ catch ( const RuntimeException &e )
{
- TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
}
}
}
@@ -153,9 +155,9 @@ void Pump::fireClose()
{
static_cast< XStreamListener * > ( iter.next() )->closed( );
}
- catch ( const RuntimeException & )
+ catch ( const RuntimeException &e )
{
- TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
}
}
}
@@ -169,9 +171,9 @@ void Pump::fireStarted()
{
static_cast< XStreamListener * > ( iter.next() )->started( );
}
- catch ( const RuntimeException & )
+ catch ( const RuntimeException &e )
{
- TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
}
}
}
@@ -185,9 +187,9 @@ void Pump::fireTerminated()
{
static_cast< XStreamListener * > ( iter.next() )->terminated();
}
- catch ( const RuntimeException & )
+ catch ( const RuntimeException &e )
{
- TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
}
}
}
@@ -285,11 +287,11 @@ void Pump::run()
close();
fireClose();
}
- catch ( const css::uno::Exception & )
+ catch ( const css::uno::Exception &e )
{
// we are the last on the stack.
// this is to avoid crashing the program, when e.g. a bridge crashes
- TOOLS_WARN_EXCEPTION("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners");
+ SAL_WARN("io.streams","com.sun.star.comp.stoc.Pump: unexpected exception during calling listeners" << e);
}
}
diff --git a/javaunohelper/Library_juhx.mk b/javaunohelper/Library_juhx.mk
index 6eacff250c0f..1a24e5ef54f2 100644
--- a/javaunohelper/Library_juhx.mk
+++ b/javaunohelper/Library_juhx.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_Library_use_libraries,juhx,\
jvmaccess \
sal \
salhelper \
- tl \
))
$(eval $(call gb_Library_add_exception_objects,juhx,\
diff --git a/javaunohelper/source/bootstrap.cxx b/javaunohelper/source/bootstrap.cxx
index e7bf63b841de..6ad39d467444 100644
--- a/javaunohelper/source/bootstrap.cxx
+++ b/javaunohelper/source/bootstrap.cxx
@@ -36,7 +36,6 @@
#include <jni.h>
#include <jvmaccess/unovirtualmachine.hxx>
-#include <tools/diagnose_ex.h>
#include "juhx-export-functions.hxx"
#include "vm.hxx"
@@ -148,11 +147,10 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
}
catch (const RuntimeException & exc)
{
- css::uno::Any exAny( cppu::getCaughtException() );
jclass c = jni_env->FindClass( "com/sun/star/uno/RuntimeException" );
if (nullptr != c)
{
- SAL_WARN("javaunohelper", "forwarding RuntimeException: " << exceptionToString(exAny) );
+ SAL_WARN("javaunohelper", "forwarding RuntimeException: " << exc );
OString cstr( OUStringToOString(
exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
jni_env->ThrowNew( c, cstr.getStr() );
@@ -160,11 +158,10 @@ jobject Java_com_sun_star_comp_helper_Bootstrap_cppuhelper_1bootstrap(
}
catch (const Exception & exc)
{
- css::uno::Any ex( cppu::getCaughtException() );
jclass c = jni_env->FindClass( "com/sun/star/uno/Exception" );
if (nullptr != c)
{
- SAL_WARN("javaunohelper", "forwarding Exception: " << exceptionToString(ex) );
+ SAL_WARN("javaunohelper", "forwarding Exception: " << exc );
OString cstr( OUStringToOString(
exc.Message, RTL_TEXTENCODING_JAVA_UTF8 ) );
jni_env->ThrowNew( c, cstr.getStr() );
diff --git a/stoc/Library_bootstrap.mk b/stoc/Library_bootstrap.mk
index 49fbafc12a09..3cc57e868d29 100644
--- a/stoc/Library_bootstrap.mk
+++ b/stoc/Library_bootstrap.mk
@@ -32,7 +32,6 @@ $(eval $(call gb_Library_use_libraries,bootstrap,\
reg \
sal \
salhelper \
- tl \
))
$(eval $(call gb_Library_set_componentfile,bootstrap,stoc/util/bootstrap))
diff --git a/stoc/Library_javaloader.mk b/stoc/Library_javaloader.mk
index caf4a1e27df6..f0b11fb4a9dc 100644
--- a/stoc/Library_javaloader.mk
+++ b/stoc/Library_javaloader.mk
@@ -19,7 +19,6 @@ $(eval $(call gb_Library_use_libraries,javaloader,\
jvmaccess \
sal \
salhelper \
- tl \
))
$(eval $(call gb_Library_set_componentfile,javaloader,stoc/source/javaloader/javaloader))
diff --git a/stoc/Library_javavm.mk b/stoc/Library_javavm.mk
index ce5f773ef394..84e29e8556e0 100644
--- a/stoc/Library_javavm.mk
+++ b/stoc/Library_javavm.mk
@@ -21,7 +21,6 @@ $(eval $(call gb_Library_use_libraries,javavm,\
jvmfwk \
sal \
salhelper \
- tl \
))
$(eval $(call gb_Library_set_componentfile,javavm,stoc/source/javavm/javavm))
diff --git a/stoc/source/javaloader/javaloader.cxx b/stoc/source/javaloader/javaloader.cxx
index 73b0ddf557ff..036ea71af93a 100644
--- a/stoc/source/javaloader/javaloader.cxx
+++ b/stoc/source/javaloader/javaloader.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/uno/RuntimeException.hpp>
#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
#include <cppuhelper/exc_hlp.hxx>
-#include <tools/diagnose_ex.h>
#ifdef LINUX
#undef minor
@@ -328,8 +327,10 @@ stoc_JavaComponentLoader_get_implementation(
try {
return cppu::acquire(new JavaComponentLoader(context));
}
- catch(const RuntimeException &) {
- TOOLS_INFO_EXCEPTION("stoc", "could not init javaloader");
+ catch(const RuntimeException & runtimeException) {
+ SAL_INFO(
+ "stoc",
+ "could not init javaloader due to " << runtimeException);
throw;
}
}
diff --git a/stoc/source/javavm/javavm.cxx b/stoc/source/javavm/javavm.cxx
index 8600a23eb759..8d95f71a68a3 100644
--- a/stoc/source/javavm/javavm.cxx
+++ b/stoc/source/javavm/javavm.cxx
@@ -61,7 +61,6 @@
#include <rtl/ustring.hxx>
#include <sal/types.h>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
#include <uno/current_context.hxx>
#include <jvmfwk/framework.hxx>
#include <i18nlangtag/languagetag.hxx>
@@ -423,23 +422,23 @@ void initVMConfiguration(
try {
getINetPropsFromConfig(&jvm, xSMgr, xCtx);
}
- catch(const css::uno::Exception &) {
- TOOLS_INFO_EXCEPTION("stoc", "can not get INETProps");
+ catch(const css::uno::Exception & exception) {
+ SAL_INFO("stoc", "can not get INETProps because of " << exception);
}
try {
getDefaultLocaleFromConfig(&jvm, xSMgr,xCtx);
}
- catch(const css::uno::Exception &) {
- TOOLS_INFO_EXCEPTION("stoc", "can not get locale");
+ catch(const css::uno::Exception & exception) {
+ SAL_INFO("stoc", "can not get locale because of " << exception);
}
try
{
getJavaPropsFromSafetySettings(&jvm, xSMgr, xCtx);
}
- catch(const css::uno::Exception &) {
- TOOLS_INFO_EXCEPTION("stoc", "couldn't get safety settings");
+ catch(const css::uno::Exception & exception) {
+ SAL_INFO("stoc", "couldn't get safety settings because of " << exception);
}
*pjvm= jvm;
@@ -1213,9 +1212,9 @@ void JavaVirtualMachine::registerConfigChangesListener()
if (m_xJavaConfiguration.is())
m_xJavaConfiguration->addContainerListener(this);
}
- }catch(const css::uno::Exception &)
+ }catch(const css::uno::Exception & e)
{
- TOOLS_INFO_EXCEPTION("stoc", "could not set up listener for Configuration");
+ SAL_INFO("stoc", "could not set up listener for Configuration because of >" << e << "<");
}
}
diff --git a/stoc/source/servicemanager/servicemanager.cxx b/stoc/source/servicemanager/servicemanager.cxx
index ba728ba1fa88..1a53ecf97f63 100644
--- a/stoc/source/servicemanager/servicemanager.cxx
+++ b/stoc/source/servicemanager/servicemanager.cxx
@@ -24,7 +24,6 @@
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
-#include <tools/diagnose_ex.h>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/weakref.hxx>
@@ -611,9 +610,9 @@ void OServiceManager::disposing()
if( xComp.is() )
xComp->dispose();
}
- catch (const RuntimeException &)
+ catch (const RuntimeException & exc)
{
- TOOLS_INFO_EXCEPTION("stoc", "RuntimeException occurred upon disposing factory:");
+ SAL_INFO("stoc", "RuntimeException occurred upon disposing factory: " << exc);
}
}
@@ -797,9 +796,9 @@ Reference< XInterface > OServiceManager::createInstanceWithContext(
}
}
}
- catch (const lang::DisposedException &)
+ catch (const lang::DisposedException & exc)
{
- TOOLS_INFO_EXCEPTION("stoc", "");
+ SAL_INFO("stoc", "DisposedException occurred: " << exc);
}
}
@@ -849,9 +848,9 @@ Reference< XInterface > OServiceManager::createInstanceWithArgumentsAndContext(
}
}
}
- catch (const lang::DisposedException &)
+ catch (const lang::DisposedException & exc)
{
- TOOLS_INFO_EXCEPTION("stoc", "DisposedException occurred:");
+ SAL_INFO("stoc", "DisposedException occurred: " << exc);
}
}
--
2.40.1

View File

@ -1,53 +0,0 @@
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

View File

@ -1,64 +0,0 @@
From acca5c87e73255db350a02d13bf34a62efaf9c93 Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 21 Apr 2020 14:07:24 +0200
Subject: [PATCH] Flatpak: Add /app/bin/libreoffice ->
/app/libreoffice/program/soffice symlink
Which removes the need to rewrite the
Exec=${UNIXBASISROOTNAME}
lines from sysui/desktop/menus/*.desktop, and helps to harmonize the plain
Flatpak build with the one done from Fedora RPMs (see
<https://src.fedoraproject.org/flatpaks/libreoffice>).
(Also change the manifest command from an absolute path to a filename relative
to PATH. It is not clear to me which one would be better or more conventional,
but at least <https://docs.flatpak.org/en/latest/manifests.html> also uses just
a filename in its example.)
Change-Id: I69c380b84503bf3d85801093fb92567852ceb00b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92837
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
---
solenv/bin/assemble-flatpak.sh | 4 ++--
solenv/flatpak-manifest.in | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index b4bce2d4d172..0738fcd59ad2 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -14,13 +14,13 @@
set -e
cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
+ln -s /app/libreoffice/program/soffice /app/bin/libreoffice
## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
mkdir -p /app/share/applications
for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop
do
- sed -e 's,^Exec=libreoffice,Exec=/app/libreoffice/program/soffice,' \
- -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
+ sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
>/app/share/applications/org.libreoffice.LibreOffice."${i#"${PREFIXDIR?}"/share/applications/libreoffice-}"
done
mv /app/share/applications/org.libreoffice.LibreOffice.startcenter.desktop \
diff --git a/solenv/flatpak-manifest.in b/solenv/flatpak-manifest.in
index 9f64a142dd68..754b6b6dbbe1 100644
--- a/solenv/flatpak-manifest.in
+++ b/solenv/flatpak-manifest.in
@@ -6,7 +6,7 @@
"sdk-extensions": [
"org.freedesktop.Sdk.Extension.openjdk11"
],
- "command": "/app/libreoffice/program/soffice",
+ "command": "libreoffice",
"modules": [
{
"name": "openjdk",
--
2.26.0

File diff suppressed because one or more lines are too long

View File

@ -1,77 +0,0 @@
From d6bfde52b0b51e96075cfb195c2f9d8200a0fb08 Mon Sep 17 00:00:00 2001
From: Eike Rathke <erack@redhat.com>
Date: Thu, 16 Feb 2023 20:20:31 +0100
Subject: [PATCH 1/3] Obtain actual 0-parameter count for OR(), AND() and
1-parameter functions
OR and AND for legacy infix notation are classified as binary
operators but in fact are functions with parameter count. In case
no argument is supplied, GetByte() returns 0 and for that case the
implicit binary operator 2 parameters were wrongly assumed.
Similar for functions expecting 1 parameter, without argument 1
was assumed. For "real" unary and binary operators the compiler
already checks parameters. Omit OR and AND and 1-parameter
functions from this implicit assumption and return the actual 0
count.
Change-Id: Ie05398c112a98021ac2875cf7b6de994aee9d882
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147173
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
(cherry picked from commit e7ce9bddadb2db222eaa5f594ef1de2e36d57e5c)
---
formula/source/core/api/token.cxx | 13 +++++--------
sc/source/core/tool/interpr4.cxx | 10 +++++++++-
2 files changed, 14 insertions(+), 9 deletions(-)
diff --git a/formula/source/core/api/token.cxx b/formula/source/core/api/token.cxx
index 37dd26979ced..c2b12cf3a145 100644
--- a/formula/source/core/api/token.cxx
+++ b/formula/source/core/api/token.cxx
@@ -93,17 +93,14 @@ sal_uInt8 FormulaToken::GetParamCount() const
return 0; // parameters and specials
// ocIf... jump commands not for FAP, have cByte then
//2do: bool parameter whether FAP or not?
- else if ( GetByte() )
+ else if (GetByte())
return GetByte(); // all functions, also ocExternal and ocMacro
- else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP)
- return 2; // binary
- else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP)
- || eOp == ocPercentSign)
- return 1; // unary
+ else if (SC_OPCODE_START_BIN_OP <= eOp && eOp < SC_OPCODE_STOP_BIN_OP && eOp != ocAnd && eOp != ocOr)
+ return 2; // binary operators, compiler checked; OR and AND legacy but are functions
+ else if ((SC_OPCODE_START_UN_OP <= eOp && eOp < SC_OPCODE_STOP_UN_OP) || eOp == ocPercentSign)
+ return 1; // unary operators, compiler checked
else if (SC_OPCODE_START_NO_PAR <= eOp && eOp < SC_OPCODE_STOP_NO_PAR)
return 0; // no parameter
- else if (SC_OPCODE_START_1_PAR <= eOp && eOp < SC_OPCODE_STOP_1_PAR)
- return 1; // one parameter
else if (FormulaCompiler::IsOpCodeJumpCommand( eOp ))
return 1; // only the condition counts as parameter
else
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index b9d34cd080a6..d5d8588fe49a 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -4022,7 +4022,15 @@ StackVar ScInterpreter::Interpret()
else if (sp >= pCur->GetParamCount())
nStackBase = sp - pCur->GetParamCount();
else
- nStackBase = sp; // underflow?!?
+ {
+ SAL_WARN("sc.core", "Stack anomaly at " << aPos.Format(
+ ScRefFlags::VALID | ScRefFlags::FORCE_DOC | ScRefFlags::TAB_3D, &mrDoc)
+ << " eOp: " << static_cast<int>(eOp)
+ << " params: " << static_cast<int>(pCur->GetParamCount())
+ << " nStackBase: " << nStackBase << " sp: " << sp);
+ nStackBase = sp;
+ assert(!"underflow");
+ }
}
switch( eOp )
--
2.41.0

File diff suppressed because it is too large Load Diff

View File

@ -1,162 +0,0 @@
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

View File

@ -1,26 +0,0 @@
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

View File

@ -1,51 +0,0 @@
From 1dbfd248524789efa4a84dc94d56a229c19bc0b9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Wed, 4 May 2022 11:52:58 +0100
Subject: [PATCH] Resolves: rhbz#2081661 gtk-critical
gtk_tree_view_scroll_to_cell assertion
Change-Id: I4c7c4caed907072ef3a73ccfafabe882d618fa0e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133730
Tested-by: Jenkins
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
(cherry picked from commit 816435e4c2d52615462670464c48689bebdf1e55)
---
cui/source/customize/SvxMenuConfigPage.cxx | 2 +-
cui/source/customize/SvxToolbarConfigPage.cxx | 6 ++++--
2 files changed, 5 insertions(+), 3 deletions(-)
diff --git a/cui/source/customize/SvxMenuConfigPage.cxx b/cui/source/customize/SvxMenuConfigPage.cxx
index 34cee1368d7a..bf7457193f5c 100644
--- a/cui/source/customize/SvxMenuConfigPage.cxx
+++ b/cui/source/customize/SvxMenuConfigPage.cxx
@@ -136,7 +136,7 @@ void SvxMenuConfigPage::Init()
ReloadTopLevelListBox();
- m_xTopLevelListBox->set_active(0);
+ m_xTopLevelListBox->set_active(m_xTopLevelListBox->get_count() ? 0 : -1);
SelectElement();
m_xCommandCategoryListBox->Init(comphelper::getProcessComponentContext(), m_xFrame,
diff --git a/cui/source/customize/SvxToolbarConfigPage.cxx b/cui/source/customize/SvxToolbarConfigPage.cxx
index 99a85d82f96e..d2284428d8f1 100644
--- a/cui/source/customize/SvxToolbarConfigPage.cxx
+++ b/cui/source/customize/SvxToolbarConfigPage.cxx
@@ -246,10 +246,12 @@ void SvxToolbarConfigPage::Init()
ReloadTopLevelListBox();
- sal_Int32 nPos = 0;
+ sal_Int32 nCount = m_xTopLevelListBox->get_count();
+ sal_Int32 nPos = nCount > 0 ? 0 : -1;
+
if (!m_aURLToSelect.isEmpty())
{
- for (sal_Int32 i = 0, nCount = m_xTopLevelListBox->get_count(); i < nCount; ++i)
+ for (sal_Int32 i = 0; i < nCount; ++i)
{
SvxConfigEntry* pData
= reinterpret_cast<SvxConfigEntry*>(m_xTopLevelListBox->get_id(i).toInt64());
--
2.35.1

View File

@ -1,123 +0,0 @@
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

View File

@ -1,63 +0,0 @@
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

View File

@ -1,340 +0,0 @@
From 54f42e1b75dd795f9d53dce181397f114eeae21b Mon Sep 17 00:00:00 2001
From: Stephan Bergmann <sbergman@redhat.com>
Date: Tue, 28 Apr 2020 16:43:31 +0200
Subject: [PATCH] Restructure solenv/bin/assemble-flatpak.sh
...so that parts of it can be reused by the Flatpak build done from Fedora RPMs
(see <https://src.fedoraproject.org/flatpaks/libreoffice>). The reused parts
are split out into solenv/bin/assemble-flatpak-*.sh files.
(I can't remember any specific reason why I added the <releases> section to the
Flathub org.libreoffice.LibreOffice.appdata.xml; maybe just because the file
format allows for it and it appeared easy to generate the section when writing
the file. For the Fedora LO RPMs, none of the existing appdata.xml files
contained such a section, and generating one for the Fedora Flatpak case would
require obtaining values for those LIBO_VERSION_* variables, so I just added a
switch to solenv/bin/assemble-flatpak-appdata-step1.sh allowing not to write
that section at all. Splitting solenv/bin/assemble-flatpak-appdata.sh in two
steps is necessary because the Fedora Flatpak case wants to replace the
screenshots in the first part of the generated
org.libreoffice.LibreOffice.appdata.xml, but not in the appended original
appdata.xml files, so needs to hook in between those two steps.)
Change-Id: Ic527f3d88ccbee85e86dad3569b8e73776adf273
---
solenv/bin/assemble-flatpak-appdata-step1.sh | 96 +++++++++++++++++
solenv/bin/assemble-flatpak-appdata-step2.sh | 26 +++++
solenv/bin/assemble-flatpak-desktop.sh | 42 ++++++++
solenv/bin/assemble-flatpak.sh | 102 +------------------
4 files changed, 169 insertions(+), 97 deletions(-)
create mode 100755 solenv/bin/assemble-flatpak-appdata-step1.sh
create mode 100755 solenv/bin/assemble-flatpak-appdata-step2.sh
create mode 100755 solenv/bin/assemble-flatpak-desktop.sh
diff --git a/solenv/bin/assemble-flatpak-appdata-step1.sh b/solenv/bin/assemble-flatpak-appdata-step1.sh
new file mode 100755
index 000000000000..4658dd45d018
--- /dev/null
+++ b/solenv/bin/assemble-flatpak-appdata-step1.sh
@@ -0,0 +1,96 @@
+#! /bin/bash
+#
+# 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/.
+#
+
+# Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
+# Flatpak from a Fedora libreoffice.spec file.
+#
+# Arguments:
+# $1 pathname, ending in a slash, of the directory into which to put the target
+# org.libreoffice.LibreOffice.appdata.xml file
+# $2 "1" if a <releases> section shall be included in the target
+# org.libreoffice.LibreOffice.appdata.xml file, "0" if not
+
+set -e
+
+## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various
+## inst/share/appdata/libreoffice-*.appdata.xml (at least recent GNOME Software
+## doesn't show more than five screenshots anyway, so restrict to one each from
+## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base):
+cat <<\EOF >"${1?}"org.libreoffice.LibreOffice.appdata.xml
+<?xml version="1.0" encoding="UTF-8"?>
+<component type="desktop">
+ <id>org.libreoffice.LibreOffice.desktop</id>
+ <metadata_license>CC0-1.0</metadata_license>
+ <project_license>MPL-2.0</project_license>
+ <name>LibreOffice</name>
+ <summary>The LibreOffice productivity suite</summary>
+ <description>
+ <p>LibreOffice is a powerful office suite. Its clean interface and
+ feature-rich tools help you unleash your creativity and enhance your
+ productivity. LibreOffice includes several applications that make it the most
+ powerful Free and Open Source office suite on the market: Writer (word
+ processing), Calc (spreadsheets), Impress (presentations), Draw (vector
+ graphics and flowcharts), Base (databases), and Math (formula editing).</p>
+ <p>LibreOffice supports opening and saving into a wide variety of formats, so
+ you can easily share documents with users of other popular office suites
+ without worrying about compatibility.</p>
+ </description>
+ <url type="homepage">http://www.libreoffice.org/discover/libreoffice/</url>
+ <url type="bugtracker">https://bugs.documentfoundation.org/</url>
+ <url type="donation">https://donate.libreoffice.org/</url>
+ <url type="faq">https://wiki.documentfoundation.org/Faq</url>
+ <url type="help">http://www.libreoffice.org/get-help/documentation/</url>
+ <url type="translate">https://wiki.documentfoundation.org/Translating_LibreOffice</url>
+ <screenshots>
+ <screenshot type="default">
+ <image>https://hub.libreoffice.org/screenshots/writer-01.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/calc-02.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/impress-01.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/draw-02.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ <screenshot>
+ <image>https://hub.libreoffice.org/screenshots/base-02.png</image>
+ <caption><!-- Describe this screenshot in less than ~10 words --></caption>
+ </screenshot>
+ </screenshots>
+ <developer_name>The Document Foundation</developer_name>
+ <update_contact>libreoffice_at_lists.freedesktop.org</update_contact>
+ <kudos>
+ <kudo>HiDpiIcon</kudo>
+ <kudo>HighContrast</kudo>
+ <kudo>ModernToolkit</kudo>
+ <kudo>UserDocs</kudo>
+ </kudos>
+ <content_rating type="oars-1.0"/>
+EOF
+
+if [ "${2?}" = 1 ]
+then
+ cat <<EOF >>"${1?}"org.libreoffice.LibreOffice.appdata.xml
+ <releases>
+ <release
+ version="${LIBO_VERSION_MAJOR?}.${LIBO_VERSION_MINOR?}.${LIBO_VERSION_MICRO?}.${LIBO_VERSION_PATCH?}"
+ date="$(date +%Y-%m-%d)"/>
+ </releases>
+EOF
+fi
+
+cat <<\EOF >>"${1?}"org.libreoffice.LibreOffice.appdata.xml
+</component>
+EOF
diff --git a/solenv/bin/assemble-flatpak-appdata-step2.sh b/solenv/bin/assemble-flatpak-appdata-step2.sh
new file mode 100755
index 000000000000..4f06e6b19148
--- /dev/null
+++ b/solenv/bin/assemble-flatpak-appdata-step2.sh
@@ -0,0 +1,26 @@
+#! /bin/bash
+#
+# 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/.
+#
+
+# Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
+# Flatpak from a Fedora libreoffice.spec file.
+#
+# Arguments:
+# $1 pathname, ending in a slash, of the directory containing the source libreoffice-*.appdata.xml
+# files
+# $2 pathname, ending in a slash, of the directory containing the target
+# org.libreoffice.LibreOffice.appdata.xml file
+
+set -e
+
+# append the appdata for the different components
+for i in "${1?}"libreoffice-*.appdata.xml
+do
+ sed "1 d; s/<id>libreoffice-/<id>org.libreoffice.LibreOffice./" "$i" \
+ >>"${2?}"org.libreoffice.LibreOffice.appdata.xml
+done
diff --git a/solenv/bin/assemble-flatpak-desktop.sh b/solenv/bin/assemble-flatpak-desktop.sh
new file mode 100755
index 000000000000..6d06de4fbbbe
--- /dev/null
+++ b/solenv/bin/assemble-flatpak-desktop.sh
@@ -0,0 +1,42 @@
+#! /bin/bash
+#
+# 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/.
+#
+
+# Part of solenv/bin/assemble-flatpak.sh that is shared with a downstream mechanism of building a
+# Flatpak from a Fedora libreoffice.spec file.
+#
+# Arguments:
+# $1 pathname, ending in a slash, of the directory containing the source libreoffice-*.desktop
+# files
+# $2 pathname, ending in a slash, of the directory into which to put the target
+# org.libreoffice.LibreOffice.*.desktop files
+
+set -e
+
+## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
+for i in "${1?}"libreoffice-*.desktop
+do
+ sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
+ >"${2?}"org.libreoffice.LibreOffice."${i#"${1?}"libreoffice-}"
+done
+mv "${2?}"org.libreoffice.LibreOffice.startcenter.desktop "${2?}"org.libreoffice.LibreOffice.desktop
+
+# Flatpak .desktop exports take precedence over system ones due to
+# the order of XDG_DATA_DIRS - re-associating text/plain seems a bit much
+sed -i "s/text\/plain;//" "${2?}"org.libreoffice.LibreOffice.writer.desktop
+
+desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-startcenter \
+ --set-key=X-Flatpak-RenamedFrom --set-value='libreoffice-startcenter.desktop;' \
+ "${2?}"org.libreoffice.LibreOffice.desktop
+for i in base calc draw impress math writer xsltfilter
+do
+ desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-"$i" \
+ --set-key=X-Flatpak-RenamedFrom \
+ --set-value="libreoffice-$i.desktop;org.libreoffice.LibreOffice-$i.desktop;" \
+ "${2?}"org.libreoffice.LibreOffice."$i".desktop
+done
diff --git a/solenv/bin/assemble-flatpak.sh b/solenv/bin/assemble-flatpak.sh
index 0738fcd59ad2..8ca5bcf08c41 100755
--- a/solenv/bin/assemble-flatpak.sh
+++ b/solenv/bin/assemble-flatpak.sh
@@ -16,30 +16,9 @@ set -e
cp -r "${PREFIXDIR?}"/lib/libreoffice /app/
ln -s /app/libreoffice/program/soffice /app/bin/libreoffice
-## libreoffice-*.desktop -> org.libreoffice.LibreOffice.*.desktop:
mkdir -p /app/share/applications
-for i in "${PREFIXDIR?}"/share/applications/libreoffice-*.desktop
-do
- sed -e 's/^Icon=libreoffice-/Icon=org.libreoffice.LibreOffice./' "$i" \
- >/app/share/applications/org.libreoffice.LibreOffice."${i#"${PREFIXDIR?}"/share/applications/libreoffice-}"
-done
-mv /app/share/applications/org.libreoffice.LibreOffice.startcenter.desktop \
- /app/share/applications/org.libreoffice.LibreOffice.desktop
-
-# Flatpak .desktop exports take precedence over system ones due to
-# the order of XDG_DATA_DIRS - re-associating text/plain seems a bit much
-sed -i "s/text\/plain;//" /app/share/applications/org.libreoffice.LibreOffice.writer.desktop
-
-desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-startcenter \
- --set-key=X-Flatpak-RenamedFrom --set-value='libreoffice-startcenter.desktop;' \
- /app/share/applications/org.libreoffice.LibreOffice.desktop
-for i in base calc draw impress math writer xsltfilter
-do
- desktop-file-edit --set-key=X-Endless-Alias --set-value=libreoffice-"$i" \
- --set-key=X-Flatpak-RenamedFrom \
- --set-value="libreoffice-$i.desktop;org.libreoffice.LibreOffice-$i.desktop;" \
- /app/share/applications/org.libreoffice.LibreOffice."$i".desktop
-done
+"${SRCDIR?}"/solenv/bin/assemble-flatpak-desktop.sh "${PREFIXDIR?}"/share/applications/ \
+ /app/share/applications/
## icons/hicolor/*/apps/libreoffice-* ->
## icons/hicolor/*/apps/org.libreoffice.LibreOffice-*:
@@ -82,81 +61,10 @@ do
ln -rs /app/share/runtime/locale/"${lang}"/registry/"${basename}".xcd "${i}"
done
-## org.libreoffice.LibreOffice.appdata.xml is manually derived from the various
-## inst/share/appdata/libreoffice-*.appdata.xml (at least recent GNOME Software
-## doesn't show more than five screenshots anyway, so restrict to one each from
-## the five libreoffice-*.appdata.xml: Writer, Calc, Impress, Draw, Base):
mkdir -p /app/share/appdata
-cat <<EOF >/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
-<?xml version="1.0" encoding="UTF-8"?>
-<component type="desktop">
- <id>org.libreoffice.LibreOffice.desktop</id>
- <metadata_license>CC0-1.0</metadata_license>
- <project_license>MPL-2.0</project_license>
- <name>LibreOffice</name>
- <summary>The LibreOffice productivity suite</summary>
- <description>
- <p>LibreOffice is a powerful office suite. Its clean interface and
- feature-rich tools help you unleash your creativity and enhance your
- productivity. LibreOffice includes several applications that make it the most
- powerful Free and Open Source office suite on the market: Writer (word
- processing), Calc (spreadsheets), Impress (presentations), Draw (vector
- graphics and flowcharts), Base (databases), and Math (formula editing).</p>
- <p>LibreOffice supports opening and saving into a wide variety of formats, so
- you can easily share documents with users of other popular office suites
- without worrying about compatibility.</p>
- </description>
- <url type="homepage">http://www.libreoffice.org/discover/libreoffice/</url>
- <url type="bugtracker">https://bugs.documentfoundation.org/</url>
- <url type="donation">https://donate.libreoffice.org/</url>
- <url type="faq">https://wiki.documentfoundation.org/Faq</url>
- <url type="help">http://www.libreoffice.org/get-help/documentation/</url>
- <url type="translate">https://wiki.documentfoundation.org/Translating_LibreOffice</url>
- <screenshots>
- <screenshot type="default">
- <image>https://hub.libreoffice.org/screenshots/writer-01.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/calc-02.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/impress-01.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/draw-02.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- <screenshot>
- <image>https://hub.libreoffice.org/screenshots/base-02.png</image>
- <caption><!-- Describe this screenshot in less than ~10 words --></caption>
- </screenshot>
- </screenshots>
- <developer_name>The Document Foundation</developer_name>
- <update_contact>libreoffice_at_lists.freedesktop.org</update_contact>
- <kudos>
- <kudo>HiDpiIcon</kudo>
- <kudo>HighContrast</kudo>
- <kudo>ModernToolkit</kudo>
- <kudo>UserDocs</kudo>
- </kudos>
- <content_rating type="oars-1.0"/>
- <releases>
- <release
- version="${LIBO_VERSION_MAJOR?}.${LIBO_VERSION_MINOR?}.${LIBO_VERSION_MICRO?}.${LIBO_VERSION_PATCH?}"
- date="$(date +%Y-%m-%d)"/>
- </releases>
-</component>
-EOF
-
-# append the appdata for the different components
-for i in "${PREFIXDIR?}"/share/appdata/libreoffice-*.appdata.xml
-do
- sed "1 d; s/<id>libreoffice-/<id>org.libreoffice.LibreOffice./" "$i" \
- >>/app/share/appdata/org.libreoffice.LibreOffice.appdata.xml
-done
+"${SRCDIR?}"/solenv/bin/assemble-flatpak-appdata-step1.sh /app/share/appdata/ 1
+"${SRCDIR?}"/solenv/bin/assemble-flatpak-appdata-step2.sh "${PREFIXDIR?}"/share/appdata/ \
+ /app/share/appdata/
## see <https://github.com/flatpak/flatpak/blob/master/app/
## flatpak-builtins-build-finish.c> for further places where build-finish would
--
2.26.2

3
README.md Normal file
View File

@ -0,0 +1,3 @@
# Package Not Available
This package is not available on CentOS Stream 10.
It may be available on another branch.

1
dead.package Normal file
View File

@ -0,0 +1 @@
libreoffice package is retired on branch c10s for CS-2551