Files
haikuports/app-office/libreoffice/patches/libreoffice-7.1.0.1.patchset
2020-12-20 00:14:39 +10:00

429 lines
15 KiB
Plaintext

From ee874677eaa71820bf956457cf784a6a565e3aa9 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sat, 15 Feb 2020 14:52:59 +0300
Subject: Make Elementary the default on Haiku
diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx
index 253242b..6b55799 100644
--- a/vcl/source/app/IconThemeSelector.cxx
+++ b/vcl/source/app/IconThemeSelector.cxx
@@ -56,6 +56,9 @@ IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvi
#ifdef _WIN32
(void)desktopEnvironment;
return "colibre";
+#elif defined(__HAIKU__)
+ (void)desktopEnvironment;
+ return "elementary";
#else
OUString r;
if ( desktopEnvironment.equalsIgnoreAsciiCase("plasma5") ||
--
2.28.0
From 514e76265d070f605635eae7f1177ab7a7c24370 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 7 Aug 2020 12:14:40 +0300
Subject: Show used vcl backend in About window on Haiku
diff --git a/vcl/source/app/svapp.cxx b/vcl/source/app/svapp.cxx
index f91375e..7c7b20d 100644
--- a/vcl/source/app/svapp.cxx
+++ b/vcl/source/app/svapp.cxx
@@ -1178,7 +1178,7 @@ OUString Application::GetHWOSConfInfo(const int bSelection, const bool bLocalize
#endif
appendDetails(u"", Localize(SV_APP_DEFAULT, bLocalize));
-#if (defined LINUX || defined _WIN32 || defined MACOSX || defined __FreeBSD__)
+#if (defined LINUX || defined _WIN32 || defined MACOSX || defined __FreeBSD__ || defined __HAIKU__)
appendDetails(u"; ", SV_APP_VCLBACKEND + GetToolkitName());
#endif
}
--
2.28.0
From d092099634c878d9cb1f43b7ac02a5469e242a1f Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Wed, 24 Oct 2018 17:01:34 +0300
Subject: Identify Haiku in about window
diff --git a/vcl/unx/generic/app/geninst.cxx b/vcl/unx/generic/app/geninst.cxx
index 0093f64..3b5e402 100644
--- a/vcl/unx/generic/app/geninst.cxx
+++ b/vcl/unx/generic/app/geninst.cxx
@@ -89,6 +89,8 @@ OUString SalGenericInstance::getOSVersion()
}
return OUString::createFromAscii( stName.sysname ) + " " +
aKernelVer.copy( 0, nIndex );
+#elif defined(__HAIKU__)
+ aKernelVer = "Haiku";
#else
return aKernelVer;
#endif
--
2.28.0
From a50bf602c65013295a39e3f62cd16a225be5b84c Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sat, 15 Feb 2020 15:04:53 +0300
Subject: Implement ShellExec on Haiku
diff --git a/shell/source/unix/exec/shellexec.cxx b/shell/source/unix/exec/shellexec.cxx
index bbd614a..d0e97ad 100644
--- a/shell/source/unix/exec/shellexec.cxx
+++ b/shell/source/unix/exec/shellexec.cxx
@@ -170,6 +170,9 @@ void SAL_CALL ShellExec::execute( const OUString& aCommand, const OUString& aPar
aBuffer.append(" -R");
}
aBuffer.append(" --");
+
+#elif __HAIKU__
+ aBuffer.append("open");
#else
// Just use xdg-open on non-Mac
aBuffer.append("/usr/bin/xdg-open");
--
2.28.0
From fa591ab690036fd7319c46a3fa45f14025fa7613 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Sat, 20 Jul 2019 01:18:50 +0300
Subject: Comment out linking with pthread
diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk
index 7ef9d0b..45e28ba 100644
--- a/solenv/gbuild/platform/unxgcc.mk
+++ b/solenv/gbuild/platform/unxgcc.mk
@@ -45,9 +45,9 @@ gb_CFLAGS := \
# At least libstdc++ (which is approximated here with !HAVE_LIBCXX) needs -pthread when including
# various C++ headers like <thread>, see <https://gcc.gnu.org/onlinedocs/gcc-8.3.0/libstdc++/manual/
# manual/using.html#manual.intro.using.flags>:
-ifeq ($(HAVE_LIBCXX),)
-gb_CXX_LINKFLAGS := -pthread
-endif
+#ifeq ($(HAVE_LIBCXX),)
+#gb_CXX_LINKFLAGS := -pthread
+#endif
gb_CXXFLAGS := \
$(gb_CXXFLAGS_COMMON) \
--
2.28.0
From ef314c710980ab68109ca80e1f0bd97958998492 Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 11 Aug 2019 11:46:49 +1000
Subject: Workaround for ambiguous methods
diff --git a/include/o3tl/sorted_vector.hxx b/include/o3tl/sorted_vector.hxx
index 508fe61..bc612a7 100644
--- a/include/o3tl/sorted_vector.hxx
+++ b/include/o3tl/sorted_vector.hxx
@@ -94,6 +94,17 @@ public:
return 0;
}
+ size_type erase2( const Value& x )
+ {
+ std::pair<const_iterator, bool> const ret(Find_t()(m_vector.begin(), m_vector.end(), x));
+ if (ret.second)
+ {
+ m_vector.erase(m_vector.begin() + (ret.first - m_vector.begin()));
+ return 1;
+ }
+ return 0;
+ }
+
void erase( size_t index )
{
m_vector.erase(m_vector.begin() + index);
diff --git a/sc/source/core/data/attarray.cxx b/sc/source/core/data/attarray.cxx
index c9fd303..b2d15ef 100644
--- a/sc/source/core/data/attarray.cxx
+++ b/sc/source/core/data/attarray.cxx
@@ -375,7 +375,7 @@ void ScAttrArray::RemoveCondFormat( SCROW nStartRow, SCROW nEndRow, sal_uInt32 n
if(itr != rCondFormatData.end())
{
ScCondFormatIndexes aNewCondFormatData(rCondFormatData);
- aNewCondFormatData.erase(nIndex);
+ aNewCondFormatData.erase2(nIndex);
ScCondFormatItem aItem( std::move(aNewCondFormatData) );
pPatternAttr->GetItemSet().Put( aItem );
SetPatternArea( nTempStartRow, nTempEndRow, std::move(pPatternAttr), true );
--
2.28.0
From c8a5436bde765898615dec46b63e7e1771531efc Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sun, 11 Aug 2019 11:47:40 +1000
Subject: Add XP_HAIKU defs for xmlsec
diff --git a/svl/Library_svl.mk b/svl/Library_svl.mk
index 291e255..3a26883 100644
--- a/svl/Library_svl.mk
+++ b/svl/Library_svl.mk
@@ -96,6 +96,12 @@ $(eval $(call gb_Library_use_system_win32_libs,svl,\
shlwapi \
))
+ifeq ($(OS),HAIKU)
+$(eval $(call gb_Library_add_defs,svl,\
+ -DXP_HAIKU=1 \
+))
+endif
+
ifeq ($(OS),WNT)
$(eval $(call gb_Library_add_defs,svl,\
-DSVL_CRYPTO_MSCRYPTO \
diff --git a/xmlsecurity/Library_xsec_xmlsec.mk b/xmlsecurity/Library_xsec_xmlsec.mk
index bd2cb6a..9d6a90c 100644
--- a/xmlsecurity/Library_xsec_xmlsec.mk
+++ b/xmlsecurity/Library_xsec_xmlsec.mk
@@ -116,6 +116,12 @@ $(eval $(call gb_Library_add_defs,xsec_xmlsec,\
-DXMLSEC_CRYPTO_NSS \
))
+ifeq ($(OS),HAIKU)
+$(eval $(call gb_Library_add_defs,xsec_xmlsec,\
+ -DXP_HAIKU=1 \
+))
+endif
+
ifeq ($(SYSTEM_XMLSEC),)
$(eval $(call gb_Library_add_libs,xsec_xmlsec,\
$(call gb_UnpackedTarball_get_dir,xmlsec)/src/nss/.libs/libxmlsec1-nss.a \
--
2.28.0
From c5bb7e4cfcbf4f23cecee6ac4282936c492db5ad Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Fri, 7 Aug 2020 12:37:45 +0300
Subject: Cast to boolean
diff --git a/vcl/source/filter/jpeg/jpegc.cxx b/vcl/source/filter/jpeg/jpegc.cxx
index 8807927..c570173 100644
--- a/vcl/source/filter/jpeg/jpegc.cxx
+++ b/vcl/source/filter/jpeg/jpegc.cxx
@@ -172,13 +172,13 @@ static void ReadJPEG(JpegStuff& rContext, JPEGReader* pJPEGReader, void* pInputS
rContext.aOwner.set(&rContext.cinfo);
jpeg_svstream_src(&rContext.cinfo, pInputStream);
SourceManagerStruct *source = reinterpret_cast<SourceManagerStruct*>(rContext.cinfo.src);
- jpeg_read_header(&rContext.cinfo, TRUE);
+ jpeg_read_header(&rContext.cinfo, static_cast<boolean>(TRUE));
rContext.cinfo.scale_num = 1;
rContext.cinfo.scale_denom = 1;
rContext.cinfo.output_gamma = 1.0;
- rContext.cinfo.raw_data_out = FALSE;
- rContext.cinfo.quantize_colors = FALSE;
+ rContext.cinfo.raw_data_out = static_cast<boolean>(FALSE);
+ rContext.cinfo.quantize_colors = static_cast<boolean>(FALSE);
jpeg_calc_output_dimensions(&rContext.cinfo);
@@ -372,7 +372,7 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
}
jpeg_set_defaults( &cinfo );
- jpeg_set_quality( &cinfo, static_cast<int>(nQualityPercent), FALSE );
+ jpeg_set_quality( &cinfo, static_cast<int>(nQualityPercent), static_cast<boolean>(FALSE) );
if (o3tl::convertsToAtMost(rPPI.getX(), 65535) && o3tl::convertsToAtMost(rPPI.getY(), 65535))
{
@@ -404,7 +404,7 @@ bool WriteJPEG( JPEGWriter* pJPEGWriter, void* pOutputStream,
cinfo.comp_info[0].v_samp_factor = 2;
}
- jpeg_start_compress( &cinfo, TRUE );
+ jpeg_start_compress( &cinfo, static_cast<boolean>(TRUE) );
for( nY = 0; nY < nHeight; nY++ )
{
@@ -439,10 +439,10 @@ void Transform(void* pInputStream, void* pOutputStream, Degree10 nAngle)
jvirt_barray_ptr* aSourceCoefArrays = nullptr;
jvirt_barray_ptr* aDestinationCoefArrays = nullptr;
- aTransformOption.force_grayscale = FALSE;
- aTransformOption.trim = FALSE;
- aTransformOption.perfect = FALSE;
- aTransformOption.crop = FALSE;
+ aTransformOption.force_grayscale = static_cast<boolean>(FALSE);
+ aTransformOption.trim = static_cast<boolean>(FALSE);
+ aTransformOption.perfect = static_cast<boolean>(FALSE);
+ aTransformOption.crop = static_cast<boolean>(FALSE);
// Angle to transform option
// 90 Clockwise = 270 Counterclockwise
@@ -471,7 +471,7 @@ void Transform(void* pInputStream, void* pOutputStream, Degree10 nAngle)
aDestinationInfo.err->error_exit = errorExit;
aDestinationInfo.err->output_message = outputMessage;
- aDestinationInfo.optimize_coding = TRUE;
+ aDestinationInfo.optimize_coding = static_cast<boolean>(TRUE);
JpegDecompressOwner aDecompressOwner;
JpegCompressOwner aCompressOwner;
@@ -497,7 +497,7 @@ void Transform(void* pInputStream, void* pOutputStream, Degree10 nAngle)
jpeg_svstream_src (&aSourceInfo, pInputStream);
jcopy_markers_setup(&aSourceInfo, aCopyOption);
- jpeg_read_header(&aSourceInfo, TRUE);
+ jpeg_read_header(&aSourceInfo, static_cast<boolean>(TRUE));
jtransform_request_workspace(&aSourceInfo, &aTransformOption);
aSourceCoefArrays = jpeg_read_coefficients(&aSourceInfo);
@@ -507,7 +507,7 @@ void Transform(void* pInputStream, void* pOutputStream, Degree10 nAngle)
jpeg_svstream_dest (&aDestinationInfo, pOutputStream);
// Compute optimal Huffman coding tables instead of precomputed tables
- aDestinationInfo.optimize_coding = TRUE;
+ aDestinationInfo.optimize_coding = static_cast<boolean>(TRUE);
jpeg_write_coefficients(&aDestinationInfo, aDestinationCoefArrays);
jcopy_markers_execute(&aSourceInfo, &aDestinationInfo, aCopyOption);
jtransform_execute_transformation(&aSourceInfo, &aDestinationInfo, aSourceCoefArrays, &aTransformOption);
--
2.28.0
From 60d14097ac288a4b99bd1c4f439ad022be6593a6 Mon Sep 17 00:00:00 2001
From: Sergei Reznikov <diver@gelios.net>
Date: Fri, 7 Aug 2020 12:47:56 +0300
Subject: Revert fstack-protector check removal in
9db11a8ab648f4d04e59e6bb94cd640f64835447
diff --git a/config_host.mk.in b/config_host.mk.in
index 42f4511..ee29da2 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -264,6 +264,7 @@ export HAMCREST_JAR=@HAMCREST_JAR@
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_GCC_AVX=@HAVE_GCC_AVX@
+export HAVE_GCC_STACK_PROTECTOR_STRONG=@HAVE_GCC_STACK_PROTECTOR_STRONG@
export HAVE_GCC_BUILTIN_ATOMIC=@HAVE_GCC_BUILTIN_ATOMIC@
export HAVE_GCC_FNO_ENFORCE_EH_SPECS=@HAVE_GCC_FNO_ENFORCE_EH_SPECS@
export HAVE_GCC_FNO_SIZED_DEALLOCATION=@HAVE_GCC_FNO_SIZED_DEALLOCATION@
diff --git a/configure.ac b/configure.ac
index 05ebfbb..4fc0564 100644
--- a/configure.ac
+++ b/configure.ac
@@ -6843,6 +6843,17 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
AC_MSG_RESULT([no])
fi
+ AC_MSG_CHECKING([whether $CC_BASE supports -fstack-protector-strong])
+ save_CFLAGS=$CFLAGS
+ CFLAGS="$CFLAGS -O0 -Werror -fstack-protector-strong"
+ AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ char a[8]; a[7] = 0; ]])],[ HAVE_GCC_STACK_PROTECTOR_STRONG=TRUE ],[])
+ CFLAGS=$save_CFLAGS
+ if test "$HAVE_GCC_STACK_PROTECTOR_STRONG" = "TRUE"; then
+ AC_MSG_RESULT([yes])
+ else
+ AC_MSG_RESULT([no])
+ fi
+
AC_MSG_CHECKING([whether $CC_BASE supports atomic functions])
AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[
int v = 0;
@@ -6980,6 +6991,7 @@ if test "$GCC" = "yes" -o "$COM_IS_CLANG" = TRUE; then
fi
AC_SUBST(HAVE_GCC_AVX)
+AC_SUBST(HAVE_GCC_STACK_PROTECTOR_STRONG)
AC_SUBST(HAVE_GCC_BUILTIN_ATOMIC)
AC_SUBST(HAVE_GCC_STACK_CLASH_PROTECTION)
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 047f121..f91a298 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -63,7 +63,6 @@ gb_CFLAGS_COMMON := \
-fmessage-length=0 \
-fno-common \
-pipe \
- -fstack-protector-strong \
$(if $(gb_COLOR),-fdiagnostics-color=always) \
gb_CXXFLAGS_COMMON := \
@@ -80,7 +79,6 @@ gb_CXXFLAGS_COMMON := \
-fmessage-length=0 \
-fno-common \
-pipe \
- -fstack-protector-strong \
$(if $(gb_COLOR),-fdiagnostics-color=always) \
ifeq ($(HAVE_WDEPRECATED_COPY_DTOR),TRUE)
@@ -139,7 +137,11 @@ endif
gb_VISIBILITY_FLAGS_CXX := -fvisibility-inlines-hidden
gb_CXXFLAGS_COMMON += $(gb_VISIBILITY_FLAGS_CXX)
+ifeq ($(HAVE_GCC_STACK_PROTECTOR_STRONG),TRUE)
+gb_CFLAGS_COMMON += -fstack-protector-strong
+gb_CXXFLAGS_COMMON += -fstack-protector-strong
gb_LinkTarget_LDFLAGS += -fstack-protector-strong
+endif
ifneq ($(gb_ENABLE_PCH),)
ifeq ($(COM_IS_CLANG),TRUE)
--
2.28.0
From 53a6e2ca942b368f892b77bf65a263994f30384a Mon Sep 17 00:00:00 2001
From: Gerasim Troeglazov <3dEyes@gmail.com>
Date: Sat, 19 Dec 2020 22:59:07 +1000
Subject: Extend getOSVersion for Haiku
diff --git a/vcl/unx/generic/app/geninst.cxx b/vcl/unx/generic/app/geninst.cxx
index 3b5e402..04042bd 100644
--- a/vcl/unx/generic/app/geninst.cxx
+++ b/vcl/unx/generic/app/geninst.cxx
@@ -26,6 +26,11 @@
# include <sys/utsname.h>
#endif
+#if defined(__HAIKU__)
+# include <sys/utsname.h>
+# include <private/libroot/system_revision.h>
+#endif
+
#include <config_features.h>
#if HAVE_FEATURE_OPENGL
#include <vcl/opengl/OpenGLContext.hxx>
@@ -90,7 +95,15 @@ OUString SalGenericInstance::getOSVersion()
return OUString::createFromAscii( stName.sysname ) + " " +
aKernelVer.copy( 0, nIndex );
#elif defined(__HAIKU__)
- aKernelVer = "Haiku";
+ struct utsname stName;
+ if ( uname( &stName ) != 0 )
+ return aKernelVer;
+
+ const char *haikuRevision = __get_haiku_revision();
+ if (haikuRevision[0] != '\0')
+ return OUString::createFromAscii( stName.sysname ) + " " + OUString::createFromAscii(haikuRevision);
+
+ return OUString::createFromAscii( stName.sysname );
#else
return aKernelVer;
#endif
--
2.28.0