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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Sun Jul 15 17:22:19 UTC 2018


 editeng/source/items/frmitems.cxx                 |    8 --------
 include/editeng/frmdiritem.hxx                    |    1 -
 writerfilter/source/dmapper/DomainMapper_Impl.cxx |   11 +++++++----
 writerfilter/source/dmapper/GraphicHelpers.cxx    |    2 +-
 writerfilter/source/ooxml/OOXMLPropertySet.cxx    |    2 +-
 writerfilter/source/rtftok/rtfvalue.cxx           |    2 +-
 6 files changed, 10 insertions(+), 16 deletions(-)

New commits:
commit 6fab990bff635ac5589947f26fd3dc4958b0c71c
Author:     Jochen Nitschke <j.nitschke+logerrit at ok.de>
AuthorDate: Sun Jul 15 18:17:24 2018 +0200
Commit:     Jochen Nitschke <j.nitschke+logerrit at ok.de>
CommitDate: Sun Jul 15 19:22:09 2018 +0200

    remove SvxFrameDirectionItem::operator== override
    
    base class SfxEnumItem has the same operator
    
    Change-Id: I57bd4878f34eb17ee16553bb3f6aa2b15af533d9
    Reviewed-on: https://gerrit.libreoffice.org/57452
    Tested-by: Jenkins
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/editeng/source/items/frmitems.cxx b/editeng/source/items/frmitems.cxx
index 957c6f9edb4a..951a19fc77b3 100644
--- a/editeng/source/items/frmitems.cxx
+++ b/editeng/source/items/frmitems.cxx
@@ -3808,14 +3808,6 @@ SvxFrameDirectionItem::~SvxFrameDirectionItem()
 }
 
 
-bool SvxFrameDirectionItem::operator==( const SfxPoolItem& rCmp ) const
-{
-    assert(SfxPoolItem::operator==(rCmp));
-
-    return GetValue() == static_cast<const SvxFrameDirectionItem&>(rCmp).GetValue();
-}
-
-
 SfxPoolItem* SvxFrameDirectionItem::Clone( SfxItemPool * ) const
 {
     return new SvxFrameDirectionItem( *this );
diff --git a/include/editeng/frmdiritem.hxx b/include/editeng/frmdiritem.hxx
index 57feb3c3ebb3..df8aecdd40a5 100644
--- a/include/editeng/frmdiritem.hxx
+++ b/include/editeng/frmdiritem.hxx
@@ -37,7 +37,6 @@ public:
     virtual SfxPoolItem*    Clone( SfxItemPool *pPool = nullptr ) const override;
     virtual SfxPoolItem*    Create(SvStream &, sal_uInt16) const override;
     virtual sal_uInt16      GetVersion( sal_uInt16 nFileVersion ) const override;
-    virtual bool            operator==( const SfxPoolItem& ) const override;
 
     virtual bool            GetPresentation( SfxItemPresentation ePres,
                                   MapUnit eCoreMetric,
commit 936ae2b21631f2fb302e0e46fafef704b371841e
Author:     Jochen Nitschke <j.nitschke+logerrit at ok.de>
AuthorDate: Sun Jul 15 18:11:13 2018 +0200
Commit:     Jochen Nitschke <j.nitschke+logerrit at ok.de>
CommitDate: Sun Jul 15 19:21:57 2018 +0200

    cppcheck: useInitializationList in writerfilter
    
    Change-Id: I4bbd2b4d3a4bba23936bd25a02cff011448e66f9
    Reviewed-on: https://gerrit.libreoffice.org/57453
    Tested-by: Jenkins
    Reviewed-by: Jochen Nitschke <j.nitschke+logerrit at ok.de>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b1c26144ba90..7a055b629c20 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -5292,12 +5292,15 @@ void DomainMapper_Impl::SetPageMarginTwip( PageMarElement eElement, sal_Int32 nV
 
 
 PageMar::PageMar()
-{
-    header = footer = ConversionHelper::convertTwipToMM100(sal_Int32(720));
-    top = bottom = ConversionHelper::convertTwipToMM100( sal_Int32(1440));
+    : top(ConversionHelper::convertTwipToMM100( sal_Int32(1440)))
     // This is strange, the RTF spec says it's 1800, but it's clearly 1440 in Word
     // OOXML seems not to specify a default value
-    right = left = ConversionHelper::convertTwipToMM100( sal_Int32(1440));
+    , right(ConversionHelper::convertTwipToMM100( sal_Int32(1440)))
+    , bottom(top)
+    , left(right)
+    , header(ConversionHelper::convertTwipToMM100(sal_Int32(720)))
+    , footer(header)
+{
 }
 
 
diff --git a/writerfilter/source/dmapper/GraphicHelpers.cxx b/writerfilter/source/dmapper/GraphicHelpers.cxx
index 2b08671156de..61522228523d 100644
--- a/writerfilter/source/dmapper/GraphicHelpers.cxx
+++ b/writerfilter/source/dmapper/GraphicHelpers.cxx
@@ -46,11 +46,11 @@ using namespace com::sun::star;
 PositionHandler::PositionHandler( std::pair<OUString, OUString>& rPositionOffsets, std::pair<OUString, OUString>& rAligns ) :
 LoggedProperties("PositionHandler"),
 m_nOrient(text::VertOrientation::NONE),
+m_nRelation(text::RelOrientation::FRAME),
 m_nPosition(0),
 m_rPositionOffsets(rPositionOffsets),
 m_rAligns(rAligns)
 {
-    m_nRelation = text::RelOrientation::FRAME;
 }
 
 PositionHandler::~PositionHandler( )
diff --git a/writerfilter/source/ooxml/OOXMLPropertySet.cxx b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
index be1f72ac8ecf..f35379e529a6 100644
--- a/writerfilter/source/ooxml/OOXMLPropertySet.cxx
+++ b/writerfilter/source/ooxml/OOXMLPropertySet.cxx
@@ -555,8 +555,8 @@ OOXMLHexValue::OOXMLHexValue(sal_uInt32 nValue)
 }
 
 OOXMLHexValue::OOXMLHexValue(const char * pValue)
+: mnValue(rtl_str_toUInt32(pValue, 16))
 {
-    mnValue = rtl_str_toUInt32(pValue, 16);
 }
 
 OOXMLHexValue::~OOXMLHexValue()
diff --git a/writerfilter/source/rtftok/rtfvalue.cxx b/writerfilter/source/rtftok/rtfvalue.cxx
index 9272ba13647b..f637cc2712a5 100644
--- a/writerfilter/source/rtftok/rtfvalue.cxx
+++ b/writerfilter/source/rtftok/rtfvalue.cxx
@@ -46,9 +46,9 @@ RTFValue::RTFValue(int nValue)
     : m_nValue(nValue)
     , m_pAttributes(new RTFSprms())
     , m_pSprms(new RTFSprms())
+    , m_pShape(new RTFShape())
     , m_pPicture(new RTFPicture())
 {
-    m_pShape = new RTFShape();
 }
 
 RTFValue::RTFValue(OUString sValue, bool bForce)


More information about the Libreoffice-commits mailing list