diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2013-06-23 17:32:20 +0200 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2013-06-23 17:40:39 +0200 |
commit | d8eafdafe0a86c2fb83855852a12703366b3914e (patch) | |
tree | e4bf06a44e4e018346053c7f203d33d08304f939 | |
parent | Use unsigned values in m_a(Converted)BoundValues (diff) | |
download | core-d8eafdafe0a86c2fb83855852a12703366b3914e.tar.gz core-d8eafdafe0a86c2fb83855852a12703366b3914e.zip |
Data-aware ListBox: use entry for NULL if the *bound* value is NULL
as opposed to when the display string is empty.
Change-Id: I802955404d2d8d5c91b3fd1633e34be7ef4f0b82
-rw-r--r-- | forms/source/component/ListBox.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/forms/source/component/ListBox.cxx b/forms/source/component/ListBox.cxx index b3726f3c7cb3..90decec5d2ad 100644 --- a/forms/source/component/ListBox.cxx +++ b/forms/source/component/ListBox.cxx @@ -915,8 +915,13 @@ namespace frm aBoundValue = static_cast<sal_Int16>(xListCursor->getRow()-1); aValueList.push_back( aBoundValue ); - if ( bUseNULL && ( m_nNULLPos == -1 ) && aStr.isEmpty() ) + if ( bUseNULL && ( m_nNULLPos == -1 ) && aBoundValue.isNull() ) m_nNULLPos = sal_Int16( aDisplayList.size() - 1 ); + if ( bUseNULL && ( m_nNULLPos == -1 ) && aStr.isEmpty() ) + // There is already a non-NULL entry with empty display string; + // adding another one for NULL would make things confusing, + // so back off. + bUseNULL = false; } } break; |