summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZolnai Tamás <zolnaitamas2000@gmail.com>2013-06-13 11:27:58 +0200
committerZolnai Tamás <zolnaitamas2000@gmail.com>2013-06-14 09:50:00 +0200
commit736473924f22ab88722e5608bec915bfe47cd224 (patch)
tree4c339798baccf35405b07924e94c9028ed0389ac
parente00a04236d999849d850d4f26b7167d5975ecf39 (diff)
fix limit bug: selecting "All" has no effect to sql
LimitBox set its value to -1 if the current text is "All" but just when it loses its focus so dispatching its value to the controller must be after this setting. (see limitboxcontroller.cxx) Plus some clean up in LimitBox.cxx Change-Id: Ic1d314a5a67c2b261b2e9c50973f51de2bfb8db8 (cherry picked from commit 00eafaa9493e99dfc81ec102b1ae936b84e44d0d)
-rw-r--r--dbaccess/source/ui/querydesign/LimitBox.cxx5
-rw-r--r--dbaccess/source/ui/querydesign/limitboxcontroller.cxx1
2 files changed, 3 insertions, 3 deletions
diff --git a/dbaccess/source/ui/querydesign/LimitBox.cxx b/dbaccess/source/ui/querydesign/LimitBox.cxx
index 9556f814d8ed..b2d267e970d5 100644
--- a/dbaccess/source/ui/querydesign/LimitBox.cxx
+++ b/dbaccess/source/ui/querydesign/LimitBox.cxx
@@ -85,7 +85,7 @@ void LimitBox::ReformatAll()
{
RemoveEntry( 0 );
NumericBox::ReformatAll();
- InsertEntry( ALL_STRING, 0);
+ InsertValue( ALL_INT, 0);
}
else
{
@@ -101,8 +101,7 @@ Size LimitBox::GetOptimalSize() const
///Initialize entries
void LimitBox::LoadDefaultLimits()
{
- SetValue( ALL_INT );
- InsertEntry( ALL_STRING );
+ InsertValue( ALL_INT );
const unsigned nSize =
sizeof(global::aDefLimitAry)/sizeof(global::aDefLimitAry[0]);
diff --git a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
index 04451593383a..63724e5a4d31 100644
--- a/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
+++ b/dbaccess/source/ui/querydesign/limitboxcontroller.cxx
@@ -57,6 +57,7 @@ long LimitBoxImpl::Notify( NotifyEvent& rNEvt )
{
case EVENT_LOSEFOCUS:
{
+ nHandled = LimitBox::Notify( rNEvt );
uno::Sequence< beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = OUString( "DBLimit.Value" );
aArgs[0].Value = uno::makeAny( GetValue() );