Re: [SOLVED] Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-30 Thread julien2412
Lionel Elie Mamane wrote >> ...or, of course, even better yet, > >> pBegin->Name != "JavaDriverClass" ... > > Yes, Julien, this one is IMHO worth doing. It makes the code that much > more readable :) Done now on master, see http://cgit.freedesktop.org/libreoffice/core/commit/?id=6cc359f8d739a9

Re: [SOLVED] Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-30 Thread Lionel Elie Mamane
On Fri, May 30, 2014 at 10:58:33AM +0200, Stephan Bergmann wrote: > On 05/30/2014 09:27 AM, Stephan Bergmann wrote: >> On 05/29/2014 12:48 PM, Julien Nabet wrote: >>> On 29/05/2014 12:31, Tor Lillqvist wrote: Check the semantics of OUString::compareToAscii(). It returns zero on equality,

Re: [SOLVED] Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-30 Thread Stephan Bergmann
On 05/30/2014 09:27 AM, Stephan Bergmann wrote: On 05/29/2014 12:48 PM, Julien Nabet wrote: On 29/05/2014 12:31, Tor Lillqvist wrote: Check the semantics of OUString::compareToAscii(). It returns zero on equality, like strcmp() Should have begun with this, thank you both of you. And to avoid a

Re: [SOLVED] Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-30 Thread Stephan Bergmann
On 05/29/2014 12:48 PM, Julien Nabet wrote: On 29/05/2014 12:31, Tor Lillqvist wrote: Check the semantics of OUString::compareToAscii(). It returns zero on equality, like strcmp() Should have begun with this, thank you both of you. And to avoid asking the same question a second time, I added a

[SOLVED] Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-29 Thread Julien Nabet
On 29/05/2014 12:31, Tor Lillqvist wrote: But as it is, this "if" can never be true since pBegin->Name can't be at the same time = to "JavaDriverClass" and also equal to "CharSet" for example Check the semantics of OUString::compareToAscii(). It returns zero on equality, like strcmp() Should ha

Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-29 Thread Tor Lillqvist
> But as it is, this "if" can never be true since pBegin->Name can't be at the > same time = to "JavaDriverClass" and also equal to "CharSet" for example Check the semantics of OUString::compareToAscii(). It returns zero on equality, like strcmp() --tml ___

Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-29 Thread Julien Nabet
On 29/05/2014 11:41, Lionel Elie Mamane wrote: On Wed, May 28, 2014 at 03:43:24PM -0700, julien2412 wrote: I noticed this part: 113 // this is a special property to find the jdbc driver 114 if ( pBegin->Name.compareToAscii( "JavaDriverClass" ) 115 &

Re: Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-29 Thread Lionel Elie Mamane
On Wed, May 28, 2014 at 03:43:24PM -0700, julien2412 wrote: > I noticed this part: > 113 // this is a special property to find the jdbc driver > 114 if ( pBegin->Name.compareToAscii( "JavaDriverClass" ) > 115 && pBegin->Name.compareToAscii( "JavaDriverCl

Strange part in connectivity/source/drivers/jdbc/tools.cxx

2014-05-28 Thread julien2412
Hello, I noticed this part: 113 // this is a special property to find the jdbc driver 114 if ( pBegin->Name.compareToAscii( "JavaDriverClass" ) 115 && pBegin->Name.compareToAscii( "JavaDriverClassPath" ) 116 && pBegin->Name.compareToAsci