diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-29 16:16:23 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-29 21:28:33 +0200 |
commit | ef95604f607e853d2e88dcd7961468215408f8c2 (patch) | |
tree | 180d04ceae97c0e192c231a3e68431bdcd0fb0a4 /svx/source/fmcomp/gridcell.cxx | |
parent | 28a278e8029ed5d589a948f68abc2ba29c616c1f (diff) |
use 0 as the limit-less case
since...
commit 9ebe58f0437bbb5714e629bd22e004ac895086d6
Change-Id: I001567bb7beb0a51d55c75fe36761f4c964348e7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99711
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx/source/fmcomp/gridcell.cxx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
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; |