From 00eafaa9493e99dfc81ec102b1ae936b84e44d0d Mon Sep 17 00:00:00 2001 From: Zolnai Tamás Date: Thu, 13 Jun 2013 11:27:58 +0200 Subject: 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 --- dbaccess/source/ui/querydesign/LimitBox.cxx | 5 ++--- dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'dbaccess') 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() ); -- cgit