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 | |
parent | 7c58ebaa025d6b8852608045af23239f7402a8be (diff) |
New loplugin:dynexcspec: Add @throws documentation, vbahelper
Change-Id: I44f1c8f7f2ffdbd050ea219c6b89b246fcbd2473
29 files changed, 153 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; diff --git a/vbahelper/source/msforms/vbacontrol.hxx b/vbahelper/source/msforms/vbacontrol.hxx index c2ee4db8f4e9..acbe760e9f8a 100644 --- a/vbahelper/source/msforms/vbacontrol.hxx +++ b/vbahelper/source/msforms/vbacontrol.hxx @@ -51,6 +51,7 @@ protected: css::uno::Reference< css::uno::XInterface > m_xControl; css::uno::Reference< css::frame::XModel > m_xModel; + /// @throws css::uno::RuntimeException css::uno::Reference< css::awt::XWindowPeer > getWindowPeer() throw (css::uno::RuntimeException); void fireChangeEvent(); void fireClickEvent(); @@ -97,29 +98,39 @@ public: virtual ::sal_Int32 SAL_CALL getMousePointer() throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL setMousePointer( ::sal_Int32 _mousepointer ) throw (css::uno::RuntimeException, std::exception) override; //remove resource because ooo.vba.excel.XControl is a wrapper of com.sun.star.drawing.XControlShape + /// @throws css::uno::RuntimeException void removeResource() throw( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException virtual ::sal_Int32 SAL_CALL getForeColor() throw (css::uno::RuntimeException); //XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; //General helper methods for properties (may or may not be relevant for all //controls) + /// @throws css::uno::RuntimeException sal_Int32 getBackColor() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setBackColor( sal_Int32 nBackColor ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException bool getAutoSize() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setAutoSize( bool bAutoSize ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException bool getLocked() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setLocked( bool bAutoSize ) throw (css::uno::RuntimeException); }; namespace ScVbaControlFactory { + /// @throws css::uno::RuntimeException css::uno::Reference< ov::msforms::XControl > createShapeControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XControlShape >& xControlShape, const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< ov::msforms::XControl > createUserformControl( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::awt::XControl >& xControl, diff --git a/vbahelper/source/msforms/vbalistcontrolhelper.hxx b/vbahelper/source/msforms/vbalistcontrolhelper.hxx index e60b52b9a133..d83734d93802 100644 --- a/vbahelper/source/msforms/vbalistcontrolhelper.hxx +++ b/vbahelper/source/msforms/vbalistcontrolhelper.hxx @@ -28,11 +28,17 @@ class ListControlHelper final public: explicit ListControlHelper( const css::uno::Reference< css::beans::XPropertySet >& rxControl ) : m_xProps( rxControl ){} + /// @throws css::uno::RuntimeException void SAL_CALL AddItem( const css::uno::Any& pvargItem, const css::uno::Any& pvargIndex ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void SAL_CALL removeItem( const css::uno::Any& index ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void SAL_CALL setRowSource( const OUString& _rowsource ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException ::sal_Int32 SAL_CALL getListCount() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Any SAL_CALL List( const css::uno::Any& pvargIndex, const css::uno::Any& pvarColumn ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void SAL_CALL Clear( ) throw (css::uno::RuntimeException); }; diff --git a/vbahelper/source/msforms/vbanewfont.hxx b/vbahelper/source/msforms/vbanewfont.hxx index ceebd68c56f9..3a95c1cbc282 100644 --- a/vbahelper/source/msforms/vbanewfont.hxx +++ b/vbahelper/source/msforms/vbanewfont.hxx @@ -30,6 +30,7 @@ typedef cppu::WeakImplHelper< ov::msforms::XNewFont > VbaNewFont_BASE; class VbaNewFont : public VbaNewFont_BASE { public: + /// @throws css::uno::RuntimeException explicit VbaNewFont( const css::uno::Reference< css::beans::XPropertySet >& rxModelProps ) throw (css::uno::RuntimeException); diff --git a/vbahelper/source/msforms/vbapages.hxx b/vbahelper/source/msforms/vbapages.hxx index c3906dde4085..b71da38d9d10 100644 --- a/vbahelper/source/msforms/vbapages.hxx +++ b/vbahelper/source/msforms/vbapages.hxx @@ -34,6 +34,7 @@ protected: virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; public: + /// @throws css::lang::IllegalArgumentException ScVbaPages( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xPages ) throw ( css::lang::IllegalArgumentException ); virtual ~ScVbaPages() override {} // XEnumerationAccess diff --git a/vbahelper/source/msforms/vbauserform.hxx b/vbahelper/source/msforms/vbauserform.hxx index ce249bc95071..8bf1586e833a 100644 --- a/vbahelper/source/msforms/vbauserform.hxx +++ b/vbahelper/source/msforms/vbauserform.hxx @@ -39,6 +39,8 @@ private: OUString m_sLibName; protected: public: + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaUserForm( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); virtual ~ScVbaUserForm() override; static css::uno::Reference< css::awt::XControl > nestedSearch( const OUString& aPropertyName, css::uno::Reference< css::awt::XControlContainer >& xContainer ); diff --git a/vbahelper/source/vbahelper/vbacommandbar.hxx b/vbahelper/source/vbahelper/vbacommandbar.hxx index 5c66988fb407..8510abf5ba83 100644 --- a/vbahelper/source/vbahelper/vbacommandbar.hxx +++ b/vbahelper/source/vbahelper/vbacommandbar.hxx @@ -39,6 +39,7 @@ private: bool m_bIsMenu; public: + /// @throws css::uno::RuntimeException ScVbaCommandBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, VbaCommandBarHelperRef const & pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, bool bIsMenu ) throw( css::uno::RuntimeException ); // Attributes @@ -64,6 +65,7 @@ public: class VbaDummyCommandBar : public CommandBar_BASE { public: + /// @throws css::uno::RuntimeException VbaDummyCommandBar( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx index eeeb1aafbb23..2033fe40912b 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrol.hxx @@ -43,9 +43,11 @@ protected: bool m_bTemporary; private: + /// @throws css::uno::RuntimeException void ApplyChange() throw (css::uno::RuntimeException); public: + /// @throws css::uno::RuntimeException ScVbaCommandBarControl( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw (css::uno::RuntimeException); // Attributes @@ -77,6 +79,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaCommandBarControl, ov::XCommandBarPopu class ScVbaCommandBarPopup : public CommandBarPopup_BASE { public: + /// @throws css::uno::RuntimeException ScVbaCommandBarPopup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, bool bTemporary ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) override @@ -92,6 +95,7 @@ typedef cppu::ImplInheritanceHelper< ScVbaCommandBarControl, ov::XCommandBarButt class ScVbaCommandBarButton : public CommandBarButton_BASE { public: + /// @throws css::uno::RuntimeException ScVbaCommandBarButton( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xSettings, const VbaCommandBarHelperRef& pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl, sal_Int32 nPosition, bool bTemporary ) throw (css::uno::RuntimeException); virtual sal_Int32 SAL_CALL getType() throw (css::uno::RuntimeException, std::exception) override diff --git a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx index 28ec91fdb29e..e329a1d00988 100644 --- a/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarcontrols.hxx @@ -45,6 +45,7 @@ private: static css::uno::Sequence< css::beans::PropertyValue > CreateToolbarItemData( const OUString& sCommandURL, const OUString& sHelpURL, const OUString& sLabel, sal_uInt16 nType, const css::uno::Any& aSubMenu, bool isVisible, sal_Int32 nStyle ); public: + /// @throws css::uno::RuntimeException ScVbaCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, VbaCommandBarHelperRef const & pHelper, const css::uno::Reference< css::container::XIndexAccess >& xBarSettings, const OUString& sResourceUrl ) throw( css::uno::RuntimeException ); // XEnumerationAccess @@ -63,6 +64,7 @@ public: class VbaDummyCommandBarControls : public CommandBarControls_BASE { public: + /// @throws css::uno::RuntimeException VbaDummyCommandBarControls( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext ) throw( css::uno::RuntimeException ); diff --git a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx index 43f2f80e69c8..a06b2887f0e0 100644 --- a/vbahelper/source/vbahelper/vbacommandbarhelper.hxx +++ b/vbahelper/source/vbahelper/vbacommandbarhelper.hxx @@ -58,25 +58,35 @@ private: css::uno::Reference< css::container::XNameAccess > m_xWindowState; OUString maModuleId; + /// @throws css::uno::RuntimeException void Init() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException bool hasToolbar( const OUString& sResourceUrl, const OUString& sName ) throw (css::uno::RuntimeException); public: + /// @throws css::uno::RuntimeException VbaCommandBarHelper( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException ); const css::uno::Reference< css::frame::XModel >& getModel() const { return mxModel; } + /// @throws css::uno::RuntimeException const css::uno::Reference< css::container::XNameAccess >& getPersistentWindowState() const throw (css::uno::RuntimeException) { return m_xWindowState; } + /// @throws css::uno::RuntimeException css::uno::Reference< css::container::XIndexAccess > getSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void removeSettings( const OUString& sResourceUrl ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void ApplyTempChange( const OUString& sResourceUrl, const css::uno::Reference< css::container::XIndexAccess >& xSettings) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::frame::XLayoutManager > getLayoutManager() throw (css::uno::RuntimeException); const OUString& getModuleId() const { return maModuleId; } + /// @throws css::uno::RuntimeException OUString findToolbarByName( const css::uno::Reference< css::container::XNameAccess >& xNameAccess, const OUString& sName ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException static sal_Int32 findControlByName( const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const OUString& sName, bool bMenu ) throw (css::uno::RuntimeException); static OUString generateCustomURL(); }; diff --git a/vbahelper/source/vbahelper/vbacommandbars.cxx b/vbahelper/source/vbahelper/vbacommandbars.cxx index 33ca3d3243f9..e22c524b1237 100644 --- a/vbahelper/source/vbahelper/vbacommandbars.cxx +++ b/vbahelper/source/vbahelper/vbacommandbars.cxx @@ -41,6 +41,7 @@ class CommandBarEnumeration : public ::cppu::WeakImplHelper< container::XEnumera uno::Sequence< OUString > m_sNames; sal_Int32 m_nCurrentPosition; public: + /// @throws uno::RuntimeException CommandBarEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const VbaCommandBarHelperRef& pHelper) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_pCBarHelper( pHelper ) , m_nCurrentPosition( 0 ) { uno::Reference< container::XNameAccess > xNameAccess = m_pCBarHelper->getPersistentWindowState(); diff --git a/vbahelper/source/vbahelper/vbacommandbars.hxx b/vbahelper/source/vbahelper/vbacommandbars.hxx index cb5e57fbed95..2c3fca4b5c82 100644 --- a/vbahelper/source/vbahelper/vbacommandbars.hxx +++ b/vbahelper/source/vbahelper/vbacommandbars.hxx @@ -34,6 +34,7 @@ private: VbaCommandBarHelperRef m_pCBarHelper; public: + /// @throws css::uno::RuntimeException ScVbaCommandBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::container::XIndexAccess >& xIndexAccess, const css::uno::Reference< css::frame::XModel >& xModel ) throw (css::uno::RuntimeException); virtual ~ScVbaCommandBars() override; diff --git a/vbahelper/source/vbahelper/vbadocumentsbase.cxx b/vbahelper/source/vbahelper/vbadocumentsbase.cxx index 28169927e813..10bfe880adcc 100644 --- a/vbahelper/source/vbahelper/vbadocumentsbase.cxx +++ b/vbahelper/source/vbahelper/vbadocumentsbase.cxx @@ -70,10 +70,12 @@ class DocumentsEnumImpl : public ::cppu::WeakImplHelper< container::XEnumeration Documents::const_iterator m_it; public: + /// @throws uno::RuntimeException DocumentsEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const Documents& docs ) throw ( uno::RuntimeException ) : m_xContext( xContext ), m_documents( docs ) { m_it = m_documents.begin(); } + /// @throws uno::RuntimeException explicit DocumentsEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext ) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create( m_xContext ); @@ -120,6 +122,7 @@ class DocumentsAccessImpl : public DocumentsAccessImpl_BASE NameIndexHash namesToIndices; VbaDocumentsBase::DOCUMENT_TYPE meDocType; public: + /// @throws uno::RuntimeException DocumentsAccessImpl( const uno::Reference< uno::XComponentContext >& xContext, VbaDocumentsBase::DOCUMENT_TYPE eDocType ) throw (uno::RuntimeException, std::exception) :m_xContext( xContext ), meDocType( eDocType ) { uno::Reference< container::XEnumeration > xEnum = new DocumentsEnumImpl( m_xContext ); diff --git a/vbahelper/source/vbahelper/vbafillformat.hxx b/vbahelper/source/vbahelper/vbafillformat.hxx index ed9b1192c1ec..8789560e18ee 100644 --- a/vbahelper/source/vbahelper/vbafillformat.hxx +++ b/vbahelper/source/vbahelper/vbafillformat.hxx @@ -36,6 +36,7 @@ private: sal_Int32 m_nForeColor; sal_Int16 m_nGradientAngle; private: + /// @throws css::uno::RuntimeException void setFillStyle( css::drawing::FillStyle nFillStyle ) throw (css::uno::RuntimeException); protected: virtual OUString getServiceImplName() override; @@ -44,6 +45,7 @@ protected: public: ScVbaFillFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape ); + /// @throws css::uno::RuntimeException void setForeColorAndInternalStyle( sal_Int32 nForeColor ) throw (css::uno::RuntimeException); // Attributes virtual sal_Bool SAL_CALL getVisible() throw (css::uno::RuntimeException, std::exception) override; diff --git a/vbahelper/source/vbahelper/vbahelper.cxx b/vbahelper/source/vbahelper/vbahelper.cxx index 598907a5d575..a1a30d1b43c7 100644 --- a/vbahelper/source/vbahelper/vbahelper.cxx +++ b/vbahelper/source/vbahelper/vbahelper.cxx @@ -234,6 +234,7 @@ getCurrentDoc( const OUString& sKey ) throw (uno::RuntimeException) return xModel; } +/// @throws uno::RuntimeException uno::Reference< frame::XModel > getCurrentDocCtx( const OUString& ctxName, const uno::Reference< uno::XComponentContext >& xContext ) throw (uno::RuntimeException) { diff --git a/vbahelper/source/vbahelper/vbalineformat.hxx b/vbahelper/source/vbahelper/vbalineformat.hxx index 3154b32f7c2c..eca78e8d4105 100644 --- a/vbahelper/source/vbahelper/vbalineformat.hxx +++ b/vbahelper/source/vbahelper/vbalineformat.hxx @@ -37,6 +37,7 @@ protected: virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; static sal_Int32 convertLineStartEndNameToArrowheadStyle( const OUString& sLineName ); + /// @throws css::uno::RuntimeException static OUString convertArrowheadStyleToLineStartEndName( sal_Int32 nArrowheadStyle ) throw (css::uno::RuntimeException); public: ScVbaLineFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::drawing::XShape >& xShape ); diff --git a/vbahelper/source/vbahelper/vbapictureformat.hxx b/vbahelper/source/vbahelper/vbapictureformat.hxx index b7d54e83c8b3..73cb5e98a355 100644 --- a/vbahelper/source/vbahelper/vbapictureformat.hxx +++ b/vbahelper/source/vbahelper/vbapictureformat.hxx @@ -35,8 +35,11 @@ protected: virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; private: + /// @throws css::uno::RuntimeException static void checkParameterRangeInDouble( double nRange, double nMin, double nMax ) throw (css::uno::RuntimeException); public: + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaPictureFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::drawing::XShape > const & xShape ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); |