diff options
author | Noel Grandin <noel@peralex.com> | 2016-09-22 11:34:19 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2016-09-22 12:44:50 +0000 |
commit | fd22e36ff53c448d1d7831b0ac66ecc29621ff9e (patch) | |
tree | da2ac18341ac6cedbbea49cd032fb2f5345b1988 | |
parent | 5f8eb78d994e1329b9524a709480b71fa862ff6a (diff) |
loplugin:unnecessaryvirtual
Change-Id: I7b1aa65a557f3855939ad8b183bba8ff656946f8
Reviewed-on: https://gerrit.libreoffice.org/29173
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rwxr-xr-x | compilerplugins/clang/unnecessaryvirtual.py | 14 | ||||
-rw-r--r-- | include/svl/style.hxx | 2 | ||||
-rw-r--r-- | include/vcl/outdev.hxx | 8 | ||||
-rw-r--r-- | sw/qa/extras/inc/swmodeltestbase.hxx | 10 | ||||
-rw-r--r-- | sw/qa/extras/mailmerge/mailmerge.cxx | 1 | ||||
-rw-r--r-- | sw/qa/extras/ooxmlimport/ooxmlimport.cxx | 1 |
6 files changed, 19 insertions, 17 deletions
diff --git a/compilerplugins/clang/unnecessaryvirtual.py b/compilerplugins/clang/unnecessaryvirtual.py index ee7d9ec928af..dd1ea719c7e7 100755 --- a/compilerplugins/clang/unnecessaryvirtual.py +++ b/compilerplugins/clang/unnecessaryvirtual.py @@ -26,6 +26,20 @@ with open("loplugin.unnecessaryvirtual.report", "wt") as f: # windows-specific stuff if clazz.startswith("canvas::"): continue if clazz.startswith("psp::PrinterInfoManager"): continue + if clazz.startswith("DdeTopic::"): continue + if clazz == "basegfx::unotools::UnoPolyPolygon::void-modifying()const": continue + if clazz == "SalLayout::_Bool-IsKashidaPosValid(int,)const": continue + if clazz == "SalLayout::void-DisableGlyphInjection(_Bool,)": continue + # Linux-TDF specific + if clazz == "X11SalFrame::void-updateGraphics(_Bool,)": continue + # OSX specific + if clazz == "SalFrame::void-SetRepresentedURL(const class rtl::OUString &,)": continue + if clazz == "SalMenu::_Bool-AddMenuBarButton(const struct SalMenuButtonItem &,)": continue + if clazz == "SalMenu::class Rectangle-GetMenuBarButtonRectPixel(sal_uInt16,class SalFrame *,)": continue + if clazz == "SalMenu::void-RemoveMenuBarButton(sal_uInt16,)": continue + if clazz == "SalLayout::_Bool-DrawTextSpecial(class SalGraphics &,sal_uInt32,)const": continue + # GTK < 3 + if clazz == "GtkSalDisplay::int-CaptureMouse(class SalFrame *,)": continue # some test magic if clazz.startswith("apitest::"): continue f.write(clazz + "\n") diff --git a/include/svl/style.hxx b/include/svl/style.hxx index 794322da11b2..62b4afaf2558 100644 --- a/include/svl/style.hxx +++ b/include/svl/style.hxx @@ -100,7 +100,7 @@ protected: public: // returns the internal name of this style - virtual const OUString& GetName() const; + const OUString& GetName() const; // sets the internal name of this style. // diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx index 1811e8b7f4e2..f03822f142a1 100644 --- a/include/vcl/outdev.hxx +++ b/include/vcl/outdev.hxx @@ -943,8 +943,8 @@ private: public: void DrawWallpaper( const Rectangle& rRect, const Wallpaper& rWallpaper ); - virtual void Erase(); - virtual void Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); } + void Erase(); + void Erase( const Rectangle& rRect ) { DrawWallpaper( rRect, GetBackground() ); } protected: void DrawGradientWallpaper( long nX, long nY, long nWidth, long nHeight, const Wallpaper& rWallpaper ); @@ -1414,12 +1414,12 @@ public: const Image& rImage, sal_uInt16 nStyle = 0) */ - virtual void DrawImage( + void DrawImage( const Point& rPos, const Image& rImage, DrawImageFlags nStyle = DrawImageFlags::NONE ); - virtual void DrawImage( + void DrawImage( const Point& rPos, const Size& rSize, const Image& rImage, diff --git a/sw/qa/extras/inc/swmodeltestbase.hxx b/sw/qa/extras/inc/swmodeltestbase.hxx index 7ded2437575e..eacc0a040d26 100644 --- a/sw/qa/extras/inc/swmodeltestbase.hxx +++ b/sw/qa/extras/inc/swmodeltestbase.hxx @@ -220,7 +220,6 @@ protected: header(); std::unique_ptr<Resetter> const pChanges(preTest(filename)); load(mpTestDocumentPath, filename); - postTest(filename); verify(); finish(); maTempFile.EnableKillingFile(); @@ -240,7 +239,6 @@ protected: load(mpTestDocumentPath, filename); postLoad(filename); reload(mpFilter, filename); - postTest(filename); verify(); finish(); maTempFile.EnableKillingFile(); @@ -260,7 +258,6 @@ protected: load(mpTestDocumentPath, filename); save(OUString::createFromAscii(mpFilter), maTempFile); maTempFile.EnableKillingFile(false); - postTest(filename); verify(); finish(); maTempFile.EnableKillingFile(); @@ -295,13 +292,6 @@ protected: } /** - * Override this function if some special filename-specific teardown is needed - */ - virtual void postTest(const char* /*filename*/) - { - } - - /** * Override this function if calc layout is not needed */ virtual bool mustCalcLayoutOf(const char* /*filename*/) diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx index 84331cc8b4cf..36009a179be6 100644 --- a/sw/qa/extras/mailmerge/mailmerge.cxx +++ b/sw/qa/extras/mailmerge/mailmerge.cxx @@ -83,7 +83,6 @@ public: initMailMergeJobAndArgs( filename, tablename, aDBName, "LOMM_", aWorkDir, file, selection ); verify(); - postTest(filename); finish(); ::utl::removeTree(aWorkDir); diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx index 11877702b4e1..50f587faa8d2 100644 --- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx +++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx @@ -153,7 +153,6 @@ public: CPPUNIT_ASSERT_MESSAGE(OUStringToOString(sMessage, RTL_TEXTENCODING_UTF8).getStr(), !xComponent.is()); } } - postTest(filename); verify(); finish(); } |