summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml/xmltbli.hxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-01-26 09:37:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-01-29 14:12:56 +0100
commitf164c68296b66d534ed2c9de6da4c01e328959d9 (patch)
tree8770978bbb6ecbc9f73cfabf936f106cfccfc145 /sw/source/filter/xml/xmltbli.hxx
parent506a1b1e3d23e1e9cf0cf2e43d00447ccdcbbd92 (diff)
Introduce dedicated SwXMLTableContext::MAX_WIDTH, replacing USHRT_MAX
For one, this should make it more obvious what the magic constant USHRT_MAX meant in the context of SwXMLTableContext::m_nWidth (and shows that it should arguably have value SAL_MAX_UINT16, not USHRT_MAX). For another, at least some Android builds are stuck with a broken C library that defines USHRT_MAX to be of type unsigned int instead of signed int, which caused various -Wsign-compare that are removed as a side effect. Change-Id: If2676954f4e7159b0c0d3656b8bc0186f0771e10 Reviewed-on: https://gerrit.libreoffice.org/48661 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'sw/source/filter/xml/xmltbli.hxx')
-rw-r--r--sw/source/filter/xml/xmltbli.hxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index 0f2fc81c8031..7a1868ed1dbe 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -91,6 +91,11 @@ class SwXMLTableContext : public XMLTextTableContext
sal_uInt32 m_nCurCol;
sal_Int32 m_nWidth;
+ // The maxiumum table width (i.e., maximum value for m_nWidth); musts be >= MINLAY and must also
+ // fit into ColumnWidthInfo::width (of type sal_uInt16), see e.g. the emplacement of
+ // MINLAY<=nWidht2<=MAX_WIDTH into m_aColumnWidths in SwXMLTableContext::InsertColumn:
+ static constexpr sal_Int32 MAX_WIDTH = SAL_MAX_UINT16;
+
SwTableBox *NewTableBox( const SwStartNode *pStNd,
SwTableLine *pUpper );
SwTableBox *MakeTableBox( SwTableLine *pUpper,