[Libreoffice-commits] core.git: external/libqxp
David Tardon
dtardon at redhat.com
Mon Aug 28 07:04:19 UTC 2017
external/libqxp/0001-WaE-narrowing-conversion.patch.1 | 28 ++++++++++++++++++
external/libqxp/UnpackedTarball_libqxp.mk | 1
2 files changed, 29 insertions(+)
New commits:
commit 2539d5b39a41d80d2cafed12a66044e9b029263a
Author: David Tardon <dtardon at redhat.com>
Date: Mon Aug 28 09:00:14 2017 +0200
blind attempt to fix windows build error
Change-Id: I88b32543af58dc6f917348b19a0d0d3d50fc8ffe
diff --git a/external/libqxp/0001-WaE-narrowing-conversion.patch.1 b/external/libqxp/0001-WaE-narrowing-conversion.patch.1
new file mode 100644
index 000000000000..0c73c0501f3c
--- /dev/null
+++ b/external/libqxp/0001-WaE-narrowing-conversion.patch.1
@@ -0,0 +1,28 @@
+From 3d0b78eb855dc3797e614a72019afbebbebc536a Mon Sep 17 00:00:00 2001
+From: David Tardon <dtardon at redhat.com>
+Date: Mon, 28 Aug 2017 08:58:10 +0200
+Subject: [PATCH] WaE: narrowing conversion
+
+error C2398: Element '3': conversion from 'unsigned __int64' to 'unsigned long' requires a narrowing conversion
+---
+ src/lib/QXPContentCollector.cpp | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/QXPContentCollector.cpp b/src/lib/QXPContentCollector.cpp
+index 6a227a6..9c3076d 100644
+--- a/src/lib/QXPContentCollector.cpp
++++ b/src/lib/QXPContentCollector.cpp
+@@ -943,7 +943,9 @@ void QXPContentCollector::drawText(const std::shared_ptr<Text> &text, const Link
+ break;
+ }
+
+- const unsigned long spanTextEnd = std::min<unsigned long>({ charFormat.afterEndIndex(), paragraph.afterEndIndex(), text->text.length(), textEnd });
++ const auto spanTextEnd = static_cast<unsigned long>(
++ std::min<uint64_t>({ charFormat.afterEndIndex(), paragraph.afterEndIndex(), text->text.length(), textEnd })
++ );
+
+ if (charFormat.format->isControlChars)
+ {
+--
+2.13.0
+
diff --git a/external/libqxp/UnpackedTarball_libqxp.mk b/external/libqxp/UnpackedTarball_libqxp.mk
index e20b7f94ecee..340fc9397964 100644
--- a/external/libqxp/UnpackedTarball_libqxp.mk
+++ b/external/libqxp/UnpackedTarball_libqxp.mk
@@ -24,6 +24,7 @@ endif
$(eval $(call gb_UnpackedTarball_add_patches,libqxp, \
external/libqxp/0001-don-t-use-RVNGStringStream-in-the-main-lib.patch.1 \
external/libqxp/0001-add-missing-includes.patch.1 \
+ external/libqxp/0001-WaE-narrowing-conversion.patch.1 \
))
# vim: set noet sw=4 ts=4:
More information about the Libreoffice-commits
mailing list