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

loplugin:finalclasses in forms

Change-Id: I0f849fd104699e2861aaba2d4be38168e80703b0
Reviewed-on: https://gerrit.libreoffice.org/44189Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst bcb5a312
......@@ -26,9 +26,8 @@
namespace frm
{
class OCheckBoxModel :public OReferenceValueComponent
class OCheckBoxModel final : public OReferenceValueComponent
{
protected:
bool DbUseBool();
public:
......@@ -52,7 +51,7 @@ public:
css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps
) const override;
protected:
private:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
// OBoundControlModel overridables
......
......@@ -42,7 +42,7 @@
namespace frm
{
class OComboBoxModel
class OComboBoxModel final
:public OBoundControlModel
,public OEntryListHelper
,public OErrorBroadcaster
......@@ -63,8 +63,6 @@ class OComboBoxModel
::std::unique_ptr< ::dbtools::FormattedColumnValue > m_pValueFormatter;
protected:
virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
public:
......@@ -112,7 +110,7 @@ public:
// prevent method hiding
using OBoundControlModel::getFastPropertyValue;
protected:
private:
// OBoundControlModel overridables
virtual css::uno::Any translateDbColumnToControlValue( ) override;
virtual bool commitControlValueToDbColumn( bool _bPostReset ) override;
......@@ -130,7 +128,6 @@ protected:
virtual void disconnectedExternalListSource( ) override;
virtual void refreshInternalEntryList() override;
protected:
void loadData( bool _bForce );
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
......
......@@ -26,7 +26,7 @@
namespace frm
{
class OCurrencyModel
class OCurrencyModel final
:public OEditBaseModel
{
css::uno::Any m_aSaveValue;
......@@ -48,7 +48,7 @@ public:
css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps
) const override;
protected:
private:
// OBoundControlModel overridables
virtual css::uno::Any translateDbColumnToControlValue( ) override;
virtual bool commitControlValueToDbColumn( bool _bPostReset ) override;
......@@ -57,7 +57,6 @@ protected:
virtual void resetNoBroadcast() override;
protected:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
void implConstruct();
......
......@@ -32,7 +32,7 @@ struct ImplSVEvent;
namespace frm
{
class OEditModel : public OEditBaseModel
class OEditModel final : public OEditBaseModel
{
::std::unique_ptr< ::dbtools::FormattedColumnValue >
m_pValueFormatter;
......@@ -43,7 +43,7 @@ class OEditModel : public OEditBaseModel
public:
DECLARE_DEFAULT_LEAF_XTOR( OEditModel );
protected:
private:
void enableFormattedWriteFake() { m_bWritingFormattedFake = true; }
void disableFormattedWriteFake() { m_bWritingFormattedFake = false; }
bool lastReadWasFormattedFake() const { return (getLastReadVersion() & PF_FAKE_FORMATTED_FIELD) != 0; }
......@@ -85,7 +85,7 @@ public:
// XEventListener
using OBoundControlModel::disposing;
protected:
private:
// OControlModel overridables
virtual void writeAggregate( const css::uno::Reference< css::io::XObjectOutputStream >& _rxOutStream ) const override;
virtual void readAggregate( const css::uno::Reference< css::io::XObjectInputStream >& _rxInStream ) override;
......@@ -101,12 +101,10 @@ protected:
virtual bool approveDbColumnType( sal_Int32 _nColumnType ) override;
protected:
virtual sal_uInt16 getPersistenceFlags() const override;
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
private:
bool implActsAsRichText( ) const;
};
......
......@@ -53,7 +53,7 @@ namespace frm
, css::lang::XInitialization
> OFilterControl_BASE;
class OFilterControl :public UnoControl
class OFilterControl final :public UnoControl
,public OFilterControl_BASE
,public ::svxform::OParseContextClient
{
......@@ -74,7 +74,6 @@ namespace frm
bool m_bMultiLine : 1;
bool m_bFilterListFilled : 1;
private:
void implInitFilterList();
void initControlModel(css::uno::Reference< css::beans::XPropertySet > const & xControlModel);
......@@ -127,7 +126,7 @@ namespace frm
virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) override;
virtual css::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames( ) override;
protected:
private:
virtual void PrepareWindowDescriptor( css::awt::WindowDescriptor& rDesc ) override;
virtual void ImplSetPeerProperty( const OUString& rPropName, const css::uno::Any& rVal ) override;
......
......@@ -30,7 +30,7 @@ struct ImplSVEvent;
namespace frm
{
class OFormattedModel
class OFormattedModel final
:public OEditBaseModel
,public OErrorBroadcaster
{
......@@ -46,7 +46,6 @@ class OFormattedModel
bool m_bOriginalNumeric : 1,
m_bNumeric : 1; // analogous for the TreatAsNumeric-property
protected:
css::uno::Reference< css::util::XNumberFormatsSupplier> calcDefaultFormatsSupplier() const;
css::uno::Reference< css::util::XNumberFormatsSupplier> calcFormFormatsSupplier() const;
css::uno::Reference< css::util::XNumberFormatsSupplier> calcFormatsSupplier() const;
......@@ -55,7 +54,6 @@ class OFormattedModel
friend class OFormattedFieldWrapper;
protected:
// XInterface
DECLARE_UNO3_AGG_DEFAULTS( OFormattedModel, OEditBaseModel )
......@@ -104,7 +102,6 @@ class OFormattedModel
using OEditBaseModel::disposing;
using OEditBaseModel::getFastPropertyValue;
protected:
virtual sal_uInt16 getPersistenceFlags() const override;
// as we have an own version handling for persistence
......@@ -128,7 +125,6 @@ class OFormattedModel
virtual void onConnectedDbColumn( const css::uno::Reference< css::uno::XInterface >& _rxForm ) override;
virtual void onDisconnectedDbColumn() override;
private:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
void implConstruct();
......
......@@ -37,21 +37,18 @@ typedef ::cppu::WeakAggImplHelper3 < css::io::XPersistObject
, css::util::XCloneable
> OFormattedFieldWrapper_Base;
class OFormattedFieldWrapper : public OFormattedFieldWrapper_Base
class OFormattedFieldWrapper final : public OFormattedFieldWrapper_Base
{
css::uno::Reference< css::uno::XComponentContext> m_xContext;
protected:
css::uno::Reference< css::uno::XAggregation> m_xAggregate;
rtl::Reference< OEditModel > m_pEditPart;
// if we act as formatted this is used to write the EditModel part
css::uno::Reference< css::io::XPersistObject> m_xFormattedPart;
private:
OFormattedFieldWrapper(const css::uno::Reference< css::uno::XComponentContext>& _rxFactory);
protected:
virtual ~OFormattedFieldWrapper() override;
public:
......@@ -78,7 +75,7 @@ public:
// XCloneable
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
protected:
private:
/// ensure we're in a defined state, which means a FormattedModel _OR_ an EditModel
void ensureAggregate();
};
......
......@@ -51,7 +51,7 @@ typedef ::cppu::ImplHelper7 < css::awt::XControlModel
, css::sdb::XRowSetChangeBroadcaster
> OGridControlModel_BASE;
class OGridControlModel :public OControlModel
class OGridControlModel final :public OControlModel
,public OInterfaceContainer
,public OErrorBroadcaster
,public FontControlModel
......@@ -87,7 +87,6 @@ class OGridControlModel :public OControlModel
bool m_bDisplaySynchron : 1; // transient
// [properties]
protected:
void _reset();
public:
......@@ -164,10 +163,9 @@ public:
using OControlModel::disposing;
using OControlModel::getFastPropertyValue;
protected:
private:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
protected:
virtual void approveNewElement(
const css::uno::Reference< css::beans::XPropertySet >& _rxObject,
ElementDescription* _pElement
......@@ -179,7 +177,6 @@ protected:
virtual ElementDescription* createElementMetaData( ) override;
protected:
virtual void implRemoved(const css::uno::Reference<css::uno::XInterface>& _rxObject) override;
virtual void implInserted( const ElementDescription* _pElement ) override;
virtual void impl_replacedElement(
......
......@@ -43,7 +43,7 @@ typedef ::cppu::ImplHelper2 < css::form::XImageProducerSupplier
, css::awt::XImageProducer
> OImageControlModel_Base;
class OImageControlModel
class OImageControlModel final
:public OImageControlModel_Base
,public OBoundControlModel
{
......@@ -55,7 +55,6 @@ class OImageControlModel
m_xGraphicObject;
OUString m_sDocumentURL;
protected:
// UNO binding
virtual css::uno::Sequence< css::uno::Type> _getTypes() override;
......@@ -104,7 +103,7 @@ public:
using OBoundControlModel::disposing;
using OBoundControlModel::getFastPropertyValue;
protected:
private:
// OBoundControlModel overridables
virtual void onConnectedDbColumn( const css::uno::Reference< css::uno::XInterface >& _rxForm ) override;
virtual void onDisconnectedDbColumn() override;
......@@ -118,7 +117,6 @@ protected:
virtual void resetNoBroadcast() override;
protected:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
void implConstruct();
......
......@@ -97,7 +97,7 @@ namespace frm
typedef ::std::vector< ::connectivity::ORowSetValue > ValueList;
class OListBoxModel :public OBoundControlModel
class OListBoxModel final :public OBoundControlModel
,public OEntryListHelper
,public OErrorBroadcaster
{
......@@ -145,7 +145,7 @@ public:
virtual sal_Bool SAL_CALL convertFastPropertyValue(
css::uno::Any& _rConvertedValue, css::uno::Any& _rOldValue, sal_Int32 _nHandle, const css::uno::Any& _rValue ) override;
protected:
private:
static const ::connectivity::ORowSetValue s_aEmptyValue;
static const ::connectivity::ORowSetValue s_aEmptyStringValue;
......@@ -177,7 +177,6 @@ protected:
using OBoundControlModel::getFastPropertyValue;
using OBoundControlModel::setPropertyValues;
protected:
// OBoundControlModel overridables
virtual css::uno::Any translateDbColumnToControlValue( ) override;
virtual css::uno::Sequence< css::uno::Type >
......@@ -201,7 +200,6 @@ protected:
virtual void disconnectedExternalListSource( ) override;
virtual void refreshInternalEntryList() override;
protected:
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
void init();
......@@ -214,8 +212,6 @@ protected:
const ::connectivity::ORowSetValue &aValue)
const;
private:
void loadData( bool _bForce );
/** refreshes the list boxes list data
......
......@@ -26,7 +26,7 @@
namespace frm
{
class ORadioButtonModel :public OReferenceValueComponent
class ORadioButtonModel final : public OReferenceValueComponent
{
public:
DECLARE_DEFAULT_LEAF_XTOR( ORadioButtonModel );
......@@ -55,18 +55,16 @@ public:
css::uno::Sequence< css::beans::Property >& /* [out] */ _rProps
) const override;
protected:
private:
// OBoundControlModel overridables
virtual css::uno::Any translateDbColumnToControlValue( ) override;
virtual bool commitControlValueToDbColumn( bool _bPostReset ) override;
virtual css::uno::Any translateExternalValueToControlValue( const css::uno::Any& _rExternalValue ) const override;
protected:
void SetSiblingPropsTo(const OUString& rPropName, const css::uno::Any& rValue);
virtual css::uno::Reference< css::util::XCloneable > SAL_CALL createClone( ) override;
private:
void setControlSource();
};
......
......@@ -75,7 +75,7 @@ namespace frm
typedef ::cppu::ImplHelper1 < css::frame::XDispatchProvider
> ORichTextPeer_Base;
class ORichTextPeer :public VCLXWindow
class ORichTextPeer final :public VCLXWindow
,public ORichTextPeer_Base
,public ITextSelectionListener
{
......@@ -96,7 +96,7 @@ namespace frm
// XInterface
DECLARE_XINTERFACE( )
protected:
private:
ORichTextPeer();
virtual ~ORichTextPeer() override;
......
......@@ -39,7 +39,7 @@ namespace frm
~IEngineStatusListener() {}
};
class RichTextEngine : public EditEngine
class RichTextEngine final : public EditEngine
{
private:
SfxItemPool* m_pEnginePool;
......@@ -57,16 +57,14 @@ namespace frm
SfxItemPool* getPool() { return m_pEnginePool; }
protected:
private:
/** constructs a new RichTextEngine. The instances takes the ownership of the given SfxItemPool
*/
explicit RichTextEngine( SfxItemPool* _pPool );
private:
RichTextEngine( const RichTextEngine& ) = delete;
RichTextEngine& operator=( const RichTextEngine& ) = delete;
private:
DECL_LINK( EditEngineStatusChanged, EditStatus&, void );
};
......
......@@ -72,7 +72,7 @@ namespace frm
virtual void SAL_CALL releaseDispatchProviderInterceptor( const css::uno::Reference< css::frame::XDispatchProviderInterceptor >& Interceptor ) override;
};
class ONavigationBarPeer
class ONavigationBarPeer final
:public VCLXWindow
,public OFormNavigationHelper
{
......@@ -85,13 +85,6 @@ namespace frm
const css::uno::Reference< css::awt::XControlModel >& _rxModel
);
protected:
explicit ONavigationBarPeer(
const css::uno::Reference< css::uno::XComponentContext >& _rxORB
);
virtual ~ONavigationBarPeer() override;
public:
// XInterface
DECLARE_XINTERFACE( )
......@@ -101,7 +94,12 @@ namespace frm
// XWindow2
using VCLXWindow::isEnabled;
protected:
private:
explicit ONavigationBarPeer(
const css::uno::Reference< css::uno::XComponentContext >& _rxORB
);
virtual ~ONavigationBarPeer() override;
// XTypeProvider
DECLARE_XTYPEPROVIDER( )
......
......@@ -36,7 +36,7 @@ namespace frm
class ImplNavToolBar;
class NavigationToolBar : public vcl::Window
class NavigationToolBar final : public vcl::Window
{
public:
enum ImageSize
......@@ -115,7 +115,7 @@ namespace frm
void SetTextLineColor( );
void SetTextLineColor( const Color& rColor );
protected:
private:
// Window overridables
virtual void Resize() override;
virtual void StateChanged( StateChangedType nType ) override;
......
......@@ -39,7 +39,7 @@ namespace xforms
{
/** PathExpression represents an XPath Expression and caches results */
class PathExpression : public ComputedExpression
class PathExpression final : public ComputedExpression
{
public:
typedef std::vector<css::uno::Reference<css::xml::dom::XNode> > NodeVector_t;
......@@ -48,7 +48,6 @@ private:
/// the node-list result from the last bind (cached from mxResult)
NodeVector_t maNodes;
protected:
/// get expression for evaluation
const OUString _getExpressionForEvaluation() const;
......
......@@ -50,14 +50,13 @@ class CSubmissionPut;
class CSubmissionPost;
class CSubmissionGet;
class CCommandEnvironmentHelper : public cppu::WeakImplHelper< css::ucb::XCommandEnvironment >
class CCommandEnvironmentHelper final : public cppu::WeakImplHelper< css::ucb::XCommandEnvironment >
{
friend class CSubmissionPut;
friend class CSubmissionPost;
friend class CSubmissionGet;
friend class CSubmission;
protected:
css::uno::Reference< css::task::XInteractionHandler > m_aInteractionHandler;
css::uno::Reference< css::ucb::XProgressHandler > m_aProgressHandler;
......@@ -72,12 +71,11 @@ public:
}
};
class CProgressHandlerHelper : public cppu::WeakImplHelper< css::ucb::XProgressHandler >
class CProgressHandlerHelper final : public cppu::WeakImplHelper< css::ucb::XProgressHandler >
{
friend class CSubmissionPut;
friend class CSubmissionPost;
friend class CSubmissionGet;
protected:
osl::Condition m_cFinished;
osl::Mutex m_mLock;
sal_Int32 m_count;
......
......@@ -54,7 +54,7 @@ public:
typedef const IFunctionDescription* TFunctionDesc;
class FuncPage : public TabPage
class FuncPage final : public TabPage
{
private:
Link<FuncPage&,void> aDoubleClickLink;
......@@ -73,8 +73,6 @@ private:
DECL_LINK(DblClkHdl, ListBox&, void);
DECL_LINK(ModifyHdl, Edit&, void);
protected:
void UpdateFunctionList(const OUString&);
......
......@@ -40,7 +40,7 @@ namespace formula
class IFunctionDescription;
class IControlReferenceHandler;
class ParaWin : public TabPage
class ParaWin final : public TabPage
{
private:
Link<ParaWin&,void> aFxLink;
......@@ -95,8 +95,6 @@ private:
DECL_LINK( GetFxFocusHdl, ArgInput&, void );
DECL_LINK( GetFxHdl, ArgInput&, void );
protected:
void SliderMoved();
void ArgumentModified();
......
......@@ -60,7 +60,7 @@ public:
};
class StructPage : public TabPage
class StructPage final : public TabPage
{
private:
Link<StructPage&,void> aSelLink;
......@@ -75,8 +75,6 @@ private:
using Window::GetParent;
protected:
const IFormulaToken* GetFunctionEntry(SvTreeListEntry* pEntry);
public:
......
......@@ -35,7 +35,7 @@ namespace svt
/** a InteractionHandler implementation which extends another handler with some customizability
*/
class OFilePickerInteractionHandler : public OFilePickerInteractionHandler_Base
class OFilePickerInteractionHandler final : public OFilePickerInteractionHandler_Base
{
public:
/** flags, which indicates special handled interactions
......@@ -49,7 +49,7 @@ namespace svt
// next values [2,4,8,16 ...]!
};
protected:
private:
css::uno::Reference< css::task::XInteractionHandler > m_xMaster; // our master handler
css::uno::Any m_aException; // the last handled request
bool m_bUsed; // indicates using of this interaction handler instance
......@@ -67,11 +67,10 @@ namespace svt
// functions to analyze last cached request
bool wasAccessDenied() const;
protected:
private:
// XInteractionHandler
virtual void SAL_CALL handle( const css::uno::Reference< css::task::XInteractionRequest >& _rxRequest ) override;
private:
virtual ~OFilePickerInteractionHandler() override;
};
......
......@@ -64,7 +64,7 @@ namespace o3tl {
}
class SvtFileDialog : public SvtFileDialog_Base
class SvtFileDialog final : public SvtFileDialog_Base
{
private:
VclPtr<CheckBox> _pCbReadOnly;
......@@ -145,7 +145,6 @@ private:
void implUpdateImages( );
protected:
virtual bool EventNotify( NotifyEvent& rNEvt ) override;
OUString _aPath;
......
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