summaryrefslogtreecommitdiff
path: root/chart2/source/controller/inc
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/inc')
-rw-r--r--chart2/source/controller/inc/AccessibleBase.hxx382
-rw-r--r--chart2/source/controller/inc/AccessibleChartView.hxx158
-rw-r--r--chart2/source/controller/inc/AccessibleTextHelper.hxx116
-rw-r--r--chart2/source/controller/inc/AxisItemConverter.hxx95
-rw-r--r--chart2/source/controller/inc/CharacterPropertyItemConverter.hxx87
-rw-r--r--chart2/source/controller/inc/ChartDocumentWrapper.hxx237
-rw-r--r--chart2/source/controller/inc/ChartRenderer.hxx79
-rw-r--r--chart2/source/controller/inc/ConfigurationAccess.hxx62
-rw-r--r--chart2/source/controller/inc/DataPointItemConverter.hxx113
-rw-r--r--chart2/source/controller/inc/DrawViewWrapper.hxx114
-rw-r--r--chart2/source/controller/inc/ErrorBarItemConverter.hxx87
-rw-r--r--chart2/source/controller/inc/GraphicPropertyItemConverter.hxx88
-rw-r--r--chart2/source/controller/inc/HelpIds.hrc182
-rw-r--r--chart2/source/controller/inc/ItemConverter.hxx218
-rw-r--r--chart2/source/controller/inc/ItemPropertyMap.hxx93
-rw-r--r--chart2/source/controller/inc/LegendItemConverter.hxx82
-rw-r--r--chart2/source/controller/inc/MenuResIds.hrc41
-rw-r--r--chart2/source/controller/inc/MultipleChartConverters.hxx133
-rw-r--r--chart2/source/controller/inc/MultipleItemConverter.hxx63
-rw-r--r--chart2/source/controller/inc/ObjectHierarchy.hxx123
-rw-r--r--chart2/source/controller/inc/ObjectNameProvider.hxx90
-rw-r--r--chart2/source/controller/inc/PositionAndSizeHelper.hxx63
-rw-r--r--chart2/source/controller/inc/RangeEdit.hxx59
-rw-r--r--chart2/source/controller/inc/RangeSelectionButton.hxx56
-rw-r--r--chart2/source/controller/inc/RangeSelectionHelper.hxx90
-rw-r--r--chart2/source/controller/inc/RangeSelectionListener.hxx82
-rw-r--r--chart2/source/controller/inc/RegressionCurveItemConverter.hxx85
-rw-r--r--chart2/source/controller/inc/RegressionEquationItemConverter.hxx86
-rw-r--r--chart2/source/controller/inc/SchSlotIds.hxx237
-rw-r--r--chart2/source/controller/inc/SeriesOptionsItemConverter.hxx105
-rw-r--r--chart2/source/controller/inc/ShapeController.hrc50
-rw-r--r--chart2/source/controller/inc/StatisticsItemConverter.hxx78
-rw-r--r--chart2/source/controller/inc/TabPageNotifiable.hxx54
-rw-r--r--chart2/source/controller/inc/TextDirectionListBox.hxx51
-rw-r--r--chart2/source/controller/inc/TimerTriggeredControllerLock.hxx66
-rw-r--r--chart2/source/controller/inc/TitleDialogData.hxx70
-rw-r--r--chart2/source/controller/inc/TitleItemConverter.hxx83
-rw-r--r--chart2/source/controller/inc/ViewElementListProvider.hxx73
-rw-r--r--chart2/source/controller/inc/dlg_ChartType.hxx76
-rw-r--r--chart2/source/controller/inc/dlg_ChartType_UNO.hxx89
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard.hxx108
-rw-r--r--chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx132
-rw-r--r--chart2/source/controller/inc/dlg_DataEditor.hxx124
-rw-r--r--chart2/source/controller/inc/dlg_DataSource.hxx101
-rw-r--r--chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx102
-rw-r--r--chart2/source/controller/inc/dlg_InsertDataLabel.hxx73
-rw-r--r--chart2/source/controller/inc/dlg_InsertErrorBars.hxx81
-rw-r--r--chart2/source/controller/inc/dlg_InsertLegend.hxx72
-rw-r--r--chart2/source/controller/inc/dlg_InsertTitle.hxx64
-rw-r--r--chart2/source/controller/inc/dlg_InsertTrendline.hxx71
-rw-r--r--chart2/source/controller/inc/dlg_ObjectProperties.hxx157
-rw-r--r--chart2/source/controller/inc/dlg_ShapeFont.hxx62
-rw-r--r--chart2/source/controller/inc/dlg_ShapeParagraph.hxx57
-rw-r--r--chart2/source/controller/inc/dlg_View3D.hxx85
-rw-r--r--chart2/source/controller/inc/res_ErrorBar.hxx158
55 files changed, 5643 insertions, 0 deletions
diff --git a/chart2/source/controller/inc/AccessibleBase.hxx b/chart2/source/controller/inc/AccessibleBase.hxx
new file mode 100644
index 000000000000..80a6223520cd
--- /dev/null
+++ b/chart2/source/controller/inc/AccessibleBase.hxx
@@ -0,0 +1,382 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_ACCESSIBLEBASE_HXX_
+#define _CHART2_ACCESSIBLEBASE_HXX_
+
+#include "ObjectIdentifier.hxx"
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+#include <com/sun/star/accessibility/XAccessibleComponent.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/document/XEventListener.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/accessibility/XAccessibleEventBroadcaster.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <comphelper/accessibleeventnotifier.hxx>
+#include <cppuhelper/compbase6.hxx>
+#include <cppuhelper/interfacecontainer.hxx>
+#include <unotools/accessiblestatesethelper.hxx>
+
+#include <vector>
+#include <map>
+#include <boost/shared_ptr.hpp>
+
+#include "MutexContainer.hxx"
+
+class SfxItemSet;
+class SdrObject;
+class SdrView;
+
+namespace accessibility
+{
+class IAccessibleViewForwarder;
+}
+
+namespace chart
+{
+
+class AccessibleBase;
+class ObjectHierarchy;
+
+typedef ObjectIdentifier AccessibleUniqueId;
+
+struct AccessibleElementInfo
+{
+ AccessibleUniqueId m_aOID;
+
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::view::XSelectionSupplier > m_xSelectionSupplier;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::uno::XInterface > m_xView;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::awt::XWindow > m_xWindow;
+
+ ::boost::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
+
+ AccessibleBase * m_pParent;
+ SdrView* m_pSdrView;
+ ::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
+};
+
+
+namespace impl
+{
+typedef ::cppu::WeakComponentImplHelper6<
+ ::com::sun::star::accessibility::XAccessible,
+ ::com::sun::star::accessibility::XAccessibleContext,
+ ::com::sun::star::accessibility::XAccessibleComponent,
+ ::com::sun::star::accessibility::XAccessibleEventBroadcaster,
+ ::com::sun::star::lang::XServiceInfo,
+ ::com::sun::star::lang::XEventListener
+ > AccessibleBase_Base;
+}
+
+/** Base class for all Chart Accessibility objects
+ */
+class AccessibleBase :
+ public MutexContainer,
+ public impl::AccessibleBase_Base
+{
+public:
+ enum EventType
+ {
+ OBJECT_CHANGE,
+ GOT_SELECTION,
+ LOST_SELECTION,
+ PROPERTY_CHANGE
+ };
+
+ AccessibleBase( const AccessibleElementInfo & rAccInfo,
+ bool bMayHaveChildren,
+ bool bAlwaysTransparent = false );
+ virtual ~AccessibleBase();
+
+protected:
+ // for all calls to protected methods it is assumed that the mutex is locked
+ // unless calls outside via UNO, e.g. event notification, are done
+
+ /** @param bThrowException if true, a DisposedException is thrown if the
+ object is already disposed
+ @return true, if the component is already disposed and bThrowException is false,
+ false otherwise
+ */
+ bool CheckDisposeState( bool bThrowException = true ) const throw (::com::sun::star::lang::DisposedException);
+
+ /** Events coming from the core have to be processed in this methods. The
+ default implementation returns false, which indicates that the object is
+ not interested in the event. To react on events you have to implement
+ this method in derived classes.
+
+ The default implementation iterates over all children and forwards the
+ event until the first child returns true.
+
+ @param nObjId contains the object id of chart objects. If the object is
+ no chart object, the event is not broadcast.
+ @return If an object is the addressee of the event it should return
+ true, false otherwise.
+ */
+ virtual bool NotifyEvent( EventType eType, const AccessibleUniqueId & rId );
+
+ /** Adds a state to the set.
+ */
+ void AddState( sal_Int16 aState ) throw (::com::sun::star::uno::RuntimeException);
+
+ /** Removes a state from the set if the set contains the state, otherwise
+ nothing is done.
+ */
+ void RemoveState( sal_Int16 aState ) throw (::com::sun::star::uno::RuntimeException);
+
+ /** has to be overloaded by derived classes that support child elements.
+ With this method a rescan is initiated that should result in a correct
+ list of children.
+
+ This method is called when access to any methods concerning children is
+ invoked for the first time.
+ */
+ bool UpdateChildren();
+
+ /** Is called by UpdateChildren. This method is only called if an update is
+ really necessary.
+ */
+ virtual bool ImplUpdateChildren();
+
+ /** adds a child to the end of the internal vector of children. As a
+ result, the child-count increases by one, but all existing children keep
+ their indices.
+
+ Important: as the implementation is needed, this should remain the only
+ method for adding children (i.e. there mustn't be an AddChild( Reference<
+ XAccessible > ) or the like).
+ */
+ void AddChild( AccessibleBase* pChild );
+
+ /** removes a child from the internal vector. All children with index
+ greater than the index of the removed element get an index one less than
+ before.
+ */
+ void RemoveChildByOId( const ObjectIdentifier& rOId );
+
+ /** Retrieve the pixel coordinates of logical coordinates (0,0) of the
+ current logic coordinate system. This can be used for
+ getLocationOnScreen, if the coordinates of an object are not relative to
+ its direct parent, but a parent higher up in hierarchy.
+
+ @return the (x,y) pixel coordinates of the upper left corner
+ */
+ virtual ::com::sun::star::awt::Point GetUpperLeftOnScreen() const;
+
+ /** This method creates an AccessibleEventObject and sends it to all
+ listeners that are currently listening to this object
+
+ If bSendGlobally is true, the event is also broadcast via
+ vcl::unohelper::NotifyAccessibleStateEventGlobally()
+ */
+ void BroadcastAccEvent( sal_Int16 nId,
+ const ::com::sun::star::uno::Any & rNew,
+ const ::com::sun::star::uno::Any & rOld,
+ bool bSendGlobally = false ) const;
+
+ /** Removes all children from the internal lists and broadcasts child remove
+ events.
+
+ This method cares about mutex locking, and thus should be called without
+ the mutex locked.
+ */
+ virtual void KillAllChildren();
+
+ /** Is called from getAccessibleChild(). Before this method is called, an
+ update of children is done if necessary.
+ */
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible >
+ ImplGetAccessibleChildById( sal_Int32 i ) const
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+
+ /** Is called from getAccessibleChildCount(). Before this method is called,
+ an update of children is done if necessary.
+ */
+ virtual sal_Int32 ImplGetAccessibleChildCount() const
+ throw (::com::sun::star::uno::RuntimeException);
+
+ AccessibleElementInfo GetInfo() const;
+ void SetInfo( const AccessibleElementInfo & rNewInfo );
+ AccessibleUniqueId GetId() const;
+
+ // ________ WeakComponentImplHelper (XComponent::dispose) ________
+ virtual void SAL_CALL disposing();
+
+ // ________ XAccessible ________
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleContext > SAL_CALL getAccessibleContext()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleContext ________
+ virtual sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleChild( sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ /// @return AccessibleRole.SHAPE
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw (::com::sun::star::uno::RuntimeException);
+ // has to be implemented by derived classes
+// virtual ::rtl::OUString SAL_CALL getAccessibleName()
+// throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL
+ getAccessibleRelationSet()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL
+ getAccessibleStateSet()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
+ throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException,
+ ::com::sun::star::uno::RuntimeException);
+ // has to be implemented by derived classes
+// virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+// throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleComponent ________
+ virtual sal_Bool SAL_CALL containsPoint(
+ const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL
+ getAccessibleAtPoint( const ::com::sun::star::awt::Point& aPoint )
+ throw (::com::sun::star::uno::RuntimeException);
+ // has to be defined in derived classes
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocation()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Size SAL_CALL getSize()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL grabFocus()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getForeground()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getBackground()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XServiceInfo ________
+ virtual ::rtl::OUString SAL_CALL getImplementationName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL supportsService(
+ const ::rtl::OUString& ServiceName )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XEventListener ________
+ virtual void SAL_CALL disposing(
+ const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ using ::cppu::WeakComponentImplHelperBase::addEventListener;
+ using ::cppu::WeakComponentImplHelperBase::removeEventListener;
+
+ // ________ XAccessibleEventBroadcaster ________
+ virtual void SAL_CALL addEventListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ enum eColorType
+ {
+ ACC_BASE_FOREGROUND,
+ ACC_BASE_BACKGROUND
+ };
+ sal_Int32 getColor( eColorType eColType );
+
+private:
+ typedef ::com::sun::star::uno::Reference<
+ ::com::sun::star::accessibility::XAccessible > tAccessible;
+ /** type of the vector containing the accessible children
+ */
+ typedef ::std::vector< tAccessible > ChildListVectorType;
+ /** type of the hash containing a vector index for every AccessibleUniqueId
+ of the object in the child list
+ */
+ typedef ::std::map< ObjectIdentifier, tAccessible > ChildOIDMap;
+
+ bool m_bIsDisposed;
+ const bool m_bMayHaveChildren;
+ bool m_bChildrenInitialized;
+ ChildListVectorType m_aChildList;
+
+ ChildOIDMap m_aChildOIDMap;
+
+ ::comphelper::AccessibleEventNotifier::TClientId m_nEventNotifierId;
+
+ /** Implementation helper for getAccessibleStateSet()
+
+ Note: This member must come before m_aStateSet!
+ */
+ ::utl::AccessibleStateSetHelper * m_pStateSetHelper;
+ /** this is returned in getAccessibleStateSet().
+
+ The implementation is an ::utl::AccessibleStateSetHelper. To access
+ implementation methods use m_pStateSetHelper.
+
+ Note: Keeping this reference ensures, that the helper object is only
+ destroyed after this object has been disposed().
+ */
+ ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet >
+ m_aStateSet;
+
+ AccessibleElementInfo m_aAccInfo;
+ const bool m_bAlwaysTransparent;
+ /** denotes if the state-set is initialized. On initialization the selected
+ state is checked.
+
+ This variable is monitored by the solar mutex!
+
+ Note: declared volatile to enable double-check-locking
+ */
+ volatile bool m_bStateSetInitialized;
+};
+
+} // namespace chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/AccessibleChartView.hxx b/chart2/source/controller/inc/AccessibleChartView.hxx
new file mode 100644
index 000000000000..bceec99fb12b
--- /dev/null
+++ b/chart2/source/controller/inc/AccessibleChartView.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_ACCESSIBLE_CHART_VIEW_HXX
+#define _CHART2_ACCESSIBLE_CHART_VIEW_HXX
+
+#include "AccessibleBase.hxx"
+#include "MutexContainer.hxx"
+#include "ServiceMacros.hxx"
+#include <cppuhelper/implbase2.hxx>
+// header for class WeakReference
+#include <cppuhelper/weakref.hxx>
+#include <com/sun/star/accessibility/XAccessible.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/view/XSelectionSupplier.hpp>
+#include <com/sun/star/view/XSelectionChangeListener.hpp>
+#include <com/sun/star/awt/XWindow.hpp>
+
+#include <boost/shared_ptr.hpp>
+
+namespace accessibility
+{
+class IAccessibleViewForwarder;
+}
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ExplicitValueProvider;
+
+namespace impl
+{
+typedef ::cppu::ImplInheritanceHelper2<
+ ::chart::AccessibleBase,
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::view::XSelectionChangeListener >
+ AccessibleChartView_Base;
+}
+
+class AccessibleChartView :
+ public impl::AccessibleChartView_Base
+{
+public:
+ AccessibleChartView(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& xContext, SdrView* pView );
+ virtual ~AccessibleChartView();
+
+ // ____ WeakComponentHelper (called from XComponent::dispose()) ____
+ virtual void SAL_CALL disposing();
+
+ // ____ lang::XInitialization ____
+ // 0: view::XSelectionSupplier offers notifications for selection changes and access to the selection itself
+ // 1: frame::XModel representing the chart model - offers access to object data
+ // 2: lang::XInterface representing the normal chart view - offers access to some extra object data
+ // 3: accessibility::XAccessible representing the parent accessible
+ // 4: awt::XWindow representing the view's window (is a vcl Window)
+ // all arguments are only valid until next initialization - don't keep them longer
+ virtual void SAL_CALL initialize(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException);
+
+ // ____ view::XSelectionChangeListener ____
+ virtual void SAL_CALL selectionChanged( const ::com::sun::star::lang::EventObject& aEvent ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XEventListener ________
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleContext ________
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL getAccessibleRole()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ________ XAccessibleComponent ________
+ virtual ::com::sun::star::awt::Rectangle SAL_CALL getBounds() throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::awt::Point SAL_CALL getLocationOnScreen() throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+ // ________ AccessibleChartElement ________
+ virtual ::com::sun::star::awt::Point GetUpperLeftOnScreen() const;
+
+private: // methods
+ /** @return the result that m_xWindow->getPosSize() _should_ return. It
+ returns (0,0) as upper left corner. When calling
+ getAccessibleParent, you get the parent's parent, which contains
+ a decoration. Thus you have an offset of (currently) (2,2)
+ which isn't taken into account.
+ */
+ virtual ::com::sun::star::awt::Rectangle GetWindowPosSize() const;
+
+ ExplicitValueProvider* getExplicitValueProvider();
+
+private: // members
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext> m_xContext;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::view::XSelectionSupplier > m_xSelectionSupplier;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::frame::XModel > m_xChartModel;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::uno::XInterface > m_xChartView;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::awt::XWindow > m_xWindow;
+ ::com::sun::star::uno::WeakReference<
+ ::com::sun::star::accessibility::XAccessible > m_xParent;
+
+ ::boost::shared_ptr< ObjectHierarchy > m_spObjectHierarchy;
+ AccessibleUniqueId m_aCurrentSelectionOID;
+ SdrView* m_pSdrView;
+ ::accessibility::IAccessibleViewForwarder* m_pViewForwarder;
+
+ //no default constructor
+ AccessibleChartView();
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/AccessibleTextHelper.hxx b/chart2/source/controller/inc/AccessibleTextHelper.hxx
new file mode 100644
index 000000000000..c52d01d27b58
--- /dev/null
+++ b/chart2/source/controller/inc/AccessibleTextHelper.hxx
@@ -0,0 +1,116 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_ACCESSIBLETEXTHELPER_HXX
+#define CHART2_ACCESSIBLETEXTHELPER_HXX
+
+#include "MutexContainer.hxx"
+#include <cppuhelper/compbase2.hxx>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/accessibility/XAccessibleContext.hpp>
+
+// forward declaration of helper class from svx
+namespace accessibility
+{
+class AccessibleTextHelper;
+}
+
+namespace chart
+{
+
+class DrawViewWrapper;
+
+namespace impl
+{
+typedef ::cppu::WeakComponentImplHelper2<
+ ::com::sun::star::lang::XInitialization,
+ ::com::sun::star::accessibility::XAccessibleContext >
+ AccessibleTextHelper_Base;
+}
+
+class AccessibleTextHelper :
+ public MutexContainer,
+ public impl::AccessibleTextHelper_Base
+{
+public:
+ explicit AccessibleTextHelper( DrawViewWrapper * pDrawViewWrapper );
+ virtual ~AccessibleTextHelper();
+
+ // ____ XInitialization ____
+ /** Must be called at least once for this helper class to work.
+
+ mandatory parameter 0: type string. This is the CID that is used to find
+ the corresponding drawing object that contains the text that should
+ be handled by this helper class.
+1
+ mandatory parameter 1: type XAccessible. Is used as EventSource for the
+ ::accessibility::AccessibleTextHelper (svx)
+
+ mandatory parameter 2: type awt::XWindow. The Window that shows the
+ text currently.
+ */
+ virtual void SAL_CALL initialize(
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments )
+ throw (::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException);
+
+ // ____ XAccessibleContext ____
+ virtual ::sal_Int32 SAL_CALL getAccessibleChildCount()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleChild(
+ ::sal_Int32 i )
+ throw (::com::sun::star::lang::IndexOutOfBoundsException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessible > SAL_CALL getAccessibleParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int32 SAL_CALL getAccessibleIndexInParent()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::sal_Int16 SAL_CALL getAccessibleRole()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleDescription()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getAccessibleName()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleRelationSet > SAL_CALL getAccessibleRelationSet()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::accessibility::XAccessibleStateSet > SAL_CALL getAccessibleStateSet()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::lang::Locale SAL_CALL getLocale()
+ throw (::com::sun::star::accessibility::IllegalAccessibleComponentStateException,
+ ::com::sun::star::uno::RuntimeException);
+
+private:
+ ::accessibility::AccessibleTextHelper * m_pTextHelper;
+ DrawViewWrapper * m_pDrawViewWrapper;
+};
+
+} // namespace chart
+
+// CHART2_ACCESSIBLETEXTHELPER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/AxisItemConverter.hxx b/chart2/source/controller/inc/AxisItemConverter.hxx
new file mode 100644
index 000000000000..17277c2908a3
--- /dev/null
+++ b/chart2/source/controller/inc/AxisItemConverter.hxx
@@ -0,0 +1,95 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_AXISITEMCONVERTER_HXX
+#define CHART_AXISITEMCONVERTER_HXX
+
+#include <com/sun/star/chart2/ExplicitScaleData.hpp>
+#include <com/sun/star/chart2/ExplicitIncrementData.hpp>
+#include <com/sun/star/chart2/XAxis.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/awt/Size.hpp>
+
+#include "ItemConverter.hxx"
+
+#include <vector>
+#include <memory>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class AxisItemConverter : public ::comphelper::ItemConverter
+{
+public:
+ AxisItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDoc,
+ ::com::sun::star::chart2::ExplicitScaleData * pScale = NULL,
+ ::com::sun::star::chart2::ExplicitIncrementData * pIncrement = NULL,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~AxisItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::std::vector< ItemConverter * > m_aConverters;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XAxis > m_xAxis;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > m_xChartDoc;
+
+ ::com::sun::star::chart2::ExplicitScaleData * m_pExplicitScale;
+ ::com::sun::star::chart2::ExplicitIncrementData * m_pExplicitIncrement;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_AXISITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
new file mode 100644
index 000000000000..ba334b748c08
--- /dev/null
+++ b/chart2/source/controller/inc/CharacterPropertyItemConverter.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_CHARACTERPROPERTYITEMCONVERTER_HXX
+#define CHART_CHARACTERPROPERTYITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/awt/Size.hpp>
+
+#include <memory>
+
+namespace chart
+{
+namespace wrapper
+{
+
+class CharacterPropertyItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ CharacterPropertyItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool );
+ CharacterPropertyItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize,
+ const ::rtl::OUString & rRefSizePropertyName,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rRefSizePropSet =
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >() );
+ virtual ~CharacterPropertyItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > GetRefSizePropertySet() const;
+
+private:
+ ::std::auto_ptr< ::com::sun::star::awt::Size > m_pRefSize;
+ ::rtl::OUString m_aRefSizePropertyName;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > m_xRefSizePropSet;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_CHARACTERPROPERTYITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ChartDocumentWrapper.hxx b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
new file mode 100644
index 000000000000..76c2544781f0
--- /dev/null
+++ b/chart2/source/controller/inc/ChartDocumentWrapper.hxx
@@ -0,0 +1,237 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_CHARTDOCUMENTWRAPPER_HXX
+#define CHART_CHARTDOCUMENTWRAPPER_HXX
+
+#include "WrappedPropertySet.hxx"
+#include "ServiceMacros.hxx"
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/chart/XChartDocument.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/drawing/XDrawPageSupplier.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XAggregation.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/util/XRefreshable.hpp>
+#include <cppuhelper/implbase5.hxx>
+#include <osl/mutex.hxx>
+#include <unotools/eventlisteneradapter.hxx>
+#include <comphelper/uno3.hxx>
+
+#include <boost/shared_ptr.hpp>
+
+namespace chart
+{
+
+namespace wrapper
+{
+
+class Chart2ModelContact;
+
+class ChartDocumentWrapper_Base : public ::cppu::ImplInheritanceHelper5
+ < WrappedPropertySet
+ , ::com::sun::star::chart::XChartDocument
+ , ::com::sun::star::drawing::XDrawPageSupplier
+ , ::com::sun::star::lang::XMultiServiceFactory
+ , ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::uno::XAggregation
+ >
+{
+};
+
+class ChartDocumentWrapper : public ChartDocumentWrapper_Base
+ , public ::utl::OEventListenerAdapter
+{
+public:
+ explicit ChartDocumentWrapper(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext );
+ virtual ~ChartDocumentWrapper();
+
+ /// XServiceInfo declarations
+ APPHELPER_XSERVICEINFO_DECL()
+ APPHELPER_SERVICE_FACTORY_HELPER(ChartDocumentWrapper)
+
+ void setAddIn( const ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshable >& xAddIn );
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshable > getAddIn() const;
+
+ void setUpdateAddIn( sal_Bool bUpdateAddIn );
+ sal_Bool getUpdateAddIn() const;
+
+ void setBaseDiagram( const rtl::OUString& rBaseDiagram );
+ rtl::OUString getBaseDiagram() const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes > getAdditionalShapes() const;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage > impl_getDrawPage() const
+ throw (::com::sun::star::uno::RuntimeException);
+
+protected:
+
+ // ____ chart::XChartDocument ____
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape > SAL_CALL getTitle()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape > SAL_CALL getSubTitle()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape > SAL_CALL getLegend()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > SAL_CALL getArea()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart::XDiagram > SAL_CALL getDiagram()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setDiagram( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart::XDiagram >& xDiagram )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart::XChartData > SAL_CALL getData()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL attachData( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart::XChartData >& xData )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XModel ____
+ virtual sal_Bool SAL_CALL attachResource( const ::rtl::OUString& URL, const ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue >& Arguments )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::rtl::OUString SAL_CALL getURL()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::com::sun::star::beans::PropertyValue > SAL_CALL getArgs()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL connectController( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XController >& Controller )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL disconnectController( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XController >& Controller )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL lockControllers()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL unlockControllers()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Bool SAL_CALL hasControllersLocked()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XController > SAL_CALL getCurrentController()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setCurrentController( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XController >& Controller )
+ throw (::com::sun::star::container::NoSuchElementException,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > SAL_CALL getCurrentSelection()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XComponent ____
+ virtual void SAL_CALL dispose()
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener >& xListener )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XEventListener >& aListener )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XInterface (for new interfaces) ____
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ ::utl::OEventListenerAdapter ____
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& rSource );
+
+ // ____ XDrawPageSupplier ____
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XDrawPage > SAL_CALL getDrawPage()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XMultiServiceFactory ____
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > SAL_CALL createInstance( const ::rtl::OUString& aServiceSpecifier )
+ throw (::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface > SAL_CALL createInstanceWithArguments(
+ const ::rtl::OUString& ServiceSpecifier,
+ const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& Arguments )
+ throw (::com::sun::star::uno::Exception,
+ ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence<
+ ::rtl::OUString > SAL_CALL getAvailableServiceNames()
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XAggregation ____
+ virtual void SAL_CALL setDelegator(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface >& rDelegator )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( const ::com::sun::star::uno::Type& aType )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ WrappedPropertySet ____
+ virtual const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property >& getPropertySequence();
+ virtual const std::vector< WrappedProperty* > createWrappedProperties();
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > getInnerPropertySet();
+
+private: //methods
+ void impl_resetAddIn();
+
+private: //member
+ ::boost::shared_ptr< Chart2ModelContact > m_spChart2ModelContact;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xDelegator;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xTitle;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xSubTitle;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xLegend;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart::XChartData > m_xChartData;
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart::XDiagram > m_xDiagram;
+ ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > m_xArea;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::util::XRefreshable > m_xAddIn;
+ rtl::OUString m_aBaseDiagram;
+ sal_Bool m_bUpdateAddIn;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > m_xChartView;
+ ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>
+ m_xShapeFactory;
+
+ bool m_bIsDisposed;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_CHARTDOCUMENT_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ChartRenderer.hxx b/chart2/source/controller/inc/ChartRenderer.hxx
new file mode 100644
index 000000000000..3d0c08884a4b
--- /dev/null
+++ b/chart2/source/controller/inc/ChartRenderer.hxx
@@ -0,0 +1,79 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_RENDERER_HXX
+#define CHART_RENDERER_HXX
+
+#include <svtools/chartprettypainter.hxx>
+#include "ServiceMacros.hxx"
+
+#include <cppuhelper/implbase2.hxx>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <cppuhelper/weakref.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//#i82893#, #i75867#: charts must be painted resolution dependent!!
+class ChartRenderer : public ::cppu::WeakImplHelper2<
+ ::com::sun::star::lang::XServiceInfo
+ , ::com::sun::star::lang::XUnoTunnel
+ >, public ChartPrettyPainter
+{
+public:
+ ChartRenderer( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
+ virtual ~ChartRenderer();
+
+ // ___lang::XServiceInfo___
+ APPHELPER_XSERVICEINFO_DECL()
+
+ // ____ XUnoTunnel ___
+ virtual ::sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< ::sal_Int8 >& aIdentifier )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ ChartPrettyPainter ___
+ virtual bool DoPaint(OutputDevice* pOutDev, const Rectangle& rLogicObjectRect) const;
+
+private:
+ ChartRenderer();
+ ChartRenderer( const ChartRenderer& );
+
+ ::com::sun::star::uno::WeakReference< ::com::sun::star::frame::XModel > m_xChartModel;
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ConfigurationAccess.hxx b/chart2/source/controller/inc/ConfigurationAccess.hxx
new file mode 100644
index 000000000000..2a4ba143a33e
--- /dev/null
+++ b/chart2/source/controller/inc/ConfigurationAccess.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_CONFIGURATIONACCESS_HXX
+#define _CHART2_CONFIGURATIONACCESS_HXX
+
+// header for enum FieldUnit
+#include <vcl/fldunit.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/**
+*/
+
+namespace ConfigurationAccess
+{
+ /** @descr Retrieve the FieldUnit to be used for the UI. This unit is retrieved
+ from the registry settings of the Calc application.
+
+ If this setting can not be found there is a fallback to cm which is the most
+ common setting worldwide (or not?)
+
+ @return the FieldUnit enum. See <vcl/fldunit.hxx> for definition
+ */
+ FieldUnit getFieldUnit();
+}
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DataPointItemConverter.hxx b/chart2/source/controller/inc/DataPointItemConverter.hxx
new file mode 100644
index 000000000000..233dd4a7e7a5
--- /dev/null
+++ b/chart2/source/controller/inc/DataPointItemConverter.hxx
@@ -0,0 +1,113 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_DATAPOINTITEMCONVERTER_HXX
+#define CHART_DATAPOINTITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include "GraphicPropertyItemConverter.hxx"
+#include "chartview/NumberFormatterWrapper.hxx"
+
+#include <com/sun/star/chart2/XDataSeries.hpp>
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <memory>
+#include <vector>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class DataPointItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ DataPointItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XDataSeries > & xSeries,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ NumberFormatterWrapper * pNumFormatter,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ GraphicPropertyItemConverter::eGraphicObjectType eMapTo =
+ GraphicPropertyItemConverter::FILLED_DATA_POINT,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >(),
+ bool bDataSeries = false,
+ bool bUseSpecialFillColor = false,
+ sal_Int32 nSpecialFillColor = 0,
+ bool bOverwriteLabelsForAttributedDataPointsAlso=false,
+ sal_Int32 nNumberFormat=0,
+ sal_Int32 nPercentNumberFormat=0);
+
+ virtual ~DataPointItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::std::vector< ItemConverter * > m_aConverters;
+ NumberFormatterWrapper * m_pNumberFormatterWrapper;
+ bool m_bDataSeries;
+ bool m_bOverwriteLabelsForAttributedDataPointsAlso;
+ bool m_bColorPerPoint;
+ bool m_bUseSpecialFillColor;
+ sal_Int32 m_nSpecialFillColor;
+ sal_Int32 m_nNumberFormat;
+ sal_Int32 m_nPercentNumberFormat;
+ ::com::sun::star::uno::Sequence< sal_Int32 > m_aAvailableLabelPlacements;
+ bool m_bForbidPercentValue;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_DATAPOINTITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/DrawViewWrapper.hxx b/chart2/source/controller/inc/DrawViewWrapper.hxx
new file mode 100644
index 000000000000..2e83832b226c
--- /dev/null
+++ b/chart2/source/controller/inc/DrawViewWrapper.hxx
@@ -0,0 +1,114 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DRAW_VIEW_WRAPPER_HXX
+#define _CHART2_DRAW_VIEW_WRAPPER_HXX
+
+#include <svx/view3d.hxx>
+#include <com/sun/star/drawing/XShape.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+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, bool bPaintPageForEditMode);
+ virtual ~DrawViewWrapper();
+
+ //triggers the use of an updated first page
+ void ReInit();
+
+ /// tries to get an OutputDevice from the XParent of the model to use as reference device
+ void attachParentReferenceDevice(
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel );
+
+ //fill list of selection handles 'aHdl'
+ virtual void SetMarkHandles();
+
+ SdrPageView* GetPageView() const;
+
+ 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 CompleteRedraw(OutputDevice* pOut, const Region& rReg, sdr::contact::ViewObjectContactRedirector* pRedirector = 0);
+
+ SdrObject* getSelectedObject() const;
+ SdrObject* getTextEditObject() const;
+ SdrOutliner* getOutliner() const;
+
+ SfxItemSet getPositionAndSizeItemSetFromMarkedObject() const;
+
+ SdrObject* getNamedSdrObject( const rtl::OUString& rName ) const;
+ bool IsObjectHit( SdrObject* pObj, const Point& rPnt ) const;
+
+ virtual void Notify(SfxBroadcaster& rBC, const SfxHint& rHint);
+
+ static SdrObject* getSdrObject( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::drawing::XShape >& xShape );
+
+private:
+ mutable MarkHandleProvider* m_pMarkHandleProvider;
+
+ ::std::auto_ptr< SdrOutliner > m_apOutliner;
+
+ // #i79965# scroll back view when ending text edit
+ bool m_bRestoreMapMode;
+ MapMode m_aMapModeToRestore;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ErrorBarItemConverter.hxx b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
new file mode 100644
index 000000000000..81584e916884
--- /dev/null
+++ b/chart2/source/controller/inc/ErrorBarItemConverter.hxx
@@ -0,0 +1,87 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_STATISTICSITEMCONVERTER_HXX
+#define CHART_STATISTICSITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include "GraphicPropertyItemConverter.hxx"
+#include "chartview/NumberFormatterWrapper.hxx"
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class ErrorBarItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ ErrorBarItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
+ virtual ~ErrorBarItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::boost::shared_ptr< ItemConverter > m_spGraphicConverter;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > m_xModel;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_STATISTICSITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
new file mode 100644
index 000000000000..4d1178f17e53
--- /dev/null
+++ b/chart2/source/controller/inc/GraphicPropertyItemConverter.hxx
@@ -0,0 +1,88 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_GRAPHICPROPERTYITEMCONVERTER_HXX
+#define CHART_GRAPHICPROPERTYITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/beans/PropertyState.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class GraphicPropertyItemConverter :
+ public ::comphelper::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,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ eGraphicObjectType eObjectType = FILLED_DATA_POINT );
+ virtual ~GraphicPropertyItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ eGraphicObjectType m_eGraphicObjectType;
+ SdrModel & m_rDrawModel;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > m_xNamedPropertyTableFactory;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_GRAPHICPROPERTYITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/HelpIds.hrc b/chart2/source/controller/inc/HelpIds.hrc
new file mode 100644
index 000000000000..244b3d71dfa7
--- /dev/null
+++ b/chart2/source/controller/inc/HelpIds.hrc
@@ -0,0 +1,182 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_HELPIDS_HRC
+#define CHART_HELPIDS_HRC
+
+#include <svl/solar.hrc>
+//next is 120
+//free: 20, 21, 22, 30, 31, 32, 33
+
+//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_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)
+
+//for chart type dialog:
+#define HID_SCH_CTL_TYPE (HID_SCH_START + 13)
+#define HID_SCH_CTL_VARIANT (HID_SCH_START + 14)
+#define HID_SCH_NUM_OF_LINES (HID_SCH_START + 43)
+#define HID_SCH_SERIES_LIST (HID_SCH_START + 15)
+#define HID_SCH_DATA_RANGES_LIST (HID_SCH_START + 16)
+//
+
+//#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_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_INSERT_TEXT_COL (HID_SCH_START + 29)
+#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)
+#define HID_SCH_LB_BAR_GEOMETRY (HID_SCH_START + 45)
+#define HID_SCH_DLG_SPLINE_PROPERTIES (HID_SCH_START + 46)
+#define HID_SCH_DLG_RANGES (HID_SCH_START + 47)
+
+#define HID_SCH_CB_XAXIS (HID_SCH_START + 48)
+#define HID_SCH_CB_YAXIS (HID_SCH_START + 49)
+#define HID_SCH_CB_ZAXIS (HID_SCH_START + 50)
+#define HID_SCH_CB_SECONDARY_XAXIS (HID_SCH_START + 51)
+#define HID_SCH_CB_SECONDARY_YAXIS (HID_SCH_START + 52)
+#define HID_SCH_CB_SECONDARY_ZAXIS (HID_SCH_START + 53)
+
+#define HID_SCH_CB_XGRID (HID_SCH_START + 54)
+#define HID_SCH_CB_YGRID (HID_SCH_START + 55)
+#define HID_SCH_CB_ZGRID (HID_SCH_START + 56)
+#define HID_SCH_CB_SECONDARY_XGRID (HID_SCH_START + 57)
+#define HID_SCH_CB_SECONDARY_YGRID (HID_SCH_START + 58)
+#define HID_SCH_CB_SECONDARY_ZGRID (HID_SCH_START + 59)
+
+#define HID_SCH_LEGEND_POS_LEFT (HID_SCH_START + 60)
+#define HID_SCH_LEGEND_POS_TOP (HID_SCH_START + 61)
+#define HID_SCH_LEGEND_POS_RIGHT (HID_SCH_START + 62)
+#define HID_SCH_LEGEND_POS_BOTTOM (HID_SCH_START + 63)
+
+#define HID_SCH_STATISTIK_MEANVALUE (HID_SCH_START + 64)
+#define HID_SCH_STATISTIK_NO_ERROR (HID_SCH_START + 65)
+#define HID_SCH_STATISTIK_VARIANT (HID_SCH_START + 66)
+#define HID_SCH_STATISTIK_SIGMA (HID_SCH_START + 67)
+#define HID_SCH_STATISTIK_PERCENT (HID_SCH_START + 68)
+#define HID_SCH_STATISTIK_BIGERROR (HID_SCH_START + 69)
+#define HID_SCH_STATISTIK_CONSTERROR (HID_SCH_START + 70)
+#define HID_SCH_STATISTIK_PERCENT_VALUE (HID_SCH_START + 71)
+#define HID_SCH_STATISTIK_BIGERROR_VALUE (HID_SCH_START + 72)
+#define HID_SCH_STATISTIK_PLUS_VALUE (HID_SCH_START + 73)
+#define HID_SCH_STATISTIK_MINUS_VALUE (HID_SCH_START + 74)
+
+#define HID_SCH_DATALABEL_VALUE (HID_SCH_START + 75)
+#define HID_SCH_DATALABEL_NUMBER (HID_SCH_START + 76)
+#define HID_SCH_DATALABEL_PERCENT (HID_SCH_START + 77)
+#define HID_SCH_DATALABEL_TEXT (HID_SCH_START + 78)
+#define HID_SCH_DATALABEL_SYMBOL (HID_SCH_START + 79)
+#define HID_SCH_PB_NUMBERFORMAT (HID_SCH_START + 88)
+#define HID_SCH_PB_PERCENT_NUMBERFORMAT (HID_SCH_START + 89)
+#define HID_SCH_DATALABEL_SEPARATOR (HID_SCH_START + 90)
+#define HID_SCH_DATALABEL_PLACEMENT (HID_SCH_START + 91)
+#define HID_SCH_TEXTDIRECTION (HID_SCH_START + 115)
+#define HID_SCH_TEXTDIRECTION_TITLE (HID_SCH_START + 116)
+#define HID_SCH_TEXTDIRECTION_EQUATION (HID_SCH_START + 117)
+#define HID_SCH_DATALABEL_ROTATION_KNOB (HID_SCH_START + 118)
+#define HID_SCH_DATALABEL_ROTATION_EDIT (HID_SCH_START + 119)
+
+#define HID_SCH_TITLE_MAIN (HID_SCH_START + 80)
+#define HID_SCH_TITLE_SUB (HID_SCH_START + 81)
+#define HID_SCH_TITLE_X (HID_SCH_START + 82)
+#define HID_SCH_TITLE_Y (HID_SCH_START + 83)
+#define HID_SCH_TITLE_Z (HID_SCH_START + 84)
+#define HID_SCH_TITLE_SECONDARY_X (HID_SCH_START + 92)
+#define HID_SCH_TITLE_SECONDARY_Y (HID_SCH_START + 93)
+
+#define HID_SCH_WIZARD_ROADMAP (HID_SCH_START + 85)
+#define HID_SCH_LEGEND_SHOW (HID_SCH_START + 86)
+#define HID_SCH_DATA_SERIES_LABEL (HID_SCH_START + 87)
+
+#define HID_SCH_STARTING_ANGLE_DIAL (HID_SCH_START + 94)
+
+#define HID_SCH_TRENDLINE_RB_NONE (HID_SCH_START + 95)
+#define HID_SCH_TRENDLINE_RB_LINEAR (HID_SCH_START + 96)
+#define HID_SCH_TRENDLINE_RB_LOGARITHMIC (HID_SCH_START + 97)
+#define HID_SCH_TRENDLINE_RB_EXPONENTIAL (HID_SCH_START + 98)
+#define HID_SCH_TRENDLINE_RB_POWER (HID_SCH_START + 99)
+#define HID_SCH_TRENDLINE_SHOW_EQUATION (HID_SCH_START + 100)
+#define HID_SCH_TRENDLINE_SHOW_R_SQUARED (HID_SCH_START + 101)
+
+#define HID_SCH_STATISTIK_FUNCTION (HID_SCH_START + 102)
+#define HID_SCH_STATISTIK_RANGE (HID_SCH_START + 103)
+#define HID_SCH_STATISTIK_FUNCTION_LB (HID_SCH_START + 104)
+#define HID_SCH_STATISTIK_POSITIVE_VALUE (HID_SCH_START + 105)
+#define HID_SCH_STATISTIK_POSITIVE_RANGE (HID_SCH_START + 106)
+#define HID_SCH_STATISTIK_POSITIVE_RANGE_CHOOSER (HID_SCH_START + 107)
+#define HID_SCH_STATISTIK_NEGATIVE_VALUE (HID_SCH_START + 108)
+#define HID_SCH_STATISTIK_NEGATIVE_RANGE (HID_SCH_START + 109)
+#define HID_SCH_STATISTIK_NEGATIVE_RANGE_CHOOSER (HID_SCH_START + 110)
+#define HID_SCH_STATISTIK_SAME_FOR_BOTH (HID_SCH_START + 111)
+#define HID_SCH_STATISTIK_SHOW_BOTH (HID_SCH_START + 112)
+#define HID_SCH_STATISTIK_SHOW_POSITIVE (HID_SCH_START + 113)
+#define HID_SCH_STATISTIK_SHOW_NEGATIVE (HID_SCH_START + 114)
+
+
+// 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..aae79517d1a8
--- /dev/null
+++ b/chart2/source/controller/inc/ItemConverter.hxx
@@ -0,0 +1,218 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_ITEMCONVERTER_HXX
+#define CHART_ITEMCONVERTER_HXX
+
+#include <unotools/eventlisteneradapter.hxx>
+#include <svl/itempool.hxx>
+#include <svl/itemset.hxx>
+#include <com/sun/star/beans/XPropertySet.hpp>
+
+// for pair
+#include <utility>
+
+namespace comphelper
+{
+
+/** This class serves for conversion between properties of an XPropertySet and
+ SfxItems in SfxItemSets.
+
+ With this helper classes, you can feed dialogs with XPropertySets and let
+ those modify by the dialogs.
+
+ You must implement GetWhichPairs() such that an SfxItemSet created with
+ CreateEmptyItemSet() is able to hold all items that may be mapped.
+
+ You also have to implement GetItemProperty(), in order to return the
+ property name for a given which-id together with the corresponding member-id
+ that has to be used for conversion in QueryValue/PutValue.
+
+ FillSpecialItem and ApplySpecialItem may be used for special handling of
+ individual item, e.g. if you need member-ids in QueryValue/PutValue
+
+ A typical use could be the following:
+
+ ::comphelper::ChartTypeItemConverter aItemConverter( xPropertySet, GetItemPool() );
+ SfxItemSet aItemSet = aItemConverter.CreateEmptyItemSet();
+ aItemConverter.FillItemSet( aItemSet );
+ bool bChanged = false;
+
+ MyDialog aDlg( aItemSet );
+ if( aDlg.Execute() == RET_OK )
+ {
+ const SfxItemSet* pOutItemSet = aDlg.GetOutputItemSet();
+ if( pOutItemSet )
+ bChanged = aItemConverter.ApplyItemSet( *pOutItemSet );
+ }
+
+ if( bChanged )
+ {
+ [ apply model changes to view ]
+ }
+ */
+class ItemConverter :
+ public ::utl::OEventListenerAdapter
+{
+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();
+
+ // typedefs -------------------------------
+
+ typedef USHORT tWhichIdType;
+ typedef ::rtl::OUString tPropertyNameType;
+ typedef BYTE tMemberIdType;
+
+ typedef ::std::pair< tPropertyNameType, tMemberIdType > tPropertyNameWithMemberId;
+
+ // ----------------------------------------
+
+ /** applies all properties that can be mapped to items into the given item
+ set.
+
+ Call this method before opening a dialog.
+
+ @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.
+
+ Call this method after a dialog was closed with OK
+
+ @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;
+
+ /** Invalidates all items in rDestSet, that are set (state SFX_ITEM_SET) in
+ both item sets (rDestSet and rSourceSet) and have differing content.
+ */
+ static void InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItemSet &rSourceSet );
+
+protected:
+ // ________
+
+ /** implement this method to provide an array of which-ranges of the form:
+
+ const USHORT aMyPairs[] =
+ {
+ from_1, to_1,
+ from_2, to_2,
+ ...
+ from_n, to_n,
+ 0
+ };
+ */
+ virtual const USHORT * GetWhichPairs() const = 0;
+
+ /** implement this method to return a Property object for a given which id.
+
+ @param rOutProperty
+ If true is returned, this contains the property name and the
+ corresponding Member-Id.
+
+ @return true, if the item can be mapped to a property.
+ */
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const = 0;
+
+ /** for items that can not be mapped directly to a property.
+
+ This method is called from FillItemSet(), if GetItemProperty() returns
+ false.
+
+ The default implementation does nothing except showing an assertion
+ */
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+
+ /** for items that can not be mapped directly to a property.
+
+ This method is called from ApplyItemSet(), if GetItemProperty() returns
+ false.
+
+ The default implementation returns just false and shows an assertion
+
+ @return true if the item changed a property, false otherwise.
+ */
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+ // ________
+
+ /// 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;
+
+ // ____ ::utl::OEventListenerAdapter ____
+ virtual void _disposing( const ::com::sun::star::lang::EventObject& rSource );
+
+protected:
+ /** sets a new property set, that you get with GetPropertySet(). It should
+ not be necessary to use this method. It is introduced to allow changing
+ the regression type of a regression curve which changes the object
+ identity.
+ */
+ void resetPropertySet( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & xPropSet );
+
+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 comphelper
+
+// CHART_ITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ItemPropertyMap.hxx b/chart2/source/controller/inc/ItemPropertyMap.hxx
new file mode 100644
index 000000000000..23f19c091a82
--- /dev/null
+++ b/chart2/source/controller/inc/ItemPropertyMap.hxx
@@ -0,0 +1,93 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_ITEMPROPERTYMAP_HXX
+#define CHART_ITEMPROPERTYMAP_HXX
+
+
+#include <comphelper/InlineContainer.hxx>
+#include "ItemConverter.hxx"
+
+
+#define IPM_MAP_ENTRY(wid,uno,mid) (wid, ::std::make_pair< ::comphelper::ItemConverter::tPropertyNameType, ::comphelper::ItemConverter::tMemberIdType >(\
+ ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(uno)), mid))
+
+namespace comphelper
+{
+
+typedef ::std::map< ItemConverter::tWhichIdType, ::std::pair< ItemConverter::tPropertyNameType, ItemConverter::tMemberIdType > >
+ ItemPropertyMapType;
+typedef ::comphelper::MakeMap< ItemConverter::tWhichIdType, ::std::pair< ItemConverter::tPropertyNameType, ItemConverter::tMemberIdType > >
+ MakeItemPropertyMap;
+
+class FillItemSetFunc : public ::std::unary_function< ItemConverter *, void >
+{
+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< ItemConverter *, void >
+{
+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< ItemConverter *, void >
+{
+ void operator() ( ItemConverter * pConv )
+ { delete pConv; }
+};
+
+} // namespace comphelper
+
+// CHART_ITEMPROPERTYMAP_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/LegendItemConverter.hxx b/chart2/source/controller/inc/LegendItemConverter.hxx
new file mode 100644
index 000000000000..72711f724f47
--- /dev/null
+++ b/chart2/source/controller/inc/LegendItemConverter.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_LEGENDITEMCONVERTER_HXX
+#define CHART_LEGENDITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <vector>
+#include <memory>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class LegendItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ LegendItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~LegendItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::std::vector< ItemConverter * > m_aConverters;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_LEGENDITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/MenuResIds.hrc b/chart2/source/controller/inc/MenuResIds.hrc
new file mode 100644
index 000000000000..6c899fc78a25
--- /dev/null
+++ b/chart2/source/controller/inc/MenuResIds.hrc
@@ -0,0 +1,41 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_MENURESIDS_HRC
+#define CHART_MENURESIDS_HRC
+
+#ifndef _SOLAR_HRC
+#include <svl/solar.hrc>
+#endif
+
+//-----------------------------------------------------------------------------
+// context menus
+
+#define RID_CONTEXTMENU_SHAPE (RID_APP_START + 1)
+#define RID_CONTEXTMENU_SHAPEEDIT (RID_APP_START + 2)
+
+// CHART_MENURESIDS_HRC
+#endif
diff --git a/chart2/source/controller/inc/MultipleChartConverters.hxx b/chart2/source/controller/inc/MultipleChartConverters.hxx
new file mode 100644
index 000000000000..520f77977716
--- /dev/null
+++ b/chart2/source/controller/inc/MultipleChartConverters.hxx
@@ -0,0 +1,133 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_MULTIPLECHARTCONVERTERS_HXX
+#define CHART2_MULTIPLECHARTCONVERTERS_HXX
+
+#include "MultipleItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <memory>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class AllAxisItemConverter : public ::comphelper::MultipleItemConverter
+{
+public:
+ AllAxisItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~AllAxisItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+};
+
+class AllGridItemConverter : public ::comphelper::MultipleItemConverter
+{
+public:
+ AllGridItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
+ virtual ~AllGridItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+};
+
+class AllDataLabelItemConverter : public ::comphelper::MultipleItemConverter
+{
+public:
+ AllDataLabelItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~AllDataLabelItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+};
+
+class AllTitleItemConverter : public ::comphelper::MultipleItemConverter
+{
+public:
+ AllTitleItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~AllTitleItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+};
+
+class AllSeriesStatisticsConverter : public ::comphelper::MultipleItemConverter
+{
+public:
+ AllSeriesStatisticsConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ SfxItemPool& rItemPool );
+ virtual ~AllSeriesStatisticsConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART2_MULTIPLECHARTCONVERTERS_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/MultipleItemConverter.hxx b/chart2/source/controller/inc/MultipleItemConverter.hxx
new file mode 100644
index 000000000000..a452eccafaaa
--- /dev/null
+++ b/chart2/source/controller/inc/MultipleItemConverter.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_ALLAXISITEMCONVERTER_HXX
+#define CHART_ALLAXISITEMCONVERTER_HXX
+
+#include <com/sun/star/frame/XModel.hpp>
+
+#include "ItemConverter.hxx"
+
+#include <vector>
+
+namespace comphelper
+{
+
+/** Note: virtual const USHORT * GetWhichPairs() const; is still pure virtual
+ */
+class MultipleItemConverter : public ItemConverter
+{
+public:
+ virtual ~MultipleItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+ /// implemented empty (returns always false)
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+protected:
+ MultipleItemConverter( SfxItemPool& rItemPool );
+
+ ::std::vector< ItemConverter * > m_aConverters;
+};
+
+} // namespace comphelper
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx
new file mode 100644
index 000000000000..327a19f4fd17
--- /dev/null
+++ b/chart2/source/controller/inc/ObjectHierarchy.hxx
@@ -0,0 +1,123 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_OBJECTHIERARCHY_HXX
+#define CHART2_OBJECTHIERARCHY_HXX
+
+#include "ObjectIdentifier.hxx"
+
+#include <rtl/ustring.hxx>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/awt/KeyEvent.hpp>
+
+#include <memory>
+#include <vector>
+
+namespace chart
+{
+
+class ExplicitValueProvider;
+
+namespace impl
+{
+class ImplObjectHierarchy;
+}
+
+class ObjectHierarchy
+{
+public:
+ typedef ObjectIdentifier tOID;
+ typedef ::std::vector< tOID > tChildContainer;
+
+ /** @param bFlattenDiagram
+ If <TRUE/>, the content of the diaram (data series, wall, floor,
+ etc.) is treated as being at the same level as the diagram. (This is
+ used for keyboard navigation).
+ */
+ explicit ObjectHierarchy(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDocument,
+ ExplicitValueProvider * pExplicitValueProvider = 0,
+ bool bFlattenDiagram = false,
+ bool bOrderingForElementSelector = false );
+ ~ObjectHierarchy();
+
+ static tOID getRootNodeOID();
+ static bool isRootNode( const tOID& rOID );
+
+ /// equal to getChildren( getRootNodeOID())
+ tChildContainer getTopLevelChildren() const;
+ bool hasChildren( const tOID& rParent ) const;
+ tChildContainer getChildren( const tOID& rParent ) const;
+
+ tChildContainer getSiblings( const tOID& rNode ) const;
+
+ /// The result is empty, if the node cannot be found in the tree
+ tOID getParent( const tOID& rNode ) const;
+ /// @returns -1, if no parent can be determined
+ sal_Int32 getIndexInParent( const tOID& rNode ) const;
+
+private:
+
+ ::std::auto_ptr< impl::ImplObjectHierarchy > m_apImpl;
+};
+
+class ObjectKeyNavigation
+{
+public:
+ explicit ObjectKeyNavigation( const ObjectHierarchy::tOID & rCurrentOID,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDocument,
+ ExplicitValueProvider * pExplicitValueProvider = 0 );
+
+ bool handleKeyEvent( const ::com::sun::star::awt::KeyEvent & rEvent );
+ ObjectHierarchy::tOID getCurrentSelection() const;
+
+private:
+ void setCurrentSelection( const ObjectHierarchy::tOID& rOID );
+ bool first();
+ bool last();
+ bool next();
+ bool previous();
+ bool up();
+ bool down();
+ bool veryFirst();
+ bool veryLast();
+
+ ObjectHierarchy::tOID m_aCurrentOID;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
+ ExplicitValueProvider * m_pExplicitValueProvider;
+ bool m_bStepDownInDiagram;
+};
+
+} // namespace chart
+
+// CHART2_OBJECTHIERARCHY_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ObjectNameProvider.hxx b/chart2/source/controller/inc/ObjectNameProvider.hxx
new file mode 100644
index 000000000000..8888e53dd6ce
--- /dev/null
+++ b/chart2/source/controller/inc/ObjectNameProvider.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_OBJECTNAME_PROVIDER_HXX
+#define _CHART2_OBJECTNAME_PROVIDER_HXX
+
+#include "ObjectIdentifier.hxx"
+#include "TitleHelper.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/** Provides localized ui strings for the userinterface.
+*/
+
+class ObjectNameProvider
+{
+public:
+ static rtl::OUString getName( ObjectType eObjectType, bool bPlural=false );
+ static rtl::OUString getAxisName( const rtl::OUString& rObjectCID
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel );
+ static rtl::OUString getGridName( const rtl::OUString& rObjectCID
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel );
+ static rtl::OUString getTitleName( const rtl::OUString& rObjectCID
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel );
+ static rtl::OUString getTitleNameByType( TitleHelper::eTitleType eType );
+
+ static rtl::OUString getNameForCID(
+ const rtl::OUString& rObjectCID,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument >& xChartDocument );
+
+ static rtl::OUString getName_ObjectForSeries(
+ ObjectType eObjectType,
+ const rtl::OUString& rSeriesCID,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument >& xChartDocument );
+ static rtl::OUString getName_ObjectForAllSeries( ObjectType eObjectType );
+
+ /** Provides help texts for the various chart elements.
+ The parameter rObjectCID has to be a ClassifiedIdentifier - see class ObjectIdentifier.
+ */
+ static rtl::OUString getHelpText( const rtl::OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel, bool bVerbose=false );
+ static rtl::OUString getHelpText( const rtl::OUString& rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument, bool bVerbose=false );
+
+ /** This is used for showing the currently selected object in the status bar
+ (command "Context")
+ */
+ static rtl::OUString getSelectedObjectText( const rtl::OUString & rObjectCID, const ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >& xChartDocument );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/PositionAndSizeHelper.hxx b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
new file mode 100644
index 000000000000..c12127586453
--- /dev/null
+++ b/chart2/source/controller/inc/PositionAndSizeHelper.hxx
@@ -0,0 +1,63 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_POSITIONANDSIZEHELPER_HXX
+#define _CHART2_POSITIONANDSIZEHELPER_HXX
+
+#include "ObjectIdentifier.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/**
+*/
+
+class PositionAndSizeHelper
+{
+public:
+ static bool moveObject( ObjectType eObjectType
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& xObjectProp
+ , const ::com::sun::star::awt::Rectangle& rNewPositionAndSize
+ , const ::com::sun::star::awt::Rectangle& rPageRectangle );
+
+ static bool moveObject( const rtl::OUString& rObjectCID
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel
+ , const ::com::sun::star::awt::Rectangle& rNewPositionAndSize
+ , const ::com::sun::star::awt::Rectangle& rPageRectangle );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RangeEdit.hxx b/chart2/source/controller/inc/RangeEdit.hxx
new file mode 100644
index 000000000000..b2b179702aac
--- /dev/null
+++ b/chart2/source/controller/inc/RangeEdit.hxx
@@ -0,0 +1,59 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+#ifndef CHART2RANGEEDIT_HXX
+#define CHART2RANGEEDIT_HXX
+
+#include <vcl/edit.hxx>
+#include <vcl/accel.hxx>
+#include <tools/link.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class RangeEdit : public Edit
+{
+public:
+ explicit RangeEdit( Window* pParent, const ResId& rResId);
+ virtual ~RangeEdit();
+
+ // KeyInput method
+ void SetKeyInputHdl( const Link& rKeyInputLink );
+ virtual void KeyInput( const KeyEvent& rKEvt );
+
+private:
+ Link m_aKeyInputLink;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RangeSelectionButton.hxx b/chart2/source/controller/inc/RangeSelectionButton.hxx
new file mode 100644
index 000000000000..cd832823e9ff
--- /dev/null
+++ b/chart2/source/controller/inc/RangeSelectionButton.hxx
@@ -0,0 +1,56 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_RANGESELECTIONBUTTON_HXX
+#define _CHART2_RANGESELECTIONBUTTON_HXX
+
+// header for Class ImageButton
+#include <vcl/button.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/**
+*/
+
+class RangeSelectionButton : public ImageButton
+{
+public:
+ RangeSelectionButton( Window* pParent, const ResId& rResId );
+ virtual ~RangeSelectionButton();
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RangeSelectionHelper.hxx b/chart2/source/controller/inc/RangeSelectionHelper.hxx
new file mode 100644
index 000000000000..ac07b761b098
--- /dev/null
+++ b/chart2/source/controller/inc/RangeSelectionHelper.hxx
@@ -0,0 +1,90 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_RANGESELECTIONHELPER_HXX
+#define CHART2_RANGESELECTIONHELPER_HXX
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <com/sun/star/beans/PropertyValue.hpp>
+
+namespace com { namespace sun { namespace star {
+ namespace sheet{
+ class XRangeSelection;
+ class XRangeSelectionListener;
+ class XCellRangesAccess;
+ }
+}}}
+
+namespace chart
+{
+
+class RangeSelectionListenerParent;
+
+class RangeSelectionHelper
+{
+public:
+ explicit RangeSelectionHelper(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDocument );
+ ~RangeSelectionHelper();
+
+ bool hasRangeSelection();
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::sheet::XRangeSelection > getRangeSelection();
+ void raiseRangeSelectionDocument();
+ bool chooseRange(
+ const ::rtl::OUString & aCurrentRange,
+ const ::rtl::OUString & aUIString,
+ RangeSelectionListenerParent & rListenerParent );
+ void stopRangeListening( bool bRemoveListener = true );
+ bool verifyCellRange( const ::rtl::OUString & rRangeStr );
+ bool verifyArguments( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& rArguments );
+
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::sheet::XRangeSelection >
+ m_xRangeSelection;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument >
+ m_xChartDocument;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::sheet::XCellRangesAccess >
+ m_xCellRangesAccess;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::sheet::XRangeSelectionListener >
+ m_xRangeSelectionListener;
+};
+
+} // namespace chart
+
+// CHART2_RANGESELECTIONHELPER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RangeSelectionListener.hxx b/chart2/source/controller/inc/RangeSelectionListener.hxx
new file mode 100644
index 000000000000..130280b5fd91
--- /dev/null
+++ b/chart2/source/controller/inc/RangeSelectionListener.hxx
@@ -0,0 +1,82 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_RANGESELECTIONLISTENER_HXX
+#define CHART2_RANGESELECTIONLISTENER_HXX
+
+#include "ControllerLockGuard.hxx"
+#include <cppuhelper/implbase1.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/sheet/XRangeSelectionListener.hpp>
+
+namespace chart
+{
+
+class RangeSelectionListenerParent
+{
+public:
+ virtual void listeningFinished( const ::rtl::OUString & rNewRange ) = 0;
+ virtual void disposingRangeSelection() = 0;
+};
+
+// ----------------------------------------
+
+class RangeSelectionListener : public
+ ::cppu::WeakImplHelper1<
+ ::com::sun::star::sheet::XRangeSelectionListener >
+{
+public:
+ explicit RangeSelectionListener(
+ RangeSelectionListenerParent & rParent,
+ const ::rtl::OUString & rInitialRange,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xModelToLockController );
+ virtual ~RangeSelectionListener();
+
+protected:
+ // ____ XRangeSelectionListener ____
+ virtual void SAL_CALL done( const ::com::sun::star::sheet::RangeSelectionEvent& aEvent )
+ throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL aborted( const ::com::sun::star::sheet::RangeSelectionEvent& aEvent )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ // ____ XEventListener ____
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source )
+ throw (::com::sun::star::uno::RuntimeException);
+
+private:
+ RangeSelectionListenerParent & m_rParent;
+ ::rtl::OUString m_aRange;
+ ControllerLockGuard m_aControllerLockGuard;
+};
+
+} // namespace chart
+
+// CHART2_RANGESELECTIONLISTENER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RegressionCurveItemConverter.hxx b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
new file mode 100644
index 000000000000..86d5ffda0c64
--- /dev/null
+++ b/chart2/source/controller/inc/RegressionCurveItemConverter.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_REGRESSIONCURVE_ITEMCONVERTER_HXX
+#define CHART_REGRESSIONCURVE_ITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+
+#include <com/sun/star/chart2/XRegressionCurveContainer.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class RegressionCurveItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ RegressionCurveItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XRegressionCurveContainer > & xRegCurveCnt,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory );
+ virtual ~RegressionCurveItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::boost::shared_ptr< ItemConverter > m_spGraphicConverter;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XRegressionCurveContainer > m_xCurveContainer;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_REGRESSIONCURVE_ITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/RegressionEquationItemConverter.hxx b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
new file mode 100644
index 000000000000..503e4ffc063a
--- /dev/null
+++ b/chart2/source/controller/inc/RegressionEquationItemConverter.hxx
@@ -0,0 +1,86 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_REGRESSIONEQUATION_ITEMCONVERTER_HXX
+#define CHART_REGRESSIONEQUATION_ITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include "GraphicPropertyItemConverter.hxx"
+
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/awt/Size.hpp>
+
+#include <memory>
+#include <vector>
+#include <boost/shared_ptr.hpp>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class RegressionEquationItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ RegressionEquationItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+ virtual ~RegressionEquationItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::std::vector< ItemConverter * > m_aConverters;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_REGRESSIONEQUATION_ITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/SchSlotIds.hxx b/chart2/source/controller/inc/SchSlotIds.hxx
new file mode 100644
index 000000000000..ef317412baee
--- /dev/null
+++ b/chart2/source/controller/inc/SchSlotIds.hxx
@@ -0,0 +1,237 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef SCH_SLOTIDS_HXX
+#define SCH_SLOTIDS_HXX
+
+// header for SID_OBJ1_START
+#include <sfx2/sfxsids.hrc>
+
+// SID_OBJ1_START == 30000 + 512
+//not used as slot in old chart
+//#define SID_COPYFORMAT SID_OBJ1_START
+//not used as slot in old chart
+//#define SID_PASTEFORMAT (SID_OBJ1_START + 1)
+
+//still used as help id
+#define SID_DIAGRAM_DATA (SID_OBJ1_START + 2)
+//only used as help id
+#define SID_INSERT_TITLE (SID_OBJ1_START + 3)
+//only used as help id
+#define SID_INSERT_CHART_LEGEND (SID_OBJ1_START + 4)
+//only used as help id
+#define SID_INSERT_DESCRIPTION (SID_OBJ1_START + 5)
+//only used as help id
+#define SID_INSERT_AXIS (SID_OBJ1_START + 6)
+//some how used as slot in old chart
+//#define SID_DATA_ROW_POINT (SID_OBJ1_START + 7)
+//menu parent id and helpid
+//MENUCHANGE FORMATMENU #define SID_CHART_TITLE (SID_OBJ1_START + 8)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_LEGEND (SID_OBJ1_START + 9)
+//menu parent id and helpid
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS (SID_OBJ1_START + 10)
+//menu parent id and helpid
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID (SID_OBJ1_START + 11)
+
+/*
+//MENUCHANGE
+//still used as slot id
+#define SID_DIAGRAM_WALL (SID_OBJ1_START + 12)
+//still used as slot id
+#define SID_DIAGRAM_FLOOR (SID_OBJ1_START + 13)
+//still used as slot id
+#define SID_DIAGRAM_AREA (SID_OBJ1_START + 14)
+*/
+
+//only used as help id
+#define SID_3D_VIEW (SID_OBJ1_START + 15)
+//still used as slot id
+#define SID_DIAGRAM_TYPE (SID_OBJ1_START + 16)
+//used as slot in old chart
+//#define SID_TOGGLE_TITLE (SID_OBJ1_START + 17)
+//used as slot in old chart
+//#define SID_TOGGLE_LEGEND (SID_OBJ1_START + 18)
+//used as slot in old chart
+//#define SID_TOGGLE_AXIS_TITLE (SID_OBJ1_START + 19)
+//used as slot in old chart
+//#define SID_TOGGLE_AXIS_DESCR (SID_OBJ1_START + 20) // 30532
+//used as slot in old chart
+//#define SID_TOGGLE_GRID_HORZ (SID_OBJ1_START + 21)
+//used as slot in old chart
+//#define SID_TOGGLE_GRID_VERT (SID_OBJ1_START + 22)
+//used as slot in old chart
+//#define SID_DATA_IN_ROWS (SID_OBJ1_START + 23)
+//used as slot in old chart
+//#define SID_DATA_IN_COLUMNS (SID_OBJ1_START + 24)
+//used as slot in old chart
+//#define SID_TOOL_SELECT (SID_OBJ1_START + 25)
+//some how used as slot in old chart
+//#define SID_CONTEXT_TYPE (SID_OBJ1_START + 26)
+//used as slot in old chart
+//#define SID_NEW_ARRANGEMENT (SID_OBJ1_START + 27) // 30539
+//only used as help id
+#define SID_INSERT_GRIDS (SID_OBJ1_START + 28)
+
+//not used as slot in old chart
+//#define SID_MAINTITLE (SID_OBJ1_START + 29)
+//not used as slot in old chart
+//#define SID_SUBTITLE (SID_OBJ1_START + 30)
+//not used as slot in old chart
+//#define SID_XAXIS_TITLE (SID_OBJ1_START + 31)
+//not used as slot in old chart
+//#define SID_YAXIS_TITLE (SID_OBJ1_START + 32)
+//not used as slot in old chart
+//#define SID_ZAXIS_TITLE (SID_OBJ1_START + 33)
+
+/*
+//used as slot in old chart
+#ifdef SID_UPDATE
+#undef SID_UPDATE
+#endif
+#define SID_UPDATE (SID_OBJ1_START + 34)
+*/
+
+//not used as slot in old chart
+//#define SID_DATA (SID_OBJ1_START + 35)
+//not used as slot in old chart
+//#define SID_ADD_COLUMN (SID_OBJ1_START + 36)
+//not used as slot in old chart
+//#define SID_ADD_ROW (SID_OBJ1_START + 37)
+
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS_X (SID_OBJ1_START + 40)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS_Y (SID_OBJ1_START + 41)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS_Z (SID_OBJ1_START + 42)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS_ALL (SID_OBJ1_START + 43)
+//only used as help id
+#define SID_INSERT_STATISTICS (SID_OBJ1_START + 44)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_TITLE_MAIN (SID_OBJ1_START + 45)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_TITLE_SUB (SID_OBJ1_START + 46)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_TITLE_X (SID_OBJ1_START + 47)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_TITLE_Y (SID_OBJ1_START + 48)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_TITLE_Z (SID_OBJ1_START + 49)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_TITLE_ALL (SID_OBJ1_START + 50)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_Y_MAIN (SID_OBJ1_START + 51)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_X_MAIN (SID_OBJ1_START + 52)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_Z_MAIN (SID_OBJ1_START + 53)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_ALL (SID_OBJ1_START + 54)
+
+//used as slot in old chart
+//#define SID_HAS_X_DESCR (SID_OBJ1_START + 55)
+//used as slot in old chart
+//#define SID_HAS_Y_DESCR (SID_OBJ1_START + 56)
+//used as slot in old chart
+//#define SID_HAS_Z_DESCR (SID_OBJ1_START + 57)
+
+//#define SID_DIAGRAM_OBJECTS (SID_OBJ1_START + 60)
+
+//not used as slot in old chart
+//#define SID_HAS_X_TITLE (SID_OBJ1_START + 61)
+//not used as slot in old chart
+//#define SID_HAS_Y_TITLE (SID_OBJ1_START + 62)
+//not used as slot in old chart
+//#define SID_HAS_Z_TITLE (SID_OBJ1_START + 63)
+//not used as slot in old chart
+//#define SID_HAS_MAIN_TITLE (SID_OBJ1_START + 64)
+//not used as slot in old chart
+//#define SID_HAS_SUB_TITLE (SID_OBJ1_START + 65)
+
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_Y_HELP (SID_OBJ1_START + 66)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_X_HELP (SID_OBJ1_START + 67)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_GRID_Z_HELP (SID_OBJ1_START + 68)
+
+//not used as slot in old chart
+//#define SID_DIAGRAM_DATA_WIN (SID_OBJ1_START + 70)
+
+//used as slot in old chart
+//#define SID_DIAGRAM_ERROR (SID_OBJ1_START + 71)
+//used as slot in old chart
+//#define SID_DIAGRAM_AVERAGEVALUE (SID_OBJ1_START + 72)
+//used as slot in old chart
+//#define SID_DIAGRAM_REGRESSION (SID_OBJ1_START + 73)
+//used as slot in old chart
+//#define SID_SCALE_TEXT (SID_OBJ1_START + 74)
+//not used as slot in old chart
+//#define SID_TEXTBREAK (SID_OBJ1_START + 75)
+
+//not used as slot in old chart
+//#define SID_DIAGRAM_DATADESCRIPTION (SID_OBJ1_START + 76)
+//not used as slot in old chart
+//#define SID_DIAGRAM_POSLEGEND (SID_OBJ1_START + 77)
+//not used as slot in old chart
+//#define SID_DIAGRAM_DEFAULTCOLORS (SID_OBJ1_START + 78)
+//not used as slot in old chart
+//#define SID_DIAGRAM_BARWIDTH (SID_OBJ1_START + 79)
+//not used as slot in old chart
+//#define SID_DIAGRAM_NUMLINES (SID_OBJ1_START + 80)
+
+//menu parent id and helpid
+//#define SID_ROW_POSITION (SID_OBJ1_START + 81)
+//still used as slot id
+//#define SID_ROW_MOREFRONT (SID_OBJ1_START + 82)
+//still used as slot id
+//#define SID_ROW_MOREBACK (SID_OBJ1_START + 83)
+
+//not used as slot in old chart
+//#define SID_TITLE_TEXT (SID_OBJ1_START + 100)
+//somehow used as slot in old chart
+//#define SID_DIAGRAM_STOCK_LINE (SID_OBJ1_START + 101)
+//used as slot in old chart
+//#define SID_DIAGRAM_STOCK_LOSS (SID_OBJ1_START + 102)
+//used as slot in old chart
+//#define SID_DIAGRAM_STOCK_PLUS (SID_OBJ1_START + 103)
+
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS_A (SID_OBJ1_START + 104)
+//still used as slot id
+//MENUCHANGE FORMATMENU #define SID_DIAGRAM_AXIS_B (SID_OBJ1_START + 105)
+//used as slot in old chart
+//#define SID_DIAGRAM_AXIS_C (SID_OBJ1_START + 106)
+
+// Reserved till (SID_OBJ1_START + 110)
+
+#endif
+// SCH_SLOTIDS_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
new file mode 100644
index 000000000000..36f2b420890f
--- /dev/null
+++ b/chart2/source/controller/inc/SeriesOptionsItemConverter.hxx
@@ -0,0 +1,105 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_SERIESOPTIONSITEMCONVERTER_HXX
+#define CHART_SERIESOPTIONSITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+
+
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/chart2/XCoordinateSystem.hpp>
+
+namespace chart
+{
+namespace wrapper
+{
+
+class SeriesOptionsItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ SeriesOptionsItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool );
+ virtual ~SeriesOptionsItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > m_xChartModel;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext> m_xCC;
+
+ bool m_bAttachToMainAxis;
+ bool m_bSupportingOverlapAndGapWidthProperties;
+ bool m_bSupportingBarConnectors;
+
+ sal_Int32 m_nBarOverlap;
+ sal_Int32 m_nGapWidth;
+ sal_Bool m_bConnectBars;
+
+ bool m_bSupportingAxisSideBySide;
+ bool m_bGroupBarsPerAxis;
+ bool m_bAllSeriesAttachedToSameAxis;
+ sal_Int32 m_nAllSeriesAxisIndex;
+
+ bool m_bSupportingStartingAngle;
+ sal_Int32 m_nStartingAngle;
+
+ bool m_bClockwise;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XCoordinateSystem > m_xCooSys;
+
+ ::com::sun::star::uno::Sequence< sal_Int32 > m_aSupportedMissingValueTreatments;
+ sal_Int32 m_nMissingValueTreatment;
+
+ bool m_bSupportingPlottingOfHiddenCells;
+ bool m_bIncludeHiddenCells;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_SERIESOPTIONSITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ShapeController.hrc b/chart2/source/controller/inc/ShapeController.hrc
new file mode 100644
index 000000000000..baaf28d180bc
--- /dev/null
+++ b/chart2/source/controller/inc/ShapeController.hrc
@@ -0,0 +1,50 @@
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_SHAPECONTROLLER_HRC
+#define CHART_SHAPECONTROLLER_HRC
+
+//-----------------------------------------------------------------------------
+//Command Ids:
+#define COMMAND_ID_FORMAT_LINE 1
+#define COMMAND_ID_FORMAT_AREA 2
+#define COMMAND_ID_TEXT_ATTRIBUTES 3
+#define COMMAND_ID_TRANSFORM_DIALOG 4
+#define COMMAND_ID_OBJECT_TITLE_DESCRIPTION 5
+#define COMMAND_ID_RENAME_OBJECT 6
+#define COMMAND_ID_ARRANGE_ROW 7
+#define COMMAND_ID_BRING_TO_FRONT 8
+#define COMMAND_ID_FORWARD 9
+#define COMMAND_ID_BACKWARD 10
+#define COMMAND_ID_SEND_TO_BACK 11
+#define COMMAND_ID_CUT 12
+#define COMMAND_ID_COPY 13
+#define COMMAND_ID_PASTE 14
+#define COMMAND_ID_FONT_DIALOG 15
+#define COMMAND_ID_PARAGRAPH_DIALOG 16
+
+// CHART_SHAPECONTROLLER_HRC
+#endif
diff --git a/chart2/source/controller/inc/StatisticsItemConverter.hxx b/chart2/source/controller/inc/StatisticsItemConverter.hxx
new file mode 100644
index 000000000000..038bd4e59dd3
--- /dev/null
+++ b/chart2/source/controller/inc/StatisticsItemConverter.hxx
@@ -0,0 +1,78 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_STATISTICSITEMCONVERTER_HXX
+#define CHART_STATISTICSITEMCONVERTER_HXX
+
+#include <com/sun/star/frame/XModel.hpp>
+
+#include "ItemConverter.hxx"
+#include "GraphicPropertyItemConverter.hxx"
+#include "chartview/NumberFormatterWrapper.hxx"
+
+#include <vector>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class StatisticsItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ StatisticsItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > & xChartModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool );
+ virtual ~StatisticsItemConverter();
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > m_xModel;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_STATISTICSITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TabPageNotifiable.hxx b/chart2/source/controller/inc/TabPageNotifiable.hxx
new file mode 100644
index 000000000000..4e2c9d6511be
--- /dev/null
+++ b/chart2/source/controller/inc/TabPageNotifiable.hxx
@@ -0,0 +1,54 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_TABPAGENOTIFIABLE_HXX
+#define CHART2_TABPAGENOTIFIABLE_HXX
+
+#include <vcl/tabpage.hxx>
+#include <tools/color.hxx>
+
+// color to use as foreground for an invalid range
+#define RANGE_SELECTION_INVALID_RANGE_FOREGROUND_COLOR COL_WHITE
+// color to use as background for an invalid range
+#define RANGE_SELECTION_INVALID_RANGE_BACKGROUND_COLOR 0xff6563
+
+namespace chart
+{
+
+class TabPageNotifiable
+{
+public:
+ virtual void setInvalidPage( TabPage * pTabPage ) = 0;
+ virtual void setValidPage( TabPage * pTabPage ) = 0;
+};
+
+} // namespace chart
+
+// CHART2_TABPAGENOTIFIABLE_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TextDirectionListBox.hxx b/chart2/source/controller/inc/TextDirectionListBox.hxx
new file mode 100644
index 000000000000..a776da1fd505
--- /dev/null
+++ b/chart2/source/controller/inc/TextDirectionListBox.hxx
@@ -0,0 +1,51 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+************************************************************************/
+
+#ifndef CHART2_TEXTDIRECTIONLISTBOX_HXX
+#define CHART2_TEXTDIRECTIONLISTBOX_HXX
+
+#include <svx/frmdirlbox.hxx>
+
+class Window;
+
+namespace chart
+{
+
+class TextDirectionListBox : public svx::FrameDirectionListBox
+{
+public:
+ explicit TextDirectionListBox( Window* pParent, const ResId& rResId,
+ Window* pWindow1 = 0, Window* pWindow2 = 0 );
+ virtual ~TextDirectionListBox();
+};
+
+} //namespace chart
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
new file mode 100644
index 000000000000..3c095f336fd9
--- /dev/null
+++ b/chart2/source/controller/inc/TimerTriggeredControllerLock.hxx
@@ -0,0 +1,66 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_TIMERTRIGGEREDCONTROLLERLOCK_HXX
+#define _CHART2_TIMERTRIGGEREDCONTROLLERLOCK_HXX
+
+#include "ControllerLockGuard.hxx"
+#include <vcl/timer.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+
+#include <memory>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class TimerTriggeredControllerLock
+{
+public:
+ TimerTriggeredControllerLock( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xModel );
+ virtual ~TimerTriggeredControllerLock();
+
+ void startTimer();
+
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > m_xModel;
+ std::auto_ptr< ControllerLockGuard > m_apControllerLockGuard;
+ AutoTimer m_aTimer;
+
+ DECL_LINK( TimerTimeout, void* );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TitleDialogData.hxx b/chart2/source/controller/inc/TitleDialogData.hxx
new file mode 100644
index 000000000000..284bf2d20bf1
--- /dev/null
+++ b/chart2/source/controller/inc/TitleDialogData.hxx
@@ -0,0 +1,70 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_TITLEDIALOGDATA_HXX
+#define _CHART2_TITLEDIALOGDATA_HXX
+
+#include "ReferenceSizeProvider.hxx"
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <memory>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+//-----------------------------------------------------------------------------
+/**
+*/
+
+struct TitleDialogData
+{
+ ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList;
+ ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList;
+ ::com::sun::star::uno::Sequence< rtl::OUString > aTextList;
+ ::std::auto_ptr< ReferenceSizeProvider > apReferenceSizeProvider;
+
+ TitleDialogData( ::std::auto_ptr< ReferenceSizeProvider > apRefSizeProvider =
+ ::std::auto_ptr< ReferenceSizeProvider >( 0 ));
+
+ void readFromModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
+ /* return true if anything has changed;
+ when pOldState is NULL then all data are written to the model
+ */
+ bool writeDifferenceToModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel
+ , const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext
+ , TitleDialogData* pOldState=NULL );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/TitleItemConverter.hxx b/chart2/source/controller/inc/TitleItemConverter.hxx
new file mode 100644
index 000000000000..43edfc707aaf
--- /dev/null
+++ b/chart2/source/controller/inc/TitleItemConverter.hxx
@@ -0,0 +1,83 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART_TITLEITEMCONVERTER_HXX
+#define CHART_TITLEITEMCONVERTER_HXX
+
+#include "ItemConverter.hxx"
+#include <com/sun/star/awt/Size.hpp>
+#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+
+#include <vector>
+#include <memory>
+
+class SdrModel;
+
+namespace chart
+{
+namespace wrapper
+{
+
+class TitleItemConverter :
+ public ::comphelper::ItemConverter
+{
+public:
+ TitleItemConverter(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::beans::XPropertySet > & rPropertySet,
+ SfxItemPool& rItemPool,
+ SdrModel& rDrawModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::lang::XMultiServiceFactory > & xNamedPropertyContainerFactory,
+ ::std::auto_ptr< ::com::sun::star::awt::Size > pRefSize =
+ ::std::auto_ptr< ::com::sun::star::awt::Size >() );
+
+ virtual ~TitleItemConverter();
+
+ virtual void FillItemSet( SfxItemSet & rOutItemSet ) const;
+ virtual bool ApplyItemSet( const SfxItemSet & rItemSet );
+
+protected:
+ virtual const USHORT * GetWhichPairs() const;
+ virtual bool GetItemProperty( tWhichIdType nWhichId, tPropertyNameWithMemberId & rOutProperty ) const;
+
+ virtual void FillSpecialItem( USHORT nWhichId, SfxItemSet & rOutItemSet ) const
+ throw( ::com::sun::star::uno::Exception );
+ virtual bool ApplySpecialItem( USHORT nWhichId, const SfxItemSet & rItemSet )
+ throw( ::com::sun::star::uno::Exception );
+
+private:
+ ::std::vector< ItemConverter * > m_aConverters;
+};
+
+} // namespace wrapper
+} // namespace chart
+
+// CHART_TITLEITEMCONVERTER_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/ViewElementListProvider.hxx b/chart2/source/controller/inc/ViewElementListProvider.hxx
new file mode 100644
index 000000000000..ab6064ae6851
--- /dev/null
+++ b/chart2/source/controller/inc/ViewElementListProvider.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_VIEWELEMENTLISTPROVIDER_HXX
+#define _CHART2_VIEWELEMENTLISTPROVIDER_HXX
+
+#include <svx/xtable.hxx>
+#include <svx/svdpage.hxx>
+
+class FontList;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class DrawModelWrapper;
+
+class ViewElementListProvider
+{
+public:
+ ViewElementListProvider( DrawModelWrapper* pDrawModelWrapper );
+ virtual ~ViewElementListProvider();
+
+ XColorTable* GetColorTable() const;
+ XDashList* GetDashList() const;
+ XLineEndList* GetLineEndList() const;
+ XGradientList* GetGradientList() const;
+ XHatchList* GetHatchList() const;
+ XBitmapList* GetBitmapList() const;
+
+ //create chartspecific symbols for linecharts
+ SdrObjList* GetSymbolList() const;
+ Graphic GetSymbolGraphic( sal_Int32 nStandardSymbol, const SfxItemSet* pSymbolShapeProperties ) const;
+
+ FontList* getFontList() const;
+ //SfxPrinter* getPrinter();
+
+private:
+ DrawModelWrapper* m_pDrawModelWrapper;
+ mutable FontList* m_pFontList;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ChartType.hxx b/chart2/source/controller/inc/dlg_ChartType.hxx
new file mode 100644
index 000000000000..fa49bd83127a
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ChartType.hxx
@@ -0,0 +1,76 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_CHARTTYPE_HXX
+#define _CHART2_DLG_CHARTTYPE_HXX
+
+// header for class ModalDialog
+#include <vcl/dialog.hxx>
+// header for class FixedLine
+#include <vcl/fixed.hxx>
+// header for class OKButton
+#include <vcl/button.hxx>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ChartTypeTabPage;
+class ChartTypeDialog : public ModalDialog
+{
+public:
+ ChartTypeDialog( Window* pWindow
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& xContext );
+ ~ChartTypeDialog();
+
+private:
+ FixedLine m_aFL;
+ OKButton m_aBtnOK;
+ CancelButton m_aBtnCancel;
+ HelpButton m_aBtnHelp;
+
+ ChartTypeTabPage* m_pChartTypeTabPage;
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > m_xChartModel;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext> m_xCC;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ChartType_UNO.hxx b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
new file mode 100644
index 000000000000..aa6a066315de
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ChartType_UNO.hxx
@@ -0,0 +1,89 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_CREATION_TYPE_UNO_HXX
+#define _CHART2_CREATION_TYPE_UNO_HXX
+
+#include "ServiceMacros.hxx"
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <vcl/vclevent.hxx>
+
+#include <svtools/genericunodialog.hxx>
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+typedef ::svt::OGenericUnoDialog ChartTypeUnoDlg_BASE;
+class ChartType;
+class ChartTypeUnoDlg : public ChartTypeUnoDlg_BASE
+ ,public ::comphelper::OPropertyArrayUsageHelper< ChartTypeUnoDlg >
+{
+public:
+ ChartTypeUnoDlg( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& xContext );
+
+ // XServiceInfo - static methods
+ static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static(void);
+ static ::rtl::OUString getImplementationName_Static(void) throw( ::com::sun::star::uno::RuntimeException );
+ static ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL Create(const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >&);
+private:
+ virtual ~ChartTypeUnoDlg();
+
+ // OGenericUnoDialog overridables
+ virtual void implInitialize(const com::sun::star::uno::Any& _rValue);
+ virtual Dialog* createDialog(Window* _pParent);
+
+ // XTypeProvider
+ virtual com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(com::sun::star::uno::RuntimeException);
+ // XServiceInfo
+ virtual ::rtl::OUString SAL_CALL getImplementationName() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::comphelper::StringSequence SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException);
+
+ // XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo> SAL_CALL getPropertySetInfo() throw(::com::sun::star::uno::RuntimeException);
+ virtual ::cppu::IPropertyArrayHelper& SAL_CALL getInfoHelper();
+
+ // OPropertyArrayUsageHelper
+ virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
+
+ //no default constructor
+ ChartTypeUnoDlg();
+ ChartTypeUnoDlg(const ChartTypeUnoDlg&); // no defined
+ void operator =(const ChartTypeUnoDlg&); // no defined
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > m_xChartModel;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_CreationWizard.hxx b/chart2/source/controller/inc/dlg_CreationWizard.hxx
new file mode 100644
index 000000000000..f7c3e2de5933
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_CreationWizard.hxx
@@ -0,0 +1,108 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_CREATION_WIZARD_HXX
+#define _CHART2_CREATION_WIZARD_HXX
+
+#include "ServiceMacros.hxx"
+#include "TimerTriggeredControllerLock.hxx"
+#include "TabPageNotifiable.hxx"
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+#include <svtools/roadmapwizard.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+// for auto_ptr
+#include <memory>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class RangeChooserTabPage;
+class DataSourceTabPage;
+class ChartTypeTemplateProvider;
+class DialogModel;
+
+class CreationWizard : public
+ svt::RoadmapWizard
+ , public TabPageNotifiable
+{
+public:
+ CreationWizard( Window* pParent,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel
+ , const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& xContext
+ , sal_Int32 nOnePageOnlyIndex=-1 );//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap
+ virtual ~CreationWizard();
+
+ bool isClosable();
+
+ // TabPageNotifiable
+ virtual void setInvalidPage( TabPage * pTabPage );
+ virtual void setValidPage( TabPage * pTabPage );
+
+protected:
+ virtual sal_Bool leaveState( WizardState _nState );
+ virtual WizardState determineNextState(WizardState nCurrentState) const;
+ virtual void enterState(WizardState nState);
+
+ virtual String getStateDisplayName( WizardState nState ) const;
+
+private:
+ //no default constructor
+ CreationWizard();
+
+ virtual svt::OWizardPage* createPage(WizardState nState);
+
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > m_xChartModel;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext> m_xCC;
+ bool m_bIsClosable;
+ sal_Int32 m_nOnePageOnlyIndex;//if nOnePageOnlyIndex is an index of an exsisting page starting with 0, then only this page is displayed without next/previous and roadmap
+ ChartTypeTemplateProvider* m_pTemplateProvider;
+ ::std::auto_ptr< DialogModel > m_apDialogModel;
+
+ WizardState m_nFirstState;
+ WizardState m_nLastState;
+
+ TimerTriggeredControllerLock m_aTimerTriggeredControllerLock;
+
+// RangeChooserTabPage * m_pRangeChooserTabePage;
+// DataSourceTabPage * m_pDataSourceTabPage;
+ bool m_bCanTravel;
+};
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
new file mode 100644
index 000000000000..4f4850afb427
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx
@@ -0,0 +1,132 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _CHART2_CREATION_WIZARD_UNO_HXX
+#define _CHART2_CREATION_WIZARD_UNO_HXX
+
+#include "ServiceMacros.hxx"
+#include "MutexContainer.hxx"
+#include <cppuhelper/component.hxx>
+#include <com/sun/star/awt/XWindow.hpp>
+#include <com/sun/star/beans/XPropertySet.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/frame/XTerminateListener.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+// header for define DECL_LINK
+#include <tools/link.hxx>
+#include <vcl/vclevent.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class CreationWizard;
+class CreationWizardUnoDlg : public MutexContainer
+ , public ::cppu::OComponentHelper
+ , public ::com::sun::star::ui::dialogs::XExecutableDialog
+ , public ::com::sun::star::lang::XServiceInfo
+ , public ::com::sun::star::lang::XInitialization
+ , public ::com::sun::star::frame::XTerminateListener
+ , public ::com::sun::star::beans::XPropertySet
+{
+public:
+ CreationWizardUnoDlg( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext >& xContext );
+ virtual ~CreationWizardUnoDlg();
+
+ // XInterface
+ virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( const ::com::sun::star::uno::Type& aType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL acquire() throw ();
+ virtual void SAL_CALL release() throw ();
+
+ // XTypeProvider
+ virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XServiceInfo
+ APPHELPER_XSERVICEINFO_DECL()
+ APPHELPER_SERVICE_FACTORY_HELPER(CreationWizardUnoDlg)
+
+ // XExecutableDialog
+ virtual void SAL_CALL setTitle( const ::rtl::OUString& aTitle ) throw (::com::sun::star::uno::RuntimeException);
+ virtual sal_Int16 SAL_CALL execute( ) throw (::com::sun::star::uno::RuntimeException);
+
+ // XInitialization
+ virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aArguments ) throw (::com::sun::star::uno::Exception, ::com::sun::star::uno::RuntimeException);
+
+ // XTerminateListener
+ virtual void SAL_CALL queryTermination( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::frame::TerminationVetoException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL notifyTermination( const ::com::sun::star::lang::EventObject& Event ) throw (::com::sun::star::uno::RuntimeException);
+
+ virtual void SAL_CALL disposing( const ::com::sun::star::lang::EventObject& Source ) throw (::com::sun::star::uno::RuntimeException);
+
+ //XPropertySet
+ virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL setPropertyValue( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Any& aValue ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual ::com::sun::star::uno::Any SAL_CALL getPropertyValue( const ::rtl::OUString& PropertyName ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addPropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& xListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removePropertyChangeListener( const ::rtl::OUString& aPropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertyChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw (::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+
+ DECL_LINK( DialogEventHdl, VclWindowEvent* );
+
+protected:
+ // ____ OComponentHelper ____
+ /// Called in dispose method after the listeners were notified.
+ virtual void SAL_CALL disposing();
+
+private:
+ //no default constructor
+ CreationWizardUnoDlg();
+ void createDialogOnDemand();
+
+private:
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel > m_xChartModel;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext> m_xCC;
+ com::sun::star::uno::Reference<
+ com::sun::star::awt::XWindow > m_xParentWindow;
+
+ CreationWizard* m_pDialog;
+ sal_Bool m_bUnlockControllersOnExecute;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_DataEditor.hxx b/chart2/source/controller/inc/dlg_DataEditor.hxx
new file mode 100644
index 000000000000..a9d7e1a63bfd
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_DataEditor.hxx
@@ -0,0 +1,124 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+#ifndef _SCH_DGRDATA_HXX
+#define _SCH_DGRDATA_HXX
+
+#include <svl/lstner.hxx>
+#include <svtools/stdctrl.hxx>
+#include <vcl/toolbox.hxx>
+#include <comphelper/stl_types.hxx>
+#include <vcl/dialog.hxx>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+#include <memory>
+
+namespace com { namespace sun { namespace star {
+ namespace chart2 {
+ class XChartDocument;
+ }
+}}}
+
+namespace chart
+{
+
+class DataBrowser;
+
+class DataEditor : public ModalDialog
+{
+public:
+ DataEditor( Window* pParent,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDoc,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext );
+ virtual ~DataEditor();
+
+ // Window
+ virtual void Resize();
+
+ // Dialog
+ virtual BOOL Close();
+
+ void SetReadOnly( bool bReadOnly );
+ bool ApplyChangesToModel();
+
+private:
+ bool m_bReadOnly;
+ ::std::auto_ptr< DataBrowser > m_apBrwData;
+ ToolBox m_aTbxData;
+ ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > m_xChartDoc;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_xContext;
+ ImageList m_aToolboxImageList;
+ ImageList m_aToolboxImageListHighContrast;
+
+ /// handles actions of the toolbox
+ DECL_LINK( ToolboxHdl, void* );
+ /// is called, if the cursor of the table has moved
+ DECL_LINK( BrowserCursorMovedHdl, void*);
+ /// this is called if MiscOptions change, esp. High-Contrast mode
+ DECL_LINK( MiscHdl, void* );
+ /// is called when the contents of the edit cell changes
+ DECL_LINK( CellModified, void* );
+ /// is called when the width of any column in the edit browsebox has changed
+ DECL_LINK( BrowserColumnResized, void* );
+ /// is called when the browser view was scrolled, @todo: only call on horizontal scroll
+ DECL_LINK( BrowserContentScrolled, void* );
+
+ void UpdateData();
+ void ApplyImageList();
+ /// moved and resizes the series name control etc. to fit the dimensions of the edit browsebox
+// void ImplAdjustHeaderControls( bool bRefreshFromModel );
+
+ /** notifySystemWindow adds or remove the given window pToRegister at the Systemwindow found when search pWindow.
+ @param pWindow
+ The window which is used to search for the SystemWindow.
+ @param pToRegister
+ The window which should be added or removed on the TaskPaneList.
+ @param rMemFunc
+ The member function which should be called at the SystemWindow when found.
+ Possible values are:
+ ::comphelper::mem_fun(&TaskPaneList::AddWindow)
+ ::comphelper::mem_fun(&TaskPaneList::RemoveWindow)
+
+ @note this code is taken from dbaccess/source/ui/inc/UITools.hxx
+ */
+ void notifySystemWindow( Window* pWindow,
+ Window* pToRegister,
+ ::comphelper::mem_fun1_t< TaskPaneList, Window* > rMemFunc );
+
+ void AdaptBrowseBoxSize();
+};
+
+} // namespace chart
+
+#endif // _SCH_DGRDATA_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_DataSource.hxx b/chart2/source/controller/inc/dlg_DataSource.hxx
new file mode 100644
index 000000000000..c4a26a55e2e7
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_DataSource.hxx
@@ -0,0 +1,101 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DATASOURCEDIALOG_HXX
+#define CHART2_DATASOURCEDIALOG_HXX
+
+// header for class TabDialog
+#include <vcl/tabdlg.hxx>
+// header for class TabControl
+#include <vcl/tabctrl.hxx>
+// header for class OKButton
+#include <vcl/button.hxx>
+
+#include "TabPageNotifiable.hxx"
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/chart2/XChartDocument.hpp>
+
+// for auto_ptr
+#include <memory>
+
+namespace chart
+{
+
+class DataSourceTabControl;
+class RangeChooserTabPage;
+class DataSourceTabPage;
+class ChartTypeTemplateProvider;
+class DialogModel;
+
+class DataSourceDialog :
+ public TabDialog,
+ public TabPageNotifiable
+{
+public:
+ explicit DataSourceDialog(
+ Window * pParent,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDocument,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext > & xContext );
+ virtual ~DataSourceDialog();
+
+ // from Dialog (base of TabDialog)
+ virtual short Execute();
+
+ // TabPageNotifiable
+ virtual void setInvalidPage( TabPage * pTabPage );
+ virtual void setValidPage( TabPage * pTabPage );
+
+protected:
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
+ m_xChartDocument;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_xContext;
+ ::std::auto_ptr< ChartTypeTemplateProvider > m_apDocTemplateProvider;
+ ::std::auto_ptr< DialogModel > m_apDialogModel;
+
+private:
+ DataSourceTabControl* m_pTabControl;
+ OKButton m_aBtnOK;
+ CancelButton m_aBtnCancel;
+ HelpButton m_aBtnHelp;
+
+ RangeChooserTabPage * m_pRangeChooserTabePage;
+ DataSourceTabPage * m_pDataSourceTabPage;
+ bool m_bRangeChooserTabIsValid;
+ bool m_bDataSourceTabIsValid;
+
+ static USHORT m_nLastPageId;
+};
+
+} // namespace chart
+
+// CHART2_DATASOURCEDIALOG_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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..5f0ebcd1c252
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertAxis_Grid.hxx
@@ -0,0 +1,102 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_INSERT_AXIS_GRID_HXX
+#define _CHART2_DLG_INSERT_AXIS_GRID_HXX
+
+// header for class ModalDialog
+#include <vcl/dialog.hxx>
+// header for class FixedLine
+#include <vcl/fixed.hxx>
+// header for class CheckBox
+#include <vcl/button.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+struct InsertAxisOrGridDialogData
+{
+ ::com::sun::star::uno::Sequence< sal_Bool > aPossibilityList;
+ ::com::sun::star::uno::Sequence< sal_Bool > aExistenceList;
+
+ InsertAxisOrGridDialogData();
+};
+
+/*************************************************************************
+|*
+|* 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 InsertAxisOrGridDialogData& rInput, BOOL bAxisDlg=true );
+ virtual ~SchAxisDlg();
+
+ void getResult( InsertAxisOrGridDialogData& rOutput );
+};
+
+
+/*************************************************************************
+|*
+|* Grid dialog
+|*
+\************************************************************************/
+class SchGridDlg : public SchAxisDlg
+{
+public:
+ SchGridDlg( Window* pParent, const InsertAxisOrGridDialogData& rInput );
+ virtual ~SchGridDlg();
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertDataLabel.hxx b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
new file mode 100644
index 000000000000..1d8e143f4fe5
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertDataLabel.hxx
@@ -0,0 +1,73 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DLG_INSERT_DATALABELS_GRID_HXX
+#define CHART2_DLG_INSERT_DATALABELS_GRID_HXX
+
+// header for class ModalDialog
+#include <vcl/dialog.hxx>
+// header for class CheckBox
+#include <vcl/button.hxx>
+// header for class SfxItemSet
+#include <svl/itemset.hxx>
+//for auto_ptr
+#include <memory>
+
+class SvNumberFormatter;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class DataLabelResources;
+class DataLabelsDialog : public ModalDialog
+{
+private:
+ OKButton m_aBtnOK;
+ CancelButton m_aBtnCancel;
+ HelpButton m_aBtnHelp;
+ ::std::auto_ptr< DataLabelResources > m_apDataLabelResources;
+
+ const SfxItemSet& m_rInAttrs;
+
+ void Reset();
+
+public:
+ DataLabelsDialog(Window* pParent, const SfxItemSet& rInAttrs, SvNumberFormatter* pFormatter);
+ virtual ~DataLabelsDialog();
+
+ void FillItemSet(SfxItemSet& rOutAttrs);
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertErrorBars.hxx b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
new file mode 100644
index 000000000000..60bf20498f63
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertErrorBars.hxx
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_INSERT_ERRORBARS_HXX
+#define _CHART2_DLG_INSERT_ERRORBARS_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <svl/itemset.hxx>
+#include <memory>
+#include <com/sun/star/frame/XModel.hpp>
+
+#include "res_ErrorBar.hxx"
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class InsertErrorBarsDialog : public ModalDialog
+{
+public:
+ InsertErrorBarsDialog( Window* pParent, const SfxItemSet& rMyAttrs,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDocument,
+ ErrorBarResources::tErrorBarType eType = ErrorBarResources::ERROR_BAR_Y );
+ virtual ~InsertErrorBarsDialog();
+
+ void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
+
+ static double getAxisMinorStepWidthForErrorBarDecimals(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XInterface >& xChartView,
+ const ::rtl::OUString& rSelectedObjectCID );
+
+ void FillItemSet( SfxItemSet& rOutAttrs );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+private:
+ const SfxItemSet & rInAttrs;
+
+ OKButton aBtnOK;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ ::std::auto_ptr< ErrorBarResources > m_apErrorBarResources;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertLegend.hxx b/chart2/source/controller/inc/dlg_InsertLegend.hxx
new file mode 100644
index 000000000000..ca8269e571f4
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertLegend.hxx
@@ -0,0 +1,72 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_INSERT_LEGEND_GRID_HXX
+#define _CHART2_DLG_INSERT_LEGEND_GRID_HXX
+
+// header for class ModalDialog
+#include <vcl/dialog.hxx>
+// header for class CheckBox
+#include <vcl/button.hxx>
+//for auto_ptr
+#include <memory>
+#include <com/sun/star/frame/XModel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class LegendPositionResources;
+class SchLegendDlg : public ModalDialog
+{
+private:
+ ::std::auto_ptr< LegendPositionResources > m_apLegendPositionResources;
+
+ OKButton aBtnOK;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+public:
+ SchLegendDlg( Window* pParent, const ::com::sun::star::uno::Reference<
+ ::com::sun::star::uno::XComponentContext>& xCC );
+ virtual ~SchLegendDlg();
+
+ void init( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel );
+ bool writeToModel( const ::com::sun::star::uno::Reference<
+ ::com::sun::star::frame::XModel >& xChartModel ) const;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertTitle.hxx b/chart2/source/controller/inc/dlg_InsertTitle.hxx
new file mode 100644
index 000000000000..d7bd9c8f1d20
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertTitle.hxx
@@ -0,0 +1,64 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_INSERT_TITLE_GRID_HXX
+#define _CHART2_DLG_INSERT_TITLE_GRID_HXX
+
+#include "TitleDialogData.hxx"
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+//for auto_ptr
+#include <memory>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+class TitleResources;
+class SchTitleDlg : public ModalDialog
+{
+private:
+ ::std::auto_ptr< TitleResources > m_apTitleResources;
+
+ OKButton aBtnOK;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+public:
+ SchTitleDlg( Window* pParent, const TitleDialogData& rInput );
+ virtual ~SchTitleDlg();
+
+ void getResult( TitleDialogData& rOutput );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_InsertTrendline.hxx b/chart2/source/controller/inc/dlg_InsertTrendline.hxx
new file mode 100644
index 000000000000..48c2a9e23d92
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_InsertTrendline.hxx
@@ -0,0 +1,71 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_INSERT_TRENDLINE_HXX
+#define _CHART2_DLG_INSERT_TRENDLINE_HXX
+
+#include <vcl/dialog.hxx>
+#include <vcl/button.hxx>
+#include <svl/itemset.hxx>
+#include <memory>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class TrendlineResources;
+class InsertTrendlineDialog : public ModalDialog
+{
+public:
+ InsertTrendlineDialog( Window* pParent, const SfxItemSet& rMyAttrs );
+ virtual ~InsertTrendlineDialog();
+
+ void FillItemSet( SfxItemSet& rOutAttrs );
+ virtual void DataChanged( const DataChangedEvent& rDCEvt );
+
+ // sets the size so that all control texts fit. Has to be done after
+ // complete construction of the dialog
+ void adjustSize();
+
+private:
+ const SfxItemSet & rInAttrs;
+
+ OKButton aBtnOK;
+ CancelButton aBtnCancel;
+ HelpButton aBtnHelp;
+
+ ::std::auto_ptr< TrendlineResources > m_apTrendlineResources;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ObjectProperties.hxx b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
new file mode 100644
index 000000000000..4a8be27c984f
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ObjectProperties.hxx
@@ -0,0 +1,157 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_OBJECTPROPERTIES_HXX
+#define _CHART2_DLG_OBJECTPROPERTIES_HXX
+
+#include "ObjectIdentifier.hxx"
+#include <sfx2/tabdlg.hxx>
+// header for typedef ChangeType
+#include <svx/tabarea.hxx>
+#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ObjectPropertiesDialogParameter
+{
+public:
+ ObjectPropertiesDialogParameter( const rtl::OUString& rObjectCID );
+ virtual ~ObjectPropertiesDialogParameter();
+
+ void init( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xModel );
+ ObjectType getObjectType() const;
+ rtl::OUString getLocalizedName() const;
+
+ bool HasGeometryProperties() const;
+ bool HasStatisticProperties() const;
+ bool ProvidesSecondaryYAxis() const;
+ bool ProvidesOverlapAndGapWidth() const;
+ bool ProvidesBarConnectors() const;
+ bool HasAreaProperties() const;
+ bool HasSymbolProperties() const;
+ bool HasNumberProperties() const;
+ bool ProvidesStartingAngle() const;
+ bool ProvidesMissingValueTreatments() const;
+
+ bool HasScaleProperties() const;
+ bool CanAxisLabelsBeStaggered() const;
+ bool IsSupportingAxisPositioning() const;
+ bool ShowAxisOrigin() const;
+ bool IsCrossingAxisIsCategoryAxis() const;
+ const ::com::sun::star::uno::Sequence< rtl::OUString >& GetCategories() const;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument >
+ getDocument() const;
+
+private:
+ rtl::OUString m_aObjectCID;
+ ObjectType m_eObjectType;
+ bool m_bAffectsMultipleObjects;//is true if more than one object of the given type will be changed (e.g. all axes or all titles)
+
+ rtl::OUString m_aLocalizedName;
+
+ bool m_bHasGeometryProperties;
+ bool m_bHasStatisticProperties;
+ bool m_bProvidesSecondaryYAxis;
+ bool m_bProvidesOverlapAndGapWidth;
+ bool m_bProvidesBarConnectors;
+ bool m_bHasAreaProperties;
+ bool m_bHasSymbolProperties;
+ bool m_bHasNumberProperties;
+ bool m_bProvidesStartingAngle;
+ bool m_bProvidesMissingValueTreatments;
+
+ bool m_bHasScaleProperties;
+ bool m_bCanAxisLabelsBeStaggered;
+
+ bool m_bSupportingAxisPositioning;
+ bool m_bShowAxisOrigin;
+ bool m_bIsCrossingAxisIsCategoryAxis;
+ ::com::sun::star::uno::Sequence< rtl::OUString > m_aCategories;
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XChartDocument > m_xChartDocument;
+};
+
+/*************************************************************************
+|*
+|* dialog for properties of different chart object
+|*
+\************************************************************************/
+
+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 ObjectPropertiesDialogParameter * const m_pParameter;
+ const ViewElementListProvider* const m_pViewElementListProvider;
+ SvNumberFormatter* m_pNumberFormatter;
+
+ SfxItemSet* m_pSymbolShapeProperties;
+ Graphic* m_pAutoSymbolGraphic;
+
+ double m_fAxisMinorStepWidthForErrorBarDecimals;
+ bool m_bOKPressed;
+
+ virtual void PageCreated(USHORT nId, SfxTabPage& rPage);
+
+ Link m_aOriginalOKClickHdl;
+ DECL_LINK( OKPressed, void * );
+
+public:
+ SchAttribTabDlg(Window* pParent, const SfxItemSet* pAttr,
+ const ObjectPropertiesDialogParameter* pDialogParameter,
+ const ViewElementListProvider* pViewElementListProvider,
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::util::XNumberFormatsSupplier >& xNumberFormatsSupplier );
+ virtual ~SchAttribTabDlg();
+
+ //pSymbolShapeProperties: Properties to be set on the symbollist shapes
+ //pAutoSymbolGraphic: Graphic to be shown if AutoSymbol gets selected
+ //this class takes ownership over both parameter
+ void setSymbolInformation( SfxItemSet* pSymbolShapeProperties, Graphic* pAutoSymbolGraphic );
+
+ void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
+
+ bool DialogWasClosedWithOK() const;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ShapeFont.hxx b/chart2/source/controller/inc/dlg_ShapeFont.hxx
new file mode 100644
index 000000000000..1bb08470f137
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ShapeFont.hxx
@@ -0,0 +1,62 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DLG_SHAPEFONT_HXX
+#define CHART2_DLG_SHAPEFONT_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class ViewElementListProvider;
+
+/** dialog for font properties of shapes
+ */
+class ShapeFontDialog : public SfxTabDialog
+{
+public:
+ ShapeFontDialog( Window* pParent, const SfxItemSet* pAttr,
+ const ViewElementListProvider* pViewElementListProvider );
+ virtual ~ShapeFontDialog();
+
+private:
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+
+ const ViewElementListProvider* m_pViewElementListProvider;
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_DLG_SHAPEFONT_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_ShapeParagraph.hxx b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
new file mode 100644
index 000000000000..1083aa2e8b11
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_ShapeParagraph.hxx
@@ -0,0 +1,57 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_DLG_SHAPEPARAGRAPH_HXX
+#define CHART2_DLG_SHAPEPARAGRAPH_HXX
+
+#include <sfx2/tabdlg.hxx>
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+/** dialog for paragraph properties of shapes
+ */
+class ShapeParagraphDialog : public SfxTabDialog
+{
+public:
+ ShapeParagraphDialog( Window* pParent, const SfxItemSet* pAttr );
+ virtual ~ShapeParagraphDialog();
+
+private:
+ virtual void PageCreated( USHORT nId, SfxTabPage& rPage );
+};
+
+//.............................................................................
+} // namespace chart
+//.............................................................................
+
+// CHART2_DLG_SHAPEPARAGRAPH_HXX
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/dlg_View3D.hxx b/chart2/source/controller/inc/dlg_View3D.hxx
new file mode 100644
index 000000000000..8d6ee2ee446b
--- /dev/null
+++ b/chart2/source/controller/inc/dlg_View3D.hxx
@@ -0,0 +1,85 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CHART2_DLG_VIEW3D_DIAGRAM_HXX
+#define _CHART2_DLG_VIEW3D_DIAGRAM_HXX
+
+#include <com/sun/star/drawing/ShadeMode.hpp>
+#include <com/sun/star/frame/XModel.hpp>
+
+// header for class TabDialog
+#include <vcl/tabdlg.hxx>
+// header for class TabControl
+#include <vcl/tabctrl.hxx>
+// header for class OKButton
+#include <vcl/button.hxx>
+// header for class XColorTable
+#include <svx/xtable.hxx>
+
+#include "ControllerLockGuard.hxx"
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+class ThreeD_SceneGeometry_TabPage;
+class ThreeD_SceneAppearance_TabPage;
+class ThreeD_SceneIllumination_TabPage;
+
+class View3DDialog : public TabDialog
+{
+public:
+ View3DDialog( Window* pWindow,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel > & xChartModel,
+ XColorTable* pColorTable=0 );
+ ~View3DDialog();
+
+ // from Dialog (base of TabDialog)
+ virtual short Execute();
+
+private:
+ TabControl m_aTabControl;
+ OKButton m_aBtnOK;
+ CancelButton m_aBtnCancel;
+ HelpButton m_aBtnHelp;
+
+ ThreeD_SceneGeometry_TabPage* m_pGeometry;
+ ThreeD_SceneAppearance_TabPage* m_pAppearance;
+ ThreeD_SceneIllumination_TabPage* m_pIllumination;
+
+ ControllerLockHelper m_aControllerLocker;
+
+ static USHORT m_nLastPageId;
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/chart2/source/controller/inc/res_ErrorBar.hxx b/chart2/source/controller/inc/res_ErrorBar.hxx
new file mode 100644
index 000000000000..080a718091bc
--- /dev/null
+++ b/chart2/source/controller/inc/res_ErrorBar.hxx
@@ -0,0 +1,158 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org. If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef CHART2_RES_ERRORBAR_HXX
+#define CHART2_RES_ERRORBAR_HXX
+
+#include <vcl/button.hxx>
+#include <vcl/fixed.hxx>
+#include <vcl/field.hxx>
+#include <vcl/lstbox.hxx>
+#include <svtools/valueset.hxx>
+#include <svl/itemset.hxx>
+#include <svx/chrtitem.hxx>
+#include "chartview/ChartSfxItemIds.hxx"
+#include "RangeSelectionButton.hxx"
+#include "RangeSelectionListener.hxx"
+#include "RangeEdit.hxx"
+
+#include <com/sun/star/chart2/XChartDocument.hpp>
+
+#include <memory>
+
+class Dialog;
+
+//.............................................................................
+namespace chart
+{
+//.............................................................................
+
+class RangeSelectionHelper;
+
+class ErrorBarResources : public RangeSelectionListenerParent
+{
+public:
+ enum tErrorBarType
+ {
+ ERROR_BAR_X,
+ ERROR_BAR_Y
+ };
+
+ ErrorBarResources(
+ Window* pParent, Dialog * pParentDialog, const SfxItemSet& rInAttrst,
+ bool bNoneAvailable,
+ tErrorBarType eType = ERROR_BAR_Y );
+ virtual ~ErrorBarResources();
+
+ void SetAxisMinorStepWidthForErrorBarDecimals( double fMinorStepWidth );
+ void SetErrorBarType( tErrorBarType eNewType );
+ void SetChartDocumentForRangeChoosing(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::chart2::XChartDocument > & xChartDocument );
+ void Reset(const SfxItemSet& rInAttrs);
+ BOOL FillItemSet(SfxItemSet& rOutAttrs) const;
+
+ void FillValueSets();
+
+ // ____ RangeSelectionListenerParent ____
+ virtual void listeningFinished( const ::rtl::OUString & rNewRange );
+ virtual void disposingRangeSelection();
+
+private:
+ // category
+ FixedLine m_aFlErrorCategory;
+ RadioButton m_aRbNone;
+ RadioButton m_aRbConst;
+ RadioButton m_aRbPercent;
+ RadioButton m_aRbFunction;
+ RadioButton m_aRbRange;
+ ListBox m_aLbFunction;
+
+ // parameters
+ FixedLine m_aFlParameters;
+ FixedText m_aFtPositive;
+ MetricField m_aMfPositive;
+ RangeEdit m_aEdRangePositive;
+ RangeSelectionButton m_aIbRangePositive;
+ FixedText m_aFtNegative;
+ MetricField m_aMfNegative;
+ RangeEdit m_aEdRangeNegative;
+ RangeSelectionButton m_aIbRangeNegative;
+ CheckBox m_aCbSyncPosNeg;
+
+ // indicator
+ FixedLine m_aFlIndicate;
+ RadioButton m_aRbBoth;
+ RadioButton m_aRbPositive;
+ RadioButton m_aRbNegative;
+ FixedImage m_aFiBoth;
+ FixedImage m_aFiPositive;
+ FixedImage m_aFiNegative;
+
+ SvxChartKindError m_eErrorKind;
+ SvxChartIndicate m_eIndicate;
+ SvxChartRegress m_eTrendLineType;
+
+ bool m_bErrorKindUnique;
+ bool m_bIndicatorUnique;
+ bool m_bPlusUnique;
+ bool m_bMinusUnique;
+ bool m_bRangePosUnique;
+ bool m_bRangeNegUnique;
+
+ bool m_bNoneAvailable;
+
+ tErrorBarType m_eErrorBarType;
+ sal_uInt16 m_nConstDecimalDigits;
+ sal_Int64 m_nConstSpinSize;
+
+ Window * m_pParentWindow;
+ Dialog * m_pParentDialog;
+ ::std::auto_ptr< RangeSelectionHelper >
+ m_apRangeSelectionHelper;
+ Edit * m_pCurrentRangeChoosingField;
+ bool m_bHasInternalDataProvider;
+ bool m_bDisableDataTableDialog;
+
+ DECL_LINK( CategoryChosen, void * );
+ DECL_LINK( SynchronizePosAndNeg, void * );
+ DECL_LINK( PosValueChanged, void * );
+ DECL_LINK( IndicatorChanged, void * );
+ DECL_LINK( ChooseRange, RangeSelectionButton * );
+ DECL_LINK( RangeChanged, Edit * );
+
+ void UpdateControlStates();
+ bool isRangeFieldContentValid( Edit & rEdit );
+};
+
+//.............................................................................
+} //namespace chart
+//.............................................................................
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */