diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-03-03 12:54:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2025-03-03 14:53:27 +0100 |
commit | 2df7a51f6e7724a749823435dcd00cc0c07e1a96 (patch) | |
tree | 635772dc69af984279d2e3c61e174c0fc7e1b2e2 /include | |
parent | f8b9cd8fd13897094a014ad06df406f0c78adc62 (diff) |
expand the ObjectType typedef
in preparation for making some of the code more typesafe
Change-Id: I7c8a4b30cd1144feaaa2e31fce67cd6545065a38
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/182425
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
Diffstat (limited to 'include')
-rw-r--r-- | include/connectivity/TColumnsHelper.hxx | 4 | ||||
-rw-r--r-- | include/connectivity/TIndexes.hxx | 4 | ||||
-rw-r--r-- | include/connectivity/TKeys.hxx | 8 | ||||
-rw-r--r-- | include/connectivity/sdbcx/VCollection.hxx | 22 |
4 files changed, 18 insertions, 20 deletions
diff --git a/include/connectivity/TColumnsHelper.hxx b/include/connectivity/TColumnsHelper.hxx index c50aefb27b03..2e79df12ee99 100644 --- a/include/connectivity/TColumnsHelper.hxx +++ b/include/connectivity/TColumnsHelper.hxx @@ -36,10 +36,10 @@ namespace connectivity protected: OTableHelper* m_pTable; - virtual sdbcx::ObjectType createObject(const OUString& _rName) override; + virtual css::uno::Reference< css::beans::XPropertySet > createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; - virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; + virtual css::uno::Reference< css::beans::XPropertySet > appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) override; public: OColumnsHelper( ::cppu::OWeakObject& _rParent diff --git a/include/connectivity/TIndexes.hxx b/include/connectivity/TIndexes.hxx index 4f3a093056ed..46261996e30a 100644 --- a/include/connectivity/TIndexes.hxx +++ b/include/connectivity/TIndexes.hxx @@ -30,10 +30,10 @@ namespace connectivity { OTableHelper* m_pTable; protected: - virtual sdbcx::ObjectType createObject(const OUString& _rName) override; + virtual css::uno::Reference< css::beans::XPropertySet > createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; - virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; + virtual css::uno::Reference< css::beans::XPropertySet > appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void dropObject(sal_Int32 _nPos,const OUString& _sElementName) override; public: OIndexesHelper(OTableHelper* _pTable, diff --git a/include/connectivity/TKeys.hxx b/include/connectivity/TKeys.hxx index ae226b874416..63f688608c3a 100644 --- a/include/connectivity/TKeys.hxx +++ b/include/connectivity/TKeys.hxx @@ -31,10 +31,10 @@ namespace connectivity { OTableHelper* m_pTable; protected: - virtual sdbcx::ObjectType createObject(const OUString& _rName) override; + virtual css::uno::Reference< css::beans::XPropertySet > createObject(const OUString& _rName) override; virtual void impl_refresh() override; virtual css::uno::Reference< css::beans::XPropertySet > createDescriptor() override; - virtual sdbcx::ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; + virtual css::uno::Reference< css::beans::XPropertySet > appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ) override; virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName) override; virtual OUString getDropForeignKey() const; @@ -46,8 +46,8 @@ namespace connectivity ); static void cloneDescriptorColumns( - const sdbcx::ObjectType& _rSourceDescriptor, - const sdbcx::ObjectType& _rDestDescriptor + const css::uno::Reference< css::beans::XPropertySet >& _rSourceDescriptor, + const css::uno::Reference< css::beans::XPropertySet >& _rDestDescriptor ); }; } diff --git a/include/connectivity/sdbcx/VCollection.hxx b/include/connectivity/sdbcx/VCollection.hxx index c0dfc98510a9..89bdbfecab4c 100644 --- a/include/connectivity/sdbcx/VCollection.hxx +++ b/include/connectivity/sdbcx/VCollection.hxx @@ -53,8 +53,6 @@ namespace connectivity::sdbcx css::sdbcx::XDrop, css::lang::XServiceInfo> OCollectionBase; - typedef css::uno::Reference< css::beans::XPropertySet > ObjectType; - class OOO_DLLPUBLIC_DBTOOLS SAL_NO_VTABLE IObjectCollection { public: @@ -65,7 +63,7 @@ namespace connectivity::sdbcx virtual void swap() = 0; virtual void clear() = 0; virtual void reFill(const ::std::vector< OUString> &_rVector) = 0; - virtual void insert(const OUString& _sName, const ObjectType& _xObject) = 0; + virtual void insert(const OUString& _sName, const css::uno::Reference< css::beans::XPropertySet >& _xObject) = 0; virtual bool rename(const OUString& _sOldName, const OUString& _sNewName) = 0; virtual sal_Int32 size() = 0; virtual css::uno::Sequence< OUString > getElementNames() = 0; @@ -73,9 +71,9 @@ namespace connectivity::sdbcx virtual void disposeAndErase(sal_Int32 _nIndex) = 0; virtual void disposeElements() = 0; virtual sal_Int32 findColumn( const OUString& columnName ) = 0; - virtual ObjectType getObject(sal_Int32 _nIndex) = 0; - virtual ObjectType getObject(const OUString& columnName) = 0; - virtual void setObject(sal_Int32 _nIndex,const ObjectType& _xObject) = 0; + virtual css::uno::Reference< css::beans::XPropertySet > getObject(sal_Int32 _nIndex) = 0; + virtual css::uno::Reference< css::beans::XPropertySet > getObject(const OUString& columnName) = 0; + virtual void setObject(sal_Int32 _nIndex,const css::uno::Reference< css::beans::XPropertySet >& _xObject) = 0; virtual bool isCaseSensitive() const = 0; }; @@ -100,7 +98,7 @@ namespace connectivity::sdbcx virtual void impl_refresh() = 0; // will be called when an object was requested by one of the accessing methods like getByIndex - virtual ObjectType createObject(const OUString& _rName) = 0; + virtual css::uno::Reference< css::beans::XPropertySet > createObject(const OUString& _rName) = 0; // will be called when a new object should be generated by a call of createDataDescriptor // the returned object is empty will be filled outside and added to the collection @@ -117,7 +115,7 @@ namespace connectivity::sdbcx the new object which is to be inserted into the collection. This might be the result of a call of <code>createObject( _rForName )</code>, or a clone of the descriptor. */ - virtual ObjectType appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ); + virtual css::uno::Reference< css::beans::XPropertySet > appendObject( const OUString& _rForName, const css::uno::Reference< css::beans::XPropertySet >& descriptor ); // called when XDrop was called virtual void dropObject(sal_Int32 _nPos, const OUString& _sElementName); @@ -126,7 +124,7 @@ namespace connectivity::sdbcx @param _xObject The object where the name should be extracted. @return The name of the object. */ - virtual OUString getNameForObject(const ObjectType& _xObject); + virtual OUString getNameForObject(const css::uno::Reference< css::beans::XPropertySet >& _xObject); /** clones the given descriptor @@ -137,7 +135,7 @@ namespace connectivity::sdbcx is not actually appended to any backend (e.g. for the columns collection of a descriptor object itself, where there is not yet a database backend to append the column to). */ - ObjectType cloneDescriptor( const ObjectType& _descriptor ); + css::uno::Reference< css::beans::XPropertySet > cloneDescriptor( const css::uno::Reference< css::beans::XPropertySet >& _descriptor ); OCollection(::cppu::OWeakObject& _rParent, bool _bCase, @@ -153,14 +151,14 @@ namespace connectivity::sdbcx /** insert a new element into the collection */ - void insertElement(const OUString& _sElementName,const ObjectType& _xElement); + void insertElement(const OUString& _sElementName,const css::uno::Reference< css::beans::XPropertySet >& _xElement); /** return the object, if not existent it creates it. @param _nIndex The index of the object to create. @return ObjectType */ - ObjectType getObject(sal_Int32 _nIndex); + css::uno::Reference< css::beans::XPropertySet > getObject(sal_Int32 _nIndex); public: virtual ~OCollection(); |