summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chart2/source/view/axes/VAxisProperties.cxx3
-rw-r--r--chart2/source/view/main/VLegend.cxx5
2 files changed, 3 insertions, 5 deletions
diff --git a/chart2/source/view/axes/VAxisProperties.cxx b/chart2/source/view/axes/VAxisProperties.cxx
index 27a4950a886b..c6e296e277ed 100644
--- a/chart2/source/view/axes/VAxisProperties.cxx
+++ b/chart2/source/view/axes/VAxisProperties.cxx
@@ -286,10 +286,9 @@ void AxisProperties::init( bool bCartesian )
{
maLabelAlignment.mfLabelDirection *= -1.0;
maLabelAlignment.mfInnerTickDirection *= -1.0;
- }
- if( bIsYAxisPosition )
maLabelAlignment.meAlignment = lcl_getLabelAlignmentForYAxis(*this);
+ }
else
maLabelAlignment.meAlignment = lcl_getLabelAlignmentForXAxis(*this);
}
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 704a48872bf5..77e6b5800dc5 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -348,10 +348,9 @@ awt::Size lcl_placeLegendEntries(
//all good proceed with next entry
continue;
}
- }
- if( nCurrentColumn < nCurrentColumnCount )
+
aColumnWidths[nCurrentColumn] = std::max( nNewWidth, aColumnWidths[nCurrentColumn] );
- else
+ } else
aColumnWidths.push_back(nNewWidth);
//do the columns still fit into the given size?