diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2017-02-20 12:29:53 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2017-02-21 07:34:57 +0100 |
commit | 0a5ab8502a8dcba1bdc1faa6972df2d9d01a4f1f (patch) | |
tree | b592261e4d9b4a20fe86a403613de150a5b0aaa0 /sw | |
parent | e7191f32cb699f229f429edbefde237eb3f5fbfb (diff) |
loplugin:subtlezeroinit: sw
Change-Id: Ibd5342b39de2fe9da14bbcc243736ae21b78072d
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/DocumentFieldsManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentListItemsManager.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/SwStyleNameMapper.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/doc/docedt.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/doc/docnew.cxx | 8 | ||||
-rw-r--r-- | sw/source/core/layout/objectformatter.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/table/swnewtable.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/itradj.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/unocore/unostyle.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/basflt/fltini.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/rtf/swparrtf.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/ww8/docxattributeoutput.cxx | 12 | ||||
-rw-r--r-- | sw/source/filter/ww8/wrtww8.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 4 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltble.cxx | 2 | ||||
-rw-r--r-- | sw/source/filter/xml/xmltbli.cxx | 2 | ||||
-rw-r--r-- | sw/source/uibase/docvw/frmsidebarwincontainer.cxx | 2 |
18 files changed, 30 insertions, 30 deletions
diff --git a/sw/source/core/doc/DocumentFieldsManager.cxx b/sw/source/core/doc/DocumentFieldsManager.cxx index 1f4b07464004..ef2e900de5eb 100644 --- a/sw/source/core/doc/DocumentFieldsManager.cxx +++ b/sw/source/core/doc/DocumentFieldsManager.cxx @@ -143,7 +143,7 @@ namespace sw DocumentFieldsManager::DocumentFieldsManager( SwDoc& i_rSwdoc ) : m_rDoc( i_rSwdoc ), mbNewFieldLst(true), mpUpdateFields( new SwDocUpdateField( &m_rDoc ) ), - mpFieldTypes( new SwFieldTypes() ), + mpFieldTypes( new SwFieldTypes ), mnLockExpField( 0 ) { } diff --git a/sw/source/core/doc/DocumentListItemsManager.cxx b/sw/source/core/doc/DocumentListItemsManager.cxx index c40f1f1a94fb..43c05b8716b2 100644 --- a/sw/source/core/doc/DocumentListItemsManager.cxx +++ b/sw/source/core/doc/DocumentListItemsManager.cxx @@ -25,7 +25,7 @@ namespace sw { -DocumentListItemsManager::DocumentListItemsManager() : mpListItemsList( new tImplSortedNodeNumList() ) // #i83479# +DocumentListItemsManager::DocumentListItemsManager() : mpListItemsList( new tImplSortedNodeNumList ) // #i83479# { } diff --git a/sw/source/core/doc/SwStyleNameMapper.cxx b/sw/source/core/doc/SwStyleNameMapper.cxx index e14379c82429..c7fc32b45878 100644 --- a/sw/source/core/doc/SwStyleNameMapper.cxx +++ b/sw/source/core/doc/SwStyleNameMapper.cxx @@ -869,7 +869,7 @@ const std::vector<OUString>& SwStyleNameMapper::GetTableStyleUINameArray() const std::vector<OUString>& SwStyleNameMapper::GetCellStyleUINameArray() { if (!s_pCellStyleUINameArray) - s_pCellStyleUINameArray = new std::vector<OUString>(); + s_pCellStyleUINameArray = new std::vector<OUString>; return *s_pCellStyleUINameArray; } @@ -973,7 +973,7 @@ const std::vector<OUString>& SwStyleNameMapper::GetTableStyleProgNameArray() const std::vector<OUString>& SwStyleNameMapper::GetCellStyleProgNameArray() { if (!s_pCellStyleProgNameArray) - s_pCellStyleProgNameArray = new std::vector<OUString>(); + s_pCellStyleProgNameArray = new std::vector<OUString>; return *s_pCellStyleProgNameArray; } diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx index 4025cfd6491c..bd46b4a0ca3b 100644 --- a/sw/source/core/doc/docedt.cxx +++ b/sw/source/core/doc/docedt.cxx @@ -288,7 +288,7 @@ void SaveRedlEndPosForRestore::Restore_() /// Convert list of ranges of whichIds to a corresponding list of whichIds static std::vector<sal_uInt16> * lcl_RangesToVector(sal_uInt16 * pRanges) { - std::vector<sal_uInt16> * pResult = new std::vector<sal_uInt16>(); + std::vector<sal_uInt16> * pResult = new std::vector<sal_uInt16>; int i = 0; while (pRanges[i] != 0) diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx index b1a8faebd99a..ac97fa5f4663 100644 --- a/sw/source/core/doc/docnew.cxx +++ b/sw/source/core/doc/docnew.cxx @@ -215,7 +215,7 @@ SwDoc::SwDoc() m_pDocumentStatisticsManager( new ::sw::DocumentStatisticsManager( *this ) ), m_pDocumentLayoutManager( new ::sw::DocumentLayoutManager( *this ) ), m_pDocumentStylePoolManager( new ::sw::DocumentStylePoolManager( *this ) ), - m_pDocumentExternalDataManager( new ::sw::DocumentExternalDataManager() ), + m_pDocumentExternalDataManager( new ::sw::DocumentExternalDataManager ), mpDfltFrameFormat( new SwFrameFormat( GetAttrPool(), "Frameformat", nullptr ) ), mpEmptyPageFormat( new SwFrameFormat( GetAttrPool(), "Empty Page", mpDfltFrameFormat ) ), mpColumnContFormat( new SwFrameFormat( GetAttrPool(), "Columncontainer", mpDfltFrameFormat ) ), @@ -223,13 +223,13 @@ SwDoc::SwDoc() mpDfltTextFormatColl( new SwTextFormatColl( GetAttrPool(), "Paragraph style" ) ), mpDfltGrfFormatColl( new SwGrfFormatColl( GetAttrPool(), "Graphikformatvorlage" ) ), mpFrameFormatTable( new SwFrameFormats() ), - mpCharFormatTable( new SwCharFormats() ), + mpCharFormatTable( new SwCharFormats ), mpSpzFrameFormatTable( new SwFrameFormats() ), - mpSectionFormatTable( new SwSectionFormats() ), + mpSectionFormatTable( new SwSectionFormats ), mpTableFrameFormatTable( new SwFrameFormats() ), mpTextFormatCollTable( new SwTextFormatColls() ), mpGrfFormatCollTable( new SwGrfFormatColls() ), - mpTOXTypes( new SwTOXTypes() ), + mpTOXTypes( new SwTOXTypes ), mpDefTOXBases( new SwDefTOXBase_Impl() ), mpOutlineRule( nullptr ), mpFootnoteInfo( new SwFootnoteInfo ), diff --git a/sw/source/core/layout/objectformatter.cxx b/sw/source/core/layout/objectformatter.cxx index ff5ff9c4b979..434e4bcc597b 100644 --- a/sw/source/core/layout/objectformatter.cxx +++ b/sw/source/core/layout/objectformatter.cxx @@ -62,7 +62,7 @@ class SwPageNumAndTypeOfAnchors inline void Collect( SwAnchoredObject& _rAnchoredObj ) { - tEntry* pNewEntry = new tEntry(); + tEntry* pNewEntry = new tEntry; pNewEntry->mpAnchoredObj = &_rAnchoredObj; // #i33751#, #i34060# - method <GetPageFrameOfAnchor()> // is replaced by method <FindPageFrameOfAnchor()>. It's return value diff --git a/sw/source/core/table/swnewtable.cxx b/sw/source/core/table/swnewtable.cxx index d681fab39b89..8edc4779b26f 100644 --- a/sw/source/core/table/swnewtable.cxx +++ b/sw/source/core/table/swnewtable.cxx @@ -381,7 +381,7 @@ SwBoxSelection* SwTable::CollectBoxSelection( const SwPaM& rPam ) const { SwTableLine* pLine = m_aLines[nRow]; OSL_ENSURE( pLine, "Missing table line" ); - SwSelBoxes *pBoxes = new SwSelBoxes(); + SwSelBoxes *pBoxes = new SwSelBoxes; long nRight = 0; const size_t nCount = pLine->GetTabBoxes().size(); for( size_t nCurrBox = 0; nCurrBox < nCount; ++nCurrBox ) diff --git a/sw/source/core/text/itradj.cxx b/sw/source/core/text/itradj.cxx index 0c391529920e..512d9d8e8f76 100644 --- a/sw/source/core/text/itradj.cxx +++ b/sw/source/core/text/itradj.cxx @@ -395,7 +395,7 @@ SwTwips SwTextAdjuster::CalcKanaAdj( SwLineLayout* pCurrent ) OSL_ENSURE( pCurrent->Height(), "SwTextAdjuster::CalcBlockAdjust: missing CalcLine()" ); OSL_ENSURE( !pCurrent->GetpKanaComp(), "pKanaComp already exists!!" ); - std::deque<sal_uInt16> *pNewKana = new std::deque<sal_uInt16>(); + std::deque<sal_uInt16> *pNewKana = new std::deque<sal_uInt16>; pCurrent->SetKanaComp( pNewKana ); const sal_uInt16 nNull = 0; diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx index 6bb8dc7d87d4..6e2c9e009903 100644 --- a/sw/source/core/unocore/unostyle.cxx +++ b/sw/source/core/unocore/unostyle.cxx @@ -1851,7 +1851,7 @@ void SwXStyle::SetPropertyValue<FN_UNO_CATEGORY>(const SfxItemPropertySimpleEntr static std::unique_ptr<std::map<paragraphstyle_t, swstylebits_t>> pUnoToCore; if(!pUnoToCore) { - pUnoToCore.reset(new std::map<paragraphstyle_t, swstylebits_t>()); + pUnoToCore.reset(new std::map<paragraphstyle_t, swstylebits_t>); auto pEntries = lcl_GetParagraphStyleCategoryEntries(); std::transform(pEntries->begin(), pEntries->end(), std::inserter(*pUnoToCore, pUnoToCore->end()), [] (const ParagraphStyleCategoryEntry& rEntry) { return std::pair<paragraphstyle_t, swstylebits_t>(rEntry.m_eCategory, rEntry.m_nSwStyleBits); }); @@ -2217,7 +2217,7 @@ uno::Any SwXStyle::GetStyleProperty<FN_UNO_CATEGORY>(const SfxItemPropertySimple static std::unique_ptr<std::map<collectionbits_t, paragraphstyle_t>> pUnoToCore; if(!pUnoToCore) { - pUnoToCore.reset(new std::map<collectionbits_t, paragraphstyle_t>()); + pUnoToCore.reset(new std::map<collectionbits_t, paragraphstyle_t>); auto pEntries = lcl_GetParagraphStyleCategoryEntries(); std::transform(pEntries->begin(), pEntries->end(), std::inserter(*pUnoToCore, pUnoToCore->end()), [] (const ParagraphStyleCategoryEntry& rEntry) { return std::pair<collectionbits_t, paragraphstyle_t>(rEntry.m_nCollectionBits, rEntry.m_eCategory); }); diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx index 333dfa39f876..f0b0c4bd0fb8 100644 --- a/sw/source/filter/basflt/fltini.cxx +++ b/sw/source/filter/basflt/fltini.cxx @@ -276,7 +276,7 @@ void StgReader::SetFltName( const OUString& rFltNm ) SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, bool bNDoc ) { - pNumRuleTable = new SwNumRuleTable(); + pNumRuleTable = new SwNumRuleTable; pNumRuleTable->reserve(8); if( !bNDoc ) pNumRuleTable->insert( pNumRuleTable->begin(), diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx index 37463e9e1ea5..1b6955acd873 100644 --- a/sw/source/filter/rtf/swparrtf.cxx +++ b/sw/source/filter/rtf/swparrtf.cxx @@ -155,7 +155,7 @@ sal_uLong SwRTFReader::Read(SwDoc& rDoc, const OUString& /*rBaseURL*/, SwPaM& rP extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF() { - return new SwRTFReader(); + return new SwRTFReader; } extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportRTF(const OUString& rURL) diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index e7e209e8c52b..6e3ba3d9af85 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -324,7 +324,7 @@ bool Writer::CopyLocalFileToINet( OUString& rFileNm ) } else { - m_pImpl->pFileNameMap.reset( new std::map<OUString, OUString>() ); + m_pImpl->pFileNameMap.reset( new std::map<OUString, OUString> ); } OUString aSrc = rFileNm; diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx index 17a592db61db..a66ab0b35472 100644 --- a/sw/source/filter/ww8/docxattributeoutput.cxx +++ b/sw/source/filter/ww8/docxattributeoutput.cxx @@ -461,7 +461,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT comphelper::FlagRestorationGuard aStartedParaSdtGuard(m_bStartedParaSdt, false); assert(!m_pPostponedCustomShape); - m_pPostponedCustomShape.reset(new std::list<PostponedDrawing>()); + m_pPostponedCustomShape.reset(new std::list<PostponedDrawing>); for (size_t nIndex = 0; nIndex < m_aFramesOfParagraph.size(); ++nIndex) { m_bParagraphFrameOpen = true; @@ -1720,19 +1720,19 @@ void DocxAttributeOutput::StartRunProperties() InitCollectedRunProperties(); OSL_ASSERT( !m_pPostponedGraphic ); - m_pPostponedGraphic.reset(new std::list<PostponedGraphic>()); + m_pPostponedGraphic.reset(new std::list<PostponedGraphic>); OSL_ASSERT( !m_pPostponedDiagrams ); - m_pPostponedDiagrams.reset(new std::list<PostponedDiagram>()); + m_pPostponedDiagrams.reset(new std::list<PostponedDiagram>); OSL_ASSERT( !m_pPostponedVMLDrawings ); - m_pPostponedVMLDrawings.reset(new std::list<PostponedDrawing>()); + m_pPostponedVMLDrawings.reset(new std::list<PostponedDrawing>); assert(!m_pPostponedDMLDrawings); - m_pPostponedDMLDrawings.reset(new std::list<PostponedDrawing>()); + m_pPostponedDMLDrawings.reset(new std::list<PostponedDrawing>); assert( !m_pPostponedOLEs ); - m_pPostponedOLEs.reset(new std::list<PostponedOLE>()); + m_pPostponedOLEs.reset(new std::list<PostponedOLE>); } void DocxAttributeOutput::InitCollectedRunProperties() diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx index 11115fab62ba..b1604c50eaba 100644 --- a/sw/source/filter/ww8/wrtww8.cxx +++ b/sw/source/filter/ww8/wrtww8.cxx @@ -1959,7 +1959,7 @@ void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd ) if ( !pO->empty() ) { rData.pOOld = pO; - pO = new ww::bytes(); + pO = new ww::bytes; } else rData.pOOld = nullptr; // reuse pO @@ -3262,7 +3262,7 @@ void WW8Export::ExportDocument_Impl() m_pPapPlc = new WW8_WrPlcPn( *this, PAP, pFib->m_fcMin ); m_pChpPlc = new WW8_WrPlcPn( *this, CHP, pFib->m_fcMin ); - pO = new ww::bytes(); + pO = new ww::bytes; m_pStyles = new MSWordStyles( *this ); m_pFieldMain = new WW8_WrPlcField( 2, TXT_MAINTEXT ); m_pFieldHdFt = new WW8_WrPlcField( 2, TXT_HDFT ); diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 29c0a35a7580..5e09ceed4168 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -6064,7 +6064,7 @@ void SwWW8ImplReader::GetSmartTagInfo(SwFltRDFMark& rMark) { if (!m_pSmartTagData && m_pWwFib->m_lcbFactoidData) { - m_pSmartTagData.reset(new WW8SmartTagData()); + m_pSmartTagData.reset(new WW8SmartTagData); m_pSmartTagData->Read(*m_pTableStream, m_pWwFib->m_fcFactoidData, m_pWwFib->m_lcbFactoidData); } @@ -6187,7 +6187,7 @@ sal_uLong SwWW8ImplReader::LoadDoc(WW8Glossary *pGloss) extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC() { - return new WW8Reader(); + return new WW8Reader; } extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL TestImportDOC(const OUString &rURL, const OUString &rFltName) diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx index e8b4278a2ff1..a8e50da33149 100644 --- a/sw/source/filter/xml/xmltble.cxx +++ b/sw/source/filter/xml/xmltble.cxx @@ -569,7 +569,7 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines, // pass 1: calculate columns SwXMLTableLines_Impl *pLines = new SwXMLTableLines_Impl( rLines ); if( !m_pTableLines ) - m_pTableLines = new SwXMLTableLinesCache_Impl(); + m_pTableLines = new SwXMLTableLinesCache_Impl; m_pTableLines->push_back( pLines ); diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx index 6e0f347f715f..624ebfe560b7 100644 --- a/sw/source/filter/xml/xmltbli.cxx +++ b/sw/source/filter/xml/xmltbli.cxx @@ -1809,7 +1809,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat( bool* pModifyLocked ) { if ( m_pSharedBoxFormats == nullptr ) - m_pSharedBoxFormats = new map_BoxFormat(); + m_pSharedBoxFormats = new map_BoxFormat; SwTableBoxFormat* pBoxFormat2; diff --git a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx index 722ca6068a8f..76e58c39609f 100644 --- a/sw/source/uibase/docvw/frmsidebarwincontainer.cxx +++ b/sw/source/uibase/docvw/frmsidebarwincontainer.cxx @@ -65,7 +65,7 @@ class FrameSidebarWinContainer : public FrameSidebarWinContainer_ }; SwFrameSidebarWinContainer::SwFrameSidebarWinContainer() - : mpFrameSidebarWinContainer( new FrameSidebarWinContainer() ) + : mpFrameSidebarWinContainer( new FrameSidebarWinContainer ) {} SwFrameSidebarWinContainer::~SwFrameSidebarWinContainer() |