summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-10-06 14:10:44 +0200
committerNoel Grandin <noel@peralex.com>2015-10-07 08:27:25 +0200
commit2e658321f51af2fa3da14b3240c50942a345613c (patch)
tree9b331e2a911ab51f56d5fb1dc578ba739880b27e /dbaccess
parent4281599a0430eba3fcad672e0e13edcb32175d7a (diff)
loplugin:mergeclasses
Change-Id: I84dee96b7a1f72db46e3330ec5195367dfce894a
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/ui/inc/propertystorage.hxx34
-rw-r--r--dbaccess/source/ui/misc/propertystorage.cxx8
2 files changed, 9 insertions, 33 deletions
diff --git a/dbaccess/source/ui/inc/propertystorage.hxx b/dbaccess/source/ui/inc/propertystorage.hxx
index 2432064a6ea0..9699e5ad814e 100644
--- a/dbaccess/source/ui/inc/propertystorage.hxx
+++ b/dbaccess/source/ui/inc/propertystorage.hxx
@@ -29,45 +29,27 @@ class SfxItemSet;
namespace dbaui
{
- // PropertyStorage
- class SAL_NO_VTABLE PropertyStorage
- {
- public:
- virtual void getPropertyValue( css::uno::Any& _out_rValue ) const = 0;
- virtual void setPropertyValue( const css::uno::Any& _rValue ) = 0;
-
- virtual ~PropertyStorage();
- };
-
- typedef std::shared_ptr< PropertyStorage > PPropertyStorage;
- typedef ::std::map< sal_Int32, PPropertyStorage > PropertyValues;
-
- // SetItemPropertyStorage
- typedef sal_uInt16 ItemId;
-
/** a PropertyStorage implementation which stores the value in an item set
*/
- class SetItemPropertyStorage : public PropertyStorage
+ class SetItemPropertyStorage
{
public:
- SetItemPropertyStorage( SfxItemSet& _rItemSet, const ItemId _nItemID )
+ SetItemPropertyStorage( SfxItemSet& _rItemSet, const sal_uInt16 _nItemID )
:m_rItemSet( _rItemSet )
,m_nItemID( _nItemID )
{
}
- virtual ~SetItemPropertyStorage()
- {
- }
-
- virtual void getPropertyValue( css::uno::Any& _out_rValue ) const SAL_OVERRIDE;
- virtual void setPropertyValue( const css::uno::Any& _rValue ) SAL_OVERRIDE;
+ void getPropertyValue( css::uno::Any& _out_rValue ) const;
+ void setPropertyValue( const css::uno::Any& _rValue );
private:
- SfxItemSet& m_rItemSet;
- const ItemId m_nItemID;
+ SfxItemSet& m_rItemSet;
+ const sal_uInt16 m_nItemID;
};
+ typedef ::std::map< sal_Int32, std::shared_ptr< SetItemPropertyStorage > > PropertyValues;
+
} // namespace dbaui
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_PROPERTYSTORAGE_HXX
diff --git a/dbaccess/source/ui/misc/propertystorage.cxx b/dbaccess/source/ui/misc/propertystorage.cxx
index ba9be1ca0df9..e1f5ea5c11ec 100644
--- a/dbaccess/source/ui/misc/propertystorage.cxx
+++ b/dbaccess/source/ui/misc/propertystorage.cxx
@@ -39,20 +39,14 @@ namespace dbaui
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
- // PropertyStorage
- PropertyStorage::~PropertyStorage()
- {
- }
-
// helper
namespace
{
- #undef UNOTYPE
template < class ITEMTYPE, class UNOTYPE >
class ItemAdapter
{
public:
- static bool trySet( SfxItemSet& _rSet, ItemId _nItemId, const Any& _rValue )
+ static bool trySet( SfxItemSet& _rSet, sal_uInt16 _nItemId, const Any& _rValue )
{
const SfxPoolItem& rItem( _rSet.Get( _nItemId ) );
const ITEMTYPE* pTypedItem = dynamic_cast< const ITEMTYPE* >( &rItem );