summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-03-27 08:55:47 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-03-28 11:13:21 +0100
commitde6f36cc2fb359332205ba836f8396a1cdbe44c2 (patch)
treea7b4dfcd77bffe4ca90c2f5763aa5ef9b20a5c39 /sw
parent1d39c5aa7bd6419060ed10d9fbdc2a643000f363 (diff)
simplify reset(nullptr) -> reset()
Change-Id: Iec5e93d9c59dde44571376e46fb98ea854e16b6c Reviewed-on: https://gerrit.libreoffice.org/69784 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/table/swtable.cxx4
-rw-r--r--sw/source/core/undo/unattr.cxx7
-rw-r--r--sw/source/core/undo/unsect.cxx2
-rw-r--r--sw/source/core/undo/untbl.cxx2
-rw-r--r--sw/source/core/unocore/unotext.cxx2
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx12
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx6
-rw-r--r--sw/source/uibase/dochdl/swdtflvr.cxx2
8 files changed, 18 insertions, 19 deletions
diff --git a/sw/source/core/table/swtable.cxx b/sw/source/core/table/swtable.cxx
index 18050a1e0202..6617665698ea 100644
--- a/sw/source/core/table/swtable.cxx
+++ b/sw/source/core/table/swtable.cxx
@@ -88,7 +88,7 @@ inline void SwTableBox::SetSaveUserColor(const Color* p )
if (p)
mpUserColor.reset(new Color(*p));
else
- mpUserColor.reset(nullptr);
+ mpUserColor.reset();
}
inline void SwTableBox::SetSaveNumFormatColor( const Color* p )
@@ -96,7 +96,7 @@ inline void SwTableBox::SetSaveNumFormatColor( const Color* p )
if (p)
mpNumFormatColor.reset(new Color(*p));
else
- mpNumFormatColor.reset(nullptr);
+ mpNumFormatColor.reset();
}
long SwTableBox::getRowSpan() const
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx
index 90850dedf90c..86cf73bef4c3 100644
--- a/sw/source/core/undo/unattr.cxx
+++ b/sw/source/core/undo/unattr.cxx
@@ -699,9 +699,8 @@ void SwUndoAttr::SaveRedlineData( const SwPaM& rPam, bool bIsContent )
}
m_pRedlineSaveData.reset( new SwRedlineSaveDatas );
- if ( !FillSaveDataForFormat( rPam, *m_pRedlineSaveData )) {
- m_pRedlineSaveData.reset(nullptr);
- }
+ if ( !FillSaveDataForFormat( rPam, *m_pRedlineSaveData ))
+ m_pRedlineSaveData.reset();
SetRedlineFlags( pDoc->getIDocumentRedlineAccess().GetRedlineFlags() );
if ( bIsContent ) {
@@ -857,7 +856,7 @@ void SwUndoDefaultAttr::UndoImpl(::sw::UndoRedoContext & rContext)
SwUndoFormatAttrHelper aTmp(
*rDoc.GetDfltTextFormatColl() );
rDoc.SetDefault( *m_pOldSet );
- m_pOldSet.reset( nullptr );
+ m_pOldSet.reset();
if ( aTmp.GetUndo() ) {
// transfer ownership of helper object's old set
m_pOldSet = std::move(aTmp.GetUndo()->m_pOldSet);
diff --git a/sw/source/core/undo/unsect.cxx b/sw/source/core/undo/unsect.cxx
index d00c29ef868a..f449639a7937 100644
--- a/sw/source/core/undo/unsect.cxx
+++ b/sw/source/core/undo/unsect.cxx
@@ -96,7 +96,7 @@ SwUndoInsSection::SwUndoInsSection(
}
m_pRedlineSaveData.reset( new SwRedlineSaveDatas );
if( !FillSaveData( rPam, *m_pRedlineSaveData, false ))
- m_pRedlineSaveData.reset( nullptr );
+ m_pRedlineSaveData.reset();
if( !rPam.HasMark() )
{
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 9c3d75fc81ff..2caf8836d338 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -3080,7 +3080,7 @@ void SwUndoTableStyleMake::RedoImpl(::sw::UndoRedoContext & rContext)
if (pFormat)
{
*pFormat = *m_pAutoFormat;
- m_pAutoFormat.reset(nullptr);
+ m_pAutoFormat.reset();
}
}
}
diff --git a/sw/source/core/unocore/unotext.cxx b/sw/source/core/unocore/unotext.cxx
index 6caefea72e0f..e7a9a336cb53 100644
--- a/sw/source/core/unocore/unotext.cxx
+++ b/sw/source/core/unocore/unotext.cxx
@@ -1640,7 +1640,7 @@ SwXText::convertToTextFrame(
}
aStartPam.SetMark();
*aStartPam.End() = *pEndPam->End();
- pEndPam.reset(nullptr);
+ pEndPam.reset();
// see if there are frames already anchored to this node
// we have to work with the SdrObjects, as unique name is not guaranteed in their frame format
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 2c058f07fd48..969c2f2e830f 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -740,7 +740,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
WritePostponedCustomShape();
m_pSerializer->endElementNS( XML_w, XML_r );
}
- m_pPostponedCustomShape.reset(nullptr);
+ m_pPostponedCustomShape.reset();
m_aFramesOfParagraph.clear();
@@ -2615,7 +2615,7 @@ void DocxAttributeOutput::WritePostponedGraphic()
FlyFrameGraphic(rPostponedDiagram.grfNode, rPostponedDiagram.size,
nullptr, nullptr,
rPostponedDiagram.pSdrObj);
- m_pPostponedGraphic.reset(nullptr);
+ m_pPostponedGraphic.reset();
}
void DocxAttributeOutput::WritePostponedDiagram()
@@ -2623,7 +2623,7 @@ void DocxAttributeOutput::WritePostponedDiagram()
for( const auto & rPostponedDiagram : *m_pPostponedDiagrams )
m_rExport.SdrExporter().writeDiagram(rPostponedDiagram.object,
*rPostponedDiagram.frame, m_anchorId++);
- m_pPostponedDiagrams.reset(nullptr);
+ m_pPostponedDiagrams.reset();
}
bool DocxAttributeOutput::FootnoteEndnoteRefTag()
@@ -3557,7 +3557,7 @@ void DocxAttributeOutput::EndTable()
m_tableReference->m_bTableCellOpen = true;
// Cleans the table helper
- m_xTableWrt.reset(nullptr);
+ m_xTableWrt.reset();
m_aTableStyleConf.clear();
}
@@ -5448,7 +5448,7 @@ void DocxAttributeOutput::WritePostponedOLE()
}
// clear list of postponed objects
- m_pPostponedOLEs.reset(nullptr);
+ m_pPostponedOLEs.reset();
}
void DocxAttributeOutput::WriteOLE( SwOLENode& rNode, const Size& rSize, const SwFlyFrameFormat* rFlyFrameFormat )
@@ -5578,7 +5578,7 @@ void DocxAttributeOutput::WritePostponedCustomShape()
else
m_rExport.SdrExporter().writeDMLAndVMLDrawing(rPostponedDrawing.object, *rPostponedDrawing.frame, m_anchorId++);
}
- m_pPostponedCustomShape.reset(nullptr);
+ m_pPostponedCustomShape.reset();
}
void DocxAttributeOutput::WritePostponedDMLDrawing()
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index b5462838ec55..554fc7291a22 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -947,7 +947,7 @@ void RtfAttributeOutput::InitTableHelper(
void RtfAttributeOutput::StartTable()
{
// To trigger calling InitTableHelper()
- m_pTableWrt.reset(nullptr);
+ m_pTableWrt.reset();
}
void RtfAttributeOutput::StartTableRow(
@@ -1043,7 +1043,7 @@ void RtfAttributeOutput::EndTable()
if (m_nTableDepth > 0)
{
m_nTableDepth--;
- m_pTableWrt.reset(nullptr);
+ m_pTableWrt.reset();
}
// We closed the table; if it is a nested table, the cell that contains it
@@ -1051,7 +1051,7 @@ void RtfAttributeOutput::EndTable()
m_bTableCellOpen = true;
// Cleans the table helper
- m_pTableWrt.reset(nullptr);
+ m_pTableWrt.reset();
}
void RtfAttributeOutput::FinishTableRowCell(const ww8::WW8TableNodeInfoInner::Pointer_t& pInner)
diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx b/sw/source/uibase/dochdl/swdtflvr.cxx
index 92861844acba..e74e3b7af3ca 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -1118,7 +1118,7 @@ void SwPasteContext::remember()
m_nStartContent = pCursor->GetPoint()->nContent.GetIndex();
}
-void SwPasteContext::forget() { m_pPaM.reset(nullptr); }
+void SwPasteContext::forget() { m_pPaM.reset(); }
SwPasteContext::~SwPasteContext()
{