diff options
author | Björn Milcke <bm@openoffice.org> | 2004-01-26 08:13:31 +0000 |
---|---|---|
committer | Björn Milcke <bm@openoffice.org> | 2004-01-26 08:13:31 +0000 |
commit | 3fe1d17a07180c843fd376763e27c72a529b75b2 (patch) | |
tree | 585d2722e8c23653efed23273d6ca7aae2e20e48 /chart2/source/model | |
parent | ae900510614be862923fdc70e47dc7ccccb894d4 (diff) |
drafts namespace of API removed
public API moved to offapi
Calc as DataEditor - first integration
Diffstat (limited to 'chart2/source/model')
60 files changed, 1172 insertions, 698 deletions
diff --git a/chart2/source/model/inc/CartesianCoordinateSystem.hxx b/chart2/source/model/inc/CartesianCoordinateSystem.hxx index 6fcfcbda575f..8942c054260b 100644 --- a/chart2/source/model/inc/CartesianCoordinateSystem.hxx +++ b/chart2/source/model/inc/CartesianCoordinateSystem.hxx @@ -2,9 +2,9 @@ * * $RCSfile: CartesianCoordinateSystem.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: iha $ $Date: 2004-01-17 13:09:50 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:19 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCOORDINATESYSTEM_HPP_ -#include <drafts/com/sun/star/chart2/XCoordinateSystem.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCOORDINATESYSTEM_HPP_ +#include <com/sun/star/chart2/XCoordinateSystem.hpp> #endif namespace chart @@ -79,7 +79,7 @@ namespace chart class CartesianCoordinateSystem : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::chart2::XCoordinateSystem + ::com::sun::star::chart2::XCoordinateSystem > { public: @@ -88,13 +88,13 @@ public: // ____ XCoordinateSystem ____ // ___________________________ - /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationToCartesian() + /// @see ::com::sun::star::chart2::XCoordinateSystem + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationToCartesian() throw (::com::sun::star::uno::RuntimeException); - /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationFromCartesian() + /// @see ::com::sun::star::chart2::XCoordinateSystem + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationFromCartesian() throw (::com::sun::star::uno::RuntimeException); - /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem + /// @see ::com::sun::star::chart2::XCoordinateSystem virtual sal_Int32 SAL_CALL getDimension() throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getCoordinateSystemType() throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getViewServiceName() throw (::com::sun::star::uno::RuntimeException); @@ -102,9 +102,9 @@ public: APPHELPER_XSERVICEINFO_DECL() private: - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > m_aTransformationToCartesian; - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > m_aTransformationFromCartesian; sal_Int32 m_nDim; }; diff --git a/chart2/source/model/inc/ChartTypeManager.hxx b/chart2/source/model/inc/ChartTypeManager.hxx index ef59d5d53c16..762e4b6ae337 100644 --- a/chart2/source/model/inc/ChartTypeManager.hxx +++ b/chart2/source/model/inc/ChartTypeManager.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartTypeManager.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:29 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,7 +86,7 @@ // #include <com/sun/star/lang/XMultiComponentFactory.hpp> // #endif -#include <drafts/com/sun/star/chart2/XChartTypeManager.hpp> +#include <com/sun/star/chart2/XChartTypeManager.hpp> // #include <map> @@ -98,7 +98,7 @@ namespace impl typedef ::cppu::WeakImplHelper2< ::com::sun::star::lang::XMultiServiceFactory, // ::com::sun::star::lang::XMultiComponentFactory, - ::drafts::com::sun::star::chart2::XChartTypeManager > + ::com::sun::star::chart2::XChartTypeManager > ChartTypeManager_Base; } diff --git a/chart2/source/model/inc/DataSeriesTree.hxx b/chart2/source/model/inc/DataSeriesTree.hxx index cc560325a4a8..72918789ccf1 100644 --- a/chart2/source/model/inc/DataSeriesTree.hxx +++ b/chart2/source/model/inc/DataSeriesTree.hxx @@ -2,9 +2,9 @@ * * $RCSfile: DataSeriesTree.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:20 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,8 +73,8 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIESTREEPARENT_HPP_ -#include <drafts/com/sun/star/chart2/XDataSeriesTreeParent.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATASERIESTREEPARENT_HPP_ +#include <com/sun/star/chart2/XDataSeriesTreeParent.hpp> #endif #include <vector> @@ -85,7 +85,7 @@ namespace chart class DataSeriesTree : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > + ::com::sun::star::chart2::XDataSeriesTreeParent > { public: DataSeriesTree( const ::com::sun::star::uno::Reference< @@ -100,15 +100,15 @@ public: protected: // ____ XDataSeriesTreeParent ____ - virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > > + 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 addChild( - const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) + 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< ::drafts::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeNode >& aNode ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); @@ -116,7 +116,7 @@ protected: private: typedef ::std::vector< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > > + ::com::sun::star::chart2::XDataSeriesTreeNode > > m_tChildType; m_tChildType m_aChildren; diff --git a/chart2/source/model/inc/Diagram.hxx b/chart2/source/model/inc/Diagram.hxx index 506d730ddcf2..19027b7d36f6 100644 --- a/chart2/source/model/inc/Diagram.hxx +++ b/chart2/source/model/inc/Diagram.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Diagram.hxx,v $ * - * $Revision: 1.7 $ + * $Revision: 1.8 $ * - * last change: $Author: bm $ $Date: 2003-12-09 16:27:52 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,26 +78,23 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ -#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <com/sun/star/chart2/XDiagram.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTELEMENT_HPP_ -#include <drafts/com/sun/star/chart2/XChartElement.hpp> +#ifndef _COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <com/sun/star/chart2/XAxisContainer.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ -#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#ifndef _COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ +#include <com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ -#include <drafts/com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> +#ifndef _COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <com/sun/star/chart2/XGridContainer.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ -#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#ifndef _COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <com/sun/star/chart2/XTitled.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ -#include <drafts/com/sun/star/chart2/XTitled.hpp> -#endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ -#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#ifndef _COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <com/sun/star/chart2/XIdentifiable.hpp> #endif #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ #include <com/sun/star/uno/XComponentContext.hpp> @@ -115,13 +112,13 @@ namespace chart namespace impl { typedef ::cppu::WeakImplHelper7< - ::drafts::com::sun::star::chart2::XDiagram, + ::com::sun::star::chart2::XDiagram, ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::chart2::XAxisContainer, - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer, - ::drafts::com::sun::star::chart2::XGridContainer, - ::drafts::com::sun::star::chart2::XTitled, - ::drafts::com::sun::star::chart2::XIdentifiable > + ::com::sun::star::chart2::XAxisContainer, + ::com::sun::star::chart2::XBoundedCoordinateSystemContainer, + ::com::sun::star::chart2::XGridContainer, + ::com::sun::star::chart2::XTitled, + ::com::sun::star::chart2::XIdentifiable > Diagram_Base; } @@ -167,11 +164,11 @@ protected: // throw (::com::sun::star::lang::IllegalArgumentException); // ____ XDiagram ____ - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeParent > SAL_CALL getTree() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTree( - const ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSeriesTreeParent >& xTree ) + const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSeriesTreeParent >& xTree ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); // virtual ::rtl::OUString SAL_CALL getChartTypeTemplateServiceName() @@ -183,74 +180,74 @@ protected: ::com::sun::star::beans::XPropertySet > SAL_CALL getFloor() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XLegend > SAL_CALL getLegend() + ::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< - ::drafts::com::sun::star::chart2::XLegend >& xLegend ) + ::com::sun::star::chart2::XLegend >& xLegend ) throw (::com::sun::star::uno::RuntimeException); // ____ XAxisContainer ____ virtual void SAL_CALL addAxis( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XAxis >& aAxis ) + ::com::sun::star::chart2::XAxis >& aAxis ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeAxis( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XAxis >& aAxis ) + ::com::sun::star::chart2::XAxis >& aAxis ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XAxis > > SAL_CALL getAxes() + ::com::sun::star::chart2::XAxis > > SAL_CALL getAxes() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XAxis > SAL_CALL getAxisByIdentifier( + ::com::sun::star::chart2::XAxis > SAL_CALL getAxisByIdentifier( const ::rtl::OUString& aIdentifier ) throw (::com::sun::star::uno::RuntimeException); // ____ XBoundedCoordinateSystemContainer ____ virtual void SAL_CALL addCoordinateSystem( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& aCoordSys ) + ::com::sun::star::chart2::XBoundedCoordinateSystem >& aCoordSys ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeCoordinateSystem( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& aCoordSys ) + ::com::sun::star::chart2::XBoundedCoordinateSystem >& aCoordSys ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > > SAL_CALL getCoordinateSystems() + ::com::sun::star::chart2::XBoundedCoordinateSystem > > SAL_CALL getCoordinateSystems() throw (::com::sun::star::uno::RuntimeException); // ____ XGridContainer ____ virtual void SAL_CALL addGrid( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XGrid >& aGrid ) + ::com::sun::star::chart2::XGrid >& aGrid ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL removeGrid( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XGrid >& aGrid ) + ::com::sun::star::chart2::XGrid >& aGrid ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XGrid > > SAL_CALL getGrids() + ::com::sun::star::chart2::XGrid > > SAL_CALL getGrids() throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XGrid > SAL_CALL getGridByIdentifier( + ::com::sun::star::chart2::XGrid > SAL_CALL getGridByIdentifier( const ::rtl::OUString& aIdentifier ) throw (::com::sun::star::uno::RuntimeException); // ____ XTitled ____ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle > SAL_CALL getTitle() + ::com::sun::star::chart2::XTitle > SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTitle( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle >& Title ) + ::com::sun::star::chart2::XTitle >& Title ) throw (::com::sun::star::uno::RuntimeException); // ____ XIdentifiable ____ @@ -262,27 +259,27 @@ private: ::com::sun::star::uno::XComponentContext > m_xContext; ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > m_xSeriesTree; + ::com::sun::star::chart2::XDataSeriesTreeParent > m_xSeriesTree; typedef ::std::map< ::rtl::OUString, - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XAxis > > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XAxis > > tAxisContainerType; typedef ::std::map< ::rtl::OUString, - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XGrid > > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XGrid > > tGridContainerType; tAxisContainerType m_aAxes; tGridContainerType m_aGrids; // ::std::set< ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > > +// ::com::sun::star::chart2::XBoundedCoordinateSystem > > // m_aCoordSystems; ::std::vector< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > > + ::com::sun::star::chart2::XBoundedCoordinateSystem > > m_aCoordSystems; ::com::sun::star::uno::Reference< @@ -294,16 +291,14 @@ private: m_xFloor; ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle > + ::com::sun::star::chart2::XTitle > m_xTitle; ::rtl::OUString m_aIdentifier; ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XLegend > + ::com::sun::star::chart2::XLegend > m_xLegend; - - ::rtl::OUString m_aTemplateServiceName; }; } // namespace chart diff --git a/chart2/source/model/inc/PolarCoordinateSystem.hxx b/chart2/source/model/inc/PolarCoordinateSystem.hxx index 49f634e83cb5..0a8119b40948 100644 --- a/chart2/source/model/inc/PolarCoordinateSystem.hxx +++ b/chart2/source/model/inc/PolarCoordinateSystem.hxx @@ -2,9 +2,9 @@ * * $RCSfile: PolarCoordinateSystem.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: iha $ $Date: 2004-01-17 13:09:50 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:21 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCOORDINATESYSTEM_HPP_ -#include <drafts/com/sun/star/chart2/XCoordinateSystem.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCOORDINATESYSTEM_HPP_ +#include <com/sun/star/chart2/XCoordinateSystem.hpp> #endif namespace chart @@ -79,7 +79,7 @@ namespace chart class PolarCoordinateSystem : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::chart2::XCoordinateSystem + ::com::sun::star::chart2::XCoordinateSystem > { public: @@ -88,13 +88,13 @@ public: // ____ XCoordinateSystem ____ // ___________________________ - /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationToCartesian() + /// @see ::com::sun::star::chart2::XCoordinateSystem + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationToCartesian() throw (::com::sun::star::uno::RuntimeException); - /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationFromCartesian() + /// @see ::com::sun::star::chart2::XCoordinateSystem + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL getTransformationFromCartesian() throw (::com::sun::star::uno::RuntimeException); - /// @see ::drafts::com::sun::star::chart2::XCoordinateSystem + /// @see ::com::sun::star::chart2::XCoordinateSystem virtual sal_Int32 SAL_CALL getDimension() throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getCoordinateSystemType() throw (::com::sun::star::uno::RuntimeException); virtual ::rtl::OUString SAL_CALL getViewServiceName() throw (::com::sun::star::uno::RuntimeException); @@ -102,9 +102,9 @@ public: APPHELPER_XSERVICEINFO_DECL() private: - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > m_aTransformationToCartesian; - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > m_aTransformationFromCartesian; sal_Int32 m_nDim; }; diff --git a/chart2/source/model/main/Axis.cxx b/chart2/source/model/main/Axis.cxx index e4b416415f42..6173213c5146 100644 --- a/chart2/source/model/main/Axis.cxx +++ b/chart2/source/model/main/Axis.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Axis.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: bm $ $Date: 2003-12-09 09:25:10 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:22 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,14 +74,14 @@ #include <com/sun/star/lang/Locale.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_ALIGNMENT_HPP_ -#include <drafts/com/sun/star/layout/Alignment.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_ALIGNMENT_HPP_ +#include <com/sun/star/layout/Alignment.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_STRETCHMODE_HPP_ -#include <drafts/com/sun/star/layout/StretchMode.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_STRETCHMODE_HPP_ +#include <com/sun/star/layout/StretchMode.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ -#include <drafts/com/sun/star/chart2/NumberFormat.hpp> +#ifndef _COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ +#include <com/sun/star/chart2/NumberFormat.hpp> #endif #ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ @@ -112,7 +112,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; using ::osl::MutexGuard; @@ -476,10 +475,9 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL uno::Sequence< ::rtl::OUString > Axis::getSupportedServiceNames_Static() { - uno::Sequence< ::rtl::OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Axis" ); - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartElement" ); - aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); + uno::Sequence< ::rtl::OUString > aServices( 2 ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.Axis" ); + aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/main/Axis.hxx b/chart2/source/model/main/Axis.hxx index c81a9f953820..7f4897924654 100644 --- a/chart2/source/model/main/Axis.hxx +++ b/chart2/source/model/main/Axis.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Axis.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-12-09 09:26:02 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:23 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,14 +84,14 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ -#include <drafts/com/sun/star/chart2/XAxis.hpp> +#ifndef _COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <com/sun/star/chart2/XAxis.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ -#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#ifndef _COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <com/sun/star/chart2/XIdentifiable.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ -#include <drafts/com/sun/star/chart2/XTitled.hpp> +#ifndef _COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <com/sun/star/chart2/XTitled.hpp> #endif namespace chart @@ -100,9 +100,9 @@ namespace chart namespace impl { typedef ::cppu::WeakImplHelper4< - ::drafts::com::sun::star::chart2::XAxis, - ::drafts::com::sun::star::chart2::XIdentifiable, - ::drafts::com::sun::star::chart2::XTitled, + ::com::sun::star::chart2::XAxis, + ::com::sun::star::chart2::XIdentifiable, + ::com::sun::star::chart2::XTitled, ::com::sun::star::lang::XServiceInfo > Axis_Base; } @@ -156,21 +156,21 @@ protected: // ____ XMeter ____ virtual void SAL_CALL attachCoordinateSystem( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem >& xCoordSys, + ::com::sun::star::chart2::XBoundedCoordinateSystem >& xCoordSys, sal_Int32 nRepresentedDimension ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > SAL_CALL getCoordinateSystem() + ::com::sun::star::chart2::XBoundedCoordinateSystem > SAL_CALL getCoordinateSystem() throw (::com::sun::star::uno::RuntimeException); virtual sal_Int32 SAL_CALL getRepresentedDimension() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setIncrement( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XIncrement >& aIncrement ) + ::com::sun::star::chart2::XIncrement >& aIncrement ) throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XIncrement > SAL_CALL getIncrement() + ::com::sun::star::chart2::XIncrement > SAL_CALL getIncrement() throw (::com::sun::star::uno::RuntimeException); // ____ XIdentifiable ____ @@ -179,26 +179,26 @@ protected: // ____ XTitled ____ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle > SAL_CALL getTitle() + ::com::sun::star::chart2::XTitle > SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTitle( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle >& Title ) + ::com::sun::star::chart2::XTitle >& Title ) throw (::com::sun::star::uno::RuntimeException); private: ::rtl::OUString m_aIdentifier; ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + ::com::sun::star::chart2::XBoundedCoordinateSystem > m_xCoordinateSystem; sal_Int32 m_nRepresentedDimension; ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XIncrement > + ::com::sun::star::chart2::XIncrement > m_xIncrement; ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle > + ::com::sun::star::chart2::XTitle > m_xTitle; }; diff --git a/chart2/source/model/main/CartesianCoordinateSystem.cxx b/chart2/source/model/main/CartesianCoordinateSystem.cxx index ce8853987139..52c650719ff4 100644 --- a/chart2/source/model/main/CartesianCoordinateSystem.cxx +++ b/chart2/source/model/main/CartesianCoordinateSystem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: CartesianCoordinateSystem.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: iha $ $Date: 2004-01-17 13:09:51 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,14 +81,14 @@ CartesianCoordinateSystem::~CartesianCoordinateSystem() {} // ____ XCoordinateSystem ____ -::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL +::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL CartesianCoordinateSystem::getTransformationToCartesian() throw (RuntimeException) { return m_aTransformationToCartesian; } -::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL +::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL CartesianCoordinateSystem::getTransformationFromCartesian() throw (RuntimeException) { @@ -116,7 +116,7 @@ Sequence< OUString > CartesianCoordinateSystem::getSupportedServiceNames_Static( { Sequence< OUString > aServices; // Sequence< OUString > aServices( 1 ); -// aServices[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "drafts.com.sun.star.chart2.CoordinateSystem" )); +// aServices[ 0 ] = OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.chart2.CoordinateSystem" )); return aServices; } diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx index 6b081cc70d9d..945d88287d21 100644 --- a/chart2/source/model/main/ChartModel.cxx +++ b/chart2/source/model/main/ChartModel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartModel.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: bm $ $Date: 2003-12-18 13:55:01 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,13 +75,38 @@ #ifndef _COM_SUN_STAR_VIEW_XSELECTIONSUPPLIER_HPP_ #include <com/sun/star/view/XSelectionSupplier.hpp> #endif +#ifndef _COM_SUN_STAR_IO_XINPUTSTREAM_HPP_ +#include <com/sun/star/io/XInputStream.hpp> +#endif + +#ifndef _COM_SUN_STAR_EMBED_XEMBEDOBJECTCREATOR_HPP_ +#include <com/sun/star/embed/XEmbedObjectCreator.hpp> +#endif +#ifndef _COM_SUN_STAR_EMBED_XEMBEDPERSIST_HPP_ +#include <com/sun/star/embed/XEmbedPersist.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XSINGLESERVICEFACTORY_HPP_ +#include <com/sun/star/lang/XSingleServiceFactory.hpp> +#endif +#ifndef _COM_SUN_STAR_EMBED_EMBEDSTATES_HPP_ +#include <com/sun/star/embed/EmbedStates.hpp> +#endif +#ifndef _COM_SUN_STAR_EMBED_XCOMPONENTSUPPLIER_HPP_ +#include <com/sun/star/embed/XComponentSupplier.hpp> +#endif +#ifndef _SOT_CLSIDS_HXX +#include <sot/clsids.hxx> +#endif + +#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETDOCUMENT_HPP_ +#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> +#endif using ::com::sun::star::uno::Sequence; using ::com::sun::star::uno::Reference; using ::rtl::OUString; using ::osl::MutexGuard; -using namespace ::drafts::com::sun::star; using namespace ::com::sun::star; using namespace ::apphelper; @@ -89,6 +114,59 @@ using namespace ::apphelper; // ChartModel Constructor and Destructor //----------------------------------------------------------------- +namespace +{ +/** convert a class-id macro into a byte-sequence + call e.g. lcl_GetSequenceClassID( SO3_SC_CLASSID_60 ) + */ +Sequence< sal_Int8 > lcl_GetSequenceClassID( sal_uInt32 n1, sal_uInt16 n2, sal_uInt16 n3, + sal_uInt8 b8, sal_uInt8 b9, sal_uInt8 b10, sal_uInt8 b11, + sal_uInt8 b12, sal_uInt8 b13, sal_uInt8 b14, sal_uInt8 b15 ) +{ + Sequence< sal_Int8 > aResult( 16 ); + aResult[0] = static_cast<sal_Int8>(n1 >> 24); + aResult[1] = static_cast<sal_Int8>(( n1 << 8 ) >> 24); + aResult[2] = static_cast<sal_Int8>(( n1 << 16 ) >> 24); + aResult[3] = static_cast<sal_Int8>(( n1 << 24 ) >> 24); + aResult[4] = n2 >> 8; + aResult[5] = ( n2 << 8 ) >> 8; + aResult[6] = n3 >> 8; + aResult[7] = ( n3 << 8 ) >> 8; + aResult[8] = b8; + aResult[9] = b9; + aResult[10] = b10; + aResult[11] = b11; + aResult[12] = b12; + aResult[13] = b13; + aResult[14] = b14; + aResult[15] = b15; + + return aResult; +} + +Reference< embed::XStorage > lcl_CreateTempStorage( + const Reference< lang::XMultiServiceFactory > & rFactory ) +{ + Reference< embed::XStorage > xResult; + + try + { + Reference< lang::XSingleServiceFactory > xStorageFact( + rFactory->createInstance( C2U( "com.sun.star.embed.StorageFactory" )), + uno::UNO_QUERY_THROW ); + xResult.set( xStorageFact->createInstance(), uno::UNO_QUERY_THROW ); + } + catch( uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } + + return xResult; +} + +} // anonymous namespace + + namespace chart { @@ -114,6 +192,16 @@ ChartModel::~ChartModel() if ( m_pControllers ) delete m_pControllers; + + try + { + impl_killInternalData(); + } + catch( const uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + OSL_ENSURE( false, "~ChartModel: close() caused a veto-exception" ); + } } //----------------------------------------------------------------- @@ -197,6 +285,36 @@ ChartModel::~ChartModel() } } +void ChartModel::impl_killInternalData() + throw(util::CloseVetoException) +{ + if( ! m_xInternalData.is()) + return; + + try + { + uno::Reference< util::XCloseable > xCloseable( m_xInternalData, uno::UNO_QUERY ); + OSL_ASSERT( xCloseable.is()); + if( xCloseable.is()) + xCloseable->close( /* DeliverOwnership */ sal_False ); + + uno::Reference< lang::XComponent > xComp( xCloseable, uno::UNO_QUERY ); + OSL_ASSERT( xComp.is()); + if( xComp.is()) + xComp->dispose(); + + m_xInternalData = 0; + } + catch( const util::CloseVetoException & ) + { + throw; + } + catch( const uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } +} + //----------------------------------------------------------------- // lang::XServiceInfo //----------------------------------------------------------------- @@ -475,7 +593,8 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME) //----------------------------------------------------------------- void SAL_CALL ChartModel ::close( sal_Bool bDeliverOwnership ) - throw( util::CloseVetoException ) + throw( util::CloseVetoException, + uno::RuntimeException ) { //hold no mutex @@ -799,12 +918,88 @@ APPHELPER_XSERVICEINFO_IMPL(ChartModel,CHART_MODEL_SERVICE_IMPLEMENTATION_NAME) } void SAL_CALL ChartModel +::createInternalDataProvider( sal_Bool bCloneExistingData ) + throw (util::CloseVetoException, + uno::RuntimeException) +{ + // /-- + MutexGuard aGuard( m_aModelMutex ); + try + { + if( m_xInternalData.is()) + { + if( ! bCloneExistingData ) + { + impl_killInternalData(); + } + // else reuse existing data provider + } + + if( ! m_xInternalData.is()) + { + Reference< lang::XMultiServiceFactory > xFact( m_xContext->getServiceManager(), uno::UNO_QUERY_THROW ); + Reference< embed::XEmbedObjectCreator> xEmbedCreator( + xFact->createInstance( + C2U( "com.sun.star.embed.EmbeddedObjectCreator")), uno::UNO_QUERY_THROW ); + + m_xInternalData.set( + xEmbedCreator->createInstanceInitNew( + lcl_GetSequenceClassID( SO3_SC_CLASSID_60 ), + C2U( "ChartDataEditor" ), + lcl_CreateTempStorage( xFact ), + C2U( "ChartData" ), + Sequence< beans::PropertyValue >() ), uno::UNO_QUERY_THROW ); + + Reference< embed::XComponentSupplier > xCompSupp( m_xInternalData, uno::UNO_QUERY ); + if( xCompSupp.is()) + { + Reference< lang::XMultiServiceFactory > xSheetFact( xCompSupp->getComponent(), uno::UNO_QUERY ); + if( xSheetFact.is()) + { + Reference< chart2::XDataProvider > xDataProv( + xSheetFact->createInstance( C2U( "com.sun.star.chart2.DataProvider" )), uno::UNO_QUERY ); + if( xDataProv.is()) + { + OSL_ASSERT( m_pImplChartModel.get() != 0 ); + m_pImplChartModel->SetDataProvider( xDataProv ); + + if( bCloneExistingData ) + { + Reference< sheet::XSpreadsheetDocument > xCalcDoc( xSheetFact, uno::UNO_QUERY ); + if( xCalcDoc.is() ) + m_pImplChartModel->CloneData( xCalcDoc ); + } + } + } + } + + m_xInternalData->setClientSite( this ); + } + } + catch( const uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } + // \-- +} + + uno::Reference< embed::XEmbeddedObject > SAL_CALL ChartModel +::getDataEditorForInternalData() + throw (::com::sun::star::uno::RuntimeException) +{ + return m_xInternalData; +} + +// ____ XDataReceiver ____ + + void SAL_CALL ChartModel ::attachDataProvider( const uno::Reference< chart2::XDataProvider >& xProvider ) throw (uno::RuntimeException) { OSL_ASSERT( m_pImplChartModel.get() != 0 ); // /-- MutexGuard aGuard( m_aModelMutex ); + impl_killInternalData(); m_pImplChartModel->SetDataProvider( xProvider ); // \-- } @@ -914,7 +1109,7 @@ uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) { m_xOldModelAgg.set( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.ChartDocumentWrapper" ), + C2U( "com.sun.star.chart2.ChartDocumentWrapper" ), m_xContext ), uno::UNO_QUERY_THROW ); m_xOldModelAgg->setDelegator( static_cast< ::cppu::OWeakObject* >( this )); @@ -931,5 +1126,87 @@ uno::Any SAL_CALL ChartModel::queryInterface( const uno::Type& aType ) return aResult; } +// ____ XLoadable ____ +void SAL_CALL ChartModel::initNew() + throw (frame::DoubleInitializationException, + io::IOException, + uno::Exception, + uno::RuntimeException) +{ + uno::Reference< ::com::sun::star::chart2::XDataProvider > xDataProvider( + m_xContext->getServiceManager()->createInstanceWithContext( + C2U( "com.sun.star.comp.chart.FileDataProvider" ), + m_xContext ), uno::UNO_QUERY ); + OSL_ASSERT( xDataProvider.is()); + + ::rtl::OUString aFileName( +#if defined WNT + RTL_CONSTASCII_USTRINGPARAM( "file:///D:/files/data.chd" ) +#else + RTL_CONSTASCII_USTRINGPARAM( "file:///work/data/data.chd" ) +#endif + ); + + this->attachDataProvider( xDataProvider ); + this->setRangeRepresentation( aFileName ); +} + +void SAL_CALL ChartModel::load( + const Sequence< beans::PropertyValue >& lArguments ) + throw (frame::DoubleInitializationException, + io::IOException, + uno::Exception, + uno::RuntimeException) +{ + OSL_ENSURE( false, "Not implemented yet!" ); + + for( sal_Int32 i=0; i<lArguments.getLength(); ++i ) + { + if( lArguments[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterName" ))) + { + OUString aFilterName; + lArguments[i].Value >>= aFilterName; + } + else if( lArguments[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "FilterOptions" ))) + { + } + else if( lArguments[i].Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "InputStream" ))) + { + uno::Reference< io::XInputStream > xStream( lArguments[i].Value, uno::UNO_QUERY ); + // convert xStream to XStorage (new Embedding API, >= SRC680m20) + } + } +} + +// ____ XEmbeddedClient ____ +void SAL_CALL ChartModel::saveObject() + throw (embed::ObjectSaveVetoException, + uno::Exception, + uno::RuntimeException) +{ + if( m_xInternalData.is()) + { + try + { + Reference< embed::XEmbedPersist > xPersist( m_xInternalData, uno::UNO_QUERY_THROW ); + xPersist->storeOwn(); + // todo: notify changes, so that the view can be updated + } + catch( uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } + } +} + +void SAL_CALL ChartModel::onShowWindow( sal_Bool bVisible ) + throw (embed::WrongStateException, + uno::RuntimeException) +{ + if( ! bVisible ) + { + // todo: notify changes, so that the view can be updated + } +} } // namespace chart diff --git a/chart2/source/model/main/ChartModel.hxx b/chart2/source/model/main/ChartModel.hxx index 553f0cb16c05..a2278ec2b702 100644 --- a/chart2/source/model/main/ChartModel.hxx +++ b/chart2/source/model/main/ChartModel.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartModel.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-04 12:37:22 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:25 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,11 +73,9 @@ #ifndef _COM_SUN_STAR_UTIL_XMODIFIABLE_HPP_ #include <com/sun/star/util/XModifiable.hpp> #endif -/* #ifndef _COM_SUN_STAR_SDBC_XCLOSEABLE_HPP_ #include <com/sun/star/util/XCloseable.hpp> #endif -*/ #ifndef _COM_SUN_STAR_VIEW_XPRINTABLE_HPP_ #include <com/sun/star/view/XPrintable.hpp> #endif @@ -103,14 +101,22 @@ #include <com/sun/star/style/XStyleFamiliesSupplier.hpp> #endif -// #ifndef _DRAFTS_COM_SUN_STAR_CHART2_XMODELDATAPROVIDER_HPP_ -// #include <drafts/com/sun/star/chart2/XModelDataProvider.hpp> +// public API +#ifndef _COM_SUN_STAR_CHART2_XDATAPROVIDER_HPP_ +#include <com/sun/star/chart2/XDataProvider.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART2_XDATARECEIVER_HPP_ +#include <com/sun/star/chart2/XDataReceiver.hpp> +#endif + +// #ifndef _COM_SUN_STAR_CHART2_XMODELDATAPROVIDER_HPP_ +// #include <com/sun/star/chart2/XModelDataProvider.hpp> // #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ -#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <com/sun/star/chart2/XChartDocument.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLED_HPP_ -#include <drafts/com/sun/star/chart2/XTitled.hpp> +#ifndef _COM_SUN_STAR_CHART2_XTITLED_HPP_ +#include <com/sun/star/chart2/XTitled.hpp> #endif /* @@ -141,12 +147,19 @@ #ifndef _COM_SUN_STAR_FRAME_XDISPATCH_HPP_ #include <com/sun/star/frame/XDispatch.hpp> #endif -#ifndef _COM_SUN_STAR_FORM_XLOADABLE_HPP_ -#include <com/sun/star/form/XLoadable.hpp> -#endif */ -#ifndef _CPPUHELPER_IMPLBASE7_HXX_ -#include <cppuhelper/implbase7.hxx> +#ifndef _COM_SUN_STAR_FRAME_XLOADABLE_HPP_ +#include <com/sun/star/frame/XLoadable.hpp> +#endif +#ifndef _COM_SUN_STAR_EMBED_XEMBEDDEDOBJECT_HPP_ +#include <com/sun/star/embed/XEmbeddedObject.hpp> +#endif +#ifndef _COM_SUN_STAR_EMBED_XEMBEDDEDCLIENT_HPP_ +#include <com/sun/star/embed/XEmbeddedClient.hpp> +#endif + +#ifndef _CPPUHELPER_IMPLBASE10_HXX_ +#include <cppuhelper/implbase10.hxx> #endif // for auto_ptr @@ -164,7 +177,7 @@ namespace impl class ImplChartModel; // Note: needed for queryInterface (if it calls the base-class implementation) -typedef ::cppu::WeakImplHelper7 < +typedef ::cppu::WeakImplHelper10 < // ::com::sun::star::frame::XModel //comprehends XComponent (required interface), base of XChartDocument ::com::sun::star::util::XCloseable //comprehends XCloseBroadcaster ,::com::sun::star::frame::XStorable //(required interface) @@ -179,10 +192,13 @@ typedef ::cppu::WeakImplHelper7 < // ,::com::sun::star::uno::XInterface // implemented by WeakImplHelper(optional interface) // ,::com::sun::star::lang::XTypeProvider // implemented by WeakImplHelper ,::com::sun::star::lang::XServiceInfo -// ,::drafts::com::sun::star::chart2::XModelDataProvider - ,::drafts::com::sun::star::chart2::XChartDocument // derived from XModel +// ,::com::sun::star::chart2::XModelDataProvider + ,::com::sun::star::chart2::XChartDocument // derived from XModel + ,::com::sun::star::chart2::XDataReceiver // public API ,::com::sun::star::style::XStyleFamiliesSupplier - ,::drafts::com::sun::star::chart2::XTitled + ,::com::sun::star::chart2::XTitled + ,::com::sun::star::frame::XLoadable + ,::com::sun::star::embed::XEmbeddedClient > ChartModel_Base; } @@ -209,7 +225,9 @@ private: ::std::auto_ptr< impl::ImplChartModel > m_pImplChartModel; ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; - ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > m_xOldModelAgg; + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > m_xOldModelAgg; + + ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > m_xInternalData; private: //private methods @@ -232,6 +250,8 @@ private: impl_notifyModifiedListeners() throw( com::sun::star::uno::RuntimeException); + void impl_killInternalData() throw( com::sun::star::util::CloseVetoException ); + public: //no default constructor ChartModel(::com::sun::star::uno::Reference< @@ -317,7 +337,8 @@ public: //----------------------------------------------------------------- virtual void SAL_CALL close( sal_Bool bDeliverOwnership ) - throw( ::com::sun::star::util::CloseVetoException ); + throw(::com::sun::star::util::CloseVetoException, + ::com::sun::star::uno::RuntimeException); //----------------------------------------------------------------- // ::com::sun::star::util::XCloseBroadcaster (base of XCloseable) @@ -453,61 +474,92 @@ public: getStyleFamilies() throw (::com::sun::star::uno::RuntimeException); //----------------------------------------------------------------- - // ::drafts::com::sun::star::chart2::XModelDataProvider + // ::com::sun::star::chart2::XModelDataProvider //----------------------------------------------------------------- // virtual ::com::sun::star::uno::Sequence< // ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::chart2::XDataSeries > > SAL_CALL +// ::com::sun::star::chart2::XDataSeries > > SAL_CALL // getDataSeries() throw (::com::sun::star::uno::RuntimeException); //----------------------------------------------------------------- - // ::drafts::com::sun::star::chart2::XChartDocument + // ::com::sun::star::chart2::XChartDocument //----------------------------------------------------------------- virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + ::com::sun::star::chart2::XDiagram > SAL_CALL getDiagram() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setDiagram( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL - attachDataProvider( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataProvider >& xProvider ) - throw (::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL - setRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) - throw (::com::sun::star::lang::IllegalArgumentException, + createInternalDataProvider( sal_Bool bCloneExistingData ) + throw (::com::sun::star::util::CloseVetoException, ::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< ::com::sun::star::embed::XEmbeddedObject > SAL_CALL + getDataEditorForInternalData() + throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setChartTypeManager( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartTypeManager >& xNewManager ) + ::com::sun::star::chart2::XChartTypeManager >& xNewManager ) throw (::com::sun::star::uno::RuntimeException); - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeManager > SAL_CALL + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeManager > SAL_CALL getChartTypeManager() throw (::com::sun::star::uno::RuntimeException); // virtual void SAL_CALL setSplitLayoutContainer( // const ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::layout::XSplitLayoutContainer >& xLayoutCnt ) +// ::com::sun::star::layout::XSplitLayoutContainer >& xLayoutCnt ) // throw (::com::sun::star::uno::RuntimeException); // virtual ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::layout::XSplitLayoutContainer > SAL_CALL getSplitLayoutContainer() +// ::com::sun::star::layout::XSplitLayoutContainer > SAL_CALL getSplitLayoutContainer() // throw (::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > SAL_CALL getPageBackground() throw (::com::sun::star::uno::RuntimeException); + // ____ XDataReceiver (public API) ____ + virtual void SAL_CALL + attachDataProvider( const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataProvider >& xProvider ) + throw (::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL + setRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) + throw (::com::sun::star::lang::IllegalArgumentException, + ::com::sun::star::uno::RuntimeException); + // ____ XTitled ____ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle > SAL_CALL getTitle() + ::com::sun::star::chart2::XTitle > SAL_CALL getTitle() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setTitle( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle >& Title ) + ::com::sun::star::chart2::XTitle >& Title ) throw (::com::sun::star::uno::RuntimeException); // ____ XInterface (for old API wrapper) ____ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException); + + // ____ XLoadable ____ + virtual void SAL_CALL initNew() + throw (::com::sun::star::frame::DoubleInitializationException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL load( const ::com::sun::star::uno::Sequence< + ::com::sun::star::beans::PropertyValue >& lArguments ) + throw (::com::sun::star::frame::DoubleInitializationException, + ::com::sun::star::io::IOException, + ::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + + // ____ XEmbeddedClient ____ + virtual void SAL_CALL saveObject() + throw (::com::sun::star::embed::ObjectSaveVetoException, + ::com::sun::star::uno::Exception, + ::com::sun::star::uno::RuntimeException); + virtual void SAL_CALL onShowWindow( sal_Bool bVisible ) + throw (::com::sun::star::embed::WrongStateException, + ::com::sun::star::uno::RuntimeException); }; } // namespace chart diff --git a/chart2/source/model/main/DataPoint.cxx b/chart2/source/model/main/DataPoint.cxx index 784e5078d009..874798942fc4 100644 --- a/chart2/source/model/main/DataPoint.cxx +++ b/chart2/source/model/main/DataPoint.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DataPoint.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,7 +83,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::beans::Property; diff --git a/chart2/source/model/main/DataPointProperties.cxx b/chart2/source/model/main/DataPointProperties.cxx index 5a29bcab32af..0dd38fcc10e2 100644 --- a/chart2/source/model/main/DataPointProperties.cxx +++ b/chart2/source/model/main/DataPointProperties.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DataPointProperties.cxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: bm $ $Date: 2003-12-11 13:54:06 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -86,24 +86,23 @@ #include <com/sun/star/style/XStyle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_FILLBITMAP_HPP_ -#include <drafts/com/sun/star/chart2/FillBitmap.hpp> +#ifndef _COM_SUN_STAR_CHART2_FILLBITMAP_HPP_ +#include <com/sun/star/chart2/FillBitmap.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ -#include <drafts/com/sun/star/chart2/TransparencyStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ +#include <com/sun/star/chart2/TransparencyStyle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_DATAPOINTLABEL_HPP_ -#include <drafts/com/sun/star/chart2/DataPointLabel.hpp> +#ifndef _COM_SUN_STAR_CHART2_DATAPOINTLABEL_HPP_ +#include <com/sun/star/chart2/DataPointLabel.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ -#include <drafts/com/sun/star/chart2/NumberFormat.hpp> +#ifndef _COM_SUN_STAR_CHART2_NUMBERFORMAT_HPP_ +#include <com/sun/star/chart2/NumberFormat.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOL_HPP_ -#include <drafts/com/sun/star/chart2/Symbol.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOL_HPP_ +#include <com/sun/star/chart2/Symbol.hpp> #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; diff --git a/chart2/source/model/main/DataPointStyle.cxx b/chart2/source/model/main/DataPointStyle.cxx index 64533c303b55..2e30ff8ea401 100644 --- a/chart2/source/model/main/DataPointStyle.cxx +++ b/chart2/source/model/main/DataPointStyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DataPointStyle.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,7 +81,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::beans::Property; diff --git a/chart2/source/model/main/DataSeries.cxx b/chart2/source/model/main/DataSeries.cxx index ee771c568d84..839a660f0762 100644 --- a/chart2/source/model/main/DataSeries.cxx +++ b/chart2/source/model/main/DataSeries.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DataSeries.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-12-09 16:31:03 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,14 +66,13 @@ #include "macros.hxx" #include "algohelper.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ -#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#ifndef _COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <com/sun/star/chart2/XIdentifiable.hpp> #endif #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; using ::com::sun::star::uno::Sequence; @@ -130,8 +129,8 @@ DataSeries::~DataSeries() Sequence< OUString > DataSeries::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.DataSeries" ); - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.DataPointProperties" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.DataSeries" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.DataPointProperties" ); aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/main/DataSeriesStyle.cxx b/chart2/source/model/main/DataSeriesStyle.cxx index 57bdf106de70..6724d9ac00a9 100644 --- a/chart2/source/model/main/DataSeriesStyle.cxx +++ b/chart2/source/model/main/DataSeriesStyle.cxx @@ -2,9 +2,9 @@ * * $RCSfile: DataSeriesStyle.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:30 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,7 +82,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::beans::Property; diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx index 5b8b25047cb0..88d95a41c8a9 100644 --- a/chart2/source/model/main/Diagram.cxx +++ b/chart2/source/model/main/Diagram.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Diagram.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: bm $ $Date: 2003-12-09 16:27:00 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:28 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,17 +69,17 @@ #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ #include <com/sun/star/beans/PropertyAttribute.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_RELATIVEPOSITION_HPP_ -#include <drafts/com/sun/star/layout/RelativePosition.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_RELATIVEPOSITION_HPP_ +#include <com/sun/star/layout/RelativePosition.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_RELATIVESIZE_HPP_ -#include <drafts/com/sun/star/layout/RelativeSize.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_RELATIVESIZE_HPP_ +#include <com/sun/star/layout/RelativeSize.hpp> #endif #ifndef _COM_SUN_STAR_DRAWING_HOMOGENMATRIX_HPP_ #include <com/sun/star/drawing/HomogenMatrix.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SCENEDESCRIPTOR_HPP_ -#include <drafts/com/sun/star/chart2/SceneDescriptor.hpp> +#ifndef _COM_SUN_STAR_CHART2_SCENEDESCRIPTOR_HPP_ +#include <com/sun/star/chart2/SceneDescriptor.hpp> #endif #include <algorithm> @@ -88,7 +88,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -195,11 +194,6 @@ Diagram::Diagram( uno::Reference< uno::XComponentContext > const & xContext ) : m_xTitle( NULL ), m_aIdentifier( C2U( "@diagram" )) { - if( ! m_xContext.is() || - ! ( xContext->getValueByName( C2U( "TemplateServiceName" )) >>= m_aTemplateServiceName )) - { - OSL_ENSURE( false, "Missing argument TemplateServiceName" ); - } } Diagram::~Diagram() @@ -222,7 +216,7 @@ void SAL_CALL Diagram::setTree( { uno::Reference< lang::XServiceInfo > xInfo( xTree, uno::UNO_QUERY ); if( xInfo.is() && - xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.DataSeriesTree" )) ) + xInfo->supportsService( C2U( "com.sun.star.chart2.DataSeriesTree" )) ) { // /-- MutexGuard aGuard( GetMutex() ); @@ -235,12 +229,6 @@ void SAL_CALL Diagram::setTree( } } -// ::rtl::OUString SAL_CALL Diagram::getChartTypeTemplateServiceName() -// throw (uno::RuntimeException) -// { -// return m_aTemplateServiceName; -// } - uno::Reference< beans::XPropertySet > SAL_CALL Diagram::getWall() throw (uno::RuntimeException) { @@ -466,8 +454,8 @@ Sequence< OUString > Diagram::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Diagram" ); - aServices[ 1 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.Diagram" ); + aServices[ 1 ] = C2U( "com.sun.star.layout.LayoutElement" ); aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/main/FormattedString.cxx b/chart2/source/model/main/FormattedString.cxx index 42ec1cc45e58..f41302c8ab7f 100644 --- a/chart2/source/model/main/FormattedString.cxx +++ b/chart2/source/model/main/FormattedString.cxx @@ -2,9 +2,9 @@ * * $RCSfile: FormattedString.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-11-25 13:07:56 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,7 +73,6 @@ #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -179,7 +178,7 @@ Sequence< OUString > FormattedString::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.FormattedString" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.FormattedString" ); aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/main/FormattedString.hxx b/chart2/source/model/main/FormattedString.hxx index ebbfb2316099..73dd109e4689 100644 --- a/chart2/source/model/main/FormattedString.hxx +++ b/chart2/source/model/main/FormattedString.hxx @@ -2,9 +2,9 @@ * * $RCSfile: FormattedString.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:30 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,8 +79,8 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XFORMATTEDSTRING_HPP_ -#include <drafts/com/sun/star/chart2/XFormattedString.hpp> +#ifndef _COM_SUN_STAR_CHART2_XFORMATTEDSTRING_HPP_ +#include <com/sun/star/chart2/XFormattedString.hpp> #endif #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ @@ -93,7 +93,7 @@ namespace chart namespace impl { typedef ::cppu::WeakImplHelper2< - ::drafts::com::sun::star::chart2::XFormattedString, + ::com::sun::star::chart2::XFormattedString, ::com::sun::star::lang::XServiceInfo > FormattedString_Base; diff --git a/chart2/source/model/main/ImplChartModel.cxx b/chart2/source/model/main/ImplChartModel.cxx index 176f2ba9642d..b24b42878c97 100644 --- a/chart2/source/model/main/ImplChartModel.cxx +++ b/chart2/source/model/main/ImplChartModel.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ImplChartModel.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: bm $ $Date: 2003-12-11 14:18:50 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:31 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -71,22 +71,23 @@ // #include "SplitLayoutContainer.hxx" #include "LayoutDefaults.hxx" #include "PageBackground.hxx" +#include "DataSeriesTreeHelper.hxx" #ifndef _CPPUHELPER_COMPONENT_CONTEXT_HXX_ #include <cppuhelper/component_context.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASINK_HPP_ -#include <drafts/com/sun/star/chart2/XDataSink.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATASINK_HPP_ +#include <com/sun/star/chart2/XDataSink.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASEQUENCE_HPP_ -#include <drafts/com/sun/star/chart2/XDataSequence.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATASEQUENCE_HPP_ +#include <com/sun/star/chart2/XDataSequence.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ -#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <com/sun/star/chart2/XDataSeries.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ -#include <drafts/com/sun/star/chart2/XAxis.hpp> +#ifndef _COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <com/sun/star/chart2/XAxis.hpp> #endif #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_ @@ -99,11 +100,23 @@ #include <com/sun/star/lang/DisposedException.hpp> #endif +#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETDOCUMENT_HPP_ +#include <com/sun/star/sheet/XSpreadsheetDocument.hpp> +#endif +#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEETS_HPP_ +#include <com/sun/star/sheet/XSpreadsheets.hpp> +#endif +#ifndef _COM_SUN_STAR_SHEET_XSPREADSHEET_HPP_ +#include <com/sun/star/sheet/XSpreadsheet.hpp> +#endif +#ifndef _COM_SUN_STAR_SHEET_XSHEETCELLRANGECONTAINER_HPP_ +#include <com/sun/star/sheet/XSheetCellRangeContainer.hpp> +#endif + #include <vector> #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -122,7 +135,7 @@ ImplChartModel::ImplChartModel( Reference< uno::XComponentContext > const & xCon m_xContext( xContext ), m_xChartTypeManager( xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.ChartTypeManager" ), + C2U( "com.sun.star.chart2.ChartTypeManager" ), xContext ), uno::UNO_QUERY ), m_bIsDisposed( false ) // m_xLayoutContainer( new SplitLayoutContainer() ) @@ -173,7 +186,7 @@ ImplChartModel::ImplChartModel( Reference< uno::XComponentContext > const & xCon // uno::makeAny( nDefaultColors[ sal_Int32( nI % nMaxDefaultColors ) ])); // // set style -// Reference< ::drafts::com::sun::star::style::XStyleSupplier > +// Reference< ::com::sun::star::style::XStyleSupplier > // xStyleSupp( xSeriesProp->getPropertyValue( C2U( "FirstGraphicsFormat" )), // uno::UNO_QUERY ); @@ -213,12 +226,7 @@ void ImplChartModel::ReadData( const ::rtl::OUString & rRangeRepresentation ) { m_xChartData = m_xDataProvider->getDataByRangeRepresentation( rRangeRepresentation ); - // create DataSeries objects using the standard data interpreter -#ifdef USE_XY_DATA - m_aInterpretedData = XYDataInterpreter::InterpretData( m_xChartData ); -#else - m_aInterpretedData = DataInterpreter::InterpretData( m_xChartData ); -#endif + InterpretData(); const size_t nMaxSeries = m_aInterpretedData.size(); const OUString aStyleNameStub( RTL_CONSTASCII_USTRINGPARAM( "Series " )); @@ -245,6 +253,18 @@ void ImplChartModel::ReadData( const ::rtl::OUString & rRangeRepresentation ) } } +void ImplChartModel::InterpretData() +{ + // create DataSeries objects using the standard data interpreter + // todo: interpret data depending on selected chart type + +#ifdef USE_XY_DATA + m_aInterpretedData = XYDataInterpreter::InterpretData( m_xChartData ); +#else + m_aInterpretedData = DataInterpreter::InterpretData( m_xChartData ); +#endif +} + Reference< container::XNameAccess > ImplChartModel::GetStyleFamilies() { if( ! m_xFamilies.is()) @@ -395,38 +415,6 @@ void ImplChartModel::dispose() return; m_bIsDisposed = true; - - // It is a problem to put the weak ref into a strong one (machine hangs - // memory consumption increases, but the debugger does not yield why and - // where - -// try -// { -// // put weak reference into a strong one -// uno::Reference< ::com::sun::star::chart::XChartDocument > xRef( m_xOldModel ); -// uno::Reference< lang::XComponent > xComp( xRef, uno::UNO_QUERY ); - -// if( xComp.is()) -// { -// try -// { -// xComp->dispose(); -// } -// catch( lang::DisposedException ) -// { -// // this may be ok, if the wrapper was disposed before the new chart -// // model -// } -// catch( uno::Exception & ex ) -// { -// ASSERT_EXCEPTION( ex ); -// } -// } -// } -// catch( uno::Exception & ex ) -// { -// ASSERT_EXCEPTION( ex ); -// } } uno::Reference< beans::XPropertySet > ImplChartModel::GetPageBackground() @@ -434,5 +422,102 @@ uno::Reference< beans::XPropertySet > ImplChartModel::GetPageBackground() return m_xPageBackground; } +void ImplChartModel::CloneData( + const uno::Reference< sheet::XSpreadsheetDocument > & xCalcDoc ) +{ + if( ! xCalcDoc.is()) + return; + Reference< chart2::XDiagram > xDia( GetDiagram(0)); + if( ! xDia.is()) + return; + + Sequence< Reference< chart2::XDataSeries > > aSeq( + helper::DataSeriesTreeHelper::getDataSeriesFromDiagram( xDia )); + + try + { + // insert new sheet + Reference< sheet::XSpreadsheets > xSheets( xCalcDoc->getSheets() ); + xSheets->insertNewByName( C2U( "Chart Data" ), 0 ); + Reference< sheet::XSpreadsheet > xDataSheet( xSheets->getByName( C2U( "Chart Data" ) ), uno::UNO_QUERY ); + OSL_ASSERT( xDataSheet.is()); + + // delete all except one of the existing sheets + Reference< container::XNameAccess > xNameAccess( xSheets, uno::UNO_QUERY_THROW ); + OSL_ASSERT( xNameAccess.is()); + Reference< container::XNameContainer > xNameContainer( xNameAccess, uno::UNO_QUERY_THROW ); + OSL_ASSERT( xNameContainer.is()); + Sequence< ::rtl::OUString > aNames( xNameAccess->getElementNames()); + for( sal_Int32 nNameIdx = 1; nNameIdx < aNames.getLength(); ++nNameIdx ) + { + OSL_TRACE( "Removing %s", U2C( aNames[nNameIdx] )); + xNameContainer->removeByName( aNames[nNameIdx] ); + } + + // fill data sheet + static const uno::Type aDoubleType = ::getCppuType( reinterpret_cast< const double * >(0)); + double fVal = 0.0; + ::rtl::OUString aStrVal; + + sal_Int32 nCol = 0; + sal_Int32 nMaxRow = 0; + for( sal_Int32 nSeries = 0; nSeries < aSeq.getLength(); ++nSeries ) + { + Reference< chart2::XDataSource > xSource( aSeq[nSeries], uno::UNO_QUERY ); + OSL_ASSERT( xSource.is()); + Sequence< Reference< chart2::XDataSequence > > aDataSeq( xSource->getDataSequences()); + for( sal_Int32 nSeqIdx = 0; nSeqIdx < aDataSeq.getLength(); ++nSeqIdx ) + { + Reference< beans::XPropertySet > xProp( aDataSeq[nSeqIdx],uno::UNO_QUERY ); + ::rtl::OUString aRole; + if( xProp.is() && + (xProp->getPropertyValue( C2U( "Role" )) >>= aRole ) && + aRole.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "y-values" )) ) + { + Sequence< uno::Any > aData( aDataSeq[nSeqIdx]->getData()); + sal_Int32 nMaxData = aData.getLength(); + nMaxRow = ::std::max( nMaxRow, nMaxData ); + for( sal_Int32 nRow = 0; nRow < nMaxData; ++nRow ) + { + Reference< table::XCell > xCell( xDataSheet->getCellByPosition( nCol, nRow )); + OSL_ASSERT( xCell.is()); + if( aData[nRow].isExtractableTo( aDoubleType )) + { + bool bCouldExtract = (aData[nRow] >>= fVal); + OSL_ASSERT( bCouldExtract ); + xCell->setValue( fVal ); + } + else + { + bool bCouldExtract = (aData[nRow] >>= aStrVal); + OSL_ASSERT( bCouldExtract ); + xCell->setFormula( aStrVal ); + } + } + ++nCol; + } + } + } + + // set new data + if( nCol > 0 ) + { + Reference< lang::XMultiServiceFactory > xCalcFact( xCalcDoc, uno::UNO_QUERY_THROW ); + Reference< sheet::XSheetCellRangeContainer > xRangeCnt( + xCalcFact->createInstance( C2U( "com.sun.star.sheet.SheetCellRanges" )), uno::UNO_QUERY_THROW ); + xRangeCnt->addRangeAddress( + table::CellRangeAddress( 0, 0, 0, nCol, nMaxRow ), sal_Bool( sal_False ) ); + ::rtl::OUString aRangeStr( xRangeCnt->getRangeAddressesAsString()); + + SetRangeRepresentation( aRangeStr ); + } + } + catch( uno::Exception & ex ) + { + ASSERT_EXCEPTION( ex ); + } +} + + } // namespace impl } // namespace chart diff --git a/chart2/source/model/main/ImplChartModel.hxx b/chart2/source/model/main/ImplChartModel.hxx index 20eb9d3bd7a6..cab406ceda4d 100644 --- a/chart2/source/model/main/ImplChartModel.hxx +++ b/chart2/source/model/main/ImplChartModel.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ImplChartModel.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-04 12:37:23 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:32 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,32 +61,32 @@ #ifndef CHART_IMPLCHARTMODEL_HXX #define CHART_IMPLCHARTMODEL_HXX -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASOURCE_HPP_ -#include <drafts/com/sun/star/chart2/XDataSource.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATASOURCE_HPP_ +#include <com/sun/star/chart2/XDataSource.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATASERIES_HPP_ -#include <drafts/com/sun/star/chart2/XDataSeries.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATASERIES_HPP_ +#include <com/sun/star/chart2/XDataSeries.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ -#include <drafts/com/sun/star/chart2/XDiagram.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDIAGRAM_HPP_ +#include <com/sun/star/chart2/XDiagram.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XDATAPROVIDER_HPP_ -#include <drafts/com/sun/star/chart2/XDataProvider.hpp> +#ifndef _COM_SUN_STAR_CHART2_XDATAPROVIDER_HPP_ +#include <com/sun/star/chart2/XDataProvider.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEMANAGER_HPP_ -#include <drafts/com/sun/star/chart2/XChartTypeManager.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPEMANAGER_HPP_ +#include <com/sun/star/chart2/XChartTypeManager.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPETEMPLATE_HPP_ -#include <drafts/com/sun/star/chart2/XChartTypeTemplate.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPETEMPLATE_HPP_ +#include <com/sun/star/chart2/XChartTypeTemplate.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLE_HPP_ -#include <drafts/com/sun/star/chart2/XTitle.hpp> +#ifndef _COM_SUN_STAR_CHART2_XTITLE_HPP_ +#include <com/sun/star/chart2/XTitle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ -#include <drafts/com/sun/star/chart2/XChartDocument.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTDOCUMENT_HPP_ +#include <com/sun/star/chart2/XChartDocument.hpp> #endif -// #ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XSPLITLAYOUTCONTAINER_HPP_ -// #include <drafts/com/sun/star/layout/XSplitLayoutContainer.hpp> +// #ifndef _COM_SUN_STAR_LAYOUT_XSPLITLAYOUTCONTAINER_HPP_ +// #include <com/sun/star/layout/XSplitLayoutContainer.hpp> // #endif #ifndef _COM_SUN_STAR_CONTAINER_NOSUCHELEMENTEXCEPTION_HPP_ @@ -106,6 +106,9 @@ namespace com { namespace sun { namespace star { namespace uno { class XComponentContext; } + namespace sheet { + class XSpreadsheetDocument; + } }}} namespace chart @@ -121,7 +124,7 @@ public: // ::com::sun::star::uno::Sequence< // ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::chart2::XDataSeries > > +// ::com::sun::star::chart2::XDataSeries > > // GetDataSeries() const; ::com::sun::star::uno::Reference< @@ -133,48 +136,48 @@ public: /** @return true, if the chart was found and removed, false otherwise. */ bool RemoveDiagram( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram > & xDiagram ); + ::com::sun::star::chart2::XDiagram > & xDiagram ); void AppendDiagram( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram > & xDiagram ); + ::com::sun::star::chart2::XDiagram > & xDiagram ); ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram > + ::com::sun::star::chart2::XDiagram > GetDiagram( size_t nIndex ) const throw( ::com::sun::star::container::NoSuchElementException ); void SetDataProvider( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataProvider > & xProvider ); + ::com::sun::star::chart2::XDataProvider > & xProvider ); void SAL_CALL SetRangeRepresentation( const ::rtl::OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException); void SetChartTypeManager( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartTypeManager > & xManager ); + ::com::sun::star::chart2::XChartTypeManager > & xManager ); ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartTypeManager > + ::com::sun::star::chart2::XChartTypeManager > GetChartTypeManager(); void SetChartTypeTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartTypeTemplate > & xTemplate ); + ::com::sun::star::chart2::XChartTypeTemplate > & xTemplate ); ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartTypeTemplate > + ::com::sun::star::chart2::XChartTypeTemplate > GetChartTypeTemplate(); // void SetSplitLayoutContainer( // const ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::layout::XSplitLayoutContainer > & xLayoutCnt ); +// ::com::sun::star::layout::XSplitLayoutContainer > & xLayoutCnt ); // ::com::sun::star::uno::Reference< -// ::drafts::com::sun::star::layout::XSplitLayoutContainer > GetSplitLayoutContainer(); +// ::com::sun::star::layout::XSplitLayoutContainer > GetSplitLayoutContainer(); - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTitle > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > GetTitle(); void SetTitle( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XTitle >& rTitle ); + ::com::sun::star::chart2::XTitle >& rTitle ); /** Is called by the ChartModel's XComponent::dispose() to notify the impl-class to release resources @@ -184,37 +187,41 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > GetPageBackground(); + void CloneData( const ::com::sun::star::uno::Reference< + ::com::sun::star::sheet::XSpreadsheetDocument > & xCalcDoc ); + private: void ReadData( const ::rtl::OUString & rRangeRepresentation ); void CreateDefaultChart(); + void InterpretData(); // void CreateDefaultLayout(); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > m_xFamilies; // Data Access (deprecated, temporary solution) - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataSource > m_xChartData; - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDataProvider > m_xDataProvider; + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataSource > m_xChartData; + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDataProvider > m_xDataProvider; ::std::vector< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > > m_aInterpretedData; + ::com::sun::star::chart2::XDataSeries > > m_aInterpretedData; - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeManager > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeManager > m_xChartTypeManager; - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XChartTypeTemplate > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartTypeTemplate > m_xChartTypeTemplate; // Diagram Access typedef ::std::vector< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram > > + ::com::sun::star::chart2::XDiagram > > tDiagramContainer; tDiagramContainer m_aDiagrams; -// ::com::sun::star::uno::Reference< ::drafts::com::sun::star::layout::XSplitLayoutContainer > +// ::com::sun::star::uno::Reference< ::com::sun::star::layout::XSplitLayoutContainer > // m_xLayoutContainer; - ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTitle > + ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTitle > m_xTitle; bool m_bIsDisposed; diff --git a/chart2/source/model/main/LayoutContainer.cxx b/chart2/source/model/main/LayoutContainer.cxx index d4ad05762c68..ef76bfad5140 100644 --- a/chart2/source/model/main/LayoutContainer.cxx +++ b/chart2/source/model/main/LayoutContainer.cxx @@ -2,9 +2,9 @@ * * $RCSfile: LayoutContainer.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -65,7 +65,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; namespace { @@ -158,7 +157,7 @@ uno::Sequence< ::rtl::OUString > LayoutContainer::getSupportedServiceNames_Stati { uno::Sequence< ::rtl::OUString > aServices( 1 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.layout.LayoutContainer" ); + aServices[ 0 ] = C2U( "com.sun.star.layout.LayoutContainer" ); return aServices; } diff --git a/chart2/source/model/main/LayoutContainer.hxx b/chart2/source/model/main/LayoutContainer.hxx index 0f6255cedb10..d8a5c16a4593 100644 --- a/chart2/source/model/main/LayoutContainer.hxx +++ b/chart2/source/model/main/LayoutContainer.hxx @@ -2,9 +2,9 @@ * * $RCSfile: LayoutContainer.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:33 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,8 +68,8 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_XLAYOUTCONTAINER_HPP_ -#include <drafts/com/sun/star/layout/XLayoutContainer.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_XLAYOUTCONTAINER_HPP_ +#include <com/sun/star/layout/XLayoutContainer.hpp> #endif #include "ServiceMacros.hxx" @@ -83,7 +83,7 @@ namespace chart class LayoutContainer : public ::cppu::WeakImplHelper2< ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::layout::XLayoutContainer > + ::com::sun::star::layout::XLayoutContainer > { public: LayoutContainer(); @@ -94,8 +94,8 @@ public: protected: // ____ XLayoutContainer ____ - virtual void SAL_CALL addConstrainedElementByIdentifier( const ::rtl::OUString& aIdentifier, const ::drafts::com::sun::star::layout::Constraint& Constraint ) - throw (::drafts::com::sun::star::layout::IllegalConstraintException, + virtual void SAL_CALL addConstrainedElementByIdentifier( const ::rtl::OUString& aIdentifier, const ::com::sun::star::layout::Constraint& Constraint ) + throw (::com::sun::star::layout::IllegalConstraintException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL addElementByIdentifier( const ::rtl::OUString& aIdentifier ) @@ -104,10 +104,10 @@ protected: virtual void SAL_CALL removeElementByIdentifier( const ::rtl::OUString& aIdentifier ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual void SAL_CALL setConstraintByIdentifier( const ::rtl::OUString& aIdentifier, const ::drafts::com::sun::star::layout::Constraint& Constraint ) + virtual void SAL_CALL setConstraintByIdentifier( const ::rtl::OUString& aIdentifier, const ::com::sun::star::layout::Constraint& Constraint ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); - virtual ::drafts::com::sun::star::layout::Constraint SAL_CALL getConstraintByIdentifier( const ::rtl::OUString& aIdentifier ) + virtual ::com::sun::star::layout::Constraint SAL_CALL getConstraintByIdentifier( const ::rtl::OUString& aIdentifier ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< @@ -119,7 +119,7 @@ private: typedef ::std::map< ::rtl::OUString, - ::drafts::com::sun::star::layout::Constraint > tConstraintsMap; + ::com::sun::star::layout::Constraint > tConstraintsMap; tLayoutElements m_aLayoutElements; tConstraintsMap m_aConstraints; diff --git a/chart2/source/model/main/Legend.cxx b/chart2/source/model/main/Legend.cxx index 63d542307125..e6a959f7fd48 100644 --- a/chart2/source/model/main/Legend.cxx +++ b/chart2/source/model/main/Legend.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Legend.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: bm $ $Date: 2003-12-04 14:07:33 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -78,27 +78,26 @@ #include <com/sun/star/awt/Size.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_ALIGNMENT_HPP_ -#include <drafts/com/sun/star/layout/Alignment.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_ALIGNMENT_HPP_ +#include <com/sun/star/layout/Alignment.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_STRETCHMODE_HPP_ -#include <drafts/com/sun/star/layout/StretchMode.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_STRETCHMODE_HPP_ +#include <com/sun/star/layout/StretchMode.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_LEGENDPOSITION_HPP_ -#include <drafts/com/sun/star/chart2/LegendPosition.hpp> +#ifndef _COM_SUN_STAR_CHART2_LEGENDPOSITION_HPP_ +#include <com/sun/star/chart2/LegendPosition.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_LEGENDEXPANSION_HPP_ -#include <drafts/com/sun/star/chart2/LegendExpansion.hpp> +#ifndef _COM_SUN_STAR_CHART2_LEGENDEXPANSION_HPP_ +#include <com/sun/star/chart2/LegendExpansion.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_RELATIVEPOSITION_HPP_ -#include <drafts/com/sun/star/layout/RelativePosition.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_RELATIVEPOSITION_HPP_ +#include <com/sun/star/layout/RelativePosition.hpp> #endif #include <algorithm> using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; @@ -271,11 +270,11 @@ uno::Sequence< uno::Reference< chart2::XLegendEntry > > SAL_CALL Legend::getEntr uno::Sequence< ::rtl::OUString > Legend::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 5 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Legend" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.Legend" ); aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); aServices[ 2 ] = C2U( "com.sun.star.drawing.FillProperties" ); aServices[ 3 ] = C2U( "com.sun.star.drawing.LineProperties" ); - aServices[ 4 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + aServices[ 4 ] = C2U( "com.sun.star.layout.LayoutElement" ); return aServices; } diff --git a/chart2/source/model/main/Legend.hxx b/chart2/source/model/main/Legend.hxx index 41b26c5aec77..53924da07856 100644 --- a/chart2/source/model/main/Legend.hxx +++ b/chart2/source/model/main/Legend.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Legend.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-26 16:32:17 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:34 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,14 +76,14 @@ #include <comphelper/uno3.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XLEGEND_HPP_ -#include <drafts/com/sun/star/chart2/XLegend.hpp> +#ifndef _COM_SUN_STAR_CHART2_XLEGEND_HPP_ +#include <com/sun/star/chart2/XLegend.hpp> #endif #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ -#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#ifndef _COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <com/sun/star/chart2/XIdentifiable.hpp> #endif #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ #include <com/sun/star/uno/XComponentContext.hpp> @@ -95,9 +95,9 @@ namespace chart namespace impl { typedef ::cppu::WeakImplHelper3< - ::drafts::com::sun::star::chart2::XLegend, + ::com::sun::star::chart2::XLegend, ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::chart2::XIdentifiable > + ::com::sun::star::chart2::XIdentifiable > Legend_Base; } @@ -144,16 +144,16 @@ protected: // ____ XLegend ____ virtual void SAL_CALL registerEntry( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XLegendEntry >& xEntry ) + ::com::sun::star::chart2::XLegendEntry >& xEntry ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException); virtual void SAL_CALL revokeEntry( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XLegendEntry >& xEntry ) + ::com::sun::star::chart2::XLegendEntry >& xEntry ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XLegendEntry > > SAL_CALL getEntries() + ::com::sun::star::chart2::XLegendEntry > > SAL_CALL getEntries() throw (::com::sun::star::uno::RuntimeException); // ____ XIdentifiable ____ @@ -163,7 +163,7 @@ protected: private: typedef ::std::vector< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XLegendEntry > > tLegendEntries; + ::com::sun::star::chart2::XLegendEntry > > tLegendEntries; tLegendEntries m_aLegendEntries; ::rtl::OUString m_aIdentifier; diff --git a/chart2/source/model/main/PageBackground.cxx b/chart2/source/model/main/PageBackground.cxx index b6808b77faa4..b5da72b3a6ae 100644 --- a/chart2/source/model/main/PageBackground.cxx +++ b/chart2/source/model/main/PageBackground.cxx @@ -2,9 +2,9 @@ * * $RCSfile: PageBackground.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: iha $ $Date: 2003-12-17 19:04:46 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:35 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -84,7 +84,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; using ::osl::MutexGuard; @@ -233,7 +232,7 @@ void SAL_CALL PageBackground::release() throw () uno::Sequence< ::rtl::OUString > PageBackground::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.PageBackground" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.PageBackground" ); aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/main/PolarCoordinateSystem.cxx b/chart2/source/model/main/PolarCoordinateSystem.cxx index 53a2e90e4d6c..c821c2a0018d 100644 --- a/chart2/source/model/main/PolarCoordinateSystem.cxx +++ b/chart2/source/model/main/PolarCoordinateSystem.cxx @@ -2,9 +2,9 @@ * * $RCSfile: PolarCoordinateSystem.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: iha $ $Date: 2004-01-17 13:09:51 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,14 +83,14 @@ PolarCoordinateSystem::~PolarCoordinateSystem() {} // ____ XCoordinateSystem ____ -::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL +::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL PolarCoordinateSystem::getTransformationToCartesian() throw (RuntimeException) { return m_aTransformationToCartesian; } -::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XTransformation > SAL_CALL +::com::sun::star::uno::Reference< ::com::sun::star::chart2::XTransformation > SAL_CALL PolarCoordinateSystem::getTransformationFromCartesian() throw (RuntimeException) { @@ -118,7 +118,7 @@ Sequence< OUString > PolarCoordinateSystem::getSupportedServiceNames_Static() { Sequence< OUString > aServices; // Sequence< OUString > aServices( 1 ); -// aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.CoordinateSystem" ); +// aServices[ 0 ] = C2U( "com.sun.star.chart2.CoordinateSystem" ); return aServices; } diff --git a/chart2/source/model/main/RectangularDataSource.cxx b/chart2/source/model/main/RectangularDataSource.cxx index a40f134e9147..78870089f15a 100644 --- a/chart2/source/model/main/RectangularDataSource.cxx +++ b/chart2/source/model/main/RectangularDataSource.cxx @@ -2,9 +2,9 @@ * * $RCSfile: RectangularDataSource.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:38 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -62,11 +62,11 @@ #include "CachedDataSequence.hxx" #include "StandardNaNHelper.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XNUMERICALDATASEQUENCE_HPP_ -#include <drafts/com/sun/star/chart2/XNumericalDataSequence.hpp> +#ifndef _COM_SUN_STAR_CHART2_XNUMERICALDATASEQUENCE_HPP_ +#include <com/sun/star/chart2/XNumericalDataSequence.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTEXTUALDATASEQUENCE_HPP_ -#include <drafts/com/sun/star/chart2/XTextualDataSequence.hpp> +#ifndef _COM_SUN_STAR_CHART2_XTEXTUALDATASEQUENCE_HPP_ +#include <com/sun/star/chart2/XTextualDataSequence.hpp> #endif #ifndef _COM_SUN_STAR_UTIL_XNUMBERFORMATSSUPPLIER_HPP_ #include <com/sun/star/util/XNumberFormatsSupplier.hpp> @@ -76,7 +76,6 @@ #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::osl::MutexGuard; @@ -139,10 +138,10 @@ RectangularDataSource::~RectangularDataSource() Sequence< OUString > RectangularDataSource::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.RectangularDataSource" ); - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.DataFilter" ); - aServices[ 2 ] = C2U( "drafts.com.sun.star.chart2.DataSource" ); - aServices[ 3 ] = C2U( "drafts.com.sun.star.chart2.DataSink" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.RectangularDataSource" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.DataFilter" ); + aServices[ 2 ] = C2U( "com.sun.star.chart2.DataSource" ); + aServices[ 3 ] = C2U( "com.sun.star.chart2.DataSink" ); return aServices; } diff --git a/chart2/source/model/main/Title.cxx b/chart2/source/model/main/Title.cxx index 62721be30b70..bc8d47699d73 100644 --- a/chart2/source/model/main/Title.cxx +++ b/chart2/source/model/main/Title.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Title.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: bm $ $Date: 2003-12-04 14:07:10 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,8 +81,8 @@ #ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ #include <com/sun/star/drawing/LineStyle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_LAYOUT_RELATIVEPOSITION_HPP_ -#include <drafts/com/sun/star/layout/RelativePosition.hpp> +#ifndef _COM_SUN_STAR_LAYOUT_RELATIVEPOSITION_HPP_ +#include <com/sun/star/layout/RelativePosition.hpp> #endif #ifndef _RTL_UUID_H_ @@ -97,7 +97,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; using ::osl::MutexGuard; @@ -385,10 +384,10 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL uno::Sequence< ::rtl::OUString > Title::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 4 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Title" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.Title" ); aServices[ 1 ] = C2U( "com.sun.star.style.ParagraphProperties" ); aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); - aServices[ 3 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + aServices[ 3 ] = C2U( "com.sun.star.layout.LayoutElement" ); return aServices; } diff --git a/chart2/source/model/main/Title.hxx b/chart2/source/model/main/Title.hxx index bc5b8d1032dd..90c99db00627 100644 --- a/chart2/source/model/main/Title.hxx +++ b/chart2/source/model/main/Title.hxx @@ -2,9 +2,9 @@ * * $RCSfile: Title.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-11-26 16:32:19 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:41 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,14 +76,14 @@ #include <comphelper/uno3.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XTITLE_HPP_ -#include <drafts/com/sun/star/chart2/XTitle.hpp> +#ifndef _COM_SUN_STAR_CHART2_XTITLE_HPP_ +#include <com/sun/star/chart2/XTitle.hpp> #endif #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ -#include <drafts/com/sun/star/chart2/XIdentifiable.hpp> +#ifndef _COM_SUN_STAR_CHART2_XIDENTIFIABLE_HPP_ +#include <com/sun/star/chart2/XIdentifiable.hpp> #endif #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ #include <com/sun/star/uno/XComponentContext.hpp> @@ -95,9 +95,9 @@ namespace chart namespace impl { typedef ::cppu::WeakImplHelper3< - ::drafts::com::sun::star::chart2::XTitle, + ::com::sun::star::chart2::XTitle, ::com::sun::star::lang::XServiceInfo, - ::drafts::com::sun::star::chart2::XIdentifiable > + ::com::sun::star::chart2::XIdentifiable > Title_Base; } @@ -145,11 +145,11 @@ protected: // ____ XTitle ____ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XFormattedString > > SAL_CALL getText() + ::com::sun::star::chart2::XFormattedString > > SAL_CALL getText() throw (::com::sun::star::uno::RuntimeException); virtual void SAL_CALL setText( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XFormattedString > >& Strings ) + ::com::sun::star::chart2::XFormattedString > >& Strings ) throw (::com::sun::star::uno::RuntimeException); // ____ XIdentifiable ____ @@ -161,7 +161,7 @@ private: ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XFormattedString > > m_aStrings; + ::com::sun::star::chart2::XFormattedString > > m_aStrings; }; } // namespace chart diff --git a/chart2/source/model/main/Wall.cxx b/chart2/source/model/main/Wall.cxx index e1e69203b89c..890eac1689b2 100644 --- a/chart2/source/model/main/Wall.cxx +++ b/chart2/source/model/main/Wall.cxx @@ -2,9 +2,9 @@ * * $RCSfile: Wall.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-12-15 15:50:38 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:42 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -81,8 +81,8 @@ #ifndef _COM_SUN_STAR_DRAWING_HATCH_HPP_ #include <com/sun/star/drawing/Hatch.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ -#include <drafts/com/sun/star/chart2/TransparencyStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_TRANSPARENCYSTYLE_HPP_ +#include <com/sun/star/chart2/TransparencyStyle.hpp> #endif #ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ #include <com/sun/star/drawing/LineStyle.hpp> @@ -106,7 +106,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; using ::osl::MutexGuard; @@ -258,7 +257,7 @@ void SAL_CALL Wall::release() throw () uno::Sequence< ::rtl::OUString > Wall::getSupportedServiceNames_Static() { uno::Sequence< ::rtl::OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.Wall" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.Wall" ); aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/template/AreaChartType.cxx b/chart2/source/model/template/AreaChartType.cxx index b8f5b9c96328..bad7299db99f 100644 --- a/chart2/source/model/template/AreaChartType.cxx +++ b/chart2/source/model/template/AreaChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AreaChartType.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,7 +61,6 @@ #include "AreaChartType.hxx" using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; namespace chart { diff --git a/chart2/source/model/template/AreaChartTypeTemplate.cxx b/chart2/source/model/template/AreaChartTypeTemplate.cxx index e442ee392d8f..9f4201f33b49 100644 --- a/chart2/source/model/template/AreaChartTypeTemplate.cxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: AreaChartTypeTemplate.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:10 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:45 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -73,7 +73,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -248,7 +247,7 @@ uno::Sequence< ::rtl::OUString > AreaChartTypeTemplate::getSupportedServiceNames { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/AreaChartTypeTemplate.hxx b/chart2/source/model/template/AreaChartTypeTemplate.hxx index 6cfce5c6e346..00f4b7eaa38e 100644 --- a/chart2/source/model/template/AreaChartTypeTemplate.hxx +++ b/chart2/source/model/template/AreaChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: AreaChartTypeTemplate.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:10 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #include <comphelper/uno3.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif namespace chart @@ -87,7 +87,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::StackMode eStackMode, + ::com::sun::star::chart2::StackMode eStackMode, sal_Int32 nDim = 2 ); virtual ~AreaChartTypeTemplate(); @@ -112,13 +112,13 @@ protected: // ____ ChartTypeTemplate ____ virtual sal_Int32 getDimension() const; - virtual ::drafts::com::sun::star::chart2::StackMode getYStackMode() const; + virtual ::com::sun::star::chart2::StackMode getYStackMode() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); private: - ::drafts::com::sun::star::chart2::StackMode + ::com::sun::star::chart2::StackMode m_eStackMode; sal_Int32 m_nDim; }; diff --git a/chart2/source/model/template/BarChartType.cxx b/chart2/source/model/template/BarChartType.cxx index cd4b4f5ee019..2f823e603139 100644 --- a/chart2/source/model/template/BarChartType.cxx +++ b/chart2/source/model/template/BarChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BarChartType.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,7 +61,6 @@ #include "BarChartType.hxx" using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; namespace chart { diff --git a/chart2/source/model/template/BarChartTypeTemplate.cxx b/chart2/source/model/template/BarChartTypeTemplate.cxx index 9ebb8a90c6fc..0e383d01ede2 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.cxx +++ b/chart2/source/model/template/BarChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: BarChartTypeTemplate.cxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:10 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:46 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,7 +77,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::beans::Property; using ::osl::MutexGuard; @@ -260,7 +259,7 @@ uno::Sequence< ::rtl::OUString > BarChartTypeTemplate::getSupportedServiceNames_ { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/BarChartTypeTemplate.hxx b/chart2/source/model/template/BarChartTypeTemplate.hxx index 07a367daee89..01edd508fee0 100644 --- a/chart2/source/model/template/BarChartTypeTemplate.hxx +++ b/chart2/source/model/template/BarChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: BarChartTypeTemplate.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:11 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #include "ChartTypeTemplate.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif namespace chart @@ -99,7 +99,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::StackMode eStackMode, + ::com::sun::star::chart2::StackMode eStackMode, BarDirection eDirection, sal_Int32 nDim = 2, ThreeDMode eThreeDMode = THREE_D_FLAT ); @@ -126,14 +126,14 @@ protected: // ____ ChartTypeTemplate ____ virtual sal_Int32 getDimension() const; - virtual ::drafts::com::sun::star::chart2::StackMode getYStackMode() const; - virtual ::drafts::com::sun::star::chart2::StackMode getXStackMode() const; + virtual ::com::sun::star::chart2::StackMode getYStackMode() const; + virtual ::com::sun::star::chart2::StackMode getXStackMode() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); private: - ::drafts::com::sun::star::chart2::StackMode + ::com::sun::star::chart2::StackMode m_eStackMode; BarDirection m_eBarDirection; sal_Int32 m_nDim; diff --git a/chart2/source/model/template/ChartType.cxx b/chart2/source/model/template/ChartType.cxx index 6462db1a8379..a211b6397761 100644 --- a/chart2/source/model/template/ChartType.cxx +++ b/chart2/source/model/template/ChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartType.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,7 +68,6 @@ #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -147,7 +146,7 @@ Sequence< OUString > ChartType::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.ChartType" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.ChartType" ); aServices[ 1 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/template/ChartType.hxx b/chart2/source/model/template/ChartType.hxx index 060991366b50..27fb39bb26fb 100644 --- a/chart2/source/model/template/ChartType.hxx +++ b/chart2/source/model/template/ChartType.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartType.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-10-06 09:58:31 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,8 +79,8 @@ #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_ #include <com/sun/star/lang/XServiceInfo.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_ -#include <drafts/com/sun/star/chart2/XChartType.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_ +#include <com/sun/star/chart2/XChartType.hpp> #endif namespace chart @@ -89,7 +89,7 @@ namespace chart namespace impl { typedef ::cppu::WeakImplHelper1< - ::drafts::com::sun::star::chart2::XChartType > + ::com::sun::star::chart2::XChartType > ChartType_Base; } diff --git a/chart2/source/model/template/ChartTypeManager.cxx b/chart2/source/model/template/ChartTypeManager.cxx index 0d15c7f16023..6a6dfea37421 100644 --- a/chart2/source/model/template/ChartTypeManager.cxx +++ b/chart2/source/model/template/ChartTypeManager.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartTypeManager.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: bm $ $Date: 2004-01-19 13:02:19 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -93,16 +93,16 @@ #ifndef _COM_SUN_STAR_CHART_CHARTSOLIDTYPE_HPP_ #include <com/sun/star/chart/ChartSolidType.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ -#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ +#include <com/sun/star/chart2/XChartTypeGroup.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ -#include <drafts/com/sun/star/chart2/XStackableScaleGroup.hpp> +#ifndef _COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ +#include <com/sun/star/chart2/XStackableScaleGroup.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#include <com/sun/star/chart2/CurveStyle.hpp> #include <algorithm> #include <iterator> @@ -110,7 +110,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -697,7 +696,7 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() if( xEnumAcc.is()) { uno::Reference< container::XEnumeration > xEnum( - xEnumAcc->createContentEnumeration( C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ) )); + xEnumAcc->createContentEnumeration( C2U( "com.sun.star.chart2.ChartTypeTemplate" ) )); if( xEnum.is()) { uno::Reference< uno::XInterface > xFactIntf; @@ -721,8 +720,8 @@ uno::Sequence< OUString > SAL_CALL ChartTypeManager::getAvailableServiceNames() Sequence< OUString > ChartTypeManager::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeManager" ); - aServices[ 1 ] = C2U( "drafts.com.sun.star.lang.MultiServiceFactory" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.ChartTypeManager" ); + aServices[ 1 ] = C2U( "com.sun.star.lang.MultiServiceFactory" ); aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx index 04ddb64afb19..f9897f0a6c95 100644 --- a/chart2/source/model/template/ChartTypeTemplate.cxx +++ b/chart2/source/model/template/ChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartTypeTemplate.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: bm $ $Date: 2003-11-25 09:01:34 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:49 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,11 +82,11 @@ #ifndef _COM_SUN_STAR_CHART_CHARTSOLIDTYPE_HPP_ #include <com/sun/star/chart/ChartSolidType.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ -#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPEGROUP_HPP_ +#include <com/sun/star/chart2/XChartTypeGroup.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ -#include <drafts/com/sun/star/chart2/XStackableScaleGroup.hpp> +#ifndef _COM_SUN_STAR_CHART2_XSTACKABLESCALEGROUP_HPP_ +#include <com/sun/star/chart2/XStackableScaleGroup.hpp> #endif #include <algorithm> @@ -94,7 +94,6 @@ using namespace ::com::sun::star; using namespace ::com::sun::star::beans::PropertyAttribute; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -108,8 +107,8 @@ namespace { #if OSL_DEBUG_LEVEL > 1 -#include <drafts/com/sun/star/chart2/XChartTypeGroup.hpp> -#include <drafts/com/sun/star/chart2/XScaleGroup.hpp> +#include <com/sun/star/chart2/XChartTypeGroup.hpp> +#include <com/sun/star/chart2/XScaleGroup.hpp> // forward declatation void lcl_ShowTree( const Reference< chart2::XDataSeriesTreeParent > & xParent, sal_Int32 nLevel = 0 ); @@ -143,16 +142,10 @@ Reference< chart2::XDiagram > SAL_CALL ChartTypeTemplate::createDiagram( try { // create diagram - ContextHelper::tContextEntryMapType aContextValues( - ContextHelper::MakeContextEntryMap - ( C2U( "TemplateServiceName" ), - uno::makeAny( getServiceName() )) - ); - xDia.set( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.Diagram" ), - ContextHelper::createContext( aContextValues, m_xContext ) ), + C2U( "com.sun.star.chart2.Diagram" ), + m_xContext ), uno::UNO_QUERY_THROW ); // modify diagram @@ -161,7 +154,7 @@ Reference< chart2::XDiagram > SAL_CALL ChartTypeTemplate::createDiagram( // create and attach legend Reference< chart2::XLegend > xLegend( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.Legend" ), + C2U( "com.sun.star.chart2.Legend" ), m_xContext ), uno::UNO_QUERY_THROW ); @@ -333,7 +326,7 @@ void ChartTypeTemplate::createAndAddGrids( Reference< chart2::XGrid > xGrid( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.Grid" ), + C2U( "com.sun.star.chart2.Grid" ), ContextHelper::createContext( aContextValues, m_xContext ) ), uno::UNO_QUERY ); @@ -420,7 +413,7 @@ Reference< chart2::XDataSeriesTreeParent > ChartTypeTemplate::createRootNode() { Reference< chart2::XDataSeriesTreeParent > aRoot( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.DataSeriesTree" ), m_xContext ), + C2U( "com.sun.star.chart2.DataSeriesTree" ), m_xContext ), uno::UNO_QUERY ); OSL_ASSERT( aRoot.is()); @@ -432,7 +425,7 @@ Reference< chart2::XDataSeriesTreeNode > ChartTypeTemplate::createChartTypeGroup { Reference< chart2::XDataSeriesTreeNode > aChartTypeNode( m_xContext->getServiceManager()->createInstanceWithContext( - C2U( "drafts.com.sun.star.chart2.ChartTypeGroup" ), m_xContext ), + C2U( "com.sun.star.chart2.ChartTypeGroup" ), m_xContext ), uno::UNO_QUERY ); OSL_ASSERT( aChartTypeNode.is()); Reference< chart2::XChartTypeGroup > aChartTypeGroup( aChartTypeNode, uno::UNO_QUERY ); @@ -480,16 +473,16 @@ Reference< chart2::XDataSeriesTreeNode > ChartTypeTemplate::createScaleGroup( if( bIsDiscrete ) { if( bIsStackable ) - aServiceName = C2U( "drafts.com.sun.star.chart2.DiscreteStackableScaleGroup" ); + aServiceName = C2U( "com.sun.star.chart2.DiscreteStackableScaleGroup" ); else - aServiceName = C2U( "drafts.com.sun.star.chart2.DiscreteScaleGroup" ); + aServiceName = C2U( "com.sun.star.chart2.DiscreteScaleGroup" ); } else { if( bIsStackable ) - aServiceName = C2U( "drafts.com.sun.star.chart2.ContinuousStackableScaleGroup" ); + aServiceName = C2U( "com.sun.star.chart2.ContinuousStackableScaleGroup" ); else - aServiceName = C2U( "drafts.com.sun.star.chart2.ContinuousScaleGroup" ); + aServiceName = C2U( "com.sun.star.chart2.ContinuousScaleGroup" ); } aNode.set( @@ -578,8 +571,8 @@ void ChartTypeTemplate::setStackModeAtTree( Sequence< OUString > ChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 3 ); - aServices[ 0 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); - aServices[ 1 ] = C2U( "drafts.com.sun.star.layout.LayoutElement" ); + aServices[ 0 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.layout.LayoutElement" ); aServices[ 2 ] = C2U( "com.sun.star.beans.PropertySet" ); return aServices; } @@ -629,9 +622,9 @@ void lcl_ShowTree( const Reference< chart2::XDataSeriesTreeParent > & xParent, s Reference< chart2::XStackableScaleGroup > xStackableGroup( xInfo, uno::UNO_QUERY ); Reference< chart2::XScaleGroup > xScaleGroup( xInfo, uno::UNO_QUERY ); bool bIsDiscrete = ( xInfo->supportsService( - C2U( "drafts.com.sun.star.chart2.DiscreteScaleGroup" )) || + C2U( "com.sun.star.chart2.DiscreteScaleGroup" )) || xInfo->supportsService( - C2U( "drafts.com.sun.star.chart2.DiscreteStackableScaleGroup" ))); + C2U( "com.sun.star.chart2.DiscreteStackableScaleGroup" ))); if( xStackableGroup.is()) { @@ -666,7 +659,7 @@ void lcl_ShowTree( const Reference< chart2::XDataSeriesTreeParent > & xParent, s OSL_TRACE( "%s<scale group>", aIndent ); } } - else if( xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.ChartTypeGroup" ))) + else if( xInfo->supportsService( C2U( "com.sun.star.chart2.ChartTypeGroup" ))) { Reference< chart2::XChartTypeGroup > xGroup( xInfo, uno::UNO_QUERY ); if( xGroup.is() ) @@ -678,7 +671,7 @@ void lcl_ShowTree( const Reference< chart2::XDataSeriesTreeParent > & xParent, s OSL_TRACE( "%s<chart type group>", aIndent ); } } - else if( xInfo->supportsService( C2U( "drafts.com.sun.star.chart2.DataSeries" ))) + else if( xInfo->supportsService( C2U( "com.sun.star.chart2.DataSeries" ))) { Reference< beans::XPropertySet > xProp( xInfo, uno::UNO_QUERY ); ::rtl::OUString aId; diff --git a/chart2/source/model/template/ChartTypeTemplate.hxx b/chart2/source/model/template/ChartTypeTemplate.hxx index b8bdf8a7fc66..e511b9603c85 100644 --- a/chart2/source/model/template/ChartTypeTemplate.hxx +++ b/chart2/source/model/template/ChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ChartTypeTemplate.hxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:12 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,36 +69,36 @@ #ifndef _COM_SUN_STAR_UNO_XCOMPONENTCONTEXT_HPP_ #include <com/sun/star/uno/XComponentContext.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPETEMPLATE_HPP_ -#include <drafts/com/sun/star/chart2/XChartTypeTemplate.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPETEMPLATE_HPP_ +#include <com/sun/star/chart2/XChartTypeTemplate.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ -#include <drafts/com/sun/star/chart2/XAxisContainer.hpp> +#ifndef _COM_SUN_STAR_CHART2_XAXISCONTAINER_HPP_ +#include <com/sun/star/chart2/XAxisContainer.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ -#include <drafts/com/sun/star/chart2/XGridContainer.hpp> +#ifndef _COM_SUN_STAR_CHART2_XGRIDCONTAINER_HPP_ +#include <com/sun/star/chart2/XGridContainer.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ -#include <drafts/com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> +#ifndef _COM_SUN_STAR_CHART2_XBOUNDEDCOORDINATESYSTEMCONTAINER_HPP_ +#include <com/sun/star/chart2/XBoundedCoordinateSystemContainer.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XLEGEND_HPP_ -#include <drafts/com/sun/star/chart2/XLegend.hpp> +#ifndef _COM_SUN_STAR_CHART2_XLEGEND_HPP_ +#include <com/sun/star/chart2/XLegend.hpp> #endif #ifndef _COM_SUN_STAR_LANG_XSERVICENAME_HPP_ #include <com/sun/star/lang/XServiceName.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_ -#include <drafts/com/sun/star/chart2/XChartType.hpp> +#ifndef _COM_SUN_STAR_CHART2_XCHARTTYPE_HPP_ +#include <com/sun/star/chart2/XChartType.hpp> #endif namespace chart { class ChartTypeTemplate : public ::cppu::WeakImplHelper2< - ::drafts::com::sun::star::chart2::XChartTypeTemplate, + ::com::sun::star::chart2::XChartTypeTemplate, ::com::sun::star::lang::XServiceName > { public: @@ -114,14 +114,14 @@ public: protected: // ____ XChartTypeTemplate ____ - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > SAL_CALL createDiagram( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL matchesTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); // ____ XServiceName ____ @@ -137,20 +137,20 @@ protected: /** returns StackMode_NONE by default. For a column/bar chart you would want to return StackMode_STACKED here. */ - virtual ::drafts::com::sun::star::chart2::StackMode getXStackMode() const; + virtual ::com::sun::star::chart2::StackMode getXStackMode() const; /** returns StackMode_NONE by default. This is a global flag used for all series if createDataSeriesTree() is not overloaded */ - virtual ::drafts::com::sun::star::chart2::StackMode getYStackMode() const; + virtual ::com::sun::star::chart2::StackMode getYStackMode() const; /** returns StackMode_NONE by default. For a column/bar chart you would want to return StackMode_STACKED here. */ - virtual ::drafts::com::sun::star::chart2::StackMode getZStackMode() const; + virtual ::com::sun::star::chart2::StackMode getZStackMode() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); // Methods for creating the diagram piecewise @@ -165,10 +165,10 @@ protected: If this container is valid, the coordinate system is added to it. */ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + ::com::sun::star::chart2::XBoundedCoordinateSystem > createCoordinateSystem( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); + ::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); /** create axes and add them to the given container. @@ -178,9 +178,9 @@ protected: */ virtual void createAndAddAxes( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XAxisContainer > & rOutAxisCnt ); + ::com::sun::star::chart2::XAxisContainer > & rOutAxisCnt ); /** create grids and add them to the given container. @@ -189,9 +189,9 @@ protected: */ virtual void createAndAddGrids( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XGridContainer > & rOutGridCnt ); + ::com::sun::star::chart2::XGridContainer > & rOutGridCnt ); /** create a data series tree, that fits the requirements of the chart type. @@ -219,55 +219,55 @@ protected: empty.</p> */ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + ::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys ); // helper methods // -------------- ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createRootNode(); + ::com::sun::star::chart2::XDataSeriesTreeParent > createRootNode(); ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > + ::com::sun::star::chart2::XDataSeriesTreeNode > createChartTypeGroup( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > & xChartType ); + ::com::sun::star::chart2::XChartType > & xChartType ); ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > + ::com::sun::star::chart2::XDataSeriesTreeNode > createScaleGroup( bool bIsDiscrete, bool bIsStackable, ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > xCoordSys, + ::com::sun::star::chart2::XBoundedCoordinateSystem > xCoordSys, sal_Int32 nRepresentedDimension, - ::drafts::com::sun::star::chart2::StackMode eStackMode = - ::drafts::com::sun::star::chart2::StackMode_NONE ); + ::com::sun::star::chart2::StackMode eStackMode = + ::com::sun::star::chart2::StackMode_NONE ); void addDataSeriesToGroup( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > & rParent, + ::com::sun::star::chart2::XDataSeriesTreeNode > & rParent, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > > & rDataSeries ); + ::com::sun::star::chart2::XDataSeries > > & rDataSeries ); /** Finds the first ContinuousScaleGroup in the tree and sets the stacking mode there if it is a stackable group */ void setStackModeAtTree( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > & rTree, - ::drafts::com::sun::star::chart2::StackMode eMode ); + ::com::sun::star::chart2::XDataSeriesTreeParent > & rTree, + ::com::sun::star::chart2::StackMode eMode ); void attachNodeToNode( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > & rParent, + ::com::sun::star::chart2::XDataSeriesTreeNode > & rParent, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeNode > & rChild ); + ::com::sun::star::chart2::XDataSeriesTreeNode > & rChild ); ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > GetComponentContext() const; @@ -280,10 +280,10 @@ private: /** modifies the given diagram */ void FillDiagram( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram > & xDiagram, + ::com::sun::star::chart2::XDiagram > & xDiagram, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ); + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ); }; } // namespace chart diff --git a/chart2/source/model/template/ColumnChartType.cxx b/chart2/source/model/template/ColumnChartType.cxx index dfb3c98f579f..810001235bf8 100644 --- a/chart2/source/model/template/ColumnChartType.cxx +++ b/chart2/source/model/template/ColumnChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ColumnChartType.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-11-04 12:37:33 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:50 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,7 +61,6 @@ #include "ColumnChartType.hxx" using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; namespace chart { diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx index 60d9554407d9..975bef1a9f24 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ColumnLineChartTypeTemplate.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:12 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:51 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,7 +75,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -354,7 +353,7 @@ uno::Sequence< ::rtl::OUString > ColumnLineChartTypeTemplate::getSupportedServic { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx index 085ec51c22e1..b24b3e02a7a2 100644 --- a/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx +++ b/chart2/source/model/template/ColumnLineChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ColumnLineChartTypeTemplate.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:20:12 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #include <comphelper/uno3.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif namespace chart @@ -87,7 +87,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::StackMode eStackMode, + ::com::sun::star::chart2::StackMode eStackMode, sal_Int32 nNumberOfLines ); virtual ~ColumnLineChartTypeTemplate(); @@ -113,27 +113,27 @@ protected: // ____ XChartTypeTemplate ____ virtual sal_Bool SAL_CALL matchesTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); // ____ ChartTypeTemplate ____ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + ::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys ); - virtual ::drafts::com::sun::star::chart2::StackMode getYStackMode() const; + virtual ::com::sun::star::chart2::StackMode getYStackMode() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); private: - ::drafts::com::sun::star::chart2::StackMode + ::com::sun::star::chart2::StackMode m_eStackMode; }; diff --git a/chart2/source/model/template/LineChartType.cxx b/chart2/source/model/template/LineChartType.cxx index bbe92de44e28..b52de3185be9 100644 --- a/chart2/source/model/template/LineChartType.cxx +++ b/chart2/source/model/template/LineChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: LineChartType.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: bm $ $Date: 2003-11-20 18:12:23 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,12 +66,11 @@ #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ #include <com/sun/star/beans/PropertyAttribute.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ +#include <com/sun/star/chart2/CurveStyle.hpp> #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -80,9 +79,6 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::osl::MutexGuard; -using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; - namespace { diff --git a/chart2/source/model/template/LineChartType.hxx b/chart2/source/model/template/LineChartType.hxx index dc2fda9f9d85..859700db8202 100644 --- a/chart2/source/model/template/LineChartType.hxx +++ b/chart2/source/model/template/LineChartType.hxx @@ -2,9 +2,9 @@ * * $RCSfile: LineChartType.hxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: bm $ $Date: 2003-11-20 18:12:24 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,8 +63,8 @@ #include "ChartType.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ +#include <com/sun/star/chart2/CurveStyle.hpp> #endif namespace chart @@ -74,8 +74,8 @@ class LineChartType : public ChartType { public: LineChartType( sal_Int32 nDim = 2, - ::drafts::com::sun::star::chart2::CurveStyle eCurveStyle = - ::drafts::com::sun::star::chart2::CurveStyle_LINES, + ::com::sun::star::chart2::CurveStyle eCurveStyle = + ::com::sun::star::chart2::CurveStyle_LINES, sal_Int32 nResolution = 20, sal_Int32 nOrder = 3 ); virtual ~LineChartType(); diff --git a/chart2/source/model/template/LineChartTypeTemplate.cxx b/chart2/source/model/template/LineChartTypeTemplate.cxx index 54e0dda9f739..fa5db8f4a309 100644 --- a/chart2/source/model/template/LineChartTypeTemplate.cxx +++ b/chart2/source/model/template/LineChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: LineChartTypeTemplate.cxx,v $ * - * $Revision: 1.10 $ + * $Revision: 1.11 $ * - * last change: $Author: iha $ $Date: 2003-12-17 18:06:55 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,11 +64,11 @@ #include "algohelper.hxx" #include "DataSeriesTreeHelper.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ -#include <drafts/com/sun/star/chart2/SymbolStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ +#include <com/sun/star/chart2/SymbolStyle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOL_HPP_ -#include <drafts/com/sun/star/chart2/Symbol.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOL_HPP_ +#include <com/sun/star/chart2/Symbol.hpp> #endif #ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ #include <com/sun/star/drawing/LineStyle.hpp> @@ -84,7 +84,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -397,7 +396,7 @@ Sequence< OUString > LineChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/LineChartTypeTemplate.hxx b/chart2/source/model/template/LineChartTypeTemplate.hxx index d0ba2da160f6..7abdda6ec985 100644 --- a/chart2/source/model/template/LineChartTypeTemplate.hxx +++ b/chart2/source/model/template/LineChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: LineChartTypeTemplate.hxx,v $ * - * $Revision: 1.8 $ + * $Revision: 1.9 $ * - * last change: $Author: iha $ $Date: 2003-12-17 18:04:43 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:53 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,11 +69,11 @@ #include <comphelper/uno3.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ +#include <com/sun/star/chart2/CurveStyle.hpp> #endif namespace chart @@ -89,11 +89,11 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::StackMode eYStackMode, - ::drafts::com::sun::star::chart2::CurveStyle eCurveStyle, + ::com::sun::star::chart2::StackMode eYStackMode, + ::com::sun::star::chart2::CurveStyle eCurveStyle, bool bSymbols, sal_Int32 nDim = 2, - ::drafts::com::sun::star::chart2::StackMode eZStackMode = - ::drafts::com::sun::star::chart2::StackMode_NONE ); + ::com::sun::star::chart2::StackMode eZStackMode = + ::com::sun::star::chart2::StackMode_NONE ); virtual ~LineChartTypeTemplate(); /// XServiceInfo declarations @@ -116,35 +116,35 @@ protected: throw (::com::sun::star::uno::RuntimeException); // ____ XChartTypeTemplate ____ - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > SAL_CALL createDiagram( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL matchesTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); // ____ ChartTypeTemplate ____ virtual sal_Int32 getDimension() const; - virtual ::drafts::com::sun::star::chart2::StackMode getZStackMode() const; - virtual ::drafts::com::sun::star::chart2::StackMode getYStackMode() const; + virtual ::com::sun::star::chart2::StackMode getZStackMode() const; + virtual ::com::sun::star::chart2::StackMode getYStackMode() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); private: - ::drafts::com::sun::star::chart2::StackMode + ::com::sun::star::chart2::StackMode m_eYStackMode; - ::drafts::com::sun::star::chart2::CurveStyle + ::com::sun::star::chart2::CurveStyle m_eCurveStyle; bool m_bHasSymbols; bool m_bHasLines; sal_Int32 m_nDim; // only used if m_nDim == 3 - ::drafts::com::sun::star::chart2::StackMode + ::com::sun::star::chart2::StackMode m_eZStackMode; }; diff --git a/chart2/source/model/template/NetChartType.cxx b/chart2/source/model/template/NetChartType.cxx index 5059de1c5575..aeb32699b267 100644 --- a/chart2/source/model/template/NetChartType.cxx +++ b/chart2/source/model/template/NetChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NetChartType.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2004-01-12 14:28:53 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -61,7 +61,6 @@ #include "NetChartType.hxx" using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; namespace chart { diff --git a/chart2/source/model/template/NetChartTypeTemplate.cxx b/chart2/source/model/template/NetChartTypeTemplate.cxx index 67dabeeeb105..e4aedb0c7afa 100644 --- a/chart2/source/model/template/NetChartTypeTemplate.cxx +++ b/chart2/source/model/template/NetChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: NetChartTypeTemplate.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: iha $ $Date: 2004-01-17 13:09:52 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,18 +68,17 @@ #include "Scaling.hxx" #include "Scale.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ -#include <drafts/com/sun/star/chart2/SymbolStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ +#include <com/sun/star/chart2/SymbolStyle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOL_HPP_ -#include <drafts/com/sun/star/chart2/Symbol.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOL_HPP_ +#include <com/sun/star/chart2/Symbol.hpp> #endif #ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ #include <com/sun/star/drawing/LineStyle.hpp> #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -235,7 +234,7 @@ Sequence< OUString > NetChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/NetChartTypeTemplate.hxx b/chart2/source/model/template/NetChartTypeTemplate.hxx index 092740cbdd27..2f6dba992fa7 100644 --- a/chart2/source/model/template/NetChartTypeTemplate.hxx +++ b/chart2/source/model/template/NetChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: NetChartTypeTemplate.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2004-01-12 14:28:12 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,8 +63,8 @@ #include "ChartTypeTemplate.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif namespace chart @@ -77,7 +77,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::StackMode eStackMode, + ::com::sun::star::chart2::StackMode eStackMode, bool bSymbols ); virtual ~NetChartTypeTemplate(); @@ -85,29 +85,29 @@ public: protected: // ____ XChartTypeTemplate ____ - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > SAL_CALL createDiagram( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL matchesTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); // ____ ChartTypeTemplate ____ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); - virtual ::drafts::com::sun::star::chart2::StackMode getYStackMode() const; + virtual ::com::sun::star::chart2::StackMode getYStackMode() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + ::com::sun::star::chart2::XBoundedCoordinateSystem > createCoordinateSystem( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); + ::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); private: - ::drafts::com::sun::star::chart2::StackMode m_eStackMode; + ::com::sun::star::chart2::StackMode m_eStackMode; bool m_bHasSymbols; }; diff --git a/chart2/source/model/template/PieChartType.cxx b/chart2/source/model/template/PieChartType.cxx index 72efdac9d5b1..b2358e9df124 100644 --- a/chart2/source/model/template/PieChartType.cxx +++ b/chart2/source/model/template/PieChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: PieChartType.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-11-12 10:46:59 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -68,7 +68,6 @@ #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; diff --git a/chart2/source/model/template/PieChartTypeTemplate.cxx b/chart2/source/model/template/PieChartTypeTemplate.cxx index ea01077f7c1b..699fff730fe1 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.cxx +++ b/chart2/source/model/template/PieChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: PieChartTypeTemplate.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: iha $ $Date: 2004-01-17 13:09:52 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -77,7 +77,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -311,6 +310,13 @@ void PieChartTypeTemplate::createAndAddAxes( // do nothing -- there are no axes in a pie chart } +void PieChartTypeTemplate::createAndAddGrids( + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys, + const Reference< chart2::XGridContainer > & rOutGridCnt ) +{ + // do nothing -- there are no grids in a pie chart +} + Reference< chart2::XDataSeriesTreeParent > PieChartTypeTemplate::createDataSeriesTree( const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys ) @@ -418,7 +424,7 @@ uno::Sequence< ::rtl::OUString > PieChartTypeTemplate::getSupportedServiceNames_ { uno::Sequence< ::rtl::OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/PieChartTypeTemplate.hxx b/chart2/source/model/template/PieChartTypeTemplate.hxx index 010616b02fe7..ef2fe1b06679 100644 --- a/chart2/source/model/template/PieChartTypeTemplate.hxx +++ b/chart2/source/model/template/PieChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: PieChartTypeTemplate.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-11-04 12:37:36 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,8 +70,8 @@ #include "ChartTypeTemplate.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_PIECHARTOFFSETMODE_HPP_ -#include <drafts/com/sun/star/chart2/PieChartOffsetMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_PIECHARTOFFSETMODE_HPP_ +#include <com/sun/star/chart2/PieChartOffsetMode.hpp> #endif namespace chart @@ -87,7 +87,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::PieChartOffsetMode eMode, + ::com::sun::star::chart2::PieChartOffsetMode eMode, bool bRings = false, sal_Int32 nDim = 2 ); virtual ~PieChartTypeTemplate(); @@ -116,31 +116,37 @@ protected: virtual void createAndAddAxes( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XAxisContainer > & rOutAxisCnt ); + ::com::sun::star::chart2::XAxisContainer > & rOutAxisCnt ); + + virtual void createAndAddGrids( + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XGridContainer > & rOutGridCnt ); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + ::com::sun::star::chart2::XBoundedCoordinateSystem > createCoordinateSystem( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); + ::com::sun::star::chart2::XBoundedCoordinateSystemContainer > & xCoordSysCnt ); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + ::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys ); virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); private: - ::drafts::com::sun::star::chart2::PieChartOffsetMode + ::com::sun::star::chart2::PieChartOffsetMode m_ePieOffsetMode; bool m_bIsRingChart; }; diff --git a/chart2/source/model/template/ScatterChartType.cxx b/chart2/source/model/template/ScatterChartType.cxx index b2de9af06233..ad09e4a493c8 100644 --- a/chart2/source/model/template/ScatterChartType.cxx +++ b/chart2/source/model/template/ScatterChartType.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ScatterChartType.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-11-20 18:12:25 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -66,12 +66,11 @@ #ifndef _COM_SUN_STAR_BEANS_PROPERTYATTRIBUTE_HPP_ #include <com/sun/star/beans/PropertyAttribute.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ +#include <com/sun/star/chart2/CurveStyle.hpp> #endif using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::rtl::OUString; using ::com::sun::star::beans::Property; @@ -80,9 +79,6 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::osl::MutexGuard; -using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; - namespace { diff --git a/chart2/source/model/template/ScatterChartType.hxx b/chart2/source/model/template/ScatterChartType.hxx index 4b5430e58a16..19dc93745160 100644 --- a/chart2/source/model/template/ScatterChartType.hxx +++ b/chart2/source/model/template/ScatterChartType.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ScatterChartType.hxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-11-20 18:12:25 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,8 +63,8 @@ #include "ChartType.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ +#include <com/sun/star/chart2/CurveStyle.hpp> #endif namespace chart @@ -74,8 +74,8 @@ class ScatterChartType : public ChartType { public: ScatterChartType( sal_Int32 nDim = 2, - ::drafts::com::sun::star::chart2::CurveStyle eCurveStyle = - ::drafts::com::sun::star::chart2::CurveStyle_LINES, + ::com::sun::star::chart2::CurveStyle eCurveStyle = + ::com::sun::star::chart2::CurveStyle_LINES, sal_Int32 nResolution = 20, sal_Int32 nOrder = 3 ); virtual ~ScatterChartType(); diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.cxx b/chart2/source/model/template/ScatterChartTypeTemplate.cxx index d59429677cfd..306e1ddf67a8 100644 --- a/chart2/source/model/template/ScatterChartTypeTemplate.cxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ScatterChartTypeTemplate.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: bm $ $Date: 2003-12-15 15:00:36 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -64,11 +64,11 @@ #include "algohelper.hxx" #include "DataSeriesTreeHelper.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ -#include <drafts/com/sun/star/chart2/SymbolStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ +#include <com/sun/star/chart2/SymbolStyle.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOL_HPP_ -#include <drafts/com/sun/star/chart2/Symbol.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOL_HPP_ +#include <com/sun/star/chart2/Symbol.hpp> #endif #ifndef _COM_SUN_STAR_DRAWING_LINESTYLE_HPP_ #include <com/sun/star/drawing/LineStyle.hpp> @@ -84,7 +84,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -383,7 +382,7 @@ Sequence< OUString > ScatterChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/ScatterChartTypeTemplate.hxx b/chart2/source/model/template/ScatterChartTypeTemplate.hxx index 76c1d0e5a997..1eef4ef190c1 100644 --- a/chart2/source/model/template/ScatterChartTypeTemplate.hxx +++ b/chart2/source/model/template/ScatterChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: ScatterChartTypeTemplate.hxx,v $ * - * $Revision: 1.3 $ + * $Revision: 1.4 $ * - * last change: $Author: bm $ $Date: 2003-12-15 15:00:36 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:56 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -69,11 +69,11 @@ #include <comphelper/uno3.hxx> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_STACKMODE_HPP_ -#include <drafts/com/sun/star/chart2/StackMode.hpp> +#ifndef _COM_SUN_STAR_CHART2_STACKMODE_HPP_ +#include <com/sun/star/chart2/StackMode.hpp> #endif -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ -#include <drafts/com/sun/star/chart2/CurveStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_CURVESTYLE_HPP_ +#include <com/sun/star/chart2/CurveStyle.hpp> #endif namespace chart @@ -89,7 +89,7 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > const & xContext, const ::rtl::OUString & rServiceName, - ::drafts::com::sun::star::chart2::CurveStyle eCurveStyle, + ::com::sun::star::chart2::CurveStyle eCurveStyle, bool bSymbols, bool bHasLines = true, sal_Int32 nDim = 2 ); @@ -115,24 +115,24 @@ protected: throw (::com::sun::star::uno::RuntimeException); // ____ XChartTypeTemplate ____ - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL + virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XDiagram > SAL_CALL createDiagram( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL matchesTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); // ____ ChartTypeTemplate ____ virtual sal_Int32 getDimension() const; virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); private: - ::drafts::com::sun::star::chart2::CurveStyle + ::com::sun::star::chart2::CurveStyle m_eCurveStyle; bool m_bHasSymbols; bool m_bHasLines; diff --git a/chart2/source/model/template/StockChartTypeTemplate.cxx b/chart2/source/model/template/StockChartTypeTemplate.cxx index 275674ece4f9..e4f2a5f33ade 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.cxx +++ b/chart2/source/model/template/StockChartTypeTemplate.cxx @@ -2,9 +2,9 @@ * * $RCSfile: StockChartTypeTemplate.cxx,v $ * - * $Revision: 1.2 $ + * $Revision: 1.3 $ * - * last change: $Author: bm $ $Date: 2003-12-08 15:46:11 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -63,9 +63,17 @@ #include "macros.hxx" #include "algohelper.hxx" #include "DataSeriesTreeHelper.hxx" +#include "DataSeriesHelper.hxx" +#include "BarChartType.hxx" -#ifndef _DRAFTS_COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ -#include <drafts/com/sun/star/chart2/SymbolStyle.hpp> +#ifndef _COM_SUN_STAR_CHART2_SYMBOLSTYLE_HPP_ +#include <com/sun/star/chart2/SymbolStyle.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART2_XDATASEQUENCE_HPP_ +#include <com/sun/star/chart2/XDataSequence.hpp> +#endif +#ifndef _COM_SUN_STAR_CHART2_XDATASOURCE_HPP_ +#include <com/sun/star/chart2/XDataSource.hpp> #endif #ifndef CHART_PROPERTYHELPER_HXX @@ -78,7 +86,6 @@ #include <algorithm> using namespace ::com::sun::star; -using namespace ::drafts::com::sun::star; using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Sequence; @@ -88,6 +95,7 @@ using ::com::sun::star::uno::Reference; using ::com::sun::star::uno::Any; using ::osl::MutexGuard; +// ---------------------------------------- namespace { @@ -171,6 +179,7 @@ const Sequence< Property > & lcl_GetPropertySequence() } } // anonymous namespace +// ---------------------------------------- namespace chart { @@ -250,16 +259,104 @@ uno::Reference< chart2::XChartType > StockChartTypeTemplate::getDefaultChartType return new LineChartType( 2, chart2::CurveStyle_LINES ); } -// ____ XChartTypeTemplate ____ -uno::Reference< chart2::XDiagram > SAL_CALL - StockChartTypeTemplate::createDiagram( - const uno::Sequence< uno::Reference< chart2::XDataSeries > >& aSeriesSeq ) - throw (uno::RuntimeException) +Reference< chart2::XDataSeriesTreeParent > StockChartTypeTemplate::createDataSeriesTree( + const Sequence< Reference< chart2::XDataSeries > > & aSeriesSeq, + const Reference< chart2::XBoundedCoordinateSystem > & rCoordSys ) { - // todo: create a stock chart! - return ChartTypeTemplate::createDiagram( aSeriesSeq ); + // create series tree nodes + // root + Reference< chart2::XDataSeriesTreeParent > aRoot( createRootNode()); + + bool bHasVolume, bHasOpenValue, bHasLowHighValues; + + getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_VOLUME ) >>= bHasVolume; + getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_OPEN ) >>= bHasOpenValue; + getFastPropertyValue( PROP_STOCKCHARTTYPE_TEMPLATE_LOW_HIGH ) >>= bHasLowHighValues; + + // Bars (Volume) + // ------------- + // chart type group + if( bHasVolume ) + { + Reference< chart2::XDataSeries > xVolumeSeries; + for( sal_Int32 i = 0; i < aSeriesSeq.getLength(); ++i ) + { + Reference< chart2::XDataSequence > xMatch( + DataSeriesHelper::getDataSequenceByRole( + uno::Reference< chart2::XDataSource >( aSeriesSeq[i], uno::UNO_QUERY ), + C2U( "volume" ))); + if( xMatch.is() ) + { + xVolumeSeries = aSeriesSeq[i]; + break; + } + } + Reference< chart2::XDataSeriesTreeNode > aBarNode( + createChartTypeGroup( new BarChartType() )); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aBarCategoryNode( + createScaleGroup( true /* bIsDiscrete */, + true /* bIsStackable */, + rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aBarValueNode( + createScaleGroup( false /* bIsDiscrete */, + true /* bIsStackable */, + rCoordSys, 1, chart2::StackMode_NONE )); + + Sequence< Reference< chart2::XDataSeries > > aBarSeq( 1 ); + aBarSeq[0] = xVolumeSeries; + addDataSeriesToGroup( aBarValueNode, aBarSeq ); + + // add value nodes to category nodes + attachNodeToNode( aBarCategoryNode, aBarValueNode ); + + // add category node to chart type node + attachNodeToNode( aBarNode, aBarCategoryNode ); + + // add chart type nodes to root of tree + aRoot->addChild( aBarNode ); + } + + // Lines + // ----- + // chart type group + Reference< chart2::XDataSeriesTreeNode > aLineNode( + createChartTypeGroup( new LineChartType() )); + + // 'x-axis' group + Reference< chart2::XDataSeriesTreeNode > aLineCategoryNode( + createScaleGroup( true, false, rCoordSys, 0, chart2::StackMode_STACKED )); + + // 'y-axis' group + Reference< chart2::XDataSeriesTreeNode > aLineValueNode( + createScaleGroup( false, false, rCoordSys, 1, chart2::StackMode_NONE )); + + // Build Tree + // ---------- + + // add series node to value nodes +// Sequence< Reference< chart2::XDataSeries > > aLineSeq( nNumberOfLines ); +// ::std::copy( aSeriesSeq.getConstArray() + nNumberOfBars, +// aSeriesSeq.getConstArray() + aSeriesSeq.getLength(), +// aLineSeq.getArray()); +// addDataSeriesToGroup( aLineValueNode, aLineSeq ); + + // add value nodes to category nodes +// attachNodeToNode( aLineCategoryNode, aLineValueNode ); + + // add category node to chart type node +// attachNodeToNode( aLineNode, aLineCategoryNode ); + + // add chart type nodes to root of tree +// aRoot->addChild( aLineNode ); + + return aRoot; } +// ____ XChartTypeTemplate ____ sal_Bool SAL_CALL StockChartTypeTemplate::matchesTemplate( const uno::Reference< chart2::XDiagram >& xDiagram ) throw (uno::RuntimeException) @@ -276,7 +373,7 @@ Sequence< OUString > StockChartTypeTemplate::getSupportedServiceNames_Static() { Sequence< OUString > aServices( 2 ); aServices[ 0 ] = lcl_aServiceName; - aServices[ 1 ] = C2U( "drafts.com.sun.star.chart2.ChartTypeTemplate" ); + aServices[ 1 ] = C2U( "com.sun.star.chart2.ChartTypeTemplate" ); return aServices; } diff --git a/chart2/source/model/template/StockChartTypeTemplate.hxx b/chart2/source/model/template/StockChartTypeTemplate.hxx index 522254c9c16f..2f5213202796 100644 --- a/chart2/source/model/template/StockChartTypeTemplate.hxx +++ b/chart2/source/model/template/StockChartTypeTemplate.hxx @@ -2,9 +2,9 @@ * * $RCSfile: StockChartTypeTemplate.hxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: bm $ $Date: 2003-11-21 14:18:05 $ + * last change: $Author: bm $ $Date: 2004-01-26 09:12:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -113,20 +113,23 @@ protected: throw (::com::sun::star::uno::RuntimeException); // ____ XChartTypeTemplate ____ - virtual ::com::sun::star::uno::Reference< ::drafts::com::sun::star::chart2::XDiagram > SAL_CALL - createDiagram( const ::com::sun::star::uno::Sequence< - ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDataSeries > >& aSeriesSeq ) - throw (::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL matchesTemplate( const ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XDiagram >& xDiagram ) + ::com::sun::star::chart2::XDiagram >& xDiagram ) throw (::com::sun::star::uno::RuntimeException); // ____ ChartTypeTemplate ____ virtual ::com::sun::star::uno::Reference< - ::drafts::com::sun::star::chart2::XChartType > getDefaultChartType() + ::com::sun::star::chart2::XChartType > getDefaultChartType() throw (::com::sun::star::uno::RuntimeException); + virtual ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeriesTreeParent > createDataSeriesTree( + const ::com::sun::star::uno::Sequence< + ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XDataSeries > >& aSeriesSeq, + const ::com::sun::star::uno::Reference< + ::com::sun::star::chart2::XBoundedCoordinateSystem > & rCoordSys + ); private: }; |