[Libreoffice-commits] core.git: editeng/source include/editeng

Jochen Nitschke j.nitschke+logerrit at ok.de
Mon Jan 29 06:33:53 UTC 2018


 editeng/source/items/bulitem.cxx |   54 +++++++++++++++------------------------
 include/editeng/bulletitem.hxx   |    3 --
 2 files changed, 21 insertions(+), 36 deletions(-)

New commits:
commit f1e910c5ee7e89379391ff260e4164a6d9d21bff
Author: Jochen Nitschke <j.nitschke+logerrit at ok.de>
Date:   Sun Jan 28 21:28:28 2018 +0100

    inline SvxBulletItem::SetDefaultFont_Impl and SetDefaults_Impl
    
    use initializer lists in constructors
    
    Change-Id: Ib3b836ba96046a5f3bca12ea7702247afe8eac3b
    Reviewed-on: https://gerrit.libreoffice.org/48803
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/editeng/source/items/bulitem.cxx b/editeng/source/items/bulitem.cxx
index 206b32595f58..64eb82dba2f6 100644
--- a/editeng/source/items/bulitem.cxx
+++ b/editeng/source/items/bulitem.cxx
@@ -29,25 +29,32 @@
 #define BULITEM_VERSION     (sal_uInt16(2))
 
 
-SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich ) : SfxPoolItem( _nWhich )
+SvxBulletItem::SvxBulletItem( sal_uInt16 _nWhich )
+    : SfxPoolItem(_nWhich)
+    , aFont(OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE ))
+    , nStart(1)
+    , nStyle(SvxBulletStyle::N123)
+    , nWidth(1200)  // 1.2cm
+    , nScale(75)
+    , cSymbol(' ')
 {
-    SetDefaultFont_Impl();
-    SetDefaults_Impl();
+    aFont.SetAlignment(ALIGN_BOTTOM);
+    aFont.SetTransparent( true );
 }
 
 
-SvxBulletItem::SvxBulletItem( const SvxBulletItem& rItem) : SfxPoolItem( rItem )
+SvxBulletItem::SvxBulletItem( const SvxBulletItem& rItem )
+    : SfxPoolItem(rItem)
+    , aFont(rItem.aFont)
+    , pGraphicObject(rItem.pGraphicObject ? new GraphicObject( *rItem.pGraphicObject ) : nullptr)
+    , aPrevText(rItem.aPrevText)
+    , aFollowText(rItem.aFollowText)
+    , nStart(rItem.nStart)
+    , nStyle(rItem.nStyle)
+    , nWidth(rItem.nWidth)
+    , nScale(rItem.nScale)
+    , cSymbol(rItem.cSymbol)
 {
-    aFont           = rItem.aFont;
-    if (rItem.pGraphicObject)
-        pGraphicObject.reset( new GraphicObject( *rItem.pGraphicObject ) );
-    aPrevText       = rItem.aPrevText;
-    aFollowText     = rItem.aFollowText;
-    nStart          = rItem.nStart;
-    nStyle          = rItem.nStyle;
-    nWidth          = rItem.nWidth;
-    nScale          = rItem.nScale;
-    cSymbol         = rItem.cSymbol;
 }
 
 
@@ -62,25 +69,6 @@ SfxPoolItem* SvxBulletItem::Clone( SfxItemPool * /*pPool*/ ) const
 }
 
 
-void SvxBulletItem::SetDefaultFont_Impl()
-{
-    aFont = OutputDevice::GetDefaultFont( DefaultFontType::FIXED, LANGUAGE_SYSTEM, GetDefaultFontFlags::NONE );
-    aFont.SetAlignment( ALIGN_BOTTOM);
-    aFont.SetTransparent( true );
-}
-
-
-void SvxBulletItem::SetDefaults_Impl()
-{
-    pGraphicObject  = nullptr;
-    nWidth          = 1200;  // 1.2cm
-    nStart          = 1;
-    nStyle          = SvxBulletStyle::N123;
-    cSymbol         = ' ';
-    nScale          = 75;
-}
-
-
 sal_uInt16 SvxBulletItem::GetVersion( sal_uInt16 /*nVersion*/ ) const
 {
     return BULITEM_VERSION;
diff --git a/include/editeng/bulletitem.hxx b/include/editeng/bulletitem.hxx
index 2b3109a4f6ed..ddcbb28ddf89 100644
--- a/include/editeng/bulletitem.hxx
+++ b/include/editeng/bulletitem.hxx
@@ -56,9 +56,6 @@ class EDITENG_DLLPUBLIC SvxBulletItem : public SfxPoolItem
     sal_uInt16      nScale;
     sal_Unicode     cSymbol;
 
-    void    SetDefaultFont_Impl();
-    void    SetDefaults_Impl();
-
 public:
     explicit SvxBulletItem( sal_uInt16 nWhich );
     SvxBulletItem( const SvxBulletItem& );


More information about the Libreoffice-commits mailing list