[Libreoffice-commits] core.git: connectivity/source

Stephan Bergmann sbergman at redhat.com
Wed Mar 19 14:49:39 PDT 2014


 connectivity/source/drivers/macab/MacabAddressBook.cxx       |    8 ++++----
 connectivity/source/drivers/macab/MacabAddressBook.hxx       |    8 ++++----
 connectivity/source/drivers/macab/MacabHeader.cxx            |    2 +-
 connectivity/source/drivers/macab/MacabHeader.hxx            |    2 +-
 connectivity/source/drivers/macab/MacabRecord.cxx            |    2 +-
 connectivity/source/drivers/macab/MacabRecord.hxx            |    2 +-
 connectivity/source/drivers/macab/MacabRecords.cxx           |   10 +++++-----
 connectivity/source/drivers/macab/MacabRecords.hxx           |   10 +++++-----
 connectivity/source/drivers/macab/MacabResultSet.cxx         |    2 +-
 connectivity/source/drivers/macab/MacabResultSet.hxx         |    2 +-
 connectivity/source/drivers/macab/MacabResultSetMetaData.cxx |    2 +-
 connectivity/source/drivers/macab/MacabResultSetMetaData.hxx |    2 +-
 connectivity/source/drivers/macab/macabutilities.hxx         |    2 +-
 13 files changed, 27 insertions(+), 27 deletions(-)

New commits:
commit 12b2461a45214fe3a62ca20fe05fb2ea90a5fa5c
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Mar 19 22:49:09 2014 +0100

    loplugin:passstringbyref
    
    Change-Id: Ibd88c8d980072801f533103cd16d2c3a5e9b8fc5

diff --git a/connectivity/source/drivers/macab/MacabAddressBook.cxx b/connectivity/source/drivers/macab/MacabAddressBook.cxx
index 48559c8..d1040f6 100644
--- a/connectivity/source/drivers/macab/MacabAddressBook.cxx
+++ b/connectivity/source/drivers/macab/MacabAddressBook.cxx
@@ -93,7 +93,7 @@ MacabRecords *MacabAddressBook::getMacabRecords()
 /* Get the MacabRecords for a given name: either a group name or the
  * default table name.
  */
-MacabRecords *MacabAddressBook::getMacabRecords(const OUString _tableName)
+MacabRecords *MacabAddressBook::getMacabRecords(const OUString& _tableName)
 {
     if(_tableName == getDefaultTableName())
     {
@@ -106,7 +106,7 @@ MacabRecords *MacabAddressBook::getMacabRecords(const OUString _tableName)
 }
 
 
-MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString _tableName)
+MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString& _tableName)
 {
     if(match(_tableName, getDefaultTableName(), '\0'))
     {
@@ -155,7 +155,7 @@ MacabRecords *MacabAddressBook::getMacabRecordsMatch(const OUString _tableName)
 }
 
 
-MacabGroup *MacabAddressBook::getMacabGroup(OUString _groupName)
+MacabGroup *MacabAddressBook::getMacabGroup(OUString const & _groupName)
 {
     // initialize groups if not already initialized
     if(m_bRetrievedGroups == sal_False)
@@ -179,7 +179,7 @@ MacabGroup *MacabAddressBook::getMacabGroup(OUString _groupName)
 }
 
 
-MacabGroup *MacabAddressBook::getMacabGroupMatch(OUString _groupName)
+MacabGroup *MacabAddressBook::getMacabGroupMatch(OUString const & _groupName)
 {
     // initialize groups if not already initialized
     if(m_bRetrievedGroups == sal_False)
diff --git a/connectivity/source/drivers/macab/MacabAddressBook.hxx b/connectivity/source/drivers/macab/MacabAddressBook.hxx
index dbb9477..34a0135 100644
--- a/connectivity/source/drivers/macab/MacabAddressBook.hxx
+++ b/connectivity/source/drivers/macab/MacabAddressBook.hxx
@@ -51,11 +51,11 @@ namespace connectivity
                 MacabRecords *getMacabRecords();
                 ::std::vector<MacabGroup *> getMacabGroups();
 
-                MacabGroup *getMacabGroup(OUString _groupName);
-                MacabRecords *getMacabRecords(const OUString _tableName);
+                MacabGroup *getMacabGroup(const OUString& _groupName);
+                MacabRecords *getMacabRecords(const OUString& _tableName);
 
-                MacabGroup *getMacabGroupMatch(OUString _groupName);
-                MacabRecords *getMacabRecordsMatch(const OUString _tableName);
+                MacabGroup *getMacabGroupMatch(const OUString& _groupName);
+                MacabRecords *getMacabRecordsMatch(const OUString& _tableName);
         };
 
     }
