From ef95604f607e853d2e88dcd7961468215408f8c2 Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Wed, 29 Jul 2020 16:16:23 +0100 Subject: use 0 as the limit-less case MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit since... commit 9ebe58f0437bbb5714e629bd22e004ac895086d6 Change-Id: I001567bb7beb0a51d55c75fe36761f4c964348e7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99711 Tested-by: Caolán McNamara Reviewed-by: Caolán McNamara --- svx/source/fmcomp/gridcell.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'svx/source/fmcomp/gridcell.cxx') diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index a920477e9f49..326188c81463 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -1180,7 +1180,7 @@ void DbTextField::updateFromModel( Reference< XPropertySet > _rxModel ) _rxModel->getPropertyValue( FM_PROP_TEXT ) >>= sText; sal_Int32 nMaxTextLen = m_pEdit->GetMaxTextLen(); - if ( EDIT_NOLIMIT != nMaxTextLen && sText.getLength() > nMaxTextLen ) + if (nMaxTextLen != 0 && sText.getLength() > nMaxTextLen) { sal_Int32 nDiff = sText.getLength() - nMaxTextLen; sText = sText.replaceAt(sText.getLength() - nDiff,nDiff, OUString()); @@ -1196,7 +1196,7 @@ bool DbTextField::commitControl() OUString aText( m_pEdit->GetText( getModelLineEndSetting( m_rColumn.getModel() ) ) ); // we have to check if the length before we can decide if the value was modified sal_Int32 nMaxTextLen = m_pEdit->GetMaxTextLen(); - if ( EDIT_NOLIMIT != nMaxTextLen ) + if (nMaxTextLen != 0) { OUString sOldValue; m_rColumn.getModel()->getPropertyValue( FM_PROP_TEXT ) >>= sOldValue; -- cgit