summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-10-07 15:45:13 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-10-08 08:26:23 +0200
commit231e16d9091c2d318d99c2f2eb985311e7138127 (patch)
tree7b8d30778cdb696cdf4c0ec80a58f6b488e4d5e5 /sc
parente47172ce2ac486b909ee8f46380dca8efedb6a24 (diff)
loplugin:redundantpointerops simplify *p.get()
Change-Id: I12517651fb3f777fd08e384992bb3e84b340ad85 Reviewed-on: https://gerrit.libreoffice.org/80382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/data/dpcache.cxx8
-rw-r--r--sc/source/core/data/dpobject.cxx10
-rw-r--r--sc/source/core/tool/detdata.cxx4
-rw-r--r--sc/source/core/tool/userlist.cxx4
-rw-r--r--sc/source/filter/excel/xestyle.cxx4
-rw-r--r--sc/source/filter/excel/xicontent.cxx2
-rw-r--r--sc/source/filter/excel/xilink.cxx2
-rw-r--r--sc/source/filter/rtf/rtfparse.cxx2
-rw-r--r--sc/source/filter/xml/XMLStylesExportHelper.cxx6
-rw-r--r--sc/source/filter/xml/xmlcelli.cxx4
-rw-r--r--sc/source/ui/condformat/condformatdlg.cxx2
-rw-r--r--sc/source/ui/dbgui/PivotLayoutDialog.cxx2
-rw-r--r--sc/source/ui/dbgui/validate.cxx4
-rw-r--r--sc/source/ui/miscdlgs/scuiautofmt.cxx8
14 files changed, 31 insertions, 31 deletions
diff --git a/sc/source/core/data/dpcache.cxx b/sc/source/core/data/dpcache.cxx
index e2d595a5bef4..5746e3e1a2e4 100644
--- a/sc/source/core/data/dpcache.cxx
+++ b/sc/source/core/data/dpcache.cxx
@@ -647,7 +647,7 @@ bool ScDPCache::InitFromDataBase(DBConnector& rDB)
continue;
aBuckets.clear();
- Field& rField = *maFields[nCol].get();
+ Field& rField = *maFields[nCol];
SCROW nRow = 0;
do
{
@@ -961,7 +961,7 @@ SCROW ScDPCache::GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty)
{
OSL_ENSURE(nDim < mnColumnCount, "ScDPTableDataCache::GetItemDataId ");
- const Field& rField = *maFields[nDim].get();
+ const Field& rField = *maFields[nDim];
if (static_cast<size_t>(nRow) >= rField.maData.size())
{
// nRow is in the trailing empty rows area.
@@ -993,7 +993,7 @@ const ScDPItemData* ScDPCache::GetItemDataById(long nDim, SCROW nId) const
if (nDimPos < nSourceCount)
{
// source field.
- const Field& rField = *maFields[nDimPos].get();
+ const Field& rField = *maFields[nDimPos];
if (nItemId < rField.maItems.size())
return &rField.maItems[nItemId];
@@ -1287,7 +1287,7 @@ void ScDPCache::ResetGroupItems(long nDim, const ScDPNumGroupInfo& rNumInfo, sal
nDim -= nSourceCount;
if (nDim < static_cast<long>(maGroupFields.size()))
{
- GroupItems& rGI = *maGroupFields[nDim].get();
+ GroupItems& rGI = *maGroupFields[nDim];
rGI.maItems.clear();
rGI.maInfo = rNumInfo;
rGI.mnGroupType = nGroupType;
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 9cfc72391e46..28de482413e5 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2693,7 +2693,7 @@ void ScDPObject::ConvertOrientation(
pDim->RemoveSubtotalName();
if (nDimIndex < rLabels.size())
{
- const ScDPLabelData& rLabel = *rLabels[nDimIndex].get();
+ const ScDPLabelData& rLabel = *rLabels[nDimIndex];
if (!rLabel.maLayoutName.isEmpty())
pDim->SetLayoutName(rLabel.maLayoutName);
if (!rLabel.maSubtotalName.isEmpty())
@@ -3651,12 +3651,12 @@ void ScDPCollection::WriteRefsTo( ScDPCollection& r ) const
OSL_ENSURE( nSrcSize >= nDestSize, "WriteRefsTo: missing entries in document" );
for (size_t nSrcPos = 0; nSrcPos < nSrcSize; ++nSrcPos)
{
- const ScDPObject& rSrcObj = *maTables[nSrcPos].get();
+ const ScDPObject& rSrcObj = *maTables[nSrcPos];
const OUString& aName = rSrcObj.GetName();
bool bFound = false;
for (size_t nDestPos = 0; nDestPos < nDestSize && !bFound; ++nDestPos)
{
- ScDPObject& rDestObj = *r.maTables[nDestPos].get();
+ ScDPObject& rDestObj = *r.maTables[nDestPos];
if (rDestObj.GetName() == aName)
{
rSrcObj.WriteRefsTo(rDestObj); // found object, copy refs
@@ -3681,12 +3681,12 @@ size_t ScDPCollection::GetCount() const
ScDPObject& ScDPCollection::operator [](size_t nIndex)
{
- return *maTables[nIndex].get();
+ return *maTables[nIndex];
}
const ScDPObject& ScDPCollection::operator [](size_t nIndex) const
{
- return *maTables[nIndex].get();
+ return *maTables[nIndex];
}
ScDPObject* ScDPCollection::GetByName(const OUString& rName) const
diff --git a/sc/source/core/tool/detdata.cxx b/sc/source/core/tool/detdata.cxx
index d1233e0cf609..f64dc49d66fd 100644
--- a/sc/source/core/tool/detdata.cxx
+++ b/sc/source/core/tool/detdata.cxx
@@ -29,7 +29,7 @@ ScDetOpList::ScDetOpList(const ScDetOpList& rList) :
size_t nCount = rList.Count();
for (size_t i=0; i<nCount; i++)
- Append( new ScDetOpData( (*rList.aDetOpDataVector[i].get()) ) );
+ Append( new ScDetOpData( *rList.aDetOpDataVector[i] ) );
}
void ScDetOpList::DeleteOnTab( SCTAB nTab )
@@ -87,7 +87,7 @@ bool ScDetOpList::operator==( const ScDetOpList& r ) const
const ScDetOpData& ScDetOpList::GetObject( size_t nPos ) const
{
- return (*aDetOpDataVector[nPos].get());
+ return *aDetOpDataVector[nPos];
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/core/tool/userlist.cxx b/sc/source/core/tool/userlist.cxx
index e650383c26bc..96e6983ac712 100644
--- a/sc/source/core/tool/userlist.cxx
+++ b/sc/source/core/tool/userlist.cxx
@@ -296,12 +296,12 @@ const ScUserListData* ScUserList::GetData(const OUString& rSubStr) const
const ScUserListData& ScUserList::operator[](size_t nIndex) const
{
- return *maData[nIndex].get();
+ return *maData[nIndex];
}
ScUserListData& ScUserList::operator[](size_t nIndex)
{
- return *maData[nIndex].get();
+ return *maData[nIndex];
}
ScUserList& ScUserList::operator=( const ScUserList& rOther )
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 4c30945d48e4..7f3ac9c25b53 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -347,7 +347,7 @@ void XclExpPaletteImpl::Finalize()
maColorIdDataVec.resize( nCount );
for( sal_uInt32 nIdx = 0; nIdx < nCount; ++nIdx )
{
- const XclListColor& listColor = *mxColorList->at( nIdx ).get();
+ const XclListColor& listColor = *mxColorList->at( nIdx );
maColorIdDataVec[ listColor.GetColorId() ].Set( listColor.GetColor(), nIdx );
}
@@ -654,7 +654,7 @@ sal_uInt32 XclExpPaletteImpl::GetLeastUsedListColor() const
for( sal_uInt32 nIdx = 0, nCount = mxColorList->size(); nIdx < nCount; ++nIdx )
{
- XclListColor& rEntry = *mxColorList->at( nIdx ).get();
+ XclListColor& rEntry = *mxColorList->at( nIdx );
// ignore the base colors
if( !rEntry.IsBaseColor() && (rEntry.GetWeighting() < nMinW) )
{
diff --git a/sc/source/filter/excel/xicontent.cxx b/sc/source/filter/excel/xicontent.cxx
index fb2f14235f43..686fac1ae423 100644
--- a/sc/source/filter/excel/xicontent.cxx
+++ b/sc/source/filter/excel/xicontent.cxx
@@ -891,7 +891,7 @@ void XclImpValidationManager::ReadDV( XclImpStream& rStrm )
maDVItems.push_back(
std::make_unique<DVItem>(aScRanges, ScValidationData(eValMode, eCondMode, xTokArr1.get(), xTokArr2.get(), &rDoc, rScRange.aStart)));
- DVItem& rItem = *maDVItems.back().get();
+ DVItem& rItem = *maDVItems.back();
rItem.maValidData.SetIgnoreBlank( ::get_flag( nFlags, EXC_DV_IGNOREBLANK ) );
rItem.maValidData.SetListType( ::get_flagvalue( nFlags, EXC_DV_SUPPRESSDROPDOWN, css::sheet::TableValidationVisibility::INVISIBLE, css::sheet::TableValidationVisibility::UNSORTED ) );
diff --git a/sc/source/filter/excel/xilink.cxx b/sc/source/filter/excel/xilink.cxx
index 653def1be9b9..40128838a629 100644
--- a/sc/source/filter/excel/xilink.cxx
+++ b/sc/source/filter/excel/xilink.cxx
@@ -676,7 +676,7 @@ void XclImpSupbook::ReadCrn( XclImpStream& rStrm )
{
if (mnSBTab >= maSupbTabList.size())
return;
- XclImpSupbookTab& rSbTab = *maSupbTabList[mnSBTab].get();
+ XclImpSupbookTab& rSbTab = *maSupbTabList[mnSBTab];
sal_uInt8 nXclColLast, nXclColFirst;
sal_uInt16 nXclRow;
nXclColLast = rStrm.ReaduInt8();
diff --git a/sc/source/filter/rtf/rtfparse.cxx b/sc/source/filter/rtf/rtfparse.cxx
index 9a258823c309..a0f4d4c758fb 100644
--- a/sc/source/filter/rtf/rtfparse.cxx
+++ b/sc/source/filter/rtf/rtfparse.cxx
@@ -203,7 +203,7 @@ void ScRTFParser::NewCellRow()
// Not flush on the right? => new table
if ( nLastWidth && !maDefaultList.empty() )
{
- const ScRTFCellDefault& rD = *maDefaultList.back().get();
+ const ScRTFCellDefault& rD = *maDefaultList.back();
if (rD.nTwips != nLastWidth)
{
SCCOL n1, n2;
diff --git a/sc/source/filter/xml/XMLStylesExportHelper.cxx b/sc/source/filter/xml/XMLStylesExportHelper.cxx
index dac67e964272..006248461bf2 100644
--- a/sc/source/filter/xml/XMLStylesExportHelper.cxx
+++ b/sc/source/filter/xml/XMLStylesExportHelper.cxx
@@ -1057,7 +1057,7 @@ sal_Int32 ScRowStyles::GetStyleNameIndex(const sal_Int32 nTable, const sal_Int32
// Cache hit !
return maCache.mnStyle;
- StylesType& r = *aTables[nTable].get();
+ StylesType& r = *aTables[nTable];
if (!r.is_tree_valid())
r.build_tree();
sal_Int32 nStyle(0);
@@ -1079,7 +1079,7 @@ void ScRowStyles::AddFieldStyleName(const sal_Int32 nTable, const sal_Int32 nFie
const sal_Int32 nStringIndex)
{
OSL_ENSURE(static_cast<size_t>(nTable) < aTables.size(), "wrong table");
- StylesType& r = *aTables[nTable].get();
+ StylesType& r = *aTables[nTable];
r.insert_back(nField, nField+1, nStringIndex);
}
@@ -1088,7 +1088,7 @@ void ScRowStyles::AddFieldStyleName(const sal_Int32 nTable, const sal_Int32 nSta
{
OSL_ENSURE( nStartField <= nEndField, "bad field range");
OSL_ENSURE(static_cast<size_t>(nTable) < aTables.size(), "wrong table");
- StylesType& r = *aTables[nTable].get();
+ StylesType& r = *aTables[nTable];
r.insert_back(nStartField, nEndField+1, nStringIndex);
}
diff --git a/sc/source/filter/xml/xmlcelli.cxx b/sc/source/filter/xml/xmlcelli.cxx
index 8a862e221057..5d8ecdd48401 100644
--- a/sc/source/filter/xml/xmlcelli.cxx
+++ b/sc/source/filter/xml/xmlcelli.cxx
@@ -321,7 +321,7 @@ void ScXMLTableRowCellContext::PushParagraphField(std::unique_ptr<SvxFieldData>
{
mbHasFormatRuns = true;
maFields.push_back(std::make_unique<Field>(std::move(pData)));
- Field& rField = *maFields.back().get();
+ Field& rField = *maFields.back();
sal_Int32 nPos = maParagraph.getLength();
maParagraph.append('\1'); // Placeholder text for inserted field item.
@@ -366,7 +366,7 @@ void ScXMLTableRowCellContext::PushFormat(sal_Int32 nBegin, sal_Int32 nEnd, cons
mbHasFormatRuns = true;
maFormats.push_back(std::make_unique<ParaFormat>(*mpEditEngine));
- ParaFormat& rFmt = *maFormats.back().get();
+ ParaFormat& rFmt = *maFormats.back();
rFmt.maSelection.nStartPara = rFmt.maSelection.nEndPara = mnCurParagraph;
rFmt.maSelection.nStartPos = nBegin;
rFmt.maSelection.nEndPos = nEnd;
diff --git a/sc/source/ui/condformat/condformatdlg.cxx b/sc/source/ui/condformat/condformatdlg.cxx
index fca7434887e1..9a86807f70ee 100644
--- a/sc/source/ui/condformat/condformatdlg.cxx
+++ b/sc/source/ui/condformat/condformatdlg.cxx
@@ -101,7 +101,7 @@ void ScCondFormatList::init(ScDocument* pDoc,
}
}
if(nCount)
- EntrySelectHdl(*maEntries[0].get());
+ EntrySelectHdl(*maEntries[0]);
}
else
{
diff --git a/sc/source/ui/dbgui/PivotLayoutDialog.cxx b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
index 0efce49f4f99..d9b89a5fadf2 100644
--- a/sc/source/ui/dbgui/PivotLayoutDialog.cxx
+++ b/sc/source/ui/dbgui/PivotLayoutDialog.cxx
@@ -613,7 +613,7 @@ bool ScPivotLayoutDialog::IsDataElement(SCCOL nColumn)
ScDPLabelData& ScPivotLayoutDialog::GetLabelData(SCCOL nColumn)
{
- return *maPivotParameters.maLabelArray[nColumn].get();
+ return *maPivotParameters.maLabelArray[nColumn];
}
void ScPivotLayoutDialog::PushDataFieldNames(std::vector<ScDPName>& rDataFieldNames)
diff --git a/sc/source/ui/dbgui/validate.cxx b/sc/source/ui/dbgui/validate.cxx
index 2ee9cf39f446..41bc913db911 100644
--- a/sc/source/ui/dbgui/validate.cxx
+++ b/sc/source/ui/dbgui/validate.cxx
@@ -400,7 +400,7 @@ void ScTPValidationValue::Init()
m_xLbAllow->set_active( SC_VALIDDLG_ALLOW_ANY );
m_xLbValue->set_active( SC_VALIDDLG_DATA_EQUAL );
- SelectHdl( *m_xLbAllow.get() );
+ SelectHdl( *m_xLbAllow );
CheckHdl( *m_xCbShow );
}
@@ -448,7 +448,7 @@ void ScTPValidationValue::Reset( const SfxItemSet* rArgSet )
aFmlaStr = static_cast< const SfxStringItem* >( pItem )->GetValue();
SetSecondFormula( aFmlaStr );
- SelectHdl( *m_xLbAllow.get() );
+ SelectHdl( *m_xLbAllow );
CheckHdl( *m_xCbShow );
}
diff --git a/sc/source/ui/miscdlgs/scuiautofmt.cxx b/sc/source/ui/miscdlgs/scuiautofmt.cxx
index 82d80da27619..e4e18ab03384 100644
--- a/sc/source/ui/miscdlgs/scuiautofmt.cxx
+++ b/sc/source/ui/miscdlgs/scuiautofmt.cxx
@@ -217,7 +217,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, AddHdl, weld::Button&, void)
bCoreDataChanged = true;
}
- SelFmtHdl( *m_xLbFormat.get() );
+ SelFmtHdl( *m_xLbFormat );
bOk = true;
}
}
@@ -271,11 +271,11 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RemoveHdl, weld::Button&, void)
pFormat->erase(it);
nIndex--;
- SelFmtHdl( *m_xLbFormat.get() );
+ SelFmtHdl( *m_xLbFormat );
}
}
- SelFmtHdl( *m_xLbFormat.get() );
+ SelFmtHdl( *m_xLbFormat );
}
IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl, weld::Button&, void)
@@ -336,7 +336,7 @@ IMPL_LINK_NOARG(ScAutoFormatDlg, RenameHdl, weld::Button&, void)
bCoreDataChanged = true;
}
- SelFmtHdl( *m_xLbFormat.get() );
+ SelFmtHdl( *m_xLbFormat );
bOk = true;
bFmtRenamed = true;
}