summaryrefslogtreecommitdiffstats
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2017-10-26 14:55:54 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-10-27 08:53:23 +0200
commitac8901d9d2ef8c461012b44e67651aaff3a6b5c1 (patch)
tree57dca8dc874ac0f53f92374979f5f4b9be3fdda0 /sc
parentRevert "use rtl::Reference in SwChartDataSequence" (diff)
downloadcore-ac8901d9d2ef8c461012b44e67651aaff3a6b5c1.tar.gz
core-ac8901d9d2ef8c461012b44e67651aaff3a6b5c1.zip
loplugin:finalclasses in sc
Change-Id: I83438eaf2c1045a9212a63ed9fd8b3371e9b06aa Reviewed-on: https://gerrit.libreoffice.org/43896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/inc/chartlis.hxx3
-rw-r--r--sc/inc/compiler.hxx3
-rw-r--r--sc/inc/stlsheet.hxx13
-rw-r--r--sc/source/core/opencl/op_math.hxx4
-rw-r--r--sc/source/filter/inc/XclExpChangeTrack.hxx10
-rw-r--r--sc/source/filter/inc/excscen.hxx6
-rw-r--r--sc/source/filter/inc/scflt.hxx22
-rw-r--r--sc/source/filter/inc/xiescher.hxx45
-rw-r--r--sc/source/ui/inc/AccessibleSpreadsheet.hxx35
-rw-r--r--sc/source/ui/inc/PivotLayoutTreeListData.hxx9
-rw-r--r--sc/source/ui/inc/TableFillingAndNavigationTools.hxx6
-rw-r--r--sc/source/ui/inc/acredlin.hxx5
-rw-r--r--sc/source/ui/inc/cbutton.hxx3
-rw-r--r--sc/source/ui/inc/drawview.hxx3
-rw-r--r--sc/source/ui/inc/formula.hxx4
-rw-r--r--sc/source/ui/inc/fuconuno.hxx3
-rw-r--r--sc/source/ui/inc/inputwin.hxx5
-rw-r--r--sc/source/ui/inc/namecrea.hxx3
-rw-r--r--sc/source/ui/inc/redcom.hxx6
-rw-r--r--sc/source/ui/inc/tphfedit.hxx6
-rw-r--r--sc/source/ui/inc/tpsubt.hxx36
-rw-r--r--sc/source/ui/vba/vbafiledialogitems.hxx3
-rw-r--r--sc/source/ui/vba/vbaformatcondition.hxx4
-rw-r--r--sc/source/ui/vba/vbainterior.hxx6
-rw-r--r--sc/source/ui/vba/vbanames.hxx3
-rw-r--r--sc/source/ui/vba/vbaoleobject.hxx3
-rw-r--r--sc/source/ui/vba/vbapane.hxx6
-rw-r--r--sc/source/ui/vba/vbastyle.hxx3
28 files changed, 100 insertions, 158 deletions
diff --git a/sc/inc/chartlis.hxx b/sc/inc/chartlis.hxx
index 3fde82bea979..374e1aaeb20d 100644
--- a/sc/inc/chartlis.hxx
+++ b/sc/inc/chartlis.hxx
@@ -124,7 +124,7 @@ public:
virtual void notify() = 0;
};
-class SC_DLLPUBLIC ScChartListenerCollection
+class SC_DLLPUBLIC ScChartListenerCollection final
{
public:
typedef std::map<OUString, std::unique_ptr<ScChartListener>> ListenersType;
@@ -149,7 +149,6 @@ private:
ScChartListenerCollection& operator=( const ScChartListenerCollection& ) = delete;
-protected:
void Init();
public:
diff --git a/sc/inc/compiler.hxx b/sc/inc/compiler.hxx
index cc9040bce26f..d09f8a0af140 100644
--- a/sc/inc/compiler.hxx
+++ b/sc/inc/compiler.hxx
@@ -92,13 +92,12 @@ class CompileFormulaContext;
// constants and data types internal to compiler
-struct ScRawToken
+struct ScRawToken final
{
friend class ScCompiler;
// Friends that use a temporary ScRawToken on the stack (and therefore need
// the private dtor) and know what they're doing..
friend class ScTokenArray;
-protected:
OpCode eOp;
formula::StackVar eType; // type of data; this determines how the unions are used
public:
diff --git a/sc/inc/stlsheet.hxx b/sc/inc/stlsheet.hxx
index e47b4cf96924..cab2e9759702 100644
--- a/sc/inc/stlsheet.hxx
+++ b/sc/inc/stlsheet.hxx
@@ -28,7 +28,7 @@
class ScStyleSheetPool;
-class ScStyleSheet : public SfxStyleSheet
+class ScStyleSheet final : public SfxStyleSheet
{
friend class ScStyleSheetPool;
@@ -41,16 +41,11 @@ public:
NOTUSED
};
-private:
- mutable ScStyleSheet::Usage eUsage;
-
-public:
-
ScStyleSheet( const ScStyleSheet& rStyle );
virtual bool SetParent ( const OUString& rParentName ) override;
SC_DLLPUBLIC void ResetParent();
- virtual SfxItemSet& GetItemSet () override;
+ SC_DLLPUBLIC virtual SfxItemSet& GetItemSet() override;
virtual bool IsUsed () const override;
virtual bool HasFollowSupport () const override;
virtual bool HasParentSupport () const override;
@@ -60,7 +55,7 @@ public:
void SetUsage( ScStyleSheet::Usage eUse ) const { eUsage = eUse; }
ScStyleSheet::Usage GetUsage() const { return eUsage; }
-protected:
+private:
virtual ~ScStyleSheet() override;
ScStyleSheet( const OUString& rName,
@@ -69,6 +64,8 @@ protected:
sal_uInt16 nMask );
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
+
+ mutable ScStyleSheet::Usage eUsage;
};
#endif // INCLUDED_SC_INC_STLSHEET_HXX
diff --git a/sc/source/core/opencl/op_math.hxx b/sc/source/core/opencl/op_math.hxx
index d4bc6bd9ffb4..d79adc8c5779 100644
--- a/sc/source/core/opencl/op_math.hxx
+++ b/sc/source/core/opencl/op_math.hxx
@@ -54,7 +54,7 @@ public:
const std::string &sSymName, SubArguments &vSubArguments) override;
virtual std::string BinFuncName() const override { return "Csc"; }
};
-class OpSumIfs: public CheckVariables
+class OpSumIfs final : public CheckVariables
{
public:
OpSumIfs(): CheckVariables(), mNeedReductionKernel(false) {}
@@ -62,7 +62,7 @@ public:
const std::string &sSymName, SubArguments &vSubArguments) override;
virtual std::string BinFuncName() const override { return "SumIfs"; }
bool NeedReductionKernel() const { return mNeedReductionKernel; }
-protected:
+private:
bool mNeedReductionKernel;
};
class OpCosh: public Normal
diff --git a/sc/source/filter/inc/XclExpChangeTrack.hxx b/sc/source/filter/inc/XclExpChangeTrack.hxx
index cfa852d55270..45aa21f3e7dd 100644
--- a/sc/source/filter/inc/XclExpChangeTrack.hxx
+++ b/sc/source/filter/inc/XclExpChangeTrack.hxx
@@ -461,18 +461,15 @@ struct XclExpChTrData
// XclExpChTrCellContent - changed cell content
-class XclExpChTrCellContent : public XclExpChTrAction, protected XclExpRoot
+class XclExpChTrCellContent final : public XclExpChTrAction, protected XclExpRoot
{
-private:
XclExpChTrData* pOldData;
XclExpChTrData* pNewData;
sal_uInt16 nOldLength; // this is not the record size
+ ScAddress aPosition;
static void MakeEmptyChTrData( XclExpChTrData*& rpData );
-protected:
- ScAddress aPosition;
-
void GetCellData(
const XclExpRoot& rRoot, const ScCellValue& rScCell, XclExpChTrData*& rpData,
sal_uInt32& rXclLength1, sal_uInt16& rXclLength2 );
@@ -546,9 +543,8 @@ public:
// XclExpChTrMoveRange - move cell range
-class XclExpChTrMoveRange : public XclExpChTrAction
+class XclExpChTrMoveRange final : public XclExpChTrAction
{
-protected:
ScRange aSourceRange;
ScRange aDestRange;
diff --git a/sc/source/filter/inc/excscen.hxx b/sc/source/filter/inc/excscen.hxx
index a33a37db6d8e..c0445af19a2f 100644
--- a/sc/source/filter/inc/excscen.hxx
+++ b/sc/source/filter/inc/excscen.hxx
@@ -43,16 +43,14 @@ public:
const OUString& GetValue() const { return aValue; }
};
-class ExcScenario
+class ExcScenario final
{
public:
-
ExcScenario( XclImpStream& rIn, const RootData& rRoot );
void Apply( const XclImpRoot& rRoot, const bool bLast );
-protected:
-
+private:
OUString aName;
OUString aComment;
OUString aUserName;
diff --git a/sc/source/filter/inc/scflt.hxx b/sc/source/filter/inc/scflt.hxx
index c631fdb08a98..6dd4a27438dc 100644
--- a/sc/source/filter/inc/scflt.hxx
+++ b/sc/source/filter/inc/scflt.hxx
@@ -598,16 +598,15 @@ public:
};
// Font-Collection
-class Sc10FontCollection : public ScCollection
+class Sc10FontCollection final : public ScCollection
{
-protected:
- ErrCode nError;
public:
Sc10FontCollection( SvStream& rStream );
ErrCode GetError() { return nError; }
Sc10FontData* At(sal_uInt16 nIndex) { return static_cast<Sc10FontData*>(ScCollection::At(nIndex)); }
private:
using ScCollection::At;
+ ErrCode nError;
};
//Range-Data
@@ -632,16 +631,15 @@ public:
};
// Range-Collection
-class Sc10NameCollection : public ScCollection
+class Sc10NameCollection final : public ScCollection
{
-protected:
- ErrCode nError;
public:
Sc10NameCollection(SvStream& rStream);
ErrCode GetError() { return nError; }
Sc10NameData* At(sal_uInt16 nIndex) { return static_cast<Sc10NameData*>(ScCollection::At(nIndex)); }
private:
using ScCollection::At;
+ ErrCode nError;
};
// Template-Data
@@ -683,16 +681,15 @@ virtual ScDataObject* Clone() const override { return new Sc10PatternData(
};
// Template-Collection
-class Sc10PatternCollection : public ScCollection
+class Sc10PatternCollection final : public ScCollection
{
-protected:
- ErrCode nError;
public:
Sc10PatternCollection(SvStream& rStream);
ErrCode GetError() { return nError; }
Sc10PatternData* At(sal_uInt16 nIndex) { return static_cast<Sc10PatternData*>(ScCollection::At(nIndex)); }
private:
using ScCollection::At;
+ ErrCode nError;
};
// DataBank-Data
@@ -711,17 +708,16 @@ virtual ScDataObject* Clone() const override { return new Sc10DataBaseData
};
// DataBank-Collection
-class Sc10DataBaseCollection : public ScCollection
+class Sc10DataBaseCollection final : public ScCollection
{
-protected:
- ErrCode nError;
- sal_Char ActName[32];
public:
Sc10DataBaseCollection(SvStream& rStream);
ErrCode GetError() { return nError; }
Sc10DataBaseData* At(sal_uInt16 nIndex) { return static_cast<Sc10DataBaseData*>(ScCollection::At(nIndex)); }
private:
using ScCollection::At;
+ ErrCode nError;
+ sal_Char ActName[32];
};
class Sc10PageData : public ScDataObject
diff --git a/sc/source/filter/inc/xiescher.hxx b/sc/source/filter/inc/xiescher.hxx
index 6d0e7b1d56ef..24d50ce2cefd 100644
--- a/sc/source/filter/inc/xiescher.hxx
+++ b/sc/source/filter/inc/xiescher.hxx
@@ -236,7 +236,7 @@ public:
};
/** A group object. */
-class XclImpGroupObj : public XclImpDrawObjBase
+class XclImpGroupObj final : public XclImpDrawObjBase
{
public:
explicit XclImpGroupObj( const XclImpRoot& rRoot );
@@ -244,7 +244,7 @@ public:
/** Tries to insert the drawing object into this or a nested group. */
bool TryInsert( XclImpDrawObjRef const & xDrawObj );
-protected:
+private:
/** Reads the contents of the a BIFF3 OBJ record from the passed stream. */
virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
/** Reads the contents of the a BIFF4 OBJ record from the passed stream. */
@@ -256,18 +256,17 @@ protected:
/** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
-protected:
XclImpDrawObjVector maChildren; /// Grouped objects.
sal_uInt16 mnFirstUngrouped; /// Object identifier of first object not grouped into this group.
};
/** A line object. */
-class XclImpLineObj : public XclImpDrawObjBase
+class XclImpLineObj final : public XclImpDrawObjBase
{
public:
explicit XclImpLineObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Reads the contents of the a BIFF3 OBJ record from the passed stream. */
virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
/** Reads the contents of the a BIFF4 OBJ record from the passed stream. */
@@ -277,7 +276,6 @@ protected:
/** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
-protected:
XclObjLineData maLineData; /// BIFF5 line formatting.
sal_uInt16 mnArrows; /// Line arrows.
sal_uInt8 mnStartPoint; /// Starting point.
@@ -323,12 +321,12 @@ protected:
};
/** An arc object. */
-class XclImpArcObj : public XclImpDrawObjBase
+class XclImpArcObj final : public XclImpDrawObjBase
{
public:
explicit XclImpArcObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Reads the contents of the a BIFF3 OBJ record from the passed stream. */
virtual void DoReadObj3( XclImpStream& rStrm, sal_uInt16 nMacroSize ) override;
/** Reads the contents of the a BIFF4 OBJ record from the passed stream. */
@@ -338,19 +336,18 @@ protected:
/** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
-protected:
XclObjFillData maFillData; /// BIFF5 fill formatting.
XclObjLineData maLineData; /// BIFF5 line formatting.
sal_uInt8 mnQuadrant; /// Visible quadrant of the circle.
};
/** A polygon object. */
-class XclImpPolygonObj : public XclImpRectObj
+class XclImpPolygonObj final : public XclImpRectObj
{
public:
explicit XclImpPolygonObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Reads the COORDLIST record following the OBJ record. */
void ReadCoordList( XclImpStream& rStrm );
@@ -361,7 +358,6 @@ protected:
/** Creates and returns a new SdrObject from the contained data. Caller takes ownership! */
virtual SdrObjectPtr DoCreateSdrObj( XclImpDffConverter& rDffConv, const tools::Rectangle& rAnchorRect ) const override;
-protected:
typedef std::vector< Point > PointVector;
PointVector maCoords; /// Coordinates relative to bounding rectangle.
sal_uInt16 mnPolyFlags; /// Additional flags.
@@ -573,12 +569,12 @@ protected:
};
/** An option button control. */
-class XclImpOptionButtonObj : public XclImpCheckBoxObj
+class XclImpOptionButtonObj final : public XclImpCheckBoxObj
{
public:
explicit XclImpOptionButtonObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Reads the contents of the a BIFF5 OBJ record from the passed stream. */
virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
/** Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream. */
@@ -590,7 +586,6 @@ protected:
/** Returns the type of the macro event to be created. */
virtual XclTbxEventType DoGetEventType() const override;
-protected:
sal_uInt16 mnNextInGroup; /// Next option button in a group.
sal_uInt16 mnFirstInGroup; /// 1 = Button is the first in a group.
};
@@ -611,12 +606,12 @@ protected:
};
/** A groupbox control. */
-class XclImpGroupBoxObj : public XclImpTbxObjBase
+class XclImpGroupBoxObj final : public XclImpTbxObjBase
{
public:
explicit XclImpGroupBoxObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Reads the contents of the a BIFF5 OBJ record from the passed stream. */
virtual void DoReadObj5( XclImpStream& rStrm, sal_uInt16 nNameLen, sal_uInt16 nMacroSize ) override;
/** Reads the contents of the specified subrecord of a BIFF8 OBJ record from stream. */
@@ -628,7 +623,6 @@ protected:
/** Returns the type of the macro event to be created. */
virtual XclTbxEventType DoGetEventType() const override;
-protected:
sal_uInt16 mnGroupBoxFlags;
};
@@ -648,12 +642,12 @@ protected:
};
/** An edit control. */
-class XclImpEditObj : public XclImpTbxObjBase
+class XclImpEditObj final : public XclImpTbxObjBase
{
public:
explicit XclImpEditObj( const XclImpRoot& rRoot );
-protected:
+private:
/** REturns true, if the field type is numeric. */
bool IsNumeric() const;
@@ -668,7 +662,6 @@ protected:
/** Returns the type of the macro event to be created. */
virtual XclTbxEventType DoGetEventType() const override;
-protected:
sal_uInt16 mnContentType;
sal_uInt16 mnMultiLine;
sal_uInt16 mnScrollBar;
@@ -754,12 +747,12 @@ protected:
};
/** A listbox control. */
-class XclImpListBoxObj : public XclImpTbxObjListBase
+class XclImpListBoxObj final : public XclImpTbxObjListBase
{
public:
explicit XclImpListBoxObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Reads listbox settings and selection. */
void ReadFullLbsData( XclImpStream& rStrm, std::size_t nRecLeft );
@@ -774,17 +767,16 @@ protected:
/** Returns the type of the macro event to be created. */
virtual XclTbxEventType DoGetEventType() const override;
-protected:
ScfUInt8Vec maSelection;
};
/** A dropdown listbox control. */
-class XclImpDropDownObj : public XclImpTbxObjListBase
+class XclImpDropDownObj final : public XclImpTbxObjListBase
{
public:
explicit XclImpDropDownObj( const XclImpRoot& rRoot );
-protected:
+private:
/** Returns the type of the dropdown control. */
sal_uInt16 GetDropDownType() const;
@@ -802,7 +794,6 @@ protected:
/** Returns the type of the macro event to be created. */
virtual XclTbxEventType DoGetEventType() const override;
-protected:
sal_uInt16 mnLeft;
sal_uInt16 mnTop;
sal_uInt16 mnRight;
diff --git a/sc/source/ui/inc/AccessibleSpreadsheet.hxx b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
index 984a96afe3de..baf47f016aee 100644
--- a/sc/source/ui/inc/AccessibleSpreadsheet.hxx
+++ b/sc/source/ui/inc/AccessibleSpreadsheet.hxx
@@ -56,17 +56,29 @@ class ScRangeList;
This base class provides an implementation of the
<code>AccessibleTable</code> service.
*/
-class ScAccessibleSpreadsheet
+class ScAccessibleSpreadsheet final
: public ScAccessibleTableBase
{
public:
- //===== internal ========================================================
ScAccessibleSpreadsheet(
ScAccessibleDocument* pAccDoc,
ScTabViewShell* pViewShell,
SCTAB nTab,
ScSplitPos eSplitPos);
-protected:
+
+ using ScAccessibleTableBase::disposing;
+
+ virtual void SAL_CALL disposing() override;
+
+ void CompleteSelectionChanged(bool bNewState);
+
+ void LostFocus();
+ void GotFocus();
+
+ void BoundingBoxChanged();
+ void VisAreaChanged();
+
+private:
ScAccessibleSpreadsheet(
ScAccessibleSpreadsheet& rParent,
const ScRange& rRange );
@@ -81,20 +93,6 @@ protected:
using ScAccessibleTableBase::IsDefunc;
-public:
- using ScAccessibleTableBase::disposing;
-
- virtual void SAL_CALL disposing() override;
-
- void CompleteSelectionChanged(bool bNewState);
-
- void LostFocus();
- void GotFocus();
-
- void BoundingBoxChanged();
- void VisAreaChanged();
-
-private:
///===== SfxListener =====================================================
virtual void Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
@@ -209,13 +207,12 @@ private:
virtual sal_Bool SAL_CALL unselectRow( sal_Int32 row ) override;
virtual sal_Bool SAL_CALL unselectColumn( sal_Int32 column ) override;
-protected:
/// Return the object's current bounding box relative to the desktop.
virtual tools::Rectangle GetBoundingBoxOnScreen() const override;
/// Return the object's current bounding box relative to the parent object.
virtual tools::Rectangle GetBoundingBox() const override;
-private:
+
ScTabViewShell* mpViewShell;
ScRangeList* mpMarkedRanges;
ScAccessibleDocument* mpAccDoc;
diff --git a/sc/source/ui/inc/PivotLayoutTreeListData.hxx b/sc/source/ui/inc/PivotLayoutTreeListData.hxx
index c89d99fefac5..89a96cd7593f 100644
--- a/sc/source/ui/inc/PivotLayoutTreeListData.hxx
+++ b/sc/source/ui/inc/PivotLayoutTreeListData.hxx
@@ -15,11 +15,8 @@
#include <vector>
#include <memory>
-class ScPivotLayoutTreeListData : public ScPivotLayoutTreeListBase
+class ScPivotLayoutTreeListData final : public ScPivotLayoutTreeListBase
{
-private:
- std::vector<std::unique_ptr<ScItemValue> > maDataItemValues;
-
public:
ScPivotLayoutTreeListData(vcl::Window* pParent, WinBits nBits);
virtual ~ScPivotLayoutTreeListData() override;
@@ -28,13 +25,15 @@ public:
void FillDataField(ScPivotFieldVector& rDataFields);
void PushDataFieldNames(std::vector<ScDPName>& rDataFieldNames);
-protected:
+private:
virtual void InsertEntryForSourceTarget(SvTreeListEntry* pSource, SvTreeListEntry* pTarget) override;
virtual void InsertEntryForItem(ScItemValue* pItemValue, sal_uLong nPosition) override;
void AdjustDuplicateCount(ScItemValue* pInputItemValue);
virtual void KeyInput(const KeyEvent& rKeyEvent) override;
+
+ std::vector<std::unique_ptr<ScItemValue> > maDataItemValues;
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
index 410ce5e667ad..9c00bf31e351 100644
--- a/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
+++ b/sc/source/ui/inc/TableFillingAndNavigationTools.hxx
@@ -131,9 +131,8 @@ public:
virtual DataCellIterator iterateCells() = 0;
};
-class DataRangeByColumnIterator : public DataRangeIterator
+class DataRangeByColumnIterator final : public DataRangeIterator
{
-protected:
SCCOL mCol;
public:
@@ -147,9 +146,8 @@ public:
virtual DataCellIterator iterateCells() override;
};
-class DataRangeByRowIterator : public DataRangeIterator
+class DataRangeByRowIterator final : public DataRangeIterator
{
-protected:
SCROW mRow;
public:
diff --git a/sc/source/ui/inc/acredlin.hxx b/sc/source/ui/inc/acredlin.hxx
index f5a20ff95453..8c5b79d550a2 100644
--- a/sc/source/ui/inc/acredlin.hxx
+++ b/sc/source/ui/inc/acredlin.hxx
@@ -52,9 +52,8 @@ public:
bool bIsAcceptable;
};
-class ScAcceptChgDlg : public SfxModelessDialog
+class ScAcceptChgDlg final : public SfxModelessDialog
{
-private:
Idle aSelectionIdle;
Idle aReOpenIdle;
VclPtr<PopupMenu> m_xPopup;
@@ -108,8 +107,6 @@ private:
DECL_LINK( ReOpenTimerHdl, Timer*, void );
DECL_LINK( ColCompareHdl, const SvSortData*, sal_Int32 );
-protected:
-
void RejectFiltered();
void AcceptFiltered();
diff --git a/sc/source/ui/inc/cbutton.hxx b/sc/source/ui/inc/cbutton.hxx
index ece8f4a58ba9..a519655283c8 100644
--- a/sc/source/ui/inc/cbutton.hxx
+++ b/sc/source/ui/inc/cbutton.hxx
@@ -26,7 +26,7 @@
class OutputDevice;
-class ScDDComboBoxButton
+class ScDDComboBoxButton final
{
public:
ScDDComboBoxButton( OutputDevice* pOutputDevice );
@@ -50,7 +50,6 @@ public:
private:
void ImpDrawArrow( const tools::Rectangle& rRect );
-protected:
VclPtr<OutputDevice> pOut;
Point aBtnPos;
Size aBtnSize;
diff --git a/sc/source/ui/inc/drawview.hxx b/sc/source/ui/inc/drawview.hxx
index ab5c6a17e661..1479f0c7e042 100644
--- a/sc/source/ui/inc/drawview.hxx
+++ b/sc/source/ui/inc/drawview.hxx
@@ -31,7 +31,7 @@ class ScViewData;
class ScDrawObjData;
class SdrUndoManager;
-class ScDrawView: public FmFormView
+class ScDrawView final : public FmFormView
{
ScViewData* pViewData;
VclPtr<OutputDevice> pDev; //! needed ?
@@ -45,7 +45,6 @@ class ScDrawView: public FmFormView
void Construct();
-protected:
virtual void ModelHasChanged() override;
// add custom handles (used by other apps, e.g. AnchorPos)
diff --git a/sc/source/ui/inc/formula.hxx b/sc/source/ui/inc/formula.hxx
index 0148b177fada..d90940b7a75c 100644
--- a/sc/source/ui/inc/formula.hxx
+++ b/sc/source/ui/inc/formula.hxx
@@ -40,7 +40,7 @@ class ScInputHandler;
class ScDocShell;
class ScFormulaCell;
-class ScFormulaDlg : public formula::FormulaDlg,
+class ScFormulaDlg final : public formula::FormulaDlg,
public IAnyRefDialog
{
ScFormulaReferenceHelper m_aHelper;
@@ -100,8 +100,8 @@ public:
virtual void AddRefEntry() override;
virtual void SetActive() override;
virtual void ViewShellChanged() override;
-protected:
+private:
virtual void RefInputStart( formula::RefEdit* pEdit, formula::RefButton* pButton = nullptr ) override;
static void SaveLRUEntry(const ScFuncDesc* pFuncDesc);
diff --git a/sc/source/ui/inc/fuconuno.hxx b/sc/source/ui/inc/fuconuno.hxx
index e6a9921c69a3..57820a8d09d1 100644
--- a/sc/source/ui/inc/fuconuno.hxx
+++ b/sc/source/ui/inc/fuconuno.hxx
@@ -25,9 +25,8 @@
enum class SdrInventor : sal_uInt32;
/** Draw Control */
-class FuConstUnoControl : public FuConstruct
+class FuConstUnoControl final : public FuConstruct
{
-protected:
SdrInventor nInventor;
sal_uInt16 nIdentifier;
diff --git a/sc/source/ui/inc/inputwin.hxx b/sc/source/ui/inc/inputwin.hxx
index 06ea56ef600c..4eb44bd269b0 100644
--- a/sc/source/ui/inc/inputwin.hxx
+++ b/sc/source/ui/inc/inputwin.hxx
@@ -221,7 +221,7 @@ private:
DECL_LINK( Impl_ScrollHdl, ScrollBar*, void );
};
-class ScInputWindow : public ToolBox // Parent toolbox
+class ScInputWindow final : public ToolBox // Parent toolbox
{
public:
ScInputWindow( vcl::Window* pParent, const SfxBindings* pBind );
@@ -266,10 +266,9 @@ public:
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseMove( const MouseEvent& rMEvt ) override;
-protected:
+private:
bool IsPointerAtResizePos();
-private:
VclPtr<ScPosWnd> aWndPos;
VclPtr<ScTextWndBase> pRuntimeWindow;
ScTextWndBase& aTextWindow;
diff --git a/sc/source/ui/inc/namecrea.hxx b/sc/source/ui/inc/namecrea.hxx
index dc9a23ba9bca..0a530b2cb7ec 100644
--- a/sc/source/ui/inc/namecrea.hxx
+++ b/sc/source/ui/inc/namecrea.hxx
@@ -25,9 +25,8 @@
#include <vcl/fixed.hxx>
#include "scui_def.hxx"
-class ScNameCreateDlg : public ModalDialog
+class ScNameCreateDlg final : public ModalDialog
{
-protected:
VclPtr<CheckBox> m_pTopBox;
VclPtr<CheckBox> m_pLeftBox;
VclPtr<CheckBox> m_pBottomBox;
diff --git a/sc/source/ui/inc/redcom.hxx b/sc/source/ui/inc/redcom.hxx
index 8c77f2d8c9ef..f6ed3400fc0c 100644
--- a/sc/source/ui/inc/redcom.hxx
+++ b/sc/source/ui/inc/redcom.hxx
@@ -25,10 +25,8 @@
class ScDocShell;
class AbstractSvxPostItDialog;
-class ScRedComDialog
+class ScRedComDialog final
{
-private:
-
ScChangeAction *pChangeAction;
ScDocShell *pDocShell;
OUString aComment;
@@ -37,8 +35,6 @@ private:
DECL_LINK( PrevHdl, AbstractSvxPostItDialog&, void );
DECL_LINK( NextHdl, AbstractSvxPostItDialog&, void );
-protected:
-
void ReInit(ScChangeAction *);
void SelectCell();
diff --git a/sc/source/ui/inc/tphfedit.hxx b/sc/source/ui/inc/tphfedit.hxx
index 43ec85414574..3d1f9d20c09c 100644
--- a/sc/source/ui/inc/tphfedit.hxx
+++ b/sc/source/ui/inc/tphfedit.hxx
@@ -97,10 +97,8 @@ private:
std::function<void (ScEditWindow&)> m_GetFocusLink;
};
-class SC_DLLPUBLIC ScExtIButton : public ImageButton
+class SC_DLLPUBLIC ScExtIButton final : public ImageButton
{
-private:
-
Idle aIdle;
VclPtr<PopupMenu> pPopupMenu;
Link<ScExtIButton&,void> aMLink;
@@ -109,8 +107,6 @@ private:
DECL_DLLPRIVATE_LINK( TimerHdl, Timer*, void );
-protected:
-
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt) override;
virtual void Click() override;
diff --git a/sc/source/ui/inc/tpsubt.hxx b/sc/source/ui/inc/tpsubt.hxx
index 97ffd168bc30..0b01d8e4c52e 100644
--- a/sc/source/ui/inc/tpsubt.hxx
+++ b/sc/source/ui/inc/tpsubt.hxx
@@ -76,10 +76,9 @@ private:
void SelectHdl(const void *);
};
-class ScTpSubTotalGroup1 : public ScTpSubTotalGroup
+class ScTpSubTotalGroup1 final : public ScTpSubTotalGroup
{
friend class VclPtr<ScTpSubTotalGroup1>;
-protected:
ScTpSubTotalGroup1( vcl::Window* pParent,
const SfxItemSet& rArgSet );
@@ -92,10 +91,9 @@ public:
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
-class ScTpSubTotalGroup2 : public ScTpSubTotalGroup
+class ScTpSubTotalGroup2 final : public ScTpSubTotalGroup
{
friend class VclPtr<ScTpSubTotalGroup2>;
-protected:
ScTpSubTotalGroup2( vcl::Window* pParent,
const SfxItemSet& rArgSet );
@@ -108,10 +106,9 @@ public:
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
-class ScTpSubTotalGroup3 : public ScTpSubTotalGroup
+class ScTpSubTotalGroup3 final : public ScTpSubTotalGroup
{
friend class VclPtr<ScTpSubTotalGroup3>;
-protected:
ScTpSubTotalGroup3( vcl::Window* pParent,
const SfxItemSet& rArgSet );
@@ -124,13 +121,8 @@ public:
virtual void Reset ( const SfxItemSet* rArgSet ) override;
};
-class ScTpSubTotalOptions : public SfxTabPage
+class ScTpSubTotalOptions final : public SfxTabPage
{
- friend class VclPtr<ScTpSubTotalOptions>;
-protected:
- ScTpSubTotalOptions( vcl::Window* pParent,
- const SfxItemSet& rArgSet );
-
public:
virtual ~ScTpSubTotalOptions() override;
virtual void dispose() override;
@@ -140,6 +132,16 @@ public:
virtual void Reset ( const SfxItemSet* rArgSet ) override;
private:
+ friend class VclPtr<ScTpSubTotalOptions>;
+ ScTpSubTotalOptions( vcl::Window* pParent,
+ const SfxItemSet& rArgSet );
+
+ void Init ();
+ void FillUserSortListBox ();
+
+ // Handler ------------------------
+ DECL_LINK( CheckHdl, Button*, void );
+
VclPtr<CheckBox> pBtnPagebreak;
VclPtr<CheckBox> pBtnCase;
VclPtr<CheckBox> pBtnSort;
@@ -149,18 +151,10 @@ private:
VclPtr<CheckBox> pBtnFormats;
VclPtr<CheckBox> pBtnUserDef;
VclPtr<ListBox> pLbUserDef;
-
ScViewData* pViewData;
ScDocument* pDoc;
- const sal_uInt16 nWhichSubTotals;
+ const sal_uInt16 nWhichSubTotals;
const ScSubTotalParam& rSubTotalData;
-
-private:
- void Init ();
- void FillUserSortListBox ();
-
- // Handler ------------------------
- DECL_LINK( CheckHdl, Button*, void );
};
#endif // INCLUDED_SC_SOURCE_UI_INC_TPSUBT_HXX
diff --git a/sc/source/ui/vba/vbafiledialogitems.hxx b/sc/source/ui/vba/vbafiledialogitems.hxx
index 3a789f886eb5..c78d8d1ffe83 100644
--- a/sc/source/ui/vba/vbafiledialogitems.hxx
+++ b/sc/source/ui/vba/vbafiledialogitems.hxx
@@ -16,9 +16,8 @@
typedef CollTestImplHelper< ov::excel::XFileDialogSelectedItems > FileDialogSelectedItems_BASE;
-class ScVbaFileDialogSelectedItems : public FileDialogSelectedItems_BASE
+class ScVbaFileDialogSelectedItems final : public FileDialogSelectedItems_BASE
{
-protected:
const std::vector<OUString> m_sItems;
public:
ScVbaFileDialogSelectedItems( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext, const std::vector<OUString>& sItems);
diff --git a/sc/source/ui/vba/vbaformatcondition.hxx b/sc/source/ui/vba/vbaformatcondition.hxx
index 11951f575212..8ffb1f700b96 100644
--- a/sc/source/ui/vba/vbaformatcondition.hxx
+++ b/sc/source/ui/vba/vbaformatcondition.hxx
@@ -28,15 +28,15 @@
#include "vbacondition.hxx"
typedef ScVbaCondition< ov::excel::XFormatCondition > ScVbaFormatCondition_BASE;
-class ScVbaFormatCondition : public ScVbaFormatCondition_BASE
+class ScVbaFormatCondition final : public ScVbaFormatCondition_BASE
{
-protected:
OUString msStyleName;
css::uno::Reference< css::sheet::XSheetConditionalEntry > mxSheetConditionalEntry;
css::uno::Reference< css::sheet::XSheetConditionalEntries > mxSheetConditionalEntries;
css::uno::Reference< ov::excel::XFormatConditions> moFormatConditions;
css::uno::Reference< ov::excel::XStyle > mxStyle;
css::uno::Reference< css::beans::XPropertySet > mxParentRangePropertySet;
+
public:
/// @throws css::uno::RuntimeException
/// @throws css::script::BasicErrorException
diff --git a/sc/source/ui/vba/vbainterior.hxx b/sc/source/ui/vba/vbainterior.hxx
index 3dd642fd146d..4d253d7c0e87 100644
--- a/sc/source/ui/vba/vbainterior.hxx
+++ b/sc/source/ui/vba/vbainterior.hxx
@@ -33,19 +33,18 @@ class ScDocument;
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XInterior > ScVbaInterior_BASE;
-class ScVbaInterior : public ScVbaInterior_BASE
+class ScVbaInterior final : public ScVbaInterior_BASE
{
css::uno::Reference< css::beans::XPropertySet > m_xProps;
ScDocument* m_pScDoc;
Color m_aPattColor;
sal_Int32 m_nPattern;
- css::uno::Reference< css::container::XIndexAccess > getPalette();
+ css::uno::Reference< css::container::XIndexAccess > getPalette();
css::uno::Reference< css::container::XNameContainer > GetAttributeContainer();
static css::uno::Any SetAttributeData( sal_Int32 nValue );
static sal_Int32 GetAttributeData( css::uno::Any const & aValue );
Color GetBackColor();
-protected:
static Color GetPatternColor( const Color& rPattColor, const Color& rBackColor, sal_uInt32 nXclPattern );
static Color GetMixedColor( const Color& rFore, const Color& rBack, sal_uInt8 nTrans );
static sal_uInt8 GetMixedColorComp( sal_uInt8 nFore, sal_uInt8 nBack, sal_uInt8 nTrans );
@@ -54,6 +53,7 @@ protected:
css::uno::Any GetUserDefinedAttributes( const OUString& sName );
void SetUserDefinedAttributes( const OUString& sName, const css::uno::Any& aValue );
void SetMixedColor();
+
public:
/// @throws css::lang::IllegalArgumentException
ScVbaInterior( const css::uno::Reference< ov::XHelperInterface >& xParent, const css::uno::Reference< css::uno::XComponentContext >& xContext,
diff --git a/sc/source/ui/vba/vbanames.hxx b/sc/source/ui/vba/vbanames.hxx
index bf8be0ca29e5..c44f00a5b3c2 100644
--- a/sc/source/ui/vba/vbanames.hxx
+++ b/sc/source/ui/vba/vbanames.hxx
@@ -30,12 +30,11 @@ class ScDocShell;
typedef CollTestImplHelper< ov::excel::XNames > ScVbaNames_BASE;
-class ScVbaNames : public ScVbaNames_BASE
+class ScVbaNames final : public ScVbaNames_BASE
{
css::uno::Reference< css::frame::XModel > mxModel;
css::uno::Reference< css::sheet::XNamedRanges > mxNames;
-protected:
const css::uno::Reference< css::frame::XModel >& getModel() { return mxModel; }
public:
diff --git a/sc/source/ui/vba/vbaoleobject.hxx b/sc/source/ui/vba/vbaoleobject.hxx
index f3dc86c8f1c8..1b1b49bd041c 100644
--- a/sc/source/ui/vba/vbaoleobject.hxx
+++ b/sc/source/ui/vba/vbaoleobject.hxx
@@ -27,9 +27,8 @@
typedef InheritedHelperInterfaceWeakImpl< ov::excel::XOLEObject > OLEObjectImpl_BASE;
-class ScVbaOLEObject : public OLEObjectImpl_BASE
+class ScVbaOLEObject final : public OLEObjectImpl_BASE
{
-protected:
virtual OUString getServiceImplName() override;
virtual css::uno::Sequence<OUString> getServiceNames() override;
css::uno::Reference< ov::msforms::XControl> m_xControl;
diff --git a/sc/source/ui/vba/vbapane.hxx b/sc/source/ui/vba/vbapane.hxx
index 5c3589223219..03f4a6ef5a55 100644
--- a/sc/source/ui/vba/vbapane.hxx
+++ b/sc/source/ui/vba/vbapane.hxx
@@ -25,7 +25,7 @@
#include <vbahelper/vbahelperinterface.hxx>
#include "excelvbahelper.hxx"
-class ScVbaPane : public cppu::WeakImplHelper< ov::excel::XPane >
+class ScVbaPane final : public cppu::WeakImplHelper< ov::excel::XPane >
{
public:
/// @throws css::uno::RuntimeException
@@ -46,11 +46,9 @@ public:
virtual void SAL_CALL SmallScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) override;
virtual void SAL_CALL LargeScroll( const css::uno::Any& Down, const css::uno::Any& Up, const css::uno::Any& ToRight, const css::uno::Any& ToLeft ) override;
-protected:
+private:
css::uno::Reference< css::frame::XModel > m_xModel;
css::uno::Reference< css::sheet::XViewPane > m_xViewPane;
-
-private:
css::uno::WeakReference< ov::XHelperInterface > m_xParent;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
};
diff --git a/sc/source/ui/vba/vbastyle.hxx b/sc/source/ui/vba/vbastyle.hxx
index c21a55f6638d..b8cb5b6a65c2 100644
--- a/sc/source/ui/vba/vbastyle.hxx
+++ b/sc/source/ui/vba/vbastyle.hxx
@@ -28,9 +28,8 @@
typedef ScVbaFormat< ov::excel::XStyle > ScVbaStyle_BASE;
-class ScVbaStyle : public ScVbaStyle_BASE
+class ScVbaStyle final : public ScVbaStyle_BASE
{
-protected:
css::uno::Reference< css::style::XStyle > mxStyle;
css::uno::Reference< css::container::XNameContainer > mxStyleFamilyNameContainer;
/// @throws css::uno::RuntimeException