diff options
Diffstat (limited to 'chart2/source/model/inc')
-rw-r--r-- | chart2/source/model/inc/BaseCoordinateSystem.hxx | 193 | ||||
-rw-r--r-- | chart2/source/model/inc/CartesianCoordinateSystem.hxx | 96 | ||||
-rw-r--r-- | chart2/source/model/inc/ChartTypeManager.hxx | 90 | ||||
-rw-r--r-- | chart2/source/model/inc/DataSeries.hxx | 233 | ||||
-rw-r--r-- | chart2/source/model/inc/DataSeriesTree.hxx | 94 | ||||
-rw-r--r-- | chart2/source/model/inc/Diagram.hxx | 244 | ||||
-rw-r--r-- | chart2/source/model/inc/PolarCoordinateSystem.hxx | 96 | ||||
-rw-r--r-- | chart2/source/model/inc/StockBar.hxx | 122 | ||||
-rw-r--r-- | chart2/source/model/inc/XMLFilter.hxx | 226 | ||||
-rw-r--r-- | chart2/source/model/inc/_serviceregistration_charttypes.hxx | 43 |
10 files changed, 1437 insertions, 0 deletions
diff --git a/chart2/source/model/inc/BaseCoordinateSystem.hxx b/chart2/source/model/inc/BaseCoordinateSystem.hxx new file mode 100644 index 000000000000..6b7584c71215 --- /dev/null +++ b/chart2/source/model/inc/BaseCoordinateSystem.hxx @@ -0,0 +1,193 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART_COORDINATESYSTEM_HXX +#define CHART_COORDINATESYSTEM_HXX + +#include "ServiceMacros.hxx" +#include "OPropertySet.hxx" +#include "MutexContainer.hxx" +#include <cppuhelper/implbase6.hxx> +#include <comphelper/uno3.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/chart2/XCoordinateSystem.hpp> +#include <com/sun/star/chart2/XChartTypeContainer.hpp> +#include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/util/XModifyListener.hpp> + +#include <vector> + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper6 + < ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::chart2::XCoordinateSystem, + ::com::sun::star::chart2::XChartTypeContainer, + ::com::sun::star::util::XCloneable, + ::com::sun::star::util::XModifyBroadcaster, + ::com::sun::star::util::XModifyListener > + BaseCoordinateSystem_Base; +} + +class BaseCoordinateSystem : + public impl::BaseCoordinateSystem_Base, + public MutexContainer, + public ::property::OPropertySet +{ +public: + BaseCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext, + sal_Int32 nDimensionCount = 2, + sal_Bool bSwapXAndYAxis = sal_False ); + explicit BaseCoordinateSystem( const BaseCoordinateSystem & rSource ); + virtual ~BaseCoordinateSystem(); + + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + // ____ XCoordinateSystem ____ + virtual ::sal_Int32 SAL_CALL getDimension() + throw (::com::sun::star::uno::RuntimeException); + // not implemented +// virtual ::rtl::OUString SAL_CALL getCoordinateSystemType() +// throw (::com::sun::star::uno::RuntimeException); + // not implemented +// virtual ::rtl::OUString SAL_CALL getViewServiceName() +// throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setAxisByDimension( + ::sal_Int32 nDimension, + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis >& xAxis, + ::sal_Int32 nIndex ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > SAL_CALL getAxisByDimension( + ::sal_Int32 nDimension, ::sal_Int32 nIndex ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + virtual ::sal_Int32 SAL_CALL getMaximumAxisIndexByDimension( ::sal_Int32 nDimension ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + + // ____ XChartTypeContainer ____ + virtual void SAL_CALL addChartType( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& aChartType ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChartType( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType >& aChartType ) + 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::XChartType > > SAL_CALL getChartTypes() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setChartTypes( + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartType > >& aChartTypes ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // ____ XCloneable ____ + // not implemented +// virtual ::com::sun::star::uno::Reference< +// ::com::sun::star::util::XCloneable > SAL_CALL createClone() +// throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceInfo ____ + // not implemented +// virtual ::rtl::OUString SAL_CALL getImplementationName() +// throw (::com::sun::star::uno::RuntimeException); +// virtual ::sal_Bool SAL_CALL supportsService( +// const ::rtl::OUString& ServiceName ) +// throw (::com::sun::star::uno::RuntimeException); +// virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames() +// throw (::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); + + // ____ OPropertySet ____ + virtual void firePropertyChangeEvent(); + using OPropertySet::disposing; + + void fireModifyEvent(); + +protected: + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > m_xContext; + + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder; + +private: + sal_Int32 m_nDimensionCount; + typedef ::std::vector< ::std::vector< ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XAxis > > > tAxisVecVecType; + tAxisVecVecType m_aAllAxis; //outer sequence is the dimension; inner sequence is the axis index that indicates main or secondary axis + ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any > m_aOrigin; + ::std::vector< ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XChartType > > m_aChartTypes; +}; + +} // namespace chart + +// CHART_COORDINATESYSTEM_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/CartesianCoordinateSystem.hxx b/chart2/source/model/inc/CartesianCoordinateSystem.hxx new file mode 100644 index 000000000000..838435e48d03 --- /dev/null +++ b/chart2/source/model/inc/CartesianCoordinateSystem.hxx @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CHART_CARTESIANCOORDINATESYSTEM_HXX +#define _CHART_CARTESIANCOORDINATESYSTEM_HXX + +#include "ServiceMacros.hxx" +#include "BaseCoordinateSystem.hxx" + +namespace chart +{ + +class CartesianCoordinateSystem : public BaseCoordinateSystem +{ +public: + explicit CartesianCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext, + sal_Int32 nDimensionCount = 2, + sal_Bool bSwapXAndYAxis = sal_False ); + explicit CartesianCoordinateSystem( const CartesianCoordinateSystem & rSource ); + virtual ~CartesianCoordinateSystem(); + + // ____ XCoordinateSystem ____ + virtual ::rtl::OUString SAL_CALL getCoordinateSystemType() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getViewServiceName() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XCloneable ____ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::util::XCloneable > SAL_CALL createClone() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceInfo ____ + APPHELPER_XSERVICEINFO_DECL() +}; + +class CartesianCoordinateSystem2d : public CartesianCoordinateSystem +{ +public: + explicit CartesianCoordinateSystem2d( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~CartesianCoordinateSystem2d(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( CartesianCoordinateSystem2d ) + // ____ XServiceInfo ____ + APPHELPER_XSERVICEINFO_DECL() +}; + +class CartesianCoordinateSystem3d : public CartesianCoordinateSystem +{ +public: + explicit CartesianCoordinateSystem3d( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~CartesianCoordinateSystem3d(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( CartesianCoordinateSystem3d ) + // ____ XServiceInfo ____ + APPHELPER_XSERVICEINFO_DECL() +}; + +} // namespace chart + +// _CHART_CARTESIANCOORDINATESYSTEM_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/ChartTypeManager.hxx b/chart2/source/model/inc/ChartTypeManager.hxx new file mode 100644 index 000000000000..1cc8794de423 --- /dev/null +++ b/chart2/source/model/inc/ChartTypeManager.hxx @@ -0,0 +1,90 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART_CHARTTYPEMANAGER_HXX +#define CHART_CHARTTYPEMANAGER_HXX + +#include "OPropertySet.hxx" +#include "MutexContainer.hxx" +#include <cppuhelper/implbase2.hxx> +#include <comphelper/uno3.hxx> +#include "ServiceMacros.hxx" +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XMultiServiceFactory.hpp> + +#include <com/sun/star/chart2/XChartTypeManager.hpp> + +namespace chart +{ + +class ChartTypeManager : + public ::cppu::WeakImplHelper2< + ::com::sun::star::lang::XMultiServiceFactory, +// ::com::sun::star::lang::XMultiComponentFactory, + ::com::sun::star::chart2::XChartTypeManager > +{ +public: + explicit ChartTypeManager( + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~ChartTypeManager(); + + APPHELPER_XSERVICEINFO_DECL() + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( ChartTypeManager ) + +protected: + // ____ XMultiServiceFactory ____ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier ) + throw (::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments( + const ::rtl::OUString& ServiceSpecifier, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any >& Arguments ) + throw (::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Sequence< + ::rtl::OUString > SAL_CALL getAvailableServiceNames() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XChartTypeManager ____ + // currently empty + +private: + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; +}; + +} // namespace chart + +// CHART_CHARTTYPEMANAGER_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/DataSeries.hxx b/chart2/source/model/inc/DataSeries.hxx new file mode 100644 index 000000000000..28285cc1bdcc --- /dev/null +++ b/chart2/source/model/inc/DataSeries.hxx @@ -0,0 +1,233 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CHART_DATASERIES_HXX +#define _CHART_DATASERIES_HXX + +// UNO types +#include <com/sun/star/chart2/XDataSeries.hpp> +#include <com/sun/star/chart2/data/XDataSink.hpp> +#include <com/sun/star/chart2/data/XDataSource.hpp> +#include <com/sun/star/chart2/XRegressionCurveContainer.hpp> +#include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +#include <com/sun/star/container/XIndexContainer.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> + +// helper classes +#include "ServiceMacros.hxx" +#include <cppuhelper/implbase8.hxx> +#include <comphelper/uno3.hxx> +#include <osl/mutex.hxx> + +// STL +#include <vector> +#include <map> + +#include "MutexContainer.hxx" +#include "OPropertySet.hxx" + +namespace com { namespace sun { namespace star { namespace style { + class XStyle; +}}}} + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper8< + ::com::sun::star::chart2::XDataSeries, + ::com::sun::star::chart2::data::XDataSink, + ::com::sun::star::chart2::data::XDataSource, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::chart2::XRegressionCurveContainer, + ::com::sun::star::util::XCloneable, + ::com::sun::star::util::XModifyBroadcaster, + ::com::sun::star::util::XModifyListener > + DataSeries_Base; +} + +class DataSeries : + public MutexContainer, + public impl::DataSeries_Base, + public ::property::OPropertySet +{ +public: + explicit DataSeries( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~DataSeries(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( DataSeries ) + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + explicit DataSeries( const DataSeries & rOther ); + + // late initialization to call after copy-constructing + void Init( const DataSeries & rOther ); + + // ____ XDataSeries ____ + // _____________________ + /// @see ::com::sun::star::chart2::XDataSeries + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > + SAL_CALL getDataPointByIndex( sal_Int32 nIndex ) + throw (::com::sun::star::lang::IndexOutOfBoundsException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL resetDataPoint( sal_Int32 nIndex ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL resetAllDataPoints() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XDataSink ____ + // ___________________ + /// @see ::com::sun::star::chart2::data::XDataSink + virtual void SAL_CALL setData( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > >& aData ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XDataSource ____ + // _____________________ + /// @see ::com::sun::star::chart2::data::XDataSource + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XLabeledDataSequence > > SAL_CALL getDataSequences() + throw (::com::sun::star::uno::RuntimeException); + + // ____ OPropertySet ____ + // ______________________ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + virtual void SAL_CALL getFastPropertyValue( ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; + virtual void SAL_CALL setFastPropertyValue_NoBroadcast + ( sal_Int32 nHandle, + const ::com::sun::star::uno::Any& rValue ) + throw (::com::sun::star::uno::Exception); + + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + // ______________________ + /// @see ::com::sun::star::beans::XPropertySet + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + /// make original interface function visible again + using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue; + + // ____ XRegressionCurveContainer ____ + // ___________________________________ + /// @see ::com::sun::star::chart2::XRegressionCurveContainer + virtual void SAL_CALL addRegressionCurve( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XRegressionCurve >& aRegressionCurve ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeRegressionCurve( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XRegressionCurve >& aRegressionCurve ) + 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::XRegressionCurve > > SAL_CALL getRegressionCurves() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setRegressionCurves( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XRegressionCurve > >& aRegressionCurves ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ XCloneable ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() + throw (::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); + + // ____ OPropertySet ____ + virtual void firePropertyChangeEvent(); + using OPropertySet::disposing; + + void fireModifyEvent(); + + /** const variant of getInfoHelper() + */ + ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelperConst() const; + +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::data::XLabeledDataSequence > > tDataSequenceContainer; + tDataSequenceContainer m_aDataSequences; + + typedef ::std::map< sal_Int32, + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > > tDataPointAttributeContainer; + tDataPointAttributeContainer m_aAttributedDataPoints; + + typedef + ::std::vector< ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XRegressionCurve > > + tRegressionCurveContainerType; + tRegressionCurveContainerType m_aRegressionCurves; + + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder; +}; + +} // namespace chart + +// _CHART_DATASERIES_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/DataSeriesTree.hxx b/chart2/source/model/inc/DataSeriesTree.hxx new file mode 100644 index 000000000000..cca19bf49071 --- /dev/null +++ b/chart2/source/model/inc/DataSeriesTree.hxx @@ -0,0 +1,94 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART_DATASERIESTREE_HXX +#define CHART_DATASERIESTREE_HXX + +#include <cppuhelper/implbase2.hxx> + +#include "ServiceMacros.hxx" +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/chart2/XDataSeriesTreeParent.hpp> + +#include <vector> + +namespace chart +{ + +class DataSeriesTree : public + ::cppu::WeakImplHelper2< + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::chart2::XDataSeriesTreeParent > +{ +public: + DataSeriesTree( const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~DataSeriesTree(); + + /// declare XServiceInfo methods + APPHELPER_XSERVICEINFO_DECL() + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( DataSeriesTree ) + +protected: + + // ____ XDataSeriesTreeParent ____ + virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode > > + SAL_CALL getChildren() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setChildren( + const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode > >& aNewChildren ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL addChild( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeChild( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) + throw (::com::sun::star::container::NoSuchElementException, + ::com::sun::star::uno::RuntimeException); + + // ____ XDataSeriesTreeNode ____ + +private: + typedef ::std::vector< ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeriesTreeNode > > + m_tChildType; + + m_tChildType m_aChildren; + + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > + m_xContext; +}; + +} // namespace chart + +// CHART_DATASERIESTREE_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx new file mode 100644 index 000000000000..3b9a077ff7a4 --- /dev/null +++ b/chart2/source/model/inc/Diagram.hxx @@ -0,0 +1,244 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART_DIAGRAM_HXX +#define CHART_DIAGRAM_HXX + +#include "OPropertySet.hxx" +#include "MutexContainer.hxx" +#include <cppuhelper/implbase8.hxx> +#include <comphelper/uno3.hxx> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/chart2/XDiagram.hpp> +#include <com/sun/star/chart2/XCoordinateSystemContainer.hpp> +#include <com/sun/star/chart2/XTitled.hpp> +#include <com/sun/star/chart/X3DDefaultSetter.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/util/XModifyListener.hpp> + +#include "ServiceMacros.hxx" + +#include <map> +#include <vector> + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper8< + ::com::sun::star::chart2::XDiagram, + ::com::sun::star::lang::XServiceInfo, + ::com::sun::star::chart2::XCoordinateSystemContainer, + ::com::sun::star::chart2::XTitled, + ::com::sun::star::chart::X3DDefaultSetter, + ::com::sun::star::util::XModifyBroadcaster, + ::com::sun::star::util::XModifyListener, + ::com::sun::star::util::XCloneable > + Diagram_Base; +} + +class Diagram : + public MutexContainer, + public impl::Diagram_Base, + public ::property::OPropertySet +{ +public: + Diagram( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~Diagram(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( Diagram ) + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + /// merge XTypeProvider implementations + DECLARE_XTYPEPROVIDER() + +protected: + explicit Diagram( const Diagram & rOther ); + + // ____ 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(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XFastPropertySet ____ + virtual void SAL_CALL setFastPropertyValue( sal_Int32 nHandle, const ::com::sun::star::uno::Any& rValue ) + throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException); + + /// make original interface function visible again + using ::com::sun::star::beans::XFastPropertySet::getFastPropertyValue; + + virtual void SAL_CALL getFastPropertyValue( + ::com::sun::star::uno::Any& rValue, sal_Int32 nHandle ) const; + +// virtual sal_Bool SAL_CALL convertFastPropertyValue +// ( ::com::sun::star::uno::Any & rConvertedValue, +// ::com::sun::star::uno::Any & rOldValue, +// sal_Int32 nHandle, +// const ::com::sun::star::uno::Any& rValue ) +// throw (::com::sun::star::lang::IllegalArgumentException); + + // ____ XDiagram ____ +// virtual ::rtl::OUString SAL_CALL getChartTypeTemplateServiceName() +// throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > SAL_CALL getWall() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > SAL_CALL getFloor() + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XLegend > SAL_CALL getLegend() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setLegend( const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XLegend >& xLegend ) + throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XColorScheme > SAL_CALL getDefaultColorScheme() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDefaultColorScheme( + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XColorScheme >& xColorScheme ) + throw (::com::sun::star::uno::RuntimeException); + + + // ____ XCoordinateSystemContainer ____ + virtual void SAL_CALL addCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XCoordinateSystem >& aCoordSys ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL removeCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XCoordinateSystem >& aCoordSys ) + 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::XCoordinateSystem > > SAL_CALL getCoordinateSystems() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setCoordinateSystems( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XCoordinateSystem > >& aCoordinateSystems ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // ____ XTitled ____ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XTitle > SAL_CALL getTitleObject() + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setTitleObject( const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XTitle >& Title ) + throw (::com::sun::star::uno::RuntimeException); + + // ____ X3DDefaultSetter ____ + virtual void SAL_CALL set3DSettingsToDefault() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDefaultRotation() throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL setDefaultIllumination() throw (::com::sun::star::uno::RuntimeException); + + // ____ XCloneable ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() + throw (::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); + + // ____ OPropertySet ____ + virtual void firePropertyChangeEvent(); + using OPropertySet::disposing; + + void fireModifyEvent(); + +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::XCoordinateSystem > > + tCoordinateSystemContainerType; + + tCoordinateSystemContainerType m_aCoordSystems; + + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > + m_xWall; + + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > + m_xFloor; + + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XTitle > + m_xTitle; + + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XLegend > + m_xLegend; + + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XColorScheme > + m_xColorScheme; + + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder; +}; + +} // namespace chart + +// CHART_DIAGRAM_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/PolarCoordinateSystem.hxx b/chart2/source/model/inc/PolarCoordinateSystem.hxx new file mode 100644 index 000000000000..8e3485e52d29 --- /dev/null +++ b/chart2/source/model/inc/PolarCoordinateSystem.hxx @@ -0,0 +1,96 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef _CHART_POLARCOORDINATESYSTEM_HXX +#define _CHART_POLARCOORDINATESYSTEM_HXX + +#include "ServiceMacros.hxx" +#include "BaseCoordinateSystem.hxx" + +namespace chart +{ + +class PolarCoordinateSystem : public BaseCoordinateSystem +{ +public: + explicit PolarCoordinateSystem( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext, + sal_Int32 nDimensionCount = 2, + sal_Bool bSwapXAndYAxis = sal_False ); + explicit PolarCoordinateSystem( const PolarCoordinateSystem & rSource ); + virtual ~PolarCoordinateSystem(); + + // ____ XCoordinateSystem ____ + virtual ::rtl::OUString SAL_CALL getCoordinateSystemType() + throw (::com::sun::star::uno::RuntimeException); + virtual ::rtl::OUString SAL_CALL getViewServiceName() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XCloneable ____ + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::util::XCloneable > SAL_CALL createClone() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XServiceInfo ____ + APPHELPER_XSERVICEINFO_DECL() +}; + +class PolarCoordinateSystem2d : public PolarCoordinateSystem +{ +public: + explicit PolarCoordinateSystem2d( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~PolarCoordinateSystem2d(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( PolarCoordinateSystem2d ) + // ____ XServiceInfo ____ + APPHELPER_XSERVICEINFO_DECL() +}; + +class PolarCoordinateSystem3d : public PolarCoordinateSystem +{ +public: + explicit PolarCoordinateSystem3d( + const ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > & xContext ); + virtual ~PolarCoordinateSystem3d(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( PolarCoordinateSystem3d ) + // ____ XServiceInfo ____ + APPHELPER_XSERVICEINFO_DECL() +}; + +} // namespace chart + +// _CHART_POLARCOORDINATESYSTEM_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/StockBar.hxx b/chart2/source/model/inc/StockBar.hxx new file mode 100644 index 000000000000..b788f1a1efe3 --- /dev/null +++ b/chart2/source/model/inc/StockBar.hxx @@ -0,0 +1,122 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART_STOCKBAR_HXX +#define CHART_STOCKBAR_HXX + +#include <com/sun/star/util/XCloneable.hpp> +#include <com/sun/star/util/XModifyBroadcaster.hpp> +#include <com/sun/star/util/XModifyListener.hpp> +#include "MutexContainer.hxx" +#include "OPropertySet.hxx" + +#include "ServiceMacros.hxx" +#include <cppuhelper/implbase3.hxx> +#include <comphelper/uno3.hxx> + +namespace chart +{ + +namespace impl +{ +typedef ::cppu::WeakImplHelper3< + ::com::sun::star::util::XCloneable, + ::com::sun::star::util::XModifyBroadcaster, + ::com::sun::star::util::XModifyListener > + StockBar_Base; +} + +class StockBar : + public MutexContainer, + public impl::StockBar_Base, + public ::property::OPropertySet +{ +public: + explicit StockBar( bool bRisingCourse ); + virtual ~StockBar(); + + + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + + /// merge XInterface implementations + DECLARE_XINTERFACE() + +protected: + explicit StockBar( const StockBar & rOther ); + + // ____ OPropertySet ____ + virtual ::com::sun::star::uno::Any GetDefaultValue( sal_Int32 nHandle ) const + throw(::com::sun::star::beans::UnknownPropertyException); + + virtual ::cppu::IPropertyArrayHelper & SAL_CALL getInfoHelper(); + + // ____ XPropertySet ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL + getPropertySetInfo() + throw (::com::sun::star::uno::RuntimeException); + + + // ____ XCloneable ____ + virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone() + throw (::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); + + // ____ OPropertySet ____ + virtual void firePropertyChangeEvent(); + using OPropertySet::disposing; + + void fireModifyEvent(); + +private: + const bool m_bRisingCourse; + ::com::sun::star::uno::Reference< ::com::sun::star::util::XModifyListener > m_xModifyEventForwarder; +}; + +} // namespace chart + +// CHART_STOCKBAR_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/XMLFilter.hxx b/chart2/source/model/inc/XMLFilter.hxx new file mode 100644 index 000000000000..0d5fc56f811b --- /dev/null +++ b/chart2/source/model/inc/XMLFilter.hxx @@ -0,0 +1,226 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART2_XMLFILTER_HXX +#define CHART2_XMLFILTER_HXX + +#include <cppuhelper/implbase4.hxx> +#include <com/sun/star/beans/XPropertySet.hpp> +#include <com/sun/star/document/XFilter.hpp> +#include <com/sun/star/document/XImporter.hpp> +#include <com/sun/star/document/XExporter.hpp> +#include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/io/XActiveDataSource.hpp> +#include <osl/mutex.hxx> + +// for APPHELPER_... macros +#include "ServiceMacros.hxx" + +namespace com { namespace sun { namespace star { +namespace embed +{ + class XStorage; +} +namespace xml { namespace sax +{ + class XParser; +}} +namespace document +{ + class XGraphicObjectResolver; +} +}}} + +namespace chart +{ + +class XMLFilter : public + ::cppu::WeakImplHelper4< + ::com::sun::star::document::XFilter, + ::com::sun::star::document::XExporter, + ::com::sun::star::document::XImporter, + ::com::sun::star::lang::XServiceInfo > +{ +public: + explicit XMLFilter( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & xContext ); + virtual ~XMLFilter(); + + /// establish methods for factory instatiation + APPHELPER_SERVICE_FACTORY_HELPER( XMLFilter ) + /// XServiceInfo declarations + APPHELPER_XSERVICEINFO_DECL() + +protected: + // ____ XFilter ____ + virtual sal_Bool SAL_CALL filter( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& aDescriptor ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL cancel() + throw (::com::sun::star::uno::RuntimeException); + + // ____ XImporter ____ + virtual void SAL_CALL setTargetDocument( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent >& Document ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + // ____ XExporter ____ + virtual void SAL_CALL setSourceDocument( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent >& Document ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + + inline ::rtl::OUString getDocumentHandler() const { return m_sDocumentHandler; } + inline void setDocumentHandler(const ::rtl::OUString& _sDocumentHandler) { m_sDocumentHandler = _sDocumentHandler; } + + virtual ::rtl::OUString getMediaType(bool _bOasis); + + /** fills the oasis flag only when a filtername was set + * + * \param _rMediaDescriptor + * \param _rOutOASIS + */ + virtual void isOasisFormat(const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& _rMediaDescriptor, bool & _rOutOASIS ); + +private: + // methods + + /// @return a warning code, or 0 for successful operation + sal_Int32 impl_Import( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent > & xDocumentComp, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > & aMediaDescriptor ); + /// @return a warning code, or 0 for successful operation + sal_Int32 impl_ImportStream( + const ::rtl::OUString & rStreamName, + const ::rtl::OUString & rServiceName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::embed::XStorage > & xStorage, + const ::com::sun::star::uno::Reference< + ::com::sun::star::xml::sax::XParser > & xParser, + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiComponentFactory > & xFactory, + const ::com::sun::star::uno::Reference< + ::com::sun::star::document::XGraphicObjectResolver > & xGraphicObjectResolver, + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet >& xPropSet ); + + /// @return a warning code, or 0 for successful operation + sal_Int32 impl_Export( const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent > & xDocumentComp, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue > & aMediaDescriptor ); + /// @return a warning code, or 0 for successful operation + sal_Int32 impl_ExportStream( + const ::rtl::OUString & rStreamName, + const ::rtl::OUString & rServiceName, + const ::com::sun::star::uno::Reference< + ::com::sun::star::embed::XStorage > & xStorage, + const ::com::sun::star::uno::Reference< + ::com::sun::star::io::XActiveDataSource >& xActiveDataSource, + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XMultiServiceFactory > & xFactory, + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Any > & rFilterProperties ); + + // members + ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > m_xContext; + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent > m_xTargetDoc; + ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent > m_xSourceDoc; + ::rtl::OUString m_sDocumentHandler; // when set it will be set as doc handler + + volatile bool m_bCancelOperation; + ::osl::Mutex m_aMutex; +}; + +// ============================================================================= +class XMLReportFilterHelper : public XMLFilter +{ + virtual void isOasisFormat(const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& _rMediaDescriptor, bool & _rOutOASIS ); +public: + explicit XMLReportFilterHelper( ::com::sun::star::uno::Reference< + ::com::sun::star::uno::XComponentContext > const & _xContext ) + :XMLFilter(_xContext) + {} + /// establish methods for factory instatiation + static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL create( + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext) throw(::com::sun::star::uno::Exception) + { + return (::cppu::OWeakObject *)new XMLReportFilterHelper( xContext ); + } + static ::rtl::OUString getImplementationName_Static() + { + return ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.chart2.report.XMLFilter" )); + } +protected: + virtual ::rtl::OUString SAL_CALL + getImplementationName() + throw( ::com::sun::star::uno::RuntimeException ) + { + return getImplementationName_Static(); + } + // ____ XImporter ____ + virtual void SAL_CALL setTargetDocument( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent >& Document ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException) + { + setDocumentHandler(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ImportDocumentHandler"))); + XMLFilter::setTargetDocument(Document); + } + + // ____ XExporter ____ + virtual void SAL_CALL setSourceDocument( + const ::com::sun::star::uno::Reference< + ::com::sun::star::lang::XComponent >& Document ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException) + { + setDocumentHandler(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.comp.report.ExportDocumentHandler"))); + XMLFilter::setSourceDocument(Document); + } + + virtual ::rtl::OUString getMediaType(bool _bOasis); +}; + +} // namespace chart + +// CHART2_XMLFILTER_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/chart2/source/model/inc/_serviceregistration_charttypes.hxx b/chart2/source/model/inc/_serviceregistration_charttypes.hxx new file mode 100644 index 000000000000..16875daaceb9 --- /dev/null +++ b/chart2/source/model/inc/_serviceregistration_charttypes.hxx @@ -0,0 +1,43 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/************************************************************************* + * + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * Copyright 2000, 2010 Oracle and/or its affiliates. + * + * OpenOffice.org - a multi-platform office productivity suite + * + * This file is part of OpenOffice.org. + * + * OpenOffice.org is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License version 3 + * only, as published by the Free Software Foundation. + * + * OpenOffice.org 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 version 3 for more details + * (a copy is included in the LICENSE file that accompanied this code). + * + * You should have received a copy of the GNU Lesser General Public License + * version 3 along with OpenOffice.org. If not, see + * <http://www.openoffice.org/license.html> + * for a copy of the LGPLv3 License. + * + ************************************************************************/ +#ifndef CHART2__SERVICEREGISTRATION_CHARTTYPES_HXX +#define CHART2__SERVICEREGISTRATION_CHARTTYPES_HXX + +#include <cppuhelper/implementationentry.hxx> + +class ChartTypeEntriesForServiceRegistration +{ +public: + static struct ::cppu::ImplementationEntry* + getImplementationEntries(); +}; + +// CHART2__SERVICEREGISTRATION_CHARTTYPES_HXX +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |