summaryrefslogtreecommitdiff
path: root/dbaccess
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-23 16:37:11 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 07:18:56 +0100
commita41f9b3ae91101414a7ba2f651f735bc71f69f81 (patch)
tree7827e21495a370fd68bc4d884a4fd3b89295239c /dbaccess
parente5cfe9c050fbd601b64dc13fe6760e762a35a4d4 (diff)
loplugin:makeshared in cui..desktop
Change-Id: I45b7381f665a749b86302be07fa095a30842428f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87277 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'dbaccess')
-rw-r--r--dbaccess/source/core/api/RowSet.cxx6
-rw-r--r--dbaccess/source/core/api/querycontainer.cxx4
-rw-r--r--dbaccess/source/core/api/tablecontainer.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ComponentDefinition.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/ModelImpl.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/commanddefinition.cxx2
-rw-r--r--dbaccess/source/core/dataaccess/documentcontainer.cxx6
-rw-r--r--dbaccess/source/sdbtools/connection/objectnames.cxx10
-rw-r--r--dbaccess/source/ui/dlg/sqlmessage.cxx4
-rw-r--r--dbaccess/source/ui/dlg/textconnectionsettings.cxx12
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx2
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/misc/dsmeta.cxx2
-rw-r--r--dbaccess/source/ui/misc/imageprovider.cxx4
-rw-r--r--dbaccess/source/ui/querydesign/JoinController.cxx2
-rw-r--r--dbaccess/source/ui/querydesign/QueryTableView.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RelationTableView.cxx6
-rw-r--r--dbaccess/source/ui/tabledesign/FieldDescriptions.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx6
21 files changed, 43 insertions, 43 deletions
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index 933530480d55..10432ffbfb7b 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -1690,9 +1690,9 @@ Reference< XResultSet > ORowSet::impl_prepareAndExecute_throw()
aComposedUpdateTableName = composeTableName( m_xActiveConnection->getMetaData(), m_aUpdateCatalogName, m_aUpdateSchemaName, m_aUpdateTableName, false, ::dbtools::EComposeRule::InDataManipulation );
SAL_INFO("dbaccess", "ORowSet::impl_prepareAndExecute_throw: creating cache" );
- m_pCache.reset(
- new ORowSetCache(xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName,
- m_bModified, m_bNew, *m_aParameterValueForCache, m_aFilter, m_nMaxRows));
+ m_pCache =
+ std::make_shared<ORowSetCache>(xResultSet, m_xComposer.get(), m_aContext, aComposedUpdateTableName,
+ m_bModified, m_bNew, *m_aParameterValueForCache, m_aFilter, m_nMaxRows);
if ( m_nResultSetConcurrency == ResultSetConcurrency::READ_ONLY )
{
m_nPrivileges = Privilege::SELECT;
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index 2fbf6b551689..731bf4e21896 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -63,7 +63,7 @@ OQueryContainer::OQueryContainer(
, const Reference< XConnection >& _rxConn
, const Reference< XComponentContext >& _rxORB,
::dbtools::WarningsContainer* _pWarnings)
- :ODefinitionContainer(_rxORB,nullptr,TContentPtr(new ODefinitionContainer_Impl))
+ :ODefinitionContainer(_rxORB,nullptr,std::make_shared<ODefinitionContainer_Impl>())
,m_pWarnings( _pWarnings )
,m_xCommandDefinitions(_rxCommandDefinitions)
,m_xConnection(_rxConn)
@@ -90,7 +90,7 @@ void OQueryContainer::init()
m_aDocuments.push_back(m_aDocumentMap.emplace( *pDefinitionName,Documents::mapped_type()).first);
}
- setElementApproval( PContainerApprove( new ObjectNameApproval( m_xConnection, ObjectNameApproval::TypeQuery ) ) );
+ setElementApproval( std::make_shared<ObjectNameApproval>( m_xConnection, ObjectNameApproval::TypeQuery ) );
}
rtl::Reference<OQueryContainer> OQueryContainer::create(
diff --git a/dbaccess/source/core/api/tablecontainer.cxx b/dbaccess/source/core/api/tablecontainer.cxx
index 3637e6b3bed1..fb14a5f4170c 100644
--- a/dbaccess/source/core/api/tablecontainer.cxx
+++ b/dbaccess/source/core/api/tablecontainer.cxx
@@ -267,7 +267,7 @@ ObjectType OTableContainer::appendObject( const OUString& _rForName, const Refer
}
Reference< XConnection > xConnection( m_xConnection.get(), UNO_QUERY );
- PContainerApprove pApprove( new ObjectNameApproval( xConnection, ObjectNameApproval::TypeTable ) );
+ PContainerApprove pApprove = std::make_shared<ObjectNameApproval>( xConnection, ObjectNameApproval::TypeTable );
pApprove->approveElement( aName );
{
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 2114fe323939..ca088bb080fe 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -271,7 +271,7 @@ com_sun_star_comp_dba_OComponentDefinition(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new dbaccess::OComponentDefinition(
- context, nullptr, dbaccess::TContentPtr(new dbaccess::OComponentDefinition_Impl)));
+ context, nullptr, std::make_shared<dbaccess::OComponentDefinition_Impl>()));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 0b9679232141..988d47038d52 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -1032,7 +1032,7 @@ TContentPtr& ODatabaseModelImpl::getObjectContainer( ObjectType _eType )
if ( !rContentPtr.get() )
{
- rContentPtr = TContentPtr( new ODefinitionContainer_Impl );
+ rContentPtr = std::make_shared<ODefinitionContainer_Impl>();
rContentPtr->m_pDataSource = this;
rContentPtr->m_aProps.aTitle = lcl_getContainerStorageName_throw( _eType );
}
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index 4781146f8bed..03af40113d72 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -127,7 +127,7 @@ com_sun_star_comp_dba_OCommandDefinition(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const &)
{
return cppu::acquire(new dbaccess::OCommandDefinition(
- context, nullptr, dbaccess::TContentPtr( new dbaccess::OCommandDefinition_Impl )));
+ context, nullptr, std::make_shared<dbaccess::OCommandDefinition_Impl>() ));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index 05f0da16f474..db5bed5ceb43 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -96,7 +96,7 @@ ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xO
registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::BOUND | PropertyAttribute::READONLY | PropertyAttribute::CONSTRAINED,
&m_pImpl->m_aProps.aTitle, cppu::UnoType<decltype(m_pImpl->m_aProps.aTitle)>::get());
- setElementApproval( PContainerApprove( new LocalNameApproval ) );
+ setElementApproval( std::make_shared<LocalNameApproval>() );
}
ODocumentContainer::~ODocumentContainer()
@@ -256,7 +256,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
TContentPtr pElementImpl;
if ( bNew || ( aFind == rDefinitions.end() ) )
{
- pElementImpl.reset( new OContentHelper_Impl );
+ pElementImpl = std::make_shared<OContentHelper_Impl>();
if ( !bNew )
pElementImpl->m_aProps.aTitle = sName;
@@ -317,7 +317,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
TContentPtr pElementImpl;
if ( aFind == rDefinitions.end() )
{
- pElementImpl.reset(new ODefinitionContainer_Impl);
+ pElementImpl = std::make_shared<ODefinitionContainer_Impl>();
pElementImpl->m_aProps.aTitle = sName;
pElementImpl->m_pDataSource = m_pImpl->m_pDataSource;
}
diff --git a/dbaccess/source/sdbtools/connection/objectnames.cxx b/dbaccess/source/sdbtools/connection/objectnames.cxx
index d067a042afa8..5a21c1a4abb4 100644
--- a/dbaccess/source/sdbtools/connection/objectnames.cxx
+++ b/dbaccess/source/sdbtools/connection/objectnames.cxx
@@ -307,12 +307,12 @@ namespace sdbtools
);
}
- PNameValidation pTableCheck( new PlainExistenceCheck( _rxConnection, xTables ) );
- PNameValidation pQueryCheck( new PlainExistenceCheck( _rxConnection, xQueries ) );
+ PNameValidation pTableCheck = std::make_shared<PlainExistenceCheck>( _rxConnection, xTables );
+ PNameValidation pQueryCheck = std::make_shared<PlainExistenceCheck>( _rxConnection, xQueries );
PNameValidation pReturn;
if ( aMeta.supportsSubqueriesInFrom() )
- pReturn.reset( new CombinedNameCheck( pTableCheck, pQueryCheck ) );
+ pReturn = std::make_shared<CombinedNameCheck>( pTableCheck, pQueryCheck );
else if ( _nCommandType == CommandType::TABLE )
pReturn = pTableCheck;
else
@@ -339,8 +339,8 @@ namespace sdbtools
}
if ( _nCommandType == CommandType::TABLE )
- return PNameValidation( new TableValidityCheck( _rxConnection ) );
- return PNameValidation( new QueryValidityCheck( _rxConnection ) );
+ return std::make_shared<TableValidityCheck>( _rxConnection );
+ return std::make_shared<QueryValidityCheck>( _rxConnection );
}
// ObjectNames
diff --git a/dbaccess/source/ui/dlg/sqlmessage.cxx b/dbaccess/source/ui/dlg/sqlmessage.cxx
index 047758341b58..b19e4209b230 100644
--- a/dbaccess/source/ui/dlg/sqlmessage.cxx
+++ b/dbaccess/source/ui/dlg/sqlmessage.cxx
@@ -118,7 +118,7 @@ namespace
}
if ( !ppProvider->get() )
- ppProvider->reset(new ImageProvider(sNormalImageID));
+ (*ppProvider) = std::make_shared<ImageProvider>(sNormalImageID);
return *ppProvider;
}
@@ -143,7 +143,7 @@ namespace
}
if ( !ppProvider->get() )
- ppProvider->reset( new LabelProvider( pLabelID ) );
+ (*ppProvider) = std::make_shared<LabelProvider>( pLabelID );
return *ppProvider;
}
diff --git a/dbaccess/source/ui/dlg/textconnectionsettings.cxx b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
index ce481645ac12..5076b3d328c3 100644
--- a/dbaccess/source/ui/dlg/textconnectionsettings.cxx
+++ b/dbaccess/source/ui/dlg/textconnectionsettings.cxx
@@ -41,12 +41,12 @@ namespace dbaui
void TextConnectionSettingsDialog::bindItemStorages( SfxItemSet& _rSet, PropertyValues& _rValues )
{
- _rValues[ PROPERTY_ID_HEADER_LINE ].reset( new SetItemPropertyStorage( _rSet, DSID_TEXTFILEHEADER ) );
- _rValues[ PROPERTY_ID_FIELD_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_FIELDDELIMITER ) );
- _rValues[ PROPERTY_ID_STRING_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_TEXTDELIMITER ) );
- _rValues[ PROPERTY_ID_DECIMAL_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_DECIMALDELIMITER ) );
- _rValues[ PROPERTY_ID_THOUSAND_DELIMITER ].reset( new SetItemPropertyStorage( _rSet, DSID_THOUSANDSDELIMITER ) );
- _rValues[ PROPERTY_ID_ENCODING ].reset( new SetItemPropertyStorage( _rSet, DSID_CHARSET ) );
+ _rValues[ PROPERTY_ID_HEADER_LINE ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_TEXTFILEHEADER );
+ _rValues[ PROPERTY_ID_FIELD_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_FIELDDELIMITER );
+ _rValues[ PROPERTY_ID_STRING_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_TEXTDELIMITER );
+ _rValues[ PROPERTY_ID_DECIMAL_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_DECIMALDELIMITER );
+ _rValues[ PROPERTY_ID_THOUSAND_DELIMITER ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_THOUSANDSDELIMITER );
+ _rValues[ PROPERTY_ID_ENCODING ] = std::make_shared<SetItemPropertyStorage>( _rSet, DSID_CHARSET );
}
short TextConnectionSettingsDialog::run()
diff --git a/dbaccess/source/ui/misc/DExport.cxx b/dbaccess/source/ui/misc/DExport.cxx
index e64ab80b8293..5dc324566f1b 100644
--- a/dbaccess/source/ui/misc/DExport.cxx
+++ b/dbaccess/source/ui/misc/DExport.cxx
@@ -670,7 +670,7 @@ void ODatabaseExport::CreateDefaultColumn(const OUString& _rColumnName)
void ODatabaseExport::createRowSet()
{
- m_pUpdateHelper.reset(new OParameterUpdateHelper(createPreparedStatment(m_xConnection->getMetaData(),m_xTable,m_vColumnPositions)));
+ m_pUpdateHelper = std::make_shared<OParameterUpdateHelper>(createPreparedStatment(m_xConnection->getMetaData(),m_xTable,m_vColumnPositions));
}
bool ODatabaseExport::executeWizard(const OUString& _rTableName, const Any& _aTextColor, const FontDescriptor& _rFont)
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 84b2d6f9095a..257a10f3b8c0 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -436,7 +436,7 @@ void fillTypeInfo( const Reference< css::sdbc::XConnection>& _rxConnection,
// Loop on the result set until we reach end of file
while (xRs->next())
{
- TOTypeInfoSP pInfo(new OTypeInfo());
+ TOTypeInfoSP pInfo = std::make_shared<OTypeInfo>();
sal_Int32 nPos = 1;
if ( aTypes.empty() )
{
diff --git a/dbaccess/source/ui/misc/dsmeta.cxx b/dbaccess/source/ui/misc/dsmeta.cxx
index a894c0329080..58831f081185 100644
--- a/dbaccess/source/ui/misc/dsmeta.cxx
+++ b/dbaccess/source/ui/misc/dsmeta.cxx
@@ -167,7 +167,7 @@ namespace dbaui
// DataSourceMetaData
DataSourceMetaData::DataSourceMetaData( const OUString& _sURL )
- :m_pImpl( new DataSourceMetaData_Impl( _sURL ) )
+ :m_pImpl( std::make_shared<DataSourceMetaData_Impl>( _sURL ) )
{
}
diff --git a/dbaccess/source/ui/misc/imageprovider.cxx b/dbaccess/source/ui/misc/imageprovider.cxx
index 426f99252537..16548dc43edd 100644
--- a/dbaccess/source/ui/misc/imageprovider.cxx
+++ b/dbaccess/source/ui/misc/imageprovider.cxx
@@ -94,12 +94,12 @@ namespace dbaui
}
// ImageProvider
ImageProvider::ImageProvider()
- :m_pData( new ImageProvider_Data )
+ :m_pData( std::make_shared<ImageProvider_Data>() )
{
}
ImageProvider::ImageProvider( const Reference< XConnection >& _rxConnection )
- :m_pData( new ImageProvider_Data )
+ :m_pData( std::make_shared<ImageProvider_Data>() )
{
m_pData->xConnection = _rxConnection;
try
diff --git a/dbaccess/source/ui/querydesign/JoinController.cxx b/dbaccess/source/ui/querydesign/JoinController.cxx
index b2a5184ffc7c..37560014c4c7 100644
--- a/dbaccess/source/ui/querydesign/JoinController.cxx
+++ b/dbaccess/source/ui/querydesign/JoinController.cxx
@@ -270,7 +270,7 @@ void OJoinController::Execute(sal_uInt16 _nId, const Sequence< PropertyValue >&
void OJoinController::runDialogAsync()
{
assert(!m_xAddTableDialog);
- m_xAddTableDialog.reset(new OAddTableDlg(getFrameWeld(), impl_getDialogContext()));
+ m_xAddTableDialog = std::make_shared<OAddTableDlg>(getFrameWeld(), impl_getDialogContext());
{
weld::WaitObject aWaitCursor(getFrameWeld());
m_xAddTableDialog->Update();
diff --git a/dbaccess/source/ui/querydesign/QueryTableView.cxx b/dbaccess/source/ui/querydesign/QueryTableView.cxx
index 905f766916a0..f2d0a17581cf 100644
--- a/dbaccess/source/ui/querydesign/QueryTableView.cxx
+++ b/dbaccess/source/ui/querydesign/QueryTableView.cxx
@@ -592,7 +592,7 @@ void OQueryTableView::ConnDoubleClicked(VclPtr<OTableConnection>& rConnection)
void OQueryTableView::createNewConnection()
{
- TTableConnectionData::value_type pData(new OQueryTableConnectionData());
+ TTableConnectionData::value_type pData = std::make_shared<OQueryTableConnectionData>();
if( openJoinDialog(this,pData,true) )
{
OTableWindowMap& rMap = GetTabWinMap();
diff --git a/dbaccess/source/ui/relationdesign/RelationTableView.cxx b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
index 968b63a547eb..cbc4f9b009e2 100644
--- a/dbaccess/source/ui/relationdesign/RelationTableView.cxx
+++ b/dbaccess/source/ui/relationdesign/RelationTableView.cxx
@@ -180,8 +180,8 @@ void ORelationTableView::AddConnection(const OJoinExchangeData& jxdSource, const
}
}
// insert table connection into view
- TTableConnectionData::value_type pTabConnData(new ORelationTableConnectionData(pSourceWin->GetData(),
- pDestWin->GetData()));
+ TTableConnectionData::value_type pTabConnData = std::make_shared<ORelationTableConnectionData>(pSourceWin->GetData(),
+ pDestWin->GetData());
// the names of the affected fields
OUString sSourceFieldName = jxdSource.pListBox->GetEntryText(jxdSource.pEntry);
@@ -246,7 +246,7 @@ void ORelationTableView::ConnDoubleClicked(VclPtr<OTableConnection>& rConnection
void ORelationTableView::AddNewRelation()
{
- TTableConnectionData::value_type pNewConnData( new ORelationTableConnectionData() );
+ TTableConnectionData::value_type pNewConnData = std::make_shared<ORelationTableConnectionData>();
ORelationDialog aRelDlg(this, pNewConnData, true);
bool bSuccess = (aRelDlg.run() == RET_OK);
diff --git a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
index 9f5428b04559..e178cd17d8c2 100644
--- a/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
+++ b/dbaccess/source/ui/tabledesign/FieldDescriptions.cxx
@@ -576,7 +576,7 @@ SvxCellHorJustify OFieldDescription::GetHorJustify() const
TOTypeInfoSP OFieldDescription::getSpecialTypeInfo() const
{
- TOTypeInfoSP pSpecialType( new OTypeInfo() );
+ TOTypeInfoSP pSpecialType = std::make_shared<OTypeInfo>();
*pSpecialType = *m_pType;
pSpecialType->nPrecision = GetPrecision();
pSpecialType->nMaximumScale = static_cast<sal_Int16>(GetScale());
diff --git a/dbaccess/source/ui/tabledesign/TEditControl.cxx b/dbaccess/source/ui/tabledesign/TEditControl.cxx
index 6ee67535d414..4408f36a6427 100644
--- a/dbaccess/source/ui/tabledesign/TEditControl.cxx
+++ b/dbaccess/source/ui/tabledesign/TEditControl.cxx
@@ -724,7 +724,7 @@ void OTableEditorCtrl::CopyRows()
OSL_ENSURE(pRow,"OTableEditorCtrl::CopyRows: Row is NULL!");
if ( pRow && pRow->GetActFieldDescr() )
{
- pClipboardRow.reset(new OTableRow( *pRow ));
+ pClipboardRow = std::make_shared<OTableRow>( *pRow );
vClipboardList.push_back( pClipboardRow);
}
}
@@ -782,7 +782,7 @@ void OTableEditorCtrl::InsertRows( long nRow )
vInsertedUndoRedoRows.reserve(nSize);
for(sal_Int32 i=0;i < nSize;++i)
{
- pRow.reset(new OTableRow());
+ pRow = std::make_shared<OTableRow>();
ReadOTableRow( *aStreamRef, *pRow );
pRow->SetReadOnly( false );
sal_Int32 nType = pRow->GetActFieldDescr()->GetType();
diff --git a/dbaccess/source/ui/tabledesign/TableController.cxx b/dbaccess/source/ui/tabledesign/TableController.cxx
index 17cd3780ee77..2b39fc45c477 100644
--- a/dbaccess/source/ui/tabledesign/TableController.cxx
+++ b/dbaccess/source/ui/tabledesign/TableController.cxx
@@ -814,7 +814,7 @@ void OTableController::loadData()
if(xColumn->getPropertySetInfo()->hasPropertyByName(PROPERTY_ALIGN))
xColumn->getPropertyValue(PROPERTY_ALIGN) >>= nAlign;
- pTabEdRow.reset(new OTableRow());
+ pTabEdRow = std::make_shared<OTableRow>();
pTabEdRow->SetReadOnly(!bIsAlterAllowed);
// search for type
bool bForce;
@@ -874,7 +874,7 @@ void OTableController::loadData()
bool bReadRow = !isAddAllowed();
for(sal_Int32 i=m_vRowList.size(); i < NEWCOLS; i++ )
{
- pTabEdRow.reset(new OTableRow());
+ pTabEdRow = std::make_shared<OTableRow>();
pTabEdRow->SetReadOnly(bReadRow);
m_vRowList.push_back( pTabEdRow);
}
diff --git a/dbaccess/source/ui/tabledesign/TableUndo.cxx b/dbaccess/source/ui/tabledesign/TableUndo.cxx
index 87baeb3cc80a..f299be1caede 100644
--- a/dbaccess/source/ui/tabledesign/TableUndo.cxx
+++ b/dbaccess/source/ui/tabledesign/TableUndo.cxx
@@ -163,7 +163,7 @@ OTableEditorDelUndoAct::OTableEditorDelUndoAct( OTableEditorCtrl* pOwner) :
while( nIndex != SFX_ENDOFSELECTION )
{
pOriginalRow = (*pOriginalRows)[nIndex];
- pNewRow.reset(new OTableRow( *pOriginalRow, nIndex ));
+ pNewRow = std::make_shared<OTableRow>( *pOriginalRow, nIndex );
m_aDeletedRows.push_back( pNewRow);
nIndex = pOwner->NextSelectedRow();
@@ -185,7 +185,7 @@ void OTableEditorDelUndoAct::Undo()
for (auto const& deletedRow : m_aDeletedRows)
{
- pNewOrigRow.reset(new OTableRow( *deletedRow ));
+ pNewOrigRow = std::make_shared<OTableRow>( *deletedRow );
nPos = deletedRow->GetPos();
pOriginalRows->insert( pOriginalRows->begin()+nPos,pNewOrigRow);
}
@@ -245,7 +245,7 @@ void OTableEditorInsUndoAct::Redo()
std::vector< std::shared_ptr<OTableRow> >* pRowList = pTabEdCtrl->GetRowList();
for (auto const& insertedRow : m_vInsertedRows)
{
- pRow.reset(new OTableRow( *insertedRow ));
+ pRow = std::make_shared<OTableRow>( *insertedRow );
pRowList->insert( pRowList->begin()+nInsertRow ,pRow );
nInsertRow++;
}