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

New commits:
commit 0cea5d817434c5f7ccc8816f7f5e29a4ba95f8f0
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Thu Jun 16 21:06:37 2022 +0200
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Fri Jun 17 07:08:00 2022 +0200

    Another "One call to XCellRangeAddressable::getRangeAddress() is enough"
    
    See 
https://cgit.freedesktop.org/libreoffice/core/commit/?id=e44e418783d101c530c916db0b0f72c376188fdf
    
    Change-Id: I1106d1777690c27b9e4765a3a94145bb73609005
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136005
    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 99933f165c24..d94bd7b04a35 100644
--- a/sc/source/ui/vba/vbarange.cxx
+++ b/sc/source/ui/vba/vbarange.cxx
@@ -2657,11 +2657,8 @@ ScVbaRange::Resize( const uno::Any &RowSize, const 
uno::Any &ColumnSize )
     xCursor->collapseToSize( nColumnSize, nRowSize );
     uno::Reference< sheet::XCellRangeAddressable > 
xCellRangeAddressable(xCursor, ::uno::UNO_QUERY_THROW );
     uno::Reference< table::XCellRange > xRange( xSheetRange->getSpreadsheet(), 
::uno::UNO_QUERY_THROW );
-    return new ScVbaRange( mxParent, mxContext,xRange->getCellRangeByPosition(
-                                        
xCellRangeAddressable->getRangeAddress().StartColumn,
-                                        
xCellRangeAddressable->getRangeAddress().StartRow,
-                                        
xCellRangeAddressable->getRangeAddress().EndColumn,
-                                        
xCellRangeAddressable->getRangeAddress().EndRow ) );
+    const table::CellRangeAddress aRA( 
xCellRangeAddressable->getRangeAddress());
+    return new ScVbaRange( mxParent, mxContext, 
xRange->getCellRangeByPosition( aRA.StartColumn, aRA.StartRow, aRA.EndColumn, 
aRA.EndRow));
 }
 
 void

Reply via email to