Janitorial clean-up

- fix a bunch of compiler warnings

 - move to recommended way of comparing C strings and OUString

 - Copyright statement on files I modified
This commit is contained in:
Lionel Elie Mamane 2011-08-05 12:08:40 +02:00
parent ad69fc551b
commit c4fc6b22b3
9 changed files with 28 additions and 14 deletions

View file

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_connection.cxx,v $
@ -51,6 +52,7 @@
* The Initial Developer of the Original Code is: Joerg Budischewski
*
* Copyright: 2000 by Sun Microsystems, Inc.
* 2011 Lionel Elie Mamane <lionel@mamane.lu>
*
* All Rights Reserved.
*
@ -138,7 +140,7 @@ class ClosableReference : public cppu::WeakImplHelper1< com::sun::star::uno::XRe
::rtl::ByteSequence m_id;
public:
ClosableReference( const ::rtl::ByteSequence & id , Connection *that )
: m_id( id ), m_conn( that )
: m_conn( that ), m_id( id )
{
that->acquire();
}

View file

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_connection.hxx,v $
@ -132,9 +133,9 @@ class Views;
struct ConnectionSettings
{
ConnectionSettings() :
showSystemColumns( sal_False ),
pConnection(0),
encoding( RTL_TEXTENCODING_UTF8),
pConnection(0),
showSystemColumns( sal_False ),
logFile( 0 ),
loglevel( LogLevel::INFO )
{}

View file

@ -52,6 +52,7 @@
* The Initial Developer of the Original Code is: Joerg Budischewski
*
* Copyright: 2000 by Sun Microsystems, Inc.
* 2011 Lionel Elie Mamane <lionel@mamane.lu>
*
* All Rights Reserved.
*
@ -236,9 +237,9 @@ public:
const Sequence< OUString > & serviceNames,
const Reference< XComponentContext > & defaultContext) :
WeakComponentImplHelper2< XSingleComponentFactory, XServiceInfo >( this->m_mutex ),
m_implName( rImplementationName_ ),
m_create( fptr ),
m_serviceNames( serviceNames ),
m_implName( rImplementationName_ ),
m_defaultContext( defaultContext )
{
}

View file

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_statement.cxx,v $

View file

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_statics.cxx,v $
@ -51,6 +52,7 @@
* The Initial Developer of the Original Code is: Joerg Budischewski
*
* Copyright: 2000 by Sun Microsystems, Inc.
* 2011 Lionel Elie Mamane <lionel@mamane.lu>
*
* All Rights Reserved.
*
@ -80,10 +82,10 @@ namespace pq_sdbc_driver
struct DefColumnMetaData
{
sal_Char * columnName;
sal_Char * tableName;
sal_Char * schemaTableName;
sal_Char * typeName;
const sal_Char * columnName;
const sal_Char * tableName;
const sal_Char * schemaTableName;
const sal_Char * typeName;
sal_Int32 type;
sal_Int32 precision;
sal_Int32 scale;

View file

@ -1,3 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>

View file

@ -1,3 +1,5 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
#include "pq_sequenceresultset.hxx"
#include "pq_resultsetmetadata.hxx"
@ -42,11 +44,11 @@ protected:
const rtl::OUString &table,
const com::sun::star::uno::Sequence< ::rtl::OUString > &primaryKey)
: SequenceResultSet( mutex, owner, colNames, data, (*ppSettings)->tc ),
m_insertRow( false ),
m_primaryKey( primaryKey ),
m_table( table ),
m_ppSettings( ppSettings ),
m_schema( schema ),
m_ppSettings( ppSettings )
m_table( table ),
m_primaryKey( primaryKey ),
m_insertRow( false )
{
}

View file

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_xindexes.cxx,v $

View file

@ -1,3 +1,4 @@
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_xkeys.cxx,v $
@ -51,6 +52,7 @@
* The Initial Developer of the Original Code is: Joerg Budischewski
*
* Copyright: 2000 by Sun Microsystems, Inc.
* 2011 Lionel Elie Mamane <lionel@mamane.lu>
*
* All Rights Reserved.
*
@ -124,9 +126,9 @@ Keys::~Keys()
static sal_Int32 string2keytype( const rtl::OUString &type )
{
sal_Int32 ret = com::sun::star::sdbcx::KeyType::UNIQUE;
if( type.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "p" ) ) == 0 )
if( type.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("p")) )
ret = com::sun::star::sdbcx::KeyType::PRIMARY;
else if( type.compareToAscii( RTL_CONSTASCII_STRINGPARAM( "f" ) ) == 0 )
else if( type.equalsAsciiL(RTL_CONSTASCII_STRINGPARAM("f")) )
ret = com::sun::star::sdbcx::KeyType::FOREIGN;
return ret;
}