comphelper,connectivity: prefer passing OUString by reference

Change-Id: I19b2613918ec62ee39bb3e447f3587c5dba1e36a
This commit is contained in:
Noel Grandin
2014-03-14 07:46:08 +02:00
parent eb4fb12fdb
commit 358be80f65
74 changed files with 90 additions and 90 deletions

View File

@@ -52,7 +52,7 @@ namespace comphelper
struct hashObjectName_Impl
{
size_t operator()(const OUString Str) const
size_t operator()(const OUString & Str) const
{
return (size_t)Str.hashCode();
}
@@ -60,7 +60,7 @@ struct hashObjectName_Impl
struct eqObjectName_Impl
{
bool operator()(const OUString Str1, const OUString Str2) const
bool operator()(const OUString & Str1, const OUString & Str2) const
{
return ( Str1 == Str2 );
}

View File

@@ -38,7 +38,7 @@ using namespace ::com::sun::star;
namespace comphelper {
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString aStreamName, const uno::Reference< uno::XComponentContext > xContext )
uno::Sequence< uno::Sequence< beans::StringPair > > SAL_CALL OFOPXMLHelper::ReadRelationsInfoSequence( const uno::Reference< io::XInputStream >& xInStream, const OUString & aStreamName, const uno::Reference< uno::XComponentContext > xContext )
throw( uno::Exception )
{
OUString aStringID = "_rels/";

View File

@@ -192,7 +192,7 @@ sdbcx::ObjectType OColumnsHelper::appendObject( const OUString& _rForName, const
}
// XDrop
void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OColumnsHelper::dropObject(sal_Int32 /*_nPos*/, const OUString& _sElementName)
{
OSL_ENSURE(m_pTable,"OColumnsHelper::dropByName: Table is null!");
if ( m_pTable && !m_pTable->isNew() )

View File

@@ -209,7 +209,7 @@ sdbcx::ObjectType OIndexesHelper::appendObject( const OUString& _rForName, const
}
// XDrop
void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OIndexesHelper::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
Reference< XConnection> xConnection = m_pTable->getConnection();
if( xConnection.is() && !m_pTable->isNew())

View File

@@ -260,7 +260,7 @@ OUString OKeysHelper::getDropForeignKey() const
}
// XDrop
void OKeysHelper::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OKeysHelper::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
Reference< XConnection> xConnection = m_pTable->getConnection();
if ( xConnection.is() && !m_pTable->isNew() )

View File

@@ -127,7 +127,7 @@ sdbcx::ObjectType OColumns::appendObject( const OUString&, const Reference< XPro
}
// XDrop
void OColumns::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OColumns::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
if(!m_aCollection.Delete(_sElementName))
ADOS::ThrowException(*m_pConnection->getConnection(),static_cast<XTypeProvider*>(this));

View File

@@ -66,7 +66,7 @@ sdbcx::ObjectType OGroups::appendObject( const OUString& _rForName, const Refere
}
// XDrop
void OGroups::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OGroups::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
m_aCollection.Delete(_sElementName);
}

View File

@@ -71,7 +71,7 @@ sdbcx::ObjectType OIndexes::appendObject( const OUString& _rForName, const Refer
}
// XDrop
void OIndexes::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OIndexes::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
m_aCollection.Delete(_sElementName);
}

View File

@@ -97,7 +97,7 @@ sdbcx::ObjectType OKeys::appendObject( const OUString&, const Reference< XProper
}
// XDrop
void OKeys::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OKeys::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
if(!m_aCollection.Delete(OLEVariant(_sElementName)))
ADOS::ThrowException(*m_pConnection->getConnection(),static_cast<XTypeProvider*>(this));

View File

@@ -77,7 +77,7 @@ sdbcx::ObjectType OTables::appendObject( const OUString&, const Reference< XProp
}
// XDrop
void OTables::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OTables::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
OSL_ENSURE(m_aCollection.IsValid(),"Collection isn't valid");
if ( !m_aCollection.Delete(_sElementName) )

View File

@@ -66,7 +66,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen
}
// XDrop
void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
m_aCollection.Delete(_sElementName);
}

View File

@@ -83,7 +83,7 @@ sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Referen
}
// XDrop
void OViews::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OViews::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
if(!m_aCollection.Delete(_sElementName))
ADOS::ThrowException(*m_pCatalog->getConnection()->getConnection(),static_cast<XTypeProvider*>(this));