diff --git a/connectivity/source/drivers/macab/MacabHeader.cxx b/connectivity/source/drivers/macab/MacabHeader.cxx
index 6d0eb20..a12ce3d 100644
--- a/connectivity/source/drivers/macab/MacabHeader.cxx
+++ b/connectivity/source/drivers/macab/MacabHeader.cxx
@@ -264,7 +264,7 @@ sal_Int32 MacabHeader::compareFields(const macabfield *_field1, const macabfield
 }
 
 
-sal_Int32 MacabHeader::getColumnNumber(const OUString s) const
+sal_Int32 MacabHeader::getColumnNumber(const OUString& s) const
 {
     sal_Int32 i;
     for(i = 0; i < size; i++)
diff --git a/connectivity/source/drivers/macab/MacabHeader.hxx b/connectivity/source/drivers/macab/MacabHeader.hxx
index c328484..7f7f260 100644
--- a/connectivity/source/drivers/macab/MacabHeader.hxx
+++ b/connectivity/source/drivers/macab/MacabHeader.hxx
@@ -37,7 +37,7 @@ namespace connectivity
                 void operator+= (const MacabHeader *r);
                 OUString getString(const sal_Int32 i) const;
                 void sortRecord();
-                sal_Int32 getColumnNumber(const OUString s) const;
+                sal_Int32 getColumnNumber(const OUString& s) const;
 
                 static sal_Int32 compareFields(const macabfield *_field1, const macabfield *_field2);
 
diff --git a/connectivity/source/drivers/macab/MacabRecord.cxx b/connectivity/source/drivers/macab/MacabRecord.cxx
index 81c99ef..654c4e5 100644
--- a/connectivity/source/drivers/macab/MacabRecord.cxx
+++ b/connectivity/source/drivers/macab/MacabRecord.cxx
@@ -223,7 +223,7 @@ sal_Int32 MacabRecord::compareFields(const macabfield *_field1, const macabfield
  * between an OUString and a macabfield (for use when creating and handling
  * SQL statement).
  */
-macabfield *MacabRecord::createMacabField(const OUString _newFieldString, const ABPropertyType _abType)
+macabfield *MacabRecord::createMacabField(const OUString& _newFieldString, const ABPropertyType _abType)
 {
     macabfield *newField = NULL;
     switch(_abType)
diff --git a/connectivity/source/drivers/macab/MacabRecord.hxx b/connectivity/source/drivers/macab/MacabRecord.hxx
index 9d96a52..c1c5b26 100644
--- a/connectivity/source/drivers/macab/MacabRecord.hxx
+++ b/connectivity/source/drivers/macab/MacabRecord.hxx
@@ -59,7 +59,7 @@ namespace connectivity
                 macabfield *get(const sal_Int32 i) const;
 
                 static sal_Int32 compareFields(const macabfield *_field1, const macabfield *_field2);
-                static macabfield *createMacabField(const OUString _newFieldString, const ABPropertyType _abtype);
+                static macabfield *createMacabField(const OUString& _newFieldString, const ABPropertyType _abtype);
                 static OUString fieldToString(const macabfield *_aField);
 
         };
diff --git a/connectivity/source/drivers/macab/MacabRecords.cxx b/connectivity/source/drivers/macab/MacabRecords.cxx
index 4a86821..b78e2a3 100644
--- a/connectivity/source/drivers/macab/MacabRecords.cxx
+++ b/connectivity/source/drivers/macab/MacabRecords.cxx
@@ -229,7 +229,7 @@ macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const sal_Int3
 }
 
 
-macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const OUString _columnName) const
+macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const OUString& _columnName) const
 {
     if(header != NULL)
     {
@@ -247,7 +247,7 @@ macabfield *MacabRecords::getField(const sal_Int32 _recordNumber, const OUString
 }
 
 
-sal_Int32 MacabRecords::getFieldNumber(const OUString _columnName) const
+sal_Int32 MacabRecords::getFieldNumber(const OUString& _columnName) const
 {
     if(header != NULL)
         return header->getColumnNumber(_columnName);
@@ -895,7 +895,7 @@ MacabRecord *MacabRecords::createMacabRecord(const ABRecordRef _abrecord, const
  * receives the property value). It is called when we aren't given the
  * property's type already.
  */
-void MacabRecords::insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const MacabHeader *_header, const OUString _propertyName, const CFTypeRef _propertyValue) const
+void MacabRecords::insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const MacabHeader *_header, const OUString& _propertyName, const CFTypeRef _propertyValue) const
 {
     CFTypeID cf_type = CFGetTypeID(_propertyValue);
     ABPropertyType ab_type = getABTypeFromCFType( cf_type );
@@ -908,7 +908,7 @@ void MacabRecords::insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const M
 /* Inserts a given property into a MacabRecord. This method is recursive
  * because properties can contain many sub-properties.
  */
-void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyType, MacabRecord *_abrecord, const MacabHeader *_header, const OUString _propertyName, const CFTypeRef _propertyValue) const
+void MacabRecords::insertPropertyIntoMacabRecord(const ABPropertyType _propertyType, MacabRecord *_abrecord, const MacabHeader *_header, const OUString& _propertyName, const CFTypeRef _propertyValue) const
 {
     /* If there is no value, return */
     if(_propertyValue == NULL)
@@ -1190,7 +1190,7 @@ void MacabRecords::swap(const sal_Int32 _id1, const sal_Int32 _id2)
 }
 
 
-void MacabRecords::setName(const OUString _sName)
+void MacabRecords::setName(const OUString& _sName)
 {
     m_sName = _sName;
 }
diff --git a/connectivity/source/drivers/macab/MacabRecords.hxx b/connectivity/source/drivers/macab/MacabRecords.hxx
index 730dc57..d474ad4 100644
--- a/connectivity/source/drivers/macab/MacabRecords.hxx
+++ b/connectivity/source/drivers/macab/MacabRecords.hxx
@@ -75,8 +75,8 @@ namespace connectivity
                 MacabHeader *createHeaderForProperty(const ABPropertyType _propertyType, const CFTypeRef _propertyValue, const CFStringRef _propertyName) const;
                 void manageDuplicateHeaders(macabfield **_headerNames, const sal_Int32 _length) const;
                 ABPropertyType getABTypeFromCFType(const CFTypeID cf_type ) const;
-                void insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const MacabHeader *_header, const OUString  _propertyName, const CFTypeRef _propertyValue) const;
-                void insertPropertyIntoMacabRecord(const ABPropertyType _propertyType, MacabRecord *_abrecord, const MacabHeader *_header, const OUString  _propertyName, const CFTypeRef _propertyValue) const;
+                void insertPropertyIntoMacabRecord(MacabRecord *_abrecord, const MacabHeader *_header, const OUString& _propertyName, const CFTypeRef _propertyValue) const;
+                void insertPropertyIntoMacabRecord(const ABPropertyType _propertyType, MacabRecord *_abrecord, const MacabHeader *_header, const OUString& _propertyName, const CFTypeRef _propertyValue) const;
             public:
                 MacabRecords(const ABAddressBookRef _addressBook, MacabHeader *_header, MacabRecord **_records, sal_Int32 _numRecords);
                 MacabRecords(const MacabRecords *_copy);
