diff options
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 4 | ||||
-rw-r--r-- | svx/source/inc/gridcell.hxx | 3 |
2 files changed, 3 insertions, 4 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; 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 ); }; |