diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-10-14 16:52:11 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2016-10-15 08:57:39 +0000 |
commit | 85876a11ceb9bf144ae8365ff3a9fedd8c363ef2 (patch) | |
tree | 4db05eaf14aaadc4c8bad4199dbfad3cb6106190 /shell/inc | |
parent | cb97267f5676b7790806dc15d17f2a6523232ccc (diff) |
clang-cl loplugin: shell
Change-Id: I98d2e5154270b795cdd11653ecfff2abd8dda294
Reviewed-on: https://gerrit.libreoffice.org/29851
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'shell/inc')
-rw-r--r-- | shell/inc/basereader.hxx | 12 | ||||
-rw-r--r-- | shell/inc/columninfo.hxx | 15 | ||||
-rw-r--r-- | shell/inc/contentreader.hxx | 8 | ||||
-rw-r--r-- | shell/inc/infotips.hxx | 22 | ||||
-rw-r--r-- | shell/inc/metainforeader.hxx | 8 | ||||
-rw-r--r-- | shell/inc/propertyhdl.hxx | 31 | ||||
-rw-r--r-- | shell/inc/propsheets.hxx | 12 | ||||
-rw-r--r-- | shell/inc/stream_helper.hxx | 16 | ||||
-rw-r--r-- | shell/inc/thumbviewer.hxx | 25 |
9 files changed, 71 insertions, 78 deletions
diff --git a/shell/inc/basereader.hxx b/shell/inc/basereader.hxx index 577684c0f3f9..125f49d9773f 100644 --- a/shell/inc/basereader.hxx +++ b/shell/inc/basereader.hxx @@ -32,7 +32,7 @@ class CBaseReader : public i_xml_parser_event_handler { public: - virtual ~CBaseReader(); + virtual ~CBaseReader() override; protected: // protected because its only an implementation relevant class CBaseReader( const std::string& DocumentName ); @@ -46,19 +46,19 @@ protected: // protected because its only an implementation relevant class virtual void start_element( const std::wstring& raw_name, const std::wstring& local_name, - const XmlTagAttributes_t& attributes) = 0; + const XmlTagAttributes_t& attributes) override = 0; virtual void end_element( - const std::wstring& raw_name, const std::wstring& local_name) = 0; + const std::wstring& raw_name, const std::wstring& local_name) override = 0; - virtual void characters(const std::wstring& character) = 0; + virtual void characters(const std::wstring& character) override = 0; - virtual void ignore_whitespace(const std::wstring& /*whitespaces*/){}; + virtual void ignore_whitespace(const std::wstring& /*whitespaces*/) override {}; virtual void processing_instruction( const std::wstring& /*target*/, const std::wstring& /*data*/){}; - virtual void comment(const std::wstring& /*comment*/){}; + virtual void comment(const std::wstring& /*comment*/) override {}; void Initialize( const std::string& /*ContentName*/); diff --git a/shell/inc/columninfo.hxx b/shell/inc/columninfo.hxx index 8009e58f01cb..4950ad969b71 100644 --- a/shell/inc/columninfo.hxx +++ b/shell/inc/columninfo.hxx @@ -42,25 +42,22 @@ public: virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); + void __RPC_FAR *__RPC_FAR *ppvObject) override; - virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE AddRef() override; - virtual ULONG STDMETHODCALLTYPE Release(); + virtual ULONG STDMETHODCALLTYPE Release() override; // IColumnProvider - virtual HRESULT STDMETHODCALLTYPE Initialize(LPCSHCOLUMNINIT psci); + virtual HRESULT STDMETHODCALLTYPE Initialize(LPCSHCOLUMNINIT psci) override; - virtual HRESULT STDMETHODCALLTYPE GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci); + virtual HRESULT STDMETHODCALLTYPE GetColumnInfo(DWORD dwIndex, SHCOLUMNINFO *psci) override; virtual HRESULT STDMETHODCALLTYPE GetItemData( - LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData); - -private: - bool IsOOFileExtension(wchar_t* Extension) const; + LPCSHCOLUMNID pscid, LPCSHCOLUMNDATA pscd, VARIANT *pvarData) override; private: long m_RefCnt; diff --git a/shell/inc/contentreader.hxx b/shell/inc/contentreader.hxx index 2b20e98fcff7..d51ad7fbc4c7 100644 --- a/shell/inc/contentreader.hxx +++ b/shell/inc/contentreader.hxx @@ -29,7 +29,7 @@ class StreamInterface; class CContentReader : public CBaseReader { public: - virtual ~CContentReader(); + virtual ~CContentReader() override; CContentReader( const std::string& DocumentName, LocaleSet_t const & DocumentLocale ); @@ -57,7 +57,7 @@ protected: // protected because its only an implementation relevant class virtual void start_element( const std::wstring& raw_name, const std::wstring& local_name, - const XmlTagAttributes_t& attributes); + const XmlTagAttributes_t& attributes) override; /** end_element occurs when a tag is closed @@ -67,14 +67,14 @@ protected: // protected because its only an implementation relevant class local name of the tag. */ virtual void end_element( - const std::wstring& raw_name, const std::wstring& local_name); + const std::wstring& raw_name, const std::wstring& local_name) override; /** characters occurs when receiving characters @param character content of the information received. */ - virtual void characters(const std::wstring& character); + virtual void characters(const std::wstring& character) override; protected: /** choose an appropriate tag reader to handle the tag. diff --git a/shell/inc/infotips.hxx b/shell/inc/infotips.hxx index 275be8e30ff3..df583614557c 100644 --- a/shell/inc/infotips.hxx +++ b/shell/inc/infotips.hxx @@ -43,45 +43,45 @@ public: virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); + void __RPC_FAR *__RPC_FAR *ppvObject) override; - virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE AddRef() override; - virtual ULONG STDMETHODCALLTYPE Release(); + virtual ULONG STDMETHODCALLTYPE Release() override; // IQueryInfo methods - virtual HRESULT STDMETHODCALLTYPE GetInfoTip(DWORD dwFlags, wchar_t** ppwszTip); + virtual HRESULT STDMETHODCALLTYPE GetInfoTip(DWORD dwFlags, wchar_t** ppwszTip) override; - virtual HRESULT STDMETHODCALLTYPE GetInfoFlags(DWORD *pdwFlags); + virtual HRESULT STDMETHODCALLTYPE GetInfoFlags(DWORD *pdwFlags) override; // IPersist methods - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID* pClassID); + virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID* pClassID) override; // IPersistFile methods - virtual HRESULT STDMETHODCALLTYPE IsDirty(); + virtual HRESULT STDMETHODCALLTYPE IsDirty() override; virtual HRESULT STDMETHODCALLTYPE Load( /* [in] */ LPCOLESTR pszFileName, - /* [in] */ DWORD dwMode); + /* [in] */ DWORD dwMode) override; virtual HRESULT STDMETHODCALLTYPE Save( /* [unique][in] */ LPCOLESTR pszFileName, - /* [in] */ BOOL fRemember); + /* [in] */ BOOL fRemember) override; virtual HRESULT STDMETHODCALLTYPE SaveCompleted( - /* [unique][in] */ LPCOLESTR pszFileName); + /* [unique][in] */ LPCOLESTR pszFileName) override; virtual HRESULT STDMETHODCALLTYPE GetCurFile( - /* [out] */ LPOLESTR __RPC_FAR *ppszFileName); + /* [out] */ LPOLESTR __RPC_FAR *ppszFileName) override; private: long m_RefCnt; diff --git a/shell/inc/metainforeader.hxx b/shell/inc/metainforeader.hxx index 814f658a8e6a..3b82af374dd3 100644 --- a/shell/inc/metainforeader.hxx +++ b/shell/inc/metainforeader.hxx @@ -32,7 +32,7 @@ class CDummyTag; class CMetaInfoReader : public CBaseReader { public: - virtual ~CMetaInfoReader(); + virtual ~CMetaInfoReader() override; CMetaInfoReader( const std::string& DocumentName ); @@ -89,7 +89,7 @@ protected: // protected because its only an implementation relevant class virtual void start_element( const std::wstring& raw_name, const std::wstring& local_name, - const XmlTagAttributes_t& attributes); + const XmlTagAttributes_t& attributes) override; /** end_element occurs when a tag is closed @@ -99,14 +99,14 @@ protected: // protected because its only an implementation relevant class local name of the tag. */ virtual void end_element( - const std::wstring& raw_name, const std::wstring& local_name); + const std::wstring& raw_name, const std::wstring& local_name) override; /** characters occurs when receiving characters @param character content of the information received. */ - virtual void characters(const std::wstring& character); + virtual void characters(const std::wstring& character) override; protected: /** choose an appropriate tag reader to handle the tag. diff --git a/shell/inc/propertyhdl.hxx b/shell/inc/propertyhdl.hxx index 0985b411ca69..457a896eca18 100644 --- a/shell/inc/propertyhdl.hxx +++ b/shell/inc/propertyhdl.hxx @@ -48,32 +48,31 @@ public: virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject ); - virtual ULONG STDMETHODCALLTYPE AddRef(); - virtual ULONG STDMETHODCALLTYPE Release(); + void __RPC_FAR *__RPC_FAR *ppvObject ) override; + virtual ULONG STDMETHODCALLTYPE AddRef() override; + virtual ULONG STDMETHODCALLTYPE Release() override; // IPropertyStore - virtual HRESULT STDMETHODCALLTYPE GetCount( DWORD *pcProps ); - virtual HRESULT STDMETHODCALLTYPE GetAt( DWORD iProp, PROPERTYKEY *pkey ); - virtual HRESULT STDMETHODCALLTYPE GetValue( REFPROPERTYKEY key, PROPVARIANT *pPropVar ); - virtual HRESULT STDMETHODCALLTYPE SetValue( REFPROPERTYKEY key, REFPROPVARIANT propVar ); - virtual HRESULT STDMETHODCALLTYPE Commit(); + virtual HRESULT STDMETHODCALLTYPE GetCount( DWORD *pcProps ) override; + virtual HRESULT STDMETHODCALLTYPE GetAt( DWORD iProp, PROPERTYKEY *pkey ) override; + virtual HRESULT STDMETHODCALLTYPE GetValue( REFPROPERTYKEY key, PROPVARIANT *pPropVar ) override; + virtual HRESULT STDMETHODCALLTYPE SetValue( REFPROPERTYKEY key, REFPROPVARIANT propVar ) override; + virtual HRESULT STDMETHODCALLTYPE Commit() override; // IPropertyStoreCapabilities - virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( REFPROPERTYKEY key ); + virtual HRESULT STDMETHODCALLTYPE IsPropertyWritable( REFPROPERTYKEY key ) override; // IInitializeWithStream - virtual HRESULT STDMETHODCALLTYPE Initialize(IStream *pStream, DWORD grfMode); + virtual HRESULT STDMETHODCALLTYPE Initialize(IStream *pStream, DWORD grfMode) override; private: void LoadProperties( CMetaInfoReader *pMetaInfoReader ); - HRESULT GetItemData( CMetaInfoReader *pMetaInfoReader, UINT nIndex, PROPVARIANT *pVarData ); private: long m_RefCnt; @@ -91,9 +90,9 @@ public: virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); - virtual ULONG STDMETHODCALLTYPE AddRef(); - virtual ULONG STDMETHODCALLTYPE Release(); + void __RPC_FAR *__RPC_FAR *ppvObject) override; + virtual ULONG STDMETHODCALLTYPE AddRef() override; + virtual ULONG STDMETHODCALLTYPE Release() override; // IClassFactory methods @@ -101,9 +100,9 @@ public: virtual HRESULT STDMETHODCALLTYPE CreateInstance( IUnknown __RPC_FAR *pUnkOuter, REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); + void __RPC_FAR *__RPC_FAR *ppvObject) override; - virtual HRESULT STDMETHODCALLTYPE LockServer( BOOL fLock ); + virtual HRESULT STDMETHODCALLTYPE LockServer( BOOL fLock ) override; static bool IsLocked(); private: diff --git a/shell/inc/propsheets.hxx b/shell/inc/propsheets.hxx index f427856d15d4..53423733c298 100644 --- a/shell/inc/propsheets.hxx +++ b/shell/inc/propsheets.hxx @@ -45,27 +45,27 @@ public: virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); + void __RPC_FAR *__RPC_FAR *ppvObject) override; - virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE AddRef() override; - virtual ULONG STDMETHODCALLTYPE Release(); + virtual ULONG STDMETHODCALLTYPE Release() override; // IShellExtInit virtual HRESULT STDMETHODCALLTYPE Initialize( - LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID); + LPCITEMIDLIST pidlFolder, LPDATAOBJECT lpdobj, HKEY hkeyProgID) override; // IShellPropSheetExt - virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam); + virtual HRESULT STDMETHODCALLTYPE AddPages(LPFNADDPROPSHEETPAGE lpfnAddPage, LPARAM lParam) override; virtual HRESULT STDMETHODCALLTYPE ReplacePage( - UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam); + UINT uPageID, LPFNADDPROPSHEETPAGE lpfnReplaceWith, LPARAM lParam) override; private: // Windows callback functions diff --git a/shell/inc/stream_helper.hxx b/shell/inc/stream_helper.hxx index ec9af1bd829d..2fad7bc88eca 100644 --- a/shell/inc/stream_helper.hxx +++ b/shell/inc/stream_helper.hxx @@ -28,10 +28,10 @@ class BufferStream : public StreamInterface { public: BufferStream(IStream *str); - ~BufferStream(); - unsigned long sread (unsigned char *vuf, unsigned long size); - long stell (); - long sseek (long offset, int origin); + ~BufferStream() override; + unsigned long sread (unsigned char *vuf, unsigned long size) override; + long stell () override; + long sseek (long offset, int origin) override; private: IStream *stream; }; @@ -40,10 +40,10 @@ class FileStream : public StreamInterface { public: FileStream(const char *filename); - ~FileStream(); - unsigned long sread (unsigned char *buf, unsigned long size); - long stell (); - long sseek (long offset, int origin); + ~FileStream() override; + unsigned long sread (unsigned char *buf, unsigned long size) override; + long stell () override; + long sseek (long offset, int origin) override; private: FILE *file; }; diff --git a/shell/inc/thumbviewer.hxx b/shell/inc/thumbviewer.hxx index 0620476c2835..d5a314c26fce 100644 --- a/shell/inc/thumbviewer.hxx +++ b/shell/inc/thumbviewer.hxx @@ -51,17 +51,17 @@ public: virtual HRESULT STDMETHODCALLTYPE QueryInterface( REFIID riid, - void __RPC_FAR *__RPC_FAR *ppvObject); + void __RPC_FAR *__RPC_FAR *ppvObject) override; - virtual ULONG STDMETHODCALLTYPE AddRef(); + virtual ULONG STDMETHODCALLTYPE AddRef() override; - virtual ULONG STDMETHODCALLTYPE Release(); + virtual ULONG STDMETHODCALLTYPE Release() override; // IExtractImage methods - virtual HRESULT STDMETHODCALLTYPE Extract(HBITMAP *phBmpImage); + virtual HRESULT STDMETHODCALLTYPE Extract(HBITMAP *phBmpImage) override; virtual HRESULT STDMETHODCALLTYPE GetLocation( LPWSTR pszPathBuffer, @@ -69,36 +69,33 @@ public: DWORD *pdwPriority, const SIZE *prgSize, DWORD dwRecClrDepth, - DWORD *pdwFlags); + DWORD *pdwFlags) override; // IPersist methods - virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID* pClassID); + virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID* pClassID) override; // IPersistFile methods - virtual HRESULT STDMETHODCALLTYPE IsDirty(); + virtual HRESULT STDMETHODCALLTYPE IsDirty() override; virtual HRESULT STDMETHODCALLTYPE Load( /* [in] */ LPCOLESTR pszFileName, - /* [in] */ DWORD dwMode); + /* [in] */ DWORD dwMode) override; virtual HRESULT STDMETHODCALLTYPE Save( /* [unique][in] */ LPCOLESTR pszFileName, - /* [in] */ BOOL fRemember); + /* [in] */ BOOL fRemember) override; virtual HRESULT STDMETHODCALLTYPE SaveCompleted( - /* [unique][in] */ LPCOLESTR pszFileName); + /* [unique][in] */ LPCOLESTR pszFileName) override; virtual HRESULT STDMETHODCALLTYPE GetCurFile( - /* [out] */ LPOLESTR __RPC_FAR *ppszFileName); - -private: - Gdiplus::Rect CalcScaledAspectRatio(const Gdiplus::Rect& src, const Gdiplus::Rect& dest); + /* [out] */ LPOLESTR __RPC_FAR *ppszFileName) override; private: long ref_count_; |