@@ -88,7 +88,7 @@ namespace connectivity
                 void setHeader(MacabHeader *_header);
                 MacabHeader *getHeader() const;
 
-                void setName(const OUString _sName);
+                void setName(const OUString& _sName);
                 OUString getName() const;
 
                 MacabRecord *insertRecord(MacabRecord *_newRecord, const sal_Int32 _location);
@@ -97,8 +97,8 @@ namespace connectivity
                 void swap(const sal_Int32 _id1, const sal_Int32 _id2);
 
                 macabfield *getField(const sal_Int32 _recordNumber, const sal_Int32 _columnNumber) const;
-                macabfield *getField(const sal_Int32 _recordNumber, const OUString  _columnName) const;
-                sal_Int32 getFieldNumber(const OUString  _columnName) const;
+                macabfield *getField(const sal_Int32 _recordNumber, const OUString& _columnName) const;
+                sal_Int32 getFieldNumber(const OUString& _columnName) const;
 
                 sal_Int32 size() const;
 
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx
index 95e3b09..9d75bd2 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -127,7 +127,7 @@ void MacabResultSet::sortMacabRecords(const MacabOrder *pOrder)
 
 }
 
-void MacabResultSet::setTableName(OUString _sTableName)
+void MacabResultSet::setTableName(OUString const & _sTableName)
 {
     m_sTableName = _sTableName;
 }
