diff options
Diffstat (limited to 'chart2/source/controller/inc')
9 files changed, 168 insertions, 80 deletions
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx index c17400483339..48a2c3cc1bbc 100644 --- a/chart2/source/controller/inc/AxisItemConverter.hxx +++ b/chart2/source/controller/inc/AxisItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AxisItemConverter.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:14 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,7 +83,7 @@ namespace chart namespace wrapper { -class AxisItemConverter : public ItemConverter +class AxisItemConverter : public ::comphelper::ItemConverter { public: AxisItemConverter( diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx index 861af79ce0b6..924c0e6bf47d 100644 --- a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx +++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CharacterPropertyItemConverter.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:15 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,7 +76,7 @@ namespace wrapper { class CharacterPropertyItemConverter : - public ItemConverter + public ::comphelper::ItemConverter { public: CharacterPropertyItemConverter( diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx index 3853bda018d4..cbf118dd6674 100644 --- a/chart2/source/controller/inc/DataPointItemConverter.hxx +++ b/chart2/source/controller/inc/DataPointItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DataPointItemConverter.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:16 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,7 +75,7 @@ namespace wrapper { class DataPointItemConverter : - public ItemConverter + public ::comphelper::ItemConverter { public: DataPointItemConverter( diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx index 2c068b4a0533..1ec73afdfc62 100644 --- a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx +++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: GraphicPropertyItemConverter.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,7 +78,7 @@ namespace wrapper { class GraphicPropertyItemConverter : - public ItemConverter + public ::comphelper::ItemConverter { public: enum eGraphicObjectType diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx index e221e53aa4db..b149d995fb6c 100644 --- a/chart2/source/controller/inc/ItemConverter.hxx +++ b/chart2/source/controller/inc/ItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ItemConverter.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-10-07 15:39:51 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:17 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,9 +78,7 @@ class SfxItemPropertyMap; -namespace chart -{ -namespace wrapper +namespace comphelper { /** This class serves for conversion between properties of an XPropertySet and @@ -97,6 +95,26 @@ namespace wrapper FillSpecialItem and ApplySpecialItem may be used for special handling of individual item, e.g. if you need member-ids in QueryValue/PutValue + + A typical use could be the following: + + ::comphelper::ChartTypeItemConverter aItemConverter( xPropertySet, GetItemPool() ); + SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet(); + aItemConverter.FillItemSet( aItemSet ); + bool bChanged = false; + + MyDialog aDlg( aItemSet ); + if( aDlg.Execute() == RET_OK ) + { + const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet(); + if( pOutItemSet ) + bChanged = aItemConverter.ApplyItemSet( *pOutItemSet ); + } + + if( bChanged ) + { + [ apply model changes to view ] + } */ class ItemConverter : public ::utl::OEventListenerAdapter @@ -222,8 +240,7 @@ private: bool m_bIsValid; }; -} // namespace wrapper -} // namespace chart +} // namespace comphelper // CHART_ITEMCONVERTER_HXX #endif diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx index 7fb51e46fe2b..486bd34a9dae 100644 --- a/chart2/source/controller/inc/ItemPropertyMap.hxx +++ b/chart2/source/controller/inc/ItemPropertyMap.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ItemPropertyMap.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:18 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,9 +63,7 @@ #include "InlineContainer.hxx" -namespace chart -{ -namespace wrapper +namespace comphelper { typedef ::std::map< USHORT, ::rtl::OUString > ItemPropertyMapType; @@ -112,8 +110,7 @@ struct DeleteItemConverterPtr : public ::std::unary_function< void, ItemConverte { delete pConv; } }; -} // namespace wrapper -} // namespace chart +} // namespace comphelper // CHART_ITEMPROPERTYMAP_HXX #endif diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx new file mode 100644 index 000000000000..9cf11e4ea374 --- /dev/null +++ b/chart2/source/controller/inc/MultipleChartConverters.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * $RCSfile: MultipleChartConverters.hxx,v $ + * + * $Revision: 1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-07 17:18:18 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART2_MULTIPLECHARTCONVERTERS_HXX +#define CHART2_MULTIPLECHARTCONVERTERS_HXX + +#include "MultipleItemConverter.hxx" + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class AllAxisItemConverter : public ::comphelper::MultipleItemConverter +{ +public: + AllAxisItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllAxisItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +class AllGridItemConverter : public ::comphelper::MultipleItemConverter +{ +public: + AllGridItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllGridItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +class AllDataLabelItemConverter : public ::comphelper::MultipleItemConverter +{ +public: + AllDataLabelItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllDataLabelItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +} // namespace wrapper +} // namespace chart + +// CHART2_MULTIPLECHARTCONVERTERS_HXX +#endif diff --git a/chart2/source/controller/inc/MultipleItemConverter.hxx b/chart2/source/controller/inc/MultipleItemConverter.hxx index 31b690b9412c..bec5f0d37f2b 100644 --- a/chart2/source/controller/inc/MultipleItemConverter.hxx +++ b/chart2/source/controller/inc/MultipleItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: MultipleItemConverter.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-10-07 15:39:52 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,13 +69,11 @@ #include <vector> -class SdrModel; - -namespace chart -{ -namespace wrapper +namespace comphelper { +/** Note: virtual const USHORT * GetWhichPairs() const; is still pure virtual + */ class MultipleItemConverter : public ItemConverter { public: @@ -93,49 +91,6 @@ protected: ::std::vector< ItemConverter * > m_aConverters; }; -class AllAxisItemConverter : public MultipleItemConverter -{ -public: - AllAxisItemConverter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > & xChartModel, - SfxItemPool& rItemPool, - SdrModel& rDrawModel ); - virtual ~AllAxisItemConverter(); - -protected: - virtual const USHORT * GetWhichPairs() const; -}; - -class AllGridItemConverter : public MultipleItemConverter -{ -public: - AllGridItemConverter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > & xChartModel, - SfxItemPool& rItemPool, - SdrModel& rDrawModel ); - virtual ~AllGridItemConverter(); - -protected: - virtual const USHORT * GetWhichPairs() const; -}; - -class AllDataLabelItemConverter : public MultipleItemConverter -{ -public: - AllDataLabelItemConverter( - const ::com::sun::star::uno::Reference< - ::com::sun::star::frame::XModel > & xChartModel, - SfxItemPool& rItemPool, - SdrModel& rDrawModel ); - virtual ~AllDataLabelItemConverter(); - -protected: - virtual const USHORT * GetWhichPairs() const; -}; - -} // namespace wrapper -} // namespace chart +} // namespace comphelper #endif diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx index 1168d3290dbf..3d9cf37265f2 100644 --- a/chart2/source/controller/inc/TitleItemConverter.hxx +++ b/chart2/source/controller/inc/TitleItemConverter.hxx @@ -2,9 +2,9 @@ * * $RCSfile: TitleItemConverter.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * last change: $Author: bm $ $Date: 2003-10-07 17:18:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,7 +73,7 @@ namespace wrapper { class TitleItemConverter : - public ItemConverter + public ::comphelper::ItemConverter { public: TitleItemConverter( |