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

New commits:
commit e44e418783d101c530c916db0b0f72c376188fdf
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 14:24:14 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

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