diff options
Diffstat (limited to 'sc/source/core/data')
-rw-r--r-- | sc/source/core/data/cellvalues.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/colorscale.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/documen3.cxx | 8 | ||||
-rw-r--r-- | sc/source/core/data/documen5.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/documen8.cxx | 6 | ||||
-rw-r--r-- | sc/source/core/data/document.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 16 | ||||
-rw-r--r-- | sc/source/core/data/dptabsrc.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/markdata.cxx | 11 | ||||
-rw-r--r-- | sc/source/core/data/pivot2.cxx | 2 | ||||
-rw-r--r-- | sc/source/core/data/postit.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/simpleformulacalc.cxx | 2 |
12 files changed, 33 insertions, 28 deletions
diff --git a/sc/source/core/data/cellvalues.cxx b/sc/source/core/data/cellvalues.cxx index 459322e39608..8854f0d8763f 100644 --- a/sc/source/core/data/cellvalues.cxx +++ b/sc/source/core/data/cellvalues.cxx @@ -270,7 +270,7 @@ struct TableValues::Impl m_Tables.push_back(o3tl::make_unique<TableType>()); std::unique_ptr<TableType>& rTab2 = m_Tables.back(); for (size_t nCol = 0; nCol < nCols; ++nCol) - rTab2.get()->push_back(o3tl::make_unique<CellValues>()); + rTab2->push_back(o3tl::make_unique<CellValues>()); } } @@ -287,7 +287,7 @@ struct TableValues::Impl return nullptr; std::unique_ptr<TableType>& rTab2 = m_Tables[nTab-maRange.aStart.Tab()]; size_t nColOffset = nCol - maRange.aStart.Col(); - if(nColOffset >= rTab2.get()->size()) + if (nColOffset >= rTab2->size()) return nullptr; return &rTab2.get()[0][nColOffset].get()[0]; } diff --git a/sc/source/core/data/colorscale.cxx b/sc/source/core/data/colorscale.cxx index 84b73e269dd6..c53e2774b0d5 100644 --- a/sc/source/core/data/colorscale.cxx +++ b/sc/source/core/data/colorscale.cxx @@ -936,7 +936,7 @@ std::unique_ptr<ScDataBarInfo> ScDataBarFormat::GetDataBarInfo(const ScAddress& { if(mpFormatData->mpNegativeColor) { - pInfo->maColor = *mpFormatData->mpNegativeColor.get(); + pInfo->maColor = *mpFormatData->mpNegativeColor; } else { diff --git a/sc/source/core/data/documen3.cxx b/sc/source/core/data/documen3.cxx index 3ea09da33e0d..6854602b9c49 100644 --- a/sc/source/core/data/documen3.cxx +++ b/sc/source/core/data/documen3.cxx @@ -400,7 +400,7 @@ ScDPObject* ScDocument::GetDPAtBlock( const ScRange & rBlock ) const void ScDocument::StopTemporaryChartLock() { - if( apTemporaryChartLock.get() ) + if (apTemporaryChartLock) apTemporaryChartLock->StopLocking(); } @@ -615,7 +615,7 @@ bool ScDocument::LinkExternalTab( SCTAB& rTab, const OUString& aDocTab, ScExternalRefManager* ScDocument::GetExternalRefManager() const { ScDocument* pThis = const_cast<ScDocument*>(this); - if (!pExternalRefMgr.get()) + if (!pExternalRefMgr) pThis->pExternalRefMgr.reset( new ScExternalRefManager( pThis)); return pExternalRefMgr.get(); @@ -628,7 +628,7 @@ bool ScDocument::IsInExternalReferenceMarking() const void ScDocument::MarkUsedExternalReferences() { - if (!pExternalRefMgr.get()) + if (!pExternalRefMgr) return; if (!pExternalRefMgr->hasExternalData()) return; @@ -643,7 +643,7 @@ void ScDocument::MarkUsedExternalReferences() ScFormulaParserPool& ScDocument::GetFormulaParserPool() const { - if( !mxFormulaParserPool.get() ) + if (!mxFormulaParserPool) mxFormulaParserPool.reset( new ScFormulaParserPool( *this ) ); return *mxFormulaParserPool; } diff --git a/sc/source/core/data/documen5.cxx b/sc/source/core/data/documen5.cxx index bf92c9d2d3e7..ccd20606a95e 100644 --- a/sc/source/core/data/documen5.cxx +++ b/sc/source/core/data/documen5.cxx @@ -348,7 +348,7 @@ void ScDocument::UpdateChart( const OUString& rChartName ) try { uno::Reference< util::XModifiable > xModif( xChartDoc, uno::UNO_QUERY_THROW ); - if( apTemporaryChartLock.get() ) + if (apTemporaryChartLock) apTemporaryChartLock->AlsoLockThisChart( uno::Reference< frame::XModel >( xModif, uno::UNO_QUERY ) ); xModif->setModified( true ); } diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index 4fe7bb85ce11..2e4ccbc28e1a 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -386,7 +386,7 @@ EEHorizontalTextDirection ScDocument::GetEditTextDirection(SCTAB nTab) const ScMacroManager* ScDocument::GetMacroManager() { - if (!mpMacroMgr.get()) + if (!mpMacroMgr) mpMacroMgr.reset(new ScMacroManager(this)); return mpMacroMgr.get(); } @@ -811,7 +811,7 @@ bool ScDocument::IsInLinkUpdate() const void ScDocument::UpdateExternalRefLinks(vcl::Window* pWin) { - if (!pExternalRefMgr.get()) + if (!pExternalRefMgr) return; sfx2::LinkManager* pMgr = GetDocLinkManager().getLinkManager(bAutoCalc); @@ -1205,7 +1205,7 @@ void ScDocument::KeyInput() { if ( pChartListenerCollection->hasListeners() ) pChartListenerCollection->StartTimer(); - if( apTemporaryChartLock.get() ) + if (apTemporaryChartLock) apTemporaryChartLock->StartOrContinueLocking(); } diff --git a/sc/source/core/data/document.cxx b/sc/source/core/data/document.cxx index 5126ebbf417d..230891d2d402 100644 --- a/sc/source/core/data/document.cxx +++ b/sc/source/core/data/document.cxx @@ -2548,7 +2548,7 @@ void ScDocument::MergeNumberFormatter(const ScDocument* pSrcDoc) ScClipParam& ScDocument::GetClipParam() { - if (!mpClipParam.get()) + if (!mpClipParam) mpClipParam.reset(new ScClipParam); return *mpClipParam; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index 02ffea06dd47..8d10bb32f9c6 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -3163,7 +3163,7 @@ void ScDPCollection::NameCaches::updateCache( return; } - ScDPCache& rCache = *itr->second.get(); + ScDPCache& rCache = *itr->second; // Update the cache with new cell values. This will clear all group dimension info. rCache.InitFromDoc(mpDoc, rRange); @@ -3556,7 +3556,7 @@ bool ScDPCollection::GetReferenceGroups(const ScDPObject& rDPObj, const ScDPDime { for (const std::unique_ptr<ScDPObject>& aTable : maTables) { - const ScDPObject& rRefObj = *aTable.get(); + const ScDPObject& rRefObj = *aTable; if (&rRefObj == &rDPObj) continue; @@ -3639,7 +3639,7 @@ void ScDPCollection::CopyToTab( SCTAB nOld, SCTAB nNew ) TablesType::const_iterator it = maTables.begin(), itEnd = maTables.end(); for (; it != itEnd; ++it) { - const ScDPObject& rObj = *it->get(); + const ScDPObject& rObj = **it; ScRange aOutRange = rObj.GetOutRange(); if (aOutRange.aStart.Tab() != nOld) continue; @@ -3664,7 +3664,7 @@ bool ScDPCollection::RefsEqual( const ScDPCollection& r ) const TablesType::const_iterator itr = maTables.begin(), itr2 = r.maTables.begin(), itrEnd = maTables.end(); for (; itr != itrEnd; ++itr, ++itr2) - if (!(*itr)->RefsEqual(*itr2->get())) + if (!(*itr)->RefsEqual(**itr2)) return false; return true; @@ -3678,7 +3678,7 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const TablesType::const_iterator itr = maTables.begin(), itrEnd = maTables.end(); TablesType::iterator itr2 = r.maTables.begin(); for (; itr != itrEnd; ++itr, ++itr2) - (*itr)->WriteRefsTo(*itr2->get()); + (*itr)->WriteRefsTo(**itr2); } else { @@ -3897,7 +3897,7 @@ void ScDPCollection::GetAllTables(const ScRange& rSrcRange, std::set<ScDPObject* TablesType::const_iterator it = maTables.begin(), itEnd = maTables.end(); for (; it != itEnd; ++it) { - const ScDPObject& rObj = *it->get(); + const ScDPObject& rObj = **it; if (!rObj.IsSheetData()) // Source is not a sheet range. continue; @@ -3926,7 +3926,7 @@ void ScDPCollection::GetAllTables(const OUString& rSrcName, std::set<ScDPObject* TablesType::const_iterator it = maTables.begin(), itEnd = maTables.end(); for (; it != itEnd; ++it) { - const ScDPObject& rObj = *it->get(); + const ScDPObject& rObj = **it; if (!rObj.IsSheetData()) // Source is not a sheet range. continue; @@ -3957,7 +3957,7 @@ void ScDPCollection::GetAllTables( TablesType::const_iterator it = maTables.begin(), itEnd = maTables.end(); for (; it != itEnd; ++it) { - const ScDPObject& rObj = *it->get(); + const ScDPObject& rObj = **it; if (!rObj.IsImportData()) // Source data is not a database. continue; diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index d304e1f5c817..1dec7ca8b50e 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -2367,7 +2367,7 @@ long ScDPMembers::getMinMembers() const { // count only visible with details (default is true for both) const rtl::Reference<ScDPMember>& pMbr = *it; - if (!pMbr.get() || (pMbr->isVisible() && pMbr->getShowDetails())) + if (!pMbr || (pMbr->isVisible() && pMbr->getShowDetails())) ++nVisCount; } } diff --git a/sc/source/core/data/markdata.cxx b/sc/source/core/data/markdata.cxx index eadff07dc455..0fe000d9a50c 100644 --- a/sc/source/core/data/markdata.cxx +++ b/sc/source/core/data/markdata.cxx @@ -695,8 +695,12 @@ void ScMarkData::GetSelectionCover( ScRange& rRange ) pCurColMarkedRows.reset( new ScFlatBoolRowSegments() ); pCurColMarkedRows->setFalse( 0, MAXROW ); ScMultiSelIter aMultiIter( aMultiSel, nCol ); - ScFlatBoolRowSegments::ForwardIterator aPrevItr ( pPrevColMarkedRows.get() ? *pPrevColMarkedRows : aNoRowsMarked ); // For finding left envelope - ScFlatBoolRowSegments::ForwardIterator aPrevItr1( pPrevColMarkedRows.get() ? *pPrevColMarkedRows : aNoRowsMarked ); // For finding right envelope + ScFlatBoolRowSegments::ForwardIterator aPrevItr( + pPrevColMarkedRows ? *pPrevColMarkedRows + : aNoRowsMarked); // For finding left envelope + ScFlatBoolRowSegments::ForwardIterator aPrevItr1( + pPrevColMarkedRows ? *pPrevColMarkedRows + : aNoRowsMarked); // For finding right envelope SCROW nTopPrev = 0, nBottomPrev = 0; // For right envelope while ( aMultiIter.Next( nTop, nBottom ) ) { @@ -813,7 +817,8 @@ void ScMarkData::GetSelectionCover( ScRange& rRange ) bPrevColUnMarked = true; SCROW nTopPrev = 0, nBottomPrev = 0; bool bRangeMarked = false; - ScFlatBoolRowSegments::ForwardIterator aPrevItr( pPrevColMarkedRows.get() ? *pPrevColMarkedRows : aNoRowsMarked ); + ScFlatBoolRowSegments::ForwardIterator aPrevItr( + pPrevColMarkedRows ? *pPrevColMarkedRows : aNoRowsMarked); while( nTopPrev <= MAXROW && nBottomPrev <= MAXROW ) { const bool bHasValue = aPrevItr.getValue(nTopPrev, bRangeMarked); diff --git a/sc/source/core/data/pivot2.cxx b/sc/source/core/data/pivot2.cxx index 0e9371ee4b27..70e6d5a1aba4 100644 --- a/sc/source/core/data/pivot2.cxx +++ b/sc/source/core/data/pivot2.cxx @@ -144,7 +144,7 @@ void ScPivotParam::SetLabelData(const ScDPLabelDataVector& rVector) ScDPLabelDataVector::const_iterator it; for (it = rVector.begin(); it != rVector.end(); ++it) { - aNewArray.push_back(o3tl::make_unique<ScDPLabelData>(*it->get())); + aNewArray.push_back(o3tl::make_unique<ScDPLabelData>(**it)); } maLabelArray.swap(aNewArray); } diff --git a/sc/source/core/data/postit.cxx b/sc/source/core/data/postit.cxx index c8727f55bd05..8e961ce28222 100644 --- a/sc/source/core/data/postit.cxx +++ b/sc/source/core/data/postit.cxx @@ -707,14 +707,14 @@ void ScPostIt::CreateCaptionFromInitData( const ScAddress& rPos ) const // transfer ownership of outliner object to caption, or set simple text OSL_ENSURE( rInitData.mxOutlinerObj.get() || !rInitData.maSimpleText.isEmpty(), "ScPostIt::CreateCaptionFromInitData - need either outliner para object or simple text" ); - if( rInitData.mxOutlinerObj.get() ) + if (rInitData.mxOutlinerObj) maNoteData.m_pCaption->SetOutlinerParaObject( std::move(rInitData.mxOutlinerObj) ); else maNoteData.m_pCaption->SetText( rInitData.maSimpleText ); // copy all items or set default items; reset shadow items ScCaptionUtil::SetDefaultItems( *maNoteData.m_pCaption, mrDoc ); - if( rInitData.mxItemSet.get() ) + if (rInitData.mxItemSet) ScCaptionUtil::SetCaptionItems( *maNoteData.m_pCaption, *rInitData.mxItemSet ); // set position and size of the caption object diff --git a/sc/source/core/data/simpleformulacalc.cxx b/sc/source/core/data/simpleformulacalc.cxx index 75bc35a322cb..3ed2c173f3c6 100644 --- a/sc/source/core/data/simpleformulacalc.cxx +++ b/sc/source/core/data/simpleformulacalc.cxx @@ -45,7 +45,7 @@ void ScSimpleFormulaCalculator::Calculate() return; mbCalculated = true; - ScInterpreter aInt(nullptr, mpDoc, mpDoc->GetNonThreadedContext(), maAddr, *mpCode.get()); + ScInterpreter aInt(nullptr, mpDoc, mpDoc->GetNonThreadedContext(), maAddr, *mpCode); std::unique_ptr<sfx2::LinkManager> pNewLinkMgr( new sfx2::LinkManager(mpDoc->GetDocumentShell()) ); aInt.SetLinkManager( pNewLinkMgr.get() ); |