summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorIngrid Halama <iha@openoffice.org>2003-12-18 11:38:44 +0000
committerIngrid Halama <iha@openoffice.org>2003-12-18 11:38:44 +0000
commite9973096bbcd3a43aa36e745d38e664c2c7cb632 (patch)
tree62d4eaa4351aacd8405ea11ff410a01b8ed5b8d4 /chart2
parentf8446d08725192856eb3e031b33f86f1c1bd3bbe (diff)
added new class AllTitleItemConverter
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/inc/MultipleChartConverters.hxx20
-rw-r--r--chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx39
2 files changed, 55 insertions, 4 deletions
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
index a2ccf8dc3ef3..10e268c4b324 100644
--- a/chart2/source/controller/inc/MultipleChartConverters.hxx
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MultipleChartConverters.hxx,v $
*
- * $Revision: 1.3 $
+ * $Revision: 1.4 $
*
- * last change: $Author: bm $ $Date: 2003-12-10 16:51:49 $
+ * last change: $Author: iha $ $Date: 2003-12-18 12:37:08 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -122,6 +122,22 @@ protected:
virtual const USHORT * GetWhichPairs() const;
};
+class AllTitleItemConverter : public ::comphelper::MultipleItemConverter
+{
+public:
+ AllTitleItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~AllTitleItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+};
+
class AllSeriesStatisticsConverter : public ::comphelper::MultipleItemConverter
{
public:
diff --git a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
index 3d794f7c1389..db6366a479f6 100644
--- a/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
+++ b/chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: MultipleChartConverters.cxx,v $
*
- * $Revision: 1.4 $
+ * $Revision: 1.5 $
*
- * last change: $Author: bm $ $Date: 2003-12-17 16:43:11 $
+ * last change: $Author: iha $ $Date: 2003-12-18 12:38:44 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -67,6 +67,8 @@
#include "GraphicPropertyItemConverter.hxx"
#include "DataPointItemConverter.hxx"
#include "ChartModelHelper.hxx"
+#include "TitleHelper.hxx"
+#include "TitleItemConverter.hxx"
#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_
#include <drafts/com/sun/star/chart2/XAxisContainer.hpp>
@@ -201,6 +203,39 @@ const USHORT * AllDataLabelItemConverter::GetWhichPairs() const
//-----------------------------------------------------------------------------
+AllTitleItemConverter::AllTitleItemConverter(
+ const uno::Reference< frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ ::std::auto_ptr< awt::Size > pRefSize )
+ : MultipleItemConverter( rItemPool )
+{
+ for(sal_Int32 nTitle = TitleHelper::TITLE_BEGIN; nTitle < TitleHelper::TITLE_END; nTitle++ )
+ {
+ uno::Reference< chart2::XTitle > xTitle( TitleHelper::getTitle( TitleHelper::eTitleType(nTitle), xChartModel ) );
+ if(!xTitle.is())
+ return;
+ uno::Reference< beans::XPropertySet > xObjectProperties( xTitle, uno::UNO_QUERY);
+ ::std::auto_ptr< awt::Size > pSingleRefSize(0);
+ if( pRefSize.get())
+ pSingleRefSize = ::std::auto_ptr< awt::Size >( new awt::Size( *pRefSize ));
+ m_aConverters.push_back( new ::chart::wrapper::TitleItemConverter(
+ xObjectProperties, rItemPool, rDrawModel, pSingleRefSize ));
+ }
+}
+
+AllTitleItemConverter::~AllTitleItemConverter()
+{
+}
+
+const USHORT * AllTitleItemConverter::GetWhichPairs() const
+{
+ // must span all used items!
+ return nTitleWhichPairs;
+}
+
+//-----------------------------------------------------------------------------
+
AllSeriesStatisticsConverter::AllSeriesStatisticsConverter(
const uno::Reference< frame::XModel > & xChartModel,
SfxItemPool& rItemPool )