vbaworkbook.cxx (cdf0e10c) vbaworkbook.cxx (c83e58a0)
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *

--- 206 unchanged lines hidden (view full) ---

215
216uno::Reference< excel::XWorksheet >
217ScVbaWorkbook::getActiveSheet() throw (uno::RuntimeException)
218{
219 uno::Reference< frame::XModel > xModel( getCurrentExcelDoc( mxContext ), uno::UNO_SET_THROW );
220 uno::Reference< sheet::XSpreadsheetView > xView( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
221 uno::Reference< sheet::XSpreadsheet > xSheet( xView->getActiveSheet(), uno::UNO_SET_THROW );
222 // #162503# return the original sheet module wrapper object, instead of a new instance
1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *

--- 206 unchanged lines hidden (view full) ---

215
216uno::Reference< excel::XWorksheet >
217ScVbaWorkbook::getActiveSheet() throw (uno::RuntimeException)
218{
219 uno::Reference< frame::XModel > xModel( getCurrentExcelDoc( mxContext ), uno::UNO_SET_THROW );
220 uno::Reference< sheet::XSpreadsheetView > xView( xModel->getCurrentController(), uno::UNO_QUERY_THROW );
221 uno::Reference< sheet::XSpreadsheet > xSheet( xView->getActiveSheet(), uno::UNO_SET_THROW );
222 // #162503# return the original sheet module wrapper object, instead of a new instance
223 return uno::Reference< excel::XWorksheet >( excel::getUnoSheetModuleObj( xSheet ), uno::UNO_QUERY_THROW );
223 uno::Reference< excel::XWorksheet > xWorksheet( excel::getUnoSheetModuleObj( xSheet ), uno::UNO_QUERY );
224 if( xWorksheet.is() ) return xWorksheet;
225 // #i116936# excel::getUnoSheetModuleObj() may return null in documents without global VBA mode enabled
226 return new ScVbaWorksheet( this, mxContext, xSheet, xModel );
224}
225
226uno::Any SAL_CALL
227ScVbaWorkbook::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
228{
229 return Worksheets( aIndex );
230}
231

--- 125 unchanged lines hidden ---
227}
228
229uno::Any SAL_CALL
230ScVbaWorkbook::Sheets( const uno::Any& aIndex ) throw (uno::RuntimeException)
231{
232 return Worksheets( aIndex );
233}
234

--- 125 unchanged lines hidden ---