diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-28 14:10:25 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-02-28 16:57:39 +0000 |
commit | d7182c36be4b606a02cddeacb44c1b63387bd368 (patch) | |
tree | 51fda1f72b0fa7139cbffbc2837ebd5ceaf0c9d0 /dbaccess | |
parent | 8a180b663323be2cd36a17562d7052d9549ae89e (diff) |
no need for pimpl in TableName
Change-Id: I23ec068c5e4297a3e7451ccaa2e43ae5572f9050
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/147970
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/sdbtools/connection/tablename.cxx | 33 | ||||
-rw-r--r-- | dbaccess/source/sdbtools/connection/tablename.hxx | 8 |
2 files changed, 16 insertions, 25 deletions
diff --git a/dbaccess/source/sdbtools/connection/tablename.cxx b/dbaccess/source/sdbtools/connection/tablename.cxx index 2b275c0f31eb..f6a77dd3e91b 100644 --- a/dbaccess/source/sdbtools/connection/tablename.cxx +++ b/dbaccess/source/sdbtools/connection/tablename.cxx @@ -51,17 +51,8 @@ namespace sdbtools using namespace ::dbtools; // TableName - struct TableName_Impl - { - OUString sCatalog; - OUString sSchema; - OUString sName; - }; - - // TableName TableName::TableName( const Reference<XComponentContext>& _rContext, const Reference< XConnection >& _rxConnection ) :ConnectionDependentComponent( _rContext ) - ,m_pImpl( new TableName_Impl ) { setWeakConnection( _rxConnection ); } @@ -73,43 +64,43 @@ namespace sdbtools OUString SAL_CALL TableName::getCatalogName() { EntryGuard aGuard( *this ); - return m_pImpl->sCatalog; + return msCatalog; } void SAL_CALL TableName::setCatalogName( const OUString& _catalogName ) { EntryGuard aGuard( *this ); - m_pImpl->sCatalog = _catalogName; + msCatalog = _catalogName; } OUString SAL_CALL TableName::getSchemaName() { EntryGuard aGuard( *this ); - return m_pImpl->sSchema; + return msSchema; } void SAL_CALL TableName::setSchemaName( const OUString& _schemaName ) { EntryGuard aGuard( *this ); - m_pImpl->sSchema = _schemaName; + msSchema = _schemaName; } OUString SAL_CALL TableName::getTableName() { EntryGuard aGuard( *this ); - return m_pImpl->sName; + return msName; } void SAL_CALL TableName::setTableName( const OUString& _tableName ) { EntryGuard aGuard( *this ); - m_pImpl->sName = _tableName; + msName = _tableName; } OUString SAL_CALL TableName::getNameForSelect() { EntryGuard aGuard( *this ); - return composeTableNameForSelect( getConnection(), m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName ); + return composeTableNameForSelect( getConnection(), msCatalog, msSchema, msName ); } Reference< XPropertySet > SAL_CALL TableName::getTable() @@ -157,9 +148,9 @@ namespace sdbtools try { - OSL_VERIFY( _table->getPropertyValue( PROPERTY_CATALOGNAME ) >>= m_pImpl->sCatalog ); - OSL_VERIFY( _table->getPropertyValue( PROPERTY_SCHEMANAME ) >>= m_pImpl->sSchema ); - OSL_VERIFY( _table->getPropertyValue( PROPERTY_NAME ) >>= m_pImpl->sName ); + OSL_VERIFY( _table->getPropertyValue( PROPERTY_CATALOGNAME ) >>= msCatalog ); + OSL_VERIFY( _table->getPropertyValue( PROPERTY_SCHEMANAME ) >>= msSchema ); + OSL_VERIFY( _table->getPropertyValue( PROPERTY_NAME ) >>= msName ); } catch( const RuntimeException& ) { throw; } catch( const Exception& e ) @@ -209,7 +200,7 @@ namespace sdbtools return composeTableName( getConnection()->getMetaData(), - m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName, Quote, + msCatalog, msSchema, msName, Quote, lcl_translateCompositionType_throw( Type ) ); } @@ -220,7 +211,7 @@ namespace sdbtools qualifiedNameComponents( getConnection()->getMetaData(), ComposedName, - m_pImpl->sCatalog, m_pImpl->sSchema, m_pImpl->sName, + msCatalog, msSchema, msName, lcl_translateCompositionType_throw( Type ) ); } diff --git a/dbaccess/source/sdbtools/connection/tablename.hxx b/dbaccess/source/sdbtools/connection/tablename.hxx index 3a7ece21a182..74abc3025f49 100644 --- a/dbaccess/source/sdbtools/connection/tablename.hxx +++ b/dbaccess/source/sdbtools/connection/tablename.hxx @@ -33,15 +33,11 @@ namespace sdbtools // TableName typedef ::cppu::WeakImplHelper< css::sdb::tools::XTableName > TableName_Base; - struct TableName_Impl; /** default implementation for XTableName */ class TableName :public TableName_Base ,public ConnectionDependentComponent { - private: - std::unique_ptr< TableName_Impl > m_pImpl; - public: /** constructs the instance @@ -77,6 +73,10 @@ namespace sdbtools private: TableName( const TableName& ) = delete; TableName& operator=( const TableName& ) = delete; + + OUString msCatalog; + OUString msSchema; + OUString msName; }; } // namespace sdbtools |