diff options
author | Eike Rathke <erack@redhat.com> | 2021-10-06 22:16:30 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2021-10-07 12:53:09 +0200 |
commit | 852292feee08b4d256f8255926e1f84b4c6fd4b6 (patch) | |
tree | 8c16d7c5921937b3b980c5551d994d1a86d3e602 /sc | |
parent | 14f81ca6ad289bf86781f642aa129b33151247cf (diff) |
Related: tdf#144970 Make Drag&Drop of Chart range work with UI representation
Drag&Drop of cell range onto an existing Chart worked with Calc A1
but not Excel A1 or R1C1 address syntax conventions.
Change-Id: I1cd1a134f284ef5b28237589c544f93cb4aca841
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/123197
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/core/data/documen5.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/docshell/docsh4.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/view/gridwin.cxx | 3 |
3 files changed, 5 insertions, 4 deletions
diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index 60d6d6cf068b..68bb7b4a7444 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -229,7 +229,7 @@ void ScDocument::GetOldChartParameters( std::u16string_view rName, OUString aRangesStr; lcl_GetChartParameters( xChartDoc, aRangesStr, eDataRowSource, bHasCategories, bFirstCellAsLabel ); - rRanges.Parse( aRangesStr, *this ); + rRanges.Parse( aRangesStr, *this, GetAddressConvention()); if ( eDataRowSource == chart::ChartDataRowSource_COLUMNS ) { rRowHeaders = bHasCategories; @@ -285,7 +285,7 @@ void ScDocument::UpdateChartArea( const OUString& rChartName, // append to old ranges, keep other settings aNewRanges = new ScRangeList; - aNewRanges->Parse( aRangesStr, *this ); + aNewRanges->Parse( aRangesStr, *this, GetAddressConvention()); for ( size_t nAdd = 0, nAddCount = rNewList->size(); nAdd < nAddCount; ++nAdd ) aNewRanges->push_back( (*rNewList)[nAdd] ); diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx index 951f0fe96823..bba2d90a0a71 100644 --- a/sc/source/ui/docshell/docsh4.cxx +++ b/sc/source/ui/docshell/docsh4.cxx @@ -384,7 +384,7 @@ void ScDocShell::Execute( SfxRequest& rReq ) if (!bValid) { aRangeListRef = new ScRangeList; - aRangeListRef->Parse( aRangeName, rDoc ); + aRangeListRef->Parse( aRangeName, rDoc, rDoc.GetAddressConvention()); if ( !aRangeListRef->empty() ) { bMultiRange = true; diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx index 4f65327b4a4d..facbba012fe2 100644 --- a/sc/source/ui/view/gridwin.cxx +++ b/sc/source/ui/view/gridwin.cxx @@ -4230,7 +4230,8 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos OUString aChartName; if (rThisDoc.HasChartAtPoint( nThisTab, rLogicPos, aChartName )) { - OUString aRangeName(aSource.Format(rThisDoc, ScRefFlags::RANGE_ABS_3D)); + OUString aRangeName(aSource.Format(rThisDoc, ScRefFlags::RANGE_ABS_3D, + rThisDoc.GetAddressConvention())); SfxStringItem aNameItem( SID_CHART_NAME, aChartName ); SfxStringItem aRangeItem( SID_CHART_SOURCE, aRangeName ); sal_uInt16 nId = bIsMove ? SID_CHART_SOURCE : SID_CHART_ADDSOURCE; |