diff options
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/docshell/externalrefmgr.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/miscdlgs/retypepassdlg.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/undo/undocell.cxx | 2 | ||||
-rw-r--r-- | sc/source/ui/unoobj/tokenuno.cxx | 4 |
4 files changed, 14 insertions, 14 deletions
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx index cc3933eaa34f..9b90a5cbea36 100644 --- a/sc/source/ui/docshell/externalrefmgr.cxx +++ b/sc/source/ui/docshell/externalrefmgr.cxx @@ -526,7 +526,7 @@ ScExternalRefCache::TokenRef ScExternalRefCache::getCellData( } const TableTypeRef& pTableData = rDoc.maTables[itrTabId->second]; - if (!pTableData.get()) + if (!pTableData) { // the table data is not instantiated yet. return TokenRef(); @@ -579,7 +579,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefCache::getCellRangeData( for (size_t nTab = nTabFirstId; nTab <= nTabLastId; ++nTab) { TableTypeRef pTab = rDoc.maTables[nTab]; - if (!pTab.get()) + if (!pTab) return TokenArrayRef(); SCCOL nDataCol1 = nCol1, nDataCol2 = nCol2; @@ -781,7 +781,7 @@ void ScExternalRefCache::setCellData(sal_uInt16 nFileId, const OUString& rTabNam return; TableTypeRef& pTableData = rDoc.maTables[itrTabName->second]; - if (!pTableData.get()) + if (!pTableData) pTableData = std::make_shared<Table>(); pTableData->setCell(nCol, nRow, pToken, nFmtIndex); @@ -819,7 +819,7 @@ void ScExternalRefCache::setCellRangeData(sal_uInt16 nFileId, const ScRange& rRa for (const auto& rItem : rData) { TableTypeRef& pTabData = rDoc.maTables[i]; - if (!pTabData.get()) + if (!pTabData) pTabData = std::make_shared<Table>(); const ScMatrixRef& pMat = rItem.mpRangeData; @@ -1107,7 +1107,7 @@ bool ScExternalRefCache::setCacheDocReferenced( sal_uInt16 nFileId ) for (auto& rxTab : pDocItem->maTables) { - if (rxTab.get()) + if (rxTab) rxTab->setReferenced(true); } addCacheDocToReferenced( nFileId); @@ -1126,7 +1126,7 @@ bool ScExternalRefCache::setCacheTableReferenced( sal_uInt16 nFileId, const OUSt for (size_t i = nIndex; i < nStop; ++i) { TableTypeRef pTab = pDoc->maTables[i]; - if (pTab.get()) + if (pTab) { if (!pTab->isReferenced()) { @@ -1152,7 +1152,7 @@ void ScExternalRefCache::setAllCacheTableReferencedStati( bool bReferenced ) ScExternalRefCache::DocItem& rDocItem = rEntry.second; for (auto& rxTab : rDocItem.maTables) { - if (rxTab.get()) + if (rxTab) rxTab->setReferenced(true); } } @@ -1175,7 +1175,7 @@ void ScExternalRefCache::setAllCacheTableReferencedStati( bool bReferenced ) for (size_t i=0; i < nTables; ++i) { TableTypeRef & xTab = rDocItem.maTables[i]; - if (xTab.get()) + if (xTab) { xTab->setReferenced(false); rDocReferenced.maTables[i] = false; @@ -2041,7 +2041,7 @@ ScExternalRefCache::TokenArrayRef ScExternalRefManager::getRangeNameTokens( } ScExternalRefCache::TokenArrayRef pArray = maRefCache.getRangeNameTokens(nFileId, rName); - if (pArray.get()) + if (pArray) // This range name is cached. return pArray; diff --git a/sc/source/ui/miscdlgs/retypepassdlg.cxx b/sc/source/ui/miscdlgs/retypepassdlg.cxx index 6c836bb822be..f422915a26a2 100644 --- a/sc/source/ui/miscdlgs/retypepassdlg.cxx +++ b/sc/source/ui/miscdlgs/retypepassdlg.cxx @@ -100,7 +100,7 @@ void ScRetypePassDlg::SetDesiredHash(ScPasswordHash eHash) void ScRetypePassDlg::WriteNewDataToDocument(ScDocument& rDoc) const { - if (mpDocItem.get()) + if (mpDocItem) rDoc.SetDocProtection(mpDocItem.get()); size_t nTabCount = static_cast<size_t>(rDoc.GetTableCount()); @@ -141,7 +141,7 @@ void ScRetypePassDlg::PopulateDialog() void ScRetypePassDlg::SetDocData() { bool bBtnEnabled = false; - if (mpDocItem.get() && mpDocItem->isProtected()) + if (mpDocItem && mpDocItem->isProtected()) { if (mpDocItem->isPasswordEmpty()) mxTextDocStatus->set_label(maTextNotPassProtected); diff --git a/sc/source/ui/undo/undocell.cxx b/sc/source/ui/undo/undocell.cxx index 3b3ca6b9cf0d..964ad6732f1d 100644 --- a/sc/source/ui/undo/undocell.cxx +++ b/sc/source/ui/undo/undocell.cxx @@ -735,7 +735,7 @@ ScUndoReplaceNote::ScUndoReplaceNote( ScDocShell& rDocShell, const ScAddress& rP mpDrawUndo( std::move(pDrawUndo) ) { OSL_ENSURE( maOldData.mxCaption || maNewData.mxCaption, "ScUndoReplaceNote::ScUndoReplaceNote - missing note captions" ); - OSL_ENSURE( !maOldData.mxInitData.get() && !maNewData.mxInitData.get(), "ScUndoReplaceNote::ScUndoReplaceNote - unexpected uninitialized note" ); + OSL_ENSURE( !maOldData.mxInitData && !maNewData.mxInitData, "ScUndoReplaceNote::ScUndoReplaceNote - unexpected uninitialized note" ); maOldData.mxCaption.setNotOwner(); maNewData.mxCaption.setNotOwner(); } diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx index a71e8bb2e351..25bd94957236 100644 --- a/sc/source/ui/unoobj/tokenuno.cxx +++ b/sc/source/ui/unoobj/tokenuno.cxx @@ -100,7 +100,7 @@ void ScFormulaParserObj::SetCompilerFlags( ScCompiler& rCompiler ) const // If mxOpCodeMap is not empty it overrides mbEnglish, and vice versa. We // don't need to initialize things twice. - if (mxOpCodeMap.get()) + if (mxOpCodeMap) rCompiler.SetFormulaLanguage( mxOpCodeMap ); else { @@ -195,7 +195,7 @@ void SAL_CALL ScFormulaParserObj::setPropertyValue( // Need to recreate the symbol map to change English property // because the map is const. So for performance reasons set // CompileEnglish _before_ OpCodeMap! - if (mxOpCodeMap.get() && mbEnglish != bOldEnglish) + if (mxOpCodeMap && mbEnglish != bOldEnglish) { ScDocument& rDoc = mpDocShell->GetDocument(); ScCompiler aCompiler( &rDoc, ScAddress(), rDoc.GetGrammar()); |