summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2014-10-05 21:14:46 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-10-11 11:30:54 +0000
commit9398fe153ae1a7a26d53424b98c2e8190f236890 (patch)
tree382731e1d08fb72d4ff2db9b5b7f2f3f06be7343
parentb8100e1c75dbad75bffb64db94c2b40f75e2ed28 (diff)
fdo#84073: change ODBC/JDBC escapes to lowercase
Change-Id: I19ce3acb9575fbef8273bbd84cb4dc322e101ac8 Reviewed-on: https://gerrit.libreoffice.org/11885 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--connectivity/source/commontools/DateConversion.cxx6
-rw-r--r--connectivity/source/parse/sqlbison.y8
-rw-r--r--dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java2
-rw-r--r--dbaccess/source/ui/querydesign/QueryDesignView.cxx2
-rw-r--r--dbaccess/uiconfig/ui/specialsettingspage.ui2
5 files changed, 14 insertions, 6 deletions
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 1f63db832c6c..1cab87ed1f3f 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -136,7 +136,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
if ( bOk )
{
if (bQuote)
- aRet.appendAscii("{TS '");
+ aRet.appendAscii("{ts '");
aRet.append(DBTypeConversion::toDateTimeString(aDateTime));
if (bQuote)
aRet.appendAscii("'}");
@@ -166,7 +166,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
bOk = _rVal >>= aDate;
OSL_VERIFY_RES( bOk, "DBTypeConversion::toSQLString: _rVal is not date!");
if (bQuote)
- aRet.appendAscii("{D '");
+ aRet.appendAscii("{d '");
aRet.append(DBTypeConversion::toDateString(aDate));
if (bQuote)
aRet.appendAscii("'}");
@@ -193,7 +193,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
bOk = _rVal >>= aTime;
OSL_VERIFY_RES( bOk,"DBTypeConversion::toSQLString: _rVal is not time!");
if (bQuote)
- aRet.appendAscii("{T '");
+ aRet.appendAscii("{t '");
aRet.append(DBTypeConversion::toTimeString(aTime));
if (bQuote)
aRet.appendAscii("'}");
diff --git a/connectivity/source/parse/sqlbison.y b/connectivity/source/parse/sqlbison.y
index 231c9e1f22e7..a5b9f2f962a8 100644
--- a/connectivity/source/parse/sqlbison.y
+++ b/connectivity/source/parse/sqlbison.y
@@ -4638,6 +4638,14 @@ OString OSQLParser::TokenIDToStr(sal_uInt32 nTokenID, const IParseContext* pCont
aStr = yytname[YYTRANSLATE(nTokenID)];
if(aStr.startsWith("SQL_TOKEN_"))
aStr = aStr.copy(10);
+ switch( nTokenID )
+ {
+ case SQL_TOKEN_OJ:
+ case SQL_TOKEN_TS:
+ case SQL_TOKEN_T:
+ case SQL_TOKEN_D:
+ aStr = aStr.toAsciiLowerCase();
+ }
}
return aStr;
}
diff --git a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
index fc9a5a60bef0..8d6eec6c9929 100644
--- a/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
+++ b/dbaccess/qa/complex/dbaccess/SingleSelectQueryComposer.java
@@ -51,7 +51,7 @@ public class SingleSelectQueryComposer extends CRMBasedTestCase
+ " OR ( \"ID\" = 3 AND \"Postal\" = '6' AND \"Address\" = '7' )"
+ " OR ( \"Address\" = '8' )"
+ " OR ( \"Postal\" = '9' )"
- + " OR ( NOW( ) = {D '2010-01-01' } )";
+ + " OR ( NOW( ) = {d '2010-01-01' } )";
private final static String INNERPRODUCTSQUERY = "products (inner)";
diff --git a/dbaccess/source/ui/querydesign/QueryDesignView.cxx b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
index 1bfb73cddd1a..33bab8fe526e 100644
--- a/dbaccess/source/ui/querydesign/QueryDesignView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryDesignView.cxx
@@ -1073,7 +1073,7 @@ namespace
{
// create outer join
if ( bUseEscape )
- aStr += "{ OJ ";
+ aStr += "{ oj ";
aStr += aJoin;
if ( bUseEscape )
aStr += " }";
diff --git a/dbaccess/uiconfig/ui/specialsettingspage.ui b/dbaccess/uiconfig/ui/specialsettingspage.ui
index 357461592b18..0072f8ca1128 100644
--- a/dbaccess/uiconfig/ui/specialsettingspage.ui
+++ b/dbaccess/uiconfig/ui/specialsettingspage.ui
@@ -76,7 +76,7 @@
</child>
<child>
<object class="GtkCheckButton" id="useoj">
- <property name="label" translatable="yes">Use Outer Join syntax '{OJ }'</property>
+ <property name="label" translatable="yes">Use Outer Join syntax '{oj }'</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>