diff options
23 files changed, 42 insertions, 57 deletions
diff --git a/dbaccess/source/ext/macromigration/migrationengine.cxx b/dbaccess/source/ext/macromigration/migrationengine.cxx index 80df6c2a1826..7ff4d349e935 100644 --- a/dbaccess/source/ext/macromigration/migrationengine.cxx +++ b/dbaccess/source/ext/macromigration/migrationengine.cxx @@ -1305,7 +1305,7 @@ namespace dbmm // now that the concrete scripts storage does not have any elements anymore, // remove it - xScriptsRoot.reset( nullptr ); // need to reset the storage to be allowed to remove it + xScriptsRoot.reset(nullptr); // need to reset the storage to be allowed to remove it aDocStorage.removeScriptTypeStorage( _eScriptType ); // done so far diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx index 1f910a6b1f21..e584858b3191 100644 --- a/desktop/source/app/app.cxx +++ b/desktop/source/app/app.cxx @@ -1731,8 +1731,8 @@ int Desktop::doShutdown() // be sure that path/language options gets destroyed before // UCB is deinitialized - pExecGlobals->pLanguageOptions.reset( nullptr ); - pExecGlobals->pPathOptions.reset( nullptr ); + pExecGlobals->pLanguageOptions.reset(); + pExecGlobals->pPathOptions.reset(); comphelper::ThreadPool::getSharedOptimalPool().shutdown(); diff --git a/desktop/source/deployment/manager/dp_manager.cxx b/desktop/source/deployment/manager/dp_manager.cxx index 12098a26a733..f4718e5c738f 100644 --- a/desktop/source/deployment/manager/dp_manager.cxx +++ b/desktop/source/deployment/manager/dp_manager.cxx @@ -486,7 +486,7 @@ void PackageManagerImpl::disposing() m_xLogFile.clear(); try_dispose( m_xRegistry ); m_xRegistry.clear(); - m_activePackagesDB.reset(nullptr); + m_activePackagesDB.reset(); m_xComponentContext.clear(); t_pm_helper::disposing(); diff --git a/libreofficekit/qa/unit/tiledrendering.cxx b/libreofficekit/qa/unit/tiledrendering.cxx index 7d605e7a5839..d0c128fb3a34 100644 --- a/libreofficekit/qa/unit/tiledrendering.cxx +++ b/libreofficekit/qa/unit/tiledrendering.cxx @@ -270,7 +270,7 @@ void TiledRenderingTest::testDocumentLoadLanguage(Office* pOffice) OString aResult = pDocument->getTextSelection("text/plain;charset=utf-8"); CPPUNIT_ASSERT_EQUAL(OString("3\n"), aResult); - pDocument.reset(nullptr); + pDocument.reset(); // FIXME: LOK will fail when trying to open a locked file remove(sLockFile.c_str()); diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index 8332746878fa..daccf44f62a6 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -837,7 +837,7 @@ void ScMarkData::GetSelectionCover( ScRange& rRange ) } } if ( bCurColUnMarked ) - pPrevColMarkedRows.reset( nullptr ); + pPrevColMarkedRows.reset(); else pPrevColMarkedRows = std::move( pCurColMarkedRows ); } diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx index c43afe218495..48a9c7d36dfa 100644 --- a/sd/source/ui/func/futext.cxx +++ b/sd/source/ui/func/futext.cxx @@ -158,7 +158,7 @@ void FuText::disposing() if(mpView) { if(mpView->SdrEndTextEdit() == SdrEndTextEditKind::Deleted) - mxTextObj.reset( nullptr ); + mxTextObj.reset(nullptr); // reset the RequestHandler of the used Outliner to the handler of the document ::Outliner* pOutliner = mpView->GetTextEditOutliner(); @@ -280,7 +280,7 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt) list. The call MarkObj further below accesses then the dead object. As a simple fix, we determine eHit after SdrEndTextEdit again, this returns then SdrHitKind::NONE. */ - mxTextObj.reset( nullptr ); + mxTextObj.reset(nullptr); eHit = mpView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt); } @@ -632,7 +632,7 @@ bool FuText::MouseButtonUp(const MouseEvent& rMEvt) if (bReset) { - mxTextObj.reset( nullptr ); + mxTextObj.reset(nullptr); } } diff --git a/sd/source/ui/view/OutlinerIterator.cxx b/sd/source/ui/view/OutlinerIterator.cxx index 7064b00fae00..f4a8cb06460d 100644 --- a/sd/source/ui/view/OutlinerIterator.cxx +++ b/sd/source/ui/view/OutlinerIterator.cxx @@ -656,7 +656,7 @@ void ViewIteratorImpl::SetPage (sal_Int32 nPageIndex) if (mpObjectIterator!=nullptr && mpObjectIterator->IsMore()) maPosition.mxObject.reset( mpObjectIterator->Next() ); else - maPosition.mxObject.reset( nullptr ); + maPosition.mxObject.reset(nullptr); maPosition.mnText = 0; if( !mbDirectionIsForward && maPosition.mxObject.is() ) @@ -679,8 +679,7 @@ void ViewIteratorImpl::Reverse() mpObjectIterator.reset(); // Move iterator to the current object. - ::tools::WeakReference<SdrObject> xObject = maPosition.mxObject; - maPosition.mxObject.reset(nullptr); + ::tools::WeakReference<SdrObject> xObject = std::move(maPosition.mxObject); if (!mpObjectIterator) return; diff --git a/sd/source/ui/view/outlview.cxx b/sd/source/ui/view/outlview.cxx index b6eb10851aab..1b8b91e0804a 100644 --- a/sd/source/ui/view/outlview.cxx +++ b/sd/source/ui/view/outlview.cxx @@ -757,7 +757,7 @@ IMPL_LINK_NOARG(OutlineView, BeginDropHdl, EditView*, void) IMPL_LINK_NOARG(OutlineView, EndDropHdl, EditView*, void) { - maDragAndDropModelGuard.reset(nullptr); + maDragAndDropModelGuard.reset(); } /** diff --git a/sfx2/source/appl/appquit.cxx b/sfx2/source/appl/appquit.cxx index 76474457f84c..77e27606f8ee 100644 --- a/sfx2/source/appl/appquit.cxx +++ b/sfx2/source/appl/appquit.cxx @@ -90,7 +90,7 @@ void SfxApplication::Deinitialize() #if HAVE_FEATURE_SCRIPTING BasicManagerRepository::resetApplicationBasicManager(); - pImpl->pBasicManager->reset( nullptr ); + pImpl->pBasicManager->reset(nullptr); // this will also delete pBasMgr #endif diff --git a/sfx2/source/doc/objxtor.cxx b/sfx2/source/doc/objxtor.cxx index 4bf33375a479..dc99a84414a8 100644 --- a/sfx2/source/doc/objxtor.cxx +++ b/sfx2/source/doc/objxtor.cxx @@ -316,7 +316,7 @@ SfxObjectShell::~SfxObjectShell() pSfxApp->ReleaseIndex(pImpl->nVisualDocumentNumber); // Destroy Basic-Manager - pImpl->aBasicManager.reset( nullptr ); + pImpl->aBasicManager.reset(nullptr); if ( pSfxApp && pSfxApp->GetDdeService() ) pSfxApp->RemoveDdeTopic( this ); diff --git a/svtools/source/control/valueset.cxx b/svtools/source/control/valueset.cxx index 0df2623e2523..3cd358f3759e 100644 --- a/svtools/source/control/valueset.cxx +++ b/svtools/source/control/valueset.cxx @@ -63,9 +63,6 @@ ValueSet::ValueSet( vcl::Window* pParent, WinBits nWinStyle ) : Control( pParent, nWinStyle ), maColor( COL_TRANSPARENT ) { - mpNoneItem.reset(nullptr); - mxScrollBar.reset(nullptr); - mnItemWidth = 0; mnItemHeight = 0; mnTextOffset = 0; @@ -400,9 +397,7 @@ void ValueSet::Format(vcl::RenderContext& rRenderContext) { nNoneHeight = 0; nNoneSpace = 0; - - if (mpNoneItem) - mpNoneItem.reset(nullptr); + mpNoneItem.reset(); } // calculate ScrollBar width @@ -2196,8 +2191,6 @@ SvtValueSet::SvtValueSet(std::unique_ptr<weld::ScrolledWindow> pScrolledWindow) { maVirDev->SetBackground(Application::GetSettings().GetStyleSettings().GetFaceColor()); - mpNoneItem.reset(nullptr); - mnItemWidth = 0; mnItemHeight = 0; mnTextOffset = 0; @@ -2944,9 +2937,7 @@ void SvtValueSet::Format(vcl::RenderContext const & rRenderContext) { nNoneHeight = 0; nNoneSpace = 0; - - if (mpNoneItem) - mpNoneItem.reset(nullptr); + mpNoneItem.reset(); } // calculate number of columns diff --git a/svx/source/sidebar/line/LinePropertyPanelBase.cxx b/svx/source/sidebar/line/LinePropertyPanelBase.cxx index e8de20e68a1f..5f21530637e4 100644 --- a/svx/source/sidebar/line/LinePropertyPanelBase.cxx +++ b/svx/source/sidebar/line/LinePropertyPanelBase.cxx @@ -283,7 +283,7 @@ void LinePropertyPanelBase::updateLineStyle(bool bDisabled, bool bSetOrDefault, } else { - mpStyleItem.reset(nullptr); + mpStyleItem.reset(); } SelectLineStyle(); @@ -392,7 +392,7 @@ void LinePropertyPanelBase::updateLineStart(bool bDisabled, bool bSetOrDefault, return; } - mpStartItem.reset(nullptr); + mpStartItem.reset(); SelectEndStyle(true); } @@ -416,7 +416,7 @@ void LinePropertyPanelBase::updateLineEnd(bool bDisabled, bool bSetOrDefault, return; } - mpEndItem.reset(nullptr); + mpEndItem.reset(); SelectEndStyle(false); } diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx index 63f24d0f9e30..b7790cd1a25d 100644 --- a/svx/source/unodraw/unoshape.cxx +++ b/svx/source/unodraw/unoshape.cxx @@ -239,7 +239,7 @@ void SvxShape::InvalidateSdrObject() if (HasSdrObjectOwnership()) return; - mpSdrObjectWeakReference.reset( nullptr ); + mpSdrObjectWeakReference.reset(nullptr); }; bool SvxShape::HasSdrObjectOwnership() const @@ -1029,7 +1029,7 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw() if( !xSelf.is() ) { EndListening(GetSdrObject()->getSdrModelFromSdrObject()); - mpSdrObjectWeakReference.reset( nullptr ); + mpSdrObjectWeakReference.reset(nullptr); return; } 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() { diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx index 8bfe8b14a009..a8e0771cbea9 100644 --- a/unotools/source/ucbhelper/xtempfile.cxx +++ b/unotools/source/ucbhelper/xtempfile.cxx @@ -223,9 +223,7 @@ void SAL_CALL OTempFileService::closeInput( ) { // stream will be deleted by TempFile implementation mpStream = nullptr; - - if ( mpTempFile ) - mpTempFile.reset(nullptr); + mpTempFile.reset(); } } @@ -276,9 +274,7 @@ void SAL_CALL OTempFileService::closeOutput( ) { // stream will be deleted by TempFile implementation mpStream = nullptr; - - if ( mpTempFile ) - mpTempFile.reset(nullptr); + mpTempFile.reset(); } } diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 294fc93975cc..70b6056c15f4 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1389,7 +1389,7 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra // Process data after import. for (auto& rContext : aContexts) { - rContext.m_pAccess.reset(nullptr); + rContext.m_pAccess.reset(); if (rContext.m_nStatus == ERRCODE_NONE && (rContext.m_eLinkType != GfxLinkType::NONE) && !rContext.m_pGraphic->GetContext()) { |