diff options
author | Noel Power <noel.power@novell.com> | 2010-10-13 10:51:50 +0100 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-10-13 10:51:50 +0100 |
commit | 6db6a43ddc5a66f41f109b7995fd83adb5d35411 (patch) | |
tree | be01c36438a39fdebd43608355671d2e6d120108 /vbahelper/inc | |
parent | 20658054d8bd6380b4b175b552ccc1480c49d01c (diff) | |
parent | d1a9ad8f4dc25817cea279262286cdfb421fe891 (diff) |
Merge branch 'vba' fix conflics, trailing ws & tab issues
also removed some old headers ( which I need to add new ones for )
Conflicts:
basic/source/classes/sbunoobj.cxx
basic/source/classes/sbxmod.cxx
xmloff/inc/xmlnmspe.hxx
xmloff/inc/xmloff/xmltoken.hxx
xmlscript/inc/xmlscript/xmldlg_imexp.hxx
Diffstat (limited to 'vbahelper/inc')
-rw-r--r-- | vbahelper/inc/vbahelper/vbaaccesshelper.hxx | 4 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbaapplicationbase.hxx | 2 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbacollectionimpl.hxx | 17 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbadialogbase.hxx | 2 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbadocumentbase.hxx | 2 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbahelper.hxx | 27 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbashape.hxx | 1 | ||||
-rw-r--r-- | vbahelper/inc/vbahelper/vbashaperange.hxx | 3 |
8 files changed, 51 insertions, 7 deletions
diff --git a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx index 79bb44ce30a4..ebac18a090d0 100644 --- a/vbahelper/inc/vbahelper/vbaaccesshelper.hxx +++ b/vbahelper/inc/vbahelper/vbaaccesshelper.hxx @@ -71,7 +71,9 @@ namespace ooo return bRes; } VBAHELPER_DLLPUBLIC inline bool isAlienExcelDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-excel" ); } - VBAHELPER_DLLPUBLIC inline bool isAlienWordDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-word" ); } + //VBAHELPER_DLLPUBLIC inline bool isAlienWordDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/vnd.ms-word" ); } + // word seems to return an erroneous mime type :-/ "application/msword" not consistent with the excel one + VBAHELPER_DLLPUBLIC inline bool isAlienWordDoc( SfxObjectShell& rDocShell ) { return isAlienDoc( rDocShell, "application/msword" ); } } // openoffice } // org diff --git a/vbahelper/inc/vbahelper/vbaapplicationbase.hxx b/vbahelper/inc/vbahelper/vbaapplicationbase.hxx index 6902bc7b5042..8fcc2cfa7170 100644 --- a/vbahelper/inc/vbahelper/vbaapplicationbase.hxx +++ b/vbahelper/inc/vbahelper/vbaapplicationbase.hxx @@ -62,7 +62,7 @@ public: virtual css::uno::Any SAL_CALL getVBE() throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL getVBProjects() throw (css::uno::RuntimeException); - virtual void SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException); + virtual css::uno::Any SAL_CALL Run( const ::rtl::OUString& MacroName, const css::uno::Any& varg1, const css::uno::Any& varg2, const css::uno::Any& varg3, const css::uno::Any& varg4, const css::uno::Any& varg5, const css::uno::Any& varg6, const css::uno::Any& varg7, const css::uno::Any& varg8, const css::uno::Any& varg9, const css::uno::Any& varg10, const css::uno::Any& varg11, const css::uno::Any& varg12, const css::uno::Any& varg13, const css::uno::Any& varg14, const css::uno::Any& varg15, const css::uno::Any& varg16, const css::uno::Any& varg17, const css::uno::Any& varg18, const css::uno::Any& varg19, const css::uno::Any& varg20, const css::uno::Any& varg21, const css::uno::Any& varg22, const css::uno::Any& varg23, const css::uno::Any& varg24, const css::uno::Any& varg25, const css::uno::Any& varg26, const css::uno::Any& varg27, const css::uno::Any& varg28, const css::uno::Any& varg29, const css::uno::Any& varg30 ) throw (css::uno::RuntimeException); virtual void SAL_CALL OnTime( const css::uno::Any& aEarliestTime, const ::rtl::OUString& aFunction, const css::uno::Any& aLatestTime, const css::uno::Any& aSchedule ) throw (css::uno::RuntimeException); virtual float SAL_CALL CentimetersToPoints( float _Centimeters ) throw (css::uno::RuntimeException); virtual void SAL_CALL Undo() throw (css::uno::RuntimeException); diff --git a/vbahelper/inc/vbahelper/vbacollectionimpl.hxx b/vbahelper/inc/vbahelper/vbacollectionimpl.hxx index 5bd58b44adaf..8a2d3c6b8ecf 100644 --- a/vbahelper/inc/vbahelper/vbacollectionimpl.hxx +++ b/vbahelper/inc/vbahelper/vbacollectionimpl.hxx @@ -243,12 +243,25 @@ typedef InheritedHelperInterfaceImpl< Ifc1 > BaseColBase; protected: css::uno::Reference< css::container::XIndexAccess > m_xIndexAccess; css::uno::Reference< css::container::XNameAccess > m_xNameAccess; + sal_Bool mbIgnoreCase; virtual css::uno::Any getItemByStringIndex( const rtl::OUString& sIndex ) throw (css::uno::RuntimeException) { if ( !m_xNameAccess.is() ) throw css::uno::RuntimeException( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("ScVbaCollectionBase string index access not supported by this object") ), css::uno::Reference< css::uno::XInterface >() ); + if( mbIgnoreCase ) + { + css::uno::Sequence< rtl::OUString > sElementNames = m_xNameAccess->getElementNames(); + for( sal_Int32 i = 0; i < sElementNames.getLength(); i++ ) + { + rtl::OUString aName = sElementNames[i]; + if( aName.equalsIgnoreAsciiCase( sIndex ) ) + { + return createCollectionObject( m_xNameAccess->getByName( aName ) ); + } + } + } return createCollectionObject( m_xNameAccess->getByName( sIndex ) ); } @@ -275,7 +288,7 @@ protected: } public: - ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ){ m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); } + ScVbaCollectionBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, sal_Bool bIgnoreCase = sal_False ) : BaseColBase( xParent, xContext ), m_xIndexAccess( xIndexAccess ), mbIgnoreCase( bIgnoreCase ) { m_xNameAccess.set(m_xIndexAccess, css::uno::UNO_QUERY); } //XCollection virtual ::sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException) { @@ -340,7 +353,7 @@ class VBAHELPER_DLLPUBLIC CollTestImplHelper : public ScVbaCollectionBase< ::cp typedef ScVbaCollectionBase< ::cppu::WeakImplHelper1< Ifc > > ImplBase1; public: - CollTestImplHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess ) {} + CollTestImplHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, sal_Bool bIgnoreCase = sal_False ) throw( css::uno::RuntimeException ) : ImplBase1( xParent, xContext, xIndexAccess, bIgnoreCase ) {} }; diff --git a/vbahelper/inc/vbahelper/vbadialogbase.hxx b/vbahelper/inc/vbahelper/vbadialogbase.hxx index 79c3fa551073..56e1da9115d0 100644 --- a/vbahelper/inc/vbahelper/vbadialogbase.hxx +++ b/vbahelper/inc/vbahelper/vbadialogbase.hxx @@ -44,7 +44,7 @@ public: virtual ~VbaDialogBase() {} // Methods - virtual void SAL_CALL Show() throw (css::uno::RuntimeException); + virtual sal_Bool SAL_CALL Show() throw (css::uno::RuntimeException); virtual rtl::OUString mapIndexToName( sal_Int32 nIndex ) = 0; }; diff --git a/vbahelper/inc/vbahelper/vbadocumentbase.hxx b/vbahelper/inc/vbahelper/vbadocumentbase.hxx index 2588b7da1720..3526c928e993 100644 --- a/vbahelper/inc/vbahelper/vbadocumentbase.hxx +++ b/vbahelper/inc/vbahelper/vbadocumentbase.hxx @@ -58,7 +58,7 @@ public: virtual void SAL_CALL Close( const css::uno::Any &bSaveChanges, const css::uno::Any &aFileName, const css::uno::Any &bRouteWorkbook ) throw (css::uno::RuntimeException); - virtual void SAL_CALL Protect( const css::uno::Any & aPassword ) throw (css::uno::RuntimeException); + virtual void SAL_CALL Protect( const css::uno::Any &aPassword ) throw (css::uno::RuntimeException); virtual void SAL_CALL Unprotect( const css::uno::Any &aPassword ) throw (css::uno::RuntimeException); virtual void SAL_CALL Save() throw (css::uno::RuntimeException); virtual void SAL_CALL Activate() throw (css::uno::RuntimeException); diff --git a/vbahelper/inc/vbahelper/vbahelper.hxx b/vbahelper/inc/vbahelper/vbahelper.hxx index ccabb9114f2d..7d2c6a76a0ff 100644 --- a/vbahelper/inc/vbahelper/vbahelper.hxx +++ b/vbahelper/inc/vbahelper/vbahelper.hxx @@ -35,6 +35,10 @@ #include <com/sun/star/lang/IllegalArgumentException.hpp> #include <com/sun/star/awt/XControl.hpp> #include <com/sun/star/awt/XDevice.hpp> +#include <com/sun/star/frame/XDispatchResultListener.hpp> +#include <com/sun/star/frame/DispatchResultEvent.hpp> +#include <com/sun/star/frame/DispatchResultState.hpp> +#include <com/sun/star/lang/EventObject.hpp> #include <com/sun/star/awt/XUnitConversion.hpp> #include <basic/basmgr.hxx> #include <basic/sberrors.hxx> @@ -77,7 +81,7 @@ namespace ooo VBAHELPER_DLLPUBLIC css::uno::Reference< css::script::XTypeConverter > getTypeConverter( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString& aUrl ); - VBAHELPER_DLLPUBLIC void dispatchRequests( const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString& aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps ); + VBAHELPER_DLLPUBLIC void dispatchRequests (const css::uno::Reference< css::frame::XModel>& xModel, const rtl::OUString & aUrl, const css::uno::Sequence< css::beans::PropertyValue >& sProps, const css::uno::Reference< css::frame::XDispatchResultListener >& rListener = css::uno::Reference< css::frame::XDispatchResultListener >(), const sal_Bool bSilent = sal_True ); VBAHELPER_DLLPUBLIC void dispatchExecute(SfxViewShell* pView, USHORT nSlot, SfxCallMode nCall = SFX_CALLMODE_SYNCHRON ); VBAHELPER_DLLPUBLIC sal_Int32 OORGBToXLRGB( sal_Int32 ); VBAHELPER_DLLPUBLIC sal_Int32 XLRGBToOORGB( sal_Int32 ); @@ -107,8 +111,10 @@ namespace ooo VBAHELPER_DLLPUBLIC sal_Int32 getPointerStyle( const css::uno::Reference< css::frame::XModel >& ); VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, const Pointer& rPointer, sal_Bool bOverWrite ); VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection( const css::uno::Any& aObj, const css::uno::Any& aValue ) throw ( css::uno::RuntimeException ); + VBAHELPER_DLLPUBLIC css::uno::Any getDefaultPropByIntrospection( const css::uno::Any& aObj ) throw ( css::uno::RuntimeException ); VBAHELPER_DLLPUBLIC css::uno::Any getPropertyValue( const css::uno::Sequence< css::beans::PropertyValue >& aProp, const rtl::OUString& aName ); VBAHELPER_DLLPUBLIC sal_Bool setPropertyValue( css::uno::Sequence< css::beans::PropertyValue >& aProp, const rtl::OUString& aName, const css::uno::Any& aValue ); + VBAHELPER_DLLPUBLIC void setOrAppendPropertyValue( css::uno::Sequence< css::beans::PropertyValue >& aProp, const rtl::OUString& aName, const css::uno::Any& aValue ); class VBAHELPER_DLLPUBLIC Millimeter { @@ -232,6 +238,25 @@ public: static void exception( css::uno::Exception& ex ) throw( css::script::BasicErrorException ); }; + +class VBAHELPER_DLLPUBLIC VBADispatchListener : public cppu::WeakImplHelper1< css::frame::XDispatchResultListener > +{ +private: + css::uno::Any m_Result; + sal_Bool m_State; + +public: + VBADispatchListener(); + ~VBADispatchListener(); + + css::uno::Any getResult() { return m_Result; } + sal_Bool getState() { return m_State; } + + // XDispatchResultListener + virtual void SAL_CALL dispatchFinished( const css::frame::DispatchResultEvent& aEvent ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL disposing( const css::lang::EventObject& aEvent ) throw ( css::uno::RuntimeException ); +}; + } // openoffice } // org diff --git a/vbahelper/inc/vbahelper/vbashape.hxx b/vbahelper/inc/vbahelper/vbashape.hxx index 87c640db203a..ef8934bca869 100644 --- a/vbahelper/inc/vbahelper/vbashape.hxx +++ b/vbahelper/inc/vbahelper/vbashape.hxx @@ -109,6 +109,7 @@ public: // Replace?? virtual void SAL_CALL Select( const css::uno::Any& Replace ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL ShapeRange( const css::uno::Any& index ) throw ( css::uno::RuntimeException ); + virtual void SAL_CALL Copy( ) throw (css::uno::RuntimeException); // XEventListener virtual void SAL_CALL disposing( const css::lang::EventObject& rEventObject ) throw( css::uno::RuntimeException ); }; diff --git a/vbahelper/inc/vbahelper/vbashaperange.hxx b/vbahelper/inc/vbahelper/vbashaperange.hxx index a4cc35958ef2..15455f49af46 100644 --- a/vbahelper/inc/vbahelper/vbashaperange.hxx +++ b/vbahelper/inc/vbahelper/vbashaperange.hxx @@ -56,6 +56,8 @@ public: virtual void SAL_CALL IncrementRotation( double Increment ) throw (css::uno::RuntimeException); virtual void SAL_CALL IncrementLeft( double Increment ) throw (css::uno::RuntimeException) ; virtual void SAL_CALL IncrementTop( double Increment ) throw (css::uno::RuntimeException); + virtual rtl::OUString SAL_CALL getName() throw (css::uno::RuntimeException); + virtual void SAL_CALL setName( const rtl::OUString& _name ) throw (css::uno::RuntimeException); virtual double SAL_CALL getHeight() throw (css::uno::RuntimeException); virtual void SAL_CALL setHeight( double _height ) throw (css::uno::RuntimeException); virtual double SAL_CALL getWidth() throw (css::uno::RuntimeException); @@ -76,6 +78,7 @@ public: virtual void SAL_CALL setRelativeVerticalPosition( ::sal_Int32 _relativeverticalposition ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL SAL_CALL TextFrame( ) throw (css::uno::RuntimeException); virtual css::uno::Any SAL_CALL SAL_CALL WrapFormat( ) throw (css::uno::RuntimeException); + virtual void SAL_CALL ZOrder( sal_Int32 ZOrderCmd ) throw (css::uno::RuntimeException); //XEnumerationAccess virtual css::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException); virtual css::uno::Reference< css::container::XEnumeration > SAL_CALL createEnumeration() throw (css::uno::RuntimeException); |