diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 17:52:18 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-01-19 18:03:15 +0100 |
commit | b36f675c5e13decbd3204c0e5e893a41e5653a72 (patch) | |
tree | 21239e676e490ab7b45273c2018a8d50c117227d /sc/source | |
parent | 8870dec9a431eeff5045efd4ba12a2a70bad5e24 (diff) |
New loplugin:dynexcspec: Add @throws documentation, sc
Change-Id: Ieb01ae3f8c5d3010354027ea2c6e0a2cee176e7f
Diffstat (limited to 'sc/source')
64 files changed, 401 insertions, 35 deletions
diff --git a/sc/source/filter/inc/excelfilter.hxx b/sc/source/filter/inc/excelfilter.hxx index fcd3fc514bb2..a169733dddd1 100644 --- a/sc/source/filter/inc/excelfilter.hxx +++ b/sc/source/filter/inc/excelfilter.hxx @@ -30,6 +30,7 @@ class WorkbookGlobals; class ExcelFilter : public ::oox::core::XmlFilterBase { public: + /// @throws css::uno::RuntimeException explicit ExcelFilter( const css::uno::Reference< css::uno::XComponentContext >& rxContext ) throw( css::uno::RuntimeException ); diff --git a/sc/source/ui/inc/AccessibleCellBase.hxx b/sc/source/ui/inc/AccessibleCellBase.hxx index 57041e47b4a2..7322d74bd4e9 100644 --- a/sc/source/ui/inc/AccessibleCellBase.hxx +++ b/sc/source/ui/inc/AccessibleCellBase.hxx @@ -135,13 +135,17 @@ private: virtual bool IsEditable( const css::uno::Reference<css::accessibility::XAccessibleStateSet>& rxParentStates); protected: + /// @throw css::uno::RuntimeException OUString SAL_CALL GetNote() throw (css::uno::RuntimeException); + /// @throw css::uno::RuntimeException OUString SAL_CALL GetAllDisplayNote() throw (css::uno::RuntimeException, std::exception); + /// @throw css::uno::RuntimeException OUString SAL_CALL getShadowAttrs() throw (css::uno::RuntimeException, std::exception); + /// @throw css::uno::RuntimeException OUString SAL_CALL getBorderAttrs() throw (css::uno::RuntimeException, std::exception); public: diff --git a/sc/source/ui/inc/AccessibleContextBase.hxx b/sc/source/ui/inc/AccessibleContextBase.hxx index 3acf9359fe77..e1431d2b3e41 100644 --- a/sc/source/ui/inc/AccessibleContextBase.hxx +++ b/sc/source/ui/inc/AccessibleContextBase.hxx @@ -78,9 +78,11 @@ protected: virtual ~ScAccessibleContextBase() override; public: + /// @throws css::uno::RuntimeException bool SAL_CALL isShowing( ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException virtual bool SAL_CALL isVisible() throw (css::uno::RuntimeException, std::exception); @@ -255,21 +257,29 @@ public: protected: /// Return this object's description. + /// + /// @throws css::uno::RuntimeException virtual OUString SAL_CALL createAccessibleDescription() throw (css::uno::RuntimeException, std::exception); /// Return the object's current name. + /// + /// @throws css::uno::RuntimeException virtual OUString SAL_CALL createAccessibleName() throw (css::uno::RuntimeException, std::exception); /// Return the object's current bounding box relative to the desktop. + /// + /// @throws css::uno::RuntimeException virtual Rectangle GetBoundingBoxOnScreen() const throw (css::uno::RuntimeException, std::exception); /// Return the object's current bounding box relative to the parent object. + /// + /// @throws css::uno::RuntimeException virtual Rectangle GetBoundingBox() const throw (css::uno::RuntimeException, std::exception); @@ -287,6 +297,7 @@ protected: bool IsDefunc() const { return rBHelper.bDisposed; } + /// @throws css::lang::DisposedException void IsObjectValid() const throw (css::lang::DisposedException); diff --git a/sc/source/ui/inc/AccessibleCsvControl.hxx b/sc/source/ui/inc/AccessibleCsvControl.hxx index d599c2d7975b..4794360e1db4 100644 --- a/sc/source/ui/inc/AccessibleCsvControl.hxx +++ b/sc/source/ui/inc/AccessibleCsvControl.hxx @@ -90,14 +90,17 @@ protected: /** Returns whether the object is alive. Must be called with locked mutex. */ inline bool implIsAlive() const { return !rBHelper.bDisposed && !rBHelper.bInDispose && mpControl; } - /** Throws an exception, if the object is disposed/disposing or any pointer + /** @throws css::lang::DisposedException if the object is disposed/disposing or any pointer is missing. Should be used with locked mutex! */ void ensureAlive() const throw( css::lang::DisposedException ); /** Returns the VCL control. Assumes a living object. */ ScCsvControl& implGetControl() const; - /** Returns the first child of rxParentObj, which has the role nRole. */ + /** Returns the first child of rxParentObj, which has the role nRole. + + @throws css::uno::RuntimeException + */ static css::uno::Reference< css::accessibility::XAccessible > implGetChildByRole( const css::uno::Reference< css::accessibility::XAccessible >& rxParentObj, sal_uInt16 nRole ) throw( css::uno::RuntimeException ); /** Creates a StateSetHelper and fills it with DEFUNC, OPAQUE, ENABLED, SHOWING and VISIBLE. */ @@ -246,13 +249,13 @@ private: virtual OUString SAL_CALL createAccessibleDescription() throw( css::uno::RuntimeException, std::exception ) override; - /** Throws an exception, if the specified character position is invalid (outside 0..len-1). */ + /** @throws css::lang::IndexOutOfBoundsException if the specified character position is invalid (outside 0..len-1). */ void ensureValidIndex( sal_Int32 nIndex ) const throw( css::lang::IndexOutOfBoundsException ); - /** Throws an exception, if the specified character position is invalid (outside 0..len). */ + /** @throws css::lang::IndexOutOfBoundsException if the specified character position is invalid (outside 0..len). */ void ensureValidIndexWithEnd( sal_Int32 nIndex ) const throw( css::lang::IndexOutOfBoundsException ); - /** Throws an exception, if the specified character range [Start,End) is invalid. + /** @throws css::lang::IndexOutOfBoundsException if the specified character range [Start,End) is invalid. @descr If Start>End, swaps Start and End before checking. */ void ensureValidRange( sal_Int32& rnStartIndex, sal_Int32& rnEndIndex ) const throw( css::lang::IndexOutOfBoundsException ); @@ -260,7 +263,10 @@ private: /** Returns the VCL ruler control. Assumes a living object. */ ScCsvRuler& implGetRuler() const; - /** Builds the entire string buffer. */ + /** Builds the entire string buffer. + + @throws css::uno::RuntimeException + */ void constructStringBuffer() throw( css::uno::RuntimeException ); /** Returns the character count of the text. */ sal_Int32 implGetTextLength() const; @@ -482,10 +488,10 @@ private: virtual OUString SAL_CALL createAccessibleDescription() throw( css::uno::RuntimeException, std::exception ) override; - /** Throws an exception, if nIndex is not a valid child index. */ + /** @throws css::lang::IndexOutOfBoundsException if nIndex is not a valid child index. */ void ensureValidIndex( sal_Int32 nIndex ) const throw( css::lang::IndexOutOfBoundsException ); - /** Throws an exception, if the specified position is invalid. */ + /** @Throws css::lang::IndexOutOfBoundsException if the specified position is invalid. */ void ensureValidPosition( sal_Int32 nRow, sal_Int32 nColumn ) const throw( css::lang::IndexOutOfBoundsException ); diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx index 5bab83fe5b73..9db139b88478 100644 --- a/sc/source/ui/unoobj/docuno.cxx +++ b/sc/source/ui/unoobj/docuno.cxx @@ -2961,6 +2961,7 @@ uno::Sequence< sheet::opencl::OpenCLPlatform > ScModelObj::getOpenCLPlatforms() namespace { +/// @throws css::uno::RuntimeException void setOpcodeSubsetTest(bool bFlag) throw (uno::RuntimeException, std::exception) { diff --git a/sc/source/ui/vba/excelvbahelper.cxx b/sc/source/ui/vba/excelvbahelper.cxx index b6619f2409b7..7d86430f811c 100644 --- a/sc/source/ui/vba/excelvbahelper.cxx +++ b/sc/source/ui/vba/excelvbahelper.cxx @@ -109,22 +109,26 @@ class PasteCellsWarningReseter { private: bool bInitialWarningState; + /// @throws uno::RuntimeException static uno::Reference< sheet::XGlobalSheetSettings > const & getGlobalSheetSettings() throw ( uno::RuntimeException ) { static uno::Reference< sheet::XGlobalSheetSettings > xProps = sheet::GlobalSheetSettings::create( comphelper::getProcessComponentContext() ); return xProps; } + /// @throws uno::RuntimeException static bool getReplaceCellsWarning() throw ( uno::RuntimeException ) { return getGlobalSheetSettings()->getReplaceCellsWarning(); } + /// @throws uno::RuntimeException static void setReplaceCellsWarning( bool bState ) throw ( uno::RuntimeException ) { getGlobalSheetSettings()->setReplaceCellsWarning( bState ); } public: + /// @throws uno::RuntimeException PasteCellsWarningReseter() throw ( uno::RuntimeException ) { bInitialWarningState = getReplaceCellsWarning(); diff --git a/sc/source/ui/vba/excelvbahelper.hxx b/sc/source/ui/vba/excelvbahelper.hxx index d98a1be171c1..cd17fede7ae0 100644 --- a/sc/source/ui/vba/excelvbahelper.hxx +++ b/sc/source/ui/vba/excelvbahelper.hxx @@ -47,15 +47,23 @@ ScDocShell* getDocShell( const css::uno::Reference< css::frame::XModel>& xModel ScTabViewShell* getCurrentBestViewShell( const css::uno::Reference< css::uno::XComponentContext >& xContext ); SfxViewFrame* getViewFrame( const css::uno::Reference< css::frame::XModel >& xModel ); +/// @throws css::uno::RuntimeException css::uno::Reference< css::sheet::XUnnamedDatabaseRanges > GetUnnamedDataBaseRanges( ScDocShell* pShell ) throw ( css::uno::RuntimeException ); +/// @throws css::uno::RuntimeException css::uno::Reference< css::sheet::XDatabaseRange > GetAutoFiltRange( ScDocShell* pShell, sal_Int16 nSheet ) throw ( css::uno::RuntimeException ); +/// @throws css::uno::RuntimeException css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet ) throw ( css::uno::RuntimeException, std::exception ); +/// @throws css::uno::RuntimeException css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges ) throw ( css::uno::RuntimeException, std::exception ); +/// @throws css::uno::RuntimeException css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCellRange >& xRange ) throw ( css::uno::RuntimeException, std::exception ); +/// @throws css::uno::RuntimeException css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::table::XCell >& xCell ) throw ( css::uno::RuntimeException, std::exception ); +/// @throws css::uno::RuntimeException css::uno::Reference< ooo::vba::XHelperInterface > getUnoSheetModuleObj( const css::uno::Reference< css::frame::XModel >& xModel, SCTAB nTab ) throw ( css::uno::RuntimeException, std::exception ); +/// @throws css::uno::RuntimeException ScDocShell* GetDocShellFromRange( const css::uno::Reference< css::uno::XInterface >& xRange ) throw ( css::uno::RuntimeException ); void setUpDocumentModules( const css::uno::Reference< css::sheet::XSpreadsheetDocument >& xDoc ); @@ -67,6 +75,7 @@ public: // Extracts a implementation object ( via XUnoTunnel ) from an uno object // by default will throw if unsuccessful. +/// @throws css::uno::RuntimeException template < typename ImplObject > ImplObject* getImplFromDocModuleWrapper( const css::uno::Reference< css::uno::XInterface >& rxWrapperIf, bool bThrow = true ) throw (css::uno::RuntimeException) { diff --git a/sc/source/ui/vba/vbaapplication.cxx b/sc/source/ui/vba/vbaapplication.cxx index c9d55cd73272..49920849daa9 100644 --- a/sc/source/ui/vba/vbaapplication.cxx +++ b/sc/source/ui/vba/vbaapplication.cxx @@ -850,6 +850,7 @@ ScVbaApplication::Calculate() throw( script::BasicErrorException , uno::Runtime xCalculatable->calculateAll(); } +/// @throws uno::RuntimeException static uno::Reference< util::XPathSettings > const & lcl_getPathSettingsService( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) { static uno::Reference< util::XPathSettings > xPathSettings; @@ -921,7 +922,11 @@ namespace { typedef ::std::list< ScRange > ListOfScRange; -/** Appends all ranges of a VBA Range object in the passed Any to the list of ranges. */ +/** Appends all ranges of a VBA Range object in the passed Any to the list of ranges. + + @throws script::BasicErrorException + @throws uno::RuntimeException +*/ void lclAddToListOfScRange( ListOfScRange& rList, const uno::Any& rArg ) throw (script::BasicErrorException, uno::RuntimeException) { @@ -1024,7 +1029,11 @@ void lclJoinRanges( ListOfScRange& rList ) } } -/** Intersects the passed list with all ranges of a VBA Range object in the passed Any. */ +/** Intersects the passed list with all ranges of a VBA Range object in the passed Any. + + @throws script::BasicErrorException + @throws uno::RuntimeException +*/ void lclIntersectRanges( ListOfScRange& rList, const uno::Any& rArg ) throw (script::BasicErrorException, uno::RuntimeException) { @@ -1062,7 +1071,10 @@ void lclIntersectRanges( ListOfScRange& rList, const uno::Any& rArg ) } } -/** Creates a VBA Range object from the passed list of ranges. */ +/** Creates a VBA Range object from the passed list of ranges. + + @throws uno::RuntimeException +*/ uno::Reference< excel::XRange > lclCreateVbaRange( const uno::Reference< uno::XComponentContext >& rxContext, const uno::Reference< frame::XModel >& rxModel, diff --git a/sc/source/ui/vba/vbaapplication.hxx b/sc/source/ui/vba/vbaapplication.hxx index 3890bd31f641..1b74af2d7492 100644 --- a/sc/source/ui/vba/vbaapplication.hxx +++ b/sc/source/ui/vba/vbaapplication.hxx @@ -37,6 +37,7 @@ private: // note: member variables moved to struct "ScVbaAppSettings", see cxx file, to be shared by all application instances ScVbaAppSettings& mrAppSettings; + /// @throws css::uno::RuntimeException OUString getOfficePath( const OUString& sPath ) throw ( css::uno::RuntimeException, std::exception ); protected: diff --git a/sc/source/ui/vba/vbaaxes.hxx b/sc/source/ui/vba/vbaaxes.hxx index 5d3a761b9f25..e638eded5db8 100644 --- a/sc/source/ui/vba/vbaaxes.hxx +++ b/sc/source/ui/vba/vbaaxes.hxx @@ -38,6 +38,8 @@ public: // XHelperInterface virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; + /// @throws css::uno::RuntimeException + /// @throws css::script::BasicErrorException static css::uno::Reference< ov::excel::XAxis > createAxis( const css::uno::Reference< ov::excel::XChart >& xChart, const css::uno::Reference< css::uno::XComponentContext >& xContext, sal_Int32 nType, sal_Int32 nAxisGroup ) throw ( css::uno::RuntimeException, css::script::BasicErrorException ); }; diff --git a/sc/source/ui/vba/vbaaxis.hxx b/sc/source/ui/vba/vbaaxis.hxx index 5c66a3371540..12eccc8dd785 100644 --- a/sc/source/ui/vba/vbaaxis.hxx +++ b/sc/source/ui/vba/vbaaxis.hxx @@ -32,7 +32,9 @@ class ScVbaAxis : public ScVbaAxis_BASE sal_Int32 mnType; sal_Int32 mnGroup; bool bCrossesAreCustomized; + /// @throws css::uno::RuntimeException ScVbaChart* getChartPtr() throw( css::uno::RuntimeException ); + /// @throws css::script::BasicErrorException bool isValueAxis() throw( css::script::BasicErrorException ); std::unique_ptr<ov::ShapeHelper> oShapeHelper; diff --git a/sc/source/ui/vba/vbacharacters.hxx b/sc/source/ui/vba/vbacharacters.hxx index 258d4079c9e0..16db60a2643d 100644 --- a/sc/source/ui/vba/vbacharacters.hxx +++ b/sc/source/ui/vba/vbacharacters.hxx @@ -38,6 +38,8 @@ private: // Add because of MSO has different behavior. bool bReplace; public: + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaCharacters( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const ScVbaPalette& dPalette, const css::uno::Reference< css::text::XSimpleText >& xRange, const css::uno::Any& Start, const css::uno::Any& Length, bool bReplace = false ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); virtual ~ScVbaCharacters() override {} diff --git a/sc/source/ui/vba/vbachart.hxx b/sc/source/ui/vba/vbachart.hxx index 0f1dedde38c9..359b5b10cf80 100644 --- a/sc/source/ui/vba/vbachart.hxx +++ b/sc/source/ui/vba/vbachart.hxx @@ -50,14 +50,23 @@ friend class ScVbaAxis; css::uno::Reference< css::chart::XTwoAxisYSupplier > xTwoAxisYSupplier; static css::uno::Sequence< OUString > getDefaultSeriesDescriptions( sal_Int32 nCount ); + /// @throws css::script::BasicErrorException void setDefaultChartType()throw ( css::script::BasicErrorException ) ; + /// @throws css::script::BasicErrorException void setDiagram( const OUString& _sDiagramType) throw( css::script::BasicErrorException ); + /// @throws css::uno::RuntimeException bool isStacked() throw ( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException bool is100PercentStacked() throw ( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException sal_Int32 getStackedType( sal_Int32 _nStacked, sal_Int32 _n100PercentStacked, sal_Int32 _nUnStacked ) throw ( css::uno::RuntimeException ); + /// @throws css::script::BasicErrorException sal_Int32 getSolidType(sal_Int32 _nDeep, sal_Int32 _nVertiStacked, sal_Int32 _nVerti100PercentStacked, sal_Int32 _nVertiUnStacked, sal_Int32 _nHoriStacked, sal_Int32 _nHori100PercentStacked, sal_Int32 _nHoriUnStacked) throw ( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException sal_Int32 getStockUpDownValue(sal_Int32 _nUpDown, sal_Int32 _nNotUpDown) throw (css::script::BasicErrorException); + /// @throws css::script::BasicErrorException bool hasMarkers() throw ( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException sal_Int32 getMarkerType(sal_Int32 _nWithMarkers, sal_Int32 _nWithoutMarkers) throw ( css::script::BasicErrorException ); void assignDiagramAttributes(); public: @@ -65,7 +74,10 @@ public: // Non-interface const css::uno::Reference< css::beans::XPropertySet >& xDiagramPropertySet() const { return mxDiagramPropertySet; } + /// @throws css::uno::RuntimeException bool is3D() throw ( css::uno::RuntimeException ); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException css::uno::Reference< css::beans::XPropertySet > getAxisPropertySet(sal_Int32 _nAxisType, sal_Int32 _nAxisGroup) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); // Methods virtual OUString SAL_CALL getName() throw (css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbachartobject.hxx b/sc/source/ui/vba/vbachartobject.hxx index 95f5df95bc4d..aa6d7f1f5fb9 100644 --- a/sc/source/ui/vba/vbachartobject.hxx +++ b/sc/source/ui/vba/vbachartobject.hxx @@ -44,6 +44,7 @@ class ScVbaChartObject : public ChartObjectImpl_BASE std::unique_ptr<ov::ShapeHelper> oShapeHelper; css::uno::Reference< css::container::XNamed > xNamedShape; OUString const & getPersistName(); + /// @throws css::script::BasicErrorException css::uno::Reference< css::drawing::XShape > setShape() throw ( css::script::BasicErrorException ); public: ScVbaChartObject( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableChart >& _xTableChart, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ); @@ -51,6 +52,7 @@ public: virtual void SAL_CALL setName( const OUString& sName ) throw (css::uno::RuntimeException, std::exception) override; virtual css::uno::Reference< ov::excel::XChart > SAL_CALL getChart() throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL Delete() throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override; + /// @throws css::script::BasicErrorException void Activate() throw ( css::script::BasicErrorException ); // XHelperInterface virtual OUString getServiceImplName() override; diff --git a/sc/source/ui/vba/vbachartobjects.cxx b/sc/source/ui/vba/vbachartobjects.cxx index cf1a88f55e7a..6989795debbf 100644 --- a/sc/source/ui/vba/vbachartobjects.cxx +++ b/sc/source/ui/vba/vbachartobjects.cxx @@ -40,7 +40,7 @@ class ChartObjectEnumerationImpl : public EnumerationHelperImpl uno::Reference< drawing::XDrawPageSupplier > xDrawPageSupplier; public: - + /// @throws uno::RuntimeException ChartObjectEnumerationImpl( const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< drawing::XDrawPageSupplier >& _xDrawPageSupplier, const uno::Reference< XHelperInterface >& _xParent ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( _xParent, xContext, xEnumeration ), xDrawPageSupplier( _xDrawPageSupplier ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { diff --git a/sc/source/ui/vba/vbachartobjects.hxx b/sc/source/ui/vba/vbachartobjects.hxx index 7760d9e06514..e62b1ab2634a 100644 --- a/sc/source/ui/vba/vbachartobjects.hxx +++ b/sc/source/ui/vba/vbachartobjects.hxx @@ -41,6 +41,7 @@ class ScVbaChartObjects : public ChartObjects_BASE public: ScVbaChartObjects( const css::uno::Reference< ov::XHelperInterface >& _xParent, const css::uno::Reference< css::uno::XComponentContext >& _xContext, const css::uno::Reference< css::table::XTableCharts >& _xTableCharts, const css::uno::Reference< css::drawing::XDrawPageSupplier >& _xDrawPageSupplier ); + /// @throws css::script::BasicErrorException css::uno::Sequence< OUString > getChartObjectNames() throw( css::script::BasicErrorException ); void removeByName(const OUString& _sChartName); diff --git a/sc/source/ui/vba/vbacomment.hxx b/sc/source/ui/vba/vbacomment.hxx index c257d4fc9612..b1d7a60da096 100644 --- a/sc/source/ui/vba/vbacomment.hxx +++ b/sc/source/ui/vba/vbacomment.hxx @@ -37,11 +37,17 @@ class ScVbaComment : public ScVbaComment_BASE css::uno::Reference< css::table::XCellRange > mxRange; private: + /// @throws css::uno::RuntimeException css::uno::Reference< css::sheet::XSheetAnnotation > SAL_CALL getAnnotation() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::sheet::XSheetAnnotations > SAL_CALL getAnnotations() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException sal_Int32 SAL_CALL getAnnotationIndex() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XComment > SAL_CALL getCommentByIndex( sal_Int32 Index ) throw (css::uno::RuntimeException); public: + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaComment( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, diff --git a/sc/source/ui/vba/vbacomments.cxx b/sc/source/ui/vba/vbacomments.cxx index abc868af9ccb..2f92dfff1f6e 100644 --- a/sc/source/ui/vba/vbacomments.cxx +++ b/sc/source/ui/vba/vbacomments.cxx @@ -41,6 +41,7 @@ class CommentEnumeration : public EnumerationHelperImpl { css::uno::Reference< css::frame::XModel > mxModel; public: + /// @throws uno::RuntimeException CommentEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, diff --git a/sc/source/ui/vba/vbacondition.hxx b/sc/source/ui/vba/vbacondition.hxx index 2dcda6ce2df6..d5346f2d8f50 100644 --- a/sc/source/ui/vba/vbacondition.hxx +++ b/sc/source/ui/vba/vbacondition.hxx @@ -33,11 +33,14 @@ protected: public: ScVbaCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition ); + /// @throws css::script::BasicErrorException static css::sheet::ConditionOperator retrieveAPIOperator( const css::uno::Any& _aOperator) throw ( css::script::BasicErrorException ); virtual OUString SAL_CALL Formula1( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ) SAL_OVERRIDE; virtual OUString SAL_CALL Formula2( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ) SAL_OVERRIDE; + /// @throws css::script::BasicErrorException virtual void setFormula1( const css::uno::Any& _aFormula1) throw ( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException virtual sal_Int32 Operator(bool _bIncludeFormulaValue) throw ( css::script::BasicErrorException ); virtual sal_Int32 SAL_CALL Operator() throw ( css::script::BasicErrorException, css::uno::RuntimeException ) SAL_OVERRIDE = 0; diff --git a/sc/source/ui/vba/vbaeventshelper.cxx b/sc/source/ui/vba/vbaeventshelper.cxx index 32299421d03c..4ffb20e0c84c 100644 --- a/sc/source/ui/vba/vbaeventshelper.cxx +++ b/sc/source/ui/vba/vbaeventshelper.cxx @@ -50,7 +50,11 @@ using namespace ::ooo::vba; namespace { /** Extracts a sheet index from the specified element of the passed sequence. - The element may be an integer, a Calc range or ranges object, or a VBA Range object. */ + The element may be an integer, a Calc range or ranges object, or a VBA Range object. + + @throws lang::IllegalArgumentException + @throws uno::RuntimeException +*/ SCTAB lclGetTabFromArgs( const uno::Sequence< uno::Any >& rArgs, sal_Int32 nIndex ) throw (lang::IllegalArgumentException, uno::RuntimeException) { VbaEventsHelperBase::checkArgument( rArgs, nIndex ); diff --git a/sc/source/ui/vba/vbaeventshelper.hxx b/sc/source/ui/vba/vbaeventshelper.hxx index 7ea02275cc06..4e3f33409d29 100644 --- a/sc/source/ui/vba/vbaeventshelper.hxx +++ b/sc/source/ui/vba/vbaeventshelper.hxx @@ -51,16 +51,31 @@ protected: private: /** Checks if selection has been changed compared to selection of last call. - @return true, if the selection has been changed. */ + @return true, if the selection has been changed. + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ bool isSelectionChanged( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); - /** Creates a VBA Worksheet object (the argument must contain a sheet index). */ + /** Creates a VBA Worksheet object (the argument must contain a sheet index). + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ css::uno::Any createWorksheet( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); - /** Creates a VBA Range object (the argument must contain a UNO range or UNO range list). */ + /** Creates a VBA Range object (the argument must contain a UNO range or UNO range list). + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ css::uno::Any createRange( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); - /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). */ + /** Creates a VBA Hyperlink object (the argument must contain a UNO cell). + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ css::uno::Any createHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); - /** Creates a VBA Window object (the argument must contain a model controller). */ + /** Creates a VBA Window object (the argument must contain a model controller). + @throws css::lang::IllegalArgumentException + @throws css::uno::RuntimeException + */ css::uno::Any createWindow( const css::uno::Sequence< css::uno::Any >& rArgs, sal_Int32 nIndex ) const throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception); private: diff --git a/sc/source/ui/vba/vbafont.cxx b/sc/source/ui/vba/vbafont.cxx index b5d3bd617e73..d6525665de18 100644 --- a/sc/source/ui/vba/vbafont.cxx +++ b/sc/source/ui/vba/vbafont.cxx @@ -58,6 +58,7 @@ ScVbaFont::~ScVbaFont() { } +/// @throws css::uno::RuntimeException static uno::Reference< beans::XPropertySet > lcl_TextProperties( uno::Reference< table::XCell >& xIf ) throw ( uno::RuntimeException ) { uno::Reference< text::XTextRange > xTxtRange( xIf, uno::UNO_QUERY_THROW ); diff --git a/sc/source/ui/vba/vbafont.hxx b/sc/source/ui/vba/vbafont.hxx index c212f8d0c8ef..d1138acec2c2 100644 --- a/sc/source/ui/vba/vbafont.hxx +++ b/sc/source/ui/vba/vbafont.hxx @@ -37,6 +37,7 @@ class ScVbaFont : public ScVbaFont_BASE ScCellRangeObj* mpRangeObj; SfxItemSet* GetDataSet(); public: + /// @throws css::uno::RuntimeException ScVbaFont( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, diff --git a/sc/source/ui/vba/vbaformat.hxx b/sc/source/ui/vba/vbaformat.hxx index 983d60320b83..bfe1eb0a1c80 100644 --- a/sc/source/ui/vba/vbaformat.hxx +++ b/sc/source/ui/vba/vbaformat.hxx @@ -47,45 +47,108 @@ protected: css::uno::Reference< css::beans::XPropertyState > xPropertyState; bool mbCheckAmbiguoity; bool mbAddIndent; + /// @throws css::script::BasicErrorException bool isAmbiguous(const OUString& _sPropertyName) throw ( css::script::BasicErrorException ); + /// @throws css::uno::RuntimeException css::uno::Reference< css::beans::XPropertyState > const & getXPropertyState() throw ( css::uno::RuntimeException ); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException void initializeNumberFormats() throw ( css::script::BasicErrorException, css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException SfxItemSet* getCurrentDataSet( ) throw (css::uno::RuntimeException, std::exception); protected: + /// @throws css::uno::RuntimeException virtual ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException ); public: + /// @throws css::script::BasicErrorException ScVbaFormat( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& xModel, bool bCheckAmbiguoity ) throw ( css::script::BasicErrorException ); virtual ~ScVbaFormat() {} virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() = 0; + /// @throws css::uno::RuntimeException void SAL_CALL setAddIndent( const css::uno::Any& BAddIndent) throw( css::uno::RuntimeException ) { BAddIndent >>= mbAddIndent; } + /// @throws css::uno::RuntimeException css::uno::Any SAL_CALL getAddIndent() throw( css::uno::RuntimeException ) { return css::uno::makeAny( mbAddIndent ); } // Interface Methods + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL Borders( const css::uno::Any& Index ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Reference< ::ooo::vba::excel::XFont > SAL_CALL Font( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Reference< ::ooo::vba::excel::XInterior > SAL_CALL Interior( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setNumberFormat( const css::uno::Any& NumberFormat ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getNumberFormat( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setNumberFormatLocal( const css::uno::Any& NumberFormatLocal ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getNumberFormatLocal( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setIndentLevel( const css::uno::Any& IndentLevel ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getIndentLevel( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setHorizontalAlignment( const css::uno::Any& HorizontalAlignment ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getHorizontalAlignment( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setVerticalAlignment( const css::uno::Any& VerticalAlignment ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getVerticalAlignment( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setOrientation( const css::uno::Any& Orientation ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getOrientation( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setShrinkToFit( const css::uno::Any& ShrinkToFit ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getShrinkToFit( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setWrapText( const css::uno::Any& WrapText ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getWrapText( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setLocked( const css::uno::Any& Locked ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getLocked( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setFormulaHidden( const css::uno::Any& FormulaHidden ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getFormulaHidden( ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setMergeCells( const css::uno::Any& MergeCells ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getMergeCells( ) throw (css::script::BasicErrorException, css::uno::RuntimeException) = 0; + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual void SAL_CALL setReadingOrder( const css::uno::Any& ReadingOrder ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException virtual css::uno::Any SAL_CALL getReadingOrder( ) throw (css::script::BasicErrorException, css::uno::RuntimeException); }; diff --git a/sc/source/ui/vba/vbaformatcondition.cxx b/sc/source/ui/vba/vbaformatcondition.cxx index 5db8351187f8..17629ed9c68d 100644 --- a/sc/source/ui/vba/vbaformatcondition.cxx +++ b/sc/source/ui/vba/vbaformatcondition.cxx @@ -25,6 +25,7 @@ using namespace ::ooo::vba; using namespace ::com::sun::star; +/// @throws css::script::BasicErrorException static ScVbaFormatConditions* lcl_getScVbaFormatConditionsPtr( const uno::Reference< excel::XFormatConditions >& xFormatConditions ) throw ( script::BasicErrorException ) { diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx index 4911656843ac..60a4c8ab92f7 100644 --- a/sc/source/ui/vba/vbaformatcondition.hxx +++ b/sc/source/ui/vba/vbaformatcondition.hxx @@ -39,6 +39,8 @@ protected: css::uno::Reference< ov::excel::XStyle > mxStyle; css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet; public: + /// @throws css::uno::RuntimeException + /// @throws css::script::BasicErrorException ScVbaFormatCondition( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::sheet::XSheetConditionalEntry >& _xSheetConditionalEntry, @@ -46,7 +48,9 @@ public: const css::uno::Reference< ov::excel::XFormatConditions >& _xFormatConditions, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet ) throw ( css::uno::RuntimeException, css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException void notifyRange() throw ( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException static css::sheet::ConditionOperator retrieveAPIType(sal_Int32 _nVBAType, const css::uno::Reference< css::sheet::XSheetCondition >& _xSheetCondition ) throw( css::script::BasicErrorException ); //Methods diff --git a/sc/source/ui/vba/vbaformatconditions.hxx b/sc/source/ui/vba/vbaformatconditions.hxx index 01baceee11a2..c34bc4871132 100644 --- a/sc/source/ui/vba/vbaformatconditions.hxx +++ b/sc/source/ui/vba/vbaformatconditions.hxx @@ -46,10 +46,15 @@ class ScVbaFormatConditions: public CollTestImplHelper< ov::excel::XFormatCondit css::uno::Reference< ov::excel::XRange > mxRangeParent; css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet; public: + /// @throws css::script::BasicErrorException void notifyRange() throw ( css::script::BasicErrorException ); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XFormatCondition > Add( ::sal_Int32 Type, const css::uno::Any& Operator, const css::uno::Any& Formula1, const css::uno::Any& Formula2, const css::uno::Reference< ov::excel::XStyle >& _xCalcStyle ) throw (css::script::BasicErrorException, css::uno::RuntimeException); + /// @throws css::script::BasicErrorException static OUString getA1Formula(const css::uno::Any& _aFormula) throw ( css::script::BasicErrorException ); OUString getStyleName(); + /// @throws css::script::BasicErrorException void removeFormatCondition( const OUString& _sStyleName, bool _bRemoveStyle) throw ( css::script::BasicErrorException ); const css::uno::Reference< css::sheet::XSheetConditionalEntries >& getSheetConditionalEntries() const { return mxSheetConditionalEntries; } // XFormatConditions diff --git a/sc/source/ui/vba/vbaglobals.hxx b/sc/source/ui/vba/vbaglobals.hxx index 88f538943df9..199868788e62 100644 --- a/sc/source/ui/vba/vbaglobals.hxx +++ b/sc/source/ui/vba/vbaglobals.hxx @@ -37,6 +37,7 @@ typedef ::cppu::ImplInheritanceHelper< VbaGlobalsBase, ov::excel::XGlobals > ScV class ScVbaGlobals : public ScVbaGlobals_BASE { css::uno::Reference< ov::excel::XApplication > mxApplication; + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XApplication > const & SAL_CALL getApplication() throw (css::uno::RuntimeException); public: diff --git a/sc/source/ui/vba/vbahyperlink.hxx b/sc/source/ui/vba/vbahyperlink.hxx index dd079ce0570d..899721280105 100644 --- a/sc/source/ui/vba/vbahyperlink.hxx +++ b/sc/source/ui/vba/vbahyperlink.hxx @@ -32,10 +32,13 @@ typedef InheritedHelperInterfaceWeakImpl< ov::excel::XHyperlink > HyperlinkImpl_ class ScVbaHyperlink : public HyperlinkImpl_BASE { public: + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaHyperlink( const css::uno::Sequence< css::uno::Any >& rArgs, const css::uno::Reference< css::uno::XComponentContext >& rxContext ) throw (css::lang::IllegalArgumentException, css::uno::RuntimeException); + /// @throws css::uno::RuntimeException ScVbaHyperlink( const css::uno::Reference< ov::XHelperInterface >& rxAnchor, const css::uno::Reference< css::uno::XComponentContext >& rxContext, @@ -65,8 +68,11 @@ public: private: typedef ::std::pair< OUString, OUString > UrlComponents; + /// @throws css::uno::RuntimeException void ensureTextField() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException UrlComponents getUrlComponents() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setUrlComponents( const UrlComponents& rUrlComp ) throw (css::uno::RuntimeException); private: diff --git a/sc/source/ui/vba/vbahyperlinks.cxx b/sc/source/ui/vba/vbahyperlinks.cxx index 3a3609efb990..3e8f2260f209 100644 --- a/sc/source/ui/vba/vbahyperlinks.cxx +++ b/sc/source/ui/vba/vbahyperlinks.cxx @@ -31,7 +31,10 @@ using namespace ::com::sun::star; namespace { -/** Returns true, if every range of rxInner is contained in any range of rScOuter. */ +/** Returns true, if every range of rxInner is contained in any range of rScOuter. + + @throws css::uno::RuntimeException +*/ bool lclContains( const ScRangeList& rScOuter, const uno::Reference< excel::XRange >& rxInner ) throw (uno::RuntimeException) { const ScRangeList& rScInner = ScVbaRange::getScRangeList( rxInner ); @@ -50,7 +53,9 @@ struct EqualAnchorFunctor uno::Reference< excel::XRange > mxAnchorRange; uno::Reference< msforms::XShape > mxAnchorShape; sal_Int32 mnType; + /// @throws uno::RuntimeException explicit EqualAnchorFunctor( const uno::Reference< excel::XHyperlink >& rxHlink ) throw (uno::RuntimeException); + /// @throws uno::RuntimeException bool operator()( const uno::Reference< excel::XHyperlink >& rxHlink ) const throw (uno::RuntimeException); }; @@ -104,11 +109,16 @@ namespace detail { class ScVbaHlinkContainer : public ::cppu::WeakImplHelper< container::XIndexAccess > { public: + /// @throws uno::RuntimeException explicit ScVbaHlinkContainer() throw (uno::RuntimeException); + /// @throws uno::RuntimeException explicit ScVbaHlinkContainer( const ScVbaHlinkContainerRef& rxSheetContainer, const ScRangeList& rScRanges ) throw (uno::RuntimeException); /** Inserts the passed hyperlink into the collection. Will remove a - Hyperlink object with the same anchor as the passed Hyperlink object. */ + Hyperlink object with the same anchor as the passed Hyperlink object. + + @throws uno::RuntimeException + */ void insertHyperlink( const uno::Reference< excel::XHyperlink >& rxHlink ) throw (uno::RuntimeException); // XIndexAccess diff --git a/sc/source/ui/vba/vbahyperlinks.hxx b/sc/source/ui/vba/vbahyperlinks.hxx index 12297fe54ced..81b49a6e10c3 100644 --- a/sc/source/ui/vba/vbahyperlinks.hxx +++ b/sc/source/ui/vba/vbahyperlinks.hxx @@ -98,10 +98,12 @@ typedef CollTestImplHelper< ov::excel::XHyperlinks > ScVbaHyperlinks_BASE; class ScVbaHyperlinks : private detail::ScVbaHlinkContainerMember, public ScVbaHyperlinks_BASE { public: + /// @throws css::uno::RuntimeException explicit ScVbaHyperlinks( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException explicit ScVbaHyperlinks( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext, diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx index 8c0718d95f88..32dca42a5420 100644 --- a/sc/source/ui/vba/vbainterior.hxx +++ b/sc/source/ui/vba/vbainterior.hxx @@ -56,6 +56,7 @@ protected: void SetUserDefinedAttributes( const OUString& sName, const css::uno::Any& aValue ); void SetMixedColor(); public: + /// @throws css::lang::IllegalArgumentException ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::beans::XPropertySet >& xProps, ScDocument* pScDoc = nullptr) throw ( css::lang::IllegalArgumentException); diff --git a/sc/source/ui/vba/vbamenu.hxx b/sc/source/ui/vba/vbamenu.hxx index 85c4c6f36a77..7cc42f0336b2 100644 --- a/sc/source/ui/vba/vbamenu.hxx +++ b/sc/source/ui/vba/vbamenu.hxx @@ -21,6 +21,7 @@ private: css::uno::Reference< ov::XCommandBarControl > m_xCommandBarControl; public: + /// @throws css::uno::RuntimeException ScVbaMenu( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBarControl >& rCommandBarControl ) throw( css::uno::RuntimeException ); virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbamenubar.hxx b/sc/source/ui/vba/vbamenubar.hxx index 12f6ee622ee4..03ebf37b212b 100644 --- a/sc/source/ui/vba/vbamenubar.hxx +++ b/sc/source/ui/vba/vbamenubar.hxx @@ -21,6 +21,7 @@ private: css::uno::Reference< ov::XCommandBar > m_xCommandBar; public: + /// @throws css::uno::RuntimeException ScVbaMenuBar( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBar >& rCommandBar ) throw( css::uno::RuntimeException ); virtual css::uno::Any SAL_CALL Menus( const css::uno::Any& aIndex ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbamenubars.cxx b/sc/source/ui/vba/vbamenubars.cxx index a33407de7457..93a63ec6350c 100644 --- a/sc/source/ui/vba/vbamenubars.cxx +++ b/sc/source/ui/vba/vbamenubars.cxx @@ -20,6 +20,7 @@ class MenuBarEnumeration : public ::cppu::WeakImplHelper< container::XEnumeratio uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< container::XEnumeration > m_xEnumeration; public: + /// @throws uno::RuntimeException MenuBarEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { } diff --git a/sc/source/ui/vba/vbamenubars.hxx b/sc/source/ui/vba/vbamenubars.hxx index 59e0e6ead33c..17ac680815a5 100644 --- a/sc/source/ui/vba/vbamenubars.hxx +++ b/sc/source/ui/vba/vbamenubars.hxx @@ -24,6 +24,7 @@ private: css::uno::Reference< ov::XCommandBars > m_xCommandBars; public: + /// @throws css::uno::RuntimeException ScVbaMenuBars( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBars >& xCommandBars ) throw (css::uno::RuntimeException); virtual ~ScVbaMenuBars() override; diff --git a/sc/source/ui/vba/vbamenuitem.hxx b/sc/source/ui/vba/vbamenuitem.hxx index 46a65ed72291..5fc1bbc38c78 100644 --- a/sc/source/ui/vba/vbamenuitem.hxx +++ b/sc/source/ui/vba/vbamenuitem.hxx @@ -21,6 +21,7 @@ private: css::uno::Reference< ov::XCommandBarControl > m_xCommandBarControl; public: + /// @throws css::uno::RuntimeException ScVbaMenuItem( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, const css::uno::Reference< ov::XCommandBarControl >& rCommandBarControl ) throw( css::uno::RuntimeException ); virtual OUString SAL_CALL getCaption() throw (css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbamenuitems.cxx b/sc/source/ui/vba/vbamenuitems.cxx index c1ef68428fe0..d5fd6484ecf3 100644 --- a/sc/source/ui/vba/vbamenuitems.cxx +++ b/sc/source/ui/vba/vbamenuitems.cxx @@ -23,6 +23,7 @@ class MenuEnumeration : public MenuEnumeration_BASE uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< container::XEnumeration > m_xEnumeration; public: + /// @throws uno::RuntimeException MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { } diff --git a/sc/source/ui/vba/vbamenuitems.hxx b/sc/source/ui/vba/vbamenuitems.hxx index 2ad099909673..21a19cc98ddf 100644 --- a/sc/source/ui/vba/vbamenuitems.hxx +++ b/sc/source/ui/vba/vbamenuitems.hxx @@ -23,6 +23,7 @@ private: css::uno::Reference< ov::XCommandBarControls > m_xCommandBarControls; public: + /// @throws css::uno::RuntimeException ScVbaMenuItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ) throw( css::uno::RuntimeException ); // XEnumerationAccess diff --git a/sc/source/ui/vba/vbamenus.cxx b/sc/source/ui/vba/vbamenus.cxx index 085b9a7143c8..8247faf5898d 100644 --- a/sc/source/ui/vba/vbamenus.cxx +++ b/sc/source/ui/vba/vbamenus.cxx @@ -22,6 +22,7 @@ class MenuEnumeration : public MenuEnumeration_BASE uno::Reference< uno::XComponentContext > m_xContext; uno::Reference< container::XEnumeration > m_xEnumeration; public: + /// @throws uno::RuntimeException MenuEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration) throw ( uno::RuntimeException ) : m_xParent( xParent ), m_xContext( xContext ), m_xEnumeration( xEnumeration ) { } diff --git a/sc/source/ui/vba/vbamenus.hxx b/sc/source/ui/vba/vbamenus.hxx index 37e9343f2523..dff934db42d2 100644 --- a/sc/source/ui/vba/vbamenus.hxx +++ b/sc/source/ui/vba/vbamenus.hxx @@ -23,6 +23,7 @@ private: css::uno::Reference< ov::XCommandBarControls > m_xCommandBarControls; public: + /// @throws css::uno::RuntimeException ScVbaMenus( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< ov::XCommandBarControls >& xCommandBarControls ) throw( css::uno::RuntimeException ); // XEnumerationAccess diff --git a/sc/source/ui/vba/vbanames.cxx b/sc/source/ui/vba/vbanames.cxx index 49e9b0d182fb..7042651bbb88 100644 --- a/sc/source/ui/vba/vbanames.cxx +++ b/sc/source/ui/vba/vbanames.cxx @@ -43,6 +43,7 @@ class NamesEnumeration : public EnumerationHelperImpl uno::Reference< frame::XModel > m_xModel; uno::Reference< sheet::XNamedRanges > m_xNames; public: + /// @throws uno::RuntimeException NamesEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel , const uno::Reference< sheet::XNamedRanges >& xNames ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ), m_xNames( xNames ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override diff --git a/sc/source/ui/vba/vbapagebreak.hxx b/sc/source/ui/vba/vbapagebreak.hxx index 285a6ab30f1d..125fa7aae8b0 100644 --- a/sc/source/ui/vba/vbapagebreak.hxx +++ b/sc/source/ui/vba/vbapagebreak.hxx @@ -37,6 +37,7 @@ protected: css::uno::Reference< css::beans::XPropertySet > mxRowColPropertySet; css::sheet::TablePageBreakData maTablePageBreakData; public: + /// @throws css::uno::RuntimeException ScVbaPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, @@ -55,6 +56,7 @@ typedef ScVbaPageBreak < ov::excel::XHPageBreak > ScVbaHPageBreak_BASE; class ScVbaHPageBreak : public ScVbaHPageBreak_BASE { public: + /// @throws css::uno::RuntimeException ScVbaHPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, @@ -74,6 +76,7 @@ typedef ScVbaPageBreak < ov::excel::XVPageBreak > ScVbaVPageBreak_BASE; class ScVbaVPageBreak : public ScVbaVPageBreak_BASE { public: + /// @throws css::uno::RuntimeException ScVbaVPageBreak( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::beans::XPropertySet >& xProps, diff --git a/sc/source/ui/vba/vbapagebreaks.cxx b/sc/source/ui/vba/vbapagebreaks.cxx index cfa42ebf52ba..eccd1809c911 100644 --- a/sc/source/ui/vba/vbapagebreaks.cxx +++ b/sc/source/ui/vba/vbapagebreaks.cxx @@ -40,6 +40,7 @@ public: { } + /// @throws css::uno::RuntimeException sal_Int32 getAPIStartofRange( const uno::Reference< excel::XRange >& xRange ) throw (css::uno::RuntimeException) { if( m_bColumn ) @@ -47,6 +48,7 @@ public: return xRange->getRow() - 1; } + /// @throws uno::RuntimeException sal_Int32 getAPIEndIndexofRange( const uno::Reference< excel::XRange >& xRange, sal_Int32 nUsedStart ) throw (uno::RuntimeException) { if( m_bColumn ) @@ -54,6 +56,7 @@ public: return nUsedStart + xRange->Rows( uno::Any() )->getCount(); } + /// @throws uno::RuntimeException uno::Sequence<sheet::TablePageBreakData> getAllPageBreaks() throw (uno::RuntimeException) { if( m_bColumn ) @@ -61,6 +64,7 @@ public: return mxSheetPageBreak->getRowPageBreaks(); } + /// @throws uno::RuntimeException uno::Reference<container::XIndexAccess> getRowColContainer() throw (uno::RuntimeException) { uno::Reference< table::XColumnRowRange > xColumnRowRange( mxSheetPageBreak, uno::UNO_QUERY_THROW ); @@ -72,7 +76,10 @@ public: return xIndexAccess; } + /// @throws uno::RuntimeException sheet::TablePageBreakData getTablePageBreakData( sal_Int32 nAPIItemIndex ) throw (uno::RuntimeException); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException uno::Any Add( const css::uno::Any& Before ) throw ( css::script::BasicErrorException, css::uno::RuntimeException); // XIndexAccess diff --git a/sc/source/ui/vba/vbapagebreaks.hxx b/sc/source/ui/vba/vbapagebreaks.hxx index 62cd1b7c06fc..331c7d65e06a 100644 --- a/sc/source/ui/vba/vbapagebreaks.hxx +++ b/sc/source/ui/vba/vbapagebreaks.hxx @@ -39,6 +39,7 @@ typedef CollTestImplHelper< ov::excel::XHPageBreaks > ScVbaHPageBreaks_BASE; class ScVbaHPageBreaks : public ScVbaHPageBreaks_BASE { public: + /// @throws css::uno::RuntimeException ScVbaHPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak) throw (css::uno::RuntimeException); @@ -63,6 +64,7 @@ typedef CollTestImplHelper< ov::excel::XVPageBreaks > ScVbaVPageBreaks_BASE; class ScVbaVPageBreaks : public ScVbaVPageBreaks_BASE { public: + /// @throws css::uno::RuntimeException ScVbaVPageBreaks( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, css::uno::Reference< css::sheet::XSheetPageBreak >& xSheetPageBreak ) throw ( css::uno::RuntimeException ); diff --git a/sc/source/ui/vba/vbapagesetup.hxx b/sc/source/ui/vba/vbapagesetup.hxx index 37ef8172d991..579a42727ae8 100644 --- a/sc/source/ui/vba/vbapagesetup.hxx +++ b/sc/source/ui/vba/vbapagesetup.hxx @@ -35,6 +35,7 @@ class ScVbaPageSetup : public ScVbaPageSetup_BASE css::uno::Reference< css::sheet::XSpreadsheet > mxSheet; bool mbIsLandscape; public: + /// @throws css::uno::RuntimeException ScVbaPageSetup( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSpreadsheet>& xSheet, diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx index 046d975d6200..831aca519f6a 100644 --- a/sc/source/ui/vba/vbapane.hxx +++ b/sc/source/ui/vba/vbapane.hxx @@ -28,6 +28,7 @@ class ScVbaPane : public cppu::WeakImplHelper< ov::excel::XPane > { public: + /// @throws css::uno::RuntimeException ScVbaPane( const css::uno::Reference< ov::XHelperInterface >& rParent, const css::uno::Reference< css::uno::XComponentContext >& rContext, diff --git a/sc/source/ui/vba/vbapivottables.cxx b/sc/source/ui/vba/vbapivottables.cxx index 1670b968e1f2..97facba0c103 100644 --- a/sc/source/ui/vba/vbapivottables.cxx +++ b/sc/source/ui/vba/vbapivottables.cxx @@ -33,6 +33,7 @@ uno::Any DataPilotToPivotTable( const uno::Any& aSource, uno::Reference< uno::XC class PivotTableEnumeration : public EnumerationHelperImpl { public: + /// @throws uno::RuntimeException PivotTableEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override diff --git a/sc/source/ui/vba/vbarange.cxx b/sc/source/ui/vba/vbarange.cxx index fe1247debdaf..8599c4450e44 100644 --- a/sc/source/ui/vba/vbarange.cxx +++ b/sc/source/ui/vba/vbarange.cxx @@ -298,7 +298,7 @@ class SingleRangeEnumeration : public EnumerationHelper_BASE uno::Reference< table::XCellRange > m_xRange; bool bHasMore; public: - + /// @throws uno::RuntimeException explicit SingleRangeEnumeration( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) : m_xRange( xRange ), bHasMore( true ) { } virtual sal_Bool SAL_CALL hasMoreElements( ) throw (uno::RuntimeException, std::exception) override { return bHasMore; } virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override @@ -342,7 +342,7 @@ class RangesEnumerationImpl : public EnumerationHelperImpl bool mbIsRows; bool mbIsColumns; public: - + /// @throws uno::RuntimeException RangesEnumerationImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, bool bIsRows, bool bIsColumns ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), mbIsRows( bIsRows ), mbIsColumns( bIsColumns ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override { @@ -385,6 +385,7 @@ ScVbaRangeAreas::createCollectionObject( const uno::Any& aSource ) } // assume that xIf is infact a ScCellRangesBase +/// @throws uno::RuntimeException ScDocShell* getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::RuntimeException ) { @@ -394,6 +395,7 @@ getDocShellFromIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::R return pUno->GetDocShell(); } +/// @throws uno::RuntimeException ScDocShell* getDocShellFromRange( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) { @@ -402,6 +404,7 @@ getDocShellFromRange( const uno::Reference< table::XCellRange >& xRange ) throw return getDocShellFromIf(xIf ); } +/// @throws uno::RuntimeException ScDocShell* getDocShellFromRanges( const uno::Reference< sheet::XSheetCellRangeContainer >& xRanges ) throw ( uno::RuntimeException ) { @@ -410,12 +413,14 @@ getDocShellFromRanges( const uno::Reference< sheet::XSheetCellRangeContainer >& return getDocShellFromIf(xIf ); } +/// @throws uno::RuntimeException uno::Reference< frame::XModel > getModelFromXIf( const uno::Reference< uno::XInterface >& xIf ) throw ( uno::RuntimeException ) { ScDocShell* pDocShell = getDocShellFromIf(xIf ); return pDocShell->GetModel(); } +/// @throws uno::RuntimeException uno::Reference< frame::XModel > getModelFromRange( const uno::Reference< table::XCellRange >& xRange ) throw ( uno::RuntimeException ) { // the XInterface for getImplementation can be any derived interface, no need for queryInterface @@ -640,6 +645,7 @@ class CellsEnumeration : public CellsEnumeration_BASE vCellPos m_CellPositions; vCellPos::const_iterator m_it; + /// @throws uno::RuntimeException uno::Reference< table::XCellRange > getArea( sal_Int32 nVBAIndex ) throw ( uno::RuntimeException ) { if ( nVBAIndex < 1 || nVBAIndex > m_xAreas->getCount() ) @@ -1090,35 +1096,42 @@ class RangeHelper uno::Reference< table::XCellRange > m_xCellRange; public: + /// @throws uno::RuntimeException explicit RangeHelper( const uno::Reference< table::XCellRange >& xCellRange ) throw (uno::RuntimeException) : m_xCellRange( xCellRange ) { if ( !m_xCellRange.is() ) throw uno::RuntimeException(); } + /// @throws uno::RuntimeException explicit RangeHelper( const uno::Any& rCellRange ) throw (uno::RuntimeException) { m_xCellRange.set(rCellRange, uno::UNO_QUERY_THROW); } + /// @throws uno::RuntimeException uno::Reference< sheet::XSheetCellRange > getSheetCellRange() throw (uno::RuntimeException) { return uno::Reference< sheet::XSheetCellRange >(m_xCellRange, uno::UNO_QUERY_THROW); } + /// @throws uno::RuntimeException uno::Reference< sheet::XSpreadsheet > getSpreadSheet() throw (uno::RuntimeException) { return getSheetCellRange()->getSpreadsheet(); } + /// @throws uno::RuntimeException uno::Reference< table::XCellRange > getCellRangeFromSheet() throw (uno::RuntimeException) { return uno::Reference< table::XCellRange >(getSpreadSheet(), uno::UNO_QUERY_THROW ); } + /// @throws uno::RuntimeException uno::Reference< sheet::XCellRangeAddressable > getCellRangeAddressable() throw (uno::RuntimeException) { return uno::Reference< sheet::XCellRangeAddressable >(m_xCellRange, ::uno::UNO_QUERY_THROW); } + /// @throws uno::RuntimeException uno::Reference< sheet::XSheetCellCursor > getSheetCellCursor() throw ( uno::RuntimeException ) { return uno::Reference< sheet::XSheetCellCursor >( getSpreadSheet()->createCursorByRange( getSheetCellRange() ), uno::UNO_QUERY_THROW ); @@ -1226,6 +1239,7 @@ bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRang return true; } +/// @throws uno::RuntimeException ScVbaRange* getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const OUString& sName, ScDocShell* pDocSh, table::CellRangeAddress& pAddr, formula::FormulaGrammar::AddressConvention eConv = formula::FormulaGrammar::CONV_XL_A1 ) throw ( uno::RuntimeException, std::exception ) { @@ -1249,12 +1263,14 @@ getRangeForName( const uno::Reference< uno::XComponentContext >& xContext, const namespace { +/// @throws uno::RuntimeException template< typename RangeType > inline table::CellRangeAddress lclGetRangeAddress( const uno::Reference< RangeType >& rxCellRange ) throw (uno::RuntimeException) { return uno::Reference< sheet::XCellRangeAddressable >( rxCellRange, uno::UNO_QUERY_THROW )->getRangeAddress(); } +/// @throws uno::RuntimeException void lclClearRange( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException) { using namespace ::com::sun::star::sheet::CellFlags; @@ -1263,6 +1279,7 @@ void lclClearRange( const uno::Reference< table::XCellRange >& rxCellRange ) thr xSheetOperation->clearContents( nFlags ); } +/// @throws uno::RuntimeException uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference< table::XCellRange >& rxCellRange, bool bRecursive ) throw (uno::RuntimeException) { uno::Reference< sheet::XSheetCellRange > xNewCellRange( rxCellRange, uno::UNO_QUERY_THROW ); @@ -1282,6 +1299,7 @@ uno::Reference< sheet::XSheetCellRange > lclExpandToMerged( const uno::Reference return xNewCellRange; } +/// @throws uno::RuntimeException uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno::Reference< sheet::XSheetCellRangeContainer >& rxCellRanges, bool bRecursive ) throw (uno::RuntimeException) { if( !rxCellRanges.is() ) @@ -1302,6 +1320,7 @@ uno::Reference< sheet::XSheetCellRangeContainer > lclExpandToMerged( const uno:: return new ScCellRangesObj( getDocShellFromRanges( rxCellRanges ), aScRanges ); } +/// @throws uno::RuntimeException void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange, bool bMerge ) throw (uno::RuntimeException) { uno::Reference< util::XMergeable > xMerge( lclExpandToMerged( rxCellRange, true ), uno::UNO_QUERY_THROW ); @@ -1324,6 +1343,7 @@ void lclExpandAndMerge( const uno::Reference< table::XCellRange >& rxCellRange, } } +/// @throws uno::RuntimeException util::TriState lclGetMergedState( const uno::Reference< table::XCellRange >& rxCellRange ) throw (uno::RuntimeException) { /* 1) Check if range is completely inside one single merged range. To do @@ -1360,6 +1380,7 @@ ScVbaRange::getRangeObjectForName( return getRangeForName( xContext, sRangeName, pDocSh, refAddr, eConv ); } +/// @throws uno::RuntimeException table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam, ScDocShell* pDocSh ) throw ( uno::RuntimeException ) { uno::Reference< table::XCellRange > xRangeParam; @@ -1398,6 +1419,7 @@ table::CellRangeAddress getCellRangeAddressForVBARange( const uno::Any& aParam, return lclGetRangeAddress( xRangeParam ); } +/// @throws uno::RuntimeException static uno::Reference< XCollection > lcl_setupBorders( const uno::Reference< excel::XRange >& xParentRange, const uno::Reference<uno::XComponentContext>& xContext, const uno::Reference< table::XCellRange >& xRange ) throw( uno::RuntimeException ) { @@ -2944,6 +2966,7 @@ ScVbaRange::getComment() throw (uno::RuntimeException, std::exception) } +/// @throws uno::RuntimeException uno::Reference< beans::XPropertySet > getRowOrColumnProps( const uno::Reference< table::XCellRange >& xCellRange, bool bRows ) throw ( uno::RuntimeException ) { @@ -3296,6 +3319,7 @@ uno::Reference< table::XCellRange > processKey( const uno::Any& Key, uno::Refere } // helper method for Sort +/// @throws uno::RuntimeException sal_Int32 findSortPropertyIndex( const uno::Sequence< beans::PropertyValue >& props, const OUString& sPropName ) throw( uno::RuntimeException ) { @@ -3312,6 +3336,7 @@ const OUString& sPropName ) throw( uno::RuntimeException ) } // helper method for Sort +/// @throws uno::RuntimeException void updateTableSortField( const uno::Reference< table::XCellRange >& xParentRange, const uno::Reference< table::XCellRange >& xColRowKey, sal_Int16 nOrder, table::TableSortField& aTableField, bool bIsSortColumn, bool bMatchCase ) throw ( uno::RuntimeException ) @@ -4714,6 +4739,7 @@ ScVbaRange::getValidation() throw (css::uno::RuntimeException, std::exception) namespace { +/// @throws uno::RuntimeException sal_Unicode lclGetPrefixChar( const uno::Reference< table::XCell >& rxCell ) throw (uno::RuntimeException) { /* TODO/FIXME: We need an apostroph-prefix property at the cell to @@ -4727,6 +4753,7 @@ sal_Unicode lclGetPrefixChar( const uno::Reference< table::XCell >& rxCell ) thr return (rxCell->getType() == table::CellContentType_TEXT) ? '\'' : 0; } +/// @throws uno::RuntimeException sal_Unicode lclGetPrefixChar( const uno::Reference< table::XCellRange >& rxRange ) throw (uno::RuntimeException) { /* This implementation is able to handle different prefixes (needed if @@ -4754,6 +4781,7 @@ sal_Unicode lclGetPrefixChar( const uno::Reference< table::XCellRange >& rxRange return cCurrPrefix; } +/// @throws uno::RuntimeException sal_Unicode lclGetPrefixChar( const uno::Reference< sheet::XSheetCellRangeContainer >& rxRanges ) throw (uno::RuntimeException) { sal_Unicode cCurrPrefix = 0; @@ -5177,6 +5205,7 @@ ScVbaRange::Ungroup( ) throw (script::BasicErrorException, uno::RuntimeExceptio groupUnGroup(true); } +/// @throws uno::RuntimeException static void lcl_mergeCellsOfRange( const uno::Reference< table::XCellRange >& xCellRange, bool _bMerge ) throw ( uno::RuntimeException ) { uno::Reference< util::XMergeable > xMergeable( xCellRange, uno::UNO_QUERY_THROW ); @@ -5392,6 +5421,7 @@ ScVbaRange::SpecialCells( const uno::Any& _oType, const uno::Any& _oValue) return pRangeToUse->SpecialCellsImpl( nType, _oValue ); } +/// @throws script::BasicErrorException static sal_Int32 lcl_getFormulaResultFlags(const uno::Any& aType) throw ( script::BasicErrorException ) { sal_Int32 nType = excel::XlSpecialCellsValue::xlNumbers; diff --git a/sc/source/ui/vba/vbarange.hxx b/sc/source/ui/vba/vbarange.hxx index 6b7925f23df8..958d43b27abb 100644 --- a/sc/source/ui/vba/vbarange.hxx +++ b/sc/source/ui/vba/vbarange.hxx @@ -87,30 +87,44 @@ class ScVbaRange : public ScVbaRange_BASE bool mbIsRows; bool mbIsColumns; css::uno::Reference< ov::excel::XValidation > m_xValidation; + /// @throws css::uno::RuntimeException double getCalcColWidth(const css::table::CellRangeAddress&) throw (css::uno::RuntimeException, std::exception); + /// @throws css::uno::RuntimeException double getCalcRowHeight(const css::table::CellRangeAddress&) throw (css::uno::RuntimeException, std::exception); void visitArray( ArrayVisitor& vistor ); + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XRange > getEntireColumnOrRow( bool bColumn ) throw( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException void fillSeries( css::sheet::FillDirection nFillDirection, css::sheet::FillMode nFillMode, css::sheet::FillDateMode nFillDateMode, double fStep, double fEndValue ) throw( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException void ClearContents( sal_Int32 nFlags, bool bFireEvent ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Any getValue( ValueGetter& rValueGetter ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setValue( const css::uno::Any& aValue, ValueSetter& setter ) throw ( css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Any getFormulaValue( formula::FormulaGrammar::Grammar ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setFormulaValue( const css::uno::Any& aValue, formula::FormulaGrammar::Grammar ) throw ( css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XRange > getArea( sal_Int32 nIndex ) throw( css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException ScCellRangeObj* getCellRangeObj( ) throw ( css::uno::RuntimeException ); css::uno::Reference< ov::XCollection >& getBorders(); + /// @throws css::uno::RuntimeException void groupUnGroup( bool bUnGroup ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); css::uno::Reference< ov::excel::XRange > PreviousNext( bool bIsPrevious ); + /// @throws css::script::BasicErrorException css::uno::Reference< ov::excel::XRange > SpecialCellsImpl( sal_Int32 nType, const css::uno::Any& _oValue) throw ( css::script::BasicErrorException ); + /// @throws css::uno::RuntimeException css::awt::Point getPosition() throw ( css::uno::RuntimeException ); /** Fires a Worksheet_Change event for this range or range list. */ @@ -118,33 +132,47 @@ class ScVbaRange : public ScVbaRange_BASE protected: virtual ScCellRangesBase* getCellRangesBase() throw ( css::uno::RuntimeException ) override; + /// @throws css::uno::RuntimeException SfxItemSet* getCurrentDataSet() throw (css::uno::RuntimeException, std::exception); public: + /// @throws css::lang::IllegalArgumentException ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::table::XCellRange >& xRange, bool bIsRows = false, bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException ); + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaRange( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSheetCellRangeContainer >& xRanges, bool bIsRows = false, bool bIsColumns = false ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaRange( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); + /// @throws css::uno::RuntimeException ScDocument& getScDocument() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException ScDocShell* getScDocShell() throw (css::uno::RuntimeException); /** Returns the ScVbaRange implementation object for the passed VBA Range object. */ static ScVbaRange* getImplementation( const css::uno::Reference< ov::excel::XRange >& rxRange ); + /// @throws css::uno::RuntimeException css::uno::Reference< css::frame::XModel > getUnoModel() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException static css::uno::Reference< css::frame::XModel > getUnoModel( const css::uno::Reference< ov::excel::XRange >& rxRange ) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException const ScRangeList& getScRangeList() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException static const ScRangeList& getScRangeList( const css::uno::Reference< ov::excel::XRange >& rxRange ) throw (css::uno::RuntimeException); virtual ~ScVbaRange() override; virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() override { return this; } bool isSingleCellRange(); + /// @throws css::uno::RuntimeException static css::uno::Reference< ov::excel::XRange > getRangeObjectForName( const css::uno::Reference< css::uno::XComponentContext >& xContext, const OUString& sRangeName, ScDocShell* pDocSh, formula::FormulaGrammar::AddressConvention eConv ) throw ( css::uno::RuntimeException, std::exception ); + /// @throws css::uno::RuntimeException static css::uno::Reference< ov::excel::XRange > CellsHelper( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, @@ -228,8 +256,10 @@ public: virtual css::uno::Reference< ov::excel::XFont > SAL_CALL Font() throw ( css::script::BasicErrorException, css::uno::RuntimeException) override; virtual css::uno::Reference< ov::excel::XInterior > SAL_CALL Interior( ) throw ( css::script::BasicErrorException, css::uno::RuntimeException) override ; virtual css::uno::Reference< ov::excel::XRange > SAL_CALL Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException, std::exception) override; + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XRange > Range( const css::uno::Any &Cell1, const css::uno::Any &Cell2, bool bForceUseInpuRangeTab ) throw (css::uno::RuntimeException, std::exception); virtual css::uno::Any SAL_CALL getCellRange( ) throw (css::uno::RuntimeException, std::exception) override; + /// @throws css::uno::RuntimeException static css::uno::Any getCellRange( const css::uno::Reference< ov::excel::XRange >& rxRange ) throw (css::uno::RuntimeException); virtual void SAL_CALL PasteSpecial( const css::uno::Any& Paste, const css::uno::Any& Operation, const css::uno::Any& SkipBlanks, const css::uno::Any& Transpose ) throw (css::uno::RuntimeException, std::exception) override; virtual sal_Bool SAL_CALL Replace( const OUString& What, const OUString& Replacement, const css::uno::Any& LookAt, const css::uno::Any& SearchOrder, const css::uno::Any& MatchCase, const css::uno::Any& MatchByte, const css::uno::Any& SearchFormat, const css::uno::Any& ReplaceFormat ) throw (css::uno::RuntimeException, std::exception) override; @@ -287,6 +317,7 @@ public: // * or a list of address ( multi-area ) // * object should be a lightweight as possible // * we shouldn't need hacks like this below + /// @throws css::uno::RuntimeException static css::uno::Reference< ov::excel::XRange > ApplicationRange( const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Any &Cell1, const css::uno::Any &Cell2 ) throw (css::uno::RuntimeException, std::exception); static bool getCellRangesForAddress(ScRefFlags &rResFlags, const OUString& sAddress, ScDocShell* pDocSh, ScRangeList& rCellRanges, formula::FormulaGrammar::AddressConvention& eConv, char cDelimiter ); virtual sal_Bool SAL_CALL GoalSeek( const css::uno::Any& Goal, const css::uno::Reference< ov::excel::XRange >& ChangingCell ) throw (css::uno::RuntimeException, std::exception) override; @@ -299,6 +330,7 @@ public: virtual css::uno::Sequence<OUString> getServiceNames() override; }; +/// @throws css::uno::RuntimeException bool getScRangeListForAddress( const OUString& sName, ScDocShell* pDocSh, ScRange& refRange, ScRangeList& aCellRanges, formula::FormulaGrammar::AddressConvention aConv = formula::FormulaGrammar::CONV_XL_A1 ) diff --git a/sc/source/ui/vba/vbasheetobject.hxx b/sc/source/ui/vba/vbasheetobject.hxx index 1b05220a4568..5c1a7200d44f 100644 --- a/sc/source/ui/vba/vbasheetobject.hxx +++ b/sc/source/ui/vba/vbasheetobject.hxx @@ -38,6 +38,7 @@ typedef InheritedHelperInterfaceWeakImpl< ov::excel::XCharacters > ScVbaButtonCh class ScVbaButtonCharacters : public ScVbaButtonCharacters_BASE { public: + /// @throws css::uno::RuntimeException explicit ScVbaButtonCharacters( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext, @@ -64,7 +65,9 @@ public: VBAHELPER_DECL_XHELPERINTERFACE private: + /// @throws css::uno::RuntimeException OUString getFullString() const throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException void setFullString( const OUString& rString ) throw (css::uno::RuntimeException); private: @@ -80,6 +83,7 @@ typedef InheritedHelperInterfaceWeakImpl< ov::excel::XSheetObject > ScVbaSheetOb class ScVbaSheetObjectBase : public ScVbaSheetObject_BASE { public: + /// @throws css::uno::RuntimeException explicit ScVbaSheetObjectBase( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext, @@ -102,13 +106,19 @@ public: virtual sal_Bool SAL_CALL getPrintObject() throw (css::uno::RuntimeException, std::exception) override; virtual void SAL_CALL setPrintObject( sal_Bool bPrintObject ) throw (css::uno::RuntimeException, std::exception) override; - /** Sets default properties after a new object has been created. */ + /** Sets default properties after a new object has been created. + + @throws css::uno::RuntimeException + */ void setDefaultProperties( sal_Int32 nIndex ) throw (css::uno::RuntimeException); protected: /** Derived classes return the base name used for new objects. */ virtual OUString implGetBaseName() const = 0; - /** Derived classes set default properties for new drawing objects. */ + /** Derived classes set default properties for new drawing objects. + + @throws css::uno::RuntimeException + */ virtual void implSetDefaultProperties() throw (css::uno::RuntimeException); protected: @@ -133,6 +143,7 @@ public: LISTENER_CHANGE /// XChangeListener.changed }; + /// @throws css::uno::RuntimeException explicit ScVbaControlObjectBase( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext, @@ -154,6 +165,7 @@ public: virtual void SAL_CALL setAutoSize( sal_Bool bAutoSize ) throw (css::uno::RuntimeException, std::exception) override; protected: + /// @throws css::uno::RuntimeException sal_Int32 getModelIndexInForm() const throw (css::uno::RuntimeException); protected: @@ -168,6 +180,7 @@ typedef ::cppu::ImplInheritanceHelper< ScVbaControlObjectBase, ov::excel::XButto class ScVbaButton : public ScVbaButton_BASE { public: + /// @throws css::uno::RuntimeException explicit ScVbaButton( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext, diff --git a/sc/source/ui/vba/vbasheetobjects.cxx b/sc/source/ui/vba/vbasheetobjects.cxx index 2a47e09188b0..2ac40eb50176 100644 --- a/sc/source/ui/vba/vbasheetobjects.cxx +++ b/sc/source/ui/vba/vbasheetobjects.cxx @@ -53,7 +53,10 @@ inline bool lclGetProperty( Type& orValue, const uno::Reference< beans::XPropert return false; } -/** Rounds the passed value to a multiple of 0.75 and converts it to 1/100 mm. */ +/** Rounds the passed value to a multiple of 0.75 and converts it to 1/100 mm. + + @throws uno::RuntimeException +*/ inline double lclPointsToHmm( const uno::Any& rPoints ) throw (uno::RuntimeException) { return PointsToHmm( ::rtl::math::approxFloor( rPoints.get< double >() / 0.75 ) * 0.75 ); @@ -71,6 +74,7 @@ inline double lclPointsToHmm( const uno::Any& rPoints ) throw (uno::RuntimeExcep class ScVbaObjectContainer : public ::cppu::WeakImplHelper< container::XIndexAccess > { public: + /// @throws uno::RuntimeException explicit ScVbaObjectContainer( const uno::Reference< XHelperInterface >& rxParent, const uno::Reference< uno::XComponentContext >& rxContext, @@ -86,17 +90,35 @@ public: inline const uno::Type& getVbaType() const { return maVbaType; } /** Collects all shapes supported by this instance and inserts them into - the internal shape vector. */ + the internal shape vector. + + @throws uno::RuntimeException + */ void collectShapes() throw (uno::RuntimeException); - /** Creates and returns a new UNO shape. */ + /** Creates and returns a new UNO shape. + + @throws uno::RuntimeException + */ uno::Reference< drawing::XShape > createShape( const awt::Point& rPos, const awt::Size& rSize ) throw (uno::RuntimeException); - /** Inserts the passed shape into the draw page and into this container, and returns its index in the draw page. */ + /** Inserts the passed shape into the draw page and into this container, and returns its index in the draw page. + + @throws uno::RuntimeException + */ sal_Int32 insertShape( const uno::Reference< drawing::XShape >& rxShape ) throw (uno::RuntimeException); - /** Creates and returns a new VBA implementation object for the passed shape. */ + /** Creates and returns a new VBA implementation object for the passed shape. + + @throws uno::RuntimeException + */ ::rtl::Reference< ScVbaSheetObjectBase > createVbaObject( const uno::Reference< drawing::XShape >& rxShape ) throw (uno::RuntimeException); - /** Creates and returns a new VBA implementation object for the passed shape in an Any. */ + /** Creates and returns a new VBA implementation object for the passed shape in an Any. + + @throws uno::RuntimeException + */ uno::Any createCollectionObject( const uno::Any& rSource ) throw (uno::RuntimeException); - /** Returns the VBA implementation object with the specified name. */ + /** Returns the VBA implementation object with the specified name. + + @throws uno::RuntimeException + */ uno::Any getItemByStringIndex( const OUString& rIndex ) throw (uno::RuntimeException); // XIndexAccess @@ -110,14 +132,23 @@ public: protected: /** Derived classes return true, if the passed shape is supported by the instance. */ virtual bool implPickShape( const uno::Reference< drawing::XShape >& rxShape ) const = 0; - /** Derived classes create and return a new VBA implementation object for the passed shape. */ + /** Derived classes create and return a new VBA implementation object for the passed shape. + + @throws uno::RuntimeException + */ virtual ScVbaSheetObjectBase* implCreateVbaObject( const uno::Reference< drawing::XShape >& rxShape ) throw (uno::RuntimeException) = 0; /** Derived classes return the service name of the UNO shape. */ virtual OUString implGetShapeServiceName() const = 0; - /** Returns the shape name via 'Name' property of the UNO shape. May be overwritten. */ + /** Returns the shape name via 'Name' property of the UNO shape. May be overwritten. + + @throws uno::RuntimeException + */ virtual OUString implGetShapeName( const uno::Reference< drawing::XShape >& rxShape ) const throw (uno::RuntimeException); - /** Is called when a new UNO shape has been created but not yet inserted into the drawing page. */ + /** Is called when a new UNO shape has been created but not yet inserted into the drawing page. + + @throws uno::RuntimeException + */ virtual void implOnShapeCreated( const uno::Reference< drawing::XShape >& rxShape ) throw (uno::RuntimeException); protected: @@ -334,6 +365,7 @@ uno::Any SAL_CALL ScVbaGraphicObjectsBase::Add( const uno::Any& rLeft, const uno class ScVbaControlContainer : public ScVbaObjectContainer { public: + /// @throws uno::RuntimeException explicit ScVbaControlContainer( const uno::Reference< XHelperInterface >& rxParent, const uno::Reference< uno::XComponentContext >& rxContext, @@ -343,6 +375,7 @@ public: const OUString& rModelServiceName ) throw (uno::RuntimeException); protected: + /// @throws uno::RuntimeException uno::Reference< container::XIndexContainer > const & createForm() throw (uno::RuntimeException); virtual bool implPickShape( const uno::Reference< drawing::XShape >& rxShape ) const override; @@ -441,6 +474,7 @@ void ScVbaControlContainer::implOnShapeCreated( const uno::Reference< drawing::X class ScVbaButtonContainer : public ScVbaControlContainer { public: + /// @throws uno::RuntimeException explicit ScVbaButtonContainer( const uno::Reference< XHelperInterface >& rxParent, const uno::Reference< uno::XComponentContext >& rxContext, diff --git a/sc/source/ui/vba/vbasheetobjects.hxx b/sc/source/ui/vba/vbasheetobjects.hxx index 40e2a159e2ad..b0fc53521d7b 100644 --- a/sc/source/ui/vba/vbasheetobjects.hxx +++ b/sc/source/ui/vba/vbasheetobjects.hxx @@ -42,10 +42,14 @@ typedef CollTestImplHelper< ov::XCollection > ScVbaSheetObjects_BASE; class ScVbaSheetObjectsBase : public ScVbaSheetObjects_BASE { public: + /// @throws css::uno::RuntimeException explicit ScVbaSheetObjectsBase( const ScVbaObjectContainerRef& rxContainer ) throw (css::uno::RuntimeException); virtual ~ScVbaSheetObjectsBase() override; - /** Updates the collection by fetching all shapes from the draw page. */ + /** Updates the collection by fetching all shapes from the draw page. + + @throws css::uno::RuntimeException + */ void collectShapes() throw (css::uno::RuntimeException); // XEnumerationAccess @@ -70,6 +74,7 @@ typedef ::cppu::ImplInheritanceHelper< ScVbaSheetObjectsBase, ov::excel::XGraphi class ScVbaGraphicObjectsBase : public ScVbaGraphicObjects_BASE { public: + /// @throws css::uno::RuntimeException explicit ScVbaGraphicObjectsBase( const ScVbaObjectContainerRef& rxContainer ) throw (css::uno::RuntimeException); // XGraphicObjects @@ -84,6 +89,7 @@ public: class ScVbaButtons : public ScVbaGraphicObjectsBase { public: + /// @throws css::uno::RuntimeException explicit ScVbaButtons( const css::uno::Reference< ov::XHelperInterface >& rxParent, const css::uno::Reference< css::uno::XComponentContext >& rxContext, diff --git a/sc/source/ui/vba/vbastyle.cxx b/sc/source/ui/vba/vbastyle.cxx index 950639deff21..243a49a687d4 100644 --- a/sc/source/ui/vba/vbastyle.cxx +++ b/sc/source/ui/vba/vbastyle.cxx @@ -34,6 +34,8 @@ ScVbaStyle::getStylesNameContainer( const uno::Reference< frame::XModel >& xMode return xStylesAccess; } +/// @throws script::BasicErrorException +/// @throws uno::RuntimeException static uno::Reference< beans::XPropertySet > lcl_getStyleProps( const OUString& sStyleName, const uno::Reference< frame::XModel >& xModel ) throw ( script::BasicErrorException, uno::RuntimeException ) { diff --git a/sc/source/ui/vba/vbastyle.hxx b/sc/source/ui/vba/vbastyle.hxx index afefee39e059..f1b0c53fd90e 100644 --- a/sc/source/ui/vba/vbastyle.hxx +++ b/sc/source/ui/vba/vbastyle.hxx @@ -33,11 +33,18 @@ class ScVbaStyle : public ScVbaStyle_BASE protected: css::uno::Reference< css::style::XStyle > mxStyle; css::uno::Reference< css::container::XNameContainer > mxStyleFamilyNameContainer; + /// @throws css::uno::RuntimeException + /// @throws css::script::BasicErrorException void initialise() throw ( css::uno::RuntimeException, css::script::BasicErrorException ); public: + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const OUString& sStyleName, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); + /// @throws css::script::BasicErrorException + /// @throws css::uno::RuntimeException ScVbaStyle( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::beans::XPropertySet >& _xPropertySet, const css::uno::Reference< css::frame::XModel >& _xModel ) throw ( css::script::BasicErrorException, css::uno::RuntimeException ); virtual ~ScVbaStyle() override {} + /// @throws css::uno::RuntimeException static css::uno::Reference< css::container::XNameAccess > getStylesNameContainer( const css::uno::Reference< css::frame::XModel >& xModel ) throw( css::uno::RuntimeException ); virtual css::uno::Reference< ov::XHelperInterface > thisHelperIface() override { return this; }; // XStyle Methods diff --git a/sc/source/ui/vba/vbastyles.hxx b/sc/source/ui/vba/vbastyles.hxx index 271ea1dc857a..d724492eef00 100644 --- a/sc/source/ui/vba/vbastyles.hxx +++ b/sc/source/ui/vba/vbastyles.hxx @@ -33,8 +33,11 @@ class ScVbaStyles: public ScVbaStyles_BASE css::uno::Reference< css::lang::XMultiServiceFactory > mxMSF; css::uno::Reference< css::container::XNameContainer > mxNameContainerCellStyles; public: + /// @throws css::script::BasicErrorException ScVbaStyles( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext > & xContext, const css::uno::Reference< css::frame::XModel >& xModel ) throw ( css::script::BasicErrorException ); + /// @throws css::uno::RuntimeException css::uno::Sequence< OUString > getStyleNames() throw ( css::uno::RuntimeException ); + /// @throws css::script::BasicErrorException void Delete(const OUString& _sStyleName) throw ( css::script::BasicErrorException ); // XStyles virtual css::uno::Reference< ov::excel::XStyle > SAL_CALL Add( const OUString& Name, const css::uno::Any& BasedOn ) throw (css::script::BasicErrorException, css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbatextframe.hxx b/sc/source/ui/vba/vbatextframe.hxx index 0e65fa5257b0..4304d030b71f 100644 --- a/sc/source/ui/vba/vbatextframe.hxx +++ b/sc/source/ui/vba/vbatextframe.hxx @@ -29,6 +29,7 @@ typedef cppu::ImplInheritanceHelper< VbaTextFrame, ov::excel::XTextFrame > ScVba class ScVbaTextFrame : public ScVbaTextFrame_BASE { public: + /// @throws css::lang::IllegalArgumentException ScVbaTextFrame( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext > const& xContext ) throw ( css::lang::IllegalArgumentException ); virtual ~ScVbaTextFrame() override {} // Methods diff --git a/sc/source/ui/vba/vbawindow.cxx b/sc/source/ui/vba/vbawindow.cxx index 985dfc87ab9c..2a7ef9c729d9 100644 --- a/sc/source/ui/vba/vbawindow.cxx +++ b/sc/source/ui/vba/vbawindow.cxx @@ -69,6 +69,7 @@ public: uno::Reference< frame::XModel > m_xModel; Sheets::const_iterator m_it; + /// @throws uno::RuntimeException SelectedSheetsEnum( const uno::Reference< uno::XComponentContext >& xContext, const Sheets& sheets, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : m_xContext( xContext ), m_sheets( sheets ), m_xModel( xModel ) { m_it = m_sheets.begin(); diff --git a/sc/source/ui/vba/vbawindow.hxx b/sc/source/ui/vba/vbawindow.hxx index 68b38e1484cc..3cdfe56e9ee5 100644 --- a/sc/source/ui/vba/vbawindow.hxx +++ b/sc/source/ui/vba/vbawindow.hxx @@ -41,23 +41,29 @@ private: css::uno::Reference< ov::excel::XPane > m_xPane; void init(); + /// @throws css::uno::RuntimeException css::uno::Reference< css::beans::XPropertySet > getControllerProps() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::beans::XPropertySet > getFrameProps() throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< css::awt::XDevice > getDevice() throw (css::uno::RuntimeException); protected: void SplitAtDefinedPosition( sal_Int32 nColumns, sal_Int32 nRows ); public: + /// @throws css::uno::RuntimeException void Scroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft, bool bLargeScroll ) throw (css::uno::RuntimeException); public: + /// @throws css::uno::RuntimeException ScVbaWindow( 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 ScVbaWindow( const css::uno::Sequence< css::uno::Any >& aArgs, const css::uno::Reference< css::uno::XComponentContext >& xContext ) diff --git a/sc/source/ui/vba/vbawindows.cxx b/sc/source/ui/vba/vbawindows.cxx index d3671345fea5..d7202344c12e 100644 --- a/sc/source/ui/vba/vbawindows.cxx +++ b/sc/source/ui/vba/vbawindows.cxx @@ -59,11 +59,13 @@ protected: Components::const_iterator m_it; public: + /// @throws uno::RuntimeException WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext, const Components& components ) throw ( uno::RuntimeException ) : m_xContext( xContext ), m_components( components ) { m_it = m_components.begin(); } + /// @throws uno::RuntimeException explicit WindowComponentEnumImpl( const uno::Reference< uno::XComponentContext >& xContext ) throw ( uno::RuntimeException ) : m_xContext( xContext ) { uno::Reference< frame::XDesktop2 > xDesktop = frame::Desktop::create(m_xContext); diff --git a/sc/source/ui/vba/vbaworkbooks.cxx b/sc/source/ui/vba/vbaworkbooks.cxx index f245d77489a9..0eb690c9fc18 100644 --- a/sc/source/ui/vba/vbaworkbooks.cxx +++ b/sc/source/ui/vba/vbaworkbooks.cxx @@ -78,6 +78,7 @@ getWorkbook( uno::Reference< uno::XComponentContext >& xContext, const uno::Refe class WorkBookEnumImpl : public EnumerationHelperImpl { public: + /// @throws uno::RuntimeException WorkBookEnumImpl( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override diff --git a/sc/source/ui/vba/vbaworksheet.hxx b/sc/source/ui/vba/vbaworksheet.hxx index 69eaf1979daf..207b60355895 100644 --- a/sc/source/ui/vba/vbaworksheet.hxx +++ b/sc/source/ui/vba/vbaworksheet.hxx @@ -57,17 +57,22 @@ class ScVbaWorksheet : public WorksheetImpl_BASE ::rtl::Reference< ScVbaSheetObjectsBase > mxButtons; bool mbVeryHidden; + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XWorksheet > getSheetAtOffset(SCTAB offset) throw (css::uno::RuntimeException); + /// @throws css::uno::RuntimeException css::uno::Reference< ov::excel::XRange > getSheetRange() throw (css::uno::RuntimeException); css::uno::Reference< css::container::XNameAccess > getFormControls(); css::uno::Any getControlShape( const OUString& sName ); public: + /// @throws css::uno::RuntimeException ScVbaWorksheet( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const css::uno::Reference< css::sheet::XSpreadsheet >& xSheet, const css::uno::Reference< css::frame::XModel >& xModel )throw (css::uno::RuntimeException) ; + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException ScVbaWorksheet( css::uno::Sequence< css::uno::Any > const& aArgs, css::uno::Reference< css::uno::XComponentContext >const& xContext ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); virtual ~ScVbaWorksheet() override; @@ -154,6 +159,7 @@ public: virtual sal_Bool SAL_CALL hasProperty( const OUString& aName ) throw (css::uno::RuntimeException, std::exception) override; // CodeName virtual OUString SAL_CALL getCodeName() throw (css::uno::RuntimeException, std::exception) override; + /// @throws css::uno::RuntimeException sal_Int16 getSheetID() throw (css::uno::RuntimeException); virtual void SAL_CALL PrintOut( const css::uno::Any& From, const css::uno::Any& To, const css::uno::Any& Copies, const css::uno::Any& Preview, const css::uno::Any& ActivePrinter, const css::uno::Any& PrintToFile, const css::uno::Any& Collate, const css::uno::Any& PrToFileName, const css::uno::Any& IgnorePrintAreas ) throw (css::uno::RuntimeException, std::exception) override; diff --git a/sc/source/ui/vba/vbaworksheets.cxx b/sc/source/ui/vba/vbaworksheets.cxx index 7c7dad28ffad..0592ca1e0f77 100644 --- a/sc/source/ui/vba/vbaworksheets.cxx +++ b/sc/source/ui/vba/vbaworksheets.cxx @@ -145,6 +145,7 @@ class SheetsEnumeration : public EnumerationHelperImpl { uno::Reference< frame::XModel > m_xModel; public: + /// @throws uno::RuntimeException SheetsEnumeration( const uno::Reference< XHelperInterface >& xParent, const uno::Reference< uno::XComponentContext >& xContext, const uno::Reference< container::XEnumeration >& xEnumeration, const uno::Reference< frame::XModel >& xModel ) throw ( uno::RuntimeException ) : EnumerationHelperImpl( xParent, xContext, xEnumeration ), m_xModel( xModel ) {} virtual uno::Any SAL_CALL nextElement( ) throw (container::NoSuchElementException, lang::WrappedTargetException, uno::RuntimeException, std::exception) override diff --git a/sc/source/ui/vba/vbaworksheets.hxx b/sc/source/ui/vba/vbaworksheets.hxx index e8a13e7e2d00..037c61bc4586 100644 --- a/sc/source/ui/vba/vbaworksheets.hxx +++ b/sc/source/ui/vba/vbaworksheets.hxx @@ -62,6 +62,8 @@ public: virtual OUString getServiceImplName() override; virtual css::uno::Sequence<OUString> getServiceNames() override; + /// @throws css::lang::IllegalArgumentException + /// @throws css::uno::RuntimeException static bool nameExists( css::uno::Reference <css::sheet::XSpreadsheetDocument>& xSpreadDoc, const OUString & name, SCTAB& nTab ) throw ( css::lang::IllegalArgumentException, css::uno::RuntimeException ); }; |