Mark some classes as final

...namely exactly those for which fa91dd31f3
"5th step to remove tools/rtti.hxx" (which is assumed the culprit in tdf#96067
"Crash on undo row inserts") had replaced exact-type checks of the form

  v->Type() == TYPE(X)

with type-or-subtype-of checks of the form

  dynamic_cast<X *>(v) != nullptr

which is only sound if X is a final class.  (Except for one case already handled
differently in 791ad3e170 "Stick to exact-type
check.")

Change-Id: Ia822c55c7c0e982d42c6a97589307e577721e324
This commit is contained in:
Stephan Bergmann
2016-01-12 14:44:42 +01:00
parent 791ad3e170
commit 548c43238d
3 changed files with 11 additions and 11 deletions

View File

@@ -177,7 +177,7 @@ public:
virtual MetaAction* createBeginComment() const override;
};
class EDITENG_DLLPUBLIC SvxPageField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxPageField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxPageField, SvxFieldData, css::text::textfield::Type::PAGE )
@@ -189,7 +189,7 @@ public:
virtual MetaAction* createBeginComment() const override;
};
class EDITENG_DLLPUBLIC SvxPageTitleField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxPageTitleField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxPageTitleField, SvxFieldData, css::text::textfield::Type::PAGE_NAME )
@@ -201,7 +201,7 @@ public:
virtual MetaAction* createBeginComment() const override;
};
class EDITENG_DLLPUBLIC SvxPagesField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxPagesField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxPagesField, SvxFieldData, css::text::textfield::Type::PAGES )
@@ -211,7 +211,7 @@ public:
virtual bool operator==( const SvxFieldData& ) const override;
};
class EDITENG_DLLPUBLIC SvxTimeField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxTimeField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxTimeField, SvxFieldData, css::text::textfield::Type::TIME )
@@ -223,7 +223,7 @@ public:
virtual MetaAction* createBeginComment() const override;
};
class EDITENG_DLLPUBLIC SvxFileField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxFileField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxFileField, SvxFieldData, css::text::textfield::Type::DOCINFO_TITLE )
@@ -233,7 +233,7 @@ public:
virtual bool operator==( const SvxFieldData& ) const override;
};
class EDITENG_DLLPUBLIC SvxTableField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxTableField final: public SvxFieldData
{
int mnTab;
public:
@@ -378,7 +378,7 @@ public:
/** this field is used as a placeholder for a header&footer in impress. The actual
value is stored at the page */
class EDITENG_DLLPUBLIC SvxHeaderField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxHeaderField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxHeaderField, SvxFieldData, css::text::textfield::Type::PRESENTATION_HEADER )
@@ -390,7 +390,7 @@ public:
/** this field is used as a placeholder for a header&footer in impress. The actual
value is stored at the page */
class EDITENG_DLLPUBLIC SvxFooterField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxFooterField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxFooterField, SvxFieldData, css::text::textfield::Type::PRESENTATION_FOOTER )
@@ -401,7 +401,7 @@ public:
/** this field is used as a placeholder for a header&footer in impress. The actual
value is stored at the page */
class EDITENG_DLLPUBLIC SvxDateTimeField : public SvxFieldData
class EDITENG_DLLPUBLIC SvxDateTimeField final: public SvxFieldData
{
public:
SV_DECL_PERSIST1( SvxDateTimeField, SvxFieldData, css::text::textfield::Type::PRESENTATION_DATE_TIME )

View File

@@ -247,7 +247,7 @@ inline bool IsInvalidItem(const SfxPoolItem *pItem)
return pItem == reinterpret_cast<SfxPoolItem *>(-1);
}
class SVL_DLLPUBLIC SfxVoidItem: public SfxPoolItem
class SVL_DLLPUBLIC SfxVoidItem final: public SfxPoolItem
{
SfxVoidItem & operator=( const SfxVoidItem& ) = delete;
public:

View File

@@ -80,7 +80,7 @@ typedef std::unordered_map< sal_uLong, sal_uLong > ScChangeActionMergeMap;
#define SC_PF_TESTMERGE 2
#define SC_PF_WHOLEROWS 4
class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
class SC_DLLPUBLIC ScDocShell final: public SfxObjectShell, public SfxListener
{
ScDocument aDocument;