diff options
Diffstat (limited to 'chart2/source/controller/inc')
18 files changed, 2555 insertions, 0 deletions
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx new file mode 100644 index 000000000000..c17400483339 --- /dev/null +++ b/chart2/source/controller/inc/AxisItemConverter.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: AxisItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_AXISITEMCONVERTER_HXX +#define CHART_AXISITEMCONVERTER_HXX + +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_XAXIS_HPP_ +#include <drafts/com/sun/star/chart2/XAxis.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITSCALEDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitScaleData.hpp> +#endif +#ifndef _DRAFTS_COM_SUN_STAR_CHART2_EXPLICITINCREMENTDATA_HPP_ +#include <drafts/com/sun/star/chart2/ExplicitIncrementData.hpp> +#endif + +#include "ItemConverter.hxx" +#include "chartview/NumberFormatterWrapper.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class AxisItemConverter : public ItemConverter +{ +public: + AxisItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + NumberFormatterWrapper * pNumFormatter, + ::drafts::com::sun::star::chart2::ExplicitScaleData * pScale = NULL, + ::drafts::com::sun::star::chart2::ExplicitIncrementData * pIncrement = NULL, + double * pExplicitOrigin = NULL ); + virtual ~AxisItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + +private: + ::std::vector< ItemConverter * > m_aConverters; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XAxis > m_xAxis; + ::com::sun::star::uno::Reference< + ::drafts::com::sun::star::chart2::XBoundedCoordinateSystem > + m_xCoordinateSystem; + sal_Int32 m_nDimension; + NumberFormatterWrapper * m_pNumberFormatterWrapper; + + ::drafts::com::sun::star::chart2::ExplicitScaleData * m_pExplicitScale; + ::drafts::com::sun::star::chart2::ExplicitIncrementData * m_pExplicitIncrement; + double * m_pExplicitOrigin; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_AXISITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx new file mode 100644 index 000000000000..861af79ce0b6 --- /dev/null +++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx @@ -0,0 +1,100 @@ +/************************************************************************* + * + * $RCSfile: CharacterPropertyItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_CHARACTERPROPERTYITEMCONVERTER_HXX +#define CHART_CHARACTERPROPERTYITEMCONVERTER_HXX + +#include "ItemConverter.hxx" + +#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ +#include <com/sun/star/uno/Any.hxx> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_ +#include <com/sun/star/beans/PropertyState.hpp> +#endif + +namespace chart +{ +namespace wrapper +{ + +class CharacterPropertyItemConverter : + public ItemConverter +{ +public: + CharacterPropertyItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool ); + virtual ~CharacterPropertyItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_CHARACTERPROPERTYITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx new file mode 100644 index 000000000000..3853bda018d4 --- /dev/null +++ b/chart2/source/controller/inc/DataPointItemConverter.hxx @@ -0,0 +1,110 @@ +/************************************************************************* + * + * $RCSfile: DataPointItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_DATAPOINTITEMCONVERTER_HXX +#define CHART_DATAPOINTITEMCONVERTER_HXX + +#include "ItemConverter.hxx" +#include "GraphicPropertyItemConverter.hxx" +#include "chartview/NumberFormatterWrapper.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class DataPointItemConverter : + public ItemConverter +{ +public: + DataPointItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + NumberFormatterWrapper * pNumFormatter, + GraphicPropertyItemConverter::eGraphicObjectType eMapTo = + GraphicPropertyItemConverter::FILLED_DATA_POINT ); + virtual ~DataPointItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + +private: + ::std::vector< ItemConverter * > m_aConverters; + NumberFormatterWrapper * m_pNumberFormatterWrapper; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_DATAPOINTITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx new file mode 100644 index 000000000000..bd59947f71f5 --- /dev/null +++ b/chart2/source/controller/inc/DrawViewWrapper.hxx @@ -0,0 +1,121 @@ +/************************************************************************* + * + * $RCSfile: DrawViewWrapper.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DRAW_VIEW_WRAPPER_HXX +#define _CHART2_DRAW_VIEW_WRAPPER_HXX + +#ifndef _E3D_VIEW3D_HXX +#include <svx/view3d.hxx> +#endif + +class SdrModel; + +//............................................................................. +namespace chart +{ +//............................................................................. + +//----------------------------------------------------------------------------- +/** The DrawViewWrapper should help us to reduce effort if the underlying DrawingLayer changes. +Another task is to hide functionality we do not need, for example more than one page. +*/ + +class MarkHandleProvider +{ +public: + virtual bool getMarkHandles( SdrHdlList& rHdlList ) =0; + virtual bool getFrameDragSingles() =0; +}; + +class DrawViewWrapper : public E3dView +{ +public: + DrawViewWrapper(SdrModel* pModel, OutputDevice* pOut); + virtual ~DrawViewWrapper(); + + //fill list of selection handles 'aHdl' + virtual void SetMarkHandles(); + + //SdrPageView* GetPageView() { return m_pWrappedDLPageView; }; + + SdrObject* getHitObject( const Point& rPnt ) const; + //BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions, SdrObject** ppRootObj, ULONG* pnMarkNum=NULL, USHORT* pnPassNum=NULL) const; + //BOOL PickObj(const Point& rPnt, short nTol, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const; + //BOOL PickObj(const Point& rPnt, SdrObject*& rpObj, SdrPageView*& rpPV, ULONG nOptions=0) const { return PickObj(rPnt,nHitTolLog,rpObj,rpPV,nOptions); } + + //void MarkObj(SdrObject* pObj, SdrPageView* pPV, BOOL bUnmark=FALSE, BOOL bImpNoSetMarkHdl=FALSE); + void MarkObject( SdrObject* pObj ); + + //---------------------- + //pMarkHandleProvider can be NULL; ownership is not taken + void setMarkHandleProvider( MarkHandleProvider* pMarkHandleProvider ); + + void InitRedraw( OutputDevice* pOut, const Region& rReg ); + +private: + mutable SdrPageView* m_pWrappedDLPageView; + mutable MarkHandleProvider* m_pMarkHandleProvider; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif + diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx new file mode 100644 index 000000000000..2c068b4a0533 --- /dev/null +++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: GraphicPropertyItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_GRAPHICPROPERTYITEMCONVERTER_HXX +#define CHART_GRAPHICPROPERTYITEMCONVERTER_HXX + +#include "ItemConverter.hxx" + +#ifndef _COM_SUN_STAR_UNO_ANY_HXX_ +#include <com/sun/star/uno/Any.hxx> +#endif +#ifndef _COM_SUN_STAR_BEANS_PROPERTYSTATE_HPP_ +#include <com/sun/star/beans/PropertyState.hpp> +#endif + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class GraphicPropertyItemConverter : + public ItemConverter +{ +public: + enum eGraphicObjectType + { + FILLED_DATA_POINT, + LINE_DATA_POINT, + LINE_PROPERTIES, + FILL_PROPERTIES, + LINE_AND_FILL_PROPERTIES + }; + + GraphicPropertyItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel, + eGraphicObjectType eObjectType = FILLED_DATA_POINT ); + virtual ~GraphicPropertyItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + + void FillBitmapItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const + throw( ::com::sun::star::beans::UnknownPropertyException ); + void ApplyBitmapItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const + throw( ::com::sun::star::beans::UnknownPropertyException ); + +private: + eGraphicObjectType m_eGraphicObjectType; + SdrModel & m_rDrawModel; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_GRAPHICPROPERTYITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc new file mode 100644 index 000000000000..69631b28fe74 --- /dev/null +++ b/chart2/source/controller/inc/HelpIds.hrc @@ -0,0 +1,142 @@ +/************************************************************************* + * + * $RCSfile: HelpIds.hrc,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_HELPIDS_HRC +#define CHART_HELPIDS_HRC + +#include <svtools/solar.hrc> + +//see old chart: schhids.h + +/* +#define HID_SCH_DATA_ROW (HID_SCH_START + 0) +#define HID_SCH_DATA_LINE (HID_SCH_START + 1) +#define HID_SCH_DATA_POINT (HID_SCH_START + 2) +#define HID_SCH_DIAGRAM_X_AXIS (HID_SCH_START + 3) +*/ +#define HID_SCH_ALIGNMENT (HID_SCH_START + 4) +#define HID_SCH_LEGEND_POS (HID_SCH_START + 5) +#define HID_SCH_DATA_DESCR (HID_SCH_START + 6) + +#define HID_SCH_SCALE_Y (HID_SCH_START + 7) + +#define HID_SCH_STAT (HID_SCH_START + 8) +/* +#define HID_SCH_WIN_DOCUMENT (HID_SCH_START + 9) +#define HID_SCH_CTL_DATA (HID_SCH_START + 10) +*/ +#define HID_SCH_CT_INDICATE (HID_SCH_START + 11) +#define HID_SCH_CT_REGRESS (HID_SCH_START + 12) +/* +#define HID_SCH_CT_1_CHARTTYPE (HID_SCH_START + 13) +#define HID_SCH_CT_2_CHARTVARIANT (HID_SCH_START + 14) +*/ +//for chart type dialog: +#define HID_SCH_CTL_TYPE (HID_SCH_START + 15) +#define HID_SCH_CTL_VARIANT (HID_SCH_START + 16) +#define HID_SCH_NUM_OF_LINES (HID_SCH_START + 43) +// +/* +#define HID_SCH_CTL_LIGHT (HID_SCH_START + 17) +*/ +#define HID_SCH_CT_INDICATE2 (HID_SCH_START + 18) +#define HID_SCH_CT_REGRESS2 (HID_SCH_START + 19) +/* +#define HID_SCH_TBI_EDIT_CANCEL (HID_SCH_START + 20) +#define HID_SCH_TBI_EDIT_ACCEPT (HID_SCH_START + 21) +#define HID_SCH_TBI_DATA_TRANSFER (HID_SCH_START + 22) +#define HID_SCH_TBI_DATA_INSERT_ROW (HID_SCH_START + 23) +#define HID_SCH_TBI_DATA_INSERT_COL (HID_SCH_START + 24) +#define HID_SCH_TBI_DATA_DELETE_ROW (HID_SCH_START + 25) +#define HID_SCH_TBI_DATA_DELETE_COL (HID_SCH_START + 26) +#define HID_SCH_TBI_DATA_SWAP_COL (HID_SCH_START + 27) +#define HID_SCH_TBI_DATA_SWAP_ROW (HID_SCH_START + 28) +#define HID_SCH_TBI_DATA_SORT_ROW (HID_SCH_START + 29) +#define HID_SCH_TBI_DATA_SORT_COL (HID_SCH_START + 30) +#define HID_SCH_TBI_DATA_SORT_TABLE_ROW (HID_SCH_START + 31) +#define HID_SCH_TBI_DATA_SORT_TABLE_COL (HID_SCH_START + 32) + +#define HID_SCH_TBX_EDIT (HID_SCH_START + 33) +#define HID_SCH_TBX_DATA (HID_SCH_START + 34) +*/ + +#define HID_SCH_ALIGNMENT_CTR_DIAL (HID_SCH_START + 35) +#define HID_SCH_ALIGNMENT_STACKED (HID_SCH_START + 36) +#define HID_SCH_ALIGNMENT_DEGREES (HID_SCH_START + 37) +/* +#define HID_SCH_LAYOUT (HID_SCH_START + 38) + +#define HID_SCH_TBX_EDIT_FIELD (HID_SCH_START + 39) +#define HID_SCH_DIAGRAM_Y_AXIS (HID_SCH_START + 40)//war mal 3 + +#define HID_SCH_DEF_COLOR (HID_SCH_START + 41) +*/ +#define HID_SCH_TP_AXIS_LABEL (HID_SCH_START + 42) + +#define HID_SCH_CHART_AUTO_FORMAT (HID_SCH_START + 44) + +// HID_SCH_START should be 63280 (checked 25.Nov 2002) + +// 453 == SCH_IF_CHARTVIEWSHELL, da SFX_INTERFACE_LIB kein +// Define sondern neuerdings ein Enum ist +//#define HID_SCH_VIEWSHELL_DOCUMENT (453) + + +#endif diff --git a/chart2/source/controller/inc/ItemConverter.hxx b/chart2/source/controller/inc/ItemConverter.hxx new file mode 100644 index 000000000000..e7176feeb153 --- /dev/null +++ b/chart2/source/controller/inc/ItemConverter.hxx @@ -0,0 +1,235 @@ +/************************************************************************* + * + * $RCSfile: ItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_ITEMCONVERTER_HXX +#define CHART_ITEMCONVERTER_HXX + +#ifndef _CPPUHELPER_IMPLBASE1_HXX_ +#include <cppuhelper/implbase1.hxx> +#endif + +#ifndef _SFXITEMPOOL_HXX +#include <svtools/itempool.hxx> +#endif +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif +// #ifndef _SVX_UNOIPSET_HXX_ +// #include <svx/unoipset.hxx> +// #endif + +#ifndef _COM_SUN_STAR_BEANS_XPROPERTYSET_HPP_ +#include <com/sun/star/beans/XPropertySet.hpp> +#endif +#ifndef _COM_SUN_STAR_LANG_XEVENTLISTENER_HPP_ +#include <com/sun/star/lang/XEventListener.hpp> +#endif + +class SfxItemPropertyMap; + +namespace chart +{ +namespace wrapper +{ + +/** This class serves for conversion between properties of an XPropertySet and + SfxItems in SfxItemSets. + + <p>With this helper classes, you can feed dialogs with XPropertySets and let + those modify by the dialogs.</p> + + <p>You must implement GetWhichPairs() such that an SfxItemSet created with + CreateEmptyItemSet() is able to hold all items that may be mapped.</p> + + <p>You also have to implement GetItemPropertyName(), in order to return the + property name for a given which-id.</p> + + <p>FillSpecialItem and ApplySpecialItem may be used for special handling of + individual item, e.g. if you need member-ids in QueryValue/PutValue</p> + */ +class ItemConverter : + public ::cppu::WeakImplHelper1< + ::com::sun::star::lang::XEventListener + > +{ +public: + /** Construct an item converter that uses the given property set for + reading/writing converted items + */ + ItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet , + SfxItemPool& rItemPool ); + virtual ~ItemConverter(); + + /** applies all properties that can be mapped to items into the given item + set. + + <p>Call this method before opening a dialog.</p> + + @param rOutItemSet the SfxItemSet is filled with all items that are a + result of a conversion from a property of the internal + XPropertySet. + */ + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + + /** applies all properties that are results of a conversion from all items + in rItemSet to the internal XPropertySet. + + <p>Call this method after a dialog was closed with OK</p> + + @return true, if any properties have been changed, false otherwise. + */ + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + + /** creates an empty item set using the given pool + or a common pool if empty (see GetItemPool) and + allowing all items given in the ranges returned by GetWhichPairs. + */ + SfxItemSet CreateEmptyItemSet() const; + + /** States whether conversion is still likely to work. + + <p>In particular, it is checked if the XPropertySet given in the CTOR is + still valid, i.e. not disposed. It is assumed that the XPropertySet is + valid when the converter is constructed.</p> + + <p>This only works if the XPropertySet given in the CTOR supports the + interface ::com::sun::star::lang::XComponent.</p> + */ + bool IsValid() const; + + /// creates a pure chart item pool + static SfxItemPool* CreateSchItemPool(); + + static void InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItemSet &rSourceSet ); + +protected: + // ________ + + /** implement this method to provide an array of which-ranges of the form: + + <pre> + const USHORT aMyPairs[] = + { + from_1, to_1, + from_2, to_2, + ... + from_n, to_n, + 0 + }; + </pre> + */ + virtual const USHORT * GetWhichPairs() const = 0; + + /** implement this method to return a Property object for a given which id. + + @param rOutName If </TRUE> is returned, this contains the property name. + + @return </TRUE>, if the item can be mapped to a property. + */ + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + /** for items that can not be mapped directly to a property. + + This method is called from FillItemSet(), if GetItemPropertyName() returns + false. + */ + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + + /** for items that can not be mapped directly to a property. + + This method is called from ApplyItemSet(), if GetItemPropertyName() returns + false. + + @return </TRUE> if the item changed a property, </FALSE> otherwise. + */ + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + + // ________ + + /// Returns the pool + SfxItemPool & GetItemPool() const; + + /** Returns the XPropertySet that was given in the CTOR and is used to apply + items in ApplyItemSet(). + */ + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > GetPropertySet() const; + + // ____ XEventListener ____ + virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) + throw (::com::sun::star::uno::RuntimeException); + +private: + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > m_xPropertySet; + ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySetInfo > m_xPropertySetInfo; + + SfxItemPool& m_rItemPool; + bool m_bIsValid; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_ITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx new file mode 100644 index 000000000000..7fb51e46fe2b --- /dev/null +++ b/chart2/source/controller/inc/ItemPropertyMap.hxx @@ -0,0 +1,119 @@ +/************************************************************************* + * + * $RCSfile: ItemPropertyMap.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_ITEMPROPERTYMAP_HXX +#define CHART_ITEMPROPERTYMAP_HXX + +#include "InlineContainer.hxx" + +namespace chart +{ +namespace wrapper +{ + +typedef ::std::map< USHORT, ::rtl::OUString > ItemPropertyMapType; +typedef ::comphelper::MakeMap< USHORT, ::rtl::OUString > MakeItemPropertyMap; + +class FillItemSetFunc : public ::std::unary_function< void, ItemConverter * > +{ +public: + explicit FillItemSetFunc( SfxItemSet & rOutItemSet ) : + m_rOutItemSet( rOutItemSet ) + {} + + void operator() ( ItemConverter * pConv ) + { + pConv->FillItemSet( m_rOutItemSet ); + } + +private: + SfxItemSet & m_rOutItemSet; +}; + +class ApplyItemSetFunc : public ::std::unary_function< void, ItemConverter * > +{ +public: + explicit ApplyItemSetFunc( const SfxItemSet & rItemSet, + bool & rOutResult ) : + m_rItemSet( rItemSet ), + m_rOutResult( rOutResult ) + {} + + void operator() ( ItemConverter * pConv ) + { + m_rOutResult = pConv->ApplyItemSet( m_rItemSet ) || m_rOutResult; + } + +private: + const SfxItemSet & m_rItemSet; + bool & m_rOutResult; +}; + +struct DeleteItemConverterPtr : public ::std::unary_function< void, ItemConverter * > +{ + void operator() ( ItemConverter * pConv ) + { delete pConv; } +}; + +} // namespace wrapper +} // namespace chart + +// CHART_ITEMPROPERTYMAP_HXX +#endif diff --git a/chart2/source/controller/inc/MultipleItemConverter.hxx b/chart2/source/controller/inc/MultipleItemConverter.hxx new file mode 100644 index 000000000000..8284a0254802 --- /dev/null +++ b/chart2/source/controller/inc/MultipleItemConverter.hxx @@ -0,0 +1,138 @@ +/************************************************************************* + * + * $RCSfile: MultipleItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_ALLAXISITEMCONVERTER_HXX +#define CHART_ALLAXISITEMCONVERTER_HXX + +#ifndef _COM_SUN_STAR_FRAME_XMODEL_HPP_ +#include <com/sun/star/frame/XModel.hpp> +#endif + +#include "ItemConverter.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class MultipleItemConverter : public ItemConverter +{ +public: + virtual ~MultipleItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + MultipleItemConverter( SfxItemPool& rItemPool ); + + ::std::vector< ItemConverter * > m_aConverters; +}; + +class AllAxisItemConverter : public MultipleItemConverter +{ +public: + AllAxisItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllAxisItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +class AllGridItemConverter : public MultipleItemConverter +{ +public: + AllGridItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllGridItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +class AllDataLabelItemConverter : public MultipleItemConverter +{ +public: + AllDataLabelItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::frame::XModel > & xChartModel, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~AllDataLabelItemConverter(); + +protected: + virtual const USHORT * GetWhichPairs() const; +}; + +} // namespace wrapper +} // namespace chart + +#endif diff --git a/chart2/source/controller/inc/SchSlotIds.hxx b/chart2/source/controller/inc/SchSlotIds.hxx new file mode 100644 index 000000000000..fce3f23da6bd --- /dev/null +++ b/chart2/source/controller/inc/SchSlotIds.hxx @@ -0,0 +1,183 @@ +/************************************************************************* + * + * $RCSfile: SchSlotIds.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2000 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef SCH_SLOTIDS_HXX +#define SCH_SLOTIDS_HXX + +// header for SID_OBJ1_START +#ifndef _SFXSIDS_HRC +#include <sfx2/sfxsids.hrc> +#endif + +// SID_OBJ1_START == 30000 + 512 +#define SID_COPYFORMAT SID_OBJ1_START + +#define SID_PASTEFORMAT (SID_OBJ1_START + 1) +#define SID_DIAGRAM_DATA (SID_OBJ1_START + 2) +#define SID_INSERT_TITLE (SID_OBJ1_START + 3) +#define SID_INSERT_CHART_LEGEND (SID_OBJ1_START + 4) +#define SID_INSERT_DESCRIPTION (SID_OBJ1_START + 5) +#define SID_INSERT_AXIS (SID_OBJ1_START + 6) +#define SID_DATA_ROW_POINT (SID_OBJ1_START + 7) +#define SID_CHART_TITLE (SID_OBJ1_START + 8) +#define SID_LEGEND (SID_OBJ1_START + 9) +#define SID_DIAGRAM_AXIS (SID_OBJ1_START + 10) +#define SID_DIAGRAM_GRID (SID_OBJ1_START + 11) +#define SID_DIAGRAM_WALL (SID_OBJ1_START + 12) +#define SID_DIAGRAM_FLOOR (SID_OBJ1_START + 13) +#define SID_DIAGRAM_AREA (SID_OBJ1_START + 14) +#define SID_3D_VIEW (SID_OBJ1_START + 15) +#define SID_DIAGRAM_TYPE (SID_OBJ1_START + 16) +#define SID_TOGGLE_TITLE (SID_OBJ1_START + 17) +#define SID_TOGGLE_LEGEND (SID_OBJ1_START + 18) +#define SID_TOGGLE_AXIS_TITLE (SID_OBJ1_START + 19) +#define SID_TOGGLE_AXIS_DESCR (SID_OBJ1_START + 20) // 30532 +#define SID_TOGGLE_GRID_HORZ (SID_OBJ1_START + 21) +#define SID_TOGGLE_GRID_VERT (SID_OBJ1_START + 22) +#define SID_DATA_IN_ROWS (SID_OBJ1_START + 23) +#define SID_DATA_IN_COLUMNS (SID_OBJ1_START + 24) +#define SID_TOOL_SELECT (SID_OBJ1_START + 25) +#define SID_CONTEXT_TYPE (SID_OBJ1_START + 26) +#define SID_NEW_ARRANGEMENT (SID_OBJ1_START + 27) // 30539 +#define SID_INSERT_GRIDS (SID_OBJ1_START + 28) + +#define SID_MAINTITLE (SID_OBJ1_START + 29) +#define SID_SUBTITLE (SID_OBJ1_START + 30) +#define SID_XAXIS_TITLE (SID_OBJ1_START + 31) +#define SID_YAXIS_TITLE (SID_OBJ1_START + 32) +#define SID_ZAXIS_TITLE (SID_OBJ1_START + 33) + +#ifdef SID_UPDATE +#undef SID_UPDATE +#endif +#define SID_UPDATE (SID_OBJ1_START + 34) + +// DataCollection +#define SID_DATA (SID_OBJ1_START + 35) +#define SID_ADD_COLUMN (SID_OBJ1_START + 36) +#define SID_ADD_ROW (SID_OBJ1_START + 37) + +#define SID_DIAGRAM_AXIS_X (SID_OBJ1_START + 40) +#define SID_DIAGRAM_AXIS_Y (SID_OBJ1_START + 41) +#define SID_DIAGRAM_AXIS_Z (SID_OBJ1_START + 42) +#define SID_DIAGRAM_AXIS_ALL (SID_OBJ1_START + 43) +#define SID_INSERT_STATISTICS (SID_OBJ1_START + 44) +#define SID_DIAGRAM_TITLE_MAIN (SID_OBJ1_START + 45) +#define SID_DIAGRAM_TITLE_SUB (SID_OBJ1_START + 46) +#define SID_DIAGRAM_TITLE_X (SID_OBJ1_START + 47) +#define SID_DIAGRAM_TITLE_Y (SID_OBJ1_START + 48) +#define SID_DIAGRAM_TITLE_Z (SID_OBJ1_START + 49) +#define SID_DIAGRAM_TITLE_ALL (SID_OBJ1_START + 50) +#define SID_DIAGRAM_GRID_Y_MAIN (SID_OBJ1_START + 51) +#define SID_DIAGRAM_GRID_X_MAIN (SID_OBJ1_START + 52) +#define SID_DIAGRAM_GRID_Z_MAIN (SID_OBJ1_START + 53) +#define SID_DIAGRAM_GRID_ALL (SID_OBJ1_START + 54) + +#define SID_HAS_X_DESCR (SID_OBJ1_START + 55) +#define SID_HAS_Y_DESCR (SID_OBJ1_START + 56) +#define SID_HAS_Z_DESCR (SID_OBJ1_START + 57) + +#define SID_DIAGRAM_OBJECTS (SID_OBJ1_START + 60) + +#define SID_HAS_X_TITLE (SID_OBJ1_START + 61) +#define SID_HAS_Y_TITLE (SID_OBJ1_START + 62) +#define SID_HAS_Z_TITLE (SID_OBJ1_START + 63) +#define SID_HAS_MAIN_TITLE (SID_OBJ1_START + 64) +#define SID_HAS_SUB_TITLE (SID_OBJ1_START + 65) + +#define SID_DIAGRAM_GRID_Y_HELP (SID_OBJ1_START + 66) +#define SID_DIAGRAM_GRID_X_HELP (SID_OBJ1_START + 67) +#define SID_DIAGRAM_GRID_Z_HELP (SID_OBJ1_START + 68) + +#define SID_DIAGRAM_DATA_WIN (SID_OBJ1_START + 70) + +#define SID_DIAGRAM_ERROR (SID_OBJ1_START + 71) +#define SID_DIAGRAM_AVERAGEVALUE (SID_OBJ1_START + 72) +#define SID_DIAGRAM_REGRESSION (SID_OBJ1_START + 73) +#define SID_SCALE_TEXT (SID_OBJ1_START + 74) +#define SID_TEXTBREAK (SID_OBJ1_START + 75) + +#define SID_DIAGRAM_DATADESCRIPTION (SID_OBJ1_START + 76) +#define SID_DIAGRAM_POSLEGEND (SID_OBJ1_START + 77) +#define SID_DIAGRAM_DEFAULTCOLORS (SID_OBJ1_START + 78) +#define SID_DIAGRAM_BARWIDTH (SID_OBJ1_START + 79) +#define SID_DIAGRAM_NUMLINES (SID_OBJ1_START + 80) + + +#define SID_ROW_POSITION (SID_OBJ1_START + 81) +#define SID_ROW_MOREFRONT (SID_OBJ1_START + 82) +#define SID_ROW_MOREBACK (SID_OBJ1_START + 83) + +// Title-Object +#define SID_TITLE_TEXT (SID_OBJ1_START + 100) + +#define SID_DIAGRAM_STOCK_LINE (SID_OBJ1_START + 101) +#define SID_DIAGRAM_STOCK_LOSS (SID_OBJ1_START + 102) +#define SID_DIAGRAM_STOCK_PLUS (SID_OBJ1_START + 103) + + +#define SID_DIAGRAM_AXIS_A (SID_OBJ1_START + 104) +#define SID_DIAGRAM_AXIS_B (SID_OBJ1_START + 105) +#define SID_DIAGRAM_AXIS_C (SID_OBJ1_START + 106) + +// Reserved till (SID_OBJ1_START + 110) + +#endif +// SCH_SLOTIDS_HXX diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx new file mode 100644 index 000000000000..1168d3290dbf --- /dev/null +++ b/chart2/source/controller/inc/TitleItemConverter.hxx @@ -0,0 +1,104 @@ +/************************************************************************* + * + * $RCSfile: TitleItemConverter.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef CHART_TITLEITEMCONVERTER_HXX +#define CHART_TITLEITEMCONVERTER_HXX + +#include "ItemConverter.hxx" + +#include <vector> + +class SdrModel; + +namespace chart +{ +namespace wrapper +{ + +class TitleItemConverter : + public ItemConverter +{ +public: + TitleItemConverter( + const ::com::sun::star::uno::Reference< + ::com::sun::star::beans::XPropertySet > & rPropertySet, + SfxItemPool& rItemPool, + SdrModel& rDrawModel ); + virtual ~TitleItemConverter(); + + virtual void FillItemSet( SfxItemSet & rOutItemSet ) const; + virtual bool ApplyItemSet( const SfxItemSet & rItemSet ); + +protected: + virtual const USHORT * GetWhichPairs() const; + virtual bool GetItemPropertyName( USHORT nWhichId, ::rtl::OUString & rOutName ) const; + + virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const; + virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet ) const; + +private: + ::std::vector< ItemConverter * > m_aConverters; +}; + +} // namespace wrapper +} // namespace chart + +// CHART_TITLEITEMCONVERTER_HXX +#endif diff --git a/chart2/source/controller/inc/ViewElementListProvider.hxx b/chart2/source/controller/inc/ViewElementListProvider.hxx new file mode 100644 index 000000000000..ccea24ce61d3 --- /dev/null +++ b/chart2/source/controller/inc/ViewElementListProvider.hxx @@ -0,0 +1,129 @@ +/************************************************************************* + * + * $RCSfile: ViewElementListProvider.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_VIEWELEMENTLISTPROVIDER_HXX +#define _CHART2_VIEWELEMENTLISTPROVIDER_HXX + +#ifndef _XTABLE_HXX +#include <svx/xtable.hxx> +#endif +#ifndef _SVDPAGE_HXX +#include <svx/svdpage.hxx> +#endif + +class FontList; +class SvNumberFormatter; + +//............................................................................. +namespace chart +{ +//............................................................................. + +class DrawModelWrapper; +class NumberFormatterWrapper; + +class ViewElementListProvider +{ +public: + ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper, NumberFormatterWrapper* pNumberFormatterWrapper ); + virtual ~ViewElementListProvider(); + + XColorTable* GetColorTable() const;//from class SdrModel + XDashList* GetDashList() const;//from class SdrModel + XLineEndList* GetLineEndList() const;//from class SdrModel + XGradientList* GetGradientList() const;//from class SdrModel + XHatchList* GetHatchList() const;//from class SdrModel + XBitmapList* GetBitmapList() const;//from class SdrModel + + //create chartspecific symbols for linecharts + SdrObjList* GetSymbolList() const;// in old chart called GetSdrObjList + + FontList* getFontList() const; + //SfxPrinter* getPrinter(); + + //infrastructure + /** introduced for #101318#: + + The chart-internal number formatter is necessary to render values for + the UI with a higher standard precision than the one you might get + externally (from Calc). As you should not modify the precision of an + external number formatter, this one comes in handy. + + Note that for the dialog only the standard format is used, i.e., any + user-defined formats that are only available in the external formatter + are not required here. + + This method is used by SchAttribTabDlg::PageCreated (attrib.cxx) + + @returns the chart internal number formatter + */ + SvNumberFormatter * GetOwnNumberFormatter() const; + SvNumberFormatter * GetNumFormatter() const; + +private: + DrawModelWrapper* m_pDrawModelWrapper; + mutable FontList* m_pFontList; + mutable NumberFormatterWrapper* m_pNumberFormatterWrapper; +}; + +//............................................................................. +} //namespace chart +//............................................................................. +#endif diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx new file mode 100644 index 000000000000..b5b047cb02ec --- /dev/null +++ b/chart2/source/controller/inc/dlg_ChartType.hxx @@ -0,0 +1,209 @@ +/************************************************************************* + * + * $RCSfile: dlg_ChartType.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_CHARTTYPE_HXX +#define _CHART2_DLG_CHARTTYPE_HXX + +/* +#ifndef _SCH_DIAGRTYP_HXX_ +#define _SCH_DIAGRTYP_HXX_ + +#ifndef _SV_BUTTON_HXX //autogen +#include <vcl/button.hxx> +#endif +#ifndef _SV_FIXED_HXX //autogen +#include <vcl/fixed.hxx> +#endif +#ifndef _SV_FIELD_HXX //autogen +#include <vcl/field.hxx> +#endif +#ifndef _VALUESET_HXX //autogen +#include <svtools/valueset.hxx> +#endif +#ifndef _SV_DIALOG_HXX //autogen +#include <vcl/dialog.hxx> +#endif +#ifndef _SFXITEMSET_HXX //autogen +#include <svtools/itemset.hxx> +#endif +*/ + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class RadioButton +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class MetricField +#ifndef _SV_FIELD_HXX +#include <vcl/field.hxx> +#endif +// header for class ValueSet +#ifndef _VALUESET_HXX +#include <svtools/valueset.hxx> +#endif +// header for class SfxItemSet +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +enum ChartDimension +{ + CHDIM_2D, + CHDIM_3D +}; + +#define CHDIM_COUNT (CHDIM_3D + 1) + +/************************************************************************* +|* +|* Dialog zur Auswahl eines Diagrammtyps +|* +\************************************************************************/ +class SchDiagramTypeDlg : public ModalDialog +{ +private: + long n3DGeometry; + RadioButton aRbt2D; + RadioButton aRbt3D; + FixedLine aFlDimension; + FixedText aFtDeep; + MetricField aMtrFldDeep; + FixedText aFtGran; + MetricField aMtrFldGran; + FixedText aFtNumLines; + MetricField aMtrFldNumLines; + + FixedText aFtType; + ValueSet aCtlType; + FixedText aFtVariant; + ValueSet aCtlVariant; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + ChartDimension eDimension; + + const SfxItemSet& rOutAttrs; + + void Reset(); + + void FillTypeSet(ChartDimension eDim, bool bForce=false); + void FillVariantSet(USHORT nType); + + DECL_LINK(SelectDimensionHdl, void*); + DECL_LINK(SelectTypeHdl, void*); + DECL_LINK(DoubleClickHdl, void*); + DECL_LINK(ClickHdl, void*); + + void SwitchDepth (USHORT nID); + + /** Hides/Shows the controls for line/bar combination chart according to the + chart type id given as nID. + */ + void SwitchNumLines( USHORT nID ); + + void FillValueSets(); + +public: + SchDiagramTypeDlg(Window* pWindow, const SfxItemSet& rInAttrs); + virtual ~SchDiagramTypeDlg(); + + void GetAttr(SfxItemSet& rOutAttrs); +// int GetDepth(); +// void SetDepth( int nDeep ); + +// int GetGranularity(); +// void SetGranularity( int nGranularity ); + + /** The value set here determines the maximum number of lines in a line/bar + combination chart. This should usually be one less than the number of + series, such that at least one series remains a bar. + */ + void SetMaximumNumberOfLines( long nMaxLines ); + /** set the current number of lines that are used in a line/bar combination + chart. + */ +// void SetNumberOfLines( long nLines ); + /** get the number of lines that should be used for a line/bar combination + chart. This has to be set before to be meaningful + */ +// long GetNumberOfLines() const; + + virtual void DataChanged( const DataChangedEvent& rDCEvt ); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + + diff --git a/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx new file mode 100644 index 000000000000..b7dcbbff3509 --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx @@ -0,0 +1,142 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertAxis_Grid.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_AXIS_GRID_HXX +#define _CHART2_DLG_INSERT_AXIS_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +struct InsertMeterDialogData +{ + ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList; + ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList; + + InsertMeterDialogData(); +}; + +/************************************************************************* +|* +|* insert Axis dialog (also base for grid dialog) +|* +\************************************************************************/ +class SchAxisDlg : public ModalDialog +{ +protected: + FixedLine aFlPrimary; + FixedLine aFlPrimaryGrid; + CheckBox aCbPrimaryX; + CheckBox aCbPrimaryY; + CheckBox aCbPrimaryZ; + + FixedLine aFlSecondary; + FixedLine aFlSecondaryGrid; + CheckBox aCbSecondaryX; + CheckBox aCbSecondaryY; + CheckBox aCbSecondaryZ; + + OKButton aPbOK; + CancelButton aPbCancel; + HelpButton aPbHelp; + +public: + SchAxisDlg( Window* pParent, const InsertMeterDialogData& rInput, BOOL bAxisDlg=true ); + virtual ~SchAxisDlg(); + + void getResult( InsertMeterDialogData& rOutput ); +}; + + +/************************************************************************* +|* +|* Grid dialog +|* +\************************************************************************/ +class SchGridDlg : public SchAxisDlg +{ +public: + SchGridDlg( Window* pParent, const InsertMeterDialogData& rInput ); + virtual ~SchGridDlg(); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif diff --git a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx new file mode 100644 index 000000000000..6de5f95e6677 --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertDataLabel.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_DATALABELS_GRID_HXX +#define _CHART2_DLG_INSERT_DATALABELS_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for class SfxItemSet +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +/************************************************************************* +|* +|* Datenbeschriftungen-Dialog +|* +\************************************************************************/ +class SchDataDescrDlg : public ModalDialog +{ +private: + CheckBox aCbValue; + RadioButton aRbNumber; + RadioButton aRbPercent; + CheckBox aCbText; + FixedLine aFlDescr; + CheckBox aCbSymbol; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + const SfxItemSet& rOutAttrs; + + DECL_LINK( EnableHdl, CheckBox * ); + + void Reset(); + +public: + SchDataDescrDlg(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchDataDescrDlg(); + + void GetAttr(SfxItemSet& rOutAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/inc/dlg_InsertLegend.hxx b/chart2/source/controller/inc/dlg_InsertLegend.hxx new file mode 100644 index 000000000000..dcf7fca9f0a7 --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertLegend.hxx @@ -0,0 +1,122 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertLegend.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_LEGEND_GRID_HXX +#define _CHART2_DLG_INSERT_LEGEND_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class FixedLine +#ifndef _SV_FIXED_HXX +#include <vcl/fixed.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif +// header for class SfxItemSet +#ifndef _SFXITEMSET_HXX +#include <svtools/itemset.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + + +/************************************************************************* +|* +|* Legenden-Dialog +|* +\************************************************************************/ +class SchLegendDlg : public ModalDialog +{ +private: + CheckBox aCbxShow; + RadioButton aRbtLeft; + RadioButton aRbtTop; + RadioButton aRbtRight; + RadioButton aRbtBottom; + FixedLine aFlLegend; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + const SfxItemSet& rOutAttrs; + + void Reset(); + DECL_LINK (CbxClick, CheckBox *); + +public: + SchLegendDlg(Window* pParent, const SfxItemSet& rInAttrs); + virtual ~SchLegendDlg(); + + void GetAttr(SfxItemSet& rOutAttrs); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx new file mode 100644 index 000000000000..0ed7fe671daf --- /dev/null +++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx @@ -0,0 +1,132 @@ +/************************************************************************* + * + * $RCSfile: dlg_InsertTitle.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_INSERT_TITLE_GRID_HXX +#define _CHART2_DLG_INSERT_TITLE_GRID_HXX + +// header for class ModalDialog +#ifndef _SV_DIALOG_HXX +#include <vcl/dialog.hxx> +#endif +// header for class Edit +#ifndef _SV_EDIT_HXX +#include <vcl/edit.hxx> +#endif +// header for class CheckBox +#ifndef _SV_BUTTON_HXX +#include <vcl/button.hxx> +#endif + +#ifndef _COM_SUN_STAR_UNO_SEQUENCE_HXX_ +#include <com/sun/star/uno/Sequence.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + +struct InsertTitleDialogData +{ + ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList; + ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList; + ::com::sun::star::uno::Sequence< rtl::OUString > aTextList; + + InsertTitleDialogData(); +}; + +/************************************************************************* +|* +|* Titel-Dialog +|* +\************************************************************************/ + +class SchTitleDlg : public ModalDialog +{ +private: + CheckBox aCbxMain; + Edit aEdtMain; + CheckBox aCbxSub; + Edit aEdtSub; + CheckBox aCbxXAxis; + Edit aEdtXAxis; + CheckBox aCbxYAxis; + Edit aEdtYAxis; + CheckBox aCbxZAxis; + Edit aEdtZAxis; + OKButton aBtnOK; + CancelButton aBtnCancel; + HelpButton aBtnHelp; + + DECL_LINK(EnableTitleHdl, CheckBox*); + +public: + SchTitleDlg( Window* pParent, const InsertTitleDialogData& rInput ); + virtual ~SchTitleDlg(); + + void getResult( InsertTitleDialogData& rOutput ); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx new file mode 100644 index 000000000000..d1e0c4a7c3d0 --- /dev/null +++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx @@ -0,0 +1,196 @@ +/************************************************************************* + * + * $RCSfile: dlg_ObjectProperties.hxx,v $ + * + * $Revision: 1.1.1.1 $ + * + * last change: $Author: bm $ $Date: 2003-10-06 09:58:27 $ + * + * The Contents of this file are made available subject to the terms of + * either of the following licenses + * + * - GNU Lesser General Public License Version 2.1 + * - Sun Industry Standards Source License Version 1.1 + * + * Sun Microsystems Inc., October, 2000 + * + * GNU Lesser General Public License Version 2.1 + * ============================================= + * Copyright 2000 by Sun Microsystems, Inc. + * 901 San Antonio Road, Palo Alto, CA 94303, USA + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License version 2.1, as published by the Free Software Foundation. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, + * MA 02111-1307 USA + * + * + * Sun Industry Standards Source License Version 1.1 + * ================================================= + * The contents of this file are subject to the Sun Industry Standards + * Source License Version 1.1 (the "License"); You may not use this file + * except in compliance with the License. You may obtain a copy of the + * License at http://www.openoffice.org/license.html. + * + * Software provided under this License is provided on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, + * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS, + * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING. + * See the License for the specific provisions governing your rights and + * obligations concerning the Software. + * + * The Initial Developer of the Original Code is: Sun Microsystems, Inc. + * + * Copyright: 2003 by Sun Microsystems, Inc. + * + * All Rights Reserved. + * + * Contributor(s): _______________________________________ + * + * + ************************************************************************/ +#ifndef _CHART2_DLG_OBJECTPROPERTIES_HXX +#define _CHART2_DLG_OBJECTPROPERTIES_HXX + +#include "chartview/ObjectIdentifier.hxx" + +#ifndef _SFXTABDLG_HXX +#include <sfx2/tabdlg.hxx> +#endif +// header for typedef ChangeType +#ifndef _SVX_TAB_AREA_HXX +#include <svx/tabarea.hxx> +#endif + +//............................................................................. +namespace chart +{ +//............................................................................. + + /* +enum AttrType +{ + ATTR_TITLE, + ATTR_LEGEND, + ATTR_DATA_ROW, + ATTR_DATA_LINE, + ATTR_DATA_POINT, + ATTR_AXIS, + ATTR_X_AXIS_2D, + ATTR_X_AXIS_3D, + ATTR_Y_AXIS_2D, + ATTR_Y_AXIS_3D, + ATTR_Z_AXIS, + ATTR_GRID, + ATTR_DIAGRAM_AREA, + ATTR_DIAGRAM_WALL, + ATTR_DIAGRAM_FLOOR, + ATTR_LINE, + ATTR_DIAGRAM_STOCK_LOSS, + ATTR_DIAGRAM_STOCK_PLUS +}; +*/ + +class OldModelWrapper +{ +public: + OldModelWrapper(); + virtual ~OldModelWrapper(); + + //model + //// BOOL IsXYChart() const; + BOOL HasScaleProperties() const; + BOOL IsBar() const; + BOOL Is3DChart() const; + //// BOOL Is3DPie() const; + BOOL IsStatisticChart() const; + BOOL HasAreaProperties() const; + + /// return TRUE if the current chart type supports a given axis type + BOOL ProvidesSecondaryYAxis() const;//was BOOL CanAxis(CHART_AXIS_SECONDARY_Y) + BOOL IsCol( long nRow ) const; +}; + +/* +#define CHATTR_COUNT (CHATTR_DIAGRAM_FLOOR + 1) + +enum OrderMode +{ + CHORDMODE_NONE, + CHORDMODE_X_AXIS, + CHORDMODE_Y_AXIS +}; + +#define CHORDMODE_COUNT (CHORDMODE_Y_AXIS + 1) + +#define AxisTypeX 1 +#define AxisTypeY 2 +#define AxisTypeZ 3 +*/ + +/************************************************************************* +|* +|* Attributs-Tab-Dialog +|* +\************************************************************************/ + +class ViewElementListProvider; + +class SchAttribTabDlg : public SfxTabDialog +{ +private: + ObjectType eObjectType; + bool bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles) + USHORT nDlgType; + USHORT nPageType; + + const OldModelWrapper * const m_pModelWrapper; + const ViewElementListProvider* const m_pViewElementListProvider; + + const SfxItemSet* mpSymbolAttr; + Graphic maSymbolGraphic; + + /* + XColorTable* pColorTab; + XGradientList* pGradientList; + XHatchList* pHatchingList; + XBitmapList* pBitmapList; + XDashList* pDashList; + XLineEndList* pLineEndList; + */ + + ChangeType nColorTableState; + ChangeType nGradientListState; + ChangeType nHatchingListState; + ChangeType nBitmapListState; + + static USHORT GetResId(ObjectType eObjectType); + ////static USHORT GetResId(AttrType eType); + virtual void PageCreated(USHORT nId, SfxTabPage& rPage); + +public: + SchAttribTabDlg(Window* pParent, ObjectType eType, + const SfxItemSet* pAttr, + const ViewElementListProvider* pViewElementListProvider, + const OldModelWrapper* pModel, + bool bAffectsMultipleObjects = false, + const SfxItemSet* pSymbolAttr=NULL, + Graphic aSymbolGraphic=Graphic()); + virtual ~SchAttribTabDlg(); +}; + +//............................................................................. +} //namespace chart +//............................................................................. + +#endif + |