dbaccess/source/ui/querydesign/LimitBox.cxx | 5 ++--- dbaccess/source/ui/querydesign/limitboxcontroller.cxx | 1 + hsqldb/UnpackedTarball_hsqldb.mk | 1 + hsqldb/patches/limit_as_table_alias.patch | 11 +++++++++++ 4 files changed, 15 insertions(+), 3 deletions(-)
New commits: commit 00eafaa9493e99dfc81ec102b1ae936b84e44d0d Author: Zolnai Tamás <[email protected]> Date: Thu Jun 13 11:27:58 2013 +0200 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 diff --git a/dbaccess/source/ui/querydesign/LimitBox.cxx b/dbaccess/source/ui/querydesign/LimitBox.cxx index 9556f81..b2d267e 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 0445159..63724e5 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() ); commit 05d738294025b4a26e7cc3c6180e10ff784555e2 Author: Zolnai Tamás <[email protected]> Date: Thu Jun 13 10:40:31 2013 +0200 hsqldb does not support "select * from t limit n" If limit clause follow from clause directly than the statement parser of hsqldb parses "LIMIT" token like a table alias and that's why the next number is unexpected. The problem was that the limit token was not added to a "keyword" vector in which parser search while working with form clause. If the algorithm find a keyword after table names than it knows it is the end of the form clause. That's why it worked with any other keywords like "ORDER_BY", "WHERE", "GROUP BY" and so on. Change-Id: Iacd3ea3493c85eb0f2579aaad6903537ac65d25a diff --git a/hsqldb/UnpackedTarball_hsqldb.mk b/hsqldb/UnpackedTarball_hsqldb.mk index af78834..271f692 100644 --- a/hsqldb/UnpackedTarball_hsqldb.mk +++ b/hsqldb/UnpackedTarball_hsqldb.mk @@ -23,6 +23,7 @@ $(eval $(call gb_UnpackedTarball_add_patches,hsqldb,\ hsqldb/patches/i103528.patch \ hsqldb/patches/i104901.patch \ hsqldb/patches/fdo36824.patch \ + hsqldb/patches/limit_as_table_alias.patch \ $(if $(filter YES,$(HSQLDB_USE_JDBC_4_1)),\ hsqldb/patches/jdbc-4.1.patch \ ) \ diff --git a/hsqldb/patches/limit_as_table_alias.patch b/hsqldb/patches/limit_as_table_alias.patch new file mode 100644 index 0000000..09f49cc --- /dev/null +++ b/hsqldb/patches/limit_as_table_alias.patch @@ -0,0 +1,11 @@ +--- misc/hsqldb/src/org/hsqldb/Token.java 2013-06-13 10:04:28.975934479 +0200 ++++ misc/build/hsqldb/src/org/hsqldb/Token.java 2013-06-13 10:06:09.915931966 +0200 +@@ -819,7 +819,7 @@ + Token.T_EXTRACT, Token.T_FOR, Token.T_FROM, Token.T_GROUP, + Token.T_HAVING, Token.T_IF, Token.T_INTO, Token.T_IFNULL, + Token.T_IS, Token.T_IN, Token.T_INTERSECT, Token.T_JOIN, +- Token.T_INNER, Token.T_LEADING, Token.T_LIKE, Token.T_MAX, ++ Token.T_INNER, Token.T_LEADING, Token.T_LIKE, Token.T_LIMIT, Token.T_MAX, + Token.T_MIN, Token.T_NEXT, Token.T_NULLIF, Token.T_NOT, + Token.T_NVL, Token.T_MINUS, Token.T_ON, Token.T_ORDER, Token.T_OR, + Token.T_OUTER, Token.T_POSITION, Token.T_PRIMARY, Token.T_SELECT,
_______________________________________________ Libreoffice-commits mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
