1*cdf0e10cSrcweir /************************************************************************* 2*cdf0e10cSrcweir * 3*cdf0e10cSrcweir * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4*cdf0e10cSrcweir * 5*cdf0e10cSrcweir * Copyright 2000, 2010 Oracle and/or its affiliates. 6*cdf0e10cSrcweir * 7*cdf0e10cSrcweir * OpenOffice.org - a multi-platform office productivity suite 8*cdf0e10cSrcweir * 9*cdf0e10cSrcweir * This file is part of OpenOffice.org. 10*cdf0e10cSrcweir * 11*cdf0e10cSrcweir * OpenOffice.org is free software: you can redistribute it and/or modify 12*cdf0e10cSrcweir * it under the terms of the GNU Lesser General Public License version 3 13*cdf0e10cSrcweir * only, as published by the Free Software Foundation. 14*cdf0e10cSrcweir * 15*cdf0e10cSrcweir * OpenOffice.org is distributed in the hope that it will be useful, 16*cdf0e10cSrcweir * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*cdf0e10cSrcweir * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*cdf0e10cSrcweir * GNU Lesser General Public License version 3 for more details 19*cdf0e10cSrcweir * (a copy is included in the LICENSE file that accompanied this code). 20*cdf0e10cSrcweir * 21*cdf0e10cSrcweir * You should have received a copy of the GNU Lesser General Public License 22*cdf0e10cSrcweir * version 3 along with OpenOffice.org. If not, see 23*cdf0e10cSrcweir * <http://www.openoffice.org/license.html> 24*cdf0e10cSrcweir * for a copy of the LGPLv3 License. 25*cdf0e10cSrcweir * 26*cdf0e10cSrcweir ************************************************************************/ 27*cdf0e10cSrcweir #ifndef OOVBAAPI_VBA_HELPER_HXX 28*cdf0e10cSrcweir #define OOVBAAPI_VBA_HELPER_HXX 29*cdf0e10cSrcweir 30*cdf0e10cSrcweir #include <com/sun/star/drawing/XShape.hpp> 31*cdf0e10cSrcweir #include <com/sun/star/beans/XIntrospectionAccess.hpp> 32*cdf0e10cSrcweir #include <com/sun/star/beans/XPropertySet.hpp> 33*cdf0e10cSrcweir #include <com/sun/star/script/BasicErrorException.hpp> 34*cdf0e10cSrcweir #include <com/sun/star/script/XTypeConverter.hpp> 35*cdf0e10cSrcweir #include <com/sun/star/lang/IllegalArgumentException.hpp> 36*cdf0e10cSrcweir #include <com/sun/star/awt/XControl.hpp> 37*cdf0e10cSrcweir #include <com/sun/star/awt/XDevice.hpp> 38*cdf0e10cSrcweir #include <com/sun/star/awt/XUnitConversion.hpp> 39*cdf0e10cSrcweir #include <basic/basmgr.hxx> 40*cdf0e10cSrcweir #include <basic/sberrors.hxx> 41*cdf0e10cSrcweir #include <cppuhelper/implbase1.hxx> 42*cdf0e10cSrcweir #include <com/sun/star/frame/XModel.hpp> 43*cdf0e10cSrcweir #include <sfx2/dispatch.hxx> 44*cdf0e10cSrcweir #include <sfx2/objsh.hxx> 45*cdf0e10cSrcweir #include <sfx2/docfilt.hxx> 46*cdf0e10cSrcweir #include <sfx2/docfile.hxx> 47*cdf0e10cSrcweir #include <vcl/pointr.hxx> 48*cdf0e10cSrcweir #include <memory> 49*cdf0e10cSrcweir #include "vbaaccesshelper.hxx" 50*cdf0e10cSrcweir 51*cdf0e10cSrcweir namespace css = ::com::sun::star; 52*cdf0e10cSrcweir namespace ooo 53*cdf0e10cSrcweir { 54*cdf0e10cSrcweir namespace vba 55*cdf0e10cSrcweir { 56*cdf0e10cSrcweir template < class T > 57*cdf0e10cSrcweir css::uno::Reference< T > getXSomethingFromArgs( css::uno::Sequence< css::uno::Any > const & args, sal_Int32 nPos, bool bCanBeNull = true ) throw (css::lang::IllegalArgumentException) 58*cdf0e10cSrcweir { 59*cdf0e10cSrcweir if ( args.getLength() < ( nPos + 1) ) 60*cdf0e10cSrcweir throw css::lang::IllegalArgumentException(); 61*cdf0e10cSrcweir css::uno::Reference< T > aSomething( args[ nPos ], css::uno::UNO_QUERY ); 62*cdf0e10cSrcweir if ( !bCanBeNull && !aSomething.is() ) 63*cdf0e10cSrcweir throw css::lang::IllegalArgumentException(); 64*cdf0e10cSrcweir return aSomething; 65*cdf0e10cSrcweir } 66*cdf0e10cSrcweir 67*cdf0e10cSrcweir class XHelperInterface; 68*cdf0e10cSrcweir 69*cdf0e10cSrcweir /** Returns the VBA document implementation object representing the passed UNO document model. */ 70*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument( const css::uno::Reference< css::frame::XModel >& xModel ); 71*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const String& aModName, SfxObjectShell* pShell ); 72*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException); 73*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::uno::XInterface > createVBAUnoAPIService( SfxObjectShell* pShell, const sal_Char* _pAsciiName ) throw (css::uno::RuntimeException); 74*cdf0e10cSrcweir 75*cdf0e10cSrcweir css::uno::Reference< css::frame::XModel > getCurrentDoc( const rtl::OUString& sKey ) throw (css::uno::RuntimeException); 76*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); 77*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); 78*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); 79*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); 80*cdf0e10cSrcweir 81*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess( const css::uno::Any& aObject ) throw (css::uno::RuntimeException); 82*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); 83*cdf0e10cSrcweir 84*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString& aUrl ); 85*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString& aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps ); 86*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, sal_uInt16 nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON ); 87*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 ); 88*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 ); 89*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Any OORGBToXLRGB( const css::uno::Any& ); 90*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Any XLRGBToOORGB( const css::uno::Any& ); 91*cdf0e10cSrcweir // provide a NULL object that can be passed as variant so that 92*cdf0e10cSrcweir // the object when passed to IsNull will return true. aNULL 93*cdf0e10cSrcweir // contains an empty object reference 94*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC const css::uno::Any& aNULL(); 95*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void PrintOutHelper( SfxViewShell* pViewShell, 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, sal_Bool bSelection ); 96*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void PrintPreviewHelper( const css::uno::Any& EnableChanges, SfxViewShell* ); 97*cdf0e10cSrcweir 98*cdf0e10cSrcweir /** Extracts a 32-bit integer value from the passed Any, which may contain an integer or floating-point value. 99*cdf0e10cSrcweir Throws, if the Any is empty or contains an incompatible type. */ 100*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Int32 extractIntFromAny( const css::uno::Any& rAny ) throw (css::uno::RuntimeException); 101*cdf0e10cSrcweir /** Extracts a 32-bit integer value from the passed Any, which may contain an integer or floating-point value. 102*cdf0e10cSrcweir Returns nDefault, if rAny is empty. Throws, if the Any contains an incompatible type. */ 103*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Int32 extractIntFromAny( const css::uno::Any& rAny, sal_Int32 nDefault ) throw (css::uno::RuntimeException); 104*cdf0e10cSrcweir 105*cdf0e10cSrcweir /** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value. 106*cdf0e10cSrcweir Throws, if the Any is empty or contains an incompatible type. */ 107*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any& rAny ) throw (css::uno::RuntimeException); 108*cdf0e10cSrcweir /** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value. 109*cdf0e10cSrcweir Returns bDefault, if rAny is empty. Throws, if the Any contains an incompatible type. */ 110*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any& rAny, bool bDefault ) throw (css::uno::RuntimeException); 111*cdf0e10cSrcweir 112*cdf0e10cSrcweir /** Extracts a string from the passed Any, which may contain a Boolean, a value, or a string. 113*cdf0e10cSrcweir Throws, if the Any is empty or contains an incompatible type. */ 114*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC ::rtl::OUString extractStringFromAny( const css::uno::Any& rAny, bool bUppercaseBool = false ) throw (css::uno::RuntimeException); 115*cdf0e10cSrcweir /** Extracts a string from the passed Any, which may contain a Boolean, a value, or a string. 116*cdf0e10cSrcweir Returns rDefault, if rAny is empty. Throws, if the Any contains an incompatible type. */ 117*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC ::rtl::OUString extractStringFromAny( const css::uno::Any& rAny, const ::rtl::OUString& rDefault, bool bUppercaseBool = false ) throw (css::uno::RuntimeException); 118*cdf0e10cSrcweir 119*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC rtl::OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException ); 120*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC rtl::OUString VBAToRegexp(const rtl::OUString &rIn, bool bForLike = false); // needs to be in an uno service ( already this code is duplicated in basic ) 121*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( const css::uno::Reference< css::awt::XDevice >& xDevice, sal_Bool bVertical); 122*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC double PointsToPixels( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPoints, sal_Bool bVertical); 123*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC double PixelsToPoints( const css::uno::Reference< css::awt::XDevice >& xDevice, double fPixels, sal_Bool bVertical); 124*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Int32 PointsToHmm( double fPoints ); 125*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC double HmmToPoints( sal_Int32 nHmm ); 126*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Int32 getPointerStyle( const css::uno::Reference< css::frame::XModel >& ); 127*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, const Pointer& rPointer, sal_Bool bOverWrite ); 128*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection( const css::uno::Any& aObj, const css::uno::Any& aValue ) throw ( css::uno::RuntimeException ); 129*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC css::uno::Any getPropertyValue( const css::uno::Sequence< css::beans::PropertyValue >& aProp, const rtl::OUString& aName ); 130*cdf0e10cSrcweir VBAHELPER_DLLPUBLIC sal_Bool setPropertyValue( css::uno::Sequence< css::beans::PropertyValue >& aProp, const rtl::OUString& aName, const css::uno::Any& aValue ); 131*cdf0e10cSrcweir 132*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC Millimeter 133*cdf0e10cSrcweir { 134*cdf0e10cSrcweir //Factor to translate between points and hundredths of millimeters: 135*cdf0e10cSrcweir private: 136*cdf0e10cSrcweir double m_nMillimeter; 137*cdf0e10cSrcweir 138*cdf0e10cSrcweir public: 139*cdf0e10cSrcweir Millimeter(); 140*cdf0e10cSrcweir 141*cdf0e10cSrcweir Millimeter(double mm); 142*cdf0e10cSrcweir 143*cdf0e10cSrcweir void set(double mm); 144*cdf0e10cSrcweir void setInPoints(double points) ; 145*cdf0e10cSrcweir void setInHundredthsOfOneMillimeter(double hmm); 146*cdf0e10cSrcweir double get(); 147*cdf0e10cSrcweir double getInHundredthsOfOneMillimeter(); 148*cdf0e10cSrcweir double getInPoints(); 149*cdf0e10cSrcweir static sal_Int32 getInHundredthsOfOneMillimeter(double points); 150*cdf0e10cSrcweir static double getInPoints(int _hmm); 151*cdf0e10cSrcweir }; 152*cdf0e10cSrcweir 153*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC AbstractGeometryAttributes // probably should replace the ShapeHelper below 154*cdf0e10cSrcweir { 155*cdf0e10cSrcweir public: 156*cdf0e10cSrcweir virtual ~AbstractGeometryAttributes() {} 157*cdf0e10cSrcweir virtual double getLeft() const = 0; 158*cdf0e10cSrcweir virtual void setLeft( double ) = 0; 159*cdf0e10cSrcweir virtual double getTop() const = 0; 160*cdf0e10cSrcweir virtual void setTop( double ) = 0; 161*cdf0e10cSrcweir virtual double getHeight() const = 0; 162*cdf0e10cSrcweir virtual void setHeight( double ) = 0; 163*cdf0e10cSrcweir virtual double getWidth() const = 0; 164*cdf0e10cSrcweir virtual void setWidth( double ) = 0; 165*cdf0e10cSrcweir 166*cdf0e10cSrcweir virtual double getInnerHeight() const { return 0.0; } 167*cdf0e10cSrcweir virtual void setInnerHeight( double ) {} 168*cdf0e10cSrcweir virtual double getInnerWidth() const { return 0.0; } 169*cdf0e10cSrcweir virtual void setInnerWidth( double ) {} 170*cdf0e10cSrcweir virtual double getOffsetX() const { return 0.0; } 171*cdf0e10cSrcweir virtual double getOffsetY() const { return 0.0; } 172*cdf0e10cSrcweir }; 173*cdf0e10cSrcweir 174*cdf0e10cSrcweir namespace msforms { 175*cdf0e10cSrcweir class XShape; 176*cdf0e10cSrcweir } 177*cdf0e10cSrcweir 178*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC ShapeHelper 179*cdf0e10cSrcweir { 180*cdf0e10cSrcweir protected: 181*cdf0e10cSrcweir css::uno::Reference< css::drawing::XShape > xShape; 182*cdf0e10cSrcweir public: 183*cdf0e10cSrcweir ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape) throw (css::script::BasicErrorException ); 184*cdf0e10cSrcweir 185*cdf0e10cSrcweir double getHeight() const; 186*cdf0e10cSrcweir void setHeight(double _fheight) throw ( css::script::BasicErrorException ); 187*cdf0e10cSrcweir double getWidth() const; 188*cdf0e10cSrcweir void setWidth(double _fWidth) throw ( css::script::BasicErrorException ); 189*cdf0e10cSrcweir double getLeft() const; 190*cdf0e10cSrcweir void setLeft(double _fLeft); 191*cdf0e10cSrcweir double getTop() const; 192*cdf0e10cSrcweir void setTop(double _fTop); 193*cdf0e10cSrcweir }; 194*cdf0e10cSrcweir 195*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC ConcreteXShapeGeometryAttributes : public AbstractGeometryAttributes 196*cdf0e10cSrcweir { 197*cdf0e10cSrcweir std::auto_ptr< ShapeHelper > m_pShapeHelper; 198*cdf0e10cSrcweir public: 199*cdf0e10cSrcweir ConcreteXShapeGeometryAttributes( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape ); 200*cdf0e10cSrcweir virtual double getLeft() const; 201*cdf0e10cSrcweir virtual void setLeft( double nLeft ); 202*cdf0e10cSrcweir virtual double getTop() const; 203*cdf0e10cSrcweir virtual void setTop( double nTop ); 204*cdf0e10cSrcweir virtual double getHeight() const; 205*cdf0e10cSrcweir virtual void setHeight( double nHeight ); 206*cdf0e10cSrcweir virtual double getWidth() const; 207*cdf0e10cSrcweir virtual void setWidth( double nWidth); 208*cdf0e10cSrcweir virtual ~ConcreteXShapeGeometryAttributes(); 209*cdf0e10cSrcweir }; 210*cdf0e10cSrcweir 211*cdf0e10cSrcweir #define VBA_LEFT "PositionX" 212*cdf0e10cSrcweir #define VBA_TOP "PositionY" 213*cdf0e10cSrcweir #define VBA_HEIGHT "Height" 214*cdf0e10cSrcweir #define VBA_WIDTH "Width" 215*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC UserFormGeometryHelper : public AbstractGeometryAttributes 216*cdf0e10cSrcweir { 217*cdf0e10cSrcweir public: 218*cdf0e10cSrcweir UserFormGeometryHelper( 219*cdf0e10cSrcweir const css::uno::Reference< css::uno::XComponentContext >& xContext, 220*cdf0e10cSrcweir const css::uno::Reference< css::awt::XControl >& xControl, 221*cdf0e10cSrcweir double fOffsetX, double fOffsetY ); 222*cdf0e10cSrcweir virtual double getLeft() const; 223*cdf0e10cSrcweir virtual void setLeft( double fLeft ); 224*cdf0e10cSrcweir virtual double getTop() const; 225*cdf0e10cSrcweir virtual void setTop( double fTop ); 226*cdf0e10cSrcweir virtual double getWidth() const; 227*cdf0e10cSrcweir virtual void setWidth( double fWidth ); 228*cdf0e10cSrcweir virtual double getHeight() const; 229*cdf0e10cSrcweir virtual void setHeight( double fHeight ); 230*cdf0e10cSrcweir virtual double getInnerWidth() const; 231*cdf0e10cSrcweir virtual void setInnerWidth( double fWidth ); 232*cdf0e10cSrcweir virtual double getInnerHeight() const; 233*cdf0e10cSrcweir virtual void setInnerHeight( double fHeight ); 234*cdf0e10cSrcweir virtual double getOffsetX() const; 235*cdf0e10cSrcweir virtual double getOffsetY() const; 236*cdf0e10cSrcweir 237*cdf0e10cSrcweir private: 238*cdf0e10cSrcweir double implGetPos( bool bPosY ) const; 239*cdf0e10cSrcweir void implSetPos( double fPos, bool bPosY ); 240*cdf0e10cSrcweir double implGetSize( bool bHeight, bool bOuter ) const; 241*cdf0e10cSrcweir void implSetSize( double fSize, bool bHeight, bool bOuter ); 242*cdf0e10cSrcweir 243*cdf0e10cSrcweir private: 244*cdf0e10cSrcweir css::uno::Reference< css::awt::XWindow > mxWindow; 245*cdf0e10cSrcweir css::uno::Reference< css::beans::XPropertySet > mxModelProps; 246*cdf0e10cSrcweir css::uno::Reference< css::awt::XUnitConversion > mxUnitConv; 247*cdf0e10cSrcweir double mfOffsetX; 248*cdf0e10cSrcweir double mfOffsetY; 249*cdf0e10cSrcweir sal_Bool mbDialog; 250*cdf0e10cSrcweir }; 251*cdf0e10cSrcweir 252*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC ContainerUtilities 253*cdf0e10cSrcweir { 254*cdf0e10cSrcweir 255*cdf0e10cSrcweir public: 256*cdf0e10cSrcweir static rtl::OUString getUniqueName( const css::uno::Sequence< ::rtl::OUString >& _slist, const rtl::OUString& _sElementName, const ::rtl::OUString& _sSuffixSeparator); 257*cdf0e10cSrcweir static rtl::OUString getUniqueName( const css::uno::Sequence< rtl::OUString >& _slist, const rtl::OUString _sElementName, const rtl::OUString& _sSuffixSeparator, sal_Int32 _nStartSuffix ); 258*cdf0e10cSrcweir 259*cdf0e10cSrcweir static sal_Int32 FieldInList( const css::uno::Sequence< rtl::OUString >& SearchList, const rtl::OUString& SearchString ); 260*cdf0e10cSrcweir }; 261*cdf0e10cSrcweir 262*cdf0e10cSrcweir // really just a a place holder to ease the porting pain 263*cdf0e10cSrcweir class VBAHELPER_DLLPUBLIC DebugHelper 264*cdf0e10cSrcweir { 265*cdf0e10cSrcweir public: 266*cdf0e10cSrcweir static void exception( const rtl::OUString& DetailedMessage, const css::uno::Exception& ex, int err, const rtl::OUString& /*additionalArgument*/ ) throw( css::script::BasicErrorException ); 267*cdf0e10cSrcweir 268*cdf0e10cSrcweir static void exception( int err, const rtl::OUString& additionalArgument ) throw( css::script::BasicErrorException ); 269*cdf0e10cSrcweir 270*cdf0e10cSrcweir static void exception( css::uno::Exception& ex ) throw( css::script::BasicErrorException ); 271*cdf0e10cSrcweir }; 272*cdf0e10cSrcweir } // vba 273*cdf0e10cSrcweir } // ooo 274*cdf0e10cSrcweir 275*cdf0e10cSrcweir namespace ov = ooo::vba; 276*cdf0e10cSrcweir 277*cdf0e10cSrcweir #ifdef DEBUG 278*cdf0e10cSrcweir # define SC_VBA_FIXME(a) OSL_TRACE( a ) 279*cdf0e10cSrcweir # define SC_VBA_STUB() SC_VBA_FIXME(( "%s - stubbed\n", __FUNCTION__ )) 280*cdf0e10cSrcweir #else 281*cdf0e10cSrcweir # define SC_VBA_FIXME(a) 282*cdf0e10cSrcweir # define SC_VBA_STUB() 283*cdf0e10cSrcweir #endif 284*cdf0e10cSrcweir 285*cdf0e10cSrcweir #endif 286