summaryrefslogtreecommitdiff
path: root/sc/source
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source')
-rw-r--r--sc/source/core/data/cellvalues.cxx4
-rw-r--r--sc/source/core/data/colorscale.cxx2
-rw-r--r--sc/source/core/data/documen3.cxx8
-rw-r--r--sc/source/core/data/documen5.cxx2
-rw-r--r--sc/source/core/data/documen8.cxx6
-rw-r--r--sc/source/core/data/document.cxx2
-rw-r--r--sc/source/core/data/dpobject.cxx16
-rw-r--r--sc/source/core/data/dptabsrc.cxx2
-rw-r--r--sc/source/core/data/markdata.cxx11
-rw-r--r--sc/source/core/data/pivot2.cxx2
-rw-r--r--sc/source/core/data/postit.cxx4
-rw-r--r--sc/source/core/data/simpleformulacalc.cxx2
-rw-r--r--sc/source/core/tool/cellkeytranslator.cxx2
-rw-r--r--sc/source/core/tool/chartlis.cxx8
-rw-r--r--sc/source/core/tool/chartlock.cxx4
-rw-r--r--sc/source/core/tool/interpr1.cxx14
-rw-r--r--sc/source/core/tool/interpr4.cxx2
-rw-r--r--sc/source/core/tool/rangenam.cxx2
-rw-r--r--sc/source/core/tool/userlist.cxx8
-rw-r--r--sc/source/filter/excel/excel.cxx2
-rw-r--r--sc/source/filter/excel/tokstack.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx10
-rw-r--r--sc/source/filter/excel/xeextlst.cxx8
-rw-r--r--sc/source/filter/excel/xename.cxx7
-rw-r--r--sc/source/filter/excel/xicontent.cxx10
-rw-r--r--sc/source/filter/excel/xihelper.cxx2
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx8
-rw-r--r--sc/source/filter/oox/extlstcontext.cxx2
-rw-r--r--sc/source/filter/oox/worksheetfragment.cxx2
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx2
-rw-r--r--sc/source/filter/xcl97/xcl97esc.cxx2
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx8
-rw-r--r--sc/source/filter/xml/xmldrani.cxx6
-rw-r--r--sc/source/filter/xml/xmltabi.cxx6
-rw-r--r--sc/source/ui/Accessibility/AccessibleText.cxx8
-rw-r--r--sc/source/ui/app/inputwin.cxx5
-rw-r--r--sc/source/ui/condformat/condformatdlgentry.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx2
-rw-r--r--sc/source/ui/docshell/docfunc.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx4
-rw-r--r--sc/source/ui/miscdlgs/anyrefdg.cxx2
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx2
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx10
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx2
-rw-r--r--sc/source/ui/view/gridwin.cxx4
-rw-r--r--sc/source/ui/view/spelldialog.cxx3
-rw-r--r--sc/source/ui/view/tabview3.cxx5
47 files changed, 117 insertions, 112 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() );
diff --git a/sc/source/core/tool/cellkeytranslator.cxx b/sc/source/core/tool/cellkeytranslator.cxx
index 9eb0429fd69d..0b563804e58f 100644
--- a/sc/source/core/tool/cellkeytranslator.cxx
+++ b/sc/source/core/tool/cellkeytranslator.cxx
@@ -157,7 +157,7 @@ static void lclMatchKeyword(OUString& rName, const ScCellKeywordHashMap& aMap,
void ScCellKeywordTranslator::transKeyword(OUString& rName, const lang::Locale* pLocale, OpCode eOpCode)
{
- if ( !spInstance.get() )
+ if (!spInstance)
spInstance.reset( new ScCellKeywordTranslator );
LanguageType nLang = pLocale ?
diff --git a/sc/source/core/tool/chartlis.cxx b/sc/source/core/tool/chartlis.cxx
index 781859a7c4ae..80a974e382a4 100644
--- a/sc/source/core/tool/chartlis.cxx
+++ b/sc/source/core/tool/chartlis.cxx
@@ -119,7 +119,7 @@ ScChartListener::~ScChartListener()
EndListeningTo();
pUnoData.reset();
- if (mpExtRefListener.get())
+ if (mpExtRefListener)
{
// Stop listening to all external files.
ScExternalRefManager* pRefMgr = mpDoc->GetExternalRefManager();
@@ -263,7 +263,7 @@ private:
void ScChartListener::StartListeningTo()
{
- if (!mpTokens.get() || mpTokens->empty())
+ if (!mpTokens || mpTokens->empty())
// no references to listen to.
return;
@@ -272,7 +272,7 @@ void ScChartListener::StartListeningTo()
void ScChartListener::EndListeningTo()
{
- if (!mpTokens.get() || mpTokens->empty())
+ if (!mpTokens || mpTokens->empty())
// no references to listen to.
return;
@@ -303,7 +303,7 @@ void ScChartListener::UpdateChartIntersecting( const ScRange& rRange )
ScChartListener::ExternalRefListener* ScChartListener::GetExtRefListener()
{
- if (!mpExtRefListener.get())
+ if (!mpExtRefListener)
mpExtRefListener.reset(new ExternalRefListener(*this, mpDoc));
return mpExtRefListener.get();
diff --git a/sc/source/core/tool/chartlock.cxx b/sc/source/core/tool/chartlock.cxx
index fe52a1af994e..8e9bd2f7f7db 100644
--- a/sc/source/core/tool/chartlock.cxx
+++ b/sc/source/core/tool/chartlock.cxx
@@ -157,7 +157,7 @@ ScTemporaryChartLock::~ScTemporaryChartLock()
void ScTemporaryChartLock::StartOrContinueLocking()
{
- if(!mapScChartLockGuard.get())
+ if (!mapScChartLockGuard)
mapScChartLockGuard.reset( new ScChartLockGuard(mpDoc) );
maTimer.Start();
}
@@ -170,7 +170,7 @@ void ScTemporaryChartLock::StopLocking()
void ScTemporaryChartLock::AlsoLockThisChart( const Reference< frame::XModel >& xModel )
{
- if(mapScChartLockGuard.get())
+ if (mapScChartLockGuard)
mapScChartLockGuard->AlsoLockThisChart( xModel );
}
diff --git a/sc/source/core/tool/interpr1.cxx b/sc/source/core/tool/interpr1.cxx
index e585073f1d1c..dc23b55a43dc 100644
--- a/sc/source/core/tool/interpr1.cxx
+++ b/sc/source/core/tool/interpr1.cxx
@@ -7573,7 +7573,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
{
// First, get the query criteria range.
::std::unique_ptr<ScDBRangeBase> pQueryRef( PopDBDoubleRef() );
- if (!pQueryRef.get())
+ if (!pQueryRef)
return nullptr;
bool bByVal = true;
@@ -7635,7 +7635,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
unique_ptr<ScDBRangeBase> pDBRef( PopDBDoubleRef() );
- if (nGlobalError != FormulaError::NONE || !pDBRef.get())
+ if (nGlobalError != FormulaError::NONE || !pDBRef)
return nullptr;
if ( bRangeFake )
@@ -7667,7 +7667,7 @@ std::unique_ptr<ScDBQueryParamBase> ScInterpreter::GetDBParams( bool& rMissingFi
unique_ptr<ScDBQueryParamBase> pParam( pDBRef->createQueryParam(pQueryRef.get()) );
- if (pParam.get())
+ if (pParam)
{
// An allowed missing field parameter sets the result field
// to any of the query fields, just to be able to return
@@ -7706,7 +7706,7 @@ void ScInterpreter::DBIterator( ScIterFunc eFunc )
sal_uLong nCount = 0;
bool bMissingField = false;
unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
- if (pQueryParam.get())
+ if (pQueryParam)
{
if (!pQueryParam->IsValidFieldIndex())
{
@@ -7781,7 +7781,7 @@ void ScInterpreter::ScDBCount()
{
bool bMissingField = true;
unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
- if (pQueryParam.get())
+ if (pQueryParam)
{
sal_uLong nCount = 0;
if ( bMissingField && pQueryParam->GetType() == ScDBQueryParamBase::INTERNAL )
@@ -7839,7 +7839,7 @@ void ScInterpreter::ScDBCount2()
{
bool bMissingField = true;
unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
- if (pQueryParam.get())
+ if (pQueryParam)
{
if (!pQueryParam->IsValidFieldIndex())
{
@@ -7895,7 +7895,7 @@ void ScInterpreter::GetDBStVarParams( double& rVal, double& rValCount )
double fSum = 0.0;
bool bMissingField = false;
unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
- if (pQueryParam.get())
+ if (pQueryParam)
{
if (!pQueryParam->IsValidFieldIndex())
{
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index c47b33f8488c..2cc8bc184b4b 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -2472,7 +2472,7 @@ void ScInterpreter::ScDBGet()
{
bool bMissingField = false;
unique_ptr<ScDBQueryParamBase> pQueryParam( GetDBParams(bMissingField) );
- if (!pQueryParam.get())
+ if (!pQueryParam)
{
// Failed to create query param.
PushIllegalParameter();
diff --git a/sc/source/core/tool/rangenam.cxx b/sc/source/core/tool/rangenam.cxx
index c4ef813cdac3..ecadbc761a15 100644
--- a/sc/source/core/tool/rangenam.cxx
+++ b/sc/source/core/tool/rangenam.cxx
@@ -261,7 +261,7 @@ void ScRangeData::GetSymbol( OUString& rSymbol, const ScAddress& rPos, const For
void ScRangeData::UpdateSymbol( OUStringBuffer& rBuffer, const ScAddress& rPos )
{
std::unique_ptr<ScTokenArray> pTemp( pCode->Clone() );
- ScCompiler aComp( pDoc, rPos, *pTemp.get(), formula::FormulaGrammar::GRAM_DEFAULT);
+ ScCompiler aComp(pDoc, rPos, *pTemp, formula::FormulaGrammar::GRAM_DEFAULT);
aComp.MoveRelWrap(MAXCOL, MAXROW);
aComp.CreateStringFromTokenArray( rBuffer );
}
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index b3ee0cc8311c..b984ed0f8f1e 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -272,7 +272,7 @@ ScUserList::ScUserList()
ScUserList::ScUserList(const ScUserList& rOther)
{
for (const std::unique_ptr<ScUserListData>& rData : rOther.maData)
- maData.push_back( o3tl::make_unique<ScUserListData>(*rData.get()) );
+ maData.push_back(o3tl::make_unique<ScUserListData>(*rData));
}
const ScUserListData* ScUserList::GetData(const OUString& rSubStr) const
@@ -310,7 +310,7 @@ ScUserList& ScUserList::operator=( const ScUserList& rOther )
{
maData.clear();
for (const std::unique_ptr<ScUserListData>& rData : rOther.maData)
- maData.push_back( o3tl::make_unique<ScUserListData>(*rData.get()) );
+ maData.push_back(o3tl::make_unique<ScUserListData>(*rData));
return *this;
}
@@ -322,8 +322,8 @@ bool ScUserList::operator==( const ScUserList& r ) const
DataType::const_iterator itr1 = maData.begin(), itr2 = r.maData.begin(), itrEnd = maData.end();
for (; itr1 != itrEnd; ++itr1, ++itr2)
{
- const ScUserListData& v1 = *itr1->get();
- const ScUserListData& v2 = *itr2->get();
+ const ScUserListData& v1 = **itr1;
+ const ScUserListData& v2 = **itr2;
if (v1.GetString() != v2.GetString() || v1.GetSubCount() != v2.GetSubCount())
return false;
}
diff --git a/sc/source/filter/excel/excel.cxx b/sc/source/filter/excel/excel.cxx
index 8695ce24150a..221f274f3038 100644
--- a/sc/source/filter/excel/excel.cxx
+++ b/sc/source/filter/excel/excel.cxx
@@ -142,7 +142,7 @@ ErrCode ScFormatFilterPluginImpl::ScImportExcel( SfxMedium& rMedium, ScDocument*
default: DBG_ERROR_BIFF();
}
- eRet = xFilter.get() ? xFilter->Read() : SCERR_IMPORT_INTERNAL;
+ eRet = xFilter ? xFilter->Read() : SCERR_IMPORT_INTERNAL;
}
return eRet;
diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index c4b067db2b7e..730c26a77569 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -192,7 +192,7 @@ bool TokenPool::GetElement( const sal_uInt16 nId, ScTokenArray* pScToken )
sal_uInt16 n = pElement[ nId ];
auto* p = ppP_Str.getIfInRange( n );
if (p)
- pScToken->AddString(mrStringPool.intern(*p->get()));
+ pScToken->AddString(mrStringPool.intern(**p));
else
bRet = false;
}
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index a56f4d98bc23..43c9b98fe8cc 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1464,8 +1464,10 @@ XclExpDataBar::XclExpDataBar( const XclExpRoot& rRoot, const ScDataBarFormat& rF
const ScRange & rRange = rFormat.GetRange().front();
ScAddress aAddr = rRange.aStart;
// exact position is not important, we allow only absolute refs
- mpCfvoLowerLimit.reset( new XclExpCfvo( GetRoot(), *mrFormat.GetDataBarData()->mpLowerLimit.get(), aAddr, true ) );
- mpCfvoUpperLimit.reset( new XclExpCfvo( GetRoot(), *mrFormat.GetDataBarData()->mpUpperLimit.get(), aAddr, false ) );
+ mpCfvoLowerLimit.reset(
+ new XclExpCfvo(GetRoot(), *mrFormat.GetDataBarData()->mpLowerLimit, aAddr, true));
+ mpCfvoUpperLimit.reset(
+ new XclExpCfvo(GetRoot(), *mrFormat.GetDataBarData()->mpUpperLimit, aAddr, false));
mpCol.reset( new XclExpColScaleCol( GetRoot(), mrFormat.GetDataBarData()->maPositiveColor ) );
}
@@ -1712,7 +1714,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) :
// first formula
xScTokArr.reset( pValData->CreateFlatCopiedTokenArray( 0 ) );
- if( xScTokArr.get() )
+ if (xScTokArr)
{
if( pValData->GetDataMode() == SC_VALID_LIST )
{
@@ -1785,7 +1787,7 @@ XclExpDV::XclExpDV( const XclExpRoot& rRoot, sal_uLong nScHandle ) :
// second formula
xScTokArr.reset( pValData->CreateFlatCopiedTokenArray( 1 ) );
- if( xScTokArr.get() )
+ if (xScTokArr)
{
if(GetOutput() == EXC_OUTPUT_BINARY)
mxTokArr2 = rFmlaComp.CreateFormula( EXC_FMLATYPE_DATAVAL, *xScTokArr );
diff --git a/sc/source/filter/excel/xeextlst.cxx b/sc/source/filter/excel/xeextlst.cxx
index e4e040e6635e..f2c61bd158da 100644
--- a/sc/source/filter/excel/xeextlst.cxx
+++ b/sc/source/filter/excel/xeextlst.cxx
@@ -149,10 +149,10 @@ XclExpExtDataBar::XclExpExtDataBar( const XclExpRoot& rRoot, const ScDataBarForm
XclExpRoot(rRoot)
{
const ScDataBarFormatData& rFormatData = *rFormat.GetDataBarData();
- mpLowerLimit.reset( new XclExpExtCfvo( *this, *rFormatData.mpLowerLimit.get(), rPos, true ) );
- mpUpperLimit.reset( new XclExpExtCfvo( *this, *rFormatData.mpUpperLimit.get(), rPos, false ) );
- if(rFormatData.mpNegativeColor.get())
- mpNegativeColor.reset( new XclExpExtNegativeColor( *rFormatData.mpNegativeColor.get() ) );
+ mpLowerLimit.reset(new XclExpExtCfvo(*this, *rFormatData.mpLowerLimit, rPos, true));
+ mpUpperLimit.reset(new XclExpExtCfvo(*this, *rFormatData.mpUpperLimit, rPos, false));
+ if (rFormatData.mpNegativeColor)
+ mpNegativeColor.reset(new XclExpExtNegativeColor(*rFormatData.mpNegativeColor));
else
mpNegativeColor.reset( new XclExpExtNegativeColor( rFormatData.maPositiveColor ) );
mpAxisColor.reset( new XclExpExtAxisColor( rFormatData.maAxisColor ) );
diff --git a/sc/source/filter/excel/xename.cxx b/sc/source/filter/excel/xename.cxx
index 021bd342846d..68675bb77896 100644
--- a/sc/source/filter/excel/xename.cxx
+++ b/sc/source/filter/excel/xename.cxx
@@ -609,12 +609,13 @@ sal_uInt16 XclExpNameManagerImpl::CreateName( SCTAB nTab, const ScRangeData& rRa
{
// Don't modify the actual document; use a temporary copy to create the export formulas.
std::unique_ptr<ScTokenArray> pTokenCopy( pScTokArr->Clone() );
- lcl_EnsureAbs3DToken( nTab, pTokenCopy.get()->FirstToken() );
+ lcl_EnsureAbs3DToken(nTab, pTokenCopy->FirstToken());
- xTokArr = GetFormulaCompiler().CreateFormula( EXC_FMLATYPE_NAME, *pTokenCopy.get() );
+ xTokArr = GetFormulaCompiler().CreateFormula(EXC_FMLATYPE_NAME, *pTokenCopy);
if ( GetOutput() != EXC_OUTPUT_BINARY )
{
- ScCompiler aComp( &GetDocRef(), rRangeData.GetPos(), *pTokenCopy.get(), formula::FormulaGrammar::GRAM_OOXML );
+ ScCompiler aComp(&GetDocRef(), rRangeData.GetPos(), *pTokenCopy,
+ formula::FormulaGrammar::GRAM_OOXML);
aComp.CreateStringFromTokenArray( sSymbol );
}
}
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index ef72040f3c28..7f09ff16ab0d 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -331,14 +331,14 @@ OUString XclImpHyperlink::ReadEmbeddedData( XclImpStream& rStrm )
OSL_ENSURE( rStrm.GetRecLeft() == 0, "XclImpHyperlink::ReadEmbeddedData - record size mismatch" );
- if( !xLongName.get() && xShortName.get() )
+ if (!xLongName && xShortName.get())
xLongName = std::move(xShortName);
- else if( !xLongName.get() && xTextMark.get() )
+ else if (!xLongName && xTextMark.get())
xLongName.reset( new OUString );
- if( xLongName.get() )
+ if (xLongName)
{
- if( xTextMark.get() )
+ if (xTextMark)
{
if( xLongName->isEmpty() )
{
@@ -939,7 +939,7 @@ void XclImpValidationManager::Apply()
DVItemList::iterator itr = maDVItems.begin(), itrEnd = maDVItems.end();
for (; itr != itrEnd; ++itr)
{
- DVItem& rItem = *itr->get();
+ DVItem& rItem = **itr;
// set the handle ID
sal_uLong nHandle = rDoc.AddValidationEntry( rItem.maValidData );
ScPatternAttr aPattern( rDoc.GetPool() );
diff --git a/sc/source/filter/excel/xihelper.cxx b/sc/source/filter/excel/xihelper.cxx
index 5e60ef986917..260a5fd59db4 100644
--- a/sc/source/filter/excel/xihelper.cxx
+++ b/sc/source/filter/excel/xihelper.cxx
@@ -232,7 +232,7 @@ void XclImpStringHelper::SetToDocument(
::std::unique_ptr< EditTextObject > pTextObj( lclCreateTextObject( rRoot, rString, XclFontItemType::Editeng, nXFIndex ) );
- if (pTextObj.get())
+ if (pTextObj)
{
rDoc.setEditCell(rPos, std::move(pTextObj));
}
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 1655dbfd9af9..82c920203b61 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -306,8 +306,8 @@ void DataBarRule::importAttribs( const AttributeList& rAttribs )
void DataBarRule::SetData( ScDataBarFormat* pFormat, ScDocument* pDoc, const ScAddress& rAddr )
{
- ScColorScaleEntry* pUpperEntry = ConvertToModel( *mpUpperLimit.get(), pDoc, rAddr);
- ScColorScaleEntry* pLowerEntry = ConvertToModel( *mpLowerLimit.get(), pDoc, rAddr);
+ ScColorScaleEntry* pUpperEntry = ConvertToModel(*mpUpperLimit, pDoc, rAddr);
+ ScColorScaleEntry* pLowerEntry = ConvertToModel(*mpLowerLimit, pDoc, rAddr);
mxFormat->mpUpperLimit.reset( pUpperEntry );
mxFormat->mpLowerLimit.reset( pLowerEntry );
@@ -860,8 +860,8 @@ void CondFormatRule::finalizeImport()
if( maModel.maFormulas.size() >= 2)
{
pTokenArray2.reset(new ScTokenArray());
- ScTokenConversion::ConvertToTokenArray( rDoc, *pTokenArray2.get(), maModel.maFormulas[ 1 ] );
- rDoc.CheckLinkFormulaNeedingCheck( *pTokenArray2.get());
+ ScTokenConversion::ConvertToTokenArray(rDoc, *pTokenArray2, maModel.maFormulas[1]);
+ rDoc.CheckLinkFormulaNeedingCheck(*pTokenArray2);
}
ScTokenArray aTokenArray;
diff --git a/sc/source/filter/oox/extlstcontext.cxx b/sc/source/filter/oox/extlstcontext.cxx
index ebf2e06e9955..a4c779087c75 100644
--- a/sc/source/filter/oox/extlstcontext.cxx
+++ b/sc/source/filter/oox/extlstcontext.cxx
@@ -86,7 +86,7 @@ ContextHandlerRef ExtConditionalFormattingContext::onCreateContext(sal_Int32 nEl
{
if (mpCurrentRule)
{
- ScFormatEntry& rFormat = *maEntries.rbegin()->get();
+ ScFormatEntry& rFormat = **maEntries.rbegin();
assert(rFormat.GetType() == ScFormatEntry::Type::Iconset);
ScIconSetFormat& rIconSet = static_cast<ScIconSetFormat&>(rFormat);
ScDocument* pDoc = &getScDocument();
diff --git a/sc/source/filter/oox/worksheetfragment.cxx b/sc/source/filter/oox/worksheetfragment.cxx
index e910f6bda5c1..e0ff875fe1fb 100644
--- a/sc/source/filter/oox/worksheetfragment.cxx
+++ b/sc/source/filter/oox/worksheetfragment.cxx
@@ -78,7 +78,7 @@ const sal_uInt16 BIFF12_OLEOBJECT_AUTOLOAD = 0x0002;
void DataValidationsContextBase::SetValidation( WorksheetHelper& rTarget )
{
- if (!mxValModel.get())
+ if (!mxValModel)
return;
rTarget.getAddressConverter().convertToCellRangeList(mxValModel->maRanges, maSqref, rTarget.getSheetIndex(), true);
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index c6a143a743db..e2f8f8706431 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -222,7 +222,7 @@ void ScRTFParser::NewCellRow()
// Build up TwipCols only after nLastWidth comparison!
for (std::unique_ptr<ScRTFCellDefault> & pCellDefault : maDefaultList)
{
- const ScRTFCellDefault& rD = *pCellDefault.get();
+ const ScRTFCellDefault& rD = *pCellDefault;
SCCOL nCol;
if ( !SeekTwips(rD.nTwips, &nCol) )
aColTwips.insert( rD.nTwips );
diff --git a/sc/source/filter/xcl97/xcl97esc.cxx b/sc/source/filter/xcl97/xcl97esc.cxx
index bf3ecc400ab5..028b338bd1d5 100644
--- a/sc/source/filter/xcl97/xcl97esc.cxx
+++ b/sc/source/filter/xcl97/xcl97esc.cxx
@@ -443,7 +443,7 @@ std::unique_ptr<XclExpTbxControlObj> XclEscherEx::CreateTBXCtrlObj( Reference< X
if( xTbxCtrl->GetObjType() == EXC_OBJTYPE_UNKNOWN )
xTbxCtrl.reset();
- if( xTbxCtrl.get() )
+ if (xTbxCtrl)
{
// find attached macro
Reference< XControlModel > xCtrlModel = XclControlHelper::GetControlModel( xShape );
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index da250fbafe02..bf68d4a48b59 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -655,7 +655,9 @@ SvXMLImportContextRef ScXMLTableRowCellContext::CreateChildContext( sal_uInt16 n
case XML_TOK_TABLE_ROW_CELL_ANNOTATION:
{
bIsEmpty = false;
- OSL_ENSURE( !mxAnnotationData.get(), "ScXMLTableRowCellContext::CreateChildContext - multiple annotations in one cell" );
+ OSL_ENSURE(
+ !mxAnnotationData,
+ "ScXMLTableRowCellContext::CreateChildContext - multiple annotations in one cell");
mxAnnotationData.reset( new ScXMLAnnotationData );
pContext = new ScXMLAnnotationContext( rXMLImport, nPrefix, rLName,
xAttrList, *mxAnnotationData);
@@ -854,7 +856,7 @@ void ScXMLTableRowCellContext::SetContentValidation( const ScAddress& rCellPos )
void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
{
ScDocument* pDoc = rXMLImport.GetDocument();
- if( !pDoc || !mxAnnotationData.get() )
+ if (!pDoc || !mxAnnotationData)
return;
LockSolarMutex();
@@ -906,7 +908,7 @@ void ScXMLTableRowCellContext::SetAnnotation(const ScAddress& rPos)
nOldShapeCount = xShapesIA->getCount();
// an outliner object is required (empty note captions not allowed)
- if( xOutlinerObj.get() )
+ if (xOutlinerObj)
{
// create cell note with all data from drawing object
pNote = ScNoteUtil::CreateNoteFromObjectData( *pDoc, rPos,
diff --git a/sc/source/filter/xml/xmldrani.cxx b/sc/source/filter/xml/xmldrani.cxx
index 0861a23c7853..4fbb58b7d3e3 100644
--- a/sc/source/filter/xml/xmldrani.cxx
+++ b/sc/source/filter/xml/xmldrani.cxx
@@ -409,7 +409,7 @@ void SAL_CALL ScXMLDatabaseRangeContext::endFastElement( sal_Int32 /*nElement*/
{
::std::unique_ptr<ScDBData> pData(ConvertToDBData(STR_DB_LOCAL_NONAME));
- if (pData.get())
+ if (pData)
{
ScRange aRange;
pData->GetArea(aRange);
@@ -423,7 +423,7 @@ void SAL_CALL ScXMLDatabaseRangeContext::endFastElement( sal_Int32 /*nElement*/
{
::std::unique_ptr<ScDBData> pData(ConvertToDBData(STR_DB_GLOBAL_NONAME));
- if (pData.get())
+ if (pData)
{
ScRange aRange;
pData->GetArea(aRange);
@@ -439,7 +439,7 @@ void SAL_CALL ScXMLDatabaseRangeContext::endFastElement( sal_Int32 /*nElement*/
{
::std::unique_ptr<ScDBData> pData(ConvertToDBData(sDatabaseRangeName));
- if (pData.get())
+ if (pData)
{
setAutoFilterFlags(*pDoc, *pData);
(void)pDoc->GetDBCollection()->getNamedDBs().insert(std::move(pData));
diff --git a/sc/source/filter/xml/xmltabi.cxx b/sc/source/filter/xml/xmltabi.cxx
index 3d57c2e92ae1..6d3735ed35cf 100644
--- a/sc/source/filter/xml/xmltabi.cxx
+++ b/sc/source/filter/xml/xmltabi.cxx
@@ -217,7 +217,7 @@ SvXMLImportContextRef ScXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
{
const SvXMLTokenMap& rTokenMap(GetScImport().GetTableElemTokenMap());
sal_uInt16 nToken = rTokenMap.Get(nPrefix, rLName);
- if (pExternalRefInfo.get())
+ if (pExternalRefInfo)
{
return new SvXMLImportContext(GetImport(), nPrefix, rLName);
}
@@ -258,7 +258,7 @@ uno::Reference< xml::sax::XFastContextHandler > SAL_CALL
sax_fastparser::FastAttributeList *pAttribList =
sax_fastparser::FastAttributeList::castToFastAttributeList( xAttrList );
- if (pExternalRefInfo.get())
+ if (pExternalRefInfo)
{
// We only care about the table-row and table-source elements for
// external cache data.
@@ -420,7 +420,7 @@ void SAL_CALL ScXMLTableContext::endFastElement(sal_Int32 /*nElement*/)
rImport.ProgressBarIncrement();
// store stream positions
- if (!pExternalRefInfo.get() && nStartOffset >= 0 /* && nEndOffset >= 0 */)
+ if (!pExternalRefInfo && nStartOffset >= 0 /* && nEndOffset >= 0 */)
{
ScSheetSaveData* pSheetData = ScModelObj::getImplementation(rImport.GetModel())->GetSheetSaveData();
SCTAB nTab = rTables.GetCurrentSheet();
diff --git a/sc/source/ui/Accessibility/AccessibleText.cxx b/sc/source/ui/Accessibility/AccessibleText.cxx
index 7727f9b72581..33ee6abac74a 100644
--- a/sc/source/ui/Accessibility/AccessibleText.cxx
+++ b/sc/source/ui/Accessibility/AccessibleText.cxx
@@ -632,8 +632,8 @@ IMPL_LINK(ScAccessibleTextData, NotifyHdl, EENotify&, aNotify, void)
{
::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &aNotify );
- if( aHint.get() )
- GetBroadcaster().Broadcast( *aHint.get() );
+ if (aHint)
+ GetBroadcaster().Broadcast(*aHint);
}
ScDocShell* ScAccessibleCellTextData::GetDocShell(ScTabViewShell* pViewShell)
@@ -731,8 +731,8 @@ IMPL_LINK(ScAccessibleEditObjectTextData, NotifyHdl, EENotify&, rNotify, void)
{
::std::unique_ptr< SfxHint > aHint = SvxEditSourceHelper::EENotification2Hint( &rNotify );
- if( aHint.get() )
- GetBroadcaster().Broadcast( *aHint.get() );
+ if (aHint)
+ GetBroadcaster().Broadcast(*aHint);
}
ScAccessibleEditLineTextData::ScAccessibleEditLineTextData(EditView* pEditView, vcl::Window* pWin)
diff --git a/sc/source/ui/app/inputwin.cxx b/sc/source/ui/app/inputwin.cxx
index d116c9acc7c0..f976ea141ea5 100644
--- a/sc/source/ui/app/inputwin.cxx
+++ b/sc/source/ui/app/inputwin.cxx
@@ -1017,10 +1017,7 @@ EditView* ScTextWnd::GetEditView()
return mpEditView.get();
}
-bool ScTextWnd::HasEditView() const
-{
- return mpEditView.get() != nullptr;
-}
+bool ScTextWnd::HasEditView() const { return mpEditView != nullptr; }
long ScTextWnd::GetPixelHeightForLines(long nLines)
{
diff --git a/sc/source/ui/condformat/condformatdlgentry.cxx b/sc/source/ui/condformat/condformatdlgentry.cxx
index bf0fae46c56a..0916ee4fbda4 100644
--- a/sc/source/ui/condformat/condformatdlgentry.cxx
+++ b/sc/source/ui/condformat/condformatdlgentry.cxx
@@ -1156,7 +1156,7 @@ ScFormatEntry* ScDataBarFrmtEntry::createDatabarEntry() const
SetColorScaleEntry(mpDataBarData->mpLowerLimit.get(), *maLbDataBarMinType.get(), *maEdDataBarMin.get(), mpDoc, maPos, true);
SetColorScaleEntry(mpDataBarData->mpUpperLimit.get(), *maLbDataBarMaxType.get(), *maEdDataBarMax.get(), mpDoc, maPos, true);
ScDataBarFormat* pDataBar = new ScDataBarFormat(mpDoc);
- pDataBar->SetDataBarData(new ScDataBarFormatData(*mpDataBarData.get()));
+ pDataBar->SetDataBarData(new ScDataBarFormatData(*mpDataBarData));
return pDataBar;
}
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 8f9711ef28f4..08998266c7f2 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -804,7 +804,7 @@ void ScTPValidationError::Reset( const SfxItemSet* rArgSet )
else
m_xEdError->set_text( EMPTY_OUSTRING );
- SelectActionHdl( *m_xLbAction.get() );
+ SelectActionHdl(*m_xLbAction);
}
bool ScTPValidationError::FillItemSet( SfxItemSet* rArgSet )
diff --git a/sc/source/ui/docshell/docfunc.cxx b/sc/source/ui/docshell/docfunc.cxx
index dbc9ce389f37..6642cffdaf16 100644
--- a/sc/source/ui/docshell/docfunc.cxx
+++ b/sc/source/ui/docshell/docfunc.cxx
@@ -1101,7 +1101,7 @@ void ScDocFunc::PutData( const ScAddress& rPos, ScEditEngineDefaulter& rEngine,
ScMyRememberItemVector::iterator aItr = aRememberItems.begin();
while (aItr != aRememberItems.end())
{
- rEngine.SetParaAttribs((*aItr).get()->nIndex, (*aItr).get()->aItemSet);
+ rEngine.SetParaAttribs((*aItr)->nIndex, (*aItr)->aItemSet);
++aItr;
}
}
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 6085573db08b..f4ecb3879833 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1589,7 +1589,7 @@ static std::unique_ptr<ScTokenArray> convertToTokenArray(
// no data within specified range.
continue;
- if (pUsedRange.get())
+ if (pUsedRange)
// Make sure the used area only grows, not shrinks.
pUsedRange->ExtendTo(ScRange(nDataCol1, nDataRow1, 0, nDataCol2, nDataRow2, 0));
else
@@ -1638,7 +1638,7 @@ static std::unique_ptr<ScTokenArray> convertToTokenArray(
bFirstTab = false;
}
- if (!pUsedRange.get())
+ if (!pUsedRange)
return nullptr;
s.SetCol(pUsedRange->aStart.Col());
diff --git a/sc/source/ui/miscdlgs/anyrefdg.cxx b/sc/source/ui/miscdlgs/anyrefdg.cxx
index 6de58331021f..56efb1cac9d7 100644
--- a/sc/source/ui/miscdlgs/anyrefdg.cxx
+++ b/sc/source/ui/miscdlgs/anyrefdg.cxx
@@ -569,7 +569,7 @@ void ScFormulaReferenceHelper::RefInputStart( formula::RefEdit* pEdit, formula::
if( m_pRefBtn )
m_pRefBtn->SetEndImage();
- if (!m_pAccel.get())
+ if (!m_pAccel)
{
m_pAccel.reset( new Accelerator );
m_pAccel->InsertItem( 1, vcl::KeyCode( KEY_RETURN ) );
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index a21c8a5db6a1..bf4ad3870802 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -5552,7 +5552,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
uno::Reference<beans::XPropertySet> xPropSet( xDescriptor, uno::UNO_QUERY );
if (xPropSet.is())
- lcl_CopyProperties( *xImpl.get(), *xPropSet.get() );
+ lcl_CopyProperties(*xImpl, *xPropSet.get());
if (pDocSh)
{
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index ead395b7f5b8..233b0fe6ba73 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -713,7 +713,7 @@ void Chart2Positioner::createPositionMap()
if (meGlue == GLUETYPE_NA && mpPositionMap.get())
mpPositionMap.reset();
- if (mpPositionMap.get())
+ if (mpPositionMap)
return;
glueState();
@@ -2411,7 +2411,7 @@ ScChart2DataSequence::~ScChart2DataSequence()
if ( m_pDocument )
{
m_pDocument->RemoveUnoObject( *this);
- if (m_pHiddenListener.get())
+ if (m_pHiddenListener)
{
ScChartListenerCollection* pCLC = m_pDocument->GetChartListenerCollection();
if (pCLC)
@@ -2432,7 +2432,7 @@ void ScChart2DataSequence::RefChanged()
if( m_pDocument )
{
ScChartListenerCollection* pCLC = nullptr;
- if (m_pHiddenListener.get())
+ if (m_pHiddenListener)
{
pCLC = m_pDocument->GetChartListenerCollection();
if (pCLC)
@@ -2765,7 +2765,7 @@ void ScChart2DataSequence::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint
// Bring the change back from the range list to the token list.
UpdateTokensFromRanges(aRanges);
- if (pUndoRanges.get())
+ if (pUndoRanges)
m_pDocument->AddUnoRefChange(m_nObjectId, *pUndoRanges);
}
}
@@ -3205,7 +3205,7 @@ void SAL_CALL ScChart2DataSequence::addModifyListener( const uno::Reference< uti
if (!m_pValueListener)
m_pValueListener.reset(new ScLinkListener( LINK( this, ScChart2DataSequence, ValueListenerHdl ) ));
- if (!m_pHiddenListener.get())
+ if (!m_pHiddenListener)
m_pHiddenListener.reset(new HiddenRangeListener(*this));
if( m_pDocument )
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index 796ed043e3e6..e1e2b8f25487 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -229,7 +229,7 @@ SvxUnoText& ScAnnotationObj::GetUnoText()
pUnoText = new SvxUnoText( &aEditSource, lcl_GetAnnotationPropertySet(),
uno::Reference<text::XText>() );
}
- return *pUnoText.get();
+ return *pUnoText;
}
const ScPostIt* ScAnnotationObj::ImplGetNote() const
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 14df2e3676aa..f3e7b40327a0 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -5241,7 +5241,7 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
else
pTextObj = ScEditUtil::CreateURLObjectFromURL(rDoc, sURL, sURL);
- if (pTextObj.get())
+ if (pTextObj)
pEngine->SetText(*pTextObj);
}
@@ -5662,7 +5662,7 @@ OString ScGridWindow::getCellCursor(const Fraction& rZoomX, const Fraction& rZoo
// GridWindow stores a shown cell cursor in mpOOCursors, hence
// we can use that to determine whether we would want to be showing
// one (client-side) for tiled rendering too.
- if (!mpOOCursors.get())
+ if (!mpOOCursors)
{
return OString("EMPTY");
}
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index 4e8ca58965e9..f46080430263 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -258,7 +258,8 @@ void ScSpellDialogChildWindow::Init()
bool ScSpellDialogChildWindow::IsSelectionChanged()
{
- if( !mxOldRangeList.get() || !mpViewShell || (mpViewShell != dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() )) )
+ if (!mxOldRangeList || !mpViewShell
+ || (mpViewShell != dynamic_cast<ScTabViewShell*>(SfxViewShell::Current())))
return true;
if( EditView* pEditView = mpViewData->GetSpellingView() )
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index 7002d8bebc3f..d003f32d6aa8 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -840,10 +840,7 @@ void ScTabView::TestHintWindow()
}
}
-bool ScTabView::HasHintWindow() const
-{
- return mxInputHintOO.get() != nullptr;
-}
+bool ScTabView::HasHintWindow() const { return mxInputHintOO != nullptr; }
void ScTabView::RemoveHintWindow()
{