summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2006-07-10 13:28:43 +0000
committerOliver Bolte <obo@openoffice.org>2006-07-10 13:28:43 +0000
commit3619612df254a2561d9946e7cb5841d1ba922c5c (patch)
tree14af21810684fd008bc672a6a470c47efeb476bc /connectivity
parent4b56009cf12c41bd933b51aa7c79ead68ac9e687 (diff)
INTEGRATION: CWS qiq (1.3.104); FILE MERGED
2006/06/27 14:28:05 fs 1.3.104.2: RESYNC: (1.3-1.4); FILE MERGED 2006/06/16 11:32:33 fs 1.3.104.1: during #i51143#: refactored VCollection: - createEmptyObject now named createDescriptor - cloneObject removed - appendObject now returns the newly created object (previously done via a subsequent call to cloneObject)
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/hsqldb/HUsers.cxx13
1 files changed, 7 insertions, 6 deletions
diff --git a/connectivity/source/drivers/hsqldb/HUsers.cxx b/connectivity/source/drivers/hsqldb/HUsers.cxx
index 6c13a2f52907..9ad3a0d950ee 100644
--- a/connectivity/source/drivers/hsqldb/HUsers.cxx
+++ b/connectivity/source/drivers/hsqldb/HUsers.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: HUsers.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: hr $ $Date: 2006-06-20 01:31:29 $
+ * last change: $Author: obo $ $Date: 2006-07-10 14:28:43 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -97,19 +97,18 @@ void OUsers::impl_refresh() throw(RuntimeException)
m_pParent->refreshUsers();
}
// -------------------------------------------------------------------------
-Reference< XPropertySet > OUsers::createEmptyObject()
+Reference< XPropertySet > OUsers::createDescriptor()
{
OUserExtend* pNew = new OUserExtend(m_xConnection);
return pNew;
}
// -------------------------------------------------------------------------
// XAppend
-void OUsers::appendObject( const Reference< XPropertySet >& descriptor )
+sdbcx::ObjectType OUsers::appendObject( const ::rtl::OUString& _rForName, const Reference< XPropertySet >& descriptor )
{
::rtl::OUString aSql = ::rtl::OUString::createFromAscii("GRANT USAGE ON * TO ");
::rtl::OUString aQuote = m_xConnection->getMetaData()->getIdentifierQuoteString( );
- ::rtl::OUString sUserName;
- descriptor->getPropertyValue(OMetaConnection::getPropMap().getNameByIndex(PROPERTY_ID_NAME)) >>= sUserName;
+ ::rtl::OUString sUserName( _rForName );
aSql += ::dbtools::quoteName(aQuote,sUserName)
+ ::rtl::OUString::createFromAscii(" @\"%\" ");
::rtl::OUString sPassword;
@@ -125,6 +124,8 @@ void OUsers::appendObject( const Reference< XPropertySet >& descriptor )
if(xStmt.is())
xStmt->execute(aSql);
::comphelper::disposeComponent(xStmt);
+
+ return createObject( _rForName );
}
// -------------------------------------------------------------------------
// XDrop