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

loplugin:finalclasses in reportdesign

Change-Id: I6fab8ce7d1c9a5e52a981dc7530fafb2373e27f6
Reviewed-on: https://gerrit.libreoffice.org/44098Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst e54f4cc2
...@@ -80,7 +80,7 @@ class RegistryKey; ...@@ -80,7 +80,7 @@ class RegistryKey;
The class is implemented inline and use a C-Api. The class is implemented inline and use a C-Api.
*/ */
class Registry class Registry final
{ {
public: public:
/** Default constructor. /** Default constructor.
...@@ -180,8 +180,8 @@ public: ...@@ -180,8 +180,8 @@ public:
/// returns the used registry Api. /// returns the used registry Api.
const Registry_Api* getApi() const { return m_pApi; } const Registry_Api* getApi() const { return m_pApi; }
protected:
private:
/// stores the used and initialized registry Api. /// stores the used and initialized registry Api.
const Registry_Api* m_pApi; const Registry_Api* m_pApi;
/// stores the handle of the underlying registry file on which most of the functions work. /// stores the handle of the underlying registry file on which most of the functions work.
...@@ -270,7 +270,7 @@ protected: ...@@ -270,7 +270,7 @@ protected:
RegistryValueList is a helper class to work with a list value. RegistryValueList is a helper class to work with a list value.
*/ */
template<class ValueType> template<class ValueType>
class RegistryValueList class RegistryValueList final
{ {
public: public:
/// Default constructor /// Default constructor
...@@ -308,7 +308,8 @@ public: ...@@ -308,7 +308,8 @@ public:
} }
friend class RegistryKey; friend class RegistryKey;
protected:
private:
/** sets the data of the value list. /** sets the data of the value list.
@param registry specifies the registry files where the appropriate key is located. @param registry specifies the registry files where the appropriate key is located.
......
...@@ -122,30 +122,16 @@ public: ...@@ -122,30 +122,16 @@ public:
// OCustomShape // OCustomShape
class REPORTDESIGN_DLLPUBLIC OCustomShape: public SdrObjCustomShape , public OObjectBase class REPORTDESIGN_DLLPUBLIC OCustomShape final : public SdrObjCustomShape , public OObjectBase
{ {
friend class OReportPage; friend class OReportPage;
friend class DlgEdFactory; friend class DlgEdFactory;
public: public:
static OCustomShape* Create( const css::uno::Reference< css::report::XReportComponent>& _xComponent ) static OCustomShape* Create( const css::uno::Reference< css::report::XReportComponent>& _xComponent )
{ {
return new OCustomShape( _xComponent ); return new OCustomShape( _xComponent );
} }
protected:
OCustomShape(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
OCustomShape(const OUString& _sComponentName);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
virtual SdrPage* GetImplPage() const override;
public:
virtual ~OCustomShape() override; virtual ~OCustomShape() override;
virtual css::uno::Reference< css::beans::XPropertySet> getAwtComponent() override; virtual css::uno::Reference< css::beans::XPropertySet> getAwtComponent() override;
...@@ -156,39 +142,30 @@ public: ...@@ -156,39 +142,30 @@ public:
private: private:
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override; virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
OCustomShape(const css::uno::Reference< css::report::XReportComponent>& _xComponent);
OCustomShape(const OUString& _sComponentName);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
virtual SdrPage* GetImplPage() const override;
}; };
// OOle2Obj // OOle2Obj
class REPORTDESIGN_DLLPUBLIC OOle2Obj: public SdrOle2Obj , public OObjectBase class REPORTDESIGN_DLLPUBLIC OOle2Obj final : public SdrOle2Obj , public OObjectBase
{ {
friend class OReportPage; friend class OReportPage;
friend class DlgEdFactory; friend class DlgEdFactory;
sal_uInt16 m_nType;
bool m_bOnlyOnce;
void impl_createDataProvider_nothrow( const css::uno::Reference< css::frame::XModel>& _xModel);
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
public: public:
static OOle2Obj* Create( const css::uno::Reference< css::report::XReportComponent>& _xComponent,sal_uInt16 _nType ) static OOle2Obj* Create( const css::uno::Reference< css::report::XReportComponent>& _xComponent,sal_uInt16 _nType )
{ {
return new OOle2Obj( _xComponent,_nType ); return new OOle2Obj( _xComponent,_nType );
} }
protected:
OOle2Obj(const css::uno::Reference< css::report::XReportComponent>& _xComponent,sal_uInt16 _nType);
OOle2Obj(const OUString& _sComponentName,sal_uInt16 _nType);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
virtual SdrPage* GetImplPage() const override;
public:
virtual ~OOle2Obj() override; virtual ~OOle2Obj() override;
...@@ -204,6 +181,24 @@ public: ...@@ -204,6 +181,24 @@ public:
OOle2Obj& operator=(const OOle2Obj& rObj); OOle2Obj& operator=(const OOle2Obj& rObj);
void initializeChart( const css::uno::Reference< css::frame::XModel>& _xModel); void initializeChart( const css::uno::Reference< css::frame::XModel>& _xModel);
private:
OOle2Obj(const css::uno::Reference< css::report::XReportComponent>& _xComponent,sal_uInt16 _nType);
OOle2Obj(const OUString& _sComponentName,sal_uInt16 _nType);
virtual void NbcMove( const Size& rSize ) override;
virtual void NbcResize(const Point& rRef, const Fraction& xFact, const Fraction& yFact) override;
virtual void NbcSetLogicRect(const tools::Rectangle& rRect) override;
virtual bool EndCreate(SdrDragStat& rStat, SdrCreateCmd eCmd) override;
virtual SdrPage* GetImplPage() const override;
void impl_createDataProvider_nothrow( const css::uno::Reference< css::frame::XModel>& _xModel);
virtual void impl_setUnoShape( const css::uno::Reference< css::uno::XInterface >& rxUnoShape ) override;
sal_uInt16 m_nType;
bool m_bOnlyOnce;
}; };
......
...@@ -26,9 +26,8 @@ ...@@ -26,9 +26,8 @@
namespace rptxml namespace rptxml
{ {
class ORptFilter; class ORptFilter;
class OXMLComponent : public SvXMLImportContext class OXMLComponent final : public SvXMLImportContext
{ {
protected:
css::uno::Reference< css::report::XReportComponent > m_xComponent; css::uno::Reference< css::report::XReportComponent > m_xComponent;
OUString m_sTextStyleName; OUString m_sTextStyleName;
......
...@@ -28,9 +28,8 @@ ...@@ -28,9 +28,8 @@
namespace rptxml namespace rptxml
{ {
class ORptFilter; class ORptFilter;
class OXMLFunction : public SvXMLImportContext class OXMLFunction final : public SvXMLImportContext
{ {
protected:
css::uno::Reference< css::report::XFunctions > m_xFunctions; css::uno::Reference< css::report::XFunctions > m_xFunctions;
css::uno::Reference< css::report::XFunction > m_xFunction; css::uno::Reference< css::report::XFunction > m_xFunction;
bool m_bAddToReport; bool m_bAddToReport;
......
...@@ -26,9 +26,8 @@ ...@@ -26,9 +26,8 @@
namespace rptxml namespace rptxml
{ {
class ORptFilter; class ORptFilter;
class OXMLGroup : public SvXMLImportContext class OXMLGroup final : public SvXMLImportContext
{ {
protected:
css::uno::Reference< css::report::XGroups > m_xGroups; css::uno::Reference< css::report::XGroups > m_xGroups;
css::uno::Reference< css::report::XGroup > m_xGroup; css::uno::Reference< css::report::XGroup > m_xGroup;
......
...@@ -24,9 +24,8 @@ namespace rptui ...@@ -24,9 +24,8 @@ namespace rptui
//= ColorChanger //= ColorChanger
class ColorChanger class ColorChanger final
{ {
protected:
VclPtr<OutputDevice> m_pDev; VclPtr<OutputDevice> m_pDev;
public: public:
......
...@@ -39,7 +39,7 @@ namespace rptui ...@@ -39,7 +39,7 @@ namespace rptui
, css::lang::XServiceInfo , css::lang::XServiceInfo
, css::lang::XInitialization , css::lang::XInitialization
> DefaultComponentInspectorModel_Base; > DefaultComponentInspectorModel_Base;
class DefaultComponentInspectorModel : public DefaultComponentInspectorModel_Base class DefaultComponentInspectorModel final : public DefaultComponentInspectorModel_Base
{ {
private: private:
::osl::Mutex m_aMutex; ::osl::Mutex m_aMutex;
...@@ -53,7 +53,7 @@ namespace rptui ...@@ -53,7 +53,7 @@ namespace rptui
DefaultComponentInspectorModel(const DefaultComponentInspectorModel&) = delete; DefaultComponentInspectorModel(const DefaultComponentInspectorModel&) = delete;
DefaultComponentInspectorModel& operator=(const DefaultComponentInspectorModel&) = delete; DefaultComponentInspectorModel& operator=(const DefaultComponentInspectorModel&) = delete;
protected:
virtual ~DefaultComponentInspectorModel() override; virtual ~DefaultComponentInspectorModel() override;
// XServiceInfo // XServiceInfo
...@@ -75,6 +75,9 @@ namespace rptui ...@@ -75,6 +75,9 @@ namespace rptui
// XInitialization // XInitialization
virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override; virtual void SAL_CALL initialize( const css::uno::Sequence< css::uno::Any >& aArguments ) override;
// Service constructors
void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines );
public: public:
// XServiceInfo - static versions // XServiceInfo - static versions
/// @throws css::uno::RuntimeException /// @throws css::uno::RuntimeException
...@@ -84,12 +87,7 @@ namespace rptui ...@@ -84,12 +87,7 @@ namespace rptui
static css::uno::Reference< css::uno::XInterface > SAL_CALL static css::uno::Reference< css::uno::XInterface > SAL_CALL
create(const css::uno::Reference< css::uno::XComponentContext >&); create(const css::uno::Reference< css::uno::XComponentContext >&);
public:
DefaultComponentInspectorModel( const css::uno::Reference< css::uno::XComponentContext >& _rxContext); DefaultComponentInspectorModel( const css::uno::Reference< css::uno::XComponentContext >& _rxContext);
protected:
// Service constructors
void createWithHelpSection( sal_Int32 _nMinHelpTextLines, sal_Int32 _nMaxHelpTextLines );
}; };
......
...@@ -45,16 +45,8 @@ namespace rptui ...@@ -45,16 +45,8 @@ namespace rptui
//= OPropertyInfoService //= OPropertyInfoService
class OPropertyInfoService class OPropertyInfoService final
{ {
OPropertyInfoService(const OPropertyInfoService&) = delete;
void operator =(const OPropertyInfoService&) = delete;
OPropertyInfoService() = delete;
protected:
static sal_uInt16 s_nCount;
static OPropertyInfoImpl* s_pPropertyInfos;
// TODO: a real structure which allows quick access by name as well as by id
public: public:
// IPropertyInfoService // IPropertyInfoService
static sal_Int32 getPropertyId(const OUString& _rName); static sal_Int32 getPropertyId(const OUString& _rName);
...@@ -68,11 +60,19 @@ namespace rptui ...@@ -68,11 +60,19 @@ namespace rptui
const css::uno::Reference< css::inspection::XPropertyHandler >& _xFormComponentHandler const css::uno::Reference< css::inspection::XPropertyHandler >& _xFormComponentHandler
); );
protected: private:
static const OPropertyInfoImpl* getPropertyInfo(); static const OPropertyInfoImpl* getPropertyInfo();
static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName); static const OPropertyInfoImpl* getPropertyInfo(const OUString& _rName);
static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId); static const OPropertyInfoImpl* getPropertyInfo(sal_Int32 _nId);
OPropertyInfoService(const OPropertyInfoService&) = delete;
void operator =(const OPropertyInfoService&) = delete;
OPropertyInfoService() = delete;
static sal_uInt16 s_nCount;
static OPropertyInfoImpl* s_pPropertyInfos;
// TODO: a real structure which allows quick access by name as well as by id
}; };
......
...@@ -40,9 +40,8 @@ class OObjectBase; ...@@ -40,9 +40,8 @@ class OObjectBase;
// PropBrw // PropBrw
class PropBrw : public DockingWindow , public SfxListener, public SfxBroadcaster class PropBrw final : public DockingWindow , public SfxListener, public SfxBroadcaster
{ {
private:
css::uno::Reference< css::uno::XComponentContext > css::uno::Reference< css::uno::XComponentContext >
m_xInspectorContext; m_xInspectorContext;
css::uno::Reference< css::uno::XComponentContext > css::uno::Reference< css::uno::XComponentContext >
...@@ -62,7 +61,6 @@ private: ...@@ -62,7 +61,6 @@ private:
PropBrw(PropBrw&) = delete; PropBrw(PropBrw&) = delete;
void operator =(PropBrw&) = delete; void operator =(PropBrw&) = delete;
protected:
virtual void Resize() override; virtual void Resize() override;
virtual bool Close() override; virtual bool Close() override;
......
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