Kaydet (Commit) b4c890cb authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:finalclasses in sfx2..svl

Change-Id: I71b78135b3d0259657438c4401340bb35ab5c6e0
Reviewed-on: https://gerrit.libreoffice.org/43742Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 49b338b7
......@@ -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;
......
......@@ -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:
......
......@@ -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;
};
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
......
......@@ -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;
};
......
......@@ -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;
};
......
......@@ -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;
......
......@@ -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();
......
......@@ -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,
......
......@@ -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:
......
......@@ -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:
......
......@@ -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();
......
......@@ -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();
......
......@@ -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);
......
......@@ -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();
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment