summaryrefslogtreecommitdiff
path: root/sc/source/ui/vba/vbaapplication.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/vba/vbaapplication.cxx')
-rw-r--r--sc/source/ui/vba/vbaapplication.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx
index fa278e527d91..d7d0ae733ab7 100644
--- a/sc/source/ui/vba/vbaapplication.cxx
+++ b/sc/source/ui/vba/vbaapplication.cxx
@@ -281,8 +281,8 @@ ScVbaApplication::getActiveCell() throw (uno::RuntimeException )
sal_Int32 nCursorX = pTabView->GetCurX();
sal_Int32 nCursorY = pTabView->GetCurY();
- uno::Reference< XHelperInterface > xParent( excel::getUnoSheetModuleObj( xRange ), uno::UNO_QUERY_THROW );
- return new ScVbaRange( xParent, mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
+ // #i117392# excel::getUnoSheetModuleObj() may return null in documents without global VBA mode enabled
+ return new ScVbaRange( excel::getUnoSheetModuleObj( xRange ), mxContext, xRange->getCellRangeByPosition( nCursorX, nCursorY, nCursorX, nCursorY ) );
}
uno::Any SAL_CALL