diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 17:48:05 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 18:03:10 +0100 |
commit | 9439844a795e32c67bdb0b0d83f7d9c200866df4 (patch) | |
tree | 4e324d513c88a9e75bfe0d7e8e638a5b42d86125 /include | |
parent | 7c58ebaa025d6b8852608045af23239f7402a8be (diff) |
New loplugin:dynexcspec: Add @throws documentation, vbahelper
Change-Id: I44f1c8f7f2ffdbd050ea219c6b89b246fcbd2473
Diffstat (limited to 'include')
-rw-r--r-- | include/vbahelper/vbaaccesshelper.hxx | 1 | ||||
-rw-r--r-- | include/vbahelper/vbaapplicationbase.hxx | 1 | ||||
-rw-r--r-- | include/vbahelper/vbacollectionimpl.hxx | 9 | ||||
-rw-r--r-- | include/vbahelper/vbadocumentbase.hxx | 1 | ||||
-rw-r--r-- | include/vbahelper/vbadocumentsbase.hxx | 3 | ||||
-rw-r--r-- | include/vbahelper/vbaeventshelperbase.hxx | 54 | ||||
-rw-r--r-- | include/vbahelper/vbafontbase.hxx | 1 | ||||
-rw-r--r-- | include/vbahelper/vbahelper.hxx | 24 | ||||
-rw-r--r-- | include/vbahelper/vbapagesetupbase.hxx | 5 | ||||
-rw-r--r-- | include/vbahelper/vbashape.hxx | 5 | ||||
-rw-r--r-- | include/vbahelper/vbashaperange.hxx | 1 | ||||
-rw-r--r-- | include/vbahelper/vbashapes.hxx | 6 | ||||
-rw-r--r-- | include/vbahelper/vbawindowbase.hxx | 6 |
13 files changed, 102 insertions, 15 deletions
diff --git a/include/vbahelper/vbaaccesshelper.hxx b/include/vbahelper/vbaaccesshelper.hxx index 6bf5d7a5eaad..9881090cd783 100644 --- a/include/vbahelper/vbaaccesshelper.hxx +++ b/include/vbahelper/vbaaccesshelper.hxx @@ -52,6 +52,7 @@ namespace ooo return xVBAFactory; } + /// @throws css::uno::Exception inline css::uno::Reference< css::uno::XInterface > createVBAUnoAPIServiceWithArgs( SfxObjectShell* pShell, const sal_Char* _pAsciiName, const css::uno::Sequence< css::uno::Any >& aArgs ) throw (css::uno::Exception) { OSL_PRECOND( pShell, "createVBAUnoAPIService: no shell!" ); diff --git a/include/vbahelper/vbaapplicationbase.hxx b/include/vbahelper/vbaapplicationbase.hxx index 2dd703574876..8743dea2290e 100644 --- a/include/vbahelper/vbaapplicationbase.hxx +++ b/include/vbahelper/vbaapplicationbase.hxx @@ -56,6 +56,7 @@ protected: VbaApplicationBase( const css::uno::Reference< css::uno::XComponentContext >& xContext ); virtual ~VbaApplicationBase() override; + /// @throws css::uno::RuntimeException virtual css::uno::Reference< css::frame::XModel > getCurrentDocument() throw (css::uno::RuntimeException) = 0; public: // XHelperInterface ( parent is itself ) diff --git a/include/vbahelper/vbacollectionimpl.hxx b/include/vbahelper/vbacollectionimpl.hxx index 8ec064d50fa7..a9f4f861444f 100644 --- a/include/vbahelper/vbacollectionimpl.hxx +++ b/include/vbahelper/vbacollectionimpl.hxx @@ -70,6 +70,7 @@ typedef ::cppu::WeakImplHelper< css::container::XEnumeration > EnumerationHelper class VBAHELPER_DLLPUBLIC SimpleIndexAccessToEnumeration : public EnumerationHelper_BASE { public: + /// @throws css::uno::RuntimeException explicit SimpleIndexAccessToEnumeration( const css::uno::Reference< css::container::XIndexAccess >& rxIndexAccess ) throw (css::uno::RuntimeException) : mxIndexAccess( rxIndexAccess ), mnIndex( 0 ) {} @@ -102,6 +103,7 @@ private: class VBAHELPER_DLLPUBLIC SimpleEnumerationBase : public EnumerationHelper_BASE { public: + /// @throws css::uno::RuntimeException explicit SimpleEnumerationBase( const css::uno::Reference< css::container::XIndexAccess >& rxIndexAccess ) throw (css::uno::RuntimeException) : mxEnumeration( new SimpleIndexAccessToEnumeration( rxIndexAccess ) ) {} @@ -133,7 +135,7 @@ protected: css::uno::Reference< css::uno::XComponentContext > m_xContext; css::uno::Reference< css::container::XEnumeration > m_xEnumeration; public: - + /// @throws css::uno::RuntimeException EnumerationHelperImpl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XEnumeration >& xEnumeration ) throw ( css::uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) throw (css::uno::RuntimeException, std::exception) override { return m_xEnumeration->hasMoreElements(); } }; @@ -240,6 +242,7 @@ protected: css::uno::Reference< css::container::XNameAccess > m_xNameAccess; bool mbIgnoreCase; + /// @throws css::uno::RuntimeException virtual css::uno::Any getItemByStringIndex( const OUString& sIndex ) throw (css::uno::RuntimeException) { if ( !m_xNameAccess.is() ) @@ -260,6 +263,8 @@ protected: return createCollectionObject( m_xNameAccess->getByName( sIndex ) ); } + /// @throws css::uno::RuntimeException + /// @throws css::lang::IndexOutOfBoundsException virtual css::uno::Any getItemByIntIndex( const sal_Int32 nIndex ) throw (css::uno::RuntimeException, css::lang::IndexOutOfBoundsException) { if ( !m_xIndexAccess.is() ) @@ -334,6 +339,7 @@ typedef ScVbaCollectionBase< XCollection_InterfacesBASE > CollImplBase; class VBAHELPER_DLLPUBLIC ScVbaCollectionBaseImpl : public CollImplBase { public: + /// @throws css::uno::RuntimeException ScVbaCollectionBaseImpl( 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 ) : CollImplBase( xParent, xContext, xIndexAccess){} }; @@ -344,6 +350,7 @@ class CollTestImplHelper : public ScVbaCollectionBase< ::cppu::WeakImplHelper< typedef ScVbaCollectionBase< ::cppu::WeakImplHelper< Ifc... > > ImplBase; public: + /// @throws css::uno::RuntimeException CollTestImplHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, bool bIgnoreCase = false ) throw( css::uno::RuntimeException ) : ImplBase( xParent, xContext, xIndexAccess, bIgnoreCase ) {} }; diff --git a/include/vbahelper/vbadocumentbase.hxx b/include/vbahelper/vbadocumentbase.hxx index ca1f49db415c..00e8b55fdf84 100644 --- a/include/vbahelper/vbadocumentbase.hxx +++ b/include/vbahelper/vbadocumentbase.hxx @@ -70,6 +70,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, std::exception) override; + /// @throws 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, std::exception) override; virtual void SAL_CALL Save() throw (css::uno::RuntimeException, std::exception) override; diff --git a/include/vbahelper/vbadocumentsbase.hxx b/include/vbahelper/vbadocumentsbase.hxx index 4f592c5f455d..92036f3bd465 100644 --- a/include/vbahelper/vbadocumentsbase.hxx +++ b/include/vbahelper/vbadocumentsbase.hxx @@ -59,6 +59,7 @@ private: DOCUMENT_TYPE meDocType; public: + /// @throws css::uno::RuntimeException VbaDocumentsBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, DOCUMENT_TYPE eDocType ) throw (css::uno::RuntimeException); virtual ~VbaDocumentsBase() override {} @@ -70,7 +71,9 @@ public: virtual css::uno::Any createCollectionObject( const css::uno::Any& aSource ) override = 0; protected: + /// @throws css::uno::RuntimeException css::uno::Any createDocument() throw (css::uno::RuntimeException, std::exception); + /// @throws css::uno::RuntimeException css::uno::Any openDocument( const OUString& Filename, const css::uno::Any& ReadOnly, const css::uno::Sequence< css::beans::PropertyValue >& rProps ) throw (css::uno::RuntimeException); }; diff --git a/include/vbahelper/vbaeventshelperbase.hxx b/include/vbahelper/vbaeventshelperbase.hxx index 2ffea8e39f8c..5194d07f186e 100644 --- a/include/vbahelper/vbaeventshelperbase.hxx +++ b/include/vbahelper/vbaeventshelperbase.hxx @@ -86,11 +86,11 @@ public: /** Helper to execute event handlers without throwing any exceptions. */ void processVbaEventNoThrow( sal_Int32 nEventId, const css::uno::Sequence< css::uno::Any >& rArgs ); - /** Throws, if the passed sequence does not contain a value at the specified index. */ + /** @throws css::lang::IllegalArgumentException if the passed sequence does not contain a value at the specified index. */ static inline void checkArgument( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException) { if( (nIndex < 0) || (nIndex >= rArgs.getLength()) ) throw css::lang::IllegalArgumentException(); } - /** Throws, if the passed sequence does not contain a value of a specific at the specified index. */ + /** @throws css::lang::IllegalArgumentException if the passed sequence does not contain a value of a specific at the specified index. */ template< typename Type > static inline void checkArgumentType( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException) { checkArgument( rArgs, nIndex ); if( !rArgs[ nIndex ].has< Type >() ) throw css::lang::IllegalArgumentException(); } @@ -132,25 +132,39 @@ protected: typedef ::std::deque< EventQueueEntry > EventQueue; /** Derived classes do additional prpeparations and return whether the - event handler has to be called. */ + event handler has to be called. + + @throws css::uno::RuntimeException + */ virtual bool implPrepareEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::uno::RuntimeException) = 0; - /** Derived classes have to return the argument list for the specified VBA event handler. */ + /** Derived classes have to return the argument list for the specified VBA event handler. + + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ virtual css::uno::Sequence< css::uno::Any > implBuildArgumentList( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) = 0; /** Derived classes may do additional postprocessing. Called even if the - event handler does not exist, or if an error occurred during execution. */ + event handler does not exist, or if an error occurred during execution. + + @throws css::uno::RuntimeException + */ virtual void implPostProcessEvent( EventQueue& rEventQueue, const EventHandlerInfo& rInfo, bool bCancel ) throw (css::uno::RuntimeException) = 0; - /** Derived classes have to return the name of the Basic document module. */ + /** Derived classes have to return the name of the Basic document module. + + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ virtual OUString implGetDocumentModuleName( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) const @@ -165,21 +179,39 @@ private: /** Stops listening at the document model. */ void stopListening(); - /** Returns the event handler info struct for the specified event, or throws. */ + /** Returns the event handler info struct for the specified event, or throws. + + + @throws css::lang::IllegalArgumentException + */ const EventHandlerInfo& getEventHandlerInfo( sal_Int32 nEventId ) const throw (css::lang::IllegalArgumentException); - /** Searches the event handler in the document and returns its full script path. */ + /** Searches the event handler in the document and returns its full script path. + + + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ OUString getEventHandlerPath( const EventHandlerInfo& rInfo, const css::uno::Sequence< css::uno::Any >& rArgs ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); - /** On first call, accesses the Basic library containing the VBA source code. */ + /** On first call, accesses the Basic library containing the VBA source code. + + @throws css::uno::RuntimeException + */ void ensureVBALibrary() throw (css::uno::RuntimeException); - /** Returns the type of the Basic module with the specified name. */ + /** Returns the type of the Basic module with the specified name. + + @throws css::uno::RuntimeException + */ sal_Int32 getModuleType( const OUString& rModuleName ) throw (css::uno::RuntimeException); - /** Updates the map containing paths to event handlers for a Basic module. */ + /** Updates the map containing paths to event handlers for a Basic module. + + @throws css::uno::RuntimeException + */ ModulePathMap& updateModulePathMap( const OUString& rModuleName ) throw (css::uno::RuntimeException, std::exception); protected: diff --git a/include/vbahelper/vbafontbase.hxx b/include/vbahelper/vbafontbase.hxx index 3366c952e07a..5e452e924f7d 100644 --- a/include/vbahelper/vbafontbase.hxx +++ b/include/vbahelper/vbafontbase.hxx @@ -73,6 +73,7 @@ public: // specifies a hight of normal font static const short NORMALHEIGHT = 100; + /// @throws css::uno::RuntimeException VbaFontBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, diff --git a/include/vbahelper/vbahelper.hxx b/include/vbahelper/vbahelper.hxx index 79f85068669f..e24e1e70752e 100644 --- a/include/vbahelper/vbahelper.hxx +++ b/include/vbahelper/vbahelper.hxx @@ -56,6 +56,7 @@ namespace ooo { namespace vba { + /// @throws css::lang::IllegalArgumentException template < class T > css::uno::Reference< T > getXSomethingFromArgs( css::uno::Sequence< css::uno::Any > const & args, sal_Int32 nPos, bool bCanBeNull = true ) throw (css::lang::IllegalArgumentException) { @@ -72,15 +73,23 @@ namespace ooo /** Returns the VBA document implementation object representing the passed UNO document model. */ VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getVBADocument( const css::uno::Reference< css::frame::XModel >& xModel ); VBAHELPER_DLLPUBLIC css::uno::Reference< XHelperInterface > getUnoDocModule( const OUString& aModName, SfxObjectShell* pShell ); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC SfxObjectShell* getSfxObjShell( const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::frame::XModel > getCurrentDoc( const OUString& sKey ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getThisWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentExcelDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC css::uno::Reference< css::frame::XModel > getCurrentWordDoc( const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC css::uno::Reference< css::beans::XIntrospectionAccess > getIntrospectionAccess( const css::uno::Any& aObject ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC css::uno::Reference< css::script::XTypeConverter > const & 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 OUString& aUrl ); @@ -99,16 +108,18 @@ namespace ooo VBAHELPER_DLLPUBLIC void WaitUntilPreviewIsClosed( SfxViewFrame* ); /** Extracts a boolean value from the passed Any, which may contain a Boolean or an integer or floating-point value. - Throws, if the Any is empty or contains an incompatible type. */ + @throws css::uno::RuntimeException if the Any is empty or contains an incompatible type. */ VBAHELPER_DLLPUBLIC bool extractBoolFromAny( const css::uno::Any& rAny ) throw (css::uno::RuntimeException); /** Extracts a string from the passed Any, which may contain a Boolean, a value, or a string. - Throws, if the Any is empty or contains an incompatible type. */ + @throws css::uno::RuntimeException if the Any is empty or contains an incompatible type. */ VBAHELPER_DLLPUBLIC OUString extractStringFromAny( const css::uno::Any& rAny, bool bUppercaseBool = false ) throw (css::uno::RuntimeException); /** Extracts a string from the passed Any, which may contain a Boolean, a value, or a string. - Returns rDefault, if rAny is empty. Throws, if the Any contains an incompatible type. */ + Returns rDefault, if rAny is empty. + @throws css::uno::RuntimeException if the Any contains an incompatible type. */ VBAHELPER_DLLPUBLIC OUString extractStringFromAny( const css::uno::Any& rAny, const OUString& rDefault, bool bUppercaseBool ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC OUString getAnyAsString( const css::uno::Any& pvargItem ) throw ( css::uno::RuntimeException ); VBAHELPER_DLLPUBLIC OUString VBAToRegexp(const OUString &rIn); // needs to be in an uno service ( already this code is duplicated in basic ) VBAHELPER_DLLPUBLIC double getPixelTo100thMillimeterConversionFactor( const css::uno::Reference< css::awt::XDevice >& xDevice, bool bVertical); @@ -118,6 +129,7 @@ namespace ooo VBAHELPER_DLLPUBLIC double HmmToPoints( sal_Int32 nHmm ); VBAHELPER_DLLPUBLIC PointerStyle getPointerStyle( const css::uno::Reference< css::frame::XModel >& ); VBAHELPER_DLLPUBLIC void setCursorHelper( const css::uno::Reference< css::frame::XModel >& xModel, const Pointer& rPointer, bool bOverWrite ); + /// @throws css::uno::RuntimeException VBAHELPER_DLLPUBLIC void setDefaultPropByIntrospection( const css::uno::Any& aObj, const css::uno::Any& aValue ) throw ( css::uno::RuntimeException ); VBAHELPER_DLLPUBLIC css::uno::Any getPropertyValue( const css::uno::Sequence< css::beans::PropertyValue >& aProp, const OUString& aName ); VBAHELPER_DLLPUBLIC bool setPropertyValue( css::uno::Sequence< css::beans::PropertyValue >& aProp, const OUString& aName, const css::uno::Any& aValue ); @@ -166,6 +178,8 @@ class VBAHELPER_DLLPUBLIC ShapeHelper protected: css::uno::Reference< css::drawing::XShape > xShape; public: + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException ShapeHelper( const css::uno::Reference< css::drawing::XShape >& _xShape) throw (css::script::BasicErrorException, css::uno::RuntimeException); @@ -248,12 +262,16 @@ public: class VBAHELPER_DLLPUBLIC DebugHelper { public: + /// @throws css::script::BasicErrorException static void basicexception( const OUString& DetailedMessage, const css::uno::Exception& ex, int err, const OUString& /*additionalArgument*/ ) throw( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException static void basicexception( int err, const OUString& additionalArgument ) throw( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException static void basicexception( const css::uno::Exception& ex ) throw( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException static void runtimeexception( int err, const OUString& additionalArgument ) throw( css::uno::RuntimeException ); }; diff --git a/include/vbahelper/vbapagesetupbase.hxx b/include/vbahelper/vbapagesetupbase.hxx index a012c730ad18..d052590929ce 100644 --- a/include/vbahelper/vbapagesetupbase.hxx +++ b/include/vbahelper/vbapagesetupbase.hxx @@ -49,6 +49,7 @@ protected: sal_Int32 mnOrientLandscape; sal_Int32 mnOrientPortrait; + /// @throws css::uno::RuntimeException VbaPageSetupBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw (css::uno::RuntimeException); public: @@ -63,9 +64,13 @@ public: virtual void SAL_CALL setRightMargin( double margin ) throw (css::uno::RuntimeException, std::exception) override; virtual double SAL_CALL getLeftMargin() throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL setLeftMargin( double margin ) throw (css::uno::RuntimeException, std::exception) override; + /// @throws css::uno::RuntimeException virtual double SAL_CALL getHeaderMargin() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException virtual void SAL_CALL setHeaderMargin( double margin ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException virtual double SAL_CALL getFooterMargin() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException virtual void SAL_CALL setFooterMargin( double margin ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getOrientation() throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL setOrientation( sal_Int32 orientation ) throw (css::uno::RuntimeException, std::exception) override; diff --git a/include/vbahelper/vbashape.hxx b/include/vbahelper/vbashape.hxx index 3ac4045abb8a..8ded06cb573d 100644 --- a/include/vbahelper/vbashape.hxx +++ b/include/vbahelper/vbashape.hxx @@ -68,16 +68,21 @@ protected: css::uno::Reference< css::frame::XModel > m_xModel; css::uno::Any m_aRange; void addListeners(); + /// @throws css::uno::RuntimeException void removeShapeListener() throw( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException void removeShapesListener() throw( css::uno::RuntimeException ); virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; public: + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaShape( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape, const css::uno::Reference< css::drawing::XShapes >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel, sal_Int32 nType ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); virtual ~ScVbaShape() override; void setRange( css::uno::Any aRange ) { m_aRange = aRange; }; + /// @throws css::uno::RuntimeException static sal_Int32 getType( const css::uno::Reference< css::drawing::XShape >& rShape ) throw (css::uno::RuntimeException); // Attributes diff --git a/include/vbahelper/vbashaperange.hxx b/include/vbahelper/vbashaperange.hxx index 2e6936020b05..736f3cfcc2b0 100644 --- a/include/vbahelper/vbashaperange.hxx +++ b/include/vbahelper/vbashaperange.hxx @@ -60,6 +60,7 @@ protected: css::uno::Reference< css::frame::XModel > m_xModel; virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; + /// @throws css::uno::RuntimeException css::uno::Reference< css::drawing::XShapes > const & getShapes() throw (css::uno::RuntimeException) ; public: ScVbaShapeRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::drawing::XDrawPage>& xDrawShape, const css::uno::Reference< css::frame::XModel >& xModel ); diff --git a/include/vbahelper/vbashapes.hxx b/include/vbahelper/vbashapes.hxx index 5699cb73c19d..34d5336dfbaf 100644 --- a/include/vbahelper/vbashapes.hxx +++ b/include/vbahelper/vbashapes.hxx @@ -63,10 +63,15 @@ protected: css::uno::Reference< css::frame::XModel > m_xModel; virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; + /// @throws css::uno::RuntimeException css::uno::Reference< css::container::XIndexAccess > getShapesByArrayIndices( const css::uno::Any& Index ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::drawing::XShape > createShape( const OUString& service ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Any AddRectangle( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Any AddEllipse( sal_Int32 startX, sal_Int32 startY, sal_Int32 nLineWidth, sal_Int32 nLineHeight, const css::uno::Any& rRange ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Any AddTextboxInWriter( sal_Int32 _nOrientation, sal_Int32 _nLeft, sal_Int32 _nTop, sal_Int32 _nWidth, sal_Int32 _nHeight ) throw (css::uno::RuntimeException); OUString createName( const OUString& sName ); //TODO helperapi using a writer document @@ -74,6 +79,7 @@ protected: public: ScVbaShapes( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xShapes, const css::uno::Reference< css::frame::XModel >& xModel ); + /// @throws css::uno::RuntimeException static void setDefaultShapeProperties( const css::uno::Reference< css::drawing::XShape >& xShape ) throw (css::uno::RuntimeException); static void setShape_NameProperty( const css::uno::Reference< css::drawing::XShape >& xShape, const OUString& sName ); //XEnumerationAccess diff --git a/include/vbahelper/vbawindowbase.hxx b/include/vbahelper/vbawindowbase.hxx index 4f3c62ca2f0f..b91e63f06dd9 100644 --- a/include/vbahelper/vbawindowbase.hxx +++ b/include/vbahelper/vbawindowbase.hxx @@ -51,12 +51,14 @@ typedef InheritedHelperInterfaceWeakImpl< ov::XWindowBase > WindowBaseImpl_BASE; class VBAHELPER_DLLPUBLIC VbaWindowBase : public WindowBaseImpl_BASE { public: + /// @throws css::uno::RuntimeException VbaWindowBase( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel, const css::uno::Reference< css::frame::XController >& xController ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException VbaWindowBase( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) @@ -79,13 +81,17 @@ public: virtual css::uno::Sequence<OUString> getServiceNames() override; protected: + /// @throws css::uno::RuntimeException css::uno::Reference< css::frame::XController > getController() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::awt::XWindow > getWindow() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::awt::XWindow2 > getWindow2() throw (css::uno::RuntimeException); css::uno::Reference< css::frame::XModel > m_xModel; private: + /// @throws css::uno::RuntimeException void construct( const css::uno::Reference< css::frame::XController >& xController ) throw (css::uno::RuntimeException); css::uno::WeakReference< css::frame::XController > m_xController; |