summaryrefslogtreecommitdiff
path: root/include/svtools
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-24 08:06:22 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-24 10:54:23 +0200
commitf49b6d89fd9a903ce01a30bf9971188737ceda14 (patch)
tree8e70bf3f9fd7f29a52cbd3440cb9423eaebd72d4 /include/svtools
parent89b08e23180c242a058653e246ace2ca47b56a3a (diff)
loplugin:finalclasses in svtools
Change-Id: I596342a3d32e116ac5994b60a5bd8717d4f6a5dd Reviewed-on: https://gerrit.libreoffice.org/43733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/svtools')
-rw-r--r--include/svtools/accessibleruler.hxx35
-rw-r--r--include/svtools/addresstemplate.hxx45
-rw-r--r--include/svtools/calendar.hxx5
-rw-r--r--include/svtools/ctrlbox.hxx46
-rw-r--r--include/svtools/filectrl.hxx8
-rw-r--r--include/svtools/fmtfield.hxx21
-rw-r--r--include/svtools/hyperlabel.hxx9
-rw-r--r--include/svtools/stringtransfer.hxx9
-rw-r--r--include/svtools/transfer.hxx9
9 files changed, 80 insertions, 107 deletions
diff --git a/include/svtools/accessibleruler.hxx b/include/svtools/accessibleruler.hxx
index 709a133cb61b..5e47c7e076ef 100644
--- a/include/svtools/accessibleruler.hxx
+++ b/include/svtools/accessibleruler.hxx
@@ -59,15 +59,13 @@ typedef ::cppu::WeakAggComponentImplHelper5<
css::lang::XServiceInfo >
SvtRulerAccessible_Base;
-class SvtRulerAccessible : public ::cppu::BaseMutex, public SvtRulerAccessible_Base
+class SvtRulerAccessible final : public ::cppu::BaseMutex, public SvtRulerAccessible_Base
{
public:
//===== internal ========================================================
SvtRulerAccessible(
const css::uno::Reference< css::accessibility::XAccessible>& rxParent, Ruler& rRepresentation, const ::rtl::OUString& rName );
-protected:
- virtual ~SvtRulerAccessible() override;
-public:
+
/// @throws css::uno::RuntimeException
bool SAL_CALL
isVisible();
@@ -160,7 +158,17 @@ public:
virtual css::uno::Sequence<sal_Int8> SAL_CALL
getImplementationId() override;
-protected:
+private:
+
+ virtual ~SvtRulerAccessible() override;
+
+ virtual void SAL_CALL disposing() override;
+
+ /// @returns true if it's disposed or in disposing
+ inline bool IsAlive() const;
+
+ /// @throws DisposedException if it's not alive
+ void ThrowExceptionIfNotAlive();
/// @Return the object's current bounding box relative to the desktop.
///
@@ -172,18 +180,7 @@ protected:
/// @throws css::uno::RuntimeException
tools::Rectangle GetBoundingBox();
-
- virtual void SAL_CALL disposing() override;
-
- /// @returns true if it's disposed or in disposing
- inline bool IsAlive() const;
-
- /// @throws DisposedException if it's not alive
- void ThrowExceptionIfNotAlive();
-
-private:
- /** Name of this object.
- */
+ /// Name of this object.
::rtl::OUString msName;
/// Reference to the parent object.
@@ -193,10 +190,8 @@ private:
/// pointer to internal representation
VclPtr<Ruler> mpRepr;
- /// client id in the AccessibleEventNotifier queue
+ /// client id in the AccessibleEventNotifier queue
sal_uInt32 mnClientId;
-
-
};
inline bool SvtRulerAccessible::IsAlive() const
diff --git a/include/svtools/addresstemplate.hxx b/include/svtools/addresstemplate.hxx
index 541e55c89805..752f14f5f8ce 100644
--- a/include/svtools/addresstemplate.hxx
+++ b/include/svtools/addresstemplate.hxx
@@ -46,29 +46,8 @@ namespace svt
// = AddressBookSourceDialog
struct AddressBookSourceDialogData;
- class SVT_DLLPUBLIC AddressBookSourceDialog : public ModalDialog
+ class SVT_DLLPUBLIC AddressBookSourceDialog final : public ModalDialog
{
- private:
- // Controls
- VclPtr<ComboBox> m_pDatasource;
- VclPtr<PushButton> m_pAdministrateDatasources;
- VclPtr<ComboBox> m_pTable;
- VclPtr<ScrollBar> m_pFieldScroller;
-
- // string to display for "no selection"
- const OUString m_sNoFieldSelection;
-
- /// the DatabaseContext for selecting data sources
- css::uno::Reference< css::sdb::XDatabaseContext >
- m_xDatabaseContext;
- // the ORB for creating objects
- css::uno::Reference< css::uno::XComponentContext >
- m_xORB;
- css::uno::Reference< css::container::XNameAccess >
- m_xCurrentDatasourceTables;
-
- std::unique_ptr<AddressBookSourceDialogData> m_pImpl;
-
public:
AddressBookSourceDialog( vcl::Window* _pParent,
const css::uno::Reference< css::uno::XComponentContext >& _rxORB );
@@ -107,7 +86,7 @@ namespace svt
void getFieldMapping(
css::uno::Sequence< css::util::AliasProgrammaticPair >& _rMapping) const;
- protected:
+ private:
void implConstruct();
// Window overridables
@@ -134,6 +113,26 @@ namespace svt
DECL_LINK(OnComboSelect, ComboBox&, void);
DECL_LINK(OnOkClicked, Button*, void);
DECL_LINK(OnDelayedInitialize, void*, void);
+
+ // Controls
+ VclPtr<ComboBox> m_pDatasource;
+ VclPtr<PushButton> m_pAdministrateDatasources;
+ VclPtr<ComboBox> m_pTable;
+ VclPtr<ScrollBar> m_pFieldScroller;
+
+ // string to display for "no selection"
+ const OUString m_sNoFieldSelection;
+
+ /// the DatabaseContext for selecting data sources
+ css::uno::Reference< css::sdb::XDatabaseContext >
+ m_xDatabaseContext;
+ // the ORB for creating objects
+ css::uno::Reference< css::uno::XComponentContext >
+ m_xORB;
+ css::uno::Reference< css::container::XNameAccess >
+ m_xCurrentDatasourceTables;
+
+ std::unique_ptr<AddressBookSourceDialogData> m_pImpl;
};
diff --git a/include/svtools/calendar.hxx b/include/svtools/calendar.hxx
index 1fe247539f6c..b140ca01a64f 100644
--- a/include/svtools/calendar.hxx
+++ b/include/svtools/calendar.hxx
@@ -122,9 +122,8 @@ calls or by ending a selection.
typedef std::set<sal_Int32> IntDateSet;
-class SVT_DLLPUBLIC Calendar : public Control
+class SVT_DLLPUBLIC Calendar final : public Control
{
-private:
IntDateSet* mpSelectTable;
IntDateSet* mpOldSelectTable;
OUString maDayTexts[31];
@@ -205,8 +204,6 @@ private:
SVT_DLLPRIVATE void ImplEndTracking( bool bCancel );
SVT_DLLPRIVATE DayOfWeek ImplGetWeekStart() const;
-protected:
-
DECL_LINK( ScrollHdl, Timer *, void );
public:
diff --git a/include/svtools/ctrlbox.hxx b/include/svtools/ctrlbox.hxx
index 7b7b68cc92d6..39faf85747ee 100644
--- a/include/svtools/ctrlbox.hxx
+++ b/include/svtools/ctrlbox.hxx
@@ -192,29 +192,8 @@ inline Color sameDistColor( Color /*rMain*/, Color rDefault )
return rDefault;
}
-class SVT_DLLPUBLIC LineListBox : public ListBox
+class SVT_DLLPUBLIC LineListBox final : public ListBox
{
- ImpLineList* pLineList;
- long m_nWidth;
- OUString m_sNone;
-
- ScopedVclPtr<VirtualDevice> aVirDev;
- Size aTxtSize;
- Color aColor;
- Color maPaintCol;
- FieldUnit eSourceUnit;
-
- SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance,
- Color nColor1, Color nColor2, Color nColorDist,
- SvxBorderLineStyle nStyle, Bitmap& rBmp );
- using Window::ImplInit;
- SVT_DLLPRIVATE void ImplInit();
- void UpdatePaintLineColor(); // returns sal_True if maPaintCol has changed
- virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
-
- void UpdateEntries( long nOldWidth );
- sal_Int32 GetStylePos( sal_Int32 nListPos, long nWidth );
-
public:
typedef Color (*ColorFunc)(Color);
typedef Color (*ColorDistFunc)(Color, Color);
@@ -248,16 +227,35 @@ public:
void SetColor( const Color& rColor );
const Color& GetColor() const { return aColor; }
-protected:
+private:
+
+ SVT_DLLPRIVATE void ImpGetLine( long nLine1, long nLine2, long nDistance,
+ Color nColor1, Color nColor2, Color nColorDist,
+ SvxBorderLineStyle nStyle, Bitmap& rBmp );
+ using Window::ImplInit;
+ SVT_DLLPRIVATE void ImplInit();
+ void UpdatePaintLineColor(); // returns sal_True if maPaintCol has changed
+ virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
+
+ void UpdateEntries( long nOldWidth );
+ sal_Int32 GetStylePos( sal_Int32 nListPos, long nWidth );
inline const Color& GetPaintColor() const;
Color GetColorLine1( sal_Int32 nPos );
Color GetColorLine2( sal_Int32 nPos );
Color GetColorDist( sal_Int32 nPos );
-private:
LineListBox( const LineListBox& ) = delete;
LineListBox& operator =( const LineListBox& ) = delete;
+
+ ImpLineList* pLineList;
+ long m_nWidth;
+ OUString m_sNone;
+ ScopedVclPtr<VirtualDevice> aVirDev;
+ Size aTxtSize;
+ Color aColor;
+ Color maPaintCol;
+ FieldUnit eSourceUnit;
};
inline void LineListBox::SetColor( const Color& rColor )
diff --git a/include/svtools/filectrl.hxx b/include/svtools/filectrl.hxx
index 22acd8ebbb44..c00d3fccfa81 100644
--- a/include/svtools/filectrl.hxx
+++ b/include/svtools/filectrl.hxx
@@ -38,17 +38,13 @@ namespace o3tl
}
-class SVT_DLLPUBLIC FileControl : public vcl::Window
+class SVT_DLLPUBLIC FileControl final : public vcl::Window
{
-private:
VclPtr<Edit> maEdit;
VclPtr<PushButton> maButton;
-
- OUString maButtonText;
-
+ OUString maButtonText;
FileControlMode_Internal mnInternalFlags;
-protected:
SVT_DLLPRIVATE void Resize() override;
SVT_DLLPRIVATE void GetFocus() override;
SVT_DLLPRIVATE void StateChanged( StateChangedType nType ) override;
diff --git a/include/svtools/fmtfield.hxx b/include/svtools/fmtfield.hxx
index 99e3998e2451..e8d794fd76f6 100644
--- a/include/svtools/fmtfield.hxx
+++ b/include/svtools/fmtfield.hxx
@@ -252,11 +252,8 @@ protected:
};
-class SVT_DLLPUBLIC DoubleNumericField : public FormattedField
+class SVT_DLLPUBLIC DoubleNumericField final : public FormattedField
{
-protected:
- validation::NumberValidator* m_pNumberValidator;
-
public:
DoubleNumericField(vcl::Window* pParent, WinBits nStyle)
:FormattedField(pParent, nStyle)
@@ -268,20 +265,18 @@ public:
virtual ~DoubleNumericField() override;
virtual void dispose() override;
-protected:
+private:
virtual bool CheckText(const OUString& sText) const override;
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override;
void ResetConformanceTester();
+
+ validation::NumberValidator* m_pNumberValidator;
};
-class DoubleCurrencyField : public FormattedField
+class DoubleCurrencyField final : public FormattedField
{
- OUString m_sCurrencySymbol;
- bool m_bPrependCurrSym;
- bool m_bChangingFormat;
-
public:
DoubleCurrencyField(vcl::Window* pParent, WinBits nStyle);
@@ -291,10 +286,14 @@ public:
bool getPrependCurrSym() const { return m_bPrependCurrSym; }
void setPrependCurrSym(bool _bPrepend);
-protected:
+private:
virtual void FormatChanged(FORMAT_CHANGE_TYPE nWhat) override;
void UpdateCurrencyFormat();
+
+ OUString m_sCurrencySymbol;
+ bool m_bPrependCurrSym;
+ bool m_bChangingFormat;
};
#endif // INCLUDED_SVTOOLS_FMTFIELD_HXX
diff --git a/include/svtools/hyperlabel.hxx b/include/svtools/hyperlabel.hxx
index b63107683767..605d65dc4443 100644
--- a/include/svtools/hyperlabel.hxx
+++ b/include/svtools/hyperlabel.hxx
@@ -32,9 +32,8 @@ namespace svt
{
class HyperLabelImpl;
- class HyperLabel : public FixedText
+ class HyperLabel final : public FixedText
{
- protected:
std::unique_ptr<HyperLabelImpl> m_pImpl;
Link<HyperLabel*,void> maClickHdl;
@@ -46,9 +45,10 @@ namespace svt
void DeactivateHyperMode(vcl::Font aFont, const Color aColor);
void ActivateHyperMode(vcl::Font aFont, const Color aColor);
- protected:
void implInit();
+ using FixedText::CalcMinimumSize;
+
public:
HyperLabel( vcl::Window* _pParent, WinBits _nWinStyle );
virtual ~HyperLabel( ) override;
@@ -70,9 +70,6 @@ namespace svt
void SetClickHdl( const Link<HyperLabel*,void>& rLink ) { maClickHdl = rLink; }
Size CalcMinimumSize( long nMaxWidth ) const;
-
- private:
- using FixedText::CalcMinimumSize;
};
}
diff --git a/include/svtools/stringtransfer.hxx b/include/svtools/stringtransfer.hxx
index 44c1c70780d8..fcecc9724ff1 100644
--- a/include/svtools/stringtransfer.hxx
+++ b/include/svtools/stringtransfer.hxx
@@ -30,18 +30,17 @@ namespace svt
//= OStringTransferable
- class SVT_DLLPUBLIC OStringTransferable : public TransferableHelper
+ class SVT_DLLPUBLIC OStringTransferable final : public TransferableHelper
{
- protected:
- OUString m_sContent;
-
public:
OStringTransferable(const OUString& _rContent);
- protected:
+ private:
// TransferableHelper overridables
virtual void AddSupportedFormats() override;
virtual bool GetData( const css::datatransfer::DataFlavor& _rFlavor, const OUString& rDestDoc ) override;
+
+ OUString m_sContent;
};
diff --git a/include/svtools/transfer.hxx b/include/svtools/transfer.hxx
index f499a2a1fce4..61d76c174636 100644
--- a/include/svtools/transfer.hxx
+++ b/include/svtools/transfer.hxx
@@ -261,19 +261,16 @@ public:
struct TransferableDataHelper_Impl;
-class SVT_DLLPUBLIC TransferableDataHelper
+class SVT_DLLPUBLIC TransferableDataHelper final
{
friend class DropTargetHelper;
-private:
-
css::uno::Reference< css::datatransfer::XTransferable > mxTransfer;
css::uno::Reference< css::datatransfer::clipboard::XClipboard > mxClipboard;
DataFlavorExVector maFormats;
std::unique_ptr<TransferableObjectDescriptor> mxObjDesc;
std::unique_ptr<TransferableDataHelper_Impl> mxImpl;
-protected:
void InitFormats();
public:
@@ -308,8 +305,6 @@ public:
void Rebind( const css::uno::Reference< css::datatransfer::XTransferable >& _rxNewData );
-public:
-
css::uno::Any GetAny( SotClipboardFormatId nFormat, const OUString& rDestDoc ) const;
css::uno::Any GetAny( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) const;
@@ -357,8 +352,6 @@ public:
css::uno::Reference<css::io::XInputStream> GetInputStream( SotClipboardFormatId nFormat, const OUString& rDestDoc );
css::uno::Reference<css::io::XInputStream> GetInputStream( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc );
-public:
-
static TransferableDataHelper CreateFromSystemClipboard( vcl::Window * pWindow );
static TransferableDataHelper CreateFromSelection( vcl::Window * pWindow );
static bool IsEqual( const css::datatransfer::DataFlavor& rInternalFlavor,