View File

@@ -70,7 +70,7 @@ sdbcx::ObjectType ODbaseColumns::appendObject( const OUString& _rForName, const
// XDrop
void ODbaseColumns::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/)
void ODbaseColumns::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/)
{
if(!m_pTable->isNew())
m_pTable->dropColumn(_nPos);

View File

@@ -104,7 +104,7 @@ sdbcx::ObjectType ODbaseIndexes::appendObject( const OUString& _rForName, const
}
// XDrop
void ODbaseIndexes::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/)
void ODbaseIndexes::dropObject(sal_Int32 _nPos, const OUString& /*_sElementName*/)
{
Reference< XUnoTunnel> xTunnel(getObject(_nPos),UNO_QUERY);
if ( xTunnel.is() )

View File

@@ -92,7 +92,7 @@ sdbcx::ObjectType ODbaseTables::appendObject( const OUString& _rForName, const R
}
// XDrop
void ODbaseTables::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void ODbaseTables::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
Reference< XUnoTunnel> xTunnel;
try

View File

@@ -26,8 +26,8 @@ Indexes::Indexes(Table* pTable, Mutex& rMutex, const vector< OUString>& rVector)
}
// XDrop
void Indexes::dropObject(sal_Int32 /*nPosition*/, const OUString sIndexName)
void Indexes::dropObject(sal_Int32 /*nPosition*/, const OUString& sIndexName)
{
OUString sSql("DROP INDEX \"" + sIndexName +"\"");
m_pTable->getConnection()->createStatement()->execute(sSql);
}
}

View File

@@ -30,7 +30,7 @@ namespace connectivity
protected:
// XDrop
virtual void dropObject(sal_Int32 nPosition,
const ::rtl::OUString sIndexName);
const ::rtl::OUString& sIndexName);
public:
Indexes(Table* pTable,
::osl::Mutex& rMutex,

View File

@@ -32,7 +32,7 @@ Keys::Keys(Table* pTable, Mutex& rMutex, const TStringVector& rNames):
}
//----- XDrop ----------------------------------------------------------------
void Keys::dropObject(sal_Int32 nPosition, const OUString sName)
void Keys::dropObject(sal_Int32 nPosition, const OUString& sName)
{
Reference< XConnection> xConnection = m_pTable->getConnection();
@@ -53,4 +53,4 @@ void Keys::dropObject(sal_Int32 nPosition, const OUString sName)
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -31,11 +31,11 @@ namespace connectivity
const ::connectivity::TStringVector& rNames);
// OKeysHelper / XDrop
void dropObject(sal_Int32 nPosition, const ::rtl::OUString sName);
void dropObject(sal_Int32 nPosition, const ::rtl::OUString& sName);
};
}
}
#endif // CONNECTIVITY_FIREBIRD_KEYS_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -98,7 +98,7 @@ ObjectType Tables::appendObject(const OUString& rName,
}
//----- XDrop -----------------------------------------------------------------
void Tables::dropObject(sal_Int32 nPosition, const OUString sName)
void Tables::dropObject(sal_Int32 nPosition, const OUString& sName)
{
uno::Reference< XPropertySet > xTable(getObject(nPosition));
@@ -117,4 +117,4 @@ void Tables::dropObject(sal_Int32 nPosition, const OUString sName)
}
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -53,7 +53,7 @@ namespace connectivity
// XAppend, etc., but all are optional.
// XDrop
virtual void dropObject(sal_Int32 nPosition, const ::rtl::OUString rName);
virtual void dropObject(sal_Int32 nPosition, const ::rtl::OUString& rName);
};
@@ -63,4 +63,4 @@ namespace connectivity
#endif // CONNECTIVITY_FIREBIRD_TABLES_HXX
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

View File

@@ -75,7 +75,7 @@ ObjectType Users::appendObject(const OUString& rName,
}
//----- XDrop -----------------------------------------------------------------
void Users::dropObject(sal_Int32 nPosition, const OUString sName)
void Users::dropObject(sal_Int32 nPosition, const OUString& sName)
{
uno::Reference< XPropertySet > xUser(getObject(nPosition));

View File

@@ -49,7 +49,7 @@ namespace connectivity
// XAppend, etc., but all are optional.
// XDrop
virtual void dropObject(sal_Int32 nPosition, const ::rtl::OUString rName);
virtual void dropObject(sal_Int32 nPosition, const ::rtl::OUString& rName);
};

