[Libreoffice-commits] core.git: sc/source
Eike Rathke (via logerrit)
logerrit at kemper.freedesktop.org
Wed Oct 6 21:15:57 UTC 2021
sc/source/ui/unoobj/chartuno.cxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 34b01c95d4cab81cb614b67c47b004ac86d266f1
Author: Eike Rathke <erack at redhat.com>
AuthorDate: Wed Oct 6 18:57:36 2021 +0200
Commit: Eike Rathke <erack at redhat.com>
CommitDate: Wed Oct 6 23:15:21 2021 +0200
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 at redhat.com>
Tested-by: Jenkins
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;
}
More information about the Libreoffice-commits
mailing list