You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
libreoffice/0001-rhbz-1678319-workaroun...

32 lines
1.2 KiB

From 2805f3426d099d0f66f12fef74314ef835768584 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= <caolanm@redhat.com>
Date: Mon, 25 Feb 2019 16:53:31 +0000
Subject: [PATCH] rhbz#1678319 workaround miscompilation
Change-Id: Iba37c4e9c623ab5f40547b1e491c2d92f741bda0
---
sc/source/filter/xml/xmlcoli.cxx | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/sc/source/filter/xml/xmlcoli.cxx b/sc/source/filter/xml/xmlcoli.cxx
index a9033196ecbc..12e91f26f60e 100644
--- a/sc/source/filter/xml/xmlcoli.cxx
+++ b/sc/source/filter/xml/xmlcoli.cxx
@@ -53,8 +53,11 @@ ScXMLTableColContext::ScXMLTableColContext( ScXMLImport& rImport,
{
case XML_ELEMENT( TABLE, XML_NUMBER_COLUMNS_REPEATED ):
{
- nColCount = std::max<sal_Int32>(aIter.toInt32(), 1);
- nColCount = std::min<sal_Int32>(nColCount, MAXCOLCOUNT);
+ nColCount = aIter.toInt32();
+ if (nColCount < 1)
+ nColCount = 1;
+ else if (nColCount > MAXCOLCOUNT)
+ nColCount = MAXCOLCOUNT;
}
break;
case XML_ELEMENT( TABLE, XML_STYLE_NAME ):
--
2.21.0.rc1