summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2022-02-17 11:44:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2022-02-17 14:51:23 +0100
commit2cbf83e20889351e2d2a6e29e5c7d9250af58647 (patch)
tree9cea9bf90ff8bfcf79e7d2b827fdea9bdfdf8ad1 /chart2
parent51648c8de8dc060abc8dff1af105acfccadab77d (diff)
loplugin:unusedmethods
Change-Id: I58c60262ca543bafb4db4433dbb98b195f7571ea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/130063 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/inc/AxisHelper.hxx13
-rw-r--r--chart2/source/inc/CommonConverters.hxx23
-rw-r--r--chart2/source/inc/DataInterpreter.hxx6
-rw-r--r--chart2/source/inc/DataSeriesHelper.hxx11
-rw-r--r--chart2/source/inc/DataSourceHelper.hxx3
-rw-r--r--chart2/source/inc/RegressionCurveHelper.hxx2
-rw-r--r--chart2/source/inc/TitleHelper.hxx4
-rw-r--r--chart2/source/inc/WeakListenerAdapter.hxx13
-rw-r--r--chart2/source/model/template/DataInterpreter.cxx15
-rw-r--r--chart2/source/tools/AxisHelper.cxx70
-rw-r--r--chart2/source/tools/DataSeriesHelper.cxx113
-rw-r--r--chart2/source/tools/DataSourceHelper.cxx6
-rw-r--r--chart2/source/tools/RegressionCurveHelper.cxx22
-rw-r--r--chart2/source/tools/TitleHelper.cxx21
-rw-r--r--chart2/source/tools/WeakListenerAdapter.cxx15
-rw-r--r--chart2/source/view/main/VLegend.cxx19
-rw-r--r--chart2/source/view/main/VLegend.hxx2
17 files changed, 1 insertions, 357 deletions
diff --git a/chart2/source/inc/AxisHelper.hxx b/chart2/source/inc/AxisHelper.hxx
index 2cb10b832254..cd51d5adb3f6 100644
--- a/chart2/source/inc/AxisHelper.hxx
+++ b/chart2/source/inc/AxisHelper.hxx
@@ -56,7 +56,6 @@ public:
static bool isLogarithmic( const css::uno::Reference< css::chart2::XScaling >& xScaling );
static void checkDateAxis( css::chart2::ScaleData& rScale, ExplicitCategoriesProvider* pExplicitCategoriesProvider, bool bChartTypeAllowsDateAxis );
- static css::chart2::ScaleData getDateCheckedScale( const css::uno::Reference< css::chart2::XAxis >& xAxis, ChartModel& rModel );
static css::chart2::ScaleData getDateCheckedScale( const rtl::Reference< ::chart::Axis >& xAxis, ChartModel& rModel );
static sal_Int32 getExplicitNumberFormatKeyForAxis(
@@ -102,16 +101,12 @@ public:
static bool isGridShown( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bool bMainGrid
, const rtl::Reference< ::chart::Diagram >& xDiagram );
- static void makeAxisVisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
static void makeAxisVisible( const rtl::Reference< ::chart::Axis >& xAxis );
static void makeGridVisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
- static void makeAxisInvisible( const css::uno::Reference< css::chart2::XAxis >& xAxis );
static void makeAxisInvisible( const rtl::Reference< ::chart::Axis >& xAxis );
static void makeGridInvisible( const css::uno::Reference< css::beans::XPropertySet >& xGridProperties );
- static void hideAxisIfNoDataIsAttached( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const rtl::Reference< ::chart::Diagram >& xDiagram);
static void hideAxisIfNoDataIsAttached( const rtl::Reference< ::chart::Axis >& xAxis
, const rtl::Reference< ::chart::Diagram >& xDiagram);
@@ -150,9 +145,6 @@ public:
static rtl::Reference< ::chart::Axis >
getParallelAxis( const css::uno::Reference< css::chart2::XAxis >& xAxis
, const rtl::Reference< ::chart::Diagram >& xDiagram );
- static rtl::Reference< ::chart::Axis >
- getParallelAxis( const rtl::Reference< ::chart::Axis >& xAxis
- , const rtl::Reference< ::chart::Diagram >& xDiagram );
static css::uno::Reference< css::beans::XPropertySet >
getGridProperties( const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys
@@ -162,9 +154,6 @@ public:
);
static sal_Int32 getDimensionIndexOfAxis(
- const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const rtl::Reference< ::chart::Diagram >& xDiagram );
- static sal_Int32 getDimensionIndexOfAxis(
const rtl::Reference< ::chart::Axis >& xAxis
, const rtl::Reference< ::chart::Diagram >& xDiagram );
@@ -219,8 +208,6 @@ public:
, const css::uno::Reference< css::uno::XComponentContext >& xContext
, ReferenceSizeProvider * pRefSizeProvider );
- static bool shouldAxisBeDisplayed( const css::uno::Reference< css::chart2::XAxis >& xAxis
- , const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
static bool shouldAxisBeDisplayed( const rtl::Reference< ::chart::Axis >& xAxis
, const rtl::Reference< ::chart::BaseCoordinateSystem >& xCooSys );
static bool isSecondaryYAxisNeeded( const rtl::Reference<
diff --git a/chart2/source/inc/CommonConverters.hxx b/chart2/source/inc/CommonConverters.hxx
index 682290b44e16..0e49b79dca1d 100644
--- a/chart2/source/inc/CommonConverters.hxx
+++ b/chart2/source/inc/CommonConverters.hxx
@@ -179,30 +179,9 @@ OOO_DLLPUBLIC_CHARTTOOLS
css::uno::Sequence< OUString > DataSequenceToStringSequence(
const css::uno::Reference< css::chart2::data::XDataSequence > & xDataSequence );
-/** uno::Sequence< uno::Sequence< T > > -> uno::Sequence< T >
+/** std::vector< std::vector< T > > -> std::vector< T >
*/
template< typename T >
-css::uno::Sequence< T >
- FlattenSequence( const css::uno::Sequence< css::uno::Sequence< T > > & aSeqSeq )
-{
- sal_Int32 nOuter, nInner, nCount = 0,
- nResultSize = 0;
- const sal_Int32 nOuterSize = aSeqSeq.getLength();
- for( nOuter=0; nOuter<nOuterSize; ++nOuter )
- nResultSize += aSeqSeq[nOuter].getLength();
- css::uno::Sequence< T > aResult( nResultSize );
- auto aResultRange = asNonConstRange(aResult);
-
- for( nOuter=0; nOuter<nOuterSize; ++nOuter )
- {
- const sal_Int32 nInnerSize = aSeqSeq[nOuter].getLength();
- for( nInner=0; nInner<nInnerSize; ++nInner, ++nCount )
- aResultRange[nCount] = aSeqSeq[nOuter][nInner];
- }
- return aResult;
-}
-
-template< typename T >
std::vector< T >
FlattenSequence( const std::vector< std::vector< T > > & aSeqSeq )
{
diff --git a/chart2/source/inc/DataInterpreter.hxx b/chart2/source/inc/DataInterpreter.hxx
index cdb0db5cc909..aa0f5578e369 100644
--- a/chart2/source/inc/DataInterpreter.hxx
+++ b/chart2/source/inc/DataInterpreter.hxx
@@ -70,12 +70,6 @@ public:
static bool HasCategories(
const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
- const css::uno::Sequence< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rData );
- static bool HasCategories(
- const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
- const std::vector< rtl::Reference< LabeledDataSequence > > & rData );
- static bool HasCategories(
- const css::uno::Sequence< css::beans::PropertyValue > & rArguments,
const std::vector< css::uno::Reference< css::chart2::data::XLabeledDataSequence > > & rData );
static bool UseCategoriesAsX(
diff --git a/chart2/source/inc/DataSeriesHelper.hxx b/chart2/source/inc/DataSeriesHelper.hxx
index 71ea3df0115d..49ef078537bd 100644
--- a/chart2/source/inc/DataSeriesHelper.hxx
+++ b/chart2/source/inc/DataSeriesHelper.hxx
@@ -48,8 +48,6 @@ namespace chart::DataSeriesHelper
OOO_DLLPUBLIC_CHARTTOOLS OUString
getRole( const css::uno::Reference<css::chart2::data::XLabeledDataSequence>& xLabeledDataSequence );
-OOO_DLLPUBLIC_CHARTTOOLS OUString
- getRole( const rtl::Reference<::chart::LabeledDataSequence>& xLabeledDataSequence );
/** Retrieves the data sequence in the given data source that matches the
given role. If more than one sequences match the role, the first match
@@ -98,8 +96,6 @@ getAllDataSequences(
series.
*/
OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::DataSource >
- getDataSource( const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeries );
-OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::DataSource >
getDataSource( const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries );
/** Get the label of a series (e.g. for the legend)
@@ -109,9 +105,6 @@ OOO_DLLPUBLIC_CHARTTOOLS rtl::Reference< ::chart::DataSource >
to take its label.
*/
OOO_DLLPUBLIC_CHARTTOOLS OUString getDataSeriesLabel(
- const css::uno::Reference< css::chart2::XDataSeries > & xSeries,
- const OUString & rLabelSequenceRole );
-OOO_DLLPUBLIC_CHARTTOOLS OUString getDataSeriesLabel(
const rtl::Reference< ::chart::DataSeries > & xSeries,
const OUString & rLabelSequenceRole );
@@ -121,10 +114,6 @@ OOO_DLLPUBLIC_CHARTTOOLS OUString getLabelForLabeledDataSequence(
const css::uno::Reference< css::chart2::data::XLabeledDataSequence > & xLabeledSeq );
OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(
- const css::uno::Sequence< css::uno::Reference< css::chart2::XDataSeries > > & aSeries,
- const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
- StackMode eStackMode );
-OOO_DLLPUBLIC_CHARTTOOLS void setStackModeAtSeries(
const std::vector< rtl::Reference< ::chart::DataSeries > > & aSeries,
const rtl::Reference< ::chart::BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
StackMode eStackMode );
diff --git a/chart2/source/inc/DataSourceHelper.hxx b/chart2/source/inc/DataSourceHelper.hxx
index ff64d356e6d0..52ed68945917 100644
--- a/chart2/source/inc/DataSourceHelper.hxx
+++ b/chart2/source/inc/DataSourceHelper.hxx
@@ -86,9 +86,6 @@ public:
static rtl::Reference< ::chart::DataSource > getUsedData(
ChartModel& rModel );
- static rtl::Reference< ::chart::DataSource > getUsedData(
- const rtl::Reference<::chart::ChartModel>& xChartModel );
-
static bool detectRangeSegmentation(
const rtl::Reference<::chart::ChartModel>& xChartModel
, OUString& rOutRangeString
diff --git a/chart2/source/inc/RegressionCurveHelper.hxx b/chart2/source/inc/RegressionCurveHelper.hxx
index 7d7631cbdfc8..2666b41d9bb9 100644
--- a/chart2/source/inc/RegressionCurveHelper.hxx
+++ b/chart2/source/inc/RegressionCurveHelper.hxx
@@ -102,8 +102,6 @@ namespace chart::RegressionCurveHelper
*/
OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getFirstRegressTypeNotMeanValueLine(
const css::uno::Reference<css::chart2::XRegressionCurveContainer>& xCurveContainer );
- OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getFirstRegressTypeNotMeanValueLine(
- const rtl::Reference<::chart::DataSeries>& xCurveContainer );
OOO_DLLPUBLIC_CHARTTOOLS SvxChartRegress getRegressionType(
const css::uno::Reference<css::chart2::XRegressionCurve>& xCurve );
diff --git a/chart2/source/inc/TitleHelper.hxx b/chart2/source/inc/TitleHelper.hxx
index f6978674be0a..5eafa8bced23 100644
--- a/chart2/source/inc/TitleHelper.hxx
+++ b/chart2/source/inc/TitleHelper.hxx
@@ -85,10 +85,6 @@ public:
static bool getTitleType( eTitleType& rType
, const css::uno::Reference< css::chart2::XTitle >& xTitle
- , ChartModel& rModel);
-
- static bool getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
, const rtl::Reference< ::chart::ChartModel >& xModel );
static void hideTitle( eTitleType nTitleIndex,
const rtl::Reference< ::chart::ChartModel > & xModel);
diff --git a/chart2/source/inc/WeakListenerAdapter.hxx b/chart2/source/inc/WeakListenerAdapter.hxx
index 7240a5363f85..9df1e146125d 100644
--- a/chart2/source/inc/WeakListenerAdapter.hxx
+++ b/chart2/source/inc/WeakListenerAdapter.hxx
@@ -71,19 +71,6 @@ private:
css::uno::WeakReference< Listener > m_xListener;
};
-class WeakModifyListenerAdapter final :
- public WeakListenerAdapter< css::util::XModifyListener >
-{
-public:
- explicit WeakModifyListenerAdapter(
- const css::uno::WeakReference< css::util::XModifyListener > & xListener );
- virtual ~WeakModifyListenerAdapter() override;
-
-protected:
- // ____ XModifyListener ____
- virtual void SAL_CALL modified( const css::lang::EventObject& aEvent ) override;
-};
-
class WeakSelectionChangeListenerAdapter final :
public WeakListenerAdapter< css::view::XSelectionChangeListener >
{
diff --git a/chart2/source/model/template/DataInterpreter.cxx b/chart2/source/model/template/DataInterpreter.cxx
index 4d45d2a58278..2b3eb1537cce 100644
--- a/chart2/source/model/template/DataInterpreter.cxx
+++ b/chart2/source/model/template/DataInterpreter.cxx
@@ -343,21 +343,6 @@ uno::Any DataInterpreter::GetProperty(
bool DataInterpreter::HasCategories(
const Sequence< beans::PropertyValue > & rArguments,
- const Sequence< Reference< data::XLabeledDataSequence > > & rData )
-{
- bool bHasCategories = false;
-
- if( rArguments.hasElements() )
- GetProperty( rArguments, u"HasCategories" ) >>= bHasCategories;
-
- for( sal_Int32 nLSeqIdx=0; ! bHasCategories && nLSeqIdx<rData.getLength(); ++nLSeqIdx )
- bHasCategories = ( rData[nLSeqIdx].is() && GetRole( rData[nLSeqIdx]->getValues() ) == "categories");
-
- return bHasCategories;
-}
-
-bool DataInterpreter::HasCategories(
- const Sequence< beans::PropertyValue > & rArguments,
const std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > & rData )
{
bool bHasCategories = false;
diff --git a/chart2/source/tools/AxisHelper.cxx b/chart2/source/tools/AxisHelper.cxx
index 046822980bc0..c6005022544f 100644
--- a/chart2/source/tools/AxisHelper.cxx
+++ b/chart2/source/tools/AxisHelper.cxx
@@ -102,13 +102,6 @@ bool AxisHelper::isLogarithmic( const Reference< XScaling >& xScaling )
&& xServiceName->getServiceName() == "com.sun.star.chart2.LogarithmicScaling";
}
-chart2::ScaleData AxisHelper::getDateCheckedScale( const Reference< chart2::XAxis >& xAxis, ChartModel& rModel )
-{
- rtl::Reference< Axis > pAxis = dynamic_cast<Axis*>(xAxis.get());
- assert(pAxis || !xAxis);
- return getDateCheckedScale(pAxis, rModel);
-}
-
chart2::ScaleData AxisHelper::getDateCheckedScale( const rtl::Reference< Axis >& xAxis, ChartModel& rModel )
{
ScaleData aScale = xAxis->getScaleData();
@@ -459,17 +452,6 @@ void AxisHelper::showGrid( sal_Int32 nDimensionIndex, sal_Int32 nCooSysIndex, bo
}
}
-void AxisHelper::makeAxisVisible( const Reference< XAxis >& xAxis )
-{
- Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
- if( xProps.is() )
- {
- xProps->setPropertyValue( "Show", uno::Any( true ) );
- LinePropertiesHelper::SetLineVisible( xProps );
- xProps->setPropertyValue( "DisplayLabels", uno::Any( true ) );
- }
-}
-
void AxisHelper::makeAxisVisible( const rtl::Reference< Axis >& xAxis )
{
if( xAxis.is() )
@@ -495,15 +477,6 @@ void AxisHelper::hideAxis( sal_Int32 nDimensionIndex, bool bMainAxis
AxisHelper::makeAxisInvisible( AxisHelper::getAxis( nDimensionIndex, bMainAxis, xDiagram ) );
}
-void AxisHelper::makeAxisInvisible( const Reference< XAxis >& xAxis )
-{
- Reference< beans::XPropertySet > xProps( xAxis, uno::UNO_QUERY );
- if( xProps.is() )
- {
- xProps->setPropertyValue( "Show", uno::Any( false ) );
- }
-}
-
void AxisHelper::makeAxisInvisible( const rtl::Reference< Axis >& xAxis )
{
if( xAxis.is() )
@@ -512,13 +485,6 @@ void AxisHelper::makeAxisInvisible( const rtl::Reference< Axis >& xAxis )
}
}
-void AxisHelper::hideAxisIfNoDataIsAttached( const Reference< XAxis >& xAxis, const rtl::Reference< Diagram >& xDiagram )
-{
- rtl::Reference< Axis > pAxis = dynamic_cast<Axis*>(xAxis.get());
- assert(pAxis || !xAxis);
- hideAxisIfNoDataIsAttached(pAxis, xDiagram);
-}
-
void AxisHelper::hideAxisIfNoDataIsAttached( const rtl::Reference< Axis >& xAxis, const rtl::Reference< Diagram >& xDiagram )
{
//axis is hidden if no data is attached anymore but data is available
@@ -754,17 +720,6 @@ Reference< beans::XPropertySet > AxisHelper::getGridProperties(
}
sal_Int32 AxisHelper::getDimensionIndexOfAxis(
- const Reference< XAxis >& xAxis
- , const rtl::Reference< Diagram >& xDiagram )
-{
- sal_Int32 nDimensionIndex = -1;
- sal_Int32 nCooSysIndex = -1;
- sal_Int32 nAxisIndex = -1;
- AxisHelper::getIndicesForAxis( xAxis, xDiagram, nCooSysIndex , nDimensionIndex, nAxisIndex );
- return nDimensionIndex;
-}
-
-sal_Int32 AxisHelper::getDimensionIndexOfAxis(
const rtl::Reference< Axis >& xAxis
, const rtl::Reference< Diagram >& xDiagram )
{
@@ -968,31 +923,6 @@ bool AxisHelper::isSecondaryYAxisNeeded( const rtl::Reference< BaseCoordinateSys
return false;
}
-bool AxisHelper::shouldAxisBeDisplayed( const Reference< XAxis >& xAxis
- , const rtl::Reference< BaseCoordinateSystem >& xCooSys )
-{
- bool bRet = false;
-
- if( xAxis.is() && xCooSys.is() )
- {
- sal_Int32 nDimensionIndex=-1;
- sal_Int32 nAxisIndex=-1;
- if( AxisHelper::getIndicesForAxis( xAxis, xCooSys, nDimensionIndex, nAxisIndex ) )
- {
- sal_Int32 nDimensionCount = xCooSys->getDimension();
- rtl::Reference< ChartType > xChartType( AxisHelper::getChartTypeByIndex( xCooSys, 0 ) );
-
- bool bMainAxis = (nAxisIndex==MAIN_AXIS_INDEX);
- if( bMainAxis )
- bRet = ChartTypeHelper::isSupportingMainAxis(xChartType,nDimensionCount,nDimensionIndex);
- else
- bRet = ChartTypeHelper::isSupportingSecondaryAxis(xChartType,nDimensionCount);
- }
- }
-
- return bRet;
-}
-
bool AxisHelper::shouldAxisBeDisplayed( const rtl::Reference< Axis >& xAxis
, const rtl::Reference< BaseCoordinateSystem >& xCooSys )
{
diff --git a/chart2/source/tools/DataSeriesHelper.cxx b/chart2/source/tools/DataSeriesHelper.cxx
index df7bef5e1de5..af86b98add8f 100644
--- a/chart2/source/tools/DataSeriesHelper.cxx
+++ b/chart2/source/tools/DataSeriesHelper.cxx
@@ -201,18 +201,6 @@ OUString getRole( const uno::Reference< chart2::data::XLabeledDataSequence >& xL
return aRet;
}
-OUString getRole( const rtl::Reference< ::chart::LabeledDataSequence >& xLabeledDataSequence )
-{
- OUString aRet;
- if( xLabeledDataSequence.is() )
- {
- Reference< beans::XPropertySet > xProp( xLabeledDataSequence->getValues(), uno::UNO_QUERY );
- if( xProp.is() )
- xProp->getPropertyValue( "Role" ) >>= aRet;
- }
- return aRet;
-}
-
uno::Reference< chart2::data::XLabeledDataSequence >
getDataSequenceByRole(
const Reference< chart2::data::XDataSource > & xSource,
@@ -291,12 +279,6 @@ getAllDataSequences( const std::vector<rtl::Reference<DataSeries> >& aSeries )
return aSeqVec;
}
-rtl::Reference< ::chart::DataSource >
- getDataSource( const Sequence< Reference< chart2::XDataSeries > > & aSeries )
-{
- return new DataSource(getAllDataSequences(aSeries));
-}
-
rtl::Reference< DataSource >
getDataSource( const std::vector< rtl::Reference< DataSeries > > & aSeries )
{
@@ -392,37 +374,6 @@ OUString getLabelForLabeledDataSequence(
}
OUString getDataSeriesLabel(
- const Reference< chart2::XDataSeries > & xSeries,
- const OUString & rLabelSequenceRole )
-{
- OUString aResult;
-
- Reference< chart2::data::XDataSource > xSource( xSeries, uno::UNO_QUERY );
- if( xSource.is())
- {
- Reference< chart2::data::XLabeledDataSequence > xLabeledSeq(
- ::chart::DataSeriesHelper::getDataSequenceByRole( xSource, rLabelSequenceRole ));
- if( xLabeledSeq.is())
- aResult = getLabelForLabeledDataSequence( xLabeledSeq );
- else
- {
- // special case: labeled data series with only a label and no values may
- // serve as label
- xLabeledSeq.set( lcl_findLSequenceWithOnlyLabel( xSource ));
- if( xLabeledSeq.is())
- {
- Reference< chart2::data::XDataSequence > xSeq( xLabeledSeq->getLabel());
- if( xSeq.is())
- aResult = lcl_getDataSequenceLabel( xSeq );
- }
- }
-
- }
-
- return aResult;
-}
-
-OUString getDataSeriesLabel(
const rtl::Reference< DataSeries > & xSeries,
const OUString & rLabelSequenceRole )
{
@@ -453,70 +404,6 @@ OUString getDataSeriesLabel(
}
void setStackModeAtSeries(
- const Sequence< Reference< chart2::XDataSeries > > & aSeries,
- const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
- StackMode eStackMode )
-{
- const uno::Any aPropValue(
- ( (eStackMode == StackMode::YStacked) ||
- (eStackMode == StackMode::YStackedPercent) )
- ? chart2::StackingDirection_Y_STACKING
- : (eStackMode == StackMode::ZStacked )
- ? chart2::StackingDirection_Z_STACKING
- : chart2::StackingDirection_NO_STACKING );
-
- std::set< sal_Int32 > aAxisIndexSet;
- for( Reference< chart2::XDataSeries > const & dataSeries : aSeries )
- {
- try
- {
- Reference< beans::XPropertySet > xProp( dataSeries, uno::UNO_QUERY );
- if( xProp.is() )
- {
- xProp->setPropertyValue( "StackingDirection", aPropValue );
-
- sal_Int32 nAxisIndex;
- xProp->getPropertyValue( "AttachedAxisIndex" ) >>= nAxisIndex;
- aAxisIndexSet.insert(nAxisIndex);
- }
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
- }
-
- if( !(xCorrespondingCoordinateSystem.is() &&
- 1 < xCorrespondingCoordinateSystem->getDimension()) )
- return;
-
- if( aAxisIndexSet.empty() )
- {
- aAxisIndexSet.insert(0);
- }
-
- for (auto const& axisIndex : aAxisIndexSet)
- {
- rtl::Reference< Axis > xAxis =
- xCorrespondingCoordinateSystem->getAxisByDimension2(1, axisIndex);
- if( xAxis.is())
- {
- bool bPercent = (eStackMode == StackMode::YStackedPercent);
- chart2::ScaleData aScaleData = xAxis->getScaleData();
-
- if( bPercent != (aScaleData.AxisType==chart2::AxisType::PERCENT) )
- {
- if( bPercent )
- aScaleData.AxisType = chart2::AxisType::PERCENT;
- else
- aScaleData.AxisType = chart2::AxisType::REALNUMBER;
- xAxis->setScaleData( aScaleData );
- }
- }
- }
-}
-
-void setStackModeAtSeries(
const std::vector< rtl::Reference< DataSeries > > & aSeries,
const rtl::Reference< BaseCoordinateSystem > & xCorrespondingCoordinateSystem,
StackMode eStackMode )
diff --git a/chart2/source/tools/DataSourceHelper.cxx b/chart2/source/tools/DataSourceHelper.cxx
index f3146961b4c9..bcbfbcbda756 100644
--- a/chart2/source/tools/DataSourceHelper.cxx
+++ b/chart2/source/tools/DataSourceHelper.cxx
@@ -276,12 +276,6 @@ uno::Sequence< OUString > DataSourceHelper::getUsedDataRanges( const rtl::Refere
}
rtl::Reference< DataSource > DataSourceHelper::getUsedData(
- const rtl::Reference<::chart::ChartModel>& xChartDoc )
-{
- return pressUsedDataIntoRectangularFormat( xChartDoc );
-}
-
-rtl::Reference< DataSource > DataSourceHelper::getUsedData(
ChartModel& rModel )
{
std::vector< uno::Reference< chart2::data::XLabeledDataSequence > > aResult;
diff --git a/chart2/source/tools/RegressionCurveHelper.cxx b/chart2/source/tools/RegressionCurveHelper.cxx
index ce4481ef8cfb..24be670b659c 100644
--- a/chart2/source/tools/RegressionCurveHelper.cxx
+++ b/chart2/source/tools/RegressionCurveHelper.cxx
@@ -756,28 +756,6 @@ SvxChartRegress RegressionCurveHelper::getFirstRegressTypeNotMeanValueLine(
return eResult;
}
-SvxChartRegress RegressionCurveHelper::getFirstRegressTypeNotMeanValueLine(
- const rtl::Reference< DataSeries > & xRegCnt )
-{
- SvxChartRegress eResult = SvxChartRegress::NONE;
-
- if( xRegCnt.is())
- {
- for( rtl::Reference< RegressionCurveModel > const & curve : xRegCnt->getRegressionCurves2() )
- {
- SvxChartRegress eType = getRegressionType( curve );
- if( eType != SvxChartRegress::MeanValue &&
- eType != SvxChartRegress::Unknown )
- {
- eResult = eType;
- break;
- }
- }
- }
-
- return eResult;
-}
-
OUString RegressionCurveHelper::getUINameForRegressionCurve( const Reference< XRegressionCurve >& xRegressionCurve )
{
OUString aResult = getRegressionCurveSpecificName(xRegressionCurve);
diff --git a/chart2/source/tools/TitleHelper.cxx b/chart2/source/tools/TitleHelper.cxx
index 58d4d6980aa6..68cc9a290e43 100644
--- a/chart2/source/tools/TitleHelper.cxx
+++ b/chart2/source/tools/TitleHelper.cxx
@@ -394,27 +394,6 @@ void TitleHelper::removeTitle( TitleHelper::eTitleType nTitleIndex
bool TitleHelper::getTitleType( eTitleType& rType
, const css::uno::Reference< css::chart2::XTitle >& xTitle
- , ChartModel& rModel )
-{
- if( !xTitle.is() )
- return false;
-
- Reference< chart2::XTitle > xCurrentTitle;
- for( sal_Int32 nTitleType = TITLE_BEGIN; nTitleType < NORMAL_TITLE_END; nTitleType++ )
- {
- xCurrentTitle = TitleHelper::getTitle( static_cast<eTitleType>(nTitleType), rModel );
- if( xCurrentTitle == xTitle )
- {
- rType = static_cast<eTitleType>(nTitleType);
- return true;
- }
- }
-
- return false;
-}
-
-bool TitleHelper::getTitleType( eTitleType& rType
- , const css::uno::Reference< css::chart2::XTitle >& xTitle
, const rtl::Reference<ChartModel>& xModel )
{
if( !xTitle.is() || !xModel.is() )
diff --git a/chart2/source/tools/WeakListenerAdapter.cxx b/chart2/source/tools/WeakListenerAdapter.cxx
index 85b2f3b39a36..16b3d815031c 100644
--- a/chart2/source/tools/WeakListenerAdapter.cxx
+++ b/chart2/source/tools/WeakListenerAdapter.cxx
@@ -26,21 +26,6 @@ using ::com::sun::star::uno::Reference;
namespace chart
{
-WeakModifyListenerAdapter::WeakModifyListenerAdapter(
- const uno::WeakReference< util::XModifyListener > & xListener ) :
- WeakListenerAdapter< css::util::XModifyListener >( xListener )
-{}
-
-WeakModifyListenerAdapter::~WeakModifyListenerAdapter()
-{}
-
-void SAL_CALL WeakModifyListenerAdapter::modified( const lang::EventObject& aEvent )
-{
- Reference< util::XModifyListener > xModListener( getListener() );
- if( xModListener.is())
- xModListener->modified( aEvent );
-}
-
WeakSelectionChangeListenerAdapter::WeakSelectionChangeListenerAdapter(
const Reference< view::XSelectionChangeListener > & xListener ) :
WeakListenerAdapter< css::view::XSelectionChangeListener >( xListener )
diff --git a/chart2/source/view/main/VLegend.cxx b/chart2/source/view/main/VLegend.cxx
index 4d32fe04bc90..794d8d41ed22 100644
--- a/chart2/source/view/main/VLegend.cxx
+++ b/chart2/source/view/main/VLegend.cxx
@@ -889,25 +889,6 @@ void VLegend::setDefaultWritingMode( sal_Int16 nDefaultWritingMode )
m_nDefaultWritingMode = nDefaultWritingMode;
}
-bool VLegend::isVisible( const Reference< XLegend > & xLegend )
-{
- if( ! xLegend.is())
- return false;
-
- bool bShow = false;
- try
- {
- Reference< beans::XPropertySet > xLegendProp( xLegend, uno::UNO_QUERY_THROW );
- xLegendProp->getPropertyValue( "Show") >>= bShow;
- }
- catch( const uno::Exception & )
- {
- DBG_UNHANDLED_EXCEPTION("chart2");
- }
-
- return bShow;
-}
-
bool VLegend::isVisible( const rtl::Reference< Legend > & xLegend )
{
if( ! xLegend.is())
diff --git a/chart2/source/view/main/VLegend.hxx b/chart2/source/view/main/VLegend.hxx
index 7e8435a7c297..c6080c52d4a0 100644
--- a/chart2/source/view/main/VLegend.hxx
+++ b/chart2/source/view/main/VLegend.hxx
@@ -68,8 +68,6 @@ public:
const css::awt::Size & rDefaultLegendSize );
static bool isVisible(
- const css::uno::Reference< css::chart2::XLegend > & xLegend );
- static bool isVisible(
const rtl::Reference< ::chart::Legend > & xLegend );
private: