Tag: cws_oof680_dba221a User: oj Date: 2007/04/04 06:14:40 Modified: dba/dbaccess/source/core/dataaccess/documentcontainer.cxx dba/dbaccess/source/core/dataaccess/documentcontainer.hxx
Log: #i75723# overload rename File Changes: Directory: /dba/dbaccess/source/core/dataaccess/ ================================================ File [changed]: documentcontainer.cxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentcontainer.cxx?r1=1.22&r2=1.22.46.1 Delta lines: +28 -3 -------------------- --- documentcontainer.cxx 13 Dec 2006 16:45:21 -0000 1.22 +++ documentcontainer.cxx 4 Apr 2007 13:14:37 -0000 1.22.46.1 @@ -4,9 +4,9 @@ * * $RCSfile: documentcontainer.cxx,v $ * - * $Revision: 1.22 $ + * $Revision: 1.22.46.1 $ * - * last change: $Author: kz $ $Date: 2006/12/13 16:45:21 $ + * last change: $Author: oj $ $Date: 2007/04/04 13:14:37 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -718,6 +718,31 @@ notifyByName( aGuard, _rName, NULL, NULL, E_REMOVED, ContainerListemers ); } +// ----------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- +void SAL_CALL ODocumentContainer::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException) +{ + try + { + osl::ClearableGuard< osl::Mutex > aGuard(m_aMutex); + if ( newName.equals( m_pImpl->m_aProps.aTitle ) ) + return; + + sal_Int32 nHandle = PROPERTY_ID_NAME; + Any aOld = makeAny(m_pImpl->m_aProps.aTitle); + Any aNew = makeAny(newName); + + aGuard.clear(); + fire(&nHandle, &aNew, &aOld, 1, sal_True ); + m_pImpl->m_aProps.aTitle = newName; + fire(&nHandle, &aNew, &aOld, 1, sal_False ); + } + catch(const PropertyVetoException&) + { + throw ElementExistException(newName,*this); + } +} + //........................................................................ } // namespace dbaccess //........................................................................ File [changed]: documentcontainer.hxx Url: http://dba.openoffice.org/source/browse/dba/dbaccess/source/core/dataaccess/documentcontainer.hxx?r1=1.10&r2=1.10.96.1 Delta lines: +6 -3 ------------------- --- documentcontainer.hxx 15 Aug 2006 10:45:29 -0000 1.10 +++ documentcontainer.hxx 4 Apr 2007 13:14:37 -0000 1.10.96.1 @@ -4,9 +4,9 @@ * * $RCSfile: documentcontainer.hxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.10.96.1 $ * - * last change: $Author: hr $ $Date: 2006/08/15 10:45:29 $ + * last change: $Author: oj $ $Date: 2007/04/04 13:14:37 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -129,6 +129,9 @@ // XTransactedObject virtual void SAL_CALL commit( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL revert( ) throw (::com::sun::star::io::IOException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + // XRename + virtual void SAL_CALL rename( const ::rtl::OUString& newName ) throw (::com::sun::star::sdbc::SQLException, ::com::sun::star::container::ElementExistException, ::com::sun::star::uno::RuntimeException); // OPropertySetHelper virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper(); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
