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

Stephan Bergmann sbergman at redhat.com
Thu Jun 28 16:26:42 UTC 2018


 include/editeng/pmdlitem.hxx |    7 -------
 1 file changed, 7 deletions(-)

New commits:
commit 3017995579af5c8a74f8d04bc92dc24eac1ded9f
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Jun 28 13:57:49 2018 +0200

    Curious inconsistency of SvxPageModelItem copy functions
    
    ...where the implicitly-defined copy ctor will copy the bAuto member while the
    user-provided copy assignment op does not.  The code is like that ever since at
    least c779feb1dfa340d61902dcd9d0b754046ffd8e5b "INTEGRATION: CWS
    hedaburemove01".
    
    The bAuto member is only used in Put/QueryValue with MID_AUTO, but MID_AUTO
    appears to be effectively unused?  So lets assume that the user-provided copy
    assignment op is like that due to a (presumably harmless?) accident, and make it
    implicit, too.  (Avoids -Wdeprecated-copy with GCC trunk towards GCC 9.)
    
    Change-Id: I4e3156305e2b9862d337074105edc4317538af1f
    Reviewed-on: https://gerrit.libreoffice.org/56592
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/include/editeng/pmdlitem.hxx b/include/editeng/pmdlitem.hxx
index a1c895fe98cb..f6343e8342e5 100644
--- a/include/editeng/pmdlitem.hxx
+++ b/include/editeng/pmdlitem.hxx
@@ -40,7 +40,6 @@ public:
     explicit inline SvxPageModelItem( sal_uInt16 nWh  );
     inline SvxPageModelItem( const OUString& rModel, bool bA /*= false*/,
                              sal_uInt16 nWh  );
-    inline SvxPageModelItem& operator=( const SvxPageModelItem& rModel );
 
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = nullptr ) const override;
 
@@ -66,12 +65,6 @@ inline SvxPageModelItem::SvxPageModelItem( const OUString& rModel, bool bA,
     bAuto( bA )
 {}
 
-inline SvxPageModelItem& SvxPageModelItem::operator=( const SvxPageModelItem& rModel )
-{
-    SetValue( rModel.GetValue() );
-    return *this;
-}
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list