Kaydet (Commit) 00eafaa9 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

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
üst 05d73829
...@@ -85,7 +85,7 @@ void LimitBox::ReformatAll() ...@@ -85,7 +85,7 @@ void LimitBox::ReformatAll()
{ {
RemoveEntry( 0 ); RemoveEntry( 0 );
NumericBox::ReformatAll(); NumericBox::ReformatAll();
InsertEntry( ALL_STRING, 0); InsertValue( ALL_INT, 0);
} }
else else
{ {
...@@ -101,8 +101,7 @@ Size LimitBox::GetOptimalSize() const ...@@ -101,8 +101,7 @@ Size LimitBox::GetOptimalSize() const
///Initialize entries ///Initialize entries
void LimitBox::LoadDefaultLimits() void LimitBox::LoadDefaultLimits()
{ {
SetValue( ALL_INT ); InsertValue( ALL_INT );
InsertEntry( ALL_STRING );
const unsigned nSize = const unsigned nSize =
sizeof(global::aDefLimitAry)/sizeof(global::aDefLimitAry[0]); sizeof(global::aDefLimitAry)/sizeof(global::aDefLimitAry[0]);
......
...@@ -57,6 +57,7 @@ long LimitBoxImpl::Notify( NotifyEvent& rNEvt ) ...@@ -57,6 +57,7 @@ long LimitBoxImpl::Notify( NotifyEvent& rNEvt )
{ {
case EVENT_LOSEFOCUS: case EVENT_LOSEFOCUS:
{ {
nHandled = LimitBox::Notify( rNEvt );
uno::Sequence< beans::PropertyValue > aArgs( 1 ); uno::Sequence< beans::PropertyValue > aArgs( 1 );
aArgs[0].Name = OUString( "DBLimit.Value" ); aArgs[0].Name = OUString( "DBLimit.Value" );
aArgs[0].Value = uno::makeAny( GetValue() ); aArgs[0].Value = uno::makeAny( GetValue() );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment