summaryrefslogtreecommitdiff
path: root/chart2
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-02-26 20:27:16 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-02-27 08:30:16 +0100
commit4a7cf6835c5ab4ca5657c955b5d32a0d3ddd2b1d (patch)
treea3a505d148f3d0d25549136e3ce6a466416a2b28 /chart2
parent95234b33bbf7793ff5f0c65fec9db6caebc6a94d (diff)
fix regression in chart keyboard handling
from commit 0528012fd0dc4b93645ef7790b0db9d1cecbae66 Author: Noel Grandin <noel.grandin@collabora.co.uk> Date: Mon Feb 3 10:05:12 2020 +0200 loplugin:constantparam Change-Id: I563f053a33898f971b382efd513979e459156c0e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89612 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'chart2')
-rw-r--r--chart2/source/controller/inc/ObjectHierarchy.hxx8
-rw-r--r--chart2/source/controller/main/ElementSelector.cxx2
-rw-r--r--chart2/source/controller/main/ObjectHierarchy.cxx3
3 files changed, 8 insertions, 5 deletions
diff --git a/chart2/source/controller/inc/ObjectHierarchy.hxx b/chart2/source/controller/inc/ObjectHierarchy.hxx
index 5b8240a9a103..10b95b951949 100644
--- a/chart2/source/controller/inc/ObjectHierarchy.hxx
+++ b/chart2/source/controller/inc/ObjectHierarchy.hxx
@@ -42,13 +42,15 @@ class ObjectHierarchy
public:
typedef std::vector< ObjectIdentifier > tChildContainer;
- /** The content of the diagram (data series, wall, floor,
- etc.) is treated as being at the same level as the diagram. (This is
- used for keyboard navigation).
+ /** @param bFlattenDiagram
+ If <TRUE/>, the content of the diagram (data series, wall, floor,
+ etc.) is treated as being at the same level as the diagram. (This is
+ used for keyboard navigation).
*/
explicit ObjectHierarchy(
const css::uno::Reference< css::chart2::XChartDocument > & xChartDocument,
ExplicitValueProvider * pExplicitValueProvider,
+ bool bFlattenDiagram = false,
bool bOrderingForElementSelector = false );
~ObjectHierarchy();
diff --git a/chart2/source/controller/main/ElementSelector.cxx b/chart2/source/controller/main/ElementSelector.cxx
index c3433a08018d..1271a77c9cf0 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -132,7 +132,7 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
if( xFact.is() )
xChartView = xFact->createInstance( CHART_VIEW_SERVICE_NAME );
ExplicitValueProvider* pExplicitValueProvider = nullptr; //ExplicitValueProvider::getExplicitValueProvider(xChartView); this creates all visible data points, that's too much
- ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider, true /*bOrderingForElementSelector*/ );
+ ObjectHierarchy aHierarchy( xChartDoc, pExplicitValueProvider, true /*bFlattenDiagram*/, true /*bOrderingForElementSelector*/ );
lcl_addObjectsToList( aHierarchy, ::chart::ObjectHierarchy::getRootNodeOID(), m_aEntries, 0, xChartDoc );
if( bAddSelectionToList )
diff --git a/chart2/source/controller/main/ObjectHierarchy.cxx b/chart2/source/controller/main/ObjectHierarchy.cxx
index 27b8fb0fe985..3109161b3884 100644
--- a/chart2/source/controller/main/ObjectHierarchy.cxx
+++ b/chart2/source/controller/main/ObjectHierarchy.cxx
@@ -612,8 +612,9 @@ ObjectIdentifier ImplObjectHierarchy::getParent(
ObjectHierarchy::ObjectHierarchy(
const Reference< XChartDocument > & xChartDocument,
ExplicitValueProvider * pExplicitValueProvider /* = 0 */,
+ bool bFlattenDiagram /* = false */,
bool bOrderingForElementSelector /* = false */) :
- m_apImpl( new impl::ImplObjectHierarchy( xChartDocument, pExplicitValueProvider, /*bFlattenDiagram*/false, bOrderingForElementSelector ))
+ m_apImpl( new impl::ImplObjectHierarchy( xChartDocument, pExplicitValueProvider, bFlattenDiagram, bOrderingForElementSelector ))
{}
ObjectHierarchy::~ObjectHierarchy()