diff options
Diffstat (limited to 'connectivity/source/drivers/postgresql/pq_xview.cxx')
-rw-r--r-- | connectivity/source/drivers/postgresql/pq_xview.cxx | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/connectivity/source/drivers/postgresql/pq_xview.cxx b/connectivity/source/drivers/postgresql/pq_xview.cxx index 1b00b9b5d326..c2e936e9a314 100644 --- a/connectivity/source/drivers/postgresql/pq_xview.cxx +++ b/connectivity/source/drivers/postgresql/pq_xview.cxx @@ -34,6 +34,7 @@ * ************************************************************************/ +#include <rtl/ref.hxx> #include <rtl/ustrbuf.hxx> #include <cppuhelper/typeprovider.hxx> @@ -51,7 +52,6 @@ using osl::MutexGuard; using com::sun::star::uno::Reference; using com::sun::star::uno::Sequence; using com::sun::star::uno::Any; -using com::sun::star::uno::makeAny; using com::sun::star::uno::Type; using com::sun::star::beans::XPropertySet; @@ -76,7 +76,7 @@ View::View( const ::rtl::Reference< comphelper::RefCountedMutex > & refMutex, Reference< XPropertySet > View::createDataDescriptor( ) { - ViewDescriptor * pView = new ViewDescriptor( + rtl::Reference<ViewDescriptor> pView = new ViewDescriptor( m_xMutex, m_conn, m_pSettings ); pView->copyValuesFrom( this ); @@ -120,14 +120,13 @@ void View::rename( const OUString& newName ) bufferQuoteIdentifier( buf, newSchemaName, m_pSettings ); Reference< XStatement > statement = m_conn->createStatement(); statement->executeUpdate( buf.makeStringAndClear() ); - setPropertyValue_NoBroadcast_public( st.SCHEMA_NAME, makeAny(newSchemaName) ); + setPropertyValue_NoBroadcast_public( st.SCHEMA_NAME, Any(newSchemaName) ); disposeNoThrow( statement ); schema = newSchemaName; } catch( css::sdbc::SQLException &e ) { - OUString buf( e.Message + "(NOTE: Only postgresql server >= V8.1 support changing a table's schema)" ); - e.Message = buf; + e.Message += "(NOTE: Only postgresql server >= V8.1 support changing a table's schema)"; throw; } @@ -141,7 +140,7 @@ void View::rename( const OUString& newName ) bufferQuoteIdentifier( buf, newTableName, m_pSettings ); Reference< XStatement > statement = m_conn->createStatement(); statement->executeUpdate( buf.makeStringAndClear() ); - setPropertyValue_NoBroadcast_public( st.NAME, makeAny(newTableName) ); + setPropertyValue_NoBroadcast_public( st.NAME, Any(newTableName) ); } // inform the container of the name change ! @@ -205,7 +204,7 @@ ViewDescriptor::ViewDescriptor( Reference< XPropertySet > ViewDescriptor::createDataDescriptor( ) { - ViewDescriptor * pView = new ViewDescriptor( + rtl::Reference<ViewDescriptor> pView = new ViewDescriptor( m_xMutex, m_conn, m_pSettings ); pView->copyValuesFrom( this ); |