summaryrefslogtreecommitdiff
path: root/connectivity/source/commontools
diff options
context:
space:
mode:
authorOcke Janssen <oj@openoffice.org>2002-09-26 06:59:42 +0000
committerOcke Janssen <oj@openoffice.org>2002-09-26 06:59:42 +0000
commitbc31fe3532189416eb143e36fd146588586d2e62 (patch)
tree39c8083290a3703e84b8295c00fc52be3fdb4025 /connectivity/source/commontools
parentd6ef956bf958fd66b082a17e5e283321a7a90519 (diff)
#103685# correct index of replaceAt call
Diffstat (limited to 'connectivity/source/commontools')
-rw-r--r--connectivity/source/commontools/predicateinput.cxx17
1 files changed, 12 insertions, 5 deletions
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index f668a7a29cae..e9e7d011bdca 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: predicateinput.cxx,v $
*
- * $Revision: 1.1 $
+ * $Revision: 1.2 $
*
- * last change: $Author: fs $ $Date: 2002-04-09 14:31:04 $
+ * last change: $Author: oj $ $Date: 2002-09-26 07:59:42 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -203,12 +203,16 @@ namespace dbtools
)
)
{
- ::rtl::OUString sSingleQuote( RTL_CONSTASCII_USTRINGPARAM( "'" ) );
- ::rtl::OUString sDoubleQuote( RTL_CONSTASCII_USTRINGPARAM( "''" ) );
+ static const ::rtl::OUString sSingleQuote( RTL_CONSTASCII_USTRINGPARAM( "'" ) );
+ static const ::rtl::OUString sDoubleQuote( RTL_CONSTASCII_USTRINGPARAM( "''" ) );
sal_Int32 nIndex = -1;
- while ( -1 != ( nIndex = sQuoted.indexOf( '\'' ) ) )
+ sal_Int32 nTemp = 0;
+ while ( -1 != ( nIndex = sQuoted.indexOf( '\'',nTemp ) ) )
+ {
sQuoted = sQuoted.replaceAt( nIndex, 1, sDoubleQuote );
+ nTemp = nIndex+2;
+ }
::rtl::OUString sTemp( sSingleQuote );
( sTemp += sQuoted ) += sSingleQuote;
@@ -420,6 +424,9 @@ namespace dbtools
/*************************************************************************
* history:
* $Log: not supported by cvs2svn $
+ * Revision 1.1 2002/04/09 14:31:04 fs
+ * initial checkin - helper class for inputting predicate values
+ *
*
* Revision 1.0 04.04.02 15:57:58 fs
************************************************************************/