diff options
author | Eike Rathke <erack@redhat.com> | 2021-10-06 18:57:36 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-10-06 23:15:21 +0200 |
commit | 34b01c95d4cab81cb614b67c47b004ac86d266f1 (patch) | |
tree | bcd21a1e94193f534cc1f07e6e974c933934bf15 /sc | |
parent | 490479c9b6f75dd857b8b644f84f65c37c1b460f (diff) |
Resolves: tdf#144970 Chart CellRangeRepresentation expects UI representation
sc/source/ui/unoobj/chart2uno.cxx
ScChart2DataProvider::createDataSource() calls
ScRefTokenHelper::compileRangeRepresentation() with the
CellRangeRepresentation property's string value and the document's
grammar (and also other places calling
ScRefTokenHelper::compileRangeRepresentation() in Chart context do, like
ScChart2DataProvider::detectArguments()), so let
ScChartsObj::addNewByName() generate that from the
Sequence<table::CellRangeAddress>.
Also let ScChartObj::GetData_Impl() parse a CellRangeRepresentation
value with the current address convention.
This is congruent with
offapi/com/sun/star/chart2/data/TabularDataProviderArguments.idl that
for CellRangeRepresentation says "The representation string is of a form
that may be used in the user interface. Example for OOo Calc:
"$Sheet1.$A$1:$D$7"", which is Calc A1 but agnostic about Excel A1 and
R1C1 address syntax. TabularDataProviderArguments is mentioned in
offapi/com/sun/star/chart2/data/XDataProvider.idl at createDataSource().
Change-Id: Ie89d9aa3d5bc3eda9a65932a445ee8a1b4b266f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123188
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/unoobj/chartuno.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx index d336cdd201b8..5300f91a0d3c 100644 --- a/sc/source/ui/unoobj/chartuno.cxx +++ b/sc/source/ui/unoobj/chartuno.cxx @@ -209,8 +209,9 @@ void SAL_CALL ScChartsObj::addNewByName( const OUString& rName, xReceiver.set( xObj->getComponent(), uno::UNO_QUERY ); if( xReceiver.is()) { + // Range in UI representation. OUString sRangeStr; - xNewRanges->Format(sRangeStr, ScRefFlags::RANGE_ABS_3D, rDoc); + xNewRanges->Format(sRangeStr, ScRefFlags::RANGE_ABS_3D, rDoc, rDoc.GetAddressConvention()); // connect if( !sRangeStr.isEmpty() ) @@ -478,7 +479,8 @@ void ScChartObj::GetData_Impl( ScRangeListRef& rRanges, bool& rColHeaders, bool& rColHeaders=bHasCategories; rRowHeaders=bFirstCellAsLabel; } - rRanges->Parse( aRanges, rDoc); + // Range in UI representation. + rRanges->Parse( aRanges, rDoc, rDoc.GetAddressConvention()); } bFound = true; } |