diff options
author | Ingrid Halama <iha@openoffice.org> | 2003-12-18 11:38:44 +0000 |
---|---|---|
committer | Ingrid Halama <iha@openoffice.org> | 2003-12-18 11:38:44 +0000 |
commit | e9973096bbcd3a43aa36e745d38e664c2c7cb632 (patch) | |
tree | 62d4eaa4351aacd8405ea11ff410a01b8ed5b8d4 /chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx | |
parent | f8446d08725192856eb3e031b33f86f1c1bd3bbe (diff) |
added new class AllTitleItemConverter
Diffstat (limited to 'chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx')
-rw-r--r-- | chart2/source/controller/itemsetwrapper/MultipleChartConverters.cxx | 39 |
1 files changed, 37 insertions, 2 deletions
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 ) |