[Libreoffice-commits] core.git: include/sfx2 include/svl sfx2/source shell/source starmath/inc starmath/source svl/source
Noel Grandin
noel.grandin at collabora.co.uk
Tue Oct 24 11:41:39 UTC 2017
include/sfx2/emojiview.hxx | 5 -
include/sfx2/mgetempl.hxx | 8 --
include/sfx2/notebookbar/NotebookbarTabControl.hxx | 4 -
include/sfx2/recentdocsview.hxx | 4 -
include/sfx2/recentdocsviewitem.hxx | 5 -
include/sfx2/sidebar/SidebarPanelBase.hxx | 8 --
include/sfx2/templatedefaultview.hxx | 5 -
include/svl/filenotation.hxx | 9 +-
sfx2/source/inc/templatesearchview.hxx | 5 -
shell/source/backends/localebe/localebackend.hxx | 8 +-
starmath/inc/ElementsDockingWindow.hxx | 3
starmath/inc/utility.hxx | 3
starmath/inc/view.hxx | 76 +++++++++------------
starmath/source/accessibility.hxx | 3
starmath/source/cfgitem.hxx | 5 -
starmath/source/mathmlexport.hxx | 3
svl/source/numbers/supservs.hxx | 8 --
17 files changed, 70 insertions(+), 92 deletions(-)
New commits:
commit b4c890cb65745d05f92e451bb675fc0b2c5e31dc
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Oct 24 11:03:25 2017 +0200
loplugin:finalclasses in sfx2..svl
Change-Id: I71b78135b3d0259657438c4401340bb35ab5c6e0
Reviewed-on: https://gerrit.libreoffice.org/43742
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/sfx2/emojiview.hxx b/include/sfx2/emojiview.hxx
index 1085d4d760b7..8830a6d83344 100644
--- a/include/sfx2/emojiview.hxx
+++ b/include/sfx2/emojiview.hxx
@@ -52,7 +52,7 @@ private:
};
-class EmojiView : public ThumbnailView
+class EmojiView final : public ThumbnailView
{
public:
EmojiView ( vcl::Window* pParent);
@@ -66,14 +66,13 @@ public:
void AppendItem(const OUString &rTitle, const OUString &rCategory, const OUString &rName );
-protected:
+private:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
-protected:
std::string msJSONData;
Link<ThumbnailViewItem*, void> maInsertEmojiHdl;
diff --git a/include/sfx2/mgetempl.hxx b/include/sfx2/mgetempl.hxx
index f60f4bf74e1f..fb018865cc35 100644
--- a/include/sfx2/mgetempl.hxx
+++ b/include/sfx2/mgetempl.hxx
@@ -34,7 +34,7 @@
class SfxStyleFamilyItem;
class SfxStyleSheetBase;
-class SfxManageStyleSheetPage : public SfxTabPage
+class SfxManageStyleSheetPage final : public SfxTabPage
{
VclPtr<VclMultiLineEdit> m_pNameRo;
VclPtr<Edit> m_pNameRw;
@@ -66,7 +66,6 @@ class SfxManageStyleSheetPage : public SfxTabPage
OUString aParent;
sal_uInt16 nFlags;
-private:
friend class SfxStyleDialog;
DECL_LINK( GetFocusHdl, Control&, void );
@@ -84,15 +83,14 @@ friend class SfxStyleDialog;
static VclPtr<SfxTabPage> Create( vcl::Window* pParent, const SfxItemSet* );
-protected:
virtual bool FillItemSet(SfxItemSet *) override;
virtual void Reset(const SfxItemSet *) override;
static bool Execute_Impl( sal_uInt16 nId, const OUString& rStr, const OUString& rRefStr,
sal_uInt16 nFamily, sal_uInt16 nMask = 0 );
using TabPage::ActivatePage;
- virtual void ActivatePage(const SfxItemSet &) override;
- using TabPage::DeactivatePage;
+ virtual void ActivatePage(const SfxItemSet &) override;
+ using TabPage::DeactivatePage;
virtual DeactivateRC DeactivatePage(SfxItemSet *) override;
public:
diff --git a/include/sfx2/notebookbar/NotebookbarTabControl.hxx b/include/sfx2/notebookbar/NotebookbarTabControl.hxx
index 316641010013..2ff4d3c48974 100644
--- a/include/sfx2/notebookbar/NotebookbarTabControl.hxx
+++ b/include/sfx2/notebookbar/NotebookbarTabControl.hxx
@@ -19,7 +19,7 @@ namespace com { namespace sun { namespace star { namespace ui {
class XUIConfigurationListener;
} } } }
-class SFX2_DLLPUBLIC NotebookbarTabControl : public NotebookbarTabControlBase
+class SFX2_DLLPUBLIC NotebookbarTabControl final : public NotebookbarTabControlBase
{
friend class ChangedUIEventListener;
@@ -40,8 +40,6 @@ private:
css::uno::Reference<css::ui::XUIConfigurationListener> m_pListener;
css::uno::Reference<css::frame::XFrame> m_xFrame;
-
-protected:
bool m_bInitialized;
bool m_bInvalidate;
};
diff --git a/include/sfx2/recentdocsview.hxx b/include/sfx2/recentdocsview.hxx
index ffbea950e2fe..a2d2f8ad86d8 100644
--- a/include/sfx2/recentdocsview.hxx
+++ b/include/sfx2/recentdocsview.hxx
@@ -52,7 +52,7 @@ template<> struct typed_flags<sfx2::ApplicationType> : is_typed_flags<sfx2::Appl
namespace sfx2
{
-class SFX2_DLLPUBLIC RecentDocsView : public ThumbnailView
+class SFX2_DLLPUBLIC RecentDocsView final : public ThumbnailView
{
public:
RecentDocsView( vcl::Window* pParent );
@@ -71,7 +71,7 @@ public:
DECL_STATIC_LINK( RecentDocsView, ExecuteHdl_Impl, void*, void );
-protected:
+private:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
diff --git a/include/sfx2/recentdocsviewitem.hxx b/include/sfx2/recentdocsviewitem.hxx
index 00fdb3e77d23..57c11ccabb1f 100644
--- a/include/sfx2/recentdocsviewitem.hxx
+++ b/include/sfx2/recentdocsviewitem.hxx
@@ -12,7 +12,7 @@
#include <sfx2/thumbnailview.hxx>
-class RecentDocsViewItem : public ThumbnailViewItem
+class RecentDocsViewItem final : public ThumbnailViewItem
{
public:
RecentDocsViewItem(ThumbnailView &rView, const OUString &rURL,
@@ -37,11 +37,10 @@ public:
/// Called when the user clicks a document - it will open it.
void OpenDocument();
-protected:
+private:
/// Return area where is the icon to remove document from the recent documents.
tools::Rectangle getRemoveIconArea() const;
-private:
OUString maURL;
OUString m_sHelpText;
diff --git a/include/sfx2/sidebar/SidebarPanelBase.hxx b/include/sfx2/sidebar/SidebarPanelBase.hxx
index e6da3299a775..2494be1e0bf5 100644
--- a/include/sfx2/sidebar/SidebarPanelBase.hxx
+++ b/include/sfx2/sidebar/SidebarPanelBase.hxx
@@ -48,7 +48,7 @@ typedef cppu::WeakComponentImplHelper<css::ui::XContextChangeEventListener,
/** Base class for sidebar panels that provides some convenience
functionality.
*/
-class SFX2_DLLPUBLIC SidebarPanelBase : private ::cppu::BaseMutex,
+class SFX2_DLLPUBLIC SidebarPanelBase final : private ::cppu::BaseMutex,
public SidebarPanelBaseInterfaceBase
{
public:
@@ -81,9 +81,7 @@ public:
// XUpdateModel
virtual void SAL_CALL updateModel(const css::uno::Reference<css::frame::XModel>& xModel) override;
-protected:
- css::uno::Reference<css::frame::XFrame> mxFrame;
-
+private:
SidebarPanelBase(const OUString& rsResourceURL, const css::uno::Reference<css::frame::XFrame>& rxFrame,
vcl::Window* pWindow, const css::ui::LayoutSize& rLayoutSize);
virtual ~SidebarPanelBase() override;
@@ -92,7 +90,7 @@ protected:
virtual void SAL_CALL disposing() override;
-private:
+ css::uno::Reference<css::frame::XFrame> mxFrame;
VclPtr<vcl::Window> mpControl;
const OUString msResourceURL;
const css::ui::LayoutSize maLayoutSize;
diff --git a/include/sfx2/templatedefaultview.hxx b/include/sfx2/templatedefaultview.hxx
index b35ac2f349f1..15bec26fa38a 100644
--- a/include/sfx2/templatedefaultview.hxx
+++ b/include/sfx2/templatedefaultview.hxx
@@ -12,7 +12,7 @@
#include <sfx2/templatelocalview.hxx>
-class SFX2_DLLPUBLIC TemplateDefaultView : public TemplateLocalView
+class SFX2_DLLPUBLIC TemplateDefaultView final : public TemplateLocalView
{
public:
TemplateDefaultView(Window *pParent);
@@ -28,7 +28,8 @@ public:
void createContextMenu();
DECL_LINK(ContextMenuSelectHdl, Menu*, void);
-protected:
+
+private:
long mnItemMaxSize;
long mnTextHeight;
};
diff --git a/include/svl/filenotation.hxx b/include/svl/filenotation.hxx
index 4c99f834a56f..ff89fa462d4a 100644
--- a/include/svl/filenotation.hxx
+++ b/include/svl/filenotation.hxx
@@ -30,12 +30,8 @@ namespace svt
//= OFileNotation
- class SVL_DLLPUBLIC OFileNotation
+ class SVL_DLLPUBLIC OFileNotation final
{
- protected:
- OUString m_sSystem;
- OUString m_sFileURL;
-
public:
enum NOTATION
{
@@ -52,6 +48,9 @@ namespace svt
SVL_DLLPRIVATE void construct( const OUString& _rUrlOrPath );
SVL_DLLPRIVATE bool implInitWithSystemNotation( const OUString& _rSystemPath );
SVL_DLLPRIVATE bool implInitWithURLNotation( const OUString& _rURL );
+
+ OUString m_sSystem;
+ OUString m_sFileURL;
};
diff --git a/sfx2/source/inc/templatesearchview.hxx b/sfx2/source/inc/templatesearchview.hxx
index 8c2a24c3fb4c..d8e187d27409 100644
--- a/sfx2/source/inc/templatesearchview.hxx
+++ b/sfx2/source/inc/templatesearchview.hxx
@@ -15,7 +15,7 @@
class TemplateViewItem;
class PopupMenu;
-class TemplateSearchView : public ThumbnailView
+class TemplateSearchView final : public ThumbnailView
{
public:
@@ -41,7 +41,7 @@ public:
static BitmapEx getDefaultThumbnail( const OUString& rPath );
-protected:
+private:
virtual void OnItemDblClicked(ThumbnailViewItem *pItem) override;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
@@ -50,7 +50,6 @@ protected:
virtual void KeyInput( const KeyEvent& rKEvt ) override;
-protected:
TemplateViewItem *maSelectedItem;
Point maPosition;
diff --git a/shell/source/backends/localebe/localebackend.hxx b/shell/source/backends/localebe/localebackend.hxx
index e9bfcd3ad04c..4fd0e75b593b 100644
--- a/shell/source/backends/localebe/localebackend.hxx
+++ b/shell/source/backends/localebe/localebackend.hxx
@@ -32,9 +32,10 @@
namespace uno = css::uno ;
namespace lang = css::lang ;
-class LocaleBackend : public ::cppu::WeakImplHelper <
+class LocaleBackend final : public ::cppu::WeakImplHelper <
css::beans::XPropertySet,
- lang::XServiceInfo > {
+ lang::XServiceInfo >
+{
public:
@@ -94,7 +95,7 @@ class LocaleBackend : public ::cppu::WeakImplHelper <
css::uno::Reference< css::beans::XVetoableChangeListener > const &) override
{}
- protected:
+ private:
/**
Service constructor from a service factory.
@@ -105,7 +106,6 @@ class LocaleBackend : public ::cppu::WeakImplHelper <
/** Destructor */
virtual ~LocaleBackend() override ;
- private:
// Returns the user locale
static css::beans::Optional<css::uno::Any> getLocale();
diff --git a/starmath/inc/ElementsDockingWindow.hxx b/starmath/inc/ElementsDockingWindow.hxx
index 79607eb2acf6..1b4836d8ff62 100644
--- a/starmath/inc/ElementsDockingWindow.hxx
+++ b/starmath/inc/ElementsDockingWindow.hxx
@@ -155,11 +155,10 @@ public:
virtual void ToggleFloatingMode() override;
};
-class SmElementsDockingWindowWrapper : public SfxChildWindow
+class SmElementsDockingWindowWrapper final : public SfxChildWindow
{
SFX_DECL_CHILDWINDOW_WITHID(SmElementsDockingWindowWrapper);
-protected:
SmElementsDockingWindowWrapper( vcl::Window* pParentWindow,
sal_uInt16 nId,
SfxBindings* pBindings,
diff --git a/starmath/inc/utility.hxx b/starmath/inc/utility.hxx
index 188ffdd5d67a..a5a731577655 100644
--- a/starmath/inc/utility.hxx
+++ b/starmath/inc/utility.hxx
@@ -133,9 +133,8 @@ public:
// SmFontPickListBox
-class SmFontPickListBox : public SmFontPickList, public ListBox
+class SmFontPickListBox final : public SmFontPickList, public ListBox
{
-protected:
DECL_LINK(SelectHdl, ListBox&, void);
public:
diff --git a/starmath/inc/view.hxx b/starmath/inc/view.hxx
index 9667d09e30ef..ceecb0718ed2 100644
--- a/starmath/inc/view.hxx
+++ b/starmath/inc/view.hxx
@@ -42,14 +42,8 @@ class SmViewShell;
class SmPrintUIOptions;
class SmGraphicAccessible;
-class SmGraphicWindow : public ScrollableWindow
+class SmGraphicWindow final : public ScrollableWindow
{
- Point aFormulaDrawPos;
- // old style editing pieces
- tools::Rectangle aCursorRect;
- bool bIsCursorVisible;
- bool bIsLineVisible;
- AutoTimer aCaretBlinkTimer;
public:
bool IsCursorVisible() const
{
@@ -62,35 +56,7 @@ public:
}
void ShowLine(bool bShow);
const SmNode * SetCursorPos(sal_uInt16 nRow, sal_uInt16 nCol);
-protected:
- void SetIsCursorVisible(bool bVis)
- {
- bIsCursorVisible = bVis;
- }
- using Window::SetCursor;
- void SetCursor(const SmNode *pNode);
- void SetCursor(const tools::Rectangle &rRect);
- bool IsInlineEditEnabled() const;
-
-private:
- rtl::Reference<SmGraphicAccessible> mxAccessible;
- SmViewShell* pViewShell;
- sal_uInt16 nZoom;
-
-protected:
- virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
- virtual void KeyInput(const KeyEvent& rKEvt) override;
- virtual void Command(const CommandEvent& rCEvt) override;
- virtual void StateChanged( StateChangedType eChanged ) override;
-
-private:
- void RepaintViewShellDoc();
- DECL_LINK(CaretBlinkTimerHdl, Timer *, void);
- void CaretBlinkInit();
- void CaretBlinkStart();
- void CaretBlinkStop();
-public:
explicit SmGraphicWindow(SmViewShell* pShell);
virtual ~SmGraphicWindow() override;
virtual void dispose() override;
@@ -133,11 +99,41 @@ public:
{
return mxAccessible.get();
}
+
+private:
+ void SetIsCursorVisible(bool bVis)
+ {
+ bIsCursorVisible = bVis;
+ }
+ using Window::SetCursor;
+ void SetCursor(const SmNode *pNode);
+ void SetCursor(const tools::Rectangle &rRect);
+ bool IsInlineEditEnabled() const;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle&) override;
+ virtual void KeyInput(const KeyEvent& rKEvt) override;
+ virtual void Command(const CommandEvent& rCEvt) override;
+ virtual void StateChanged( StateChangedType eChanged ) override;
+
+ void RepaintViewShellDoc();
+ DECL_LINK(CaretBlinkTimerHdl, Timer *, void);
+ void CaretBlinkInit();
+ void CaretBlinkStart();
+ void CaretBlinkStop();
+
+ Point aFormulaDrawPos;
+ // old style editing pieces
+ tools::Rectangle aCursorRect;
+ bool bIsCursorVisible;
+ bool bIsLineVisible;
+ AutoTimer aCaretBlinkTimer;
+ rtl::Reference<SmGraphicAccessible> mxAccessible;
+ SmViewShell* pViewShell;
+ sal_uInt16 nZoom;
};
-class SmGraphicController: public SfxControllerItem
+class SmGraphicController final : public SfxControllerItem
{
-protected:
SmGraphicWindow &rGraphic;
public:
SmGraphicController(SmGraphicWindow &, sal_uInt16, SfxBindings & );
@@ -146,9 +142,8 @@ public:
const SfxPoolItem* pState) override;
};
-class SmEditController: public SfxControllerItem
+class SmEditController final : public SfxControllerItem
{
-protected:
SmEditWindow &rEdit;
public:
@@ -198,11 +193,10 @@ public:
SmViewShell* GetView();
};
-class SmCmdBoxWrapper : public SfxChildWindow
+class SmCmdBoxWrapper final : public SfxChildWindow
{
SFX_DECL_CHILDWINDOW_WITHID(SmCmdBoxWrapper);
-protected:
SmCmdBoxWrapper(vcl::Window* pParentWindow, sal_uInt16 nId, SfxBindings* pBindings, SfxChildWinInfo* pInfo);
public:
diff --git a/starmath/source/accessibility.hxx b/starmath/source/accessibility.hxx
index 9f3755a7f377..e2ed62cc8dce 100644
--- a/starmath/source/accessibility.hxx
+++ b/starmath/source/accessibility.hxx
@@ -56,7 +56,7 @@ cppu::WeakImplHelper
>
SmGraphicAccessibleBaseClass;
-class SmGraphicAccessible :
+class SmGraphicAccessible final :
public SmGraphicAccessibleBaseClass
{
OUString aAccName;
@@ -68,7 +68,6 @@ class SmGraphicAccessible :
SmGraphicAccessible( const SmGraphicAccessible & ) = delete;
SmGraphicAccessible & operator = ( const SmGraphicAccessible & ) = delete;
-protected:
SmDocShell * GetDoc_Impl();
OUString GetAccessibleText_Impl();
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index 3bba6bf8cfd3..fc12cfacc18b 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -92,7 +92,7 @@ public:
void SetModified( bool bVal ) { bModified = bVal; }
};
-class SmMathConfig : public utl::ConfigItem, public SfxBroadcaster
+class SmMathConfig final : public utl::ConfigItem, public SfxBroadcaster
{
std::unique_ptr<SmFormat> pFormat;
std::unique_ptr<SmCfgOther> pOther;
@@ -117,9 +117,8 @@ class SmMathConfig : public utl::ConfigItem, public SfxBroadcaster
const OUString &rSymbolName,
const OUString &rBaseNode ) const;
- void SetOtherIfNotEqual( bool &rbItem, bool bNewVal );
+ void SetOtherIfNotEqual( bool &rbItem, bool bNewVal );
-protected:
void LoadOther();
void SaveOther();
void LoadFormat();
diff --git a/starmath/source/mathmlexport.hxx b/starmath/source/mathmlexport.hxx
index 62139209cce5..ba7abf51d0ce 100644
--- a/starmath/source/mathmlexport.hxx
+++ b/starmath/source/mathmlexport.hxx
@@ -63,13 +63,12 @@ public:
};
-class SmXMLExport : public SvXMLExport
+class SmXMLExport final : public SvXMLExport
{
const SmNode * pTree;
OUString aText;
bool bSuccess;
-protected:
void ExportNodes(const SmNode *pNode, int nLevel);
void ExportTable(const SmNode *pNode, int nLevel);
void ExportLine(const SmNode *pNode, int nLevel);
diff --git a/svl/source/numbers/supservs.hxx b/svl/source/numbers/supservs.hxx
index 4a00ce22f86e..919ae9d461da 100644
--- a/svl/source/numbers/supservs.hxx
+++ b/svl/source/numbers/supservs.hxx
@@ -32,15 +32,16 @@
* - can be initialized (css::lang::XInitialization)
* with a specific language (i.e. css::lang::Locale)
*/
-class SvNumberFormatsSupplierServiceObject
+class SvNumberFormatsSupplierServiceObject final
:public SvNumberFormatsSupplierObj
,public css::lang::XInitialization
,public css::lang::XServiceInfo
{
-protected:
SvNumberFormatter* m_pOwnFormatter;
css::uno::Reference< css::uno::XComponentContext > m_xORB;
+ void implEnsureFormatter();
+
public:
explicit SvNumberFormatsSupplierServiceObject(const css::uno::Reference< css::uno::XComponentContext >& _rxORB);
virtual ~SvNumberFormatsSupplierServiceObject() override;
@@ -70,9 +71,6 @@ public:
// XUnoTunnler
virtual sal_Int64 SAL_CALL getSomething( const css::uno::Sequence< sal_Int8 >& aIdentifier ) override;
-
-protected:
- void implEnsureFormatter();
};
More information about the Libreoffice-commits
mailing list