diff --git a/sc/prj/build.lst b/sc/prj/build.lst index fa3195fb6d6d..382009a41eba 100644 --- a/sc/prj/build.lst +++ b/sc/prj/build.lst @@ -43,4 +43,4 @@ sc sc\source\filter\html nmake - all sc_html sc_sdi sc_inc NULL sc sc\source\filter\xml nmake - all sc_xml sc_sdi sc_inc NULL sc sc\source\filter\xcl97 nmake - all sc_xcl97 sc_sdi sc_inc NULL sc sc\util nmake - all sc_util sc_app sc_attr sc_cctrl sc_cosrc sc_data sc_dbgui sc_dif sc_docsh sc_drfnc sc_excel sc_form sc_html sc_lotus sc_qpro sc_misc sc_name sc_nvipi sc_opt sc_page sc_rtf sc_scalc sc_style sc_tool sc_uisrc sc_undo sc_unobj sc_view sc_xcl97 sc_xml sc_acc sc_ftools sc_inc sc_vba NULL -sc sc\qa\unit nmake - all sc_qa_cppunit sc_util NULL +# sc sc\qa\unit nmake - all sc_qa_cppunit sc_util NULL diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index 989ca4678707..4f49aab539c4 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -38,8 +38,6 @@ #include "compiler.hxx" #include "token.hxx" #include "tokenarray.hxx" -#include -#include using namespace ::com::sun::star; using namespace ::ooo::vba; @@ -106,6 +104,14 @@ ScDocShell* GetDocShellFromRange( const uno::Reference< uno::XInterface >& xRang return pScCellRangesBase->GetDocShell(); } +uno::Reference< XHelperInterface > +getUnoSheetModuleObj( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) +{ + uno::Reference< sheet::XSheetCellRange > xSheetRange( xRange, uno::UNO_QUERY_THROW ); + uno::Reference< sheet::XSpreadsheet > xSheet( xSheetRange->getSpreadsheet(), uno::UNO_SET_THROW ); + return getUnoSheetModuleObj( xSheet ); +} + ScDocShell* GetDocShellFromRanges( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException ) { // need the ScCellRangesBase to get docshell diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index 59bf41d21cd1..817ec1ecbf4a 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -183,6 +183,11 @@ ScVbaApplication::~ScVbaApplication() { } +/*static*/ bool ScVbaApplication::getDocumentEventsEnabled() +{ + return ScVbaStaticAppSettings::get().mbEnableEvents; +} + SfxObjectShell* ScVbaApplication::GetDocShell( const uno::Reference< frame::XModel >& xModel ) throw (uno::RuntimeException) { return static_cast< SfxObjectShell* >( excel::getDocShell( xModel ) ); diff --git a/sc/source/ui/vba/vbaworksheet.cxx b/sc/source/ui/vba/vbaworksheet.cxx index 7b889b4603c7..94f197d32de5 100644 --- a/sc/source/ui/vba/vbaworksheet.cxx +++ b/sc/source/ui/vba/vbaworksheet.cxx @@ -30,6 +30,7 @@ #include #include "vbaworksheet.hxx" +#include "vbanames.hxx" #include #include @@ -245,7 +246,7 @@ ScVbaWorksheet::getVisible() throw (uno::RuntimeException) } void -ScVbaWorksheet::setVisible( ::sal_Int32 _Visible ) throw (uno::RuntimeException) +ScVbaWorksheet::setVisible( ::sal_Int32 nVisible ) throw (uno::RuntimeException) { using namespace ::ooo::vba::excel::XlSheetVisibility; bool bVisible = true; @@ -267,21 +268,9 @@ ScVbaWorksheet::setVisible( ::sal_Int32 _Visible ) throw (uno::RuntimeException) throw uno::RuntimeException(); } uno::Reference< beans::XPropertySet > xProps( getSheet(), uno::UNO_QUERY_THROW ); - - sal_Bool bVisible = true; - switch( _Visible ) - { - case excel::XlSheetVisibility::xlSheetHidden: - case excel::XlSheetVisibility::xlSheetVeryHidden: - bVisible = false; - break; - case excel::XlSheetVisibility::xlSheetVisible: - bVisible = true; - break; - } - uno::Any aValue( bVisible ); xProps->setPropertyValue - (rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), aValue); + ( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "IsVisible" ) ), + uno::Any( bVisible ) ); } sal_Int16