[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - external/libstaroffice
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Apr 30 05:39:48 UTC 2020
external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1 | 56 ++++++++++
external/libstaroffice/UnpackedTarball_libstaroffice.mk | 3
2 files changed, 59 insertions(+)
New commits:
commit 44e2f126ea0c568cc3974979f1776d3b4d5ca2e1
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Mon Oct 21 17:29:12 2019 +0200
Commit: Tor Lillqvist <tml at collabora.com>
CommitDate: Thu Apr 30 07:39:18 2020 +0200
iexternal/libstaroffice: Fix equality operator arguments
see commit message of
external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1 for details
Change-Id: Iff882eb1e8b7a71e659a4513772e9049645812fb
Reviewed-on: https://gerrit.libreoffice.org/81256
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93184
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1 b/external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1
new file mode 100644
index 000000000000..27fd97727e25
--- /dev/null
+++ b/external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1
@@ -0,0 +1,56 @@
+From 9c0ff663659a28720c4ee3f5752bb8ce8121648f Mon Sep 17 00:00:00 2001
+From: Stephan Bergmann <sbergman at redhat.com>
+Date: Mon, 21 Oct 2019 17:17:48 +0200
+Subject: [PATCH] Fix equality operator arguments
+
+...which avoids overload resolution ambiguities in C++20, when a synthesized
+candidate of operator == for a reversed-argument rewrite conflicts with the
+actual operator ==, as one is a template specialization for int and the other
+for float. (As observed with recent Clang 10 trunk with -std=c++2a when
+building libstaroffice as part of LibreOffice:
+
+> STOFFChart.cxx:230:63: error: use of overloaded operator '==' is ambiguous (with operand types 'STOFFVec2f' (aka 'STOFFVec2<float>') and 'STOFFVec2i' (aka 'STOFFVec2<int>'))
+> bool autoPlace=m_legendPosition==STOFFBox2f()||m_dimension==STOFFVec2i();
+> ~~~~~~~~~~~^ ~~~~~~~~~~~~
+> ./libstaroffice_internal.hxx:687:8: note: candidate function
+> bool operator==(STOFFVec2<T> const &p) const
+> ^
+> ./libstaroffice_internal.hxx:687:8: note: candidate function (with reversed parameter order)
+> STOFFChart.cxx:270:63: error: use of overloaded operator '==' is ambiguous (with operand types 'STOFFVec2f' (aka 'STOFFVec2<float>') and 'STOFFVec2i' (aka 'STOFFVec2<int>'))
+> bool autoPlace=m_plotAreaPosition==STOFFBox2f()||m_dimension==STOFFVec2i();
+> ~~~~~~~~~~~^ ~~~~~~~~~~~~
+> ./libstaroffice_internal.hxx:687:8: note: candidate function
+> bool operator==(STOFFVec2<T> const &p) const
+> ^
+> ./libstaroffice_internal.hxx:687:8: note: candidate function (with reversed parameter order)
+
+)
+---
+ src/lib/STOFFChart.cxx | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/src/lib/STOFFChart.cxx b/src/lib/STOFFChart.cxx
+index 3e7310c..b861762 100644
+--- a/src/lib/STOFFChart.cxx
++++ b/src/lib/STOFFChart.cxx
+@@ -227,7 +227,7 @@ void STOFFChart::sendChart(STOFFSpreadsheetListenerPtr &listener, librevenge::RV
+
+ // legend
+ if (m_legend.m_show) {
+- bool autoPlace=m_legendPosition==STOFFBox2f()||m_dimension==STOFFVec2i();
++ bool autoPlace=m_legendPosition==STOFFBox2f()||m_dimension==STOFFVec2f();
+ style=librevenge::RVNGPropertyList();
+ m_legend.addStyleTo(style);
+ style.insert("librevenge:chart-id", styleId);
+@@ -267,7 +267,7 @@ void STOFFChart::sendChart(STOFFSpreadsheetListenerPtr &listener, librevenge::RV
+ }
+ // plot area
+ style=librevenge::RVNGPropertyList();
+- bool autoPlace=m_plotAreaPosition==STOFFBox2f()||m_dimension==STOFFVec2i();
++ bool autoPlace=m_plotAreaPosition==STOFFBox2f()||m_dimension==STOFFVec2f();
+ m_plotAreaStyle.addTo(style);
+ style.insert("librevenge:chart-id", styleId);
+ style.insert("chart:include-hidden-cells","false");
+--
+2.21.0
+
diff --git a/external/libstaroffice/UnpackedTarball_libstaroffice.mk b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
index fdf668d196dc..d9c6d4ed962f 100644
--- a/external/libstaroffice/UnpackedTarball_libstaroffice.mk
+++ b/external/libstaroffice/UnpackedTarball_libstaroffice.mk
@@ -37,8 +37,11 @@ $(eval $(call gb_UnpackedTarball_add_patches,libstaroffice, \
))
endif
+# * external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1 is upstream at
+# <https://github.com/fosnola/libstaroffice/pull/6> "Fix equality operator arguments":
$(eval $(call gb_UnpackedTarball_add_patches,libstaroffice,\
external/libstaroffice/0001-add-missing-include-for-std-max.patch.1 \
+ external/libstaroffice/0001-Fix-equality-operator-arguments.patch.1 \
))
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list