diff --git a/connectivity/source/drivers/macab/MacabResultSet.hxx b/connectivity/source/drivers/macab/MacabResultSet.hxx
index 84c8788..9400ae2 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.hxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.hxx
@@ -101,7 +101,7 @@ namespace connectivity
             void allMacabRecords();
             void someMacabRecords(const class MacabCondition *pCondition);
             void sortMacabRecords(const class MacabOrder *pOrder);
-            void setTableName(const OUString _sTableName);
+            void setTableName(const OUString& _sTableName);
 
             // ::cppu::OComponentHelper
             virtual void SAL_CALL disposing(void);
diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
index 5da1a28..24cd1de 100644
--- a/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.cxx
@@ -30,7 +30,7 @@ using namespace com::sun::star::uno;
 using namespace com::sun::star::lang;
 using namespace com::sun::star::sdbc;
 
-MacabResultSetMetaData::MacabResultSetMetaData(MacabConnection* _pConnection, OUString _sTableName)
+MacabResultSetMetaData::MacabResultSetMetaData(MacabConnection* _pConnection, OUString const & _sTableName)
     : m_pConnection(_pConnection),
         m_sTableName(_sTableName),
       m_aMacabFields()
diff --git a/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx b/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx
index c3ea852..5d8342c 100644
--- a/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx
+++ b/connectivity/source/drivers/macab/MacabResultSetMetaData.hxx
@@ -47,7 +47,7 @@ namespace connectivity
             virtual ~MacabResultSetMetaData();
 
         public:
-            MacabResultSetMetaData(MacabConnection* _pConnection, OUString _sTableName);
+            MacabResultSetMetaData(MacabConnection* _pConnection, OUString const & _sTableName);
 
             // avoid ambigous cast error from the compiler
             inline operator ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > () throw()
diff --git a/connectivity/source/drivers/macab/macabutilities.hxx b/connectivity/source/drivers/macab/macabutilities.hxx
index 0e30606..f17c7ac 100644
--- a/connectivity/source/drivers/macab/macabutilities.hxx
+++ b/connectivity/source/drivers/macab/macabutilities.hxx
@@ -97,7 +97,7 @@ namespace connectivity
         }
 
 
-        inline OUString fixLabel(const OUString _originalLabel)
+        inline OUString fixLabel(const OUString& _originalLabel)
         {
             /* Get the length, and make sure that there is actually a string
              * here.


More information about the Libreoffice-commits mailing list