2007-04-25 15:14:08 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-11 00:24:23 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
2008-04-11 00:24:23 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
2008-04-11 00:24:23 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
2008-04-11 00:24:23 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
2008-04-11 00:24:23 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
2008-04-11 00:24:23 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2007-04-25 15:14:08 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
#ifndef SC_VBA_WORKSHEET_HXX
|
|
|
|
#define SC_VBA_WORKSHEET_HXX
|
|
|
|
|
|
|
|
#include <cppuhelper/implbase2.hxx>
|
2007-12-07 10:07:07 +00:00
|
|
|
#include <comphelper/unwrapargs.hxx>
|
|
|
|
|
2007-04-25 15:14:08 +00:00
|
|
|
#include <com/sun/star/sheet/XSpreadsheet.hpp>
|
|
|
|
#include <com/sun/star/script/XInvocation.hpp>
|
2009-02-13 13:03:24 +00:00
|
|
|
#include <ooo/vba/excel/XWorksheet.hpp>
|
|
|
|
#include <ooo/vba/excel/XComments.hpp>
|
|
|
|
#include <ooo/vba/excel/XRange.hpp>
|
2007-04-25 15:14:08 +00:00
|
|
|
#include <com/sun/star/lang/XEventListener.hpp>
|
|
|
|
#include <com/sun/star/uno/XComponentContext.hpp>
|
|
|
|
#include <com/sun/star/frame/XModel.hpp>
|
2009-02-13 13:03:24 +00:00
|
|
|
#include <ooo/vba/excel/XOutline.hpp>
|
|
|
|
#include <ooo/vba/excel/XPageSetup.hpp>
|
|
|
|
#include <ooo/vba/excel/XHPageBreaks.hpp>
|
2009-09-18 15:24:22 +00:00
|
|
|
#include <ooo/vba/excel/XVPageBreaks.hpp>
|
2009-02-13 13:03:24 +00:00
|
|
|
#include <ooo/vba/excel/XChartObjects.hpp>
|
2007-04-25 15:14:08 +00:00
|
|
|
|
2009-09-18 15:24:22 +00:00
|
|
|
#include <vbahelper/vbahelperinterface.hxx>
|
|
|
|
#include "address.hxx"
|
2007-12-07 10:07:07 +00:00
|
|
|
|
2009-02-13 13:03:24 +00:00
|
|
|
typedef InheritedHelperInterfaceImpl1< ov::excel::XWorksheet > WorksheetImpl_BASE;
|
2007-04-25 15:14:08 +00:00
|
|
|
|
2007-12-07 10:07:07 +00:00
|
|
|
class ScVbaWorksheet : public WorksheetImpl_BASE
|
2007-04-25 15:14:08 +00:00
|
|
|
{
|
|
|
|
css::uno::Reference< css::sheet::XSpreadsheet > mxSheet;
|
|
|
|
css::uno::Reference< css::frame::XModel > mxModel;
|
2009-02-13 13:03:24 +00:00
|
|
|
css::uno::Reference< ov::excel::XChartObjects > mxCharts;
|
2007-04-25 15:14:08 +00:00
|
|
|
|
2009-02-13 13:03:24 +00:00
|
|
|
css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException);
|
|
|
|
css::uno::Reference< ov::excel::XRange > getSheetRange() throw (css::uno::RuntimeException);
|
2007-04-25 15:14:08 +00:00
|
|
|
|
2009-02-13 13:03:24 +00:00
|
|
|
css::uno::Reference< css::container::XNameAccess > getFormControls();
|
2007-12-07 10:07:07 +00:00
|
|
|
css::uno::Any getControlShape( const rtl::OUString& sName );
|
2007-04-25 15:14:08 +00:00
|
|
|
protected:
|
|
|
|
|
2009-02-13 13:03:24 +00:00
|
|
|
ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext );
|
2007-04-25 15:14:08 +00:00
|
|
|
public:
|
2009-02-13 13:03:24 +00:00
|
|
|
ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent,
|
2007-04-25 15:14:08 +00:00
|
|
|
const css::uno::Reference< css::uno::XComponentContext >& xContext,
|
|
|
|
const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet,
|
|
|
|
const css::uno::Reference< css::frame::XModel >& xModel )throw (css::uno::RuntimeException) ;
|
2007-12-07 10:07:07 +00:00
|
|
|
ScVbaWorksheet( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException );
|
2007-04-25 15:14:08 +00:00
|
|
|
|
|
|
|
virtual ~ScVbaWorksheet() {}
|
|
|
|
|
2007-12-07 10:07:07 +00:00
|
|
|
virtual css::uno::Reference< css::frame::XModel > getModel()
|
|
|
|
{ return mxModel; }
|
|
|
|
virtual css::uno::Reference< css::sheet::XSpreadsheet > getSheet()
|
|
|
|
{ return mxSheet; }
|
2007-04-25 15:14:08 +00:00
|
|
|
|
|
|
|
// Attributes
|
|
|
|
virtual ::rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL setName( const ::rtl::OUString &rName ) throw (css::uno::RuntimeException);
|
|
|
|
virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL setVisible( sal_Bool bVisible ) throw (css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Int32 SAL_CALL getStandardWidth() throw (css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Int32 SAL_CALL getStandardHeight() throw (css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Bool SAL_CALL getProtectionMode() throw (css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Bool SAL_CALL getProtectContents() throw (css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Bool SAL_CALL getProtectDrawingObjects() throw (css::uno::RuntimeException);
|
2009-02-13 13:03:24 +00:00
|
|
|
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL getUsedRange() throw (css::uno::RuntimeException) ;
|
2007-04-25 15:14:08 +00:00
|
|
|
virtual css::uno::Any SAL_CALL ChartObjects( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
|
2009-02-13 13:03:24 +00:00
|
|
|
virtual css::uno::Reference< ov::excel::XOutline > SAL_CALL Outline( ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Reference< ov::excel::XPageSetup > SAL_CALL PageSetup( ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Any SAL_CALL HPageBreaks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
2009-09-18 15:24:22 +00:00
|
|
|
virtual css::uno::Any SAL_CALL VPageBreaks( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
2009-02-13 13:03:24 +00:00
|
|
|
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getNext() throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Reference< ov::excel::XWorksheet > SAL_CALL getPrevious() throw (css::uno::RuntimeException);
|
|
|
|
virtual sal_Int16 SAL_CALL getIndex() throw (css::uno::RuntimeException);
|
2009-09-18 15:24:22 +00:00
|
|
|
virtual sal_Int32 SAL_CALL getEnableSelection() throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL setEnableSelection( sal_Int32 nSelection ) throw (css::uno::RuntimeException);
|
2007-04-25 15:14:08 +00:00
|
|
|
|
|
|
|
// Methods
|
|
|
|
virtual void SAL_CALL Activate() throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL Select() throw (css::uno::RuntimeException);
|
2009-02-13 13:03:24 +00:00
|
|
|
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any& Cell1, const css::uno::Any& Cell2 ) throw (css::uno::RuntimeException);
|
2007-04-25 15:14:08 +00:00
|
|
|
virtual void SAL_CALL Move( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException) ;
|
|
|
|
virtual void SAL_CALL Copy( const css::uno::Any& Before, const css::uno::Any& After ) throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL Paste( const css::uno::Any& Destination, const css::uno::Any& Link ) throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL Delete( ) throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL Protect( const css::uno::Any& Password, const css::uno::Any& DrawingObjects, const css::uno::Any& Contents, const css::uno::Any& Scenarios, const css::uno::Any& UserInterfaceOnly ) throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL Unprotect( const css::uno::Any& Password ) throw (css::uno::RuntimeException);
|
|
|
|
|
|
|
|
virtual void SAL_CALL Calculate( ) throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL CheckSpelling( const css::uno::Any& CustomDictionary,const css::uno::Any& IgnoreUppercase,const css::uno::Any& AlwaysSuggest, const css::uno::Any& SpellingLang ) throw (css::uno::RuntimeException);
|
|
|
|
// Hacks (?)
|
2009-02-13 13:03:24 +00:00
|
|
|
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Cells( const css::uno::Any &nRow, const css::uno::Any &nCol ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Rows(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Columns(const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
2007-04-25 15:14:08 +00:00
|
|
|
|
|
|
|
virtual css::uno::Any SAL_CALL Evaluate( const ::rtl::OUString& Name ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Any SAL_CALL PivotTables( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Any SAL_CALL Comments( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
|
|
|
|
|
2007-12-07 10:07:07 +00:00
|
|
|
virtual css::uno::Any SAL_CALL OLEObjects( const css::uno::Any& Index ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Any SAL_CALL Shapes( const css::uno::Any& aIndex ) throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL setEnableCalculation( ::sal_Bool EnableCalculation ) throw ( css::script::BasicErrorException, css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Bool SAL_CALL getEnableCalculation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL ShowDataForm( ) throw (css::uno::RuntimeException);
|
2007-04-25 15:14:08 +00:00
|
|
|
// XInvocation
|
|
|
|
virtual css::uno::Reference< css::beans::XIntrospectionAccess > SAL_CALL getIntrospection( ) throw (css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Any SAL_CALL invoke( const ::rtl::OUString& aFunctionName, const css::uno::Sequence< css::uno::Any >& aParams, css::uno::Sequence< ::sal_Int16 >& aOutParamIndex, css::uno::Sequence< css::uno::Any >& aOutParam ) throw (css::lang::IllegalArgumentException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL setValue( const ::rtl::OUString& aPropertyName, const css::uno::Any& aValue ) throw (css::beans::UnknownPropertyException, css::script::CannotConvertException, css::reflection::InvocationTargetException, css::uno::RuntimeException);
|
|
|
|
virtual css::uno::Any SAL_CALL getValue( const ::rtl::OUString& aPropertyName ) throw (css::beans::UnknownPropertyException, css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Bool SAL_CALL hasMethod( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
|
|
|
|
virtual ::sal_Bool SAL_CALL hasProperty( const ::rtl::OUString& aName ) throw (css::uno::RuntimeException);
|
2007-12-07 10:07:07 +00:00
|
|
|
// CodeName
|
|
|
|
virtual rtl::OUString SAL_CALL getCodeName() throw (css::uno::RuntimeException);
|
|
|
|
virtual void SAL_CALL setCodeName( const rtl::OUString& sCodeName ) throw (css::uno::RuntimeException);
|
|
|
|
sal_Int16 getSheetID() throw (css::uno::RuntimeException);
|
|
|
|
|
2009-02-13 13:03:24 +00:00
|
|
|
virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, const css::uno::Any& IgnorePrintAreas ) throw (css::uno::RuntimeException);
|
2007-12-07 10:07:07 +00:00
|
|
|
// XHelperInterface
|
|
|
|
virtual rtl::OUString& getServiceImplName();
|
|
|
|
virtual css::uno::Sequence<rtl::OUString> getServiceNames();
|
2007-04-25 15:14:08 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif /* SC_VBA_WORKSHEET_HXX */
|
|
|
|
|