summaryrefslogtreecommitdiff
path: root/chart2/source/controller/main
diff options
context:
space:
mode:
Diffstat (limited to 'chart2/source/controller/main')
-rw-r--r--chart2/source/controller/main/ChartController_Position.cxx10
-rw-r--r--chart2/source/controller/main/ChartController_Properties.cxx10
-rw-r--r--chart2/source/controller/main/ChartController_Window.cxx46
-rw-r--r--chart2/source/controller/main/ControllerCommandDispatch.cxx14
-rw-r--r--chart2/source/controller/main/DrawCommandDispatch.cxx2
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx4
-rw-r--r--chart2/source/controller/main/PositionAndSizeHelper.cxx10
-rw-r--r--chart2/source/controller/main/SelectionHelper.cxx10
8 files changed, 53 insertions, 53 deletions
diff --git a/chart2/source/controller/main/ChartController_Position.cxx b/chart2/source/controller/main/ChartController_Position.cxx
index a11f21011794..0775d6432d26 100644
--- a/chart2/source/controller/main/ChartController_Position.cxx
+++ b/chart2/source/controller/main/ChartController_Position.cxx
@@ -58,16 +58,16 @@ void lcl_getPositionAndSizeFromItemSet( const SfxItemSet& rItemSet, awt::Rectang
const SfxPoolItem* pPoolItem=nullptr;
//read position
- if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem))
+ if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_X,true,&pPoolItem)==SfxItemState::SET)
nPosX= static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
- if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem))
+ if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_POS_Y,true,&pPoolItem)==SfxItemState::SET)
nPosY=static_cast<const SfxInt32Item*>(pPoolItem)->GetValue();
//read size
- if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem))
+ if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_WIDTH,true,&pPoolItem)==SfxItemState::SET)
nSizX=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
- if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem))
+ if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_HEIGHT,true,&pPoolItem)==SfxItemState::SET)
nSizY=static_cast<const SfxUInt32Item*>(pPoolItem)->GetValue();
- if (SfxItemState::SET==rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem))
+ if (rItemSet.GetItemState(SID_ATTR_TRANSFORM_SIZE_POINT,true,&pPoolItem)==SfxItemState::SET)
eRP=(RectPoint)static_cast<const SfxAllEnumItem*>(pPoolItem)->GetValue();
switch( eRP )
diff --git a/chart2/source/controller/main/ChartController_Properties.cxx b/chart2/source/controller/main/ChartController_Properties.cxx
index 1136031073a1..51860ab2f02b 100644
--- a/chart2/source/controller/main/ChartController_Properties.cxx
+++ b/chart2/source/controller/main/ChartController_Properties.cxx
@@ -78,7 +78,7 @@ wrapper::ItemConverter* createItemConverter(
//get type of selected object
ObjectType eObjectType = ObjectIdentifier::getObjectType( aObjectCID );
- if( OBJECTTYPE_UNKNOWN==eObjectType )
+ if( eObjectType==OBJECTTYPE_UNKNOWN )
{
OSL_FAIL("unknown ObjectType");
return nullptr;
@@ -681,14 +681,14 @@ OUString lcl_getFormatCIDforSelectedCID( const OUString& rSelectedCID )
ObjectType eObjectType = ObjectIdentifier::getObjectType( aFormatCID );
// some legend entries are handled as if they were data series
- if( OBJECTTYPE_LEGEND_ENTRY==eObjectType )
+ if( eObjectType==OBJECTTYPE_LEGEND_ENTRY )
{
OUString aParentParticle( ObjectIdentifier::getFullParentParticle( rSelectedCID ) );
aFormatCID = ObjectIdentifier::createClassifiedIdentifierForParticle( aParentParticle );
}
// treat diagram as wall
- if( OBJECTTYPE_DIAGRAM==eObjectType )
+ if( eObjectType==OBJECTTYPE_DIAGRAM )
aFormatCID = ObjectIdentifier::createClassifiedIdentifier( OBJECTTYPE_DIAGRAM_WALL, OUString() );
return aFormatCID;
@@ -723,11 +723,11 @@ bool ChartController::executeDlg_ObjectProperties_withoutUndoGuard(
{
//get type of object
ObjectType eObjectType = ObjectIdentifier::getObjectType( rObjectCID );
- if( OBJECTTYPE_UNKNOWN==eObjectType )
+ if( eObjectType==OBJECTTYPE_UNKNOWN )
{
return bRet;
}
- if( OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType )
+ if( eObjectType==OBJECTTYPE_DIAGRAM_WALL || eObjectType==OBJECTTYPE_DIAGRAM_FLOOR )
{
if( !DiagramHelper::isSupportingFloorAndWall( ChartModelHelper::findDiagram( getModel() ) ) )
return bRet;
diff --git a/chart2/source/controller/main/ChartController_Window.cxx b/chart2/source/controller/main/ChartController_Window.cxx
index a38bb94571f0..5ca9f2012f52 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -575,7 +575,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
}
}
- if ( MOUSE_LEFT == rMEvt.GetButtons() )
+ if ( rMEvt.GetButtons() == MOUSE_LEFT )
{
pChartWindow->GrabFocus();
pChartWindow->CaptureMouse();
@@ -671,7 +671,7 @@ void ChartController::execute_MouseButtonDown( const MouseEvent& rMEvt )
//change selection to 3D scene if rotate mode
SdrDragMode eDragMode = pDrawViewWrapper->GetDragMode();
- if( SdrDragMode::Rotate==eDragMode )
+ if( eDragMode==SdrDragMode::Rotate )
{
E3dScene* pScene = SelectionHelper::getSceneToRotate( pDrawViewWrapper->getNamedSdrObject( m_aSelection.getSelectedCID() ) );
if( pScene )
@@ -874,7 +874,7 @@ void ChartController::execute_MouseButtonUp( const MouseEvent& rMEvt )
bool bIsRotateable = m_aSelection.isRotateableObjectSelected( getModel() );
//toggle between move and rotate
- if( bIsRotateable && bClickedTwiceOnDragableObject && SdrDragMode::Move==m_eDragMode )
+ if( bIsRotateable && bClickedTwiceOnDragableObject && m_eDragMode==SdrDragMode::Move )
m_eDragMode=SdrDragMode::Rotate;
else
m_eDragMode=SdrDragMode::Move;
@@ -917,7 +917,7 @@ void ChartController::execute_DoubleClick( const Point* pMousePixel )
if ( !aCID.isEmpty() )
{
ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
- if ( OBJECTTYPE_TITLE == eObjectType )
+ if ( eObjectType == OBJECTTYPE_TITLE )
{
bEditText = true;
}
@@ -1007,9 +1007,9 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
//some commands for dataseries and points:
- if( OBJECTTYPE_DATA_SERIES == eObjectType || OBJECTTYPE_DATA_POINT == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_SERIES || eObjectType == OBJECTTYPE_DATA_POINT )
{
- bool bIsPoint = ( OBJECTTYPE_DATA_POINT == eObjectType );
+ bool bIsPoint = ( eObjectType == OBJECTTYPE_DATA_POINT );
uno::Reference< XDataSeries > xSeries = ObjectIdentifier::getDataSeriesForCID( m_aSelection.getSelectedCID(), getModel() );
uno::Reference< chart2::XRegressionCurveContainer > xCurveCnt( xSeries, uno::UNO_QUERY );
Reference< chart2::XRegressionCurve > xTrendline( RegressionCurveHelper::getFirstCurveNotMeanValueLine( xCurveCnt ) );
@@ -1146,7 +1146,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
}
++nUniqueId;
}
- else if( OBJECTTYPE_DATA_CURVE == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_CURVE )
{
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendline" );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatTrendlineEquation" );
@@ -1156,7 +1156,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteTrendlineEquation" );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" );
}
- else if( OBJECTTYPE_DATA_CURVE_EQUATION == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_CURVE_EQUATION )
{
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertR2Value" );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:DeleteR2Value" );
@@ -1164,7 +1164,7 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
//some commands for axes: and grids
- else if( OBJECTTYPE_AXIS == eObjectType || OBJECTTYPE_GRID == eObjectType || OBJECTTYPE_SUBGRID == eObjectType )
+ else if( eObjectType == OBJECTTYPE_AXIS || eObjectType == OBJECTTYPE_GRID || eObjectType == OBJECTTYPE_SUBGRID )
{
Reference< XAxis > xAxis = ObjectIdentifier::getAxisForCID( m_aSelection.getSelectedCID(), getModel() );
if( xAxis.is() && xDiagram.is() )
@@ -1182,20 +1182,20 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
if( xTitled.is())
bHasTitle = !TitleHelper::getCompleteString( xTitled->getTitleObject() ).isEmpty();
- if( OBJECTTYPE_AXIS != eObjectType && bIsAxisVisible )
+ if( eObjectType != OBJECTTYPE_AXIS && bIsAxisVisible )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatAxis" );
- if( OBJECTTYPE_GRID != eObjectType && bIsMajorGridVisible && !bIsSecondaryAxis )
+ if( eObjectType != OBJECTTYPE_GRID && bIsMajorGridVisible && !bIsSecondaryAxis )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMajorGrid" );
- if( OBJECTTYPE_SUBGRID != eObjectType && bIsMinorGridVisible && !bIsSecondaryAxis )
+ if( eObjectType != OBJECTTYPE_SUBGRID && bIsMinorGridVisible && !bIsSecondaryAxis )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatMinorGrid" );
xPopupMenu->insertSeparator( -1 );
- if( OBJECTTYPE_AXIS != eObjectType && !bIsAxisVisible )
+ if( eObjectType != OBJECTTYPE_AXIS && !bIsAxisVisible )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxis" );
- if( OBJECTTYPE_GRID != eObjectType && !bIsMajorGridVisible && !bIsSecondaryAxis )
+ if( eObjectType != OBJECTTYPE_GRID && !bIsMajorGridVisible && !bIsSecondaryAxis )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMajorGrid" );
- if( OBJECTTYPE_SUBGRID != eObjectType && !bIsMinorGridVisible && !bIsSecondaryAxis )
+ if( eObjectType != OBJECTTYPE_SUBGRID && !bIsMinorGridVisible && !bIsSecondaryAxis )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertMinorGrid" );
if( !bHasTitle )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertAxisTitle" );
@@ -1209,19 +1209,19 @@ void ChartController::execute_Command( const CommandEvent& rCEvt )
}
}
- if( OBJECTTYPE_DATA_STOCK_LOSS == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_STOCK_LOSS )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockGain" );
- else if( OBJECTTYPE_DATA_STOCK_GAIN == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_STOCK_GAIN )
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:FormatStockLoss" );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:TransformDialog" );
- if( OBJECTTYPE_PAGE == eObjectType || OBJECTTYPE_DIAGRAM == eObjectType
- || OBJECTTYPE_DIAGRAM_WALL == eObjectType
- || OBJECTTYPE_DIAGRAM_FLOOR == eObjectType
- || OBJECTTYPE_UNKNOWN == eObjectType )
+ if( eObjectType == OBJECTTYPE_PAGE || eObjectType == OBJECTTYPE_DIAGRAM
+ || eObjectType == OBJECTTYPE_DIAGRAM_WALL
+ || eObjectType == OBJECTTYPE_DIAGRAM_FLOOR
+ || eObjectType == OBJECTTYPE_UNKNOWN )
{
- if( OBJECTTYPE_UNKNOWN != eObjectType )
+ if( eObjectType != OBJECTTYPE_UNKNOWN )
xPopupMenu->insertSeparator( -1 );
bool bHasLegend = LegendHelper::hasLegend( xDiagram );
lcl_insertMenuCommand( xPopupMenu, nUniqueId++, ".uno:InsertTitles" );
@@ -1506,7 +1506,7 @@ bool ChartController::execute_KeyInput( const KeyEvent& rKEvt )
if( ! bReturn &&
nCode == KEY_F2 )
{
- if( OBJECTTYPE_TITLE == eObjectType )
+ if( eObjectType == OBJECTTYPE_TITLE )
{
executeDispatch_EditText();
bReturn = true;
diff --git a/chart2/source/controller/main/ControllerCommandDispatch.cxx b/chart2/source/controller/main/ControllerCommandDispatch.cxx
index 99c923810b4d..4cfbd3a0f4a9 100644
--- a/chart2/source/controller/main/ControllerCommandDispatch.cxx
+++ b/chart2/source/controller/main/ControllerCommandDispatch.cxx
@@ -185,12 +185,12 @@ void ControllerState::update(
ObjectType aObjectType(ObjectIdentifier::getObjectType( aSelObjCID ));
- bIsPositionableObject = (OBJECTTYPE_DATA_POINT != aObjectType) && aSelOID.isDragableObject();
- bIsTextObject = OBJECTTYPE_TITLE == aObjectType;
+ bIsPositionableObject = (aObjectType != OBJECTTYPE_DATA_POINT) && aSelOID.isDragableObject();
+ bIsTextObject = aObjectType == OBJECTTYPE_TITLE;
uno::Reference< chart2::XDiagram > xDiagram( ChartModelHelper::findDiagram( xModel ));
bIsFormateableObjectSelected = bHasSelectedObject && aSelOID.isAutoGeneratedObject();
- if( OBJECTTYPE_DIAGRAM==aObjectType || OBJECTTYPE_DIAGRAM_WALL==aObjectType || OBJECTTYPE_DIAGRAM_FLOOR==aObjectType )
+ if( aObjectType==OBJECTTYPE_DIAGRAM || aObjectType==OBJECTTYPE_DIAGRAM_WALL || aObjectType==OBJECTTYPE_DIAGRAM_FLOOR )
bIsFormateableObjectSelected = DiagramHelper::isSupportingFloorAndWall( xDiagram );
uno::Reference< chart2::XDataSeries > xGivenDataSeries(
@@ -199,12 +199,12 @@ void ControllerState::update(
bIsDeleteableObjectSelected = ChartController::isObjectDeleteable( aSelObj );
- bMayMoveSeriesForward = (OBJECTTYPE_DATA_POINT!=aObjectType) && DiagramHelper::isSeriesMoveable(
+ bMayMoveSeriesForward = (aObjectType!=OBJECTTYPE_DATA_POINT) && DiagramHelper::isSeriesMoveable(
ChartModelHelper::findDiagram( xModel ),
xGivenDataSeries,
MOVE_SERIES_FORWARD );
- bMayMoveSeriesBackward = (OBJECTTYPE_DATA_POINT!=aObjectType) && DiagramHelper::isSeriesMoveable(
+ bMayMoveSeriesBackward = (aObjectType!=OBJECTTYPE_DATA_POINT) && DiagramHelper::isSeriesMoveable(
ChartModelHelper::findDiagram( xModel ),
xGivenDataSeries,
MOVE_SERIES_BACKWARD );
@@ -237,7 +237,7 @@ void ControllerState::update(
DataSeriesHelper::getChartTypeOfSeries( xGivenDataSeries, xDiagram ));
// trend lines/mean value line
- if( (OBJECTTYPE_DATA_SERIES == aObjectType || OBJECTTYPE_DATA_POINT == aObjectType)
+ if( (aObjectType == OBJECTTYPE_DATA_SERIES || aObjectType == OBJECTTYPE_DATA_POINT)
&& ChartTypeHelper::isSupportingRegressionProperties( xFirstChartType, nDimensionCount ))
{
uno::Reference< chart2::XRegressionCurveContainer > xRegCurveCnt( xGivenDataSeries, uno::UNO_QUERY );
@@ -253,7 +253,7 @@ void ControllerState::update(
}
// error bars
- if( (OBJECTTYPE_DATA_SERIES == aObjectType || OBJECTTYPE_DATA_POINT == aObjectType)
+ if( (aObjectType == OBJECTTYPE_DATA_SERIES || aObjectType == OBJECTTYPE_DATA_POINT)
&& ChartTypeHelper::isSupportingStatisticProperties( xFirstChartType, nDimensionCount ))
{
bMayFormatXErrorBars = bMayDeleteXErrorBars = StatisticsHelper::hasErrorBars( xGivenDataSeries, false );
diff --git a/chart2/source/controller/main/DrawCommandDispatch.cxx b/chart2/source/controller/main/DrawCommandDispatch.cxx
index d1e6488c052c..0656572a9ef7 100644
--- a/chart2/source/controller/main/DrawCommandDispatch.cxx
+++ b/chart2/source/controller/main/DrawCommandDispatch.cxx
@@ -519,7 +519,7 @@ SdrObject* DrawCommandDispatch::createDefaultObject( const sal_uInt16 nID )
{
if ( dynamic_cast<const SdrCaptionObj*>( pObj) != nullptr )
{
- bool bIsVertical( COMMAND_ID_DRAW_CAPTION_VERTICAL == nID );
+ bool bIsVertical( nID == COMMAND_ID_DRAW_CAPTION_VERTICAL );
SdrTextObj* pTextObj = dynamic_cast< SdrTextObj* >( pObj );
if ( pTextObj )
{
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index 0aa6610ba958..f29678e78c90 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -214,7 +214,7 @@ bool SelectorListBox::EventNotify( NotifyEvent& rNEvt )
case KEY_RETURN:
case KEY_TAB:
{
- if ( KEY_TAB == nCode )
+ if ( nCode == KEY_TAB )
m_bReleaseFocus = false;
else
bHandled = true;
@@ -228,7 +228,7 @@ bool SelectorListBox::EventNotify( NotifyEvent& rNEvt )
break;
}
}
- else if ( MouseNotifyEvent::LOSEFOCUS == rNEvt.GetType() )
+ else if ( rNEvt.GetType() == MouseNotifyEvent::LOSEFOCUS )
{
if ( !HasFocus() )
SelectEntryPos( GetSavedValue() );
diff --git a/chart2/source/controller/main/PositionAndSizeHelper.cxx b/chart2/source/controller/main/PositionAndSizeHelper.cxx
index 076789eaa0ca..a3e2e1d9cfde 100644
--- a/chart2/source/controller/main/PositionAndSizeHelper.cxx
+++ b/chart2/source/controller/main/PositionAndSizeHelper.cxx
@@ -46,7 +46,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
tools::Rectangle aObjectRect( Point(rNewPositionAndSize.X,rNewPositionAndSize.Y), Size(rNewPositionAndSize.Width,rNewPositionAndSize.Height) );
tools::Rectangle aPageRect( Point(rPageRectangle.X,rPageRectangle.Y), Size(rPageRectangle.Width,rPageRectangle.Height) );
- if( OBJECTTYPE_TITLE==eObjectType )
+ if( eObjectType==OBJECTTYPE_TITLE )
{
//@todo decide whether x is primary or secondary
chart2::RelativePosition aRelativePosition;
@@ -57,7 +57,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
aRelativePosition.Secondary = (double(aPos.Y())+double(aObjectRect.getHeight())/2.0)/double(aPageRect.getHeight());
xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) );
}
- else if( OBJECTTYPE_DATA_CURVE_EQUATION==eObjectType )
+ else if( eObjectType==OBJECTTYPE_DATA_CURVE_EQUATION )
{
//@todo decide whether x is primary or secondary
chart2::RelativePosition aRelativePosition;
@@ -68,7 +68,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
aRelativePosition.Secondary = double(aPos.Y())/double(aPageRect.getHeight());
xObjectProp->setPropertyValue( "RelativePosition", uno::Any(aRelativePosition) );
}
- else if(OBJECTTYPE_LEGEND==eObjectType)
+ else if(eObjectType==OBJECTTYPE_LEGEND)
{
xObjectProp->setPropertyValue( "AnchorPosition", uno::Any(LegendPosition(LegendPosition_CUSTOM)));
xObjectProp->setPropertyValue( "Expansion", uno::Any(css::chart::ChartLegendExpansion_CUSTOM));
@@ -98,7 +98,7 @@ bool PositionAndSizeHelper::moveObject( ObjectType eObjectType
xObjectProp->setPropertyValue( "RelativeSize", uno::Any(aRelativeSize) );
}
- else if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType)
+ else if(eObjectType==OBJECTTYPE_DIAGRAM || eObjectType==OBJECTTYPE_DIAGRAM_WALL || eObjectType==OBJECTTYPE_DIAGRAM_FLOOR)
{
//@todo decide whether x is primary or secondary
@@ -136,7 +136,7 @@ bool PositionAndSizeHelper::moveObject( const OUString& rObjectCID
uno::Reference< beans::XPropertySet > xObjectProp = ObjectIdentifier::getObjectPropertySet( rObjectCID, xChartModel );
ObjectType eObjectType( ObjectIdentifier::getObjectType( rObjectCID ) );
- if(OBJECTTYPE_DIAGRAM==eObjectType || OBJECTTYPE_DIAGRAM_WALL==eObjectType || OBJECTTYPE_DIAGRAM_FLOOR==eObjectType)
+ if(eObjectType==OBJECTTYPE_DIAGRAM || eObjectType==OBJECTTYPE_DIAGRAM_WALL || eObjectType==OBJECTTYPE_DIAGRAM_FLOOR)
{
xObjectProp.set( ObjectIdentifier::getDiagramForCID( rObjectCID, xChartModel ), uno::UNO_QUERY );
if(!xObjectProp.is())
diff --git a/chart2/source/controller/main/SelectionHelper.cxx b/chart2/source/controller/main/SelectionHelper.cxx
index b76a7bfa08ac..65b289edf48d 100644
--- a/chart2/source/controller/main/SelectionHelper.cxx
+++ b/chart2/source/controller/main/SelectionHelper.cxx
@@ -622,10 +622,10 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
OUString aName( lcl_getObjectName( pObj ) );
ObjectType eObjectType( ObjectIdentifier::getObjectType( aName ) );
- if( OBJECTTYPE_DATA_POINT == eObjectType
- || OBJECTTYPE_DATA_LABEL == eObjectType
- || OBJECTTYPE_LEGEND_ENTRY == eObjectType
- || OBJECTTYPE_AXIS_UNITLABEL == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_POINT
+ || eObjectType == OBJECTTYPE_DATA_LABEL
+ || eObjectType == OBJECTTYPE_LEGEND_ENTRY
+ || eObjectType == OBJECTTYPE_AXIS_UNITLABEL )
{
return false;
}
@@ -635,7 +635,7 @@ bool SelectionHelper::getMarkHandles( SdrHdlList& rHdlList )
while (aIterator.IsMore())
{
SdrObject* pSubObj = aIterator.Next();
- if( OBJECTTYPE_DATA_SERIES == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_SERIES )
{
OUString aSubName( lcl_getObjectName( pSubObj ) );
ObjectType eSubObjectType( ObjectIdentifier::getObjectType( aSubName ) );