View File

@@ -116,7 +116,7 @@ sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Refere
}
// XDrop
void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName)
{
Reference< XInterface > xObject( getObject( _nPos ) );
sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject );

View File

@@ -27,7 +27,7 @@ namespace connectivity { namespace hsqldb
void HTools::appendTableFilterCrit( OUStringBuffer& _inout_rBuffer, const OUString& _rCatalog,
const OUString _rSchema, const OUString _rName, bool _bShortForm )
const OUString& _rSchema, const OUString& _rName, bool _bShortForm )
{
_inout_rBuffer.appendAscii( " WHERE " );
if ( !_rCatalog.isEmpty() )

View File

@@ -87,7 +87,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen
}
// XDrop
void OUsers::dropObject(sal_Int32 /*nPos*/,const OUString _sElementName)
void OUsers::dropObject(sal_Int32 /*nPos*/,const OUString& _sElementName)
{
{
OUString aSql( "REVOKE ALL ON * FROM " );

View File

@@ -99,7 +99,7 @@ sdbcx::ObjectType HViews::appendObject( const OUString& _rForName, const Referen
}
// XDrop
void HViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/)
void HViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/)
{
if ( m_bInDrop )
return;

View File

@@ -35,7 +35,7 @@ using namespace ::com::sun::star::sdbc;
using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
void java_util_Properties::setProperty(const OUString key, const OUString& value)
void java_util_Properties::setProperty(const OUString& key, const OUString& value)
{
SDBThreadAttach t; OSL_ENSURE(t.pEnv,"Java Enviroment geloescht worden!");
jobject out(0);

View File

@@ -27,7 +27,7 @@ namespace connectivity
{
namespace mork
{
ProfileStruct::ProfileStruct(MozillaProductType aProduct,OUString aProfileName,
ProfileStruct::ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName,
const OUString& aProfilePath
)
{

View File

@@ -49,7 +49,7 @@ namespace connectivity
class ProfileStruct
{
public:
ProfileStruct(MozillaProductType aProduct,OUString aProfileName,
ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName,
const OUString &aProfilePath
);
MozillaProductType getProductType() { return product;}
@@ -64,7 +64,7 @@ namespace connectivity
class ProductStruct
{
public:
void setCurrentProfile(OUString aProfileName){mCurrentProfileName = aProfileName;}
void setCurrentProfile(const OUString& aProfileName){mCurrentProfileName = aProfileName;}
OUString mCurrentProfileName;

View File

@@ -81,9 +81,9 @@ namespace connectivity
public:
MQueryExpressionString( OUString& lhs,
MQueryExpressionString( const OUString& lhs,
MQueryOp::cond_type cond,
OUString rhs )
const OUString& rhs )
: MQueryExpressionBase( MQueryExpressionBase::StringExpr )
, m_aName( lhs )
, m_aBooleanCondition( cond )
@@ -91,7 +91,7 @@ namespace connectivity
{
}
MQueryExpressionString( OUString& lhs,
MQueryExpressionString( const OUString& lhs,
MQueryOp::cond_type cond )
: MQueryExpressionBase( MQueryExpressionBase::StringExpr )
, m_aName( lhs )

View File

@@ -85,7 +85,7 @@ namespace connectivity
{
namespace mozab
{
ProfileStruct::ProfileStruct(MozillaProductType aProduct,OUString aProfileName,
ProfileStruct::ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName,
#ifdef MINIMAL_PROFILEDISCOVER
const OUString& aProfilePath
#else

View File

@@ -51,7 +51,7 @@ namespace connectivity
class ProfileStruct
{
public:
ProfileStruct(MozillaProductType aProduct,OUString aProfileName,
ProfileStruct(MozillaProductType aProduct, const OUString& aProfileName,
#ifdef MINIMAL_PROFILEDISCOVER
const OUString &aProfilePath
#else
@@ -77,7 +77,7 @@ namespace connectivity
class ProductStruct
{
public:
void setCurrentProfile(OUString aProfileName){mCurrentProfileName = aProfileName;}
void setCurrentProfile(const OUString& aProfileName){mCurrentProfileName = aProfileName;}
OUString mCurrentProfileName;

View File

@@ -121,7 +121,7 @@ sdbcx::ObjectType OTables::appendObject( const OUString& _rForName, const Refere
}
// XDrop
void OTables::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OTables::dropObject(sal_Int32 _nPos,const OUString& _sElementName)
{
Reference< XInterface > xObject( getObject( _nPos ) );
sal_Bool bIsNew = connectivity::sdbcx::ODescriptor::isNew( xObject );

View File

@@ -91,7 +91,7 @@ sdbcx::ObjectType OUsers::appendObject( const OUString& _rForName, const Referen
}
// XDrop
void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString _sElementName)
void OUsers::dropObject(sal_Int32 /*_nPos*/,const OUString& _sElementName)
{
OUString aSql( "DROP USER " );
OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( );

View File

@@ -93,7 +93,7 @@ sdbcx::ObjectType OViews::appendObject( const OUString& _rForName, const Referen
}
// XDrop
void OViews::dropObject(sal_Int32 _nPos,const OUString /*_sElementName*/)
void OViews::dropObject(sal_Int32 _nPos,const OUString& /*_sElementName*/)
{
if ( m_bInDrop )
return;

View File

@@ -910,7 +910,7 @@ sal_Int32 DatabaseMetaData::getMaxCharLiteralLength( ) throw (SQLException, Run
}
// Copied / adapted / simplified from JDBC driver
sal_Int32 DatabaseMetaData::getIntSetting(OUString settingName)
sal_Int32 DatabaseMetaData::getIntSetting(const OUString& settingName)
throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException)
{
MutexGuard guard( m_refMutex->mutex );

View File

@@ -57,7 +57,7 @@ class DatabaseMetaData :
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XPreparedStatement > m_getColumnPrivs_stmt;
void checkClosed() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
sal_Int32 getIntSetting(OUString settingName) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
sal_Int32 getIntSetting(const OUString& settingName) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
sal_Int32 getMaxIndexKeys() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
sal_Int32 getMaxNameLength() throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet > getImportedExportedKeys(

View File

@@ -92,12 +92,12 @@ OUString concatQualified( const OUString & a, const OUString &b)
return buf.makeStringAndClear();
}
static inline OString iOUStringToOString( const OUString str, ConnectionSettings *settings) {
static inline OString iOUStringToOString( const OUString& str, ConnectionSettings *settings) {
OSL_ENSURE(settings, "pgsql-sdbc: OUStringToOString got NULL settings");
return OUStringToOString( str, settings->encoding );
}
OString OUStringToOString( const OUString str, ConnectionSettings *settings) {
OString OUStringToOString( const OUString& str, ConnectionSettings *settings) {
return iOUStringToOString( str, settings );
}

View File

@@ -53,7 +53,7 @@ bool isWhitespace( sal_Unicode c );
OUString concatQualified( const OUString & a, const OUString &b);
OString OUStringToOString( OUString str, ConnectionSettings *settings);
OString OUStringToOString( const OUString& str, ConnectionSettings *settings);
void bufferQuoteConstant( OUStringBuffer & buf, const OUString & str, ConnectionSettings *settings );
void bufferQuoteAnyConstant( OUStringBuffer & buf, const com::sun::star::uno::Any &val, ConnectionSettings *settings );

View File

@@ -40,7 +40,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OColumns( ::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,

View File

@@ -38,7 +38,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OGroups(OCatalog* _pParent,
::osl::Mutex& _rMutex,

View File

@@ -37,7 +37,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OIndexes(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,

View File

@@ -38,7 +38,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OKeys(::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,

View File

@@ -38,7 +38,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
void setComments(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OTables(OCatalog* _pParent, ::osl::Mutex& _rMutex,
const TStringVector &_rVector,

View File

@@ -38,7 +38,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OUsers( OCatalog* _pParent,
::osl::Mutex& _rMutex,

View File

@@ -40,7 +40,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
void setComments(const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor ) throw(::com::sun::star::sdbc::SQLException, ::com::sun::star::uno::RuntimeException);
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OViews(OCatalog* _pParent, ::osl::Mutex& _rMutex,
const TStringVector &_rVector,

View File

@@ -33,7 +33,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
ODbaseColumns(file::OFileTable* _pTable,
::osl::Mutex& _rMutex,

View File

@@ -39,7 +39,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
ODbaseIndexes(ODbaseTable* _pTable, ::osl::Mutex& _rMutex,
const TStringVector &_rVector) : ODbaseIndexes_BASE(*_pTable,_pTable->getConnection()->getMetaData()->supportsMixedCaseQuotedIdentifiers(),_rMutex,_rVector)

View File

@@ -36,7 +36,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
ODbaseTables(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDatabaseMetaData >& _rMetaData,::cppu::OWeakObject& _rParent, ::osl::Mutex& _rMutex,
const TStringVector &_rVector) : ODbaseTables_BASE(_rMetaData,_rParent,_rMutex,_rVector)

View File

@@ -39,7 +39,7 @@ namespace connectivity
sal_Int32 GetTokenCount( sal_Unicode cTok , sal_Unicode cStrDel ) const;
OUString GetTokenSpecial(sal_Int32& nStartPos, sal_Unicode cTok = ';', sal_Unicode cStrDel = '\0') const;
inline OUString& GetString() { return m_sString; }
inline void SetString(OUString aStr) { m_sString = aStr;}
inline void SetString(const OUString& aStr) { m_sString = aStr;}
inline sal_Int32 Len() const { return m_sString.getLength(); }
inline operator OUString&() { return m_sString; }
};

View File

@@ -34,7 +34,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
void createTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject);

View File

@@ -42,7 +42,7 @@ namespace connectivity { namespace hsqldb
*/
static void appendTableFilterCrit(
OUStringBuffer& _inout_rBuffer, const OUString& _rCatalog,
const OUString _rSchema, const OUString _rName,
const OUString& _rSchema, const OUString& _rName,
bool _bShortForm
);
};

View File

@@ -39,7 +39,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
OUsers( ::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,

View File

@@ -36,7 +36,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
void createView( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
public:

View File

@@ -34,7 +34,7 @@ namespace connectivity
// A ctor that is needed for returning the object
java_util_Properties( JNIEnv * pEnv, jobject myObj ) : java_lang_Object( pEnv, myObj ){}
java_util_Properties( );
void setProperty(const OUString key, const OUString& value);
void setProperty(const OUString& key, const OUString& value);
};
}

View File

@@ -36,7 +36,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
void createTable( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual OUString getNameForObject(const sdbcx::ObjectType& _xObject);

View File

@@ -39,7 +39,7 @@ namespace connectivity
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OUsers( ::cppu::OWeakObject& _rParent,
::osl::Mutex& _rMutex,

View File

@@ -35,7 +35,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
void createView( const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
public:

View File

@@ -119,7 +119,7 @@ namespace connectivity
OUString m_sForbiddenQueryName;
public:
ForbidQueryName( OSQLParseTreeIteratorImpl& _rIteratorImpl, const OUString _rForbiddenQueryName )
ForbidQueryName( OSQLParseTreeIteratorImpl& _rIteratorImpl, const OUString& _rForbiddenQueryName )
:m_rpAllForbiddenNames( _rIteratorImpl.m_pForbiddenQueryNames )
,m_sForbiddenQueryName( _rForbiddenQueryName )
{

View File

@@ -118,7 +118,7 @@ namespace
m_aElements.push_back(m_aNameMap.insert(m_aNameMap.begin(), ObjectEntry(*i,ObjectType())));
}
virtual bool rename(const OUString _sOldName,const OUString _sNewName)
virtual bool rename(const OUString& _sOldName, const OUString& _sNewName)
{
bool bRet = false;
ObjectIter aIter = m_aNameMap.find(_sOldName);
@@ -518,7 +518,7 @@ void OCollection::insertElement(const OUString& _sElementName,const ObjectType&
m_pElements->insert(_sElementName,_xElement);
}
void OCollection::renameObject(const OUString _sOldName,const OUString _sNewName)
void OCollection::renameObject(const OUString& _sOldName, const OUString& _sNewName)
{
OSL_ENSURE(m_pElements->exists(_sOldName),"Element doesn't exist");
OSL_ENSURE(!m_pElements->exists(_sNewName),"Element already exists");
@@ -583,7 +583,7 @@ ObjectType OCollection::appendObject( const OUString& /*_rForName*/, const Refer
return cloneDescriptor( descriptor );
}
void OCollection::dropObject(sal_Int32 /*_nPos*/,const OUString /*_sElementName*/)
void OCollection::dropObject(sal_Int32 /*_nPos*/, const OUString& /*_sElementName*/)
{
}

View File

@@ -70,7 +70,7 @@ ObjectType OIndexes::appendObject( const OUString& _rForName, const Reference< X
}
// XDrop
void OIndexes::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OIndexes::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
if ( m_xIndexes.is() )
{

View File

@@ -31,7 +31,7 @@ namespace dbaccess
virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
OIndexes(connectivity::OTableHelper* _pTable,
::osl::Mutex& _rMutex,

View File

@@ -390,7 +390,7 @@ sdbcx::ObjectType OColumns::appendObject( const OUString& _rForName, const Refer
}
// XDrop
void OColumns::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OColumns::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
Reference< XDrop > xDrop( m_xDrvColumns, UNO_QUERY );
if ( xDrop.is() )

View File

@@ -348,7 +348,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer
}
// XDrop
void OTableContainer::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OTableContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
SAL_INFO("dbaccess", "dbaccess Ocke.Janssen@sun.com OTableContainer::dropObject" );
m_bInDrop = sal_True;

View File

@@ -163,7 +163,7 @@ ObjectType OViewContainer::appendObject( const OUString& _rForName, const Refere
}
// XDrop
void OViewContainer::dropObject(sal_Int32 _nPos,const OUString _sElementName)
void OViewContainer::dropObject(sal_Int32 _nPos, const OUString& _sElementName)
{
if ( !m_bInElementRemoved )
{

View File

@@ -165,7 +165,7 @@ namespace dbaccess
virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
connectivity::sdbcx::ObjectType createBaseObject(const OUString& _rName)

View File

@@ -59,7 +59,7 @@ namespace dbaccess
virtual connectivity::sdbcx::ObjectType createObject(const OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
virtual void SAL_CALL disposing();

View File

@@ -90,7 +90,7 @@ namespace dbaccess
virtual ::connectivity::sdbcx::ObjectType createObject(const OUString& _rName);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual connectivity::sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
using OFilteredContainer::disposing;

View File

@@ -72,7 +72,7 @@ public:
SAL_CALL
ReadRelationsInfoSequence(
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XInputStream >& xInStream,
const OUString aStreamName,
const OUString & aStreamName,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > xContext )
throw( ::com::sun::star::uno::Exception );

View File

@@ -41,7 +41,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
public:
OColumnsHelper( ::cppu::OWeakObject& _rParent
,sal_Bool _bCase

View File

@@ -35,7 +35,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName);
public:
OIndexesHelper(OTableHelper* _pTable,
::osl::Mutex& _rMutex,

View File

@@ -36,7 +36,7 @@ namespace connectivity
virtual void impl_refresh() throw(::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > createDescriptor();
virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
virtual OUString getDropForeignKey() const;

View File

@@ -71,8 +71,8 @@ namespace connectivity
virtual void swap() = 0;
virtual void clear() = 0;
virtual void reFill(const TStringVector &_rVector) = 0;
virtual void insert(const OUString& _sName,const ObjectType& _xObject) = 0;
virtual bool rename(const OUString _sOldName,const OUString _sNewName) = 0;
virtual void insert(const OUString& _sName, const ObjectType& _xObject) = 0;
virtual bool rename(const OUString& _sOldName, const OUString& _sNewName) = 0;
virtual sal_Int32 size() = 0;
virtual ::com::sun::star::uno::Sequence< OUString > getElementNames() = 0;
virtual OUString getName(sal_Int32 _nIndex) = 0;
@@ -126,7 +126,7 @@ namespace connectivity
virtual ObjectType appendObject( const OUString& _rForName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& descriptor );
// called when XDrop was called
virtual void dropObject(sal_Int32 _nPos,const OUString _sElementName);
virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName);
/** returns the name for the object. The default implementation ask for the property NAME. If this doesn't satisfy, it has to be overloaded.
@param _xObject The object where the name should be extracted.
@@ -182,7 +182,7 @@ namespace connectivity
void reFill(const TStringVector &_rVector);
inline sal_Bool isCaseSensitive() const { return m_pElements->isCaseSensitive(); }
void renameObject(const OUString _sOldName,const OUString _sNewName);
void renameObject(const OUString& _sOldName, const OUString& _sNewName);
// only the name is identical to ::cppu::OComponentHelper
virtual void SAL_CALL disposing(void);