summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorJochen Nitschke <j.nitschke+logerrit@ok.de>2017-08-11 11:39:20 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2017-08-11 21:22:04 +0200
commit7634b279a53e7212925566e0de25d721fa7598ac (patch)
tree4a726d23d649f95681f0e8c0a28a0025a0043664 /include
parent4d89865ef2026f40a9a4d66f3e047b77454e6fee (diff)
vcl: use default copy-ctor for TextAttrib
Type of TextAttrib (mnWhich) never changes, const it up. Derived classes can use implicit default copy-ctor. No need to explicitly delete default-ctor if there is a user provided ctor. And no need to define a default override dtor here either. Change-Id: I7a0d1896f659801319dc5fa74844df94c5888a7b Reviewed-on: https://gerrit.libreoffice.org/41022 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include')
-rw-r--r--include/vcl/txtattr.hxx16
1 files changed, 3 insertions, 13 deletions
diff --git a/include/vcl/txtattr.hxx b/include/vcl/txtattr.hxx
index e446ee203563..8fadf98cc46f 100644
--- a/include/vcl/txtattr.hxx
+++ b/include/vcl/txtattr.hxx
@@ -39,11 +39,11 @@ namespace vcl { class Font; }
class VCL_DLLPUBLIC TextAttrib
{
private:
- sal_uInt16 mnWhich;
+ sal_uInt16 const mnWhich;
protected:
- TextAttrib( sal_uInt16 nWhich ) { mnWhich = nWhich; }
- TextAttrib( const TextAttrib& rAttr ) { mnWhich = rAttr.mnWhich; }
+ TextAttrib( sal_uInt16 nWhich ) : mnWhich(nWhich) {}
+ TextAttrib( const TextAttrib& ) = default;
public:
@@ -66,8 +66,6 @@ private:
public:
TextAttribFontColor( const Color& rColor );
- TextAttribFontColor( const TextAttribFontColor& rAttr );
- virtual ~TextAttribFontColor() override;
const Color& GetColor() const { return maColor; }
@@ -84,8 +82,6 @@ private:
public:
TextAttribFontWeight( FontWeight eWeight );
- TextAttribFontWeight( const TextAttribFontWeight& rAttr );
- virtual ~TextAttribFontWeight() override;
virtual void SetFont( vcl::Font& rFont ) const override;
virtual TextAttrib* Clone() const override;
@@ -98,8 +94,6 @@ class VCL_DLLPUBLIC TextAttribProtect : public TextAttrib
{
public:
TextAttribProtect();
- TextAttribProtect( const TextAttribProtect& rAttr );
- virtual ~TextAttribProtect() override;
virtual void SetFont( vcl::Font& rFont ) const override;
virtual TextAttrib* Clone() const override;
@@ -116,13 +110,9 @@ private:
sal_Int32 mnStart;
sal_Int32 mnEnd;
-protected:
-
public:
-
TextCharAttrib( const TextAttrib& rAttr, sal_Int32 nStart, sal_Int32 nEnd );
TextCharAttrib( const TextCharAttrib& rTextCharAttrib );
- ~TextCharAttrib();
const TextAttrib& GetAttr() const { return *mpAttr; }