From 37a6bafea8416541d7d250d66a9e951400b197a3 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 4 Mar 2016 14:51:52 +0200 Subject: loplugin:unuseddefaultparam in various Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0 Reviewed-on: https://gerrit.libreoffice.org/22900 Tested-by: Jenkins Reviewed-by: Noel Grandin --- include/connectivity/dbexception.hxx | 4 +--- include/connectivity/sqlerror.hxx | 24 +++--------------------- include/dbaccess/dbsubcomponentcontroller.hxx | 5 +---- include/sfx2/childwin.hxx | 3 +-- include/svl/itemset.hxx | 2 +- include/vcl/menu.hxx | 3 +-- include/vcl/outdev.hxx | 5 ++--- 7 files changed, 10 insertions(+), 36 deletions(-) (limited to 'include') diff --git a/include/connectivity/dbexception.hxx b/include/connectivity/dbexception.hxx index e524c8404298..eb8bee388897 100644 --- a/include/connectivity/dbexception.hxx +++ b/include/connectivity/dbexception.hxx @@ -91,10 +91,8 @@ public: /** prepends a plain error message to the chain of exceptions @param _rSimpleErrorMessage the error message to prepend - @param _rSQLState - the SQLState of the to-be-constructed SQLException, or NULL if this should be defaulted to HY000 */ - void prepend( const OUString& _rErrorMessage, const OUString& _rSQLState = OUString() ); + void prepend( const OUString& _rErrorMessage ); /** appends a plain message to the chain of exceptions @param _eType diff --git a/include/connectivity/sqlerror.hxx b/include/connectivity/sqlerror.hxx index 87ff66f6bbfb..06cc14504e62 100644 --- a/include/connectivity/sqlerror.hxx +++ b/include/connectivity/sqlerror.hxx @@ -103,17 +103,11 @@ namespace connectivity will happen, and _rParamValue2 and _rParamValue3 will be ignored. - @param _rParamValue2 - the value which the placeholder $2$ should be replaced with. If this value is - not present (see ::boost::optional::operator !), then no replacement - will happen, and _rParamValue3 will be ignored. - @see css::sdb::ErrorCondition */ OUString getErrorMessage( const ErrorCondition _eCondition, - const ParamValue& _rParamValue1 = ParamValue(), - const ParamValue& _rParamValue2 = ParamValue() + const ParamValue& _rParamValue1 = ParamValue() ) const; /** returns the error code associated with a given error condition @@ -193,18 +187,12 @@ namespace connectivity which is associated with _eCondition, replacing the first placeholder in this message. - @param _rParamValue2 - a runtime-dependent value which should be filled into the error message - which is associated with _eCondition, replacing the second placeholder - in this message. - @see getErrorMessage @see getErrorCode */ void raiseException( const ErrorCondition _eCondition, - const ParamValue& _rParamValue1 = ParamValue(), - const ParamValue& _rParamValue2 = ParamValue() + const ParamValue& _rParamValue1 = ParamValue() ) const; /** raises a typed exception, that is, a UNO exception which is derived from @@ -226,11 +214,6 @@ namespace connectivity which is associated with _eCondition, replacing the first placeholder in this message. - @param _rParamValue2 - a runtime-dependent value which should be filled into the error message - which is associated with _eCondition, replacing the second placeholder - in this message. - @throws ::std::bad_cast if _rExceptionType does not specify an exception class derived from css::sdbc::SQLException. @@ -242,8 +225,7 @@ namespace connectivity const ErrorCondition _eCondition, const css::uno::Reference< css::uno::XInterface >& _rxContext, const css::uno::Type& _rExceptionType, - const ParamValue& _rParamValue1 = ParamValue(), - const ParamValue& _rParamValue2 = ParamValue() + const ParamValue& _rParamValue1 = ParamValue() ) const; /** retrieves an SQLException object which contains information about diff --git a/include/dbaccess/dbsubcomponentcontroller.hxx b/include/dbaccess/dbsubcomponentcontroller.hxx index b9c9b282646d..6bc86beb5ad1 100644 --- a/include/dbaccess/dbsubcomponentcontroller.hxx +++ b/include/dbaccess/dbsubcomponentcontroller.hxx @@ -105,10 +105,7 @@ namespace dbaui /** appends an error in the current environment. */ - void appendError( - const OUString& _rErrorMessage, - const ::dbtools::StandardSQLState _eSQLState = ::dbtools::StandardSQLState::GENERAL_ERROR - ); + void appendError( const OUString& _rErrorMessage ); /** clears the error state. */ diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index ce9bf9159b88..bea7e9c8d5e5 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -77,8 +77,7 @@ struct SAL_DLLPUBLIC_RTTI SfxChildWinInfo nFlags = SfxChildWindowFlags::NONE; } bool GetExtraData_Impl( SfxChildAlignment *pAlign, - SfxChildAlignment *pLastAlign = nullptr, - Size *pSize = nullptr ) const; + SfxChildAlignment *pLastAlign = nullptr ) const; }; // ChildWindow factory methods diff --git a/include/svl/itemset.hxx b/include/svl/itemset.hxx index ac3ea8def2f6..adfcf0608d98 100644 --- a/include/svl/itemset.hxx +++ b/include/svl/itemset.hxx @@ -146,7 +146,7 @@ public: void MergeRange( sal_uInt16 nFrom, sal_uInt16 nTo ); const SfxItemSet* GetParent() const { return m_pParent; } - void Load( SvStream &, bool bDirect = false ); + void Load( SvStream & ); void Store( SvStream &, bool bDirect = false ) const; bool operator==(const SfxItemSet &) const; diff --git a/include/vcl/menu.hxx b/include/vcl/menu.hxx index 4b1682f08a59..73e5c4dae4d8 100644 --- a/include/vcl/menu.hxx +++ b/include/vcl/menu.hxx @@ -250,8 +250,7 @@ public: sal_uInt16 nPos = MENU_APPEND); void InsertItem(const ResId& rResId); void InsertItem(const OUString& rCommand, - const css::uno::Reference& rFrame, - MenuItemBits nBits = MenuItemBits::NONE); + const css::uno::Reference& rFrame); void InsertSeparator(const OString &rIdent = OString(), sal_uInt16 nPos = MENU_APPEND); void RemoveItem( sal_uInt16 nPos ); void CopyItem(const Menu& rMenu, sal_uInt16 nPos ); diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 007c9857c5d3..2d8eeec6c322 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -1130,7 +1130,7 @@ public: OUString GetEllipsisString( const OUString& rStr, long nMaxWidth, DrawTextFlags nStyle = DrawTextFlags::EndEllipsis ) const; - long GetCtrlTextWidth( const OUString& rStr, sal_Int32 nIndex = 0 ) const; + long GetCtrlTextWidth( const OUString& rStr ) const; static OUString GetNonMnemonicString( const OUString& rStr, sal_Int32& rMnemonicPos ); @@ -1195,8 +1195,7 @@ public: vcl::TextLayoutCache const* = nullptr) const; bool GetCaretPositions( const OUString&, long* pCaretXArray, - sal_Int32 nIndex, sal_Int32 nLen, - long* pDXAry = nullptr ) const; + sal_Int32 nIndex, sal_Int32 nLen ) const; void DrawStretchText( const Point& rStartPt, sal_uLong nWidth, const OUString& rStr, sal_Int32 nIndex = 0, sal_Int32 nLen = -1); -- cgit