summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-05-23 10:04:27 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-05-23 11:22:08 +0200
commit0b2f1292b3504b54e3799cd3d942365058360347 (patch)
treeb36fbf6339ae09d1d16cf8c23c7f46d0767c6dcc /chart2/source
parented5abacda979d05fa4328953662ea98e6afa3c51 (diff)
loplugin:comparisonwithconstant in chart2
Change-Id: I95787007b26cdcf0d5d1617ecd0e55d377b551d7 Reviewed-on: https://gerrit.libreoffice.org/37941 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx4
-rw-r--r--chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx2
-rw-r--r--chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx6
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx10
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx16
-rw-r--r--chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx4
-rw-r--r--chart2/source/controller/dialogs/ChartTypeDialogController.cxx8
-rw-r--r--chart2/source/controller/dialogs/ObjectNameProvider.cxx20
-rw-r--r--chart2/source/controller/dialogs/dlg_ObjectProperties.cxx22
-rw-r--r--chart2/source/controller/dialogs/res_DataLabel.cxx2
-rw-r--r--chart2/source/controller/dialogs/tp_AxisPositions.cxx8
-rw-r--r--chart2/source/controller/dialogs/tp_ChartType.cxx24
-rw-r--r--chart2/source/controller/dialogs/tp_Scale.cxx18
-rw-r--r--chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx10
-rw-r--r--chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx26
-rw-r--r--chart2/source/controller/itemsetwrapper/ItemConverter.cxx2
-rw-r--r--chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx4
-rw-r--r--chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx26
-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
-rw-r--r--chart2/source/model/main/ChartModel.cxx4
-rw-r--r--chart2/source/model/main/Diagram.cxx14
-rw-r--r--chart2/source/model/template/ChartTypeTemplate.cxx2
-rw-r--r--chart2/source/tools/AxisHelper.cxx6
-rw-r--r--chart2/source/tools/ChartModelHelper.cxx2
-rw-r--r--chart2/source/tools/ChartTypeHelper.cxx10
-rw-r--r--chart2/source/tools/LinePropertiesHelper.cxx4
-rw-r--r--chart2/source/tools/ObjectIdentifier.cxx4
-rw-r--r--chart2/source/tools/RangeHighlighter.cxx22
-rw-r--r--chart2/source/tools/ThreeDHelper.cxx2
-rw-r--r--chart2/source/view/axes/DateScaling.cxx4
-rw-r--r--chart2/source/view/axes/ScaleAutomatism.cxx4
-rw-r--r--chart2/source/view/axes/Tickmarks.cxx6
-rw-r--r--chart2/source/view/axes/VAxisBase.cxx8
-rw-r--r--chart2/source/view/axes/VAxisProperties.cxx16
-rw-r--r--chart2/source/view/axes/VCartesianAxis.cxx44
-rw-r--r--chart2/source/view/axes/VCartesianCoordinateSystem.cxx8
-rw-r--r--chart2/source/view/axes/VCartesianGrid.cxx26
-rw-r--r--chart2/source/view/axes/VCoordinateSystem.cxx22
-rw-r--r--chart2/source/view/axes/VPolarAxis.cxx4
-rw-r--r--chart2/source/view/axes/VPolarCoordinateSystem.cxx6
-rw-r--r--chart2/source/view/axes/VPolarGrid.cxx2
-rw-r--r--chart2/source/view/charttypes/AreaChart.cxx18
-rw-r--r--chart2/source/view/charttypes/BarChart.cxx20
-rw-r--r--chart2/source/view/charttypes/BubbleChart.cxx2
-rw-r--r--chart2/source/view/charttypes/NetChart.cxx2
-rw-r--r--chart2/source/view/charttypes/PieChart.cxx4
-rw-r--r--chart2/source/view/charttypes/VSeriesPlotter.cxx34
-rw-r--r--chart2/source/view/diagram/VDiagram.cxx14
-rw-r--r--chart2/source/view/main/ChartView.cxx22
-rw-r--r--chart2/source/view/main/DummyXShape.cxx4
-rw-r--r--chart2/source/view/main/GL3DRenderer.cxx4
-rw-r--r--chart2/source/view/main/LabelPositionHelper.cxx8
-rw-r--r--chart2/source/view/main/PlottingPositionHelper.cxx26
-rw-r--r--chart2/source/view/main/PolarLabelPositionHelper.cxx2
-rw-r--r--chart2/source/view/main/VLineProperties.cxx2
62 files changed, 350 insertions, 350 deletions
diff --git a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
index 904ec57ce11c..4770c8d1dbf6 100644
--- a/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
+++ b/chart2/source/controller/chartapiwrapper/Chart2ModelContact.cxx
@@ -197,7 +197,7 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleIncludingAxes() const
awt::Rectangle aRect(0,0,0,0);
uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) );
- if( DiagramPositioningMode_INCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram ) )
+ if( DiagramHelper::getDiagramPositioningMode( xDiagram ) == DiagramPositioningMode_INCLUDING )
aRect = DiagramHelper::getDiagramRectangleFromModel(m_xChartModel);
else
{
@@ -213,7 +213,7 @@ awt::Rectangle Chart2ModelContact::GetDiagramRectangleExcludingAxes() const
awt::Rectangle aRect(0,0,0,0);
uno::Reference< XDiagram > xDiagram( ChartModelHelper::findDiagram( m_xChartModel ) );
- if( DiagramPositioningMode_EXCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram ) )
+ if( DiagramHelper::getDiagramPositioningMode( xDiagram ) == DiagramPositioningMode_EXCLUDING )
aRect = DiagramHelper::getDiagramRectangleFromModel(m_xChartModel);
else
{
diff --git a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
index 4493a48c647d..36b3ea04246a 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDataWrapper.cxx
@@ -547,7 +547,7 @@ double SAL_CALL ChartDataWrapper::getNotANumber()
sal_Bool SAL_CALL ChartDataWrapper::isNotANumber( double nNumber )
{
- return DBL_MIN == nNumber
+ return nNumber == DBL_MIN
|| ::rtl::math::isNan( nNumber )
|| ::rtl::math::isInf( nNumber );
}
diff --git a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
index c1614607ef00..67f3c256e549 100644
--- a/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/DiagramWrapper.cxx
@@ -870,13 +870,13 @@ Reference< XAxis > SAL_CALL DiagramWrapper::getAxis( sal_Int32 nDimensionIndex )
m_xXAxis = new AxisWrapper( AxisWrapper::X_AXIS, m_spChart2ModelContact );
xAxis = m_xXAxis;
}
- else if(1==nDimensionIndex)
+ else if(nDimensionIndex==1)
{
if( !m_xYAxis.is() )
m_xYAxis = new AxisWrapper( AxisWrapper::Y_AXIS, m_spChart2ModelContact );
xAxis = m_xYAxis;
}
- else if(2==nDimensionIndex)
+ else if(nDimensionIndex==2)
{
if( !m_xZAxis.is() )
m_xZAxis = new AxisWrapper( AxisWrapper::Z_AXIS, m_spChart2ModelContact );
@@ -894,7 +894,7 @@ Reference< XAxis > SAL_CALL DiagramWrapper::getSecondaryAxis( sal_Int32 nDimensi
m_xSecondXAxis = new AxisWrapper( AxisWrapper::SECOND_X_AXIS, m_spChart2ModelContact );
xAxis = m_xSecondXAxis;
}
- else if(1==nDimensionIndex)
+ else if(nDimensionIndex==1)
{
if( !m_xSecondYAxis.is() )
m_xSecondYAxis = new AxisWrapper( AxisWrapper::SECOND_Y_AXIS, m_spChart2ModelContact );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
index 6884f4e8e7c5..c7cc2cf856da 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedScaleProperty.cxx
@@ -267,19 +267,19 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
sal_Int32 nType = 0;
if( (rOuterValue >>= nType) )
{
- if( css::chart::ChartAxisType::AUTOMATIC == nType )
+ if( nType == css::chart::ChartAxisType::AUTOMATIC )
{
aScaleData.AutoDateAxis = true;
if( aScaleData.AxisType == AxisType::DATE )
aScaleData.AxisType = AxisType::CATEGORY;
}
- else if( css::chart::ChartAxisType::CATEGORY == nType )
+ else if( nType == css::chart::ChartAxisType::CATEGORY )
{
aScaleData.AutoDateAxis = false;
if( aScaleData.AxisType == AxisType::DATE )
aScaleData.AxisType = AxisType::CATEGORY;
}
- else if( css::chart::ChartAxisType::DATE == nType )
+ else if( nType == css::chart::ChartAxisType::DATE )
{
if( aScaleData.AxisType == AxisType::CATEGORY )
aScaleData.AxisType = AxisType::DATE;
@@ -321,7 +321,7 @@ void WrappedScaleProperty::setPropertyValue( tScaleProperty eScaleProperty, cons
{
if( rOuterValue >>= bBool )
{
- bool bWasReverse = ( AxisOrientation_REVERSE == aScaleData.Orientation );
+ bool bWasReverse = ( aScaleData.Orientation == AxisOrientation_REVERSE );
if( (!bBool) != (!bWasReverse) ) // safe comparison between sal_Bool and bool
{
aScaleData.Orientation = bBool ? AxisOrientation_REVERSE : AxisOrientation_MATHEMATICAL;
@@ -566,7 +566,7 @@ Any WrappedScaleProperty::getPropertyValue( tScaleProperty eScaleProperty, const
}
case SCALE_PROP_REVERSEDIRECTION:
{
- aRet <<= AxisOrientation_REVERSE == aScaleData.Orientation;
+ aRet <<= aScaleData.Orientation == AxisOrientation_REVERSE;
break;
}
default:
diff --git a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
index 16070e58d628..9e6a617948b0 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedStatisticProperties.cxx
@@ -227,7 +227,7 @@ double WrappedConstantErrorLowProperty::getValueFromSeries( const Reference< bea
uno::Reference< beans::XPropertySet > xErrorBarProperties;
if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
{
- if( css::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE )
xErrorBarProperties->getPropertyValue( "NegativeError" ) >>= aRet;
else
m_aOuterValue >>= aRet;
@@ -241,7 +241,7 @@ void WrappedConstantErrorLowProperty::setValueToSeries( const Reference< beans::
if( xErrorBarProperties.is() )
{
m_aOuterValue <<= aNewValue;
- if( css::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE )
{
xErrorBarProperties->setPropertyValue( "NegativeError", m_aOuterValue );
}
@@ -277,7 +277,7 @@ double WrappedConstantErrorHighProperty::getValueFromSeries( const Reference< be
uno::Reference< beans::XPropertySet > xErrorBarProperties;
if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
{
- if( css::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE )
xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet;
else
m_aOuterValue >>= aRet;
@@ -291,7 +291,7 @@ void WrappedConstantErrorHighProperty::setValueToSeries( const Reference< beans:
if( xErrorBarProperties.is() )
{
m_aOuterValue <<= aNewValue;
- if( css::chart::ErrorBarStyle::ABSOLUTE == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ABSOLUTE )
{
xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
}
@@ -461,7 +461,7 @@ double WrappedPercentageErrorProperty::getValueFromSeries( const Reference< bean
uno::Reference< beans::XPropertySet > xErrorBarProperties;
if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
{
- if( css::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::RELATIVE )
xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet;
else
m_aOuterValue >>= aRet;
@@ -474,7 +474,7 @@ void WrappedPercentageErrorProperty::setValueToSeries( const Reference< beans::X
if( xErrorBarProperties.is() )
{
m_aOuterValue <<= aNewValue;
- if( css::chart::ErrorBarStyle::RELATIVE == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::RELATIVE )
{
xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue );
@@ -511,7 +511,7 @@ double WrappedErrorMarginProperty::getValueFromSeries( const Reference< beans::X
uno::Reference< beans::XPropertySet > xErrorBarProperties;
if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue( CHART_UNONAME_ERRORBAR_Y ) >>= xErrorBarProperties ) && xErrorBarProperties.is())
{
- if( css::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ERROR_MARGIN )
xErrorBarProperties->getPropertyValue( "PositiveError" ) >>= aRet;
else
m_aOuterValue >>= aRet;
@@ -524,7 +524,7 @@ void WrappedErrorMarginProperty::setValueToSeries( const Reference< beans::XProp
if( xErrorBarProperties.is() )
{
m_aOuterValue <<= aNewValue;
- if( css::chart::ErrorBarStyle::ERROR_MARGIN == lcl_getErrorBarStyle( xErrorBarProperties ) )
+ if( lcl_getErrorBarStyle( xErrorBarProperties ) == css::chart::ErrorBarStyle::ERROR_MARGIN )
{
xErrorBarProperties->setPropertyValue( "PositiveError" , m_aOuterValue );
xErrorBarProperties->setPropertyValue( "NegativeError" , m_aOuterValue );
diff --git a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
index f8bbbffda161..ec1683ba8038 100644
--- a/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
+++ b/chart2/source/controller/chartapiwrapper/WrappedSymbolProperties.cxx
@@ -252,7 +252,7 @@ Any WrappedSymbolTypeProperty::getPropertyValue( const Reference< beans::XProper
}
else
{
- if( css::chart::ChartSymbolType::NONE == aValue )
+ if( aValue == css::chart::ChartSymbolType::NONE )
m_aOuterValue <<= css::chart::ChartSymbolType::NONE;
else
m_aOuterValue <<= css::chart::ChartSymbolType::AUTO;
@@ -456,7 +456,7 @@ beans::PropertyState WrappedSymbolSizeProperty::getPropertyState( const Referenc
Reference< beans::XPropertySet > xSeriesPropertySet( xInnerPropertyState, uno::UNO_QUERY );
if( xSeriesPropertySet.is() && ( xSeriesPropertySet->getPropertyValue("Symbol") >>= aSymbol ))
{
- if( chart2::SymbolStyle_NONE != aSymbol.Style )
+ if( aSymbol.Style != chart2::SymbolStyle_NONE )
return beans::PropertyState_DIRECT_VALUE;
}
}
diff --git a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
index a61299c1e46b..6bf6c25ef928 100644
--- a/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
+++ b/chart2/source/controller/dialogs/ChartTypeDialogController.cxx
@@ -679,7 +679,7 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C
{
case CurveStyle_CUBIC_SPLINES:
case CurveStyle_B_SPLINES:
- if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode )
+ if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
{
rSubTypeList.InsertItem(1, Image(BitmapEx(BMP_POINTS_XCATEGORY)));
rSubTypeList.InsertItem(2, Image(BitmapEx(BMP_LINE_P_XCATEGORY_SMOOTH)));
@@ -698,7 +698,7 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C
case CurveStyle_STEP_END:
case CurveStyle_STEP_CENTER_X:
case CurveStyle_STEP_CENTER_Y:
- if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode )
+ if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
{
rSubTypeList.InsertItem(1, Image(BitmapEx(BMP_POINTS_XCATEGORY)));
rSubTypeList.InsertItem(2, Image(BitmapEx(BMP_LINE_P_XCATEGORY_STEPPED)));
@@ -715,7 +715,7 @@ void LineChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const C
break;
default: // includes CurveStyle_LINES
//direct lines
- if( GlobalStackMode_NONE == rParameter.eStackMode || GlobalStackMode_STACK_Z == rParameter.eStackMode )
+ if( rParameter.eStackMode == GlobalStackMode_NONE || rParameter.eStackMode == GlobalStackMode_STACK_Z )
{
rSubTypeList.InsertItem(1, Image(BitmapEx(BMP_POINTS_XCATEGORY)));
rSubTypeList.InsertItem(2, Image(BitmapEx(BMP_LINE_P_XCATEGORY)));
@@ -1025,7 +1025,7 @@ void NetChartDialogController::fillSubTypeList( ValueSet& rSubTypeList, const Ch
{
rSubTypeList.Clear();
- if( GlobalStackMode_NONE == rParameter.eStackMode )
+ if( rParameter.eStackMode == GlobalStackMode_NONE )
{
rSubTypeList.InsertItem(1, Image(BitmapEx(BMP_NET_SYMB)));
rSubTypeList.InsertItem(2, Image(BitmapEx(BMP_NET_LINESYMB)));
diff --git a/chart2/source/controller/dialogs/ObjectNameProvider.cxx b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
index 009e81dc53eb..6ea99ad1f155 100644
--- a/chart2/source/controller/dialogs/ObjectNameProvider.cxx
+++ b/chart2/source/controller/dialogs/ObjectNameProvider.cxx
@@ -467,24 +467,24 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
{
OUString aRet;
ObjectType eObjectType( ObjectIdentifier::getObjectType(rObjectCID) );
- if( OBJECTTYPE_AXIS == eObjectType )
+ if( eObjectType == OBJECTTYPE_AXIS )
{
aRet=ObjectNameProvider::getAxisName( rObjectCID, xChartModel );
}
- else if( OBJECTTYPE_GRID == eObjectType
- || OBJECTTYPE_SUBGRID == eObjectType )
+ else if( eObjectType == OBJECTTYPE_GRID
+ || eObjectType == OBJECTTYPE_SUBGRID )
{
aRet=ObjectNameProvider::getGridName( rObjectCID, xChartModel );
}
- else if( OBJECTTYPE_TITLE == eObjectType )
+ else if( eObjectType == OBJECTTYPE_TITLE )
{
aRet=ObjectNameProvider::getTitleName( rObjectCID, xChartModel );
}
- else if( OBJECTTYPE_DATA_SERIES == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_SERIES )
{
aRet = lcl_getFullSeriesName( rObjectCID, xChartModel );
}
- else if( OBJECTTYPE_DATA_POINT == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_POINT )
{
if( bVerbose )
{
@@ -543,7 +543,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
aRet = aRet.replaceAt( nIndex, aWildcard.getLength(), lcl_getDataSeriesName( rObjectCID, xChartModel ) );
}
}
- else if( OBJECTTYPE_DATA_CURVE == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_CURVE )
{
if( bVerbose )
{
@@ -649,7 +649,7 @@ OUString ObjectNameProvider::getHelpText( const OUString& rObjectCID, const Refe
}
}
}
- else if( OBJECTTYPE_DATA_AVERAGE_LINE == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_AVERAGE_LINE )
{
if( bVerbose )
{
@@ -721,7 +721,7 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
ObjectType eObjectType( ObjectIdentifier::getObjectType(rObjectCID) );
Reference< frame::XModel > xChartModel( xChartDocument, uno::UNO_QUERY );
- if( OBJECTTYPE_DATA_POINT == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_POINT )
{
aRet = SchResId( STR_STATUS_DATAPOINT_MARKED );
@@ -755,7 +755,7 @@ OUString ObjectNameProvider::getSelectedObjectText( const OUString & rObjectCID,
else
{
// use the verbose text including the formula for trend lines
- const bool bVerbose( OBJECTTYPE_DATA_CURVE == eObjectType || OBJECTTYPE_DATA_AVERAGE_LINE == eObjectType );
+ const bool bVerbose( eObjectType == OBJECTTYPE_DATA_CURVE || eObjectType == OBJECTTYPE_DATA_AVERAGE_LINE );
const OUString aHelpText( getHelpText( rObjectCID, xChartModel, bVerbose ));
if( !aHelpText.isEmpty())
{
diff --git a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
index 6d7f1b729f88..b1880afb25b4 100644
--- a/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
+++ b/chart2/source/controller/dialogs/dlg_ObjectProperties.cxx
@@ -118,8 +118,8 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
uno::Reference< XChartType > xChartType = ChartModelHelper::getChartTypeOfSeries( xChartModel, xSeries );
sal_Int32 nDimensionCount = DiagramHelper::getDimension( xDiagram );
- bool bHasSeriesProperties = (OBJECTTYPE_DATA_SERIES==m_eObjectType);
- bool bHasDataPointproperties = (OBJECTTYPE_DATA_POINT==m_eObjectType);
+ bool bHasSeriesProperties = (m_eObjectType==OBJECTTYPE_DATA_SERIES);
+ bool bHasDataPointproperties = (m_eObjectType==OBJECTTYPE_DATA_POINT);
if( bHasSeriesProperties || bHasDataPointproperties )
{
@@ -145,7 +145,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
m_eObjectType == OBJECTTYPE_DATA_ERRORS_Z)
m_bHasStatisticProperties = true;
- if( OBJECTTYPE_AXIS == m_eObjectType )
+ if( m_eObjectType == OBJECTTYPE_AXIS )
{
//show scale properties only for a single axis not for multiselection
m_bHasScaleProperties = !m_bAffectsMultipleObjects;
@@ -157,9 +157,9 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
{
//no scale page for series axis
ScaleData aData( xAxis->getScaleData() );
- if( chart2::AxisType::SERIES == aData.AxisType )
+ if( aData.AxisType == chart2::AxisType::SERIES )
m_bHasScaleProperties = false;
- if( chart2::AxisType::SERIES != aData.AxisType )
+ if( aData.AxisType != chart2::AxisType::SERIES )
m_bHasNumberProperties = true;
sal_Int32 nCooSysIndex=0;
@@ -172,7 +172,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
m_bSupportingAxisPositioning = ChartTypeHelper::isSupportingAxisPositioning( xChartType, nDimensionCount, nDimensionIndex );
//show axis origin only for secondary y axis
- if( 1==nDimensionIndex && 1==nAxisIndex && ChartTypeHelper::isSupportingBaseValue( xChartType ) )
+ if( nDimensionIndex==1 && nAxisIndex==1 && ChartTypeHelper::isSupportingBaseValue( xChartType ) )
m_bShowAxisOrigin = true;
}
@@ -182,7 +182,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
if( xCrossingMainAxis.is() )
{
ScaleData aScale( xCrossingMainAxis->getScaleData() );
- m_bIsCrossingAxisIsCategoryAxis = ( chart2::AxisType::CATEGORY == aScale.AxisType );
+ m_bIsCrossingAxisIsCategoryAxis = ( aScale.AxisType == chart2::AxisType::CATEGORY );
if( m_bIsCrossingAxisIsCategoryAxis )
{
ChartModel* pModel = dynamic_cast<ChartModel*>(xChartModel.get());
@@ -208,7 +208,7 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
m_bCanAxisLabelsBeStaggered = nDimensionCount==2;
}
- if( OBJECTTYPE_DATA_CURVE == m_eObjectType )
+ if( m_eObjectType == OBJECTTYPE_DATA_CURVE )
{
uno::Reference< data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
Sequence< Reference< data::XLabeledDataSequence > > aDataSeqs( xSource->getDataSequences());
@@ -266,15 +266,15 @@ void ObjectPropertiesDialogParameter::init( const uno::Reference< frame::XModel
//create gui name for this object
{
- if( !m_bAffectsMultipleObjects && OBJECTTYPE_AXIS == m_eObjectType )
+ if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_AXIS )
{
m_aLocalizedName = ObjectNameProvider::getAxisName( m_aObjectCID, xChartModel );
}
- else if( !m_bAffectsMultipleObjects && ( OBJECTTYPE_GRID == m_eObjectType || OBJECTTYPE_SUBGRID == m_eObjectType ) )
+ else if( !m_bAffectsMultipleObjects && ( m_eObjectType == OBJECTTYPE_GRID || m_eObjectType == OBJECTTYPE_SUBGRID ) )
{
m_aLocalizedName = ObjectNameProvider::getGridName( m_aObjectCID, xChartModel );
}
- else if( !m_bAffectsMultipleObjects && OBJECTTYPE_TITLE == m_eObjectType )
+ else if( !m_bAffectsMultipleObjects && m_eObjectType == OBJECTTYPE_TITLE )
{
m_aLocalizedName = ObjectNameProvider::getTitleName( m_aObjectCID, xChartModel );
}
diff --git a/chart2/source/controller/dialogs/res_DataLabel.cxx b/chart2/source/controller/dialogs/res_DataLabel.cxx
index a132ddf27e40..c75d8c4808c1 100644
--- a/chart2/source/controller/dialogs/res_DataLabel.cxx
+++ b/chart2/source/controller/dialogs/res_DataLabel.cxx
@@ -208,7 +208,7 @@ IMPL_LINK( DataLabelResources, NumberFormatDialogHdl, Button *, pButton, void )
ScopedVclPtrInstance< NumberFormatDialog > aDlg(m_pWindow, aNumberSet);
if( bPercent )
aDlg->SetText( m_pFT_NumberFormatForPercent->GetText());
- if( RET_OK == aDlg->Execute() )
+ if( aDlg->Execute() == RET_OK )
{
const SfxItemSet* pResult = aDlg->GetOutputItemSet();
if( pResult )
diff --git a/chart2/source/controller/dialogs/tp_AxisPositions.cxx b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
index 6cee0064cb18..76d86aeb7eec 100644
--- a/chart2/source/controller/dialogs/tp_AxisPositions.cxx
+++ b/chart2/source/controller/dialogs/tp_AxisPositions.cxx
@@ -118,7 +118,7 @@ bool AxisPositionsTabPage::FillItemSet(SfxItemSet* rOutAttrs)
// axis line
sal_Int32 nPos = m_pLB_CrossesAt->GetSelectEntryPos();
rOutAttrs->Put( SfxInt32Item( SCHATTR_AXIS_POSITION, nPos+1 ));
- if( 2==nPos )
+ if( nPos==2 )
{
double fCrossover = m_pED_CrossesAt->GetValue();
if( m_bCrossingAxisIsCategoryAxis )
@@ -316,12 +316,12 @@ void AxisPositionsTabPage::SupportAxisPositioning( bool bSupportAxisPositioning
IMPL_LINK_NOARG(AxisPositionsTabPage, CrossesAtSelectHdl, ListBox&, void)
{
sal_Int32 nPos = m_pLB_CrossesAt->GetSelectEntryPos();
- m_pED_CrossesAt->Show( (2==nPos) && !m_bCrossingAxisIsCategoryAxis );
- m_pED_CrossesAtCategory->Show( (2==nPos) && m_bCrossingAxisIsCategoryAxis );
+ m_pED_CrossesAt->Show( (nPos==2) && !m_bCrossingAxisIsCategoryAxis );
+ m_pED_CrossesAtCategory->Show( (nPos==2) && m_bCrossingAxisIsCategoryAxis );
if( m_pED_CrossesAt->GetText().isEmpty() )
m_pED_CrossesAt->SetValue(0.0);
- if( 0 == m_pED_CrossesAtCategory->GetSelectEntryCount() )
+ if( m_pED_CrossesAtCategory->GetSelectEntryCount() == 0 )
m_pED_CrossesAtCategory->SelectEntryPos(0);
PlaceLabelsSelectHdl( *m_pLB_PlaceLabels );
diff --git a/chart2/source/controller/dialogs/tp_ChartType.cxx b/chart2/source/controller/dialogs/tp_ChartType.cxx
index 3e33b264ae97..eca76e57e280 100644
--- a/chart2/source/controller/dialogs/tp_ChartType.cxx
+++ b/chart2/source/controller/dialogs/tp_ChartType.cxx
@@ -96,9 +96,9 @@ void Dim3DLookResourceGroup::fillParameter( ChartTypeParameter& rParameter )
{
rParameter.b3DLook = m_pCB_3DLook->IsChecked();
const sal_Int32 nPos = m_pLB_Scheme->GetSelectEntryPos();
- if( POS_3DSCHEME_SIMPLE == nPos )
+ if( nPos == POS_3DSCHEME_SIMPLE )
rParameter.eThreeDLookScheme = ThreeDLookScheme_Simple;
- else if( POS_3DSCHEME_REALISTIC == nPos )
+ else if( nPos == POS_3DSCHEME_REALISTIC )
rParameter.eThreeDLookScheme = ThreeDLookScheme_Realistic;
else
rParameter.eThreeDLookScheme = ThreeDLookScheme_Unknown;
@@ -370,16 +370,16 @@ void SplinePropertiesDialog::fillControls( const ChartTypeParameter& rParameter
m_pMF_SplineResolution->SetValue( rParameter.nCurveResolution );
//dis/enabling
- m_pFT_SplineOrder->Enable(B_SPLINE_POS == m_pLB_Spline_Type->GetSelectEntryPos());
- m_pMF_SplineOrder->Enable(B_SPLINE_POS == m_pLB_Spline_Type->GetSelectEntryPos());
+ m_pFT_SplineOrder->Enable(m_pLB_Spline_Type->GetSelectEntryPos() == B_SPLINE_POS);
+ m_pMF_SplineOrder->Enable(m_pLB_Spline_Type->GetSelectEntryPos() == B_SPLINE_POS);
}
void SplinePropertiesDialog::fillParameter( ChartTypeParameter& rParameter, bool bSmoothLines )
{
if(!bSmoothLines)
rParameter.eCurveStyle=CurveStyle_LINES;
- else if(CUBIC_SPLINE_POS == m_pLB_Spline_Type->GetSelectEntryPos())
+ else if(m_pLB_Spline_Type->GetSelectEntryPos() == CUBIC_SPLINE_POS)
rParameter.eCurveStyle=CurveStyle_CUBIC_SPLINES;
- else if(B_SPLINE_POS == m_pLB_Spline_Type->GetSelectEntryPos())
+ else if(m_pLB_Spline_Type->GetSelectEntryPos() == B_SPLINE_POS)
rParameter.eCurveStyle=CurveStyle_B_SPLINES;
rParameter.nCurveResolution = static_cast< sal_Int32 >( m_pMF_SplineResolution->GetValue());
@@ -387,8 +387,8 @@ void SplinePropertiesDialog::fillParameter( ChartTypeParameter& rParameter, bool
}
IMPL_LINK_NOARG(SplinePropertiesDialog, SplineTypeListBoxHdl, ListBox&, void)
{
- m_pFT_SplineOrder->Enable(B_SPLINE_POS == m_pLB_Spline_Type->GetSelectEntryPos());
- m_pMF_SplineOrder->Enable(B_SPLINE_POS == m_pLB_Spline_Type->GetSelectEntryPos());
+ m_pFT_SplineOrder->Enable(m_pLB_Spline_Type->GetSelectEntryPos() == B_SPLINE_POS);
+ m_pMF_SplineOrder->Enable(m_pLB_Spline_Type->GetSelectEntryPos() == B_SPLINE_POS);
}
class SteppedPropertiesDialog : public ModalDialog
@@ -577,11 +577,11 @@ IMPL_LINK_NOARG(SplineResourceGroup, SplineDetailsDialogHdl, Button*, void)
{
ChartTypeParameter aOldParameter;
- getSplinePropertiesDialog().fillParameter( aOldParameter, POS_LINETYPE_SMOOTH == m_pLB_LineType->GetSelectEntryPos() );
+ getSplinePropertiesDialog().fillParameter( aOldParameter, m_pLB_LineType->GetSelectEntryPos() == POS_LINETYPE_SMOOTH );
const sal_Int32 iOldLineTypePos = m_pLB_LineType->GetSelectEntryPos();
m_pLB_LineType->SelectEntryPos(POS_LINETYPE_SMOOTH);
- if( RET_OK == getSplinePropertiesDialog().Execute() )
+ if( getSplinePropertiesDialog().Execute() == RET_OK )
{
if( m_pChangeListener )
m_pChangeListener->stateChanged(this);
@@ -597,11 +597,11 @@ IMPL_LINK_NOARG(SplineResourceGroup, SteppedDetailsDialogHdl, Button*, void)
{
ChartTypeParameter aOldParameter;
- getSteppedPropertiesDialog().fillParameter( aOldParameter, POS_LINETYPE_STEPPED == m_pLB_LineType->GetSelectEntryPos() );
+ getSteppedPropertiesDialog().fillParameter( aOldParameter, m_pLB_LineType->GetSelectEntryPos() == POS_LINETYPE_STEPPED );
const sal_Int32 iOldLineTypePos = m_pLB_LineType->GetSelectEntryPos();
m_pLB_LineType->SelectEntryPos(POS_LINETYPE_STEPPED);
- if( RET_OK == getSteppedPropertiesDialog().Execute() )
+ if( getSteppedPropertiesDialog().Execute() == RET_OK )
{
if( m_pChangeListener )
m_pChangeListener->stateChanged(this);
diff --git a/chart2/source/controller/dialogs/tp_Scale.cxx b/chart2/source/controller/dialogs/tp_Scale.cxx
index dcf330395374..d16c5f3de50c 100644
--- a/chart2/source/controller/dialogs/tp_Scale.cxx
+++ b/chart2/source/controller/dialogs/tp_Scale.cxx
@@ -166,10 +166,10 @@ IMPL_STATIC_LINK(
void ScaleTabPage::EnableControls()
{
- bool bValueAxis = chart2::AxisType::REALNUMBER == m_nAxisType
- || chart2::AxisType::PERCENT == m_nAxisType
- || chart2::AxisType::DATE == m_nAxisType;
- bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
+ bool bValueAxis = m_nAxisType == chart2::AxisType::REALNUMBER
+ || m_nAxisType == chart2::AxisType::PERCENT
+ || m_nAxisType == chart2::AxisType::DATE;
+ bool bDateAxis = m_nAxisType == chart2::AxisType::DATE;
m_pBxType->Show(m_bAllowDateAxis);
@@ -259,7 +259,7 @@ IMPL_LINK_NOARG(ScaleTabPage, SelectAxisTypeHdl, ListBox&, void)
m_nAxisType = chart2::AxisType::DATE;
else
m_nAxisType = chart2::AxisType::CATEGORY;
- if( chart2::AxisType::DATE == m_nAxisType )
+ if( m_nAxisType == chart2::AxisType::DATE )
m_pCbxLogarithm->Check(false);
EnableControls();
SetNumFormat();
@@ -276,7 +276,7 @@ bool ScaleTabPage::FillItemSet(SfxItemSet* rOutAttrs)
rOutAttrs->Put(SfxInt32Item(SCHATTR_AXISTYPE, m_nAxisType));
if(m_bAllowDateAxis)
- rOutAttrs->Put(SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS, TYPE_AUTO==m_pLB_AxisType->GetSelectEntryPos()));
+ rOutAttrs->Put(SfxBoolItem(SCHATTR_AXIS_AUTO_DATEAXIS, m_pLB_AxisType->GetSelectEntryPos()==TYPE_AUTO));
bool bAutoScale = false;
if( m_nAxisType==chart2::AxisType::CATEGORY )
@@ -419,7 +419,7 @@ DeactivateRC ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
return DeactivateRC::LeavePage;
}
- bool bDateAxis = chart2::AxisType::DATE == m_nAxisType;
+ bool bDateAxis = m_nAxisType == chart2::AxisType::DATE;
sal_uInt32 nMinMaxOriginFmt = m_pFmtFldMax->GetFormatKey();
if (pNumFormatter->GetType(nMinMaxOriginFmt) == css::util::NumberFormat::TEXT)
@@ -442,7 +442,7 @@ DeactivateRC ScaleTabPage::DeactivatePage(SfxItemSet* pItemSet)
m_nMainTimeUnit = m_pLB_MainTimeUnit->GetSelectEntryPos();
m_nHelpTimeUnit = m_pLB_HelpTimeUnit->GetSelectEntryPos();
- if( chart2::AxisType::REALNUMBER != m_nAxisType )
+ if( m_nAxisType != chart2::AxisType::REALNUMBER )
m_pCbxLogarithm->Show( false );
//check which entries need user action
@@ -584,7 +584,7 @@ void ScaleTabPage::SetNumFormat()
nFmt = pNumFormatter->GetStandardFormat( css::util::NumberFormat::TIME );
}
- if( chart2::AxisType::DATE == m_nAxisType && ( eType != css::util::NumberFormat::DATE && eType != css::util::NumberFormat::DATETIME) )
+ if( m_nAxisType == chart2::AxisType::DATE && ( eType != css::util::NumberFormat::DATE && eType != css::util::NumberFormat::DATETIME) )
{
const SvNumberformat* pFormat = pNumFormatter->GetEntry( nFmt );
if( pFormat )
diff --git a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
index 4ba0b751ed3d..629600d33625 100644
--- a/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/AxisItemConverter.cxx
@@ -168,9 +168,9 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
const chart2::IncrementData& rIncrement( rScale.IncrementData );
const uno::Sequence< chart2::SubIncrement >& rSubIncrements( rScale.IncrementData.SubIncrements );
const TimeIncrement& rTimeIncrement( rScale.TimeIncrement );
- bool bDateAxis = (chart2::AxisType::DATE == rScale.AxisType);
+ bool bDateAxis = (rScale.AxisType == chart2::AxisType::DATE);
if( m_pExplicitScale )
- bDateAxis = (chart2::AxisType::DATE == m_pExplicitScale->AxisType);
+ bDateAxis = (m_pExplicitScale->AxisType == chart2::AxisType::DATE);
switch( nWhichId )
{
@@ -214,7 +214,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
break;
case SCHATTR_AXIS_REVERSE:
- rOutItemSet.Put( SfxBoolItem( nWhichId, (AxisOrientation_REVERSE == rScale.Orientation) ));
+ rOutItemSet.Put( SfxBoolItem( nWhichId, (rScale.Orientation == AxisOrientation_REVERSE) ));
break;
// Increment
@@ -445,7 +445,7 @@ void AxisItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet & rOutI
bool lcl_isDateAxis( const SfxItemSet & rItemSet )
{
sal_Int32 nAxisType = static_cast< const SfxInt32Item & >( rItemSet.Get( SCHATTR_AXISTYPE )).GetValue();//css::chart2::AxisType
- return (chart2::AxisType::DATE == nAxisType);
+ return (nAxisType == chart2::AxisType::DATE);
}
bool lcl_isAutoMajor( const SfxItemSet & rItemSet )
@@ -552,7 +552,7 @@ bool AxisItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxItemSet
case SCHATTR_AXIS_REVERSE:
{
- bool bWasReverse = ( AxisOrientation_REVERSE == aScale.Orientation );
+ bool bWasReverse = ( aScale.Orientation == AxisOrientation_REVERSE );
bool bNewReverse = (static_cast< const SfxBoolItem & >(
rItemSet.Get( nWhichId )).GetValue() );
if( bWasReverse != bNewReverse )
diff --git a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
index 8f42dba588f6..92ad703e036e 100644
--- a/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/DataPointItemConverter.cxx
@@ -98,10 +98,10 @@ bool lcl_NumberFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxItemSe
bool bChanged = false;
if( !xPropertySet.is() )
return bChanged;
- OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_VALUE==nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" );
- sal_uInt16 nSourceWhich = (SID_ATTR_NUMBERFORMAT_VALUE==nWhichId) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
+ OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" );
+ sal_uInt16 nSourceWhich = (nWhichId==SID_ATTR_NUMBERFORMAT_VALUE) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
- if( SfxItemState::SET != rItemSet.GetItemState( nSourceWhich ) )
+ if( rItemSet.GetItemState( nSourceWhich ) != SfxItemState::SET )
return bChanged;
uno::Any aValue;
@@ -145,10 +145,10 @@ bool lcl_UseSourceFormatFromItemToPropertySet( sal_uInt16 nWhichId, const SfxIte
bool bChanged = false;
if( !xPropertySet.is() )
return bChanged;
- OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_SOURCE==nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" );
- sal_uInt16 nFormatWhich = (SID_ATTR_NUMBERFORMAT_SOURCE==nWhichId) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
+ OUString aPropertyName = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? OUString(CHART_UNONAME_NUMFMT) : OUString( "PercentageNumberFormat" );
+ sal_uInt16 nFormatWhich = (nWhichId==SID_ATTR_NUMBERFORMAT_SOURCE) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
- if( SfxItemState::SET != rItemSet.GetItemState( nWhichId ) )
+ if( rItemSet.GetItemState( nWhichId ) != SfxItemState::SET )
return bChanged;
uno::Any aNewValue;
@@ -232,7 +232,7 @@ DataPointItemConverter::DataPointItemConverter(
bool bSwapXAndY = DiagramHelper::getVertical( xDiagram, bFound, bAmbiguous );
m_aAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements( xChartType, DiagramHelper::getDimension( xDiagram ), bSwapXAndY, xSeries );
- m_bForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType( xChartType, 0 );
+ m_bForbidPercentValue = ChartTypeHelper::getAxisType( xChartType, 0 ) != AxisType::CATEGORY;
}
DataPointItemConverter::~DataPointItemConverter()
@@ -304,9 +304,9 @@ bool DataPointItemConverter::ApplySpecialItem(
chart2::DataPointLabel aLabel;
if( aOldValue >>= aLabel )
{
- sal_Bool& rValue = (SCHATTR_DATADESCR_SHOW_NUMBER==nWhichId) ? aLabel.ShowNumber : (
- (SCHATTR_DATADESCR_SHOW_PERCENTAGE==nWhichId) ? aLabel.ShowNumberInPercent : (
- (SCHATTR_DATADESCR_SHOW_CATEGORY==nWhichId) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol ));
+ sal_Bool& rValue = (nWhichId==SCHATTR_DATADESCR_SHOW_NUMBER) ? aLabel.ShowNumber : (
+ (nWhichId==SCHATTR_DATADESCR_SHOW_PERCENTAGE) ? aLabel.ShowNumberInPercent : (
+ (nWhichId==SCHATTR_DATADESCR_SHOW_CATEGORY) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol ));
bool bOldValue = rValue;
rValue = rItem.GetValue();
if( m_bOverwriteLabelsForAttributedDataPointsAlso )
@@ -558,9 +558,9 @@ void DataPointItemConverter::FillSpecialItem(
chart2::DataPointLabel aLabel;
if (GetPropertySet()->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel)
{
- bool bValue = (SCHATTR_DATADESCR_SHOW_NUMBER==nWhichId) ? aLabel.ShowNumber : (
- (SCHATTR_DATADESCR_SHOW_PERCENTAGE==nWhichId) ? aLabel.ShowNumberInPercent : (
- (SCHATTR_DATADESCR_SHOW_CATEGORY==nWhichId) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol ));
+ bool bValue = (nWhichId==SCHATTR_DATADESCR_SHOW_NUMBER) ? aLabel.ShowNumber : (
+ (nWhichId==SCHATTR_DATADESCR_SHOW_PERCENTAGE) ? aLabel.ShowNumberInPercent : (
+ (nWhichId==SCHATTR_DATADESCR_SHOW_CATEGORY) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol ));
rOutItemSet.Put( SfxBoolItem( nWhichId, bValue ));
diff --git a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
index a462d20cf88f..eb66209e1a73 100644
--- a/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ItemConverter.cxx
@@ -230,7 +230,7 @@ void ItemConverter::InvalidateUnequalItems( SfxItemSet &rDestSet, const SfxItem
{
if (rSourceSet.Get(nWhich) != rDestSet.Get(nWhich))
{
- if( SID_CHAR_DLG_PREVIEW_STRING != nWhich )
+ if( nWhich != SID_CHAR_DLG_PREVIEW_STRING )
{
rDestSet.InvalidateItem(nWhich);
}
diff --git a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
index 4ce6a9edc544..c09349484b9b 100644
--- a/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/SeriesOptionsItemConverter.cxx
@@ -206,11 +206,11 @@ bool SeriesOptionsItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const Sf
{
if( m_bSupportingOverlapAndGapWidthProperties )
{
- sal_Int32& rBarPosition = ( SCHATTR_BAR_OVERLAP == nWhichId ) ? m_nBarOverlap : m_nGapWidth;
+ sal_Int32& rBarPosition = ( nWhichId == SCHATTR_BAR_OVERLAP ) ? m_nBarOverlap : m_nGapWidth;
rBarPosition = static_cast< const SfxInt32Item & >( rItemSet.Get( nWhichId )).GetValue();
OUString aPropName("GapwidthSequence" );
- if( SCHATTR_BAR_OVERLAP == nWhichId )
+ if( nWhichId == SCHATTR_BAR_OVERLAP )
aPropName = "OverlapSequence";
uno::Reference< XDataSeries > xDataSeries( GetPropertySet(), uno::UNO_QUERY );
diff --git a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
index cda6691c67a6..3a20a3b9b800 100644
--- a/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/TextLabelItemConverter.cxx
@@ -90,10 +90,10 @@ bool numberFormatFromItemToPropertySet(
if (!xPropertySet.is())
return bChanged;
- OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_VALUE == nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
- sal_uInt16 nSourceWhich = (SID_ATTR_NUMBERFORMAT_VALUE == nWhichId) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
+ OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
+ sal_uInt16 nSourceWhich = (nWhichId == SID_ATTR_NUMBERFORMAT_VALUE) ? SID_ATTR_NUMBERFORMAT_SOURCE : SCHATTR_PERCENT_NUMBERFORMAT_SOURCE;
- if (SfxItemState::SET != rItemSet.GetItemState(nSourceWhich))
+ if (rItemSet.GetItemState(nSourceWhich) != SfxItemState::SET)
return bChanged;
uno::Any aValue;
@@ -138,10 +138,10 @@ bool useSourceFormatFromItemToPropertySet(
bool bChanged = false;
if (!xPropertySet.is())
return bChanged;
- OUString aPropertyName = (SID_ATTR_NUMBERFORMAT_SOURCE == nWhichId) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
- sal_uInt16 nFormatWhich = (SID_ATTR_NUMBERFORMAT_SOURCE == nWhichId) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
+ OUString aPropertyName = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? OUString(CHART_UNONAME_NUMFMT) : OUString("PercentageNumberFormat");
+ sal_uInt16 nFormatWhich = (nWhichId == SID_ATTR_NUMBERFORMAT_SOURCE) ? SID_ATTR_NUMBERFORMAT_VALUE : SCHATTR_PERCENT_NUMBERFORMAT_VALUE;
- if (SfxItemState::SET != rItemSet.GetItemState(nWhichId))
+ if (rItemSet.GetItemState(nWhichId) != SfxItemState::SET)
return bChanged;
uno::Any aNewValue;
@@ -204,7 +204,7 @@ TextLabelItemConverter::TextLabelItemConverter(
bool bSwapXAndY = DiagramHelper::getVertical(xDiagram, bFound, bAmbiguous);
maAvailableLabelPlacements = ChartTypeHelper::getSupportedLabelPlacements(xChartType, DiagramHelper::getDimension(xDiagram), bSwapXAndY, xSeries);
- mbForbidPercentValue = AxisType::CATEGORY != ChartTypeHelper::getAxisType(xChartType, 0);
+ mbForbidPercentValue = ChartTypeHelper::getAxisType(xChartType, 0) != AxisType::CATEGORY;
}
TextLabelItemConverter::~TextLabelItemConverter()
@@ -267,9 +267,9 @@ bool TextLabelItemConverter::ApplySpecialItem( sal_uInt16 nWhichId, const SfxIte
chart2::DataPointLabel aLabel;
if (aOldValue >>= aLabel)
{
- sal_Bool& rValue = (SCHATTR_DATADESCR_SHOW_NUMBER == nWhichId) ? aLabel.ShowNumber : (
- (SCHATTR_DATADESCR_SHOW_PERCENTAGE == nWhichId) ? aLabel.ShowNumberInPercent : (
- (SCHATTR_DATADESCR_SHOW_CATEGORY == nWhichId) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol));
+ sal_Bool& rValue = (nWhichId == SCHATTR_DATADESCR_SHOW_NUMBER) ? aLabel.ShowNumber : (
+ (nWhichId == SCHATTR_DATADESCR_SHOW_PERCENTAGE) ? aLabel.ShowNumberInPercent : (
+ (nWhichId == SCHATTR_DATADESCR_SHOW_CATEGORY) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol));
bool bOldValue = rValue;
rValue = rItem.GetValue();
if (mbDataSeries)
@@ -510,9 +510,9 @@ void TextLabelItemConverter::FillSpecialItem( sal_uInt16 nWhichId, SfxItemSet& r
chart2::DataPointLabel aLabel;
if (GetPropertySet()->getPropertyValue(CHART_UNONAME_LABEL) >>= aLabel)
{
- bool bValue = (SCHATTR_DATADESCR_SHOW_NUMBER == nWhichId) ? aLabel.ShowNumber : (
- (SCHATTR_DATADESCR_SHOW_PERCENTAGE == nWhichId) ? aLabel.ShowNumberInPercent : (
- (SCHATTR_DATADESCR_SHOW_CATEGORY == nWhichId) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol));
+ bool bValue = (nWhichId == SCHATTR_DATADESCR_SHOW_NUMBER) ? aLabel.ShowNumber : (
+ (nWhichId == SCHATTR_DATADESCR_SHOW_PERCENTAGE) ? aLabel.ShowNumberInPercent : (
+ (nWhichId == SCHATTR_DATADESCR_SHOW_CATEGORY) ? aLabel.ShowCategoryName : aLabel.ShowLegendSymbol));
rOutItemSet.Put(SfxBoolItem(nWhichId, bValue));
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 ) );
diff --git a/chart2/source/model/main/ChartModel.cxx b/chart2/source/model/main/ChartModel.cxx
index 48d38e832850..5a9921dddf56 100644
--- a/chart2/source/model/main/ChartModel.cxx
+++ b/chart2/source/model/main/ChartModel.cxx
@@ -1264,8 +1264,8 @@ Reference< util::XNumberFormatsSupplier > const & ChartModel::getNumberFormatsSu
// ____ XUnoTunnel ___
::sal_Int64 SAL_CALL ChartModel::getSomething( const Sequence< ::sal_Int8 >& aIdentifier )
{
- if( aIdentifier.getLength() == 16 && 0 == memcmp( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(),
- aIdentifier.getConstArray(), 16 ) )
+ if( aIdentifier.getLength() == 16 && memcmp( SvNumberFormatsSupplierObj::getUnoTunnelId().getConstArray(),
+ aIdentifier.getConstArray(), 16 ) == 0 )
{
Reference< lang::XUnoTunnel > xTunnel( getNumberFormatsSupplier(), uno::UNO_QUERY );
if( xTunnel.is() )
diff --git a/chart2/source/model/main/Diagram.cxx b/chart2/source/model/main/Diagram.cxx
index b55c8e690017..40a40cc75341 100644
--- a/chart2/source/model/main/Diagram.cxx
+++ b/chart2/source/model/main/Diagram.cxx
@@ -648,21 +648,21 @@ uno::Reference< beans::XPropertySetInfo > SAL_CALL Diagram::getPropertySetInfo()
void SAL_CALL Diagram::setFastPropertyValue( sal_Int32 nHandle, const Any& rValue )
{
//special treatment for some 3D properties
- if( PROP_DIAGRAM_PERSPECTIVE == nHandle )
+ if( nHandle == PROP_DIAGRAM_PERSPECTIVE )
{
sal_Int32 fPerspective = 20;
if( rValue >>=fPerspective )
ThreeDHelper::setCameraDistance( this, ThreeDHelper::PerspectiveToCameraDistance( fPerspective ) );
}
- else if( PROP_DIAGRAM_ROTATION_HORIZONTAL == nHandle
- || PROP_DIAGRAM_ROTATION_VERTICAL == nHandle )
+ else if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL
+ || nHandle == PROP_DIAGRAM_ROTATION_VERTICAL )
{
sal_Int32 nNewAngleDegree = 0;
if( rValue >>=nNewAngleDegree )
{
sal_Int32 nHorizontal, nVertical;
ThreeDHelper::getRotationFromDiagram( this, nHorizontal, nVertical );
- if( PROP_DIAGRAM_ROTATION_HORIZONTAL == nHandle )
+ if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL )
nHorizontal = nNewAngleDegree;
else
nVertical = nNewAngleDegree;
@@ -682,13 +682,13 @@ void SAL_CALL Diagram::getFastPropertyValue( Any& rValue, sal_Int32 nHandle ) co
ThreeDHelper::getCameraDistance( const_cast< Diagram* >( this ) ) ) );
rValue <<= nPerspective;
}
- else if( PROP_DIAGRAM_ROTATION_HORIZONTAL == nHandle
- || PROP_DIAGRAM_ROTATION_VERTICAL == nHandle )
+ else if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL
+ || nHandle == PROP_DIAGRAM_ROTATION_VERTICAL )
{
sal_Int32 nHorizontal, nVertical;
ThreeDHelper::getRotationFromDiagram( const_cast< Diagram* >( this ), nHorizontal, nVertical );
sal_Int32 nAngleDegree = 0;
- if( PROP_DIAGRAM_ROTATION_HORIZONTAL == nHandle )
+ if( nHandle == PROP_DIAGRAM_ROTATION_HORIZONTAL )
nAngleDegree = nHorizontal;
else
nAngleDegree = nVertical;
diff --git a/chart2/source/model/template/ChartTypeTemplate.cxx b/chart2/source/model/template/ChartTypeTemplate.cxx
index cc7b5b833145..f6039056aea4 100644
--- a/chart2/source/model/template/ChartTypeTemplate.cxx
+++ b/chart2/source/model/template/ChartTypeTemplate.cxx
@@ -441,7 +441,7 @@ void SAL_CALL ChartTypeTemplate::resetStyles( const Reference< chart2::XDiagram
Sequence< Reference< chart2::XAxis > > aAxisSeq( AxisHelper::getAllAxesOfDiagram( xDiagram ) );
for( sal_Int32 i=0; i<aAxisSeq.getLength(); ++i )
{
- if( 1== AxisHelper::getDimensionIndexOfAxis( aAxisSeq[i], xDiagram ) )
+ if( AxisHelper::getDimensionIndexOfAxis( aAxisSeq[i], xDiagram )== 1 )
{
Reference< beans::XPropertySet > xAxisProp( aAxisSeq[i], uno::UNO_QUERY );
if( xAxisProp.is())
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 26ea1979e991..0af1f26bb832 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -379,7 +379,7 @@ Reference< XAxis > AxisHelper::createAxis(
{
css::chart::ChartAxisPosition eMainAxisPos( css::chart::ChartAxisPosition_ZERO );
xMainProp->getPropertyValue("CrossoverPosition") >>= eMainAxisPos;
- if( css::chart::ChartAxisPosition_END == eMainAxisPos )
+ if( eMainAxisPos == css::chart::ChartAxisPosition_END )
eNewAxisPos = css::chart::ChartAxisPosition_START;
}
}
@@ -636,7 +636,7 @@ Reference< XAxis > AxisHelper::getCrossingMainAxis( const Reference< XAxis >& xA
sal_Int32 nDimensionIndex = 0;
sal_Int32 nAxisIndex = 0;
AxisHelper::getIndicesForAxis( xAxis, xCooSys, nDimensionIndex, nAxisIndex );
- if( 2==nDimensionIndex )
+ if( nDimensionIndex==2 )
{
nDimensionIndex=1;
bool bSwapXY = false;
@@ -644,7 +644,7 @@ Reference< XAxis > AxisHelper::getCrossingMainAxis( const Reference< XAxis >& xA
if( xCooSysProp.is() && (xCooSysProp->getPropertyValue( "SwapXAndYAxis" ) >>= bSwapXY) && bSwapXY )
nDimensionIndex=0;
}
- else if( 1==nDimensionIndex )
+ else if( nDimensionIndex==1 )
nDimensionIndex=0;
else
nDimensionIndex=1;
diff --git a/chart2/source/tools/ChartModelHelper.cxx b/chart2/source/tools/ChartModelHelper.cxx
index 9928f41e5d75..d21c1e59283a 100644
--- a/chart2/source/tools/ChartModelHelper.cxx
+++ b/chart2/source/tools/ChartModelHelper.cxx
@@ -73,7 +73,7 @@ uno::Reference< chart2::data::XDataProvider > ChartModelHelper::createInternalDa
xProp->getPropertyValue( "DataRowSource" ) >>= aDataRowSource;
- bDefaultDataInColumns = (css::chart::ChartDataRowSource_COLUMNS == aDataRowSource);
+ bDefaultDataInColumns = (aDataRowSource == css::chart::ChartDataRowSource_COLUMNS);
}
}
}
diff --git a/chart2/source/tools/ChartTypeHelper.cxx b/chart2/source/tools/ChartTypeHelper.cxx
index 91dd9792e641..4a473bd6214c 100644
--- a/chart2/source/tools/ChartTypeHelper.cxx
+++ b/chart2/source/tools/ChartTypeHelper.cxx
@@ -291,7 +291,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedLabelPlacements( const
uno::Reference< beans::XPropertySet > xSeriesProp( xSeries, uno::UNO_QUERY );
chart2::StackingDirection eStacking = chart2::StackingDirection_NO_STACKING;
xSeriesProp->getPropertyValue( "StackingDirection" ) >>= eStacking;
- bStacked = (chart2::StackingDirection_Y_STACKING == eStacking);
+ bStacked = (eStacking == chart2::StackingDirection_Y_STACKING);
}
aRet.realloc( bStacked ? 3 : 6 );
@@ -523,11 +523,11 @@ sal_Int32 ChartTypeHelper::getAxisType( const uno::Reference<
return AxisType::CATEGORY;
OUString aChartTypeName = xChartType->getChartType();
- if(2==nDimensionIndex)//z-axis
+ if(nDimensionIndex==2)//z-axis
return AxisType::SERIES;
- if(1==nDimensionIndex)//y-axis
+ if(nDimensionIndex==1)//y-axis
return AxisType::REALNUMBER;
- if(0==nDimensionIndex)//x-axis
+ if(nDimensionIndex==0)//x-axis
{
if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_SCATTER)
|| aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_BUBBLE) )
@@ -574,7 +574,7 @@ uno::Sequence < sal_Int32 > ChartTypeHelper::getSupportedMissingValueTreatments(
bool bFound=false;
bool bAmbiguous=false;
StackMode eStackMode = DiagramHelper::getStackModeFromChartType( xChartType, bFound, bAmbiguous, nullptr );
- bool bStacked = bFound && (StackMode::YStacked == eStackMode);
+ bool bStacked = bFound && (eStackMode == StackMode::YStacked);
OUString aChartTypeName = xChartType->getChartType();
if( aChartTypeName.match(CHART2_SERVICE_NAME_CHARTTYPE_COLUMN) ||
diff --git a/chart2/source/tools/LinePropertiesHelper.cxx b/chart2/source/tools/LinePropertiesHelper.cxx
index e857d2d9a6ae..bba5d22695c5 100644
--- a/chart2/source/tools/LinePropertiesHelper.cxx
+++ b/chart2/source/tools/LinePropertiesHelper.cxx
@@ -111,7 +111,7 @@ bool LinePropertiesHelper::IsLineVisible( const css::uno::Reference<
{
sal_Int16 nLineTransparence=0;
xLineProperties->getPropertyValue( "LineTransparence" ) >>= nLineTransparence;
- if(100!=nLineTransparence)
+ if(nLineTransparence!=100)
{
bRet = true;
}
@@ -139,7 +139,7 @@ void LinePropertiesHelper::SetLineVisible( const css::uno::Reference<
sal_Int16 nLineTransparence=0;
xLineProperties->getPropertyValue( "LineTransparence" ) >>= nLineTransparence;
- if(100==nLineTransparence)
+ if(nLineTransparence==100)
xLineProperties->setPropertyValue( "LineTransparence", uno::Any( sal_Int16(0) ) );
}
}
diff --git a/chart2/source/tools/ObjectIdentifier.cxx b/chart2/source/tools/ObjectIdentifier.cxx
index 604d0be5eb77..f24258559f24 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -902,8 +902,8 @@ bool ObjectIdentifier::areSiblings( const OUString& rCID1, const OUString& rCID2
//legend entries are special:
if(!bRet)
{
- if( OBJECTTYPE_LEGEND_ENTRY == getObjectType(rCID1)
- && OBJECTTYPE_LEGEND_ENTRY == getObjectType(rCID2) )
+ if( getObjectType(rCID1) == OBJECTTYPE_LEGEND_ENTRY
+ && getObjectType(rCID2) == OBJECTTYPE_LEGEND_ENTRY )
bRet = true;
}
}
diff --git a/chart2/source/tools/RangeHighlighter.cxx b/chart2/source/tools/RangeHighlighter.cxx
index 6c7a5d5ae156..318cd63d71e7 100644
--- a/chart2/source/tools/RangeHighlighter.cxx
+++ b/chart2/source/tools/RangeHighlighter.cxx
@@ -107,24 +107,24 @@ void RangeHighlighter::determineRanges()
ObjectType eObjectType = ObjectIdentifier::getObjectType( aCID );
sal_Int32 nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aCID );
Reference< chart2::XDataSeries > xDataSeries( ObjectIdentifier::getDataSeriesForCID( aCID, xChartModel ) );
- if( OBJECTTYPE_LEGEND_ENTRY == eObjectType )
+ if( eObjectType == OBJECTTYPE_LEGEND_ENTRY )
{
OUString aParentParticel( ObjectIdentifier::getFullParentParticle( aCID ) );
ObjectType eParentObjectType = ObjectIdentifier::getObjectType( aParentParticel );
eObjectType = eParentObjectType;
- if( OBJECTTYPE_DATA_POINT == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_POINT )
nIndex = ObjectIdentifier::getIndexFromParticleOrCID( aParentParticel );
}
- if( OBJECTTYPE_DATA_POINT == eObjectType || OBJECTTYPE_DATA_LABEL == eObjectType )
+ if( eObjectType == OBJECTTYPE_DATA_POINT || eObjectType == OBJECTTYPE_DATA_LABEL )
{
// Data Point
fillRangesForDataPoint( xDataSeries, nIndex );
return;
}
- else if( OBJECTTYPE_DATA_ERRORS_X == eObjectType ||
- OBJECTTYPE_DATA_ERRORS_Y == eObjectType ||
- OBJECTTYPE_DATA_ERRORS_Z == eObjectType )
+ else if( eObjectType == OBJECTTYPE_DATA_ERRORS_X ||
+ eObjectType == OBJECTTYPE_DATA_ERRORS_Y ||
+ eObjectType == OBJECTTYPE_DATA_ERRORS_Z )
{
// select error bar ranges, or data series, if the style is
// not set to FROM_DATA
@@ -137,7 +137,7 @@ void RangeHighlighter::determineRanges()
fillRangesForDataSeries( xDataSeries );
return;
}
- else if( OBJECTTYPE_AXIS == eObjectType )
+ else if( eObjectType == OBJECTTYPE_AXIS )
{
// Axis (Categories)
Reference< chart2::XAxis > xAxis( ObjectIdentifier::getObjectPropertySet( aCID, xChartModel ), uno::UNO_QUERY );
@@ -147,10 +147,10 @@ void RangeHighlighter::determineRanges()
return;
}
}
- else if( OBJECTTYPE_PAGE == eObjectType
- || OBJECTTYPE_DIAGRAM == eObjectType
- || OBJECTTYPE_DIAGRAM_WALL == eObjectType
- || OBJECTTYPE_DIAGRAM_FLOOR == eObjectType
+ else if( eObjectType == OBJECTTYPE_PAGE
+ || eObjectType == OBJECTTYPE_DIAGRAM
+ || eObjectType == OBJECTTYPE_DIAGRAM_WALL
+ || eObjectType == OBJECTTYPE_DIAGRAM_FLOOR
)
{
// Diagram
diff --git a/chart2/source/tools/ThreeDHelper.cxx b/chart2/source/tools/ThreeDHelper.cxx
index b7c448eb7124..9062c5541074 100644
--- a/chart2/source/tools/ThreeDHelper.cxx
+++ b/chart2/source/tools/ThreeDHelper.cxx
@@ -1293,7 +1293,7 @@ void ThreeDHelper::setDefaultIllumination( const uno::Reference< beans::XPropert
ASSERT_EXCEPTION( ex );
}
- ThreeDLookScheme aScheme = (drawing::ShadeMode_FLAT==aShadeMode) ? ThreeDLookScheme_Simple : ThreeDLookScheme_Realistic;
+ ThreeDLookScheme aScheme = (aShadeMode==drawing::ShadeMode_FLAT) ? ThreeDLookScheme_Simple : ThreeDLookScheme_Realistic;
lcl_setLightsForScheme( xSceneProperties, aScheme );
}
diff --git a/chart2/source/view/axes/DateScaling.cxx b/chart2/source/view/axes/DateScaling.cxx
index 0a83e792b818..742adc3cb044 100644
--- a/chart2/source/view/axes/DateScaling.cxx
+++ b/chart2/source/view/axes/DateScaling.cxx
@@ -80,7 +80,7 @@ double SAL_CALL DateScaling::doScaling( double value )
fResult += fDayOfMonth/fDaysInMonth;
if(m_bShifted)
{
- if( YEAR==m_nTimeUnit )
+ if( m_nTimeUnit==YEAR )
fResult += 0.5*lcl_fNumberOfMonths;
else
fResult += 0.5;
@@ -147,7 +147,7 @@ double SAL_CALL InverseDateScaling::doScaling( double value )
//Date aDate(m_aNullDate);
if(m_bShifted)
{
- if( YEAR==m_nTimeUnit )
+ if( m_nTimeUnit==YEAR )
value -= 0.5*lcl_fNumberOfMonths;
else
value -= 0.5;
diff --git a/chart2/source/view/axes/ScaleAutomatism.cxx b/chart2/source/view/axes/ScaleAutomatism.cxx
index ce1fa1570f27..0ccb61445a32 100644
--- a/chart2/source/view/axes/ScaleAutomatism.cxx
+++ b/chart2/source/view/axes/ScaleAutomatism.cxx
@@ -639,12 +639,12 @@ void ScaleAutomatism::calculateExplicitIncrementAndScaleForDateTimeAxis(
long nNumer = 1;
long nIntervalDays = nDayCount / nMaxMainIncrementCount;
double nDaysPerInterval = 1.0;
- if( nIntervalDays>365 || YEAR==rExplicitScale.TimeResolution )
+ if( nIntervalDays>365 || rExplicitScale.TimeResolution==YEAR )
{
rExplicitIncrement.MajorTimeInterval.TimeUnit = YEAR;
nDaysPerInterval = 365.0;//todo: maybe different for other calendars... get localized calendar according to set number format at axis ...
}
- else if( nIntervalDays>31 || MONTH==rExplicitScale.TimeResolution )
+ else if( nIntervalDays>31 || rExplicitScale.TimeResolution==MONTH )
{
rExplicitIncrement.MajorTimeInterval.TimeUnit = MONTH;
nDaysPerInterval = 31.0;//todo: maybe different for other calendars... get localized calendar according to set number format at axis ...
diff --git a/chart2/source/view/axes/Tickmarks.cxx b/chart2/source/view/axes/Tickmarks.cxx
index c3d98df7456c..901242455252 100644
--- a/chart2/source/view/axes/Tickmarks.cxx
+++ b/chart2/source/view/axes/Tickmarks.cxx
@@ -150,7 +150,7 @@ TickFactory2D::TickFactory2D(
, m_fOffset_LogicToScreen(0.0)
{
double fWidthY = m_fScaledVisibleMax - m_fScaledVisibleMin;
- if (chart2::AxisOrientation_MATHEMATICAL == m_rScale.Orientation)
+ if (m_rScale.Orientation == chart2::AxisOrientation_MATHEMATICAL)
{
m_fStretch_LogicToScreen = 1.0/fWidthY;
m_fOffset_LogicToScreen = -m_fScaledVisibleMin;
@@ -233,8 +233,8 @@ void TickFactory2D::addPointSequenceForTickLine( drawing::PointSequenceSequence&
B2DVector TickFactory2D::getDistanceAxisTickToText( const AxisProperties& rAxisProperties, bool bIncludeFarAwayDistanceIfSo, bool bIncludeSpaceBetweenTickAndText ) const
{
bool bFarAwayLabels = false;
- if( css::chart::ChartAxisLabelPosition_OUTSIDE_START == rAxisProperties.m_eLabelPos
- || css::chart::ChartAxisLabelPosition_OUTSIDE_END == rAxisProperties.m_eLabelPos )
+ if( rAxisProperties.m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_START
+ || rAxisProperties.m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_END )
bFarAwayLabels = true;
double fInnerDirectionSign = rAxisProperties.maLabelAlignment.mfInnerTickDirection;
diff --git a/chart2/source/view/axes/VAxisBase.cxx b/chart2/source/view/axes/VAxisBase.cxx
index 886b67e9edc2..59ed66cdc917 100644
--- a/chart2/source/view/axes/VAxisBase.cxx
+++ b/chart2/source/view/axes/VAxisBase.cxx
@@ -58,7 +58,7 @@ void VAxisBase::initAxisLabelProperties( const css::awt::Size& rFontReferenceSiz
if( !m_aAxisProperties.m_bDisplayLabels )
return;
- if( AxisType::SERIES==m_aAxisProperties.m_nAxisType )
+ if( m_aAxisProperties.m_nAxisType==AxisType::SERIES )
{
if( m_aAxisProperties.m_xAxisTextProvider.is() )
m_aTextLabels = m_aAxisProperties.m_xAxisTextProvider->getTextualData();
@@ -71,7 +71,7 @@ void VAxisBase::initAxisLabelProperties( const css::awt::Size& rFontReferenceSiz
return;
}
}
- else if( AxisType::CATEGORY==m_aAxisProperties.m_nAxisType )
+ else if( m_aAxisProperties.m_nAxisType==AxisType::CATEGORY )
{
if( m_aAxisProperties.m_pExplicitCategoriesProvider )
m_aTextLabels = m_aAxisProperties.m_pExplicitCategoriesProvider->getSimpleCategories();
@@ -81,13 +81,13 @@ void VAxisBase::initAxisLabelProperties( const css::awt::Size& rFontReferenceSiz
m_aAxisLabelProperties.nNumberFormatKey = m_aAxisProperties.m_nNumberFormatKey;
m_aAxisLabelProperties.init(m_aAxisProperties.m_xAxisModel);
- if( m_aAxisProperties.m_bComplexCategories && AxisType::CATEGORY == m_aAxisProperties.m_nAxisType )
+ if( m_aAxisProperties.m_bComplexCategories && m_aAxisProperties.m_nAxisType == AxisType::CATEGORY )
m_aAxisLabelProperties.eStaggering = SIDE_BY_SIDE;
}
bool VAxisBase::isDateAxis() const
{
- return AxisType::DATE == m_aScale.AxisType;
+ return m_aScale.AxisType == AxisType::DATE;
}
bool VAxisBase::isComplexCategoryAxis() const
{
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 786e8a3d73aa..35a9855a472f 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -241,7 +241,7 @@ void AxisProperties::initAxisPositioning( const uno::Reference< beans::XProperty
if( AxisHelper::isAxisPositioningEnabled() )
{
xAxisProp->getPropertyValue("CrossoverPosition") >>= m_eCrossoverType;
- if( css::chart::ChartAxisPosition_VALUE == m_eCrossoverType )
+ if( m_eCrossoverType == css::chart::ChartAxisPosition_VALUE )
{
double fValue = 0.0;
xAxisProp->getPropertyValue("CrossoverValue") >>= fValue;
@@ -250,7 +250,7 @@ void AxisProperties::initAxisPositioning( const uno::Reference< beans::XProperty
fValue = ::rtl::math::round(fValue);
m_pfMainLinePositionAtOtherAxis.reset(fValue);
}
- else if( css::chart::ChartAxisPosition_ZERO == m_eCrossoverType )
+ else if( m_eCrossoverType == css::chart::ChartAxisPosition_ZERO )
m_pfMainLinePositionAtOtherAxis.reset(0.0);
xAxisProp->getPropertyValue("LabelPosition") >>= m_eLabelPos;
@@ -292,18 +292,18 @@ void AxisProperties::init( bool bCartesian )
&& m_pExplicitCategoriesProvider && m_pExplicitCategoriesProvider->hasComplexCategories() )
m_bComplexCategories = true;
- if( css::chart::ChartAxisPosition_END == m_eCrossoverType )
+ if( m_eCrossoverType == css::chart::ChartAxisPosition_END )
maLabelAlignment.mfInnerTickDirection = m_bCrossingAxisHasReverseDirection ? 1.0 : -1.0;
else
maLabelAlignment.mfInnerTickDirection = m_bCrossingAxisHasReverseDirection ? -1.0 : 1.0;
- if( css::chart::ChartAxisLabelPosition_NEAR_AXIS == m_eLabelPos )
+ if( m_eLabelPos == css::chart::ChartAxisLabelPosition_NEAR_AXIS )
maLabelAlignment.mfLabelDirection = maLabelAlignment.mfInnerTickDirection;
- else if( css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE == m_eLabelPos )
+ else if( m_eLabelPos == css::chart::ChartAxisLabelPosition_NEAR_AXIS_OTHER_SIDE )
maLabelAlignment.mfLabelDirection = -maLabelAlignment.mfInnerTickDirection;
- else if( css::chart::ChartAxisLabelPosition_OUTSIDE_START == m_eLabelPos )
+ else if( m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_START )
maLabelAlignment.mfLabelDirection = m_bCrossingAxisHasReverseDirection ? -1 : 1;
- else if( css::chart::ChartAxisLabelPosition_OUTSIDE_END == m_eLabelPos )
+ else if( m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_END )
maLabelAlignment.mfLabelDirection = m_bCrossingAxisHasReverseDirection ? 1 : -1;
if( m_nDimensionIndex==2 )
@@ -415,7 +415,7 @@ void AxisLabelProperties::init( const uno::Reference< XAxis >& xAxisModel )
bool AxisLabelProperties::isStaggered() const
{
- return ( STAGGER_ODD == eStaggering || STAGGER_EVEN == eStaggering );
+ return ( eStaggering == STAGGER_ODD || eStaggering == STAGGER_EVEN );
}
void AxisLabelProperties::autoRotate45()
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx
index 3ff5cd913cfb..057f957a46ad 100644
--- a/chart2/source/view/axes/VCartesianAxis.cxx
+++ b/chart2/source/view/axes/VCartesianAxis.cxx
@@ -236,9 +236,9 @@ TickInfo* LabelIterator::firstInfo()
pTickInfo = m_aPureTickIter.nextInfo();
if(!pTickInfo)
return nullptr;
- if( (STAGGER_EVEN==m_eAxisLabelStaggering && m_bInnerLine)
+ if( (m_eAxisLabelStaggering==STAGGER_EVEN && m_bInnerLine)
||
- (STAGGER_ODD==m_eAxisLabelStaggering && !m_bInnerLine)
+ (m_eAxisLabelStaggering==STAGGER_ODD && !m_bInnerLine)
)
{
//skip first label
@@ -259,8 +259,8 @@ TickInfo* LabelIterator::nextInfo()
pTickInfo = m_aPureTickIter.nextInfo();
while( pTickInfo && !pTickInfo->xTextShape.is() );
- if( STAGGER_EVEN==m_eAxisLabelStaggering
- || STAGGER_ODD==m_eAxisLabelStaggering )
+ if( m_eAxisLabelStaggering==STAGGER_EVEN
+ || m_eAxisLabelStaggering==STAGGER_ODD )
{
//skip one label
do
@@ -1016,15 +1016,15 @@ double VCartesianAxis::getAxisIntersectionValue() const
double fMin = (m_nDimensionIndex==1) ? m_pPosHelper->getLogicMinX() : m_pPosHelper->getLogicMinY();
double fMax = (m_nDimensionIndex==1) ? m_pPosHelper->getLogicMaxX() : m_pPosHelper->getLogicMaxY();
- return (css::chart::ChartAxisPosition_END == m_aAxisProperties.m_eCrossoverType) ? fMax : fMin;
+ return (m_aAxisProperties.m_eCrossoverType == css::chart::ChartAxisPosition_END) ? fMax : fMin;
}
double VCartesianAxis::getLabelLineIntersectionValue() const
{
- if (css::chart::ChartAxisLabelPosition_OUTSIDE_START == m_aAxisProperties.m_eLabelPos)
+ if (m_aAxisProperties.m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_START)
return (m_nDimensionIndex==1) ? m_pPosHelper->getLogicMinX() : m_pPosHelper->getLogicMinY();
- if (css::chart::ChartAxisLabelPosition_OUTSIDE_END == m_aAxisProperties.m_eLabelPos)
+ if (m_aAxisProperties.m_eLabelPos == css::chart::ChartAxisLabelPosition_OUTSIDE_END)
return (m_nDimensionIndex==1) ? m_pPosHelper->getLogicMaxX() : m_pPosHelper->getLogicMaxY();
return getAxisIntersectionValue();
@@ -1055,7 +1055,7 @@ B2DVector VCartesianAxis::getScreenPosition( double fLogicX, double fLogicY, dou
if( m_pPosHelper )
{
drawing::Position3D aScenePos = m_pPosHelper->transformLogicToScene( fLogicX, fLogicY, fLogicZ, true );
- if(3==m_nDimension)
+ if(m_nDimension==3)
{
if( m_xLogicTarget.is() && m_pPosHelper && m_pShapeFactory )
{
@@ -1126,9 +1126,9 @@ void VCartesianAxis::get2DAxisMainLine(
double fXOther = fMaxX;
int nDifferentValue = !m_pPosHelper->isMathematicalOrientationX() ? -1 : 1;
if( !m_pPosHelper->isSwapXAndY() )
- nDifferentValue *= (CuboidPlanePosition_Left != m_eLeftWallPos) ? -1 : 1;
+ nDifferentValue *= (m_eLeftWallPos != CuboidPlanePosition_Left) ? -1 : 1;
else
- nDifferentValue *= (CuboidPlanePosition_Bottom != m_eBottomPos) ? -1 : 1;
+ nDifferentValue *= (m_eBottomPos != CuboidPlanePosition_Bottom) ? -1 : 1;
if( nDifferentValue<0 )
{
fXOnXPlane = fMaxX;
@@ -1139,9 +1139,9 @@ void VCartesianAxis::get2DAxisMainLine(
double fYOther = fMaxY;
nDifferentValue = !m_pPosHelper->isMathematicalOrientationY() ? -1 : 1;
if( !m_pPosHelper->isSwapXAndY() )
- nDifferentValue *= (CuboidPlanePosition_Bottom != m_eBottomPos) ? -1 : 1;
+ nDifferentValue *= (m_eBottomPos != CuboidPlanePosition_Bottom) ? -1 : 1;
else
- nDifferentValue *= (CuboidPlanePosition_Left != m_eLeftWallPos) ? -1 : 1;
+ nDifferentValue *= (m_eLeftWallPos != CuboidPlanePosition_Left) ? -1 : 1;
if( nDifferentValue<0 )
{
fYOnYPlane = fMaxY;
@@ -1151,7 +1151,7 @@ void VCartesianAxis::get2DAxisMainLine(
double fZOnZPlane = fMaxZ;
double fZOther = fMinZ;
nDifferentValue = !m_pPosHelper->isMathematicalOrientationZ() ? -1 : 1;
- nDifferentValue *= (CuboidPlanePosition_Back != m_eBackWallPos) ? -1 : 1;
+ nDifferentValue *= (m_eBackWallPos != CuboidPlanePosition_Back) ? -1 : 1;
if( nDifferentValue<0 )
{
fZOnZPlane = fMinZ;
@@ -1165,7 +1165,7 @@ void VCartesianAxis::get2DAxisMainLine(
double fYEnd;
double fZEnd = fZStart;
- if( 0==m_nDimensionIndex ) //x-axis
+ if( m_nDimensionIndex==0 ) //x-axis
{
if( fCrossesOtherAxis < fMinY )
fCrossesOtherAxis = fMinY;
@@ -1175,7 +1175,7 @@ void VCartesianAxis::get2DAxisMainLine(
fYStart = fYEnd = fCrossesOtherAxis;
fXEnd=m_pPosHelper->getLogicMaxX();
- if(3==m_nDimension)
+ if(m_nDimension==3)
{
if( AxisHelper::isAxisPositioningEnabled() )
{
@@ -1219,7 +1219,7 @@ void VCartesianAxis::get2DAxisMainLine(
}
}//end 3D x axis
}
- else if( 1==m_nDimensionIndex ) //y-axis
+ else if( m_nDimensionIndex==1 ) //y-axis
{
if( fCrossesOtherAxis < fMinX )
fCrossesOtherAxis = fMinX;
@@ -1229,7 +1229,7 @@ void VCartesianAxis::get2DAxisMainLine(
fXStart = fXEnd = fCrossesOtherAxis;
fYEnd=m_pPosHelper->getLogicMaxY();
- if(3==m_nDimension)
+ if(m_nDimension==3)
{
if( AxisHelper::isAxisPositioningEnabled() )
{
@@ -1318,7 +1318,7 @@ void VCartesianAxis::get2DAxisMainLine(
fYStart = fYEnd = m_pPosHelper->isMathematicalOrientationY() ? m_pPosHelper->getLogicMaxY() : m_pPosHelper->getLogicMinY();
}
- if(3==m_nDimension)
+ if(m_nDimension==3)
{
rStart = getScreenPosition( fXStart, fYStart, fZStart );
rEnd = getScreenPosition( fXEnd, fYEnd, fZEnd );
@@ -1363,15 +1363,15 @@ void VCartesianAxis::get2DAxisMainLine(
rStart = getScreenPosition( fXStart, fYStart, fZStart );
rEnd = getScreenPosition( fXEnd, fYEnd, fZEnd );
- if(3==m_nDimension && !AxisHelper::isAxisPositioningEnabled() )
+ if(m_nDimension==3 && !AxisHelper::isAxisPositioningEnabled() )
rAlignment.mfInnerTickDirection = rAlignment.mfLabelDirection;//to behave like before
- if(3==m_nDimension && AxisHelper::isAxisPositioningEnabled() )
+ if(m_nDimension==3 && AxisHelper::isAxisPositioningEnabled() )
{
double fDeltaX = rEnd.getX() - rStart.getX();
double fDeltaY = rEnd.getY() - rStart.getY();
- if( 2==m_nDimensionIndex )
+ if( m_nDimensionIndex==2 )
{
if( m_eLeftWallPos != CuboidPlanePosition_Left )
{
@@ -1758,7 +1758,7 @@ void VCartesianAxis::createShapes()
return;
//create line shapes
- if(2==m_nDimension)
+ if(m_nDimension==2)
{
//create extra long ticks to separate complex categories (create them only there where the labels are)
if( isComplexCategoryAxis() )
diff --git a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
index 934d17046ea3..d232d78afbac 100644
--- a/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCartesianCoordinateSystem.cxx
@@ -83,7 +83,7 @@ void VCartesianCoordinateSystem::createGridShapes()
aGrid.initPlotter(m_xLogicTargetForGrids,m_xFinalTarget,m_xShapeFactory
, this->createCIDForGrid( xAxis,nDimensionIndex,nAxisIndex ) );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
aGrid.setTransformationSceneToScreen( m_aMatrixSceneToScreen );
aGrid.setScales( this->getExplicitScales(nDimensionIndex,nAxisIndex), bSwapXAndY );
aGrid.createShapes();
@@ -130,7 +130,7 @@ void VCartesianCoordinateSystem::createVAxisList(
if( xCrossingMainAxis.is() )
{
ScaleData aCrossingScale( xCrossingMainAxis->getScaleData() );
- aAxisProperties.m_bCrossingAxisHasReverseDirection = (AxisOrientation_REVERSE==aCrossingScale.Orientation);
+ aAxisProperties.m_bCrossingAxisHasReverseDirection = (aCrossingScale.Orientation==AxisOrientation_REVERSE);
if( aCrossingScale.AxisType == AxisType::CATEGORY )
aAxisProperties.m_bCrossingAxisIsCategoryAxes = true;
@@ -178,7 +178,7 @@ void VCartesianCoordinateSystem::initVAxisInList()
pVAxis->setExplicitScaleAndIncrement( this->getExplicitScale( nDimensionIndex, nAxisIndex ), this->getExplicitIncrement( nDimensionIndex, nAxisIndex ) );
pVAxis->initPlotter(m_xLogicTargetForAxes,m_xFinalTarget,m_xShapeFactory
, this->createCIDForAxis( getAxisByDimension( nDimensionIndex, nAxisIndex ), nDimensionIndex, nAxisIndex ) );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->setScales( this->getExplicitScales(nDimensionIndex,nAxisIndex), bSwapXAndY );
}
@@ -203,7 +203,7 @@ void VCartesianCoordinateSystem::updateScalesAndIncrementsOnAxes()
sal_Int32 nDimensionIndex = aIt->first.first;
sal_Int32 nAxisIndex = aIt->first.second;
pVAxis->setExplicitScaleAndIncrement( this->getExplicitScale( nDimensionIndex, nAxisIndex ), this->getExplicitIncrement( nDimensionIndex, nAxisIndex ) );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->setScales( this->getExplicitScales(nDimensionIndex,nAxisIndex), bSwapXAndY );
}
diff --git a/chart2/source/view/axes/VCartesianGrid.cxx b/chart2/source/view/axes/VCartesianGrid.cxx
index 8da909ffef3f..57073235c0ff 100644
--- a/chart2/source/view/axes/VCartesianGrid.cxx
+++ b/chart2/source/view/axes/VCartesianGrid.cxx
@@ -96,29 +96,29 @@ GridLinePoints::GridLinePoints( const PlottingPositionHelper* pPosHelper, sal_In
//P1: point on both walls
//P2: point on 'left' wall not on 'back' wall
- P0[0]=P1[0]=P2[0]= (CuboidPlanePosition_Left == eLeftWallPos || bSwapXY) ? MinX : MaxX;
- P0[1]=P1[1]=P2[1]= (CuboidPlanePosition_Left == eLeftWallPos || !bSwapXY) ? MinY : MaxY;
- P0[2]=P1[2]=P2[2]= (CuboidPlanePosition_Back == eBackWallPos) ? MinZ : MaxZ;
+ P0[0]=P1[0]=P2[0]= (eLeftWallPos == CuboidPlanePosition_Left || bSwapXY) ? MinX : MaxX;
+ P0[1]=P1[1]=P2[1]= (eLeftWallPos == CuboidPlanePosition_Left || !bSwapXY) ? MinY : MaxY;
+ P0[2]=P1[2]=P2[2]= (eBackWallPos == CuboidPlanePosition_Back) ? MinZ : MaxZ;
if(m_nDimensionIndex==0)
{
- P0[1]= (CuboidPlanePosition_Left == eLeftWallPos || !bSwapXY) ? MaxY : MinY;
- P2[2]= (CuboidPlanePosition_Back == eBackWallPos) ? MaxZ : MinZ;
- if( CuboidPlanePosition_Bottom != eBottomPos && !bSwapXY )
+ P0[1]= (eLeftWallPos == CuboidPlanePosition_Left || !bSwapXY) ? MaxY : MinY;
+ P2[2]= (eBackWallPos == CuboidPlanePosition_Back) ? MaxZ : MinZ;
+ if( eBottomPos != CuboidPlanePosition_Bottom && !bSwapXY )
P2=P1;
}
else if(m_nDimensionIndex==1)
{
- P0[0]= (CuboidPlanePosition_Left == eLeftWallPos || bSwapXY) ? MaxX : MinX;
- P2[2]= (CuboidPlanePosition_Back == eBackWallPos) ? MaxZ : MinZ;
- if( CuboidPlanePosition_Bottom != eBottomPos && bSwapXY )
+ P0[0]= (eLeftWallPos == CuboidPlanePosition_Left || bSwapXY) ? MaxX : MinX;
+ P2[2]= (eBackWallPos == CuboidPlanePosition_Back) ? MaxZ : MinZ;
+ if( eBottomPos != CuboidPlanePosition_Bottom && bSwapXY )
P2=P1;
}
else if(m_nDimensionIndex==2)
{
- P0[0]= (CuboidPlanePosition_Left == eLeftWallPos || bSwapXY) ? MaxX : MinX;
- P2[1]= (CuboidPlanePosition_Left == eLeftWallPos || !bSwapXY) ? MaxY : MinY;
- if( CuboidPlanePosition_Bottom != eBottomPos )
+ P0[0]= (eLeftWallPos == CuboidPlanePosition_Left || bSwapXY) ? MaxX : MinX;
+ P2[1]= (eLeftWallPos == CuboidPlanePosition_Left || !bSwapXY) ? MaxY : MinY;
+ if( eBottomPos != CuboidPlanePosition_Bottom )
{
if( !bSwapXY )
P0=P1;
@@ -239,7 +239,7 @@ void VCartesianGrid::createShapes()
xTarget.set( xGroupShape_Shapes );
}
- if(2==m_nDimension)
+ if(m_nDimension==2)
{
GridLinePoints aGridLinePoints( m_pPosHelper, m_nDimensionIndex );
diff --git a/chart2/source/view/axes/VCoordinateSystem.cxx b/chart2/source/view/axes/VCoordinateSystem.cxx
index 0cafa1560f5e..318561e5267b 100644
--- a/chart2/source/view/axes/VCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VCoordinateSystem.cxx
@@ -142,7 +142,7 @@ void VCoordinateSystem::setTransformationSceneToScreen(
VAxisBase* pVAxis = aIt->second.get();
if( pVAxis )
{
- if(2==pVAxis->getDimensionCount())
+ if(pVAxis->getDimensionCount()==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
}
}
@@ -182,7 +182,7 @@ uno::Sequence< sal_Int32 > VCoordinateSystem::getCoordinateSystemResolution(
std::swap(nXResolution,nYResolution);
//2D
- if( 2 == aResolution.getLength() )
+ if( aResolution.getLength() == 2 )
{
aResolution[0]=nXResolution;
aResolution[1]=nYResolution;
@@ -373,20 +373,20 @@ void VCoordinateSystem::prepareAutomaticAxisScaling( ScaleAutomatism& rScaleAuto
double fMax = 0.0;
::rtl::math::setInf(&fMin, false);
::rtl::math::setInf(&fMax, true);
- if( 0 == nDimIndex )
+ if( nDimIndex == 0 )
{
// x dimension
fMin = m_aMergedMinMaxSupplier.getMinimumX();
fMax = m_aMergedMinMaxSupplier.getMaximumX();
}
- else if( 1 == nDimIndex )
+ else if( nDimIndex == 1 )
{
// y dimension
ExplicitScaleData aScale = getExplicitScale( 0, 0 );
fMin = m_aMergedMinMaxSupplier.getMinimumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex);
fMax = m_aMergedMinMaxSupplier.getMaximumYInRange(aScale.Minimum,aScale.Maximum, nAxisIndex);
}
- else if( 2 == nDimIndex )
+ else if( nDimIndex == 2 )
{
// z dimension
fMin = m_aMergedMinMaxSupplier.getMinimumZ();
@@ -457,7 +457,7 @@ void VCoordinateSystem::createMaximumAxesLabels()
VAxisBase* pVAxis = aIt->second.get();
if( pVAxis )
{
- if(2==pVAxis->getDimensionCount())
+ if(pVAxis->getDimensionCount()==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->createMaximumLabels();
}
@@ -472,7 +472,7 @@ void VCoordinateSystem::createAxesLabels()
VAxisBase* pVAxis = aIt->second.get();
if( pVAxis )
{
- if(2==pVAxis->getDimensionCount())
+ if(pVAxis->getDimensionCount()==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->createLabels();
}
@@ -488,7 +488,7 @@ void VCoordinateSystem::updatePositions()
VAxisBase* pVAxis = aIt->second.get();
if( pVAxis )
{
- if(2==pVAxis->getDimensionCount())
+ if(pVAxis->getDimensionCount()==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->updatePositions();
}
@@ -504,7 +504,7 @@ void VCoordinateSystem::createAxesShapes()
VAxisBase* pVAxis = aIt->second.get();
if( pVAxis )
{
- if(2==pVAxis->getDimensionCount())
+ if(pVAxis->getDimensionCount()==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
tFullAxisIndex aFullAxisIndex = aIt->first;
@@ -512,13 +512,13 @@ void VCoordinateSystem::createAxesShapes()
{
if( aFullAxisIndex.first == 0 )
{
- if( AxisType::CATEGORY!=m_aExplicitScales[1].AxisType )
+ if( m_aExplicitScales[1].AxisType!=AxisType::CATEGORY )
pVAxis->setExtraLinePositionAtOtherAxis(
m_aExplicitScales[1].Origin );
}
else if( aFullAxisIndex.first == 1 )
{
- if( AxisType::CATEGORY!=m_aExplicitScales[0].AxisType )
+ if( m_aExplicitScales[0].AxisType!=AxisType::CATEGORY )
pVAxis->setExtraLinePositionAtOtherAxis(
m_aExplicitScales[0].Origin );
}
diff --git a/chart2/source/view/axes/VPolarAxis.cxx b/chart2/source/view/axes/VPolarAxis.cxx
index da53f99b527c..b3315f86f1dc 100644
--- a/chart2/source/view/axes/VPolarAxis.cxx
+++ b/chart2/source/view/axes/VPolarAxis.cxx
@@ -33,7 +33,7 @@ VPolarAxis* VPolarAxis::createAxis( const AxisProperties& rAxisProperties
, const uno::Reference< util::XNumberFormatsSupplier >& xNumberFormatsSupplier
, sal_Int32 nDimensionIndex, sal_Int32 nDimensionCount )
{
- if( 0==nDimensionIndex )
+ if( nDimensionIndex==0 )
return new VPolarAngleAxis( rAxisProperties, xNumberFormatsSupplier, nDimensionCount );
return new VPolarRadiusAxis( rAxisProperties, xNumberFormatsSupplier, nDimensionCount );
}
@@ -59,7 +59,7 @@ void VPolarAxis::setIncrements( const std::vector< ExplicitIncrementData >& rInc
bool VPolarAxis::isAnythingToDraw()
{
- return ( 2==m_nDimension && VAxisBase::isAnythingToDraw() );
+ return ( m_nDimension==2 && VAxisBase::isAnythingToDraw() );
}
} //namespace chart
diff --git a/chart2/source/view/axes/VPolarCoordinateSystem.cxx b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
index f0e20c47d898..9c8ada2ae0ee 100644
--- a/chart2/source/view/axes/VPolarCoordinateSystem.cxx
+++ b/chart2/source/view/axes/VPolarCoordinateSystem.cxx
@@ -122,7 +122,7 @@ void VPolarCoordinateSystem::initVAxisInList()
VPolarAxis* pVPolarAxis = dynamic_cast< VPolarAxis* >( pVAxis );
if( pVPolarAxis )
pVPolarAxis->setIncrements( this->getExplicitIncrements( nDimensionIndex, nAxisIndex ) );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->setScales( this->getExplicitScales( nDimensionIndex, nAxisIndex ), bSwapXAndY );
}
@@ -150,7 +150,7 @@ void VPolarCoordinateSystem::updateScalesAndIncrementsOnAxes()
VPolarAxis* pVPolarAxis = dynamic_cast< VPolarAxis* >( pVAxis );
if( pVPolarAxis )
pVPolarAxis->setIncrements( this->getExplicitIncrements( nDimensionIndex, nAxisIndex ) );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
pVAxis->setTransformationSceneToScreen( m_aMatrixSceneToScreen );
pVAxis->setScales( this->getExplicitScales( nDimensionIndex, nAxisIndex ), bSwapXAndY );
}
@@ -177,7 +177,7 @@ void VPolarCoordinateSystem::createGridShapes()
aGrid.setIncrements( this->getExplicitIncrements( nDimensionIndex, nAxisIndex ) );
aGrid.initPlotter(m_xLogicTargetForGrids,m_xFinalTarget,m_xShapeFactory
, this->createCIDForGrid( xAxis, nDimensionIndex, nAxisIndex ) );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
aGrid.setTransformationSceneToScreen( m_aMatrixSceneToScreen );
aGrid.setScales( this->getExplicitScales( nDimensionIndex, nAxisIndex), bSwapXAndY );
aGrid.createShapes();
diff --git a/chart2/source/view/axes/VPolarGrid.cxx b/chart2/source/view/axes/VPolarGrid.cxx
index 7ff9a9be2ffd..856bd3197bd2 100644
--- a/chart2/source/view/axes/VPolarGrid.cxx
+++ b/chart2/source/view/axes/VPolarGrid.cxx
@@ -235,7 +235,7 @@ void VPolarGrid::createShapes()
VCartesianGrid::fillLinePropertiesFromGridModel( aLinePropertiesList, m_aGridPropertiesList );
//create tick mark line shapes
- if(2==m_nDimension)
+ if(m_nDimension==2)
{
if(m_nDimensionIndex==1)
this->create2DRadiusGrid( m_xLogicTarget, aRadiusTickInfos, aAngleTickInfos, aLinePropertiesList );
diff --git a/chart2/source/view/charttypes/AreaChart.cxx b/chart2/source/view/charttypes/AreaChart.cxx
index da8a20f3e117..22bb663d8791 100644
--- a/chart2/source/view/charttypes/AreaChart.cxx
+++ b/chart2/source/view/charttypes/AreaChart.cxx
@@ -258,7 +258,7 @@ bool AreaChart::create_stepped_line( drawing::PolyPolygonShape3D aStartPoly, cha
sal_uInt32 nMaxIndexPoints = aStartPoly.SequenceX[nOuter].getLength()-1; // is >1
sal_uInt32 nNewIndexPoints = 0;
- if ( CurveStyle_STEP_START==eCurveStyle || CurveStyle_STEP_END==eCurveStyle)
+ if ( eCurveStyle==CurveStyle_STEP_START || eCurveStyle==CurveStyle_STEP_END)
nNewIndexPoints = nMaxIndexPoints * 2 + 1;
else
nNewIndexPoints = nMaxIndexPoints * 3 + 1;
@@ -373,24 +373,24 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
uno::Reference< drawing::XShapes > xSeriesGroupShape_Shapes = getSeriesGroupShapeBackChild(pSeries, m_xSeriesTarget);
drawing::PolyPolygonShape3D aPoly;
- if(CurveStyle_CUBIC_SPLINES==m_eCurveStyle)
+ if(m_eCurveStyle==CurveStyle_CUBIC_SPLINES)
{
drawing::PolyPolygonShape3D aSplinePoly;
SplineCalculater::CalculateCubicSplines( *pSeriesPoly, aSplinePoly, m_nCurveResolution );
lcl_removeDuplicatePoints( aSplinePoly, *pPosHelper );
Clipping::clipPolygonAtRectangle( aSplinePoly, pPosHelper->getScaledLogicClipDoubleRect(), aPoly );
}
- else if(CurveStyle_B_SPLINES==m_eCurveStyle)
+ else if(m_eCurveStyle==CurveStyle_B_SPLINES)
{
drawing::PolyPolygonShape3D aSplinePoly;
SplineCalculater::CalculateBSplines( *pSeriesPoly, aSplinePoly, m_nCurveResolution, m_nSplineOrder );
lcl_removeDuplicatePoints( aSplinePoly, *pPosHelper );
Clipping::clipPolygonAtRectangle( aSplinePoly, pPosHelper->getScaledLogicClipDoubleRect(), aPoly );
}
- else if (CurveStyle_STEP_START==m_eCurveStyle ||
- CurveStyle_STEP_END==m_eCurveStyle ||
- CurveStyle_STEP_CENTER_Y==m_eCurveStyle ||
- CurveStyle_STEP_CENTER_X==m_eCurveStyle
+ else if (m_eCurveStyle==CurveStyle_STEP_START ||
+ m_eCurveStyle==CurveStyle_STEP_END ||
+ m_eCurveStyle==CurveStyle_STEP_CENTER_Y ||
+ m_eCurveStyle==CurveStyle_STEP_CENTER_X
)
{
if (!create_stepped_line(*pSeriesPoly, m_eCurveStyle, pPosHelper, aPoly))
@@ -400,7 +400,7 @@ bool AreaChart::impl_createLine( VDataSeries* pSeries
}
else
{ // default to creating a straight line
- SAL_WARN_IF(CurveStyle_LINES != m_eCurveStyle, "chart2.areachart", "Unknown curve style");
+ SAL_WARN_IF(m_eCurveStyle != CurveStyle_LINES, "chart2.areachart", "Unknown curve style");
Clipping::clipPolygonAtRectangle( *pSeriesPoly, pPosHelper->getScaledLogicClipDoubleRect(), aPoly );
}
@@ -965,7 +965,7 @@ void AreaChart::createShapes()
awt::Point aScreenPosition2D;//get the screen position for the labels
sal_Int32 nOffset = 100; //todo maybe calculate this font height dependent
{
- if(LABEL_ALIGN_CENTER==eAlignment || m_nDimension == 3 )
+ if(eAlignment==LABEL_ALIGN_CENTER || m_nDimension == 3 )
nOffset = 0;
aScreenPosition2D = awt::Point( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
.transformSceneToScreenPosition( aScenePosition3D ) );
diff --git a/chart2/source/view/charttypes/BarChart.cxx b/chart2/source/view/charttypes/BarChart.cxx
index 7cdc64c3202e..8273c6ac65b3 100644
--- a/chart2/source/view/charttypes/BarChart.cxx
+++ b/chart2/source/view/charttypes/BarChart.cxx
@@ -151,7 +151,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
{
fY = bReverse ? fScaledLowerYValue : fScaledUpperYValue;
rAlignment = LABEL_ALIGN_TOP;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = bReverse ? fabs(fScaledLowerBarDepth) : fabs(fScaledUpperBarDepth);
}
else
@@ -168,7 +168,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
{
fY = bReverse ? fScaledUpperYValue : fScaledLowerYValue;
rAlignment = LABEL_ALIGN_BOTTOM;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = bReverse ? fabs(fScaledUpperBarDepth) : fabs(fScaledLowerBarDepth);
}
else
@@ -185,7 +185,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
{
fY = bReverse ? fScaledUpperYValue : fScaledLowerYValue;
rAlignment = LABEL_ALIGN_LEFT;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = bReverse ? fabs(fScaledUpperBarDepth) : fabs(fScaledLowerBarDepth);
}
else
@@ -202,7 +202,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
{
fY = bReverse ? fScaledLowerYValue : fScaledUpperYValue;
rAlignment = LABEL_ALIGN_RIGHT;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = bReverse ? fabs(fScaledLowerBarDepth) : fabs(fScaledUpperBarDepth);
}
else
@@ -220,7 +220,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
rAlignment = bNormalOutside ? LABEL_ALIGN_RIGHT : LABEL_ALIGN_LEFT;
else
rAlignment = bNormalOutside ? LABEL_ALIGN_TOP : LABEL_ALIGN_BOTTOM;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = (fBaseValue < fScaledUpperYValue) ? fabs(fScaledUpperBarDepth) : fabs(fScaledLowerBarDepth);
}
break;
@@ -231,7 +231,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
rAlignment = bNormalOutside ? LABEL_ALIGN_LEFT : LABEL_ALIGN_RIGHT;
else
rAlignment = bNormalOutside ? LABEL_ALIGN_BOTTOM : LABEL_ALIGN_TOP;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = (fBaseValue < fScaledUpperYValue) ? fabs(fScaledUpperBarDepth) : fabs(fScaledLowerBarDepth);
}
break;
@@ -242,14 +242,14 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
rAlignment = bNormalOutside ? LABEL_ALIGN_RIGHT : LABEL_ALIGN_LEFT;
else
rAlignment = bNormalOutside ? LABEL_ALIGN_TOP : LABEL_ALIGN_BOTTOM;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = (fBaseValue < fScaledUpperYValue) ? fabs(fScaledLowerBarDepth) : fabs(fScaledUpperBarDepth);
}
break;
case css::chart::DataLabelPlacement::CENTER:
fY -= (fScaledUpperYValue-fScaledLowerYValue)/2.0;
rAlignment = LABEL_ALIGN_CENTER;
- if(3==m_nDimension)
+ if(m_nDimension==3)
fDepth = fabs(fScaledUpperBarDepth-fScaledLowerBarDepth)/2.0;
break;
default:
@@ -257,7 +257,7 @@ awt::Point BarChart::getLabelScreenPositionAndAlignment(
break;
}
- if(3==m_nDimension)
+ if(m_nDimension==3)
fZ -= fDepth/2.0;
drawing::Position3D aScenePosition3D( pPosHelper->
@@ -843,7 +843,7 @@ void BarChart::createShapes()
eAlignment, nLabelPlacement, fLogicX, fLowerYValue, fUpperYValue, fLogicZ,
fLowerBarDepth, fUpperBarDepth, fBaseValue, pPosHelper);
sal_Int32 nOffset = 0;
- if(LABEL_ALIGN_CENTER!=eAlignment)
+ if(eAlignment!=LABEL_ALIGN_CENTER)
{
nOffset = 100;//add some spacing //@todo maybe get more intelligent values
if( m_nDimension == 3 )
diff --git a/chart2/source/view/charttypes/BubbleChart.cxx b/chart2/source/view/charttypes/BubbleChart.cxx
index 5bb940aa7dc4..6adbe3b51649 100644
--- a/chart2/source/view/charttypes/BubbleChart.cxx
+++ b/chart2/source/view/charttypes/BubbleChart.cxx
@@ -372,7 +372,7 @@ void BubbleChart::createShapes()
awt::Point aScreenPosition2D( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
.transformSceneToScreenPosition( aScenePosition3D ) );
sal_Int32 nOffset = 0;
- if(LABEL_ALIGN_CENTER!=eAlignment)
+ if(eAlignment!=LABEL_ALIGN_CENTER)
nOffset = 100;//add some spacing //@todo maybe get more intelligent values
createDataLabel( xTextTarget, **aSeriesIter, nIndex
, fBubbleSize, fBubbleSize, aScreenPosition2D, eAlignment, nOffset );
diff --git a/chart2/source/view/charttypes/NetChart.cxx b/chart2/source/view/charttypes/NetChart.cxx
index c1cebdcc97bd..33e55df482c1 100644
--- a/chart2/source/view/charttypes/NetChart.cxx
+++ b/chart2/source/view/charttypes/NetChart.cxx
@@ -664,7 +664,7 @@ void NetChart::createShapes()
}
else
{
- if(LABEL_ALIGN_CENTER==eAlignment )
+ if(eAlignment==LABEL_ALIGN_CENTER )
nOffset = 0;
aScreenPosition2D = awt::Point( LabelPositionHelper(m_nDimension,m_xLogicTarget,m_pShapeFactory)
.transformSceneToScreenPosition( aScenePosition3D ) );
diff --git a/chart2/source/view/charttypes/PieChart.cxx b/chart2/source/view/charttypes/PieChart.cxx
index 669143f26277..b52016fcfe61 100644
--- a/chart2/source/view/charttypes/PieChart.cxx
+++ b/chart2/source/view/charttypes/PieChart.cxx
@@ -301,9 +301,9 @@ void PieChart::createTextLabelShape(
LabelAlignment eAlignment(LABEL_ALIGN_CENTER);
sal_Int32 nScreenValueOffsetInRadiusDirection = 0 ;
if( nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE )
- nScreenValueOffsetInRadiusDirection = (3!=m_nDimension) ? 150 : 0;//todo maybe calculate this font height dependent
+ nScreenValueOffsetInRadiusDirection = (m_nDimension!=3) ? 150 : 0;//todo maybe calculate this font height dependent
else if( nLabelPlacement == css::chart::DataLabelPlacement::INSIDE )
- nScreenValueOffsetInRadiusDirection = (3!=m_nDimension) ? -150 : 0;//todo maybe calculate this font height dependent
+ nScreenValueOffsetInRadiusDirection = (m_nDimension!=3) ? -150 : 0;//todo maybe calculate this font height dependent
///the scene position of the label anchor point is calculated (see notes for
///`PolarLabelPositionHelper::getLabelScreenPositionAndAlignmentForUnitCircleValues`),
diff --git a/chart2/source/view/charttypes/VSeriesPlotter.cxx b/chart2/source/view/charttypes/VSeriesPlotter.cxx
index 38a6bb865730..be104a475f3b 100644
--- a/chart2/source/view/charttypes/VSeriesPlotter.cxx
+++ b/chart2/source/view/charttypes/VSeriesPlotter.cxx
@@ -418,13 +418,13 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
try
{
awt::Point aScreenPosition2D(rScreenPosition2D);
- if(LABEL_ALIGN_LEFT==eAlignment)
+ if(eAlignment==LABEL_ALIGN_LEFT)
aScreenPosition2D.X -= nOffset;
- else if(LABEL_ALIGN_RIGHT==eAlignment)
+ else if(eAlignment==LABEL_ALIGN_RIGHT)
aScreenPosition2D.X += nOffset;
- else if(LABEL_ALIGN_TOP==eAlignment)
+ else if(eAlignment==LABEL_ALIGN_TOP)
aScreenPosition2D.Y -= nOffset;
- else if(LABEL_ALIGN_BOTTOM==eAlignment)
+ else if(eAlignment==LABEL_ALIGN_BOTTOM)
aScreenPosition2D.Y += nOffset;
uno::Reference< drawing::XShapes > xTarget_ =
@@ -660,21 +660,21 @@ uno::Reference< drawing::XShape > VSeriesPlotter::createDataLabel( const uno::Re
nLineCountForSymbolsize = 1;
aSymbolPosition.Y += ((aTextSize.Height/nLineCountForSymbolsize)/4);
- if(LABEL_ALIGN_LEFT==eAlignment
- || LABEL_ALIGN_LEFT_TOP==eAlignment
- || LABEL_ALIGN_LEFT_BOTTOM==eAlignment)
+ if(eAlignment==LABEL_ALIGN_LEFT
+ || eAlignment==LABEL_ALIGN_LEFT_TOP
+ || eAlignment==LABEL_ALIGN_LEFT_BOTTOM)
{
aSymbolPosition.X -= nXDiff;
}
- else if(LABEL_ALIGN_RIGHT==eAlignment
- || LABEL_ALIGN_RIGHT_TOP==eAlignment
- || LABEL_ALIGN_RIGHT_BOTTOM==eAlignment )
+ else if(eAlignment==LABEL_ALIGN_RIGHT
+ || eAlignment==LABEL_ALIGN_RIGHT_TOP
+ || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM )
{
aNewTextPos.X += nXDiff;
}
- else if(LABEL_ALIGN_TOP==eAlignment
- || LABEL_ALIGN_BOTTOM==eAlignment
- || LABEL_ALIGN_CENTER==eAlignment )
+ else if(eAlignment==LABEL_ALIGN_TOP
+ || eAlignment==LABEL_ALIGN_BOTTOM
+ || eAlignment==LABEL_ALIGN_CENTER )
{
aSymbolPosition.X -= nXDiff/2;
aNewTextPos.X += nXDiff/2;
@@ -1387,17 +1387,17 @@ long VSeriesPlotter::calculateTimeResolutionOnXAxis()
for(;aIt!=aEnd;++aIt)
{
Date aCurrent(aNullDate); aCurrent+=static_cast<long>(rtl::math::approxFloor(*aIt));
- if( css::chart::TimeUnit::YEAR == nRet )
+ if( nRet == css::chart::TimeUnit::YEAR )
{
if( DateHelper::IsInSameYear( aPrevious, aCurrent ) )
nRet = css::chart::TimeUnit::MONTH;
}
- if( css::chart::TimeUnit::MONTH == nRet )
+ if( nRet == css::chart::TimeUnit::MONTH )
{
if( DateHelper::IsInSameMonth( aPrevious, aCurrent ) )
nRet = css::chart::TimeUnit::DAY;
}
- if( css::chart::TimeUnit::DAY == nRet )
+ if( nRet == css::chart::TimeUnit::DAY )
break;
aPrevious=aCurrent;
}
@@ -1491,7 +1491,7 @@ double VSeriesPlotter::getMinimumZ()
}
double VSeriesPlotter::getMaximumZ()
{
- if( 3!=m_nDimension || !m_aZSlots.size() )
+ if( m_nDimension!=3 || !m_aZSlots.size() )
return getMinimumZ()+1;
return m_aZSlots.size();
}
diff --git a/chart2/source/view/diagram/VDiagram.cxx b/chart2/source/view/diagram/VDiagram.cxx
index 29c5ab3d49c4..5c8ef0be6eac 100644
--- a/chart2/source/view/diagram/VDiagram.cxx
+++ b/chart2/source/view/diagram/VDiagram.cxx
@@ -503,16 +503,16 @@ void VDiagram::createShapes_3d()
//add left wall
{
- short nRotatedTexture = ( CuboidPlanePosition_Front==eBackWallPos ) ? 3 : 1;
+ short nRotatedTexture = ( eBackWallPos==CuboidPlanePosition_Front ) ? 3 : 1;
double xPos = 0.0;
- if( CuboidPlanePosition_Right==eLeftWallPos )
+ if( eLeftWallPos==CuboidPlanePosition_Right )
xPos = FIXED_SIZE_FOR_3D_CHART_VOLUME;
Stripe aStripe( drawing::Position3D(xPos,FIXED_SIZE_FOR_3D_CHART_VOLUME,0)
, drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME)
, drawing::Direction3D(0,-FIXED_SIZE_FOR_3D_CHART_VOLUME,0) );
- if( CuboidPlanePosition_Right==eLeftWallPos )
+ if( eLeftWallPos==CuboidPlanePosition_Right )
{
- nRotatedTexture = ( CuboidPlanePosition_Front==eBackWallPos ) ? 2 : 0;
+ nRotatedTexture = ( eBackWallPos==CuboidPlanePosition_Front ) ? 2 : 0;
aStripe = Stripe( drawing::Position3D(xPos,FIXED_SIZE_FOR_3D_CHART_VOLUME,0)
, drawing::Direction3D(0,-FIXED_SIZE_FOR_3D_CHART_VOLUME,0)
, drawing::Direction3D(0,0,FIXED_SIZE_FOR_3D_CHART_VOLUME) );
@@ -533,12 +533,12 @@ void VDiagram::createShapes_3d()
{
short nRotatedTexture = 0;
double zPos = 0.0;
- if( CuboidPlanePosition_Front==eBackWallPos )
+ if( eBackWallPos==CuboidPlanePosition_Front )
zPos = FIXED_SIZE_FOR_3D_CHART_VOLUME;
Stripe aStripe( drawing::Position3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,zPos)
, drawing::Direction3D(0,-FIXED_SIZE_FOR_3D_CHART_VOLUME,0)
, drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,0,0) );
- if( CuboidPlanePosition_Front==eBackWallPos )
+ if( eBackWallPos==CuboidPlanePosition_Front )
{
aStripe = Stripe( drawing::Position3D(0,FIXED_SIZE_FOR_3D_CHART_VOLUME,zPos)
, drawing::Direction3D(FIXED_SIZE_FOR_3D_CHART_VOLUME,0,0)
@@ -626,7 +626,7 @@ void VDiagram::createShapes_3d()
, xFloorProp, PropertyMapper::getPropertyNameMapForFillAndLineProperties(), bDoubleSided );
CuboidPlanePosition eBottomPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardBottom( uno::Reference< beans::XPropertySet >( m_xDiagram, uno::UNO_QUERY ) ) );
- if( !bAddFloorAndWall || (CuboidPlanePosition_Bottom!=eBottomPos) )
+ if( !bAddFloorAndWall || (eBottomPos!=CuboidPlanePosition_Bottom) )
{
//we always need this object as dummy object for correct scene dimensions
//but it should not be visible in this case:
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index ccaa3f868444..7475767977c6 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -514,7 +514,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
for( sal_Int32 nT = 0; nT < aChartTypeList.getLength(); ++nT )
{
uno::Reference< XChartType > xChartType( aChartTypeList[nT] );
- if(3 == nDimensionCount && xChartType->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE))
+ if(nDimensionCount == 3 && xChartType->getChartType().equalsIgnoreAsciiCase(CHART2_SERVICE_NAME_CHARTTYPE_PIE))
{
uno::Reference< beans::XPropertySet > xPropertySet( xChartType, uno::UNO_QUERY );
if (xPropertySet.is())
@@ -534,7 +534,7 @@ void SeriesPlotterContainer::initializeCooSysAndSeriesPlotter(
if(nT==0)
m_bChartTypeUsesShiftedCategoryPositionPerDefault = ChartTypeHelper::shiftCategoryPosAtXAxisPerDefault( xChartType );
- bool bExcludingPositioning = DiagramPositioningMode_EXCLUDING == DiagramHelper::getDiagramPositioningMode( xDiagram );
+ bool bExcludingPositioning = DiagramHelper::getDiagramPositioningMode( xDiagram ) == DiagramPositioningMode_EXCLUDING;
VSeriesPlotter* pPlotter = VSeriesPlotter::createSeriesPlotter( xChartType, nDimensionCount, bExcludingPositioning );
if( !pPlotter )
continue;
@@ -965,17 +965,17 @@ void SeriesPlotterContainer::AdaptScaleOfYAxisWithoutAttachedSeries( ChartModel&
if( xCrossingMainAxis.is() )
{
xCrossingMainAxis->getPropertyValue("CrossoverPosition") >>= eCrossingMainAxisPos;
- if( css::chart::ChartAxisPosition_VALUE == eCrossingMainAxisPos )
+ if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_VALUE )
{
double fValue = 0.0;
xCrossingMainAxis->getPropertyValue("CrossoverValue") >>= fValue;
aExplicitScale.Origin = fValue;
}
- else if( css::chart::ChartAxisPosition_ZERO == eCrossingMainAxisPos )
+ else if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_ZERO )
aExplicitScale.Origin = 0.0;
- else if( css::chart::ChartAxisPosition_START == eCrossingMainAxisPos )
+ else if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_START )
aExplicitScale.Origin = aExplicitScale.Minimum;
- else if( css::chart::ChartAxisPosition_END == eCrossingMainAxisPos )
+ else if( eCrossingMainAxisPos == css::chart::ChartAxisPosition_END )
aExplicitScale.Origin = aExplicitScale.Maximum;
}
@@ -1376,8 +1376,8 @@ sal_Bool SAL_CALL ChartView::isDataFlavorSupported( const datatransfer::DataFlav
// ____ XUnoTunnel ___
::sal_Int64 SAL_CALL ChartView::getSomething( const uno::Sequence< ::sal_Int8 >& aIdentifier )
{
- if( aIdentifier.getLength() == 16 && 0 == memcmp( ExplicitValueProvider::getUnoTunnelId().getConstArray(),
- aIdentifier.getConstArray(), 16 ) )
+ if( aIdentifier.getLength() == 16 && memcmp( ExplicitValueProvider::getUnoTunnelId().getConstArray(),
+ aIdentifier.getConstArray(), 16 ) == 0 )
{
ExplicitValueProvider* pProvider = this;
return reinterpret_cast<sal_Int64>(pProvider);
@@ -1593,7 +1593,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
for( nC=0; nC < rVCooSysList.size(); nC++)
{
VCoordinateSystem* pVCooSys = rVCooSysList[nC];
- if(3==nDimensionCount)
+ if(nDimensionCount==3)
{
uno::Reference<beans::XPropertySet> xSceneProperties( xDiagram, uno::UNO_QUERY );
CuboidPlanePosition eLeftWallPos( ThreeDHelper::getAutomaticCuboidPlanePositionForStandardLeftWall( xSceneProperties ) );
@@ -1726,7 +1726,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
pSeriesPlotter->initPlotter( xSeriesTarget,xTextTargetShapes,m_xShapeFactory,aCID );
pSeriesPlotter->setPageReferenceSize( rPageSize );
VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, pSeriesPlotter );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
pSeriesPlotter->setTransformationSceneToScreen( pVCooSys->getTransformationSceneToScreen() );
//better performance for big data
{
@@ -1771,7 +1771,7 @@ awt::Rectangle ChartView::impl_createDiagramAndContent( const CreateShapeParam2D
for( std::unique_ptr<VSeriesPlotter>& aPlotter : rSeriesPlotterList )
{
VCoordinateSystem* pVCooSys = lcl_getCooSysForPlotter( rVCooSysList, aPlotter.get() );
- if(2==nDimensionCount)
+ if(nDimensionCount==2)
aPlotter->setTransformationSceneToScreen( pVCooSys->getTransformationSceneToScreen() );
aPlotter->createShapes();
m_bPointsWereSkipped = m_bPointsWereSkipped || aPlotter->PointsWereSkipped();
diff --git a/chart2/source/view/main/DummyXShape.cxx b/chart2/source/view/main/DummyXShape.cxx
index 541af7fcd5b4..59fafeddfb3d 100644
--- a/chart2/source/view/main/DummyXShape.cxx
+++ b/chart2/source/view/main/DummyXShape.cxx
@@ -571,7 +571,7 @@ void DummyLine2D::render()
{
uno::Any cow = itr->second;
drawing::LineStyle nStyle = cow.get<drawing::LineStyle>();
- if (drawing::LineStyle_NONE == nStyle)
+ if (nStyle == drawing::LineStyle_NONE)
{
// nothing to render
return;
@@ -687,7 +687,7 @@ void DummyRectangle::render()
{
uno::Any cow = itr->second;
drawing::LineStyle nStyle = cow.get<drawing::LineStyle>();
- if (drawing::LineStyle_NONE == nStyle)
+ if (nStyle == drawing::LineStyle_NONE)
{
bBorder = false;
}
diff --git a/chart2/source/view/main/GL3DRenderer.cxx b/chart2/source/view/main/GL3DRenderer.cxx
index fe4e7e8e9449..8f2deb44b353 100644
--- a/chart2/source/view/main/GL3DRenderer.cxx
+++ b/chart2/source/view/main/GL3DRenderer.cxx
@@ -1274,7 +1274,7 @@ void OpenGL3DRenderer::Init3DUniformBlock()
GLuint a3DLightBlockIndex = glGetUniformBlockIndex(maResources.m_3DProID, "GlobalLights");
GLuint a3DMaterialBlockIndex = glGetUniformBlockIndex(maResources.m_3DProID, "GlobalMaterialParameters");
- if ((GL_INVALID_INDEX == a3DLightBlockIndex) || (GL_INVALID_INDEX == a3DMaterialBlockIndex))
+ if ((a3DLightBlockIndex == GL_INVALID_INDEX) || (a3DMaterialBlockIndex == GL_INVALID_INDEX))
{
return;
}
@@ -1310,7 +1310,7 @@ void OpenGL3DRenderer::InitBatch3DUniformBlock()
GLuint a3DLightBlockIndex = glGetUniformBlockIndex(maResources.m_3DBatchProID, "GlobalLights");
GLuint a3DMaterialBlockIndex = glGetUniformBlockIndex(maResources.m_3DBatchProID, "GlobalMaterialParameters");
- if ((GL_INVALID_INDEX == a3DLightBlockIndex) || (GL_INVALID_INDEX == a3DMaterialBlockIndex))
+ if ((a3DLightBlockIndex == GL_INVALID_INDEX) || (a3DMaterialBlockIndex == GL_INVALID_INDEX))
{
return;
}
diff --git a/chart2/source/view/main/LabelPositionHelper.cxx b/chart2/source/view/main/LabelPositionHelper.cxx
index 50b18e7d2c3f..22de96f188a2 100644
--- a/chart2/source/view/main/LabelPositionHelper.cxx
+++ b/chart2/source/view/main/LabelPositionHelper.cxx
@@ -57,9 +57,9 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const
//HorizontalAdjustment
{
drawing::TextHorizontalAdjust eHorizontalAdjust = drawing::TextHorizontalAdjust_CENTER;
- if( LABEL_ALIGN_RIGHT==eAlignment || LABEL_ALIGN_RIGHT_TOP==eAlignment || LABEL_ALIGN_RIGHT_BOTTOM==eAlignment )
+ if( eAlignment==LABEL_ALIGN_RIGHT || eAlignment==LABEL_ALIGN_RIGHT_TOP || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM )
eHorizontalAdjust = drawing::TextHorizontalAdjust_LEFT;
- else if( LABEL_ALIGN_LEFT==eAlignment || LABEL_ALIGN_LEFT_TOP==eAlignment || LABEL_ALIGN_LEFT_BOTTOM==eAlignment )
+ else if( eAlignment==LABEL_ALIGN_LEFT || eAlignment==LABEL_ALIGN_LEFT_TOP || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eHorizontalAdjust = drawing::TextHorizontalAdjust_RIGHT;
uno::Any* pHorizontalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextHorizontalAdjust");
if(pHorizontalAdjustAny)
@@ -69,9 +69,9 @@ void LabelPositionHelper::changeTextAdjustment( tAnySequence& rPropValues, const
//VerticalAdjustment
{
drawing::TextVerticalAdjust eVerticalAdjust = drawing::TextVerticalAdjust_CENTER;
- if( LABEL_ALIGN_TOP==eAlignment || LABEL_ALIGN_RIGHT_TOP==eAlignment || LABEL_ALIGN_LEFT_TOP==eAlignment )
+ if( eAlignment==LABEL_ALIGN_TOP || eAlignment==LABEL_ALIGN_RIGHT_TOP || eAlignment==LABEL_ALIGN_LEFT_TOP )
eVerticalAdjust = drawing::TextVerticalAdjust_BOTTOM;
- else if( LABEL_ALIGN_BOTTOM==eAlignment || LABEL_ALIGN_RIGHT_BOTTOM==eAlignment || LABEL_ALIGN_LEFT_BOTTOM==eAlignment )
+ else if( eAlignment==LABEL_ALIGN_BOTTOM || eAlignment==LABEL_ALIGN_RIGHT_BOTTOM || eAlignment==LABEL_ALIGN_LEFT_BOTTOM )
eVerticalAdjust = drawing::TextVerticalAdjust_TOP;
uno::Any* pVerticalAdjustAny = PropertyMapper::getValuePointer(rPropValues,rPropNames,"TextVerticalAdjust");
if(pVerticalAdjustAny)
diff --git a/chart2/source/view/main/PlottingPositionHelper.cxx b/chart2/source/view/main/PlottingPositionHelper.cxx
index 6035cf06a85d..f378e32a4b73 100644
--- a/chart2/source/view/main/PlottingPositionHelper.cxx
+++ b/chart2/source/view/main/PlottingPositionHelper.cxx
@@ -142,9 +142,9 @@ uno::Reference< XTransformation > PlottingPositionHelper::getTransformationScale
double fWidthY = MaxY - MinY;
double fWidthZ = MaxZ - MinZ;
- double fScaleDirectionX = AxisOrientation_MATHEMATICAL==nXAxisOrientation ? 1.0 : -1.0;
- double fScaleDirectionY = AxisOrientation_MATHEMATICAL==nYAxisOrientation ? 1.0 : -1.0;
- double fScaleDirectionZ = AxisOrientation_MATHEMATICAL==nZAxisOrientation ? -1.0 : 1.0;
+ double fScaleDirectionX = nXAxisOrientation==AxisOrientation_MATHEMATICAL ? 1.0 : -1.0;
+ double fScaleDirectionY = nYAxisOrientation==AxisOrientation_MATHEMATICAL ? 1.0 : -1.0;
+ double fScaleDirectionZ = nZAxisOrientation==AxisOrientation_MATHEMATICAL ? -1.0 : 1.0;
double fScaleX = fScaleDirectionX*FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthX;
double fScaleY = fScaleDirectionY*FIXED_SIZE_FOR_3D_CHART_VOLUME/fWidthY;
@@ -152,15 +152,15 @@ uno::Reference< XTransformation > PlottingPositionHelper::getTransformationScale
aMatrix.scale(fScaleX, fScaleY, fScaleZ);
- if( AxisOrientation_MATHEMATICAL==nXAxisOrientation )
+ if( nXAxisOrientation==AxisOrientation_MATHEMATICAL )
aMatrix.translate(-MinX*fScaleX, 0.0, 0.0);
else
aMatrix.translate(-MaxX*fScaleX, 0.0, 0.0);
- if( AxisOrientation_MATHEMATICAL==nYAxisOrientation )
+ if( nYAxisOrientation==AxisOrientation_MATHEMATICAL )
aMatrix.translate(0.0, -MinY*fScaleY, 0.0);
else
aMatrix.translate(0.0, -MaxY*fScaleY, 0.0);
- if( AxisOrientation_MATHEMATICAL==nZAxisOrientation )
+ if( nZAxisOrientation==AxisOrientation_MATHEMATICAL )
aMatrix.translate(0.0, 0.0, -MaxZ*fScaleZ);//z direction in draw is reverse mathematical direction
else
aMatrix.translate(0.0, 0.0, -MinZ*fScaleZ);
@@ -206,7 +206,7 @@ awt::Point PlottingPositionHelper::transformSceneToScreenPosition( const drawing
awt::Point aScreenPoint( static_cast<sal_Int32>(rScenePosition3D.PositionX), static_cast<sal_Int32>(rScenePosition3D.PositionY) );
//transformation from scene to screen (only necessary for 3D):
- if(3==nDimensionCount)
+ if(nDimensionCount==3)
{
//create 3D anchor shape
tPropertyNameMap aDummyPropertyNameMap;
@@ -366,14 +366,14 @@ void PolarPlottingPositionHelper::setScales( const std::vector< ExplicitScaleDat
double fTranslateLogicZ;
double fScaleLogicZ;
{
- double fScaleDirectionZ = AxisOrientation_MATHEMATICAL==m_aScales[2].Orientation ? 1.0 : -1.0;
+ double fScaleDirectionZ = m_aScales[2].Orientation==AxisOrientation_MATHEMATICAL ? 1.0 : -1.0;
double MinZ = getLogicMinZ();
double MaxZ = getLogicMaxZ();
doLogicScaling( nullptr, nullptr, &MinZ );
doLogicScaling( nullptr, nullptr, &MaxZ );
double fWidthZ = MaxZ - MinZ;
- if( AxisOrientation_MATHEMATICAL==m_aScales[2].Orientation )
+ if( m_aScales[2].Orientation==AxisOrientation_MATHEMATICAL )
fTranslateLogicZ=MinZ;
else
fTranslateLogicZ=MaxZ;
@@ -405,7 +405,7 @@ uno::Reference< XTransformation > PolarPlottingPositionHelper::getTransformation
double PolarPlottingPositionHelper::getWidthAngleDegree( double& fStartLogicValueOnAngleAxis, double& fEndLogicValueOnAngleAxis ) const
{
const ExplicitScaleData& rAngleScale = m_bSwapXAndY ? m_aScales[1] : m_aScales[0];
- if( AxisOrientation_MATHEMATICAL != rAngleScale.Orientation )
+ if( rAngleScale.Orientation != AxisOrientation_MATHEMATICAL )
{
double fHelp = fEndLogicValueOnAngleAxis;
fEndLogicValueOnAngleAxis = fStartLogicValueOnAngleAxis;
@@ -439,7 +439,7 @@ double PolarPlottingPositionHelper::transformToAngleDegree( double fLogicValueOn
double fAxisAngleScaleDirection = 1.0;
{
const ExplicitScaleData& rScale = m_bSwapXAndY ? m_aScales[1] : m_aScales[0];
- if(AxisOrientation_MATHEMATICAL != rScale.Orientation)
+ if(rScale.Orientation != AxisOrientation_MATHEMATICAL)
fAxisAngleScaleDirection *= -1.0;
}
@@ -566,7 +566,7 @@ double PolarPlottingPositionHelper::transformToRadius( double fLogicValueOnRadiu
bool bMinIsInnerRadius = true;
const ExplicitScaleData& rScale = m_bSwapXAndY ? m_aScales[0] : m_aScales[1];
- if(AxisOrientation_MATHEMATICAL != rScale.Orientation)
+ if(rScale.Orientation != AxisOrientation_MATHEMATICAL)
bMinIsInnerRadius = false;
double fInnerScaledLogicRadius=0.0;
@@ -638,7 +638,7 @@ drawing::Position3D PolarPlottingPositionHelper::transformAngleRadiusToScene( do
double PolarPlottingPositionHelper::getOuterLogicRadius() const
{
const ExplicitScaleData& rScale = m_bSwapXAndY ? m_aScales[0] : m_aScales[1];
- if( AxisOrientation_MATHEMATICAL==rScale.Orientation )
+ if( rScale.Orientation==AxisOrientation_MATHEMATICAL )
return rScale.Maximum;
else
return rScale.Minimum;
diff --git a/chart2/source/view/main/PolarLabelPositionHelper.cxx b/chart2/source/view/main/PolarLabelPositionHelper.cxx
index 809620bb8f42..a5d266f545ea 100644
--- a/chart2/source/view/main/PolarLabelPositionHelper.cxx
+++ b/chart2/source/view/main/PolarLabelPositionHelper.cxx
@@ -80,7 +80,7 @@ awt::Point PolarLabelPositionHelper::getLabelScreenPositionAndAlignmentForUnitCi
awt::Point aRet( this->transformSceneToScreenPosition(
m_pPosHelper->transformUnitCircleToScene( fAngleDegree, fRadius, fLogicZ+0.5 ) ) );
- if(3==m_nDimensionCount && nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE)
+ if(m_nDimensionCount==3 && nLabelPlacement == css::chart::DataLabelPlacement::OUTSIDE)
{
//check whether the upper or the downer edge is more distant from the center
//take the farest point to put the label to
diff --git a/chart2/source/view/main/VLineProperties.cxx b/chart2/source/view/main/VLineProperties.cxx
index 2c0330bf2ff9..614770a199de 100644
--- a/chart2/source/view/main/VLineProperties.cxx
+++ b/chart2/source/view/main/VLineProperties.cxx
@@ -66,7 +66,7 @@ bool VLineProperties::isLineVisible() const
{
sal_Int16 nLineTransparence=0;
this->Transparence >>= nLineTransparence;
- if(100!=nLineTransparence)
+ if(nLineTransparence!=100)
{
bRet = true;
}