loplugin:mergeclasses
Change-Id: I84dee96b7a1f72db46e3330ec5195367dfce894a
This commit is contained in:
@@ -155,7 +155,6 @@ merge dbaui::(anonymous namespace)::ILabelProvider with dbaui::(anonymous namesp
|
|||||||
merge dbaui::IApplicationController with dbaui::OApplicationController
|
merge dbaui::IApplicationController with dbaui::OApplicationController
|
||||||
merge dbaui::IEntryFilter with dbaui::(anonymous namespace)::FilterByEntryDataId
|
merge dbaui::IEntryFilter with dbaui::(anonymous namespace)::FilterByEntryDataId
|
||||||
merge dbaui::OOdbcLibWrapper with dbaui::OOdbcEnumeration
|
merge dbaui::OOdbcLibWrapper with dbaui::OOdbcEnumeration
|
||||||
merge dbaui::PropertyStorage with dbaui::SetItemPropertyStorage
|
|
||||||
merge dbaui::SbaGridListener with dbaui::SbaXDataBrowserController
|
merge dbaui::SbaGridListener with dbaui::SbaXDataBrowserController
|
||||||
merge dbmm::IMigrationProgress with dbmm::ProgressPage
|
merge dbmm::IMigrationProgress with dbmm::ProgressPage
|
||||||
merge dbmm::IProgressConsumer with dbmm::ProgressDelegator
|
merge dbmm::IProgressConsumer with dbmm::ProgressDelegator
|
||||||
|
@@ -29,45 +29,27 @@ class SfxItemSet;
|
|||||||
namespace dbaui
|
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
|
/** a PropertyStorage implementation which stores the value in an item set
|
||||||
*/
|
*/
|
||||||
class SetItemPropertyStorage : public PropertyStorage
|
class SetItemPropertyStorage
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SetItemPropertyStorage( SfxItemSet& _rItemSet, const ItemId _nItemID )
|
SetItemPropertyStorage( SfxItemSet& _rItemSet, const sal_uInt16 _nItemID )
|
||||||
:m_rItemSet( _rItemSet )
|
:m_rItemSet( _rItemSet )
|
||||||
,m_nItemID( _nItemID )
|
,m_nItemID( _nItemID )
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual ~SetItemPropertyStorage()
|
void getPropertyValue( css::uno::Any& _out_rValue ) const;
|
||||||
{
|
void setPropertyValue( const css::uno::Any& _rValue );
|
||||||
}
|
|
||||||
|
|
||||||
virtual void getPropertyValue( css::uno::Any& _out_rValue ) const SAL_OVERRIDE;
|
|
||||||
virtual void setPropertyValue( const css::uno::Any& _rValue ) SAL_OVERRIDE;
|
|
||||||
|
|
||||||
private:
|
private:
|
||||||
SfxItemSet& m_rItemSet;
|
SfxItemSet& m_rItemSet;
|
||||||
const ItemId m_nItemID;
|
const sal_uInt16 m_nItemID;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
typedef ::std::map< sal_Int32, std::shared_ptr< SetItemPropertyStorage > > PropertyValues;
|
||||||
|
|
||||||
} // namespace dbaui
|
} // namespace dbaui
|
||||||
|
|
||||||
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_PROPERTYSTORAGE_HXX
|
#endif // INCLUDED_DBACCESS_SOURCE_UI_INC_PROPERTYSTORAGE_HXX
|
||||||
|
@@ -39,20 +39,14 @@ namespace dbaui
|
|||||||
using ::com::sun::star::uno::Any;
|
using ::com::sun::star::uno::Any;
|
||||||
using ::com::sun::star::uno::makeAny;
|
using ::com::sun::star::uno::makeAny;
|
||||||
|
|
||||||
// PropertyStorage
|
|
||||||
PropertyStorage::~PropertyStorage()
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
// helper
|
// helper
|
||||||
namespace
|
namespace
|
||||||
{
|
{
|
||||||
#undef UNOTYPE
|
|
||||||
template < class ITEMTYPE, class UNOTYPE >
|
template < class ITEMTYPE, class UNOTYPE >
|
||||||
class ItemAdapter
|
class ItemAdapter
|
||||||
{
|
{
|
||||||
public:
|
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 SfxPoolItem& rItem( _rSet.Get( _nItemId ) );
|
||||||
const ITEMTYPE* pTypedItem = dynamic_cast< const ITEMTYPE* >( &rItem );
|
const ITEMTYPE* pTypedItem = dynamic_cast< const ITEMTYPE* >( &rItem );
|
||||||
|
Reference in New Issue
Block a user