summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Glazounov <vg@openoffice.org>2007-05-22 17:46:06 +0000
committerVladimir Glazounov <vg@openoffice.org>2007-05-22 17:46:06 +0000
commitd14f688099fd61c4184c500d654c7b0a7bce5292 (patch)
treeb773fc4ce1f4de5fec8c9b811bbd5dc02e852a25
parent7bef16295c41bd3064613b658761bc6695c34ac1 (diff)
INTEGRATION: CWS chart2mst3 (1.2.4); FILE MERGED
2005/12/21 21:29:22 iha 1.2.4.17: remove identifiers from model objects and create an index based CID protocol instead for selection purposes 2005/11/29 09:52:50 bm 1.2.4.16: #i58588# make m_xModifyEventForwarder protected for derived classes to be able to listen to children 2005/11/07 20:54:04 iha 1.2.4.15: fixed crash during switching of charttype - remove modify listeners from removed series 2005/11/07 17:12:45 bm 1.2.4.14: some missing notifications added 2005/10/13 17:39:00 iha 1.2.4.13: renamed BoundedCoordinateSystem to CoordinateSystem 2005/10/07 12:01:55 bm 1.2.4.12: RESYNC: (1.2-1.3); FILE MERGED 2005/04/15 14:50:57 bm 1.2.4.11: use vector instead of map to avoid sorting of data series 2005/03/30 16:31:11 bm 1.2.4.10: make model cloneable (+first undo implementation) 2004/09/16 16:52:14 bm 1.2.4.9: API simplification 2004/09/16 16:51:14 bm 1.2.4.8: API simplification 2004/09/16 14:42:45 bm 1.2.4.7: API simplification 2004/09/16 12:27:26 bm 1.2.4.6: API simplification 2004/09/15 17:32:04 bm 1.2.4.5: API simplification 2004/06/29 12:26:33 bm 1.2.4.4: XChartTypeTemplate changes 2004/04/01 10:53:08 bm 1.2.4.3: XChartType: may return a coordinate system now 2004/03/02 09:49:18 bm 1.2.4.2: XChartTypeInterface changed 2004/02/13 16:51:39 bm 1.2.4.1: join from changes on branch bm_post_chart01
-rw-r--r--chart2/source/model/template/ChartType.hxx118
1 files changed, 105 insertions, 13 deletions
diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx
index 36e6289c4502..65fbeb059d39 100644
--- a/chart2/source/model/template/ChartType.hxx
+++ b/chart2/source/model/template/ChartType.hxx
@@ -4,9 +4,9 @@
*
* $RCSfile: ChartType.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: rt $ $Date: 2005-09-08 01:10:56 $
+ * last change: $Author: vg $ $Date: 2007-05-22 18:46:06 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -42,13 +42,14 @@
#include "OPropertySet.hxx"
#endif
-#ifndef _CPPUHELPER_IMPLBASE1_HXX_
-#include <cppuhelper/implbase1.hxx>
+#ifndef _CPPUHELPER_IMPLBASE5_HXX_
+#include <cppuhelper/implbase5.hxx>
#endif
#ifndef _COMPHELPER_UNO3_HXX_
#include <comphelper/uno3.hxx>
#endif
#include "ServiceMacros.hxx"
+#include "ModifyListenerHelper.hxx"
#ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
#include <com/sun/star/lang/XServiceInfo.hpp>
@@ -56,39 +57,109 @@
#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_
#include <com/sun/star/chart2/XChartType.hpp>
#endif
+#ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_
+#include <com/sun/star/uno/XComponentContext.hpp>
+#endif
+#ifndef _COM_SUN_STAR_CHART2_XDATASERIESCONTAINER_HPP_
+#include <com/sun/star/chart2/XDataSeriesContainer.hpp>
+#endif
+#ifndef _COM_SUN_STAR_UTIL_XCLONEABLE_HPP_
+#include <com/sun/star/util/XCloneable.hpp>
+#endif
+
+#include <vector>
namespace chart
{
namespace impl
{
-typedef ::cppu::WeakImplHelper1<
- ::com::sun::star::chart2::XChartType >
+typedef ::cppu::WeakImplHelper5<
+ ::com::sun::star::chart2::XChartType,
+ ::com::sun::star::chart2::XDataSeriesContainer,
+ ::com::sun::star::util::XCloneable,
+ ::com::sun::star::util::XModifyBroadcaster,
+ ::com::sun::star::util::XModifyListener >
ChartType_Base;
}
class ChartType :
- public helper::MutexContainer,
+ public MutexContainer,
public impl::ChartType_Base,
public ::property::OPropertySet
{
public:
- ChartType( sal_Int32 nDim = 2 );
+ explicit ChartType(
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > const & xContext );
virtual ~ChartType();
protected:
+ explicit ChartType( const ChartType & rOther );
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ GetComponentContext() const;
+
// ____ XChartType ____
// still abstract ! implement !
virtual ::rtl::OUString SAL_CALL getChartType()
throw (::com::sun::star::uno::RuntimeException) = 0;
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XCoordinateSystem > SAL_CALL
+ createCoordinateSystem( ::sal_Int32 DimensionCount )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedMandatoryRoles()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
+ getSupportedOptionalRoles()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getRoleOfSequenceForSeriesLabel()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XDataSeriesContainer ____
+ virtual void SAL_CALL addDataSeries(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& aDataSeries )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeDataSeries(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries >& aDataSeries )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > > SAL_CALL getDataSeries()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDataSeries(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeries > >& aDataSeries )
+ throw (::com::sun::star::lang::IllegalArgumentException,
+ ::com::sun::star::uno::RuntimeException);
+
+ // ____ XModifyBroadcaster ____
+ virtual void SAL_CALL addModifyListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeModifyListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener >& aListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XModifyListener ____
+ virtual void SAL_CALL modified(
+ const ::com::sun::star::lang::EventObject& aEvent )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XEventListener (base of XModifyListener) ____
+ virtual void SAL_CALL disposing(
+ const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ void fireModifyEvent();
// ____ OPropertySet ____
virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const
throw(::com::sun::star::beans::UnknownPropertyException);
-
- // ____ OPropertySet ____
virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper();
+ virtual void firePropertyChangeEvent();
+
// ____ XPropertySet ____
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL
getPropertySetInfo()
@@ -101,15 +172,36 @@ protected:
// const ::com::sun::star::uno::Any& rValue )
// throw (::com::sun::star::lang::IllegalArgumentException);
- // declare this in derived classes !
- APPHELPER_XSERVICEINFO_DECL()
-
/// merge XInterface implementations
DECLARE_XINTERFACE()
/// merge XTypeProvider implementations
DECLARE_XTYPEPROVIDER()
+ // not implemented
+// ____ XCloneable ____
+// virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone()
+// throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder;
+
+private:
+ void impl_addDataSeriesWithoutNotification(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries >& aDataSeries );
+
private:
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_xContext;
+
+ typedef
+ ::std::vector< ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries > >
+ tDataSeriesContainerType;
+
+ tDataSeriesContainerType m_aDataSeries;
+
+ bool m_bNotifyChanges;
};
} // namespace chart