summaryrefslogtreecommitdiff
path: root/chart2/source
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2024-11-28 15:57:25 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2024-11-29 12:23:09 +0100
commita2dbdee29e0a02401647d2303abc867c55dd12c7 (patch)
tree7aec765869d5f96fc96b31dfa295ef81589437df /chart2/source
parent13ac356a32f279a3fd542d62c12e58abe3d3ad30 (diff)
PVS: the 'bDummy' variable was not initialized.
This variable is passed by a reference to the 'readArguments' function in which its value will be utilized. Inspect the fifth argument. Change-Id: I39d71ac5e76d3d9a808fa08a430af9aa0686684d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177494 Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Tested-by: Jenkins
Diffstat (limited to 'chart2/source')
-rw-r--r--chart2/source/tools/ExplicitCategoriesProvider.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/chart2/source/tools/ExplicitCategoriesProvider.cxx b/chart2/source/tools/ExplicitCategoriesProvider.cxx
index c5e32760f6b3..d543b2b365fb 100644
--- a/chart2/source/tools/ExplicitCategoriesProvider.cxx
+++ b/chart2/source/tools/ExplicitCategoriesProvider.cxx
@@ -32,6 +32,7 @@
#include <DataSeries.hxx>
#include <com/sun/star/chart2/AxisType.hpp>
+#include <com/sun/star/chart/ChartDataRowSource.hpp>
#include <o3tl/compare.hxx>
#include <o3tl/safeint.hxx>
#include <rtl/ustrbuf.hxx>
@@ -108,11 +109,18 @@ ExplicitCategoriesProvider::ExplicitCategoriesProvider( const rtl::Reference< Ba
if( !aSeries.empty() )
{
const rtl::Reference< DataSeries >& xSeriesSource = aSeries.front();
- OUString aStringDummy;
- bool bDummy;
- uno::Sequence< sal_Int32 > aSeqDummy;
- DataSourceHelper::readArguments( xDataProvider->detectArguments( xSeriesSource),
- aStringDummy, aSeqDummy, bSeriesUsesColumns, bDummy, bDummy );
+ for(const auto& rArgument : xDataProvider->detectArguments( xSeriesSource))
+ {
+ if ( rArgument.Name == "DataRowSource" )
+ {
+ css::chart::ChartDataRowSource eRowSource;
+ if( rArgument.Value >>= eRowSource )
+ {
+ bSeriesUsesColumns = (eRowSource == css::chart::ChartDataRowSource_COLUMNS);
+ break;
+ }
+ }
+ }
}
if( bSeriesUsesColumns )
m_aSplitCategoriesList = comphelper::sequenceToContainer<std::vector<Reference<data::XLabeledDataSequence>>>(aColumns);