summaryrefslogtreecommitdiff
path: root/chart2/source/inc
diff options
context:
space:
mode:
authorIvo Hinkelmann <ihi@openoffice.org>2010-03-03 14:30:52 +0100
committerIvo Hinkelmann <ihi@openoffice.org>2010-03-03 14:30:52 +0100
commitbd26f484336d86a10dcac5fc0fdbb3d35cb77f06 (patch)
tree3020687816bdcf531658970acd0daab4f92e147a /chart2/source/inc
parent22e99ad710239c0604f883f303d91b8c43a71f16 (diff)
parented1b30ca81d1b33c5466e1b0e9173b8c88b5f146 (diff)
CWS-TOOLING: integrate CWS chartshapes
Notes
split repo tag: calc_ooo/DEV300_m74
Diffstat (limited to 'chart2/source/inc')
-rw-r--r--chart2/source/inc/ChartModelHelper.hxx2
-rw-r--r--chart2/source/inc/ObjectIdentifier.hxx32
-rw-r--r--chart2/source/inc/Strings.hrc4
-rw-r--r--chart2/source/inc/UndoGuard.hxx11
-rw-r--r--chart2/source/inc/UndoManager.hxx22
-rw-r--r--chart2/source/inc/chartview/DrawModelWrapper.hxx2
-rw-r--r--chart2/source/inc/servicenames.hxx5
7 files changed, 60 insertions, 18 deletions
diff --git a/chart2/source/inc/ChartModelHelper.hxx b/chart2/source/inc/ChartModelHelper.hxx
index a5c5085ff626..bdeab6736044 100644
--- a/chart2/source/inc/ChartModelHelper.hxx
+++ b/chart2/source/inc/ChartModelHelper.hxx
@@ -55,8 +55,6 @@ namespace chart
class OOO_DLLPUBLIC_CHARTTOOLS ChartModelHelper
{
public:
- static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::XUndoManager > createUndoManager();
-
static ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XRangeHighlighter > createRangeHighlighter(
const ::com::sun::star::uno::Reference< ::com::sun::star::view::XSelectionSupplier >& xSelectionSupplier );
diff --git a/chart2/source/inc/ObjectIdentifier.hxx b/chart2/source/inc/ObjectIdentifier.hxx
index c122f4b872d8..0765c9acf94a 100644
--- a/chart2/source/inc/ObjectIdentifier.hxx
+++ b/chart2/source/inc/ObjectIdentifier.hxx
@@ -40,6 +40,7 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/awt/Point.hpp>
+#include <com/sun/star/drawing/XShape.hpp>
//.............................................................................
namespace chart
@@ -76,6 +77,7 @@ enum ObjectType
OBJECTTYPE_DATA_STOCK_RANGE,
OBJECTTYPE_DATA_STOCK_LOSS,
OBJECTTYPE_DATA_STOCK_GAIN,
+ OBJECTTYPE_SHAPE,
OBJECTTYPE_UNKNOWN
};
@@ -99,6 +101,18 @@ class OOO_DLLPUBLIC_CHARTTOOLS ObjectIdentifier
//where Type: getStringForType( ObjectType eType ) or other string
public:
+ ObjectIdentifier();
+ ObjectIdentifier( const ::rtl::OUString& rObjectCID );
+ ObjectIdentifier( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape >& rxShape );
+ ObjectIdentifier( const ::com::sun::star::uno::Any& rAny );
+ virtual ~ObjectIdentifier();
+
+ ObjectIdentifier( const ObjectIdentifier& rOID );
+ ObjectIdentifier& operator=( const ObjectIdentifier& rOID );
+ bool operator==( const ObjectIdentifier& rOID ) const;
+ bool operator!=( const ObjectIdentifier& rOID ) const;
+ bool operator<( const ObjectIdentifier& rOID ) const;
+
static rtl::OUString createClassifiedIdentifierForObject(
const ::com::sun::star::uno::Reference<
::com::sun::star::uno::XInterface >& xObject
@@ -169,6 +183,7 @@ public:
static rtl::OUString getDragMethodServiceName( const rtl::OUString& rClassifiedIdentifier );
static rtl::OUString getDragParameterString( const rtl::OUString& rCID );
static bool isDragableObject( const rtl::OUString& rClassifiedIdentifier );
+ bool isDragableObject();
static bool isRotateableObject( const rtl::OUString& rClassifiedIdentifier );
static bool isMultiClickObject( const rtl::OUString& rClassifiedIdentifier );
static bool areSiblings( const rtl::OUString& rCID1, const rtl::OUString& rCID2 );//identical object is no sibling
@@ -176,6 +191,7 @@ public:
static rtl::OUString getStringForType( ObjectType eObjectType );
static ObjectType getObjectType( const rtl::OUString& rCID );
+ ObjectType getObjectType();
static rtl::OUString createSeriesSubObjectStub( ObjectType eSubObjectType
, const rtl::OUString& rSeriesParticle
@@ -238,6 +254,22 @@ public:
static TitleHelper::eTitleType getTitleTypeForCID( const ::rtl::OUString& rCID );
static ::rtl::OUString getMovedSeriesCID( const ::rtl::OUString& rObjectCID, sal_Bool bForward );
+
+ bool isValid() const;
+ bool isAutoGeneratedObject() const;
+ bool isAdditionalShape() const;
+ ::rtl::OUString getObjectCID() const;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > getAdditionalShape() const;
+ ::com::sun::star::uno::Any getAny() const;
+
+private:
+ // #i12587# support for shapes in chart
+ // For autogenerated chart objects a CID is specified in m_aObjectCID,
+ // for all other objects m_xAdditionalShape is set.
+ // Note, that if m_aObjectCID is set, m_xAdditionalShape must be empty
+ // and vice versa.
+ ::rtl::OUString m_aObjectCID;
+ ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShape > m_xAdditionalShape;
};
//.............................................................................
diff --git a/chart2/source/inc/Strings.hrc b/chart2/source/inc/Strings.hrc
index 870f1b9fd6c4..47ed75e80a9a 100644
--- a/chart2/source/inc/Strings.hrc
+++ b/chart2/source/inc/Strings.hrc
@@ -30,7 +30,7 @@
// this includes no link dependency
#include <svl/solar.hrc>
-//next free is 290
+//next free is 291
//single free is: 134
//#define RID_APP_START 30000
@@ -264,6 +264,8 @@
#define STR_OBJECT_CURVE_EQUATION (RID_APP_START + 268)
#define STR_STATISTICS_IN_LEGEND (RID_APP_START + 180)
+#define STR_OBJECT_SHAPE (RID_APP_START + 290)
+
//-----------------------------------------------------------------------------
//Titles for tabpages and dialogs
diff --git a/chart2/source/inc/UndoGuard.hxx b/chart2/source/inc/UndoGuard.hxx
index 247f2d3f559f..864d5ccff994 100644
--- a/chart2/source/inc/UndoGuard.hxx
+++ b/chart2/source/inc/UndoGuard.hxx
@@ -29,7 +29,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/chart2/XUndoManager.hpp>
-#include "charttoolsdllapi.hxx"
// header for class OUString
#include <rtl/ustring.hxx>
@@ -48,7 +47,7 @@ public:
::com::sun::star::frame::XModel > & xModel );
virtual ~UndoGuard_Base();
-OOO_DLLPUBLIC_CHARTTOOLS void commitAction();
+ void commitAction();
protected:
::com::sun::star::uno::Reference<
@@ -64,7 +63,7 @@ protected:
cancelAction in the DTOR if no other method is called.
If commitAction is called the destructor does nothin anymore.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoGuard : public UndoGuard_Base
+class UndoGuard : public UndoGuard_Base
{
public:
explicit UndoGuard( const rtl::OUString& rUndoMessage
@@ -79,7 +78,7 @@ public:
cancelActionUndo in the DTOR if no other method is called.
If commitAction is called the destructor does nothin anymore.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoLiveUpdateGuard : public UndoGuard_Base
+class UndoLiveUpdateGuard : public UndoGuard_Base
{
public:
explicit UndoLiveUpdateGuard( const rtl::OUString& rUndoMessage
@@ -93,7 +92,7 @@ public:
/** Same as UndoLiveUpdateGuard but with additional storage of the chart's data.
Only use this if the data has internal data.
*/
-class OOO_DLLPUBLIC_CHARTTOOLS UndoLiveUpdateGuardWithData :
+class UndoLiveUpdateGuardWithData :
public UndoGuard_Base
{
public:
@@ -105,7 +104,7 @@ public:
virtual ~UndoLiveUpdateGuardWithData();
};
-class OOO_DLLPUBLIC_CHARTTOOLS UndoGuardWithSelection : public UndoGuard_Base
+class UndoGuardWithSelection : public UndoGuard_Base
{
public:
explicit UndoGuardWithSelection( const rtl::OUString& rUndoMessage
diff --git a/chart2/source/inc/UndoManager.hxx b/chart2/source/inc/UndoManager.hxx
index b5481715ad43..a28a0d78c470 100644
--- a/chart2/source/inc/UndoManager.hxx
+++ b/chart2/source/inc/UndoManager.hxx
@@ -36,8 +36,9 @@
#include <com/sun/star/util/XModifyListener.hpp>
#include <com/sun/star/chart2/XUndoManager.hpp>
#include <com/sun/star/chart2/XUndoHelper.hpp>
+#include <com/sun/star/lang/XUnoTunnel.hpp>
-#include <cppuhelper/compbase3.hxx>
+#include <cppuhelper/compbase4.hxx>
#include <rtl/ustring.hxx>
// for pair
@@ -45,6 +46,8 @@
// for auto_ptr
#include <memory>
+class SdrUndoAction;
+
namespace com { namespace sun { namespace star {
namespace frame {
class XModel;
@@ -62,10 +65,11 @@ class UndoElement;
class UndoStack;
class ModifyBroadcaster;
-typedef ::cppu::WeakComponentImplHelper3<
+typedef ::cppu::WeakComponentImplHelper4<
::com::sun::star::util::XModifyBroadcaster,
::com::sun::star::chart2::XUndoManager,
- ::com::sun::star::chart2::XUndoHelper >
+ ::com::sun::star::chart2::XUndoHelper,
+ ::com::sun::star::lang::XUnoTunnel >
UndoManager_Base;
} // namespace impl
@@ -87,6 +91,15 @@ public:
explicit UndoManager();
virtual ~UndoManager();
+ void addShapeUndoAction( SdrUndoAction* pAction );
+
+ // ____ XUnoTunnel ____
+ virtual sal_Int64 SAL_CALL getSomething( const ::com::sun::star::uno::Sequence< sal_Int8 >& rId )
+ throw (::com::sun::star::uno::RuntimeException);
+
+ static const ::com::sun::star::uno::Sequence< sal_Int8 >& getUnoTunnelId();
+ static UndoManager* getImplementation( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface> xObj );
+
protected:
// ____ ConfigItemListener ____
virtual void notify( const ::rtl::OUString & rPropertyName );
@@ -145,7 +158,8 @@ private:
::com::sun::star::uno::Reference<
::com::sun::star::frame::XModel > & xCurrentModel,
impl::UndoStack * pStackToRemoveFrom,
- impl::UndoStack * pStackToAddTo );
+ impl::UndoStack * pStackToAddTo,
+ bool bUndo = true );
::std::auto_ptr< impl::UndoStack > m_apUndoStack;
::std::auto_ptr< impl::UndoStack > m_apRedoStack;
diff --git a/chart2/source/inc/chartview/DrawModelWrapper.hxx b/chart2/source/inc/chartview/DrawModelWrapper.hxx
index b2f4f412610e..5bcf67a8592b 100644
--- a/chart2/source/inc/chartview/DrawModelWrapper.hxx
+++ b/chart2/source/inc/chartview/DrawModelWrapper.hxx
@@ -95,8 +95,6 @@ public:
getUnoModel();
SdrModel& getSdrModel();
- SAL_DLLPRIVATE void updateTablesFromChartModel( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XModel >& xChartModel );
-
XColorTable* GetColorTable() const;
XDashList* GetDashList() const;
XLineEndList* GetLineEndList() const;
diff --git a/chart2/source/inc/servicenames.hxx b/chart2/source/inc/servicenames.hxx
index b6dbec2c76f0..d1af0edb3335 100644
--- a/chart2/source/inc/servicenames.hxx
+++ b/chart2/source/inc/servicenames.hxx
@@ -57,14 +57,13 @@ namespace chart
#define CHART_CHARTAPIWRAPPER_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.ChartDocumentWrapper")
// accessibility
-#define CHART2_ACCESSIBLE_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.AccessibleChartView")
-#define CHART2_ACCESSIBLE_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.chart2.AccessibleChartView")
-
#define CHART_ACCESSIBLE_TEXT_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.AccessibleTextComponent")
#define CHART_ACCESSIBLE_TEXT_SERVICE_NAME ::rtl::OUString::createFromAscii("com.sun.star.accessibility.AccessibleTextComponent")
#define CHART_RENDERER_SERVICE_IMPLEMENTATION_NAME ::rtl::OUString::createFromAscii("com.sun.star.comp.chart2.ChartRenderer")
+#define CHART_UNDOMANAGER_SERVICE_NAME ::rtl::OUString::createFromAscii( "com.sun.star.chart2.UndoManager" )
+
//.............................................................................
} //namespace chart
//.............................................................................