summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-07-22 14:35:27 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-07-25 06:09:17 +0000
commit938821fb08e427864db6a10642f385bde9803f6c (patch)
tree759da9d0d0905a90f6dac2f0bf750721c17421c4 /include
parent4d4d77a1aad1bcae18bad35dad5308d33d6b2e51 (diff)
new loplugin overrideparam
verify that parameters on override methods have the same set of default values for their params as their parent/super-methods do. Change-Id: Ibdbc1c6e417fbaa680ea025a6bbf5ba9c2e5bcd2 Reviewed-on: https://gerrit.libreoffice.org/27437 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'include')
-rw-r--r--include/avmedia/mediaitem.hxx2
-rw-r--r--include/filter/msfilter/svdfppt.hxx2
-rw-r--r--include/sfx2/dinfdlg.hxx4
-rw-r--r--include/sfx2/mgetempl.hxx2
-rw-r--r--include/sfx2/printopt.hxx2
-rw-r--r--include/sfx2/tabdlg.hxx2
-rw-r--r--include/svtools/headbar.hxx2
-rw-r--r--include/svtools/svlbitm.hxx8
-rw-r--r--include/svtools/treelist.hxx2
-rw-r--r--include/svx/clipfmtitem.hxx2
-rw-r--r--include/svx/fontlb.hxx2
-rw-r--r--include/svx/hdft.hxx2
-rwxr-xr-xinclude/svx/srchdlg.hxx2
-rw-r--r--include/svx/svx3ditems.hxx12
-rw-r--r--include/svx/xflasit.hxx2
-rw-r--r--include/svx/xlnasit.hxx2
-rw-r--r--include/tools/stream.hxx16
-rw-r--r--include/unotools/options.hxx4
-rw-r--r--include/vcl/abstdlg.hxx2
19 files changed, 43 insertions, 29 deletions
diff --git a/include/avmedia/mediaitem.hxx b/include/avmedia/mediaitem.hxx
index f18edb6062c6..3235e36fa53a 100644
--- a/include/avmedia/mediaitem.hxx
+++ b/include/avmedia/mediaitem.hxx
@@ -76,7 +76,7 @@ public:
SfxMapUnit eCoreUnit,
SfxMapUnit ePresUnit,
OUString& rText,
- const IntlWrapper *pIntl ) const override;
+ const IntlWrapper *pIntl = nullptr ) const override;
virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
diff --git a/include/filter/msfilter/svdfppt.hxx b/include/filter/msfilter/svdfppt.hxx
index cec7c3db40f3..a32a492da887 100644
--- a/include/filter/msfilter/svdfppt.hxx
+++ b/include/filter/msfilter/svdfppt.hxx
@@ -471,7 +471,7 @@ public:
PptFontEntityAtom* GetFontEnityAtom( sal_uInt32 nNum ) const;
void RecolorGraphic( SvStream& rSt, sal_uInt32 nRecLen, Graphic& rGraph );
virtual SdrObject* ReadObjText( PPTTextObj* pTextObj, SdrObject* pObj, SdPageCapsule pPage ) const;
- virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj ) override;
+ virtual SdrObject* ProcessObj( SvStream& rSt, DffObjData& rData, void* pData, Rectangle& rTextRect, SdrObject* pObj = nullptr ) override;
virtual void ProcessClientAnchor2( SvStream& rSt, DffRecordHeader& rHd, void* pData, DffObjData& rObj ) override;
void ImportHeaderFooterContainer( DffRecordHeader& rHeader, HeaderFooterEntry& rEntry );
};
diff --git a/include/sfx2/dinfdlg.hxx b/include/sfx2/dinfdlg.hxx
index 6003cd2ad8a7..57a62ff90920 100644
--- a/include/sfx2/dinfdlg.hxx
+++ b/include/sfx2/dinfdlg.hxx
@@ -511,7 +511,7 @@ protected:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
SfxCustomPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
@@ -630,7 +630,7 @@ private:
protected:
virtual bool FillItemSet( SfxItemSet* ) override;
virtual void Reset( const SfxItemSet* ) override;
- virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
SfxCmisPropertiesPage( vcl::Window* pParent, const SfxItemSet& );
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index 5cb65acbc380..78408344b20a 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -93,7 +93,7 @@ protected:
using TabPage::ActivatePage;
virtual void ActivatePage(const SfxItemSet &) override;
using TabPage::DeactivatePage;
- virtual DeactivateRC DeactivatePage(SfxItemSet * = nullptr) override;
+ virtual DeactivateRC DeactivatePage(SfxItemSet *) override;
public:
SfxManageStyleSheetPage(vcl::Window *pParent, const SfxItemSet &rAttrSet );
diff --git a/include/sfx2/printopt.hxx b/include/sfx2/printopt.hxx
index 3d56b668aded..ab1b91428e7a 100644
--- a/include/sfx2/printopt.hxx
+++ b/include/sfx2/printopt.hxx
@@ -86,7 +86,7 @@ private:
protected:
using TabPage::DeactivatePage;
- virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
public:
diff --git a/include/sfx2/tabdlg.hxx b/include/sfx2/tabdlg.hxx
index 2f624453b87a..b374cddb2fb0 100644
--- a/include/sfx2/tabdlg.hxx
+++ b/include/sfx2/tabdlg.hxx
@@ -52,7 +52,7 @@ class SFX2_DLLPUBLIC SfxTabDialogItem: public SfxSetItem
public:
SfxTabDialogItem( sal_uInt16 nId, const SfxItemSet& rItemSet );
SfxTabDialogItem(const SfxTabDialogItem& rAttr, SfxItemPool* pItemPool=nullptr);
- virtual SfxPoolItem* Clone(SfxItemPool* pToPool) const override;
+ virtual SfxPoolItem* Clone(SfxItemPool* pToPool = nullptr) const override;
virtual SfxPoolItem* Create(SvStream& rStream, sal_uInt16 nVersion) const override;
};
diff --git a/include/svtools/headbar.hxx b/include/svtools/headbar.hxx
index b5373f71a300..e3958e768066 100644
--- a/include/svtools/headbar.hxx
+++ b/include/svtools/headbar.hxx
@@ -336,7 +336,7 @@ public:
/** Creates and returns the accessible object of the header bar. */
virtual css::uno::Reference< css::accessibility::XAccessible > CreateAccessible() override;
void SetAccessible( const css::uno::Reference< css::accessibility::XAccessible >& );
- virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface( bool bCreate ) override;
+ virtual css::uno::Reference< css::awt::XWindowPeer > GetComponentInterface( bool bCreate = true ) override;
};
diff --git a/include/svtools/svlbitm.hxx b/include/svtools/svlbitm.hxx
index 06b3a40e33c7..83cbf2c2d68c 100644
--- a/include/svtools/svlbitm.hxx
+++ b/include/svtools/svlbitm.hxx
@@ -113,7 +113,7 @@ public:
virtual sal_uInt16 GetType() const override;
virtual void InitViewData(SvTreeListBox* pView,
SvTreeListEntry* pEntry,
- SvViewDataItem* pViewData) override;
+ SvViewDataItem* pViewData = nullptr) override;
const OUString& GetText() const
{
@@ -140,7 +140,7 @@ public:
SvLBoxBmp();
virtual ~SvLBoxBmp();
virtual sal_uInt16 GetType() const override;
- virtual void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) override;
+ virtual void InitViewData( SvTreeListBox* ,SvTreeListEntry*, SvViewDataItem* = nullptr ) override;
virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext,
const SvViewDataEntry* pView, const SvTreeListEntry& rEntry) override;
virtual SvLBoxItem* Create() const override;
@@ -167,7 +167,7 @@ public:
virtual ~SvLBoxButton();
virtual void InitViewData(SvTreeListBox* pView,
SvTreeListEntry* pEntry,
- SvViewDataItem* pViewData) override;
+ SvViewDataItem* pViewData = nullptr) override;
virtual sal_uInt16 GetType() const override;
bool ClickHdl(SvTreeListBox* pView, SvTreeListEntry* );
@@ -252,7 +252,7 @@ public:
virtual sal_uInt16 GetType() const override;
virtual void InitViewData(SvTreeListBox* pView,
SvTreeListEntry* pEntry,
- SvViewDataItem* pViewData) override;
+ SvViewDataItem* pViewData = nullptr) override;
virtual void Paint(const Point& rPos,
SvTreeListBox& rOutDev,
vcl::RenderContext& rRenderContext,
diff --git a/include/svtools/treelist.hxx b/include/svtools/treelist.hxx
index 053bb7fac385..1c486797591c 100644
--- a/include/svtools/treelist.hxx
+++ b/include/svtools/treelist.hxx
@@ -316,7 +316,7 @@ public:
{ return pModel->GetChildSelectionCount(this,pParent); }
// Does not call the Select Handler
- virtual void SelectAll( bool bSelect, bool )
+ virtual void SelectAll( bool bSelect, bool /*bPaint*/ = true )
{ pModel->SelectAll(this, bSelect); }
bool IsEntryVisible( SvTreeListEntry* pEntry ) const
diff --git a/include/svx/clipfmtitem.hxx b/include/svx/clipfmtitem.hxx
index 1da709582415..643c13217b8c 100644
--- a/include/svx/clipfmtitem.hxx
+++ b/include/svx/clipfmtitem.hxx
@@ -39,7 +39,7 @@ public:
SvxClipboardFormatItem( const SvxClipboardFormatItem& );
virtual ~SvxClipboardFormatItem();
- virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId ) const override;
+ virtual bool QueryValue( css::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const override;
virtual bool PutValue( const css::uno::Any& rVal, sal_uInt8 nMemberId ) override;
void AddClipbrdFormat( SotClipboardFormatId nId );
diff --git a/include/svx/fontlb.hxx b/include/svx/fontlb.hxx
index eed5eb3f5ca0..9174b97ad193 100644
--- a/include/svx/fontlb.hxx
+++ b/include/svx/fontlb.hxx
@@ -45,7 +45,7 @@ public:
/** Creates a new empty list box item. */
virtual SvLBoxItem* Create() const override;
- void InitViewData( SvTreeListBox*,SvTreeListEntry*,SvViewDataItem* ) override;
+ void InitViewData( SvTreeListBox*, SvTreeListEntry*, SvViewDataItem* = nullptr ) override;
/** Paints this entry to the specified position, using the own font settings. */
virtual void Paint(const Point& rPos, SvTreeListBox& rOutDev, vcl::RenderContext& rRenderContext,
diff --git a/include/svx/hdft.hxx b/include/svx/hdft.hxx
index d95d0a99c3d8..92683859b543 100644
--- a/include/svx/hdft.hxx
+++ b/include/svx/hdft.hxx
@@ -65,7 +65,7 @@ protected:
static const sal_uInt16 pRanges[];
virtual void ActivatePage( const SfxItemSet& rSet ) override;
- virtual DeactivateRC DeactivatePage( SfxItemSet* pSet = nullptr ) override;
+ virtual DeactivateRC DeactivatePage( SfxItemSet* pSet ) override;
SvxHFPage( vcl::Window* pParent, const SfxItemSet& rSet, sal_uInt16 nSetId );
diff --git a/include/svx/srchdlg.hxx b/include/svx/srchdlg.hxx
index 05729bcb3000..637a7a0553be 100755
--- a/include/svx/srchdlg.hxx
+++ b/include/svx/srchdlg.hxx
@@ -141,7 +141,7 @@ public:
void SetSrchFlag( bool bSuccess ) { mbSuccess = bSuccess; }
bool GetSrchFlag() { return mbSuccess; }
virtual css::uno::Reference< css::awt::XWindowPeer >
- GetComponentInterface( bool bCreate ) override;
+ GetComponentInterface( bool bCreate = true ) override;
void SetSaveToModule(bool b);
diff --git a/include/svx/svx3ditems.hxx b/include/svx/svx3ditems.hxx
index 5f1c8b7ada69..5a784bcb5023 100644
--- a/include/svx/svx3ditems.hxx
+++ b/include/svx/svx3ditems.hxx
@@ -65,7 +65,7 @@ public:
Svx3DReducedLineGeometryItem(bool bVal = false);
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const override;
virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const override;
- SfxPoolItem * Clone(SfxItemPool *) const override;
+ SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
};
class SVX_DLLPUBLIC Svx3DNormalsKindItem : public SfxUInt16Item {
@@ -286,7 +286,7 @@ public:
Svx3DSmoothNormalsItem(bool bVal = true);
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const override;
virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const override;
- SfxPoolItem * Clone(SfxItemPool *) const override;
+ SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
};
// #107245# Item to replace bExtrudeSmoothFrontBack and bLatheSmoothFrontBack
@@ -295,7 +295,7 @@ public:
Svx3DSmoothLidsItem(bool bVal = false);
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const override;
virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const override;
- SfxPoolItem * Clone(SfxItemPool *) const override;
+ SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
};
// #107245# Item to replace bExtrudeCharacterMode and bLatheCharacterMode
@@ -304,7 +304,7 @@ public:
Svx3DCharacterModeItem(bool bVal = false);
virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const override;
virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const override;
- SfxPoolItem * Clone(SfxItemPool *) const override;
+ SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
};
// #107245# Item to replace bExtrudeCloseFront and bLatheCloseFront
@@ -313,7 +313,7 @@ public:
Svx3DCloseFrontItem(bool bVal = true);
SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const override;
SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const override;
- SfxPoolItem * Clone(SfxItemPool *) const override;
+ SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
};
// #107245# Item to replace bExtrudeCloseBack and bLatheCloseBack
@@ -322,7 +322,7 @@ public:
Svx3DCloseBackItem(bool bVal = true);
SVX_DLLPRIVATE virtual SfxPoolItem* Create(SvStream& rIn, sal_uInt16 nItemVersion) const override;
SVX_DLLPRIVATE virtual sal_uInt16 GetVersion(sal_uInt16 nFileFormatVersion) const override;
- SfxPoolItem * Clone(SfxItemPool *) const override;
+ SfxPoolItem * Clone(SfxItemPool * = nullptr) const override;
};
#endif // INCLUDED_SVX_SVX3DITEMS_HXX
diff --git a/include/svx/xflasit.hxx b/include/svx/xflasit.hxx
index 0f308fb3d635..7423cd8b1efd 100644
--- a/include/svx/xflasit.hxx
+++ b/include/svx/xflasit.hxx
@@ -32,7 +32,7 @@ public:
XFillAttrSetItem(const XFillAttrSetItem& rAttr);
XFillAttrSetItem(const XFillAttrSetItem& rAttr,
SfxItemPool* pItemPool);
- virtual SfxPoolItem* Clone( SfxItemPool* pToPool ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pToPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVersion ) const override;
virtual SvStream& Store( SvStream& rStream, sal_uInt16 nItemVersion ) const override;
};
diff --git a/include/svx/xlnasit.hxx b/include/svx/xlnasit.hxx
index 1254d9b91686..8f131202d146 100644
--- a/include/svx/xlnasit.hxx
+++ b/include/svx/xlnasit.hxx
@@ -33,7 +33,7 @@ public:
XLineAttrSetItem(const XLineAttrSetItem& rAttr);
XLineAttrSetItem(const XLineAttrSetItem& rAttr,
SfxItemPool* pItemPool);
- virtual SfxPoolItem* Clone( SfxItemPool* pToPool ) const override;
+ virtual SfxPoolItem* Clone( SfxItemPool* pToPool = nullptr ) const override;
virtual SfxPoolItem* Create( SvStream& rStream, sal_uInt16 nVersion ) const override;
virtual SvStream& Store( SvStream& rStream, sal_uInt16 nItemVersion ) const override;
};
diff --git a/include/tools/stream.hxx b/include/tools/stream.hxx
index 1bae0a89458c..447543367f96 100644
--- a/include/tools/stream.hxx
+++ b/include/tools/stream.hxx
@@ -669,7 +669,21 @@ public:
SvScriptStream(const OUString& rUrl);
virtual ~SvScriptStream();
- virtual bool ReadLine(OString &rStr, sal_Int32) override;
+ /** Read a line of bytes.
+
+ @param nMaxBytesToRead
+ Maximum of bytes to read, if line is longer it will be
+ truncated.
+
+ @note NOTE that the default is one character less than STRING_MAXLEN to
+ prevent problems after conversion to String that may be lurking
+ in various places doing something like
+ @code
+ for (sal_uInt16 i=0; i < aString.Len(); ++i)
+ @endcode
+ causing endless loops ...
+ */
+ virtual bool ReadLine(OString& rStr, sal_Int32 nMaxBytesToRead = 0xFFFE ) override;
virtual bool good() const override;
};
diff --git a/include/unotools/options.hxx b/include/unotools/options.hxx
index b703eec536c6..95bfbf950f06 100644
--- a/include/unotools/options.hxx
+++ b/include/unotools/options.hxx
@@ -43,7 +43,7 @@ namespace utl {
public:
virtual ~ConfigurationListener();
- virtual void ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint=0 ) = 0;
+ virtual void ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint ) = 0;
};
typedef ::std::vector< ConfigurationListener* > IMPL_ConfigurationListenerList;
@@ -85,7 +85,7 @@ private:
void operator =(Options &) = delete;
protected:
- virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, sal_uInt32 nHint=0 ) override;
+ virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) override;
};
} }
diff --git a/include/vcl/abstdlg.hxx b/include/vcl/abstdlg.hxx
index 5ea675cd199c..25b28c7d5510 100644
--- a/include/vcl/abstdlg.hxx
+++ b/include/vcl/abstdlg.hxx
@@ -47,7 +47,7 @@ public:
class VCL_DLLPUBLIC VclAbstractTerminatedDialog : public VclAbstractDialog
{
public:
- virtual void EndDialog(long nResult =0) = 0;
+ virtual void EndDialog(long nResult) = 0;
};
class VCL_DLLPUBLIC VclAbstractRefreshableDialog : public VclAbstractDialog