[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Wed Nov 9 12:53:48 UTC 2016


 sw/source/filter/rtf/swparrtf.cxx             |    2 +-
 sw/source/filter/ww8/docxsdrexport.cxx        |    8 ++------
 sw/source/filter/ww8/docxtablestyleexport.cxx |    4 +---
 sw/source/filter/ww8/rtfattributeoutput.cxx   |   13 +++++--------
 4 files changed, 9 insertions(+), 18 deletions(-)

New commits:
commit 3c9f302b06bc3ffee910afc8404114bde728aa3b
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Nov 9 09:30:15 2016 +0100

    sw: clean up redundant get() calls on smart pointers in rtfattributeoutput
    
    And a few more similar nitpicks.
    
    Change-Id: Iac343800171658a9623bcc4d5b7aadaae56830ad

diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index be7b259..37463e9 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -39,7 +39,7 @@ using namespace ::com::sun::star;
 /// Glue class to call RtfImport as an internal filter, needed by copy&paste support.
 class SwRTFReader : public Reader
 {
-    virtual sal_uLong Read(SwDoc&, const OUString& rBaseURL, SwPaM&, const OUString&) override;
+    sal_uLong Read(SwDoc&, const OUString& rBaseURL, SwPaM&, const OUString&) override;
 };
 
 sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rPam, const OUString&)
diff --git a/sw/source/filter/ww8/docxsdrexport.cxx b/sw/source/filter/ww8/docxsdrexport.cxx
index 0fe507f..0cb5604 100644
--- a/sw/source/filter/ww8/docxsdrexport.cxx
+++ b/sw/source/filter/ww8/docxsdrexport.cxx
@@ -169,9 +169,7 @@ struct DocxSdrExport::Impl
     {
     }
 
-    ~Impl()
-    {
-    }
+    ~Impl() = default;
 
     /// Writes wp wrapper code around an SdrObject, which itself is written using drawingML syntax.
 
@@ -186,9 +184,7 @@ DocxSdrExport::DocxSdrExport(DocxExport& rExport, sax_fastparser::FSHelperPtr pS
 {
 }
 
-DocxSdrExport::~DocxSdrExport()
-{
-}
+DocxSdrExport::~DocxSdrExport() = default;
 
 void DocxSdrExport::setSerializer(const sax_fastparser::FSHelperPtr& pSerializer)
 {
diff --git a/sw/source/filter/ww8/docxtablestyleexport.cxx b/sw/source/filter/ww8/docxtablestyleexport.cxx
index a1b90a0..d87e805 100644
--- a/sw/source/filter/ww8/docxtablestyleexport.cxx
+++ b/sw/source/filter/ww8/docxtablestyleexport.cxx
@@ -691,8 +691,6 @@ DocxTableStyleExport::DocxTableStyleExport(SwDoc* pDoc, sax_fastparser::FSHelper
     m_pImpl->m_pSerializer = pSerializer;
 }
 
-DocxTableStyleExport::~DocxTableStyleExport()
-{
-}
+DocxTableStyleExport::~DocxTableStyleExport() = default;
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 5f52158..fc362a9 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -219,7 +219,7 @@ void RtfAttributeOutput::RTLAndCJKState(bool bIsRTL, sal_uInt16 nScript)
 void RtfAttributeOutput::StartParagraph(ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo)
 {
     // Output table/table row/table cell starts if needed
-    if (pTextNodeInfo.get())
+    if (pTextNodeInfo)
     {
         sal_uInt32 nRow = pTextNodeInfo->getRow();
         sal_uInt32 nCell = pTextNodeInfo->getCell();
@@ -1090,7 +1090,7 @@ void RtfAttributeOutput::EndTable()
 
 void RtfAttributeOutput::FinishTableRowCell(const ww8::WW8TableNodeInfoInner::Pointer_t& pInner, bool /*bForceEmptyParagraph*/)
 {
-    if (pInner.get())
+    if (pInner)
     {
         // Where are we in the table
         sal_uInt32 nRow = pInner->getRow();
@@ -1752,7 +1752,7 @@ void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyP
             aRelation = "0"; // margin
             break;
         }
-        rFlyProperties.push_back(std::make_pair("sizerelh", aRelation));
+        rFlyProperties.emplace_back(std::make_pair("sizerelh", aRelation));
     }
     const sal_uInt8 nHeightPercent = rSize.GetHeightPercent();
     if (nHeightPercent && nHeightPercent != SwFormatFrameSize::SYNCED)
@@ -1769,7 +1769,7 @@ void lcl_TextFrameRelativeSize(std::vector< std::pair<OString, OString> >& rFlyP
             aRelation = "0"; // margin
             break;
         }
-        rFlyProperties.push_back(std::make_pair("sizerelv", aRelation));
+        rFlyProperties.emplace_back(std::make_pair("sizerelv", aRelation));
     }
 }
 
@@ -3501,7 +3501,6 @@ RtfAttributeOutput::RtfAttributeOutput(RtfExport& rExport)
       m_bLastTable(true),
       m_bWroteCellInfo(false),
       m_bTableRowEnded(false),
-      m_aCells(),
       m_bSingleEmptyRun(false),
       m_bInRun(false),
       m_pFlyFrameSize(nullptr),
@@ -3509,9 +3508,7 @@ RtfAttributeOutput::RtfAttributeOutput(RtfExport& rExport)
 {
 }
 
-RtfAttributeOutput::~RtfAttributeOutput()
-{
-}
+RtfAttributeOutput::~RtfAttributeOutput() = default;
 
 MSWordExportBase& RtfAttributeOutput::GetExport()
 {


More information about the Libreoffice-commits mailing list