sc/source/ui/vba/vbarange.cxx |    7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

New commits:
commit e4173f2831c7147813806b192f27266d1c437018
Author:     Eike Rathke <er...@redhat.com>
AuthorDate: Thu Jun 16 13:14:43 2022 +0200
Commit:     Eike Rathke <er...@redhat.com>
CommitDate: Thu Jun 16 16:27:15 2022 +0200

    One call to XCellRangeAddressable::getRangeAddress() is enough
    
    ... each needs to obtain it via ScUnoConversion::FillApiRange().
    
    Change-Id: Ie98d5130067701f40c441d08bdb9faf7913bcdb8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135972
    Reviewed-by: Eike Rathke <er...@redhat.com>
    Tested-by: Jenkins
    (cherry picked from commit 796a4c9eca7cb1172b9ab8bcbf32db30e7ef4dfc)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135982

diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx
index b98b5471ff7b..93b217f1d632 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -1140,12 +1140,9 @@ public:
     static uno::Reference< excel::XRange > createRangeFromRange( const 
uno::Reference< XHelperInterface >& xParent, const 
uno::Reference<uno::XComponentContext >& xContext,
         const uno::Reference< table::XCellRange >& xRange, const 
uno::Reference< sheet::XCellRangeAddressable >& xCellRangeAddressable )
     {
+        const table::CellRangeAddress aRA( 
xCellRangeAddressable->getRangeAddress());
         return uno::Reference< excel::XRange >( new ScVbaRange( xParent, 
xContext,
-            xRange->getCellRangeByPosition(
-                xCellRangeAddressable->getRangeAddress().StartColumn,
-                xCellRangeAddressable->getRangeAddress().StartRow,
-                xCellRangeAddressable->getRangeAddress().EndColumn,
-                xCellRangeAddressable->getRangeAddress().EndRow ) ) );
+                    xRange->getCellRangeByPosition( aRA.StartColumn, 
aRA.StartRow, aRA.EndColumn, aRA.EndRow)));
     }
 
 };

Reply via email to