summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorDennis Francis <dennisfrancis.in@gmail.com>2021-09-02 14:33:55 +0530
committerDennis Francis <dennis.francis@collabora.com>2021-09-07 08:19:22 +0200
commit3798e0a383404606ec27f318e4fe239de2350fe8 (patch)
tree02ad169d2f7708469da2f4ec2b9db2ac1f0436bb /sw
parent9cc818355dad271c030af611862f15c0e081321a (diff)
[API CHANGE] oox: fix import of chart date categories
Before this fix, date categories imported in oox's DataSourceContext were stored as formatted strings according to number format code in <c:formatCode> under the <c:cat> tree. As a result chart2 could not recognize them as dates. This causes problems like: * The axis that is linked to date categories cannot use the scaling/range-selection(min/max)/increments specs mentioned as axis properties. This results in distorted/unreadable chart renders w.r.t the date axis. * No re-formatting is attempted as per the number format provided for axis. This patch introduces a role qualifer argument to the XDataProvider interface method createDataSequenceByValueArray to support categories of date type via this method. When exporting to oox, write date categories and format code under <c:cat> <c:numRef> <c:numCache> This patch also fixes some discrepancies in date axis interval computation (auto mode) found by already existing unit tests. Conflicts: chart2/qa/extras/chart2export2.cxx chart2/source/inc/InternalDataProvider.hxx chart2/source/tools/InternalDataProvider.cxx Change-Id: Ibc53b0a56fdddba80ba452d5567ce98d80460ea7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121525 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com> (cherry picked from commit f547cf17a179ebd7de5c2b4dd2d00d0027a25429) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121723 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Dennis Francis <dennis.francis@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unochart.hxx2
-rw-r--r--sw/source/core/unocore/unochart.cxx3
2 files changed, 3 insertions, 2 deletions
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 7147f8a036eb..f17f832600b0 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -155,7 +155,7 @@ public:
virtual css::uno::Reference<css::chart2::data::XDataSequence>
SAL_CALL createDataSequenceByValueArray(
- const OUString& aRole, const OUString& aRangeRepresentation ) override;
+ const OUString& aRole, const OUString& aRangeRepresentation, const OUString& aRoleQualifier ) override;
// XRangeXMLConversion
virtual OUString SAL_CALL convertRangeToXML( const OUString& aRangeRepresentation ) override;
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 8bc55cc0487e..bfa6b7802238 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1350,7 +1350,8 @@ uno::Reference< sheet::XRangeSelection > SAL_CALL SwChartDataProvider::getRangeS
uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
SwChartDataProvider::createDataSequenceByValueArray(
- const OUString& /*aRole*/, const OUString& /*aRangeRepresentation*/ )
+ const OUString& /*aRole*/, const OUString& /*aRangeRepresentation*/,
+ const OUString& /*aRoleQualifier*/ )
{
return uno::Reference<css::chart2::data::XDataSequence>();
}