loplugin:passstringbyref
Change-Id: Ibd88c8d980072801f533103cd16d2c3a5e9b8fc5
This commit is contained in:
parent
04fcf88c61
commit
12b2461a45
13 changed files with 27 additions and 27 deletions
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
@ -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++)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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);
|
||||
|
||||
};
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -127,7 +127,7 @@ void MacabResultSet::sortMacabRecords(const MacabOrder *pOrder)
|
|||
|
||||
}
|
||||
|
||||
void MacabResultSet::setTableName(OUString _sTableName)
|
||||
void MacabResultSet::setTableName(OUString const & _sTableName)
|
||||
{
|
||||
m_sTableName = _sTableName;
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue