[Libreoffice-commits] core.git: svx/source
Caolán McNamara (via logerrit)
logerrit at kemper.freedesktop.org
Wed Jul 29 19:29:27 UTC 2020
svx/source/fmcomp/gridcell.cxx | 4 ++--
svx/source/inc/gridcell.hxx | 3 +--
2 files changed, 3 insertions(+), 4 deletions(-)
New commits:
commit ef95604f607e853d2e88dcd7961468215408f8c2
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Jul 29 16:16:23 2020 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Jul 29 21:28:33 2020 +0200
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 at redhat.com>
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
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;
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index 669d1d6095a8..ee40a8520549 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -22,7 +22,6 @@
#include <memory>
#include <svx/gridctrl.hxx>
-#include <vcl/edit.hxx>
#include "sqlparserclient.hxx"
@@ -372,7 +371,7 @@ protected:
protected:
void implSetMaxTextLen( sal_Int16 _nMaxLen )
{
- implSetEffectiveMaxTextLen( _nMaxLen ? _nMaxLen : EDIT_NOLIMIT );
+ implSetEffectiveMaxTextLen(_nMaxLen);
}
virtual void implSetEffectiveMaxTextLen( sal_Int32 _nMaxLen );
};
More information about the Libreoffice-commits
mailing list