summaryrefslogtreecommitdiff
path: root/chart2/source/controller/inc/ItemConverter.hxx
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-05-22 16:54:02 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-05-22 16:54:02 +0000
commitce25dc2e3e4dbe50511e4c601a1841cf9a17ba2d (patch)
tree8a11534d9a9718450082b6b735347bb896faec9e /chart2/source/controller/inc/ItemConverter.hxx
parent38a30fb81e83fec233b4d3c2cfc4d57fd62c1d06 (diff)
INTEGRATION: CWS chart2mst3 (1.6.4); FILE MERGED
2006/03/07 12:50:20 bm 1.6.4.4: leading underscore in parameter to _disposing changed. The method itself is virtual, i.e. has to be changed in unotools 2005/10/07 11:26:15 bm 1.6.4.3: RESYNC: (1.6-1.7); FILE MERGED 2004/05/07 09:14:08 bm 1.6.4.2: enabling member-ids for all items 2004/04/27 14:27:41 bm 1.6.4.1: warnings removed
Diffstat (limited to 'chart2/source/controller/inc/ItemConverter.hxx')
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx37
1 files changed, 26 insertions, 11 deletions
diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx
index 6d68d316e8e7..604d4cf30791 100644
--- a/chart2/source/controller/inc/ItemConverter.hxx
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ItemConverter.hxx,v $
*
- * $Revision: 1.7 $
+ * $Revision: 1.8 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 00:23:17 $
+ * last change: $Author: vg $ $Date: 2007-05-22 17:54:02 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -50,7 +50,10 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#endif
-class SfxItemPropertyMap;
+// for pair
+#include <utility>
+
+struct SfxItemPropertyMap;
namespace comphelper
{
@@ -64,8 +67,9 @@ namespace comphelper
You must implement GetWhichPairs() such that an SfxItemSet created with
CreateEmptyItemSet() is able to hold all items that may be mapped.
- You also have to implement GetItemPropertyName(), in order to return the
- property name for a given which-id.
+ You also have to implement GetItemProperty(), in order to return the
+ property name for a given which-id together with the corresponding member-id
+ that has to be used for conversion in QueryValue/PutValue.
FillSpecialItem and ApplySpecialItem may be used for special handling of
individual item, e.g. if you need member-ids in QueryValue/PutValue
@@ -103,6 +107,16 @@ public:
SfxItemPool& rItemPool );
virtual ~ItemConverter();
+ // typedefs -------------------------------
+
+ typedef USHORT tWhichIdType;
+ typedef ::rtl::OUString tPropertyNameType;
+ typedef BYTE tMemberIdType;
+
+ typedef ::std::pair< tPropertyNameType, tMemberIdType > tPropertyNameWithMemberId;
+
+ // ----------------------------------------
+
/** applies all properties that can be mapped to items into the given item
set.
@@ -163,16 +177,17 @@ protected:
/** implement this method to return a Property object for a given which id.
- @param rOutName
- If true is returned, this contains the property name.
+ @param rOutProperty
+ If true is returned, this contains the property name and the
+ corresponding Member-Id.
@return true, if the item can be mapped to a property.
*/
- virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const = 0;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const = 0;
/** for items that can not be mapped directly to a property.
- This method is called from FillItemSet(), if GetItemPropertyName() returns
+ This method is called from FillItemSet(), if GetItemProperty() returns
false.
The default implementation does nothing except showing an assertion
@@ -182,7 +197,7 @@ protected:
/** for items that can not be mapped directly to a property.
- This method is called from ApplyItemSet(), if GetItemPropertyName() returns
+ This method is called from ApplyItemSet(), if GetItemProperty() returns
false.
The default implementation returns just false and shows an assertion
@@ -204,7 +219,7 @@ protected:
::com::sun::star::beans::XPropertySet > GetPropertySet() const;
// ____ ::utl::OEventListenerAdapter ____
- virtual void _disposing( const ::com::sun::star::lang::EventObject& _rSource );
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& rSource );
private:
::com::sun::star::uno::Reference<