summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-07-02 09:53:54 -0400
committerKohei Yoshida <kohei.yoshida@collabora.com>2014-07-02 22:50:37 -0400
commit7554f619f03e1fcadd333f2792913f412c0a7031 (patch)
tree05e27cff79361271474bfa5b93d024a6d0f95755 /sw
parent732076e974291a07f29cddfbb4e0763ddce5fc8c (diff)
bnc#812796: Correctly handle static value array for OOXML charts.
We need to pass the role of the data sequence in order to avoid unreliable guess work when importing static value array. Also, not all Excel's scatter plots have real numeric X values; some have textural X values in which case Excel switch to generating 1, 2, 3, ... as X values. When importing to our chart implementation, using "categories" role in such cases instead of "values-x" results in a more faithful chart rendering. (cherry picked from commit 6c4e21a234f12e1310ba06f9859e08b424acf8bf) Conflicts: chart2/source/inc/InternalDataProvider.hxx chart2/source/tools/InternalDataProvider.cxx Conflicts: chart2/source/inc/InternalDataProvider.hxx dbaccess/source/core/inc/DatabaseDataProvider.hxx dbaccess/source/core/misc/DatabaseDataProvider.cxx sc/source/filter/inc/excelchartconverter.hxx Change-Id: If4bc1f650bb024dcd1b1b36537f457fb38404a78
Diffstat (limited to 'sw')
-rw-r--r--sw/inc/unochart.hxx5
-rw-r--r--sw/source/core/unocore/unochart.cxx8
2 files changed, 13 insertions, 0 deletions
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index 753035d33f00..40b374f0cf77 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -178,6 +178,11 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > SAL_CALL createDataSequenceByRangeRepresentation( const OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Reference< ::com::sun::star::sheet::XRangeSelection > SAL_CALL getRangeSelection( ) throw (::com::sun::star::uno::RuntimeException);
+ virtual css::uno::Reference<css::chart2::data::XDataSequence>
+ SAL_CALL createDataSequenceByValueArray(
+ const OUString& aRole, const OUString& aRangeRepresentation )
+ throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE;
+
// XRangeXMLConversion
virtual OUString SAL_CALL convertRangeToXML( const OUString& aRangeRepresentation ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
virtual OUString SAL_CALL convertRangeFromXML( const OUString& aXMLRange ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
diff --git a/sw/source/core/unocore/unochart.cxx b/sw/source/core/unocore/unochart.cxx
index 965c332a94e1..7919a8d879c0 100644
--- a/sw/source/core/unocore/unochart.cxx
+++ b/sw/source/core/unocore/unochart.cxx
@@ -1453,6 +1453,14 @@ uno::Reference< sheet::XRangeSelection > SAL_CALL SwChartDataProvider::getRangeS
return uno::Reference< sheet::XRangeSelection >();
}
+uno::Reference<css::chart2::data::XDataSequence> SAL_CALL
+ SwChartDataProvider::createDataSequenceByValueArray(
+ const OUString& /*aRole*/, const OUString& /*aRangeRepresentation*/ )
+ throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
+{
+ return uno::Reference<css::chart2::data::XDataSequence>();
+}
+
void SAL_CALL SwChartDataProvider::dispose( )
throw (uno::RuntimeException)
{