diff options
author | Daniel Rentz [dr] <daniel.rentz@oracle.com> | 2011-03-21 10:30:30 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2012-12-04 07:17:05 +0000 |
commit | bf2fe6a502f82457f56e527f411b8fba36e5698a (patch) | |
tree | c1d7270fd6027a7790986893acaf89134c2f00ea | |
parent | 2b1c49001a7889d1552b599d83af26ffee892201 (diff) |
dr80: #i117392# initialize VBAGlobals object if single Basic module is in VBA mode, do not expect existing parent sheet in implementation of Excel.Application.ActiveCell
-rw-r--r-- | sc/source/ui/vba/vbaapplication.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index d8b6a17be27d..317ee93c235b 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -368,8 +368,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 |