[Libreoffice-commits] .: Branch 'integration/dev300_m101' - sc/prj sc/source
Michael Meeks
mmeeks at kemper.freedesktop.org
Tue Mar 15 02:57:04 PDT 2011
sc/prj/build.lst | 2 +-
sc/source/ui/vba/excelvbahelper.cxx | 10 ++++++++--
sc/source/ui/vba/vbaapplication.cxx | 5 +++++
sc/source/ui/vba/vbaworksheet.cxx | 19 ++++---------------
4 files changed, 18 insertions(+), 18 deletions(-)
New commits:
commit 56e47872b07614b673477e4c3055ec8c77d62aaa
Author: Michael Meeks <michael.meeks at novell.com>
Date: Tue Mar 15 09:56:18 2011 +0000
more merge fixes, compiles and links now
diff --git a/sc/prj/build.lst b/sc/prj/build.lst
index fa3195f..382009a 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 989ca46..4f49aab 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 <comphelper/processfactory.hxx>
-#include <com/sun/star/sheet/XSheetCellRange.hpp>
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 faa6786..4c4dd44 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 7b889b4..94f197d 100644
--- a/sc/source/ui/vba/vbaworksheet.cxx
+++ b/sc/source/ui/vba/vbaworksheet.cxx
@@ -30,6 +30,7 @@
#include <cppuhelper/queryinterface.hxx>
#include "vbaworksheet.hxx"
+#include "vbanames.hxx"
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XIntrospectionAccess.hpp>
@@ -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
More information about the Libreoffice-commits
mailing list