diff options
Diffstat (limited to 'chart2')
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.cxx | 10 | ||||
-rw-r--r-- | chart2/source/view/axes/VCartesianAxis.hxx | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/chart2/source/view/axes/VCartesianAxis.cxx b/chart2/source/view/axes/VCartesianAxis.cxx index 0da7b5e41568..6867ab1069be 100644 --- a/chart2/source/view/axes/VCartesianAxis.cxx +++ b/chart2/source/view/axes/VCartesianAxis.cxx @@ -367,9 +367,13 @@ bool lcl_hasWordBreak( const Reference< drawing::XShape >& rxShape ) return false; } +/** + * Iterate through only the first 2 and last 2 tick info items, and the tick + * that has the longest text (in terms of character length) in case it's not + * in the first or last 2 items. + */ class MaxLabelTickIter : public TickIter { - //iterate over first two and last two labels and the longest label public: MaxLabelTickIter( ::std::vector< TickInfo >& rTickInfoVector , sal_Int32 nLongestLabelIndex ); @@ -604,10 +608,6 @@ bool VCartesianAxis::createTextShapes( , TickFactory2D* pTickFactory , sal_Int32 nScreenDistanceBetweenTicks ) { - //returns true if the text shapes have been created successfully - //otherwise false - in this case the AxisLabelProperties have changed - //and contain new instructions for the next try for text shape creation - uno::Reference<chart2::XScaling> xInverseScaling(NULL); if( m_aScale.Scaling.is() ) xInverseScaling = m_aScale.Scaling->getInverseScaling(); diff --git a/chart2/source/view/axes/VCartesianAxis.hxx b/chart2/source/view/axes/VCartesianAxis.hxx index 41d23b6d7dd6..22a52e95d19f 100644 --- a/chart2/source/view/axes/VCartesianAxis.hxx +++ b/chart2/source/view/axes/VCartesianAxis.hxx @@ -99,6 +99,12 @@ public: }; protected: //methods + /** + * @return true if the text shapes have been successfully created, + * otherwise false. Returning false means the AxisLabelProperties + * have changed during the call, and the caller needs to call this + * method once again to get the text shapes created. + */ bool createTextShapes( const ::com::sun::star::uno::Reference< ::com::sun::star::drawing::XShapes >& xTarget , TickIter& rTickIter |