diff options
author | Noel Grandin <noel@peralex.com> | 2016-05-17 13:09:11 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-05-18 06:58:44 +0000 |
commit | d96c114171dada05caffd9a50f870809ebd0c450 (patch) | |
tree | 2ef1572fce732c39557b3f2f944aef86f17aa703 /dbaccess | |
parent | 70aa5799336de6cbd1d964e2e9a176b44d438db2 (diff) |
clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a
Reviewed-on: https://gerrit.libreoffice.org/25056
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'dbaccess')
-rw-r--r-- | dbaccess/source/core/api/query.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/control/ColumnControlWindow.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/DExport.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/relationdesign/RelationController.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TEditControl.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableController.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/tabledesign/TableUndo.cxx | 2 |
9 files changed, 13 insertions, 13 deletions
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx index 45500ea83d66..468c08f6ab6e 100644 --- a/dbaccess/source/core/api/query.cxx +++ b/dbaccess/source/core/api/query.cxx @@ -70,7 +70,7 @@ namespace dbaccess OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition ,const Reference< XConnection >& _rxConn ,const Reference< XComponentContext >& _xORB) - :OContentHelper(_xORB,nullptr,TContentPtr(new OContentHelper_Impl)) + :OContentHelper(_xORB,nullptr,std::make_shared<OContentHelper_Impl>()) ,OQueryDescriptor_Base(m_aMutex,*this) ,ODataSettings(OContentHelper::rBHelper,true) ,m_xCommandDefinition(_rxCommandDefinition) diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index 8955302e01f2..1ae5e20af098 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -690,7 +690,7 @@ void SbaGridHeader::PostExecuteColumnContextMenu(sal_uInt16 nColId, const PopupM break; ::std::vector< std::shared_ptr<OTableRow> > vClipboardList; // send it to the clipboard - vClipboardList.push_back(std::shared_ptr<OTableRow>(new OTableRow(xField))); + vClipboardList.push_back(std::make_shared<OTableRow>(xField)); OTableRowExchange* pData = new OTableRowExchange(vClipboardList); Reference< css::datatransfer::XTransferable> xRef = pData; pData->CopyToClipboard(GetParent()); diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx index 82624b22406c..122cec748dcf 100644 --- a/dbaccess/source/ui/control/ColumnControlWindow.cxx +++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx @@ -156,7 +156,7 @@ TOTypeInfoSP OColumnControlWindow::getDefaultTyp() const { if ( !m_pTypeInfo.get() ) { - m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); + m_pTypeInfo = std::make_shared<OTypeInfo>(); m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';'); } return m_pTypeInfo; diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx index d3504b4b3f18..5739239a7045 100644 --- a/dbaccess/source/ui/misc/DExport.cxx +++ b/dbaccess/source/ui/misc/DExport.cxx @@ -216,7 +216,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, if( nType == DataType::VARCHAR ) { - m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); + m_pTypeInfo = std::make_shared<OTypeInfo>(); m_pTypeInfo->aTypeName = sTypeName; m_pTypeInfo->nType = nType; @@ -278,7 +278,7 @@ ODatabaseExport::ODatabaseExport(const SharedConnection& _rxConnection, } } if ( !m_pTypeInfo ) - m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); + m_pTypeInfo = std::make_shared<OTypeInfo>(); SetColumnTypes(pList,_pInfoMap); } diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index df67d42ab5dd..240d63899406 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -678,7 +678,7 @@ void OCopyTableWizard::construct() else m_pbFinish->SetStyle(m_pbFinish->GetStyle() | WB_DEFBUTTON); - m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); + m_pTypeInfo = std::make_shared<OTypeInfo>(); m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';'); m_bAddPKFirstTime = true; } diff --git a/dbaccess/source/ui/relationdesign/RelationController.cxx b/dbaccess/source/ui/relationdesign/RelationController.cxx index 1478ee781d54..49dc65001157 100644 --- a/dbaccess/source/ui/relationdesign/RelationController.cxx +++ b/dbaccess/source/ui/relationdesign/RelationController.cxx @@ -356,7 +356,7 @@ namespace TTableDataHelper::const_iterator aFind = m_aTableData.find(sSourceName); if ( aFind == m_aTableData.end() ) { - aFind = m_aTableData.insert(TTableDataHelper::value_type(sSourceName,::std::shared_ptr<OTableWindowData>(new OTableWindowData(xTableProp,sSourceName, sSourceName)))).first; + aFind = m_aTableData.insert(TTableDataHelper::value_type(sSourceName,std::make_shared<OTableWindowData>(xTableProp,sSourceName, sSourceName))).first; aFind->second->ShowAll(false); } TTableWindowData::value_type pReferencingTable = aFind->second; @@ -389,7 +389,7 @@ namespace if ( m_xTables->hasByName(sReferencedTable) ) { Reference<XPropertySet> xReferencedTable(m_xTables->getByName(sReferencedTable),UNO_QUERY); - aRefFind = m_aTableData.insert(TTableDataHelper::value_type(sReferencedTable,::std::shared_ptr<OTableWindowData>(new OTableWindowData(xReferencedTable,sReferencedTable, sReferencedTable)))).first; + aRefFind = m_aTableData.insert(TTableDataHelper::value_type(sReferencedTable,std::make_shared<OTableWindowData>(xReferencedTable,sReferencedTable, sReferencedTable))).first; aRefFind->second->ShowAll(false); } else diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx index d631bfb7b6b1..ce444d860544 100644 --- a/dbaccess/source/ui/tabledesign/TEditControl.cxx +++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx @@ -796,7 +796,7 @@ void OTableEditorCtrl::InsertRows( long nRow ) pRow->GetActFieldDescr()->SetName( GenerateName( pRow->GetActFieldDescr()->GetName() ) ); pRow->SetPos(nInsertRow); m_pRowList->insert( m_pRowList->begin()+nInsertRow,pRow ); - vInsertedUndoRedoRows.push_back(std::shared_ptr<OTableRow>(new OTableRow(*pRow))); + vInsertedUndoRedoRows.push_back(std::make_shared<OTableRow>(*pRow)); nInsertRow++; } } @@ -831,7 +831,7 @@ void OTableEditorCtrl::DeleteRows() RowRemoved( nIndex ); // Insert the empty row at the end - m_pRowList->push_back( std::shared_ptr<OTableRow>(new OTableRow())); + m_pRowList->push_back( std::make_shared<OTableRow>()); RowInserted( GetRowCount()-1 ); nIndex = FirstSelectedRow(); @@ -860,7 +860,7 @@ void OTableEditorCtrl::InsertNewRows( long nRow ) GetUndoManager().AddUndoAction( new OTableEditorInsNewUndoAct(this, nRow, nInsertRows) ); // Insert the number of selected rows for( long i=nRow; i<(nRow+nInsertRows); i++ ) - m_pRowList->insert( m_pRowList->begin()+i ,std::shared_ptr<OTableRow>(new OTableRow())); + m_pRowList->insert( m_pRowList->begin()+i ,std::make_shared<OTableRow>()); RowInserted( nRow, nInsertRows ); GetView()->getController().setModified( true ); diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx index 16b94c9b2d45..0b2b654ecff0 100644 --- a/dbaccess/source/ui/tabledesign/TableController.cxx +++ b/dbaccess/source/ui/tabledesign/TableController.cxx @@ -142,7 +142,7 @@ OTableController::OTableController(const Reference< XComponentContext >& _rM) : { InvalidateAll(); - m_pTypeInfo = TOTypeInfoSP(new OTypeInfo()); + m_pTypeInfo = std::make_shared<OTypeInfo>(); m_pTypeInfo->aUIName = m_sTypeNames.getToken(TYPE_OTHER, ';'); } diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx index 51e394db73ca..cec3d5349a6a 100644 --- a/dbaccess/source/ui/tabledesign/TableUndo.cxx +++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx @@ -306,7 +306,7 @@ void OTableEditorInsNewUndoAct::Redo() ::std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList(); for( long i=m_nInsPos; i<(m_nInsPos+m_nInsRows); i++ ) - pRowList->insert( pRowList->begin()+i,std::shared_ptr<OTableRow>(new OTableRow()) ); + pRowList->insert( pRowList->begin()+i,std::make_shared<OTableRow>() ); pTabEdCtrl->RowInserted( m_nInsPos, m_nInsRows ); pTabEdCtrl->InvalidateHandleColumn(); |