summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2018-04-08 08:26:55 +0200
committerAndras Timar <andras.timar@collabora.com>2018-08-20 11:58:14 +0200
commit3e1deb23a278958f3cc284117497d3231329eb00 (patch)
tree56d2725ada125d7ad78d3f586b5f2b1ce97d81e0
parentff4f224f7998c2515136d90b222919dd4d05ea51 (diff)
SQL string quoting: escape "'" character also at beginning of string
Change-Id: I51db43c1a3b6d3c93a04a3419238ea286cab987e Reviewed-on: https://gerrit.libreoffice.org/52578 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> (cherry picked from commit 4bb50524e385803fddc50474667777fcf7ce19e1) (cherry picked from commit 1301baea1f2e17d466772f23bbe06d2a2add66ef) (cherry picked from commit 2fe4716e3ff52965e6591428c1471f692cd655c0)
-rw-r--r--connectivity/source/commontools/DateConversion.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/connectivity/source/commontools/DateConversion.cxx b/connectivity/source/commontools/DateConversion.cxx
index 1986adc5e08e..18599427959e 100644
--- a/connectivity/source/commontools/DateConversion.cxx
+++ b/connectivity/source/commontools/DateConversion.cxx
@@ -81,7 +81,7 @@ OUString DBTypeConversion::toSQLString(sal_Int32 eType, const Any& _rVal, bool b
{
OUString aTemp;
_rxTypeConverter->convertToSimpleType(_rVal, TypeClass_STRING) >>= aTemp;
- sal_Int32 nIndex = (sal_Int32)-1;
+ sal_Int32 nIndex = (sal_Int32)-2;
const OUString sQuot("\'");
do
{