[Libreoffice-commits] core.git: Branch 'libreoffice-5-4' - 2 commits - sw/qa sw/source
Caolán McNamara
caolanm at redhat.com
Tue Aug 29 15:26:30 UTC 2017
sw/qa/core/data/odt/pass/tdf102018.odt |binary
sw/source/filter/xml/xmltbli.cxx | 18 +++++-------------
2 files changed, 5 insertions(+), 13 deletions(-)
New commits:
commit dccb73d961799a88f5fd28423808f184db5de985
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 29 12:27:23 2017 +0100
Resolves: tdf#112018 number-columns-repeated has the data type positiveInteger
Change-Id: I534885fe7a36a8e3ad891a3f5ed50b589f36e3b9
Reviewed-on: https://gerrit.libreoffice.org/41697
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/qa/core/data/odt/pass/tdf102018.odt b/sw/qa/core/data/odt/pass/tdf102018.odt
new file mode 100644
index 000000000000..d804aec11df0
Binary files /dev/null and b/sw/qa/core/data/odt/pass/tdf102018.odt differ
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index e4d8147515b9..99c015e6fc04 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -753,7 +753,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
if( IsXMLToken( aLocalName, XML_STYLE_NAME ) )
aStyleName = rValue;
else if( IsXMLToken( aLocalName, XML_NUMBER_COLUMNS_REPEATED ) )
- nColRep = (sal_uInt32)rValue.toInt32();
+ nColRep = (sal_uInt32)std::max<sal_Int32>(1, rValue.toInt32());
else if( IsXMLToken( aLocalName, XML_DEFAULT_CELL_STYLE_NAME ) )
aDfltCellStyleName = rValue;
}
commit d2eb1a06fdd823a985c0e1f58df6c92bcc1f3629
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Aug 29 12:22:12 2017 +0100
Related: tdf#112018 limit to min of 1 before conversion from signed int
Reviewed-on: https://gerrit.libreoffice.org/41689
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
(cherry picked from commit 384abc0615b22c586544689d5e28e92c0e74481e)
Change-Id: I1a27f9ebfbe70891d64afa9553f37f565f2d49bf
Reviewed-on: https://gerrit.libreoffice.org/41695
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index e7c70c98162d..e4d8147515b9 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -472,19 +472,13 @@ SwXMLTableCellContext_Impl::SwXMLTableCellContext_Impl(
GetImport().GetTextImport()->SetCellParaStyleDefault(rValue);
break;
case XML_TOK_TABLE_NUM_COLS_SPANNED:
- nColSpan = (sal_uInt32)rValue.toInt32();
- if( nColSpan < 1UL )
- nColSpan = 1UL;
+ nColSpan = (sal_uInt32)std::max<sal_Int32>(1, rValue.toInt32());
break;
case XML_TOK_TABLE_NUM_ROWS_SPANNED:
- nRowSpan = (sal_uInt32)rValue.toInt32();
- if( nRowSpan < 1UL )
- nRowSpan = 1UL;
+ nRowSpan = (sal_uInt32)std::max<sal_Int32>(1, rValue.toInt32());
break;
case XML_TOK_TABLE_NUM_COLS_REPEATED:
- nColRepeat = (sal_uInt32)rValue.toInt32();
- if( nColRepeat < 1UL )
- nColRepeat = 1UL;
+ nColRepeat = (sal_uInt32)std::max<sal_Int32>(1, rValue.toInt32());
break;
case XML_TOK_TABLE_FORMULA:
{
@@ -902,9 +896,7 @@ SwXMLTableRowContext_Impl::SwXMLTableRowContext_Impl( SwXMLImport& rImport,
}
else if( IsXMLToken( aLocalName, XML_NUMBER_ROWS_REPEATED ) )
{
- nRowRepeat = (sal_uInt32)rValue.toInt32();
- if( nRowRepeat < 1UL )
- nRowRepeat = 1UL;
+ nRowRepeat = (sal_uInt32)std::max<sal_Int32>(1, rValue.toInt32());
}
else if( IsXMLToken( aLocalName, XML_DEFAULT_CELL_STYLE_NAME ) )
{
More information about the Libreoffice-commits
mailing list