summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2011-08-05 12:08:40 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2011-11-17 21:15:19 +0100
commitc4fc6b22b3af76eb1ae1df8f2e739df46cc3e1a0 (patch)
treea827d8e5e52ad1649228a4a1efeec6321eca5b21 /connectivity
parentad69fc551b03e7f38e2c26b5d3ae2d5b2efb171a (diff)
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
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.cxx4
-rw-r--r--connectivity/source/drivers/postgresql/pq_connection.hxx5
-rw-r--r--connectivity/source/drivers/postgresql/pq_driver.cxx3
-rw-r--r--connectivity/source/drivers/postgresql/pq_statement.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_statics.cxx10
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.cxx2
-rw-r--r--connectivity/source/drivers/postgresql/pq_updateableresultset.hxx10
-rw-r--r--connectivity/source/drivers/postgresql/pq_xindexes.cxx1
-rw-r--r--connectivity/source/drivers/postgresql/pq_xkeys.cxx6
9 files changed, 28 insertions, 14 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_connection.cxx b/connectivity/source/drivers/postgresql/pq_connection.cxx
index a3a0f587b0f7..f5455f06fb7e 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.cxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.cxx
@@ -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();
}
diff --git a/connectivity/source/drivers/postgresql/pq_connection.hxx b/connectivity/source/drivers/postgresql/pq_connection.hxx
index 49766402c19a..db2dbb0c4eca 100644
--- a/connectivity/source/drivers/postgresql/pq_connection.hxx
+++ b/connectivity/source/drivers/postgresql/pq_connection.hxx
@@ -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 )
{}
diff --git a/connectivity/source/drivers/postgresql/pq_driver.cxx b/connectivity/source/drivers/postgresql/pq_driver.cxx
index 7cca80d87120..d4ca93a01bc5 100644
--- a/connectivity/source/drivers/postgresql/pq_driver.cxx
+++ b/connectivity/source/drivers/postgresql/pq_driver.cxx
@@ -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 )
{
}
diff --git a/connectivity/source/drivers/postgresql/pq_statement.cxx b/connectivity/source/drivers/postgresql/pq_statement.cxx
index 086cd22ea99c..1d2bb896d00d 100644
--- a/connectivity/source/drivers/postgresql/pq_statement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statement.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_statement.cxx,v $
diff --git a/connectivity/source/drivers/postgresql/pq_statics.cxx b/connectivity/source/drivers/postgresql/pq_statics.cxx
index 711aedb5a55d..a7de0360466a 100644
--- a/connectivity/source/drivers/postgresql/pq_statics.cxx
+++ b/connectivity/source/drivers/postgresql/pq_statics.cxx
@@ -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;
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
index 6793373f263e..e532d8fcefc3 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.cxx
@@ -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>
diff --git a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
index 0154bb7fc400..68097c364118 100644
--- a/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
+++ b/connectivity/source/drivers/postgresql/pq_updateableresultset.hxx
@@ -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 )
{
}
diff --git a/connectivity/source/drivers/postgresql/pq_xindexes.cxx b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
index d54d3041818f..1e83640eafc0 100644
--- a/connectivity/source/drivers/postgresql/pq_xindexes.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xindexes.cxx
@@ -1,3 +1,4 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*************************************************************************
*
* $RCSfile: pq_xindexes.cxx,v $
diff --git a/connectivity/source/drivers/postgresql/pq_xkeys.cxx b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
index 2b7b5405a7e4..d84a76cbb5dc 100644
--- a/connectivity/source/drivers/postgresql/pq_xkeys.cxx
+++ b/connectivity/source/drivers/postgresql/pq_xkeys.cxx
@@ -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;
}