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

loplugin:unnecessaryvirtual in comphelper..forms

Change-Id: Iabe292e68cb84b97f207061347ed6a30309dc9fd
Reviewed-on: https://gerrit.libreoffice.org/30679Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 62e5010e
......@@ -208,7 +208,7 @@ namespace comphelper
};
class MapEnumerator
class MapEnumerator final
{
public:
MapEnumerator( ::cppu::OWeakObject& _rParent, MapData& _mapData, const EnumerationType _type )
......@@ -221,7 +221,7 @@ namespace comphelper
lcl_registerMapModificationListener( m_rMapData, *this );
}
virtual ~MapEnumerator()
~MapEnumerator()
{
dispose();
}
......
......@@ -31,11 +31,11 @@ using namespace ::com::sun::star::lang;
namespace comphelper
{
class PropertyMapImpl
class PropertyMapImpl final
{
public:
PropertyMapImpl() throw();
virtual ~PropertyMapImpl() throw();
~PropertyMapImpl() throw();
void add(PropertyMapEntry const * pMap) throw();
void remove( const OUString& aName ) throw();
......
......@@ -159,7 +159,7 @@ namespace connectivity
void setValue( const OString &key, const OUString & rValue);
};
class MQueryHelper
class MQueryHelper final
{
private:
typedef std::vector< MQueryHelperResultEntry* > resultsArray;
......@@ -174,7 +174,7 @@ namespace connectivity
public:
explicit MQueryHelper(const OColumnAlias& _ca);
virtual ~MQueryHelper();
~MQueryHelper();
void reset();
MQueryHelperResultEntry* getByIndex( sal_uInt32 nRow );
......
......@@ -65,11 +65,10 @@ namespace connectivity
};
//Used to query profiles information
class ProfileAccess
class ProfileAccess final
{
public:
virtual ~ProfileAccess();
~ProfileAccess();
ProfileAccess();
OUString getProfilePath( css::mozilla::MozillaProductType product, const OUString& profileName ) throw (css::uno::RuntimeException);
::sal_Int32 getProfileCount( css::mozilla::MozillaProductType product ) throw (css::uno::RuntimeException);
......
......@@ -31,7 +31,7 @@ namespace connectivity
// IndexIterator
class OIndexIterator
class OIndexIterator final
{
protected:
file::OBoolOperator* m_pOperator;
......@@ -60,7 +60,7 @@ namespace connectivity
{
}
virtual ~OIndexIterator();
~OIndexIterator();
sal_uInt32 First();
sal_uInt32 Next();
......
......@@ -28,7 +28,7 @@ namespace connectivity
namespace file
{
class OConnection;
class OOO_DLLPUBLIC_FILE OSQLAnalyzer
class OOO_DLLPUBLIC_FILE OSQLAnalyzer final
{
typedef ::std::list<OEvaluateSet*> OEvaluateSetList;
typedef ::std::pair< ::rtl::Reference<OPredicateCompiler>,::rtl::Reference<OPredicateInterpreter> > TPredicates;
......@@ -45,7 +45,7 @@ namespace connectivity
public:
OSQLAnalyzer(OConnection* _pConnection);
virtual ~OSQLAnalyzer();
~OSQLAnalyzer();
inline static void * SAL_CALL operator new( size_t nSize )
{ return ::rtl_allocateMemory( nSize ); }
inline static void * SAL_CALL operator new( size_t /*nSize*/,void* _pHint )
......
......@@ -109,7 +109,7 @@ public:
}
};
class SFEntry
class SFEntry final
{
private:
sal_uInt8 nType;
......@@ -121,7 +121,7 @@ public:
const css::uno::Reference< css::script::browse::XBrowseNode >& entryNodes ,
const css::uno::Reference< css::frame::XModel >& entryModel) { nType = nT; nodes = entryNodes; loaded=false; model = entryModel; }
SFEntry( const SFEntry& r ) { nType = r.nType; nodes = r.nodes; loaded = r.loaded; }
virtual ~SFEntry() {}
~SFEntry() {}
const css::uno::Reference< css::script::browse::XBrowseNode >& GetNode() { return nodes ;}
const css::uno::Reference< css::frame::XModel >& GetModel() { return model ;};
bool isLoaded() const { return loaded; }
......
......@@ -36,7 +36,7 @@ namespace dbaui
the class OConnectionLine represents the graphical line between the to two windows
**/
class OTableConnection;
class OConnectionLine
class OConnectionLine final
{
VclPtr<OTableConnection> m_pTabConn;
OConnectionLineDataRef m_pData;
......@@ -48,7 +48,7 @@ namespace dbaui
public:
OConnectionLine( OTableConnection* pConn, OConnectionLineDataRef const & pLineData );
OConnectionLine( const OConnectionLine& rLine );
virtual ~OConnectionLine();
~OConnectionLine();
OConnectionLine& operator=( const OConnectionLine& rLine );
......
......@@ -34,14 +34,14 @@ namespace dbaui
class OQueryContainerWindow;
class OQueryController;
class OQueryViewSwitch
class OQueryViewSwitch final
{
VclPtr<OQueryDesignView> m_pDesignView;
VclPtr<OQueryTextView> m_pTextView;
bool m_bAddTableDialogWasVisible; // true if so
public:
OQueryViewSwitch(OQueryContainerWindow* pParent, OQueryController& _rController,const css::uno::Reference< css::uno::XComponentContext >& );
virtual ~OQueryViewSwitch();
~OQueryViewSwitch();
bool isCutAllowed();
bool isPasteAllowed();
......
......@@ -30,23 +30,21 @@ namespace dbaui
class IRelationControlInterface;
class ORelationControl;
class OTableListBoxControl
class OTableListBoxControl final
{
VclPtr<ListBox> m_pLeftTable;
VclPtr<ListBox> m_pRightTable;
VclPtr<ORelationControl> m_pRC_Tables;
const OJoinTableView::OTableWindowMap* m_pTableMap;
IRelationControlInterface* m_pParentDialog;
OUString m_strCurrentLeft;
OUString m_strCurrentRight;
private:
DECL_LINK( OnTableChanged, ListBox&, void );
public:
OTableListBoxControl(VclBuilderContainer* _pParent,
const OJoinTableView::OTableWindowMap* _pTableMap,
IRelationControlInterface* _pParentDialog);
virtual ~OTableListBoxControl();
~OTableListBoxControl();
/** fillListBoxes fills the list boxes with the table windows
*/
......
......@@ -113,12 +113,12 @@ namespace dbaui
bool m_bCannotSelectUnfiltered : 1; // received an DATA_CANNOT_SELECT_UNFILTERED error
protected:
class FormErrorHelper
class FormErrorHelper final
{
SbaXDataBrowserController* m_pOwner;
public:
FormErrorHelper(SbaXDataBrowserController* pOwner) : m_pOwner(pOwner) { m_pOwner->enterFormAction(); }
virtual ~FormErrorHelper() { m_pOwner->leaveFormAction(); }
~FormErrorHelper() { m_pOwner->leaveFormAction(); }
};
friend class FormErrorHelper;
......
......@@ -36,11 +36,12 @@ class CommandLineArgs
struct Supplier
{
// Thrown from constructors and next:
class Exception {
class Exception final
{
public:
Exception();
Exception(Exception const &);
virtual ~Exception();
~Exception();
Exception & operator =(Exception const &);
};
......
......@@ -29,12 +29,8 @@
namespace dp_manager {
/**
*/
class ExtensionProperties
class ExtensionProperties final
{
protected:
OUString m_propFileUrl;
const css::uno::Reference<css::ucb::XCommandEnvironment> m_xCmdEnv;
const css::uno::Reference<css::uno::XComponentContext> m_xContext;
......@@ -44,7 +40,7 @@ protected:
static OUString getPropertyValue(css::beans::NamedValue const & v);
public:
virtual ~ExtensionProperties() {};
~ExtensionProperties() {};
ExtensionProperties(OUString const & urlExtension,
css::uno::Reference<css::ucb::XCommandEnvironment> const & xCmdEnv,
css::uno::Reference<css::uno::XComponentContext> const & xContext);
......
......@@ -16,7 +16,7 @@ using namespace std;
/* TrieNode */
struct TrieNode
struct TrieNode final
{
static const int LATIN_ARRAY_SIZE = 26;
......@@ -27,7 +27,7 @@ struct TrieNode
explicit TrieNode(sal_Unicode aCharacter = '\0');
virtual ~TrieNode();
~TrieNode();
void markWord();
TrieNode* findChild(sal_Unicode aCharacter);
......
......@@ -146,7 +146,7 @@ class SVGExport;
class SVGFontExport;
class SVGAttributeWriter
class SVGAttributeWriter final
{
private:
......@@ -161,7 +161,7 @@ private:
public:
SVGAttributeWriter( SVGExport& rExport, SVGFontExport& rFontExport, SVGState& rCurState );
virtual ~SVGAttributeWriter();
~SVGAttributeWriter();
void AddColorAttr( const char* pColorAttrName, const char* pColorOpacityAttrName, const Color& rColor );
void AddGradientDef( const Rectangle& rObjRect,const Gradient& rGradient, OUString& rGradientId );
......@@ -214,7 +214,7 @@ struct BulletListItemInfo
};
class SVGTextWriter
class SVGTextWriter final
{
public:
typedef std::unordered_map< OUString, BulletListItemInfo, OUStringHash > BulletListItemInfoMap;
......@@ -255,7 +255,7 @@ class SVGTextWriter
public:
explicit SVGTextWriter( SVGExport& rExport, SVGAttributeWriter& rAttributeWriter );
virtual ~SVGTextWriter();
~SVGTextWriter();
sal_Int32 setTextPosition( const GDIMetaFile& rMtf, sal_uLong& nCurAction );
void setTextProperties( const GDIMetaFile& rMtf, sal_uLong nCurAction );
......@@ -312,7 +312,7 @@ class SVGTextWriter
};
class SVGActionWriter
class SVGActionWriter final
{
private:
......@@ -377,7 +377,7 @@ public:
public:
SVGActionWriter( SVGExport& rExport, SVGFontExport& rFontExport );
virtual ~SVGActionWriter();
~SVGActionWriter();
void WriteMetaFile( const Point& rPos100thmm,
const Size& rSize100thmm,
......
......@@ -130,7 +130,7 @@ public:
const OGroupComp& GetGroupComponent() const { return m_aGroupComp; }
};
class OGroup
class OGroup final
{
OGroupCompArr m_aCompArray;
std::vector<OGroupCompAcc> m_aCompAccArray;
......@@ -142,7 +142,7 @@ class OGroup
public:
explicit OGroup(const OUString& rGroupName);
virtual ~OGroup();
~OGroup();
const OUString& GetGroupName() const { return m_aGroupName; }
css::uno::Sequence< css::uno::Reference< css::awt::XControlModel> > GetControlModels() const;
......
......@@ -85,16 +85,6 @@ protected:
the additional parameters of the OPropertyArrayAggregationHelper.
*/
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
/** the return value is used for the construction of the OPropertyArrayAggregationHelper.
Beware of the lifetime of the returned object, as it has to exist 'til the last instance
of this class dies.
*/
virtual IPropertyInfoService* getInfoService() const { return nullptr; }
/** the return value is used for the construction of the OPropertyArrayAggregationHelper.
*/
virtual sal_Int32 getFirstAggregateId() const { return DEFAULT_AGGREGATE_PROPERTY_ID; }
};
template<class TYPE>
......@@ -145,7 +135,7 @@ template <class TYPE> inline
css::uno::Sequence< css::beans::Property > aAggregateProps;
fillProperties(aProps, aAggregateProps);
OSL_ENSURE(aProps.getLength(), "OAggregationArrayUsageHelper::createArrayHelper : fillProperties returned nonsense !");
return new OPropertyArrayAggregationHelper(aProps, aAggregateProps, getInfoService(), getFirstAggregateId());
return new OPropertyArrayAggregationHelper(aProps, aAggregateProps, nullptr, DEFAULT_AGGREGATE_PROPERTY_ID);
}
}
......
......@@ -36,7 +36,7 @@ public:
};
/// A very basic thread pool implementation
class COMPHELPER_DLLPUBLIC ThreadPool
class COMPHELPER_DLLPUBLIC ThreadPool final
{
public:
/// returns a pointer to a shared pool with optimal thread
......@@ -54,7 +54,7 @@ public:
static sal_Int32 getPreferredConcurrency();
ThreadPool( sal_Int32 nWorkers );
virtual ~ThreadPool();
~ThreadPool();
/// push a new task onto the work queue
void pushTask( ThreadTask *pTask /* takes ownership */ );
......
......@@ -38,7 +38,7 @@ namespace dbtools
/** a class which helps retrieving and setting the value of a database column
as formatted string.
*/
class OOO_DLLPUBLIC_DBTOOLS FormattedColumnValue
class OOO_DLLPUBLIC_DBTOOLS FormattedColumnValue final
{
public:
/** constructs an instance
......@@ -74,7 +74,7 @@ namespace dbtools
// note that all methods of this class need to be virtual, since it's
// used in a load-on-demand context in module SVX
virtual ~FormattedColumnValue();
~FormattedColumnValue();
void clear();
......
......@@ -36,11 +36,9 @@ namespace dbaui
event while another thread tries to delete this event in the _destructor_ of the
class).
*/
class OAsynchronousLink
class OAsynchronousLink final
{
Link<void*,void> m_aHandler;
protected:
::osl::Mutex m_aEventSafety;
::osl::Mutex m_aDestructionSafety;
ImplSVEvent * m_nEventId;
......@@ -50,7 +48,7 @@ namespace dbaui
@param _rHandler The link to be called asynchronously
*/
OAsynchronousLink( const Link<void*,void>& _rHandler );
virtual ~OAsynchronousLink();
~OAsynchronousLink();
bool IsRunning() const { return m_nEventId != nullptr; }
......
......@@ -21,14 +21,14 @@ namespace editeng
struct TrieNode;
class EDITENG_DLLPUBLIC Trie
class EDITENG_DLLPUBLIC Trie final
{
private:
std::unique_ptr<TrieNode> mRoot;
public:
Trie();
virtual ~Trie();
~Trie();
void insert(const OUString& sInputString) const;
void findSuggestions(const OUString& sWordPart, std::vector<OUString>& rSuggestionList) const;
......
......@@ -60,7 +60,7 @@ public:
/*--------------------------------------------------------------------
Description: Configuration for Auto Correction
--------------------------------------------------------------------*/
class EDITENG_DLLPUBLIC SvxAutoCorrCfg
class EDITENG_DLLPUBLIC SvxAutoCorrCfg final
{
friend class SvxBaseAutoCorrCfg;
friend class SvxSwAutoCorrCfg;
......@@ -111,7 +111,7 @@ public:
bool IsSearchInAllCategories() const { return bSearchInAllCategories;}
SvxAutoCorrCfg();
virtual ~SvxAutoCorrCfg();
~SvxAutoCorrCfg();
static SvxAutoCorrCfg& Get();
};
......
......@@ -79,7 +79,7 @@ enum class ScrollRangeCheck
};
class EDITENG_DLLPUBLIC EditView
class EDITENG_DLLPUBLIC EditView final
{
friend class EditEngine;
friend class ImpEditEngine;
......@@ -101,7 +101,7 @@ private:
public:
EditView( EditEngine* pEng, vcl::Window* pWindow );
virtual ~EditView();
~EditView();
void SetEditEngine( EditEngine* pEditEngine );
EditEngine* GetEditEngine() const;
......
......@@ -235,7 +235,7 @@ enum class SvxNumRuleType
END
};
class EDITENG_DLLPUBLIC SvxNumRule
class EDITENG_DLLPUBLIC SvxNumRule final
{
sal_uInt16 nLevelCount; // Number of supported levels
SvxNumRuleFlags nFeatureFlags; // What is supported?
......@@ -257,7 +257,7 @@ public:
= SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
SvxNumRule(const SvxNumRule& rCopy);
SvxNumRule(SvStream &rStream);
virtual ~SvxNumRule();
~SvxNumRule();
bool operator==( const SvxNumRule& ) const;
bool operator!=( const SvxNumRule& rRule ) const {return !(*this == rRule);}
......
......@@ -188,7 +188,7 @@ inline void ParaRange::Adjust()
}
}
class EDITENG_DLLPUBLIC OutlinerView
class EDITENG_DLLPUBLIC OutlinerView final
{
friend class Outliner;
......@@ -218,7 +218,7 @@ private:
public:
OutlinerView( Outliner* pOut, vcl::Window* pWindow );
virtual ~OutlinerView();
~OutlinerView();
EditView& GetEditView() const { return *pEditView; }
......
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