summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorThomas Benisch <tbe@openoffice.org>2009-07-23 09:49:55 +0000
committerThomas Benisch <tbe@openoffice.org>2009-07-23 09:49:55 +0000
commit8e536b500b7a545323a3a99b0ca618892d756e28 (patch)
treea714a82a950076f96d2fd3cb865268e5da01d262 /chart2
parent082b2be6ae132d4e5a4dac9fabd3c3cdcf6b7359 (diff)
#i12587# Inserting/editing arbitrary text objects in chart
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/main/ChartController_Tools.cxx2
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx16
-rw-r--r--chart2/source/controller/main/SelectionHelper.hxx2
3 files changed, 4 insertions, 16 deletions
diff --git a/chart2/source/controller/main/ChartController_Tools.cxx b/chart2/source/controller/main/ChartController_Tools.cxx
index 1be741a4301d..ab56829760f4 100644
--- a/chart2/source/controller/main/ChartController_Tools.cxx
+++ b/chart2/source/controller/main/ChartController_Tools.cxx
@@ -522,7 +522,7 @@ bool ChartController::isObjectDeleteable( const uno::Any& rSelection )
bool ChartController::isShapeContext() const
{
- if ( m_aSelection.isNonGraphicObjectShapeSelected() ||
+ if ( m_aSelection.isAdditionalShapeSelected() ||
( m_pDrawViewWrapper->AreObjectsMarked() && ( m_pDrawViewWrapper->GetCurrentObjIdentifier() == OBJ_TEXT ) ) )
{
return true;
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index 1bda68a8ebad..50494871cc7f 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -335,21 +335,9 @@ bool Selection::isDragableObjectSelected()
return m_xSelectAdditionalShape.is();
}
-bool Selection::isNonGraphicObjectShapeSelected() const
+bool Selection::isAdditionalShapeSelected() const
{
- if ( m_xSelectAdditionalShape.is() )
- {
- uno::Reference< drawing::XShapeDescriptor > xShapeDescriptor( m_xSelectAdditionalShape, uno::UNO_QUERY );
- if ( xShapeDescriptor.is() )
- {
- ::rtl::OUString aShapeType = xShapeDescriptor->getShapeType();
- if ( !aShapeType.equals( C2U( "com.sun.star.drawing.GraphicObjectShape" ) ) )
- {
- return true;
- }
- }
- }
- return false;
+ return m_xSelectAdditionalShape.is();
}
//-----------------------------------------------------------------------------
diff --git a/chart2/source/controller/main/SelectionHelper.hxx b/chart2/source/controller/main/SelectionHelper.hxx
index 6ef3f2f67c0e..2e9016261e29 100644
--- a/chart2/source/controller/main/SelectionHelper.hxx
+++ b/chart2/source/controller/main/SelectionHelper.hxx
@@ -62,7 +62,7 @@ public: //methods
::com::sun::star::frame::XModel >& xChartModel );
bool isDragableObjectSelected();
- bool isNonGraphicObjectShapeSelected() const;
+ bool isAdditionalShapeSelected() const;
//returns true if selection has changed
bool setSelection( const ::rtl::OUString& rCID );