summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--basctl/source/basicide/basidesh.cxx2
-rw-r--r--canvas/source/tools/surfaceproxy.cxx5
-rw-r--r--chart2/source/view/main/ChartView.cxx2
-rw-r--r--comphelper/source/misc/threadpool.cxx2
-rw-r--r--connectivity/source/commontools/TKeys.cxx2
-rw-r--r--cppu/source/threadpool/threadpool.cxx2
-rw-r--r--cui/source/options/optcolor.cxx16
-rw-r--r--dbaccess/source/core/api/query.cxx2
-rw-r--r--dbaccess/source/ui/browser/sbagrid.cxx2
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx2
-rw-r--r--dbaccess/source/ui/misc/DExport.cxx4
-rw-r--r--dbaccess/source/ui/misc/WCopyTable.cxx2
-rw-r--r--dbaccess/source/ui/relationdesign/RelationController.cxx4
-rw-r--r--dbaccess/source/ui/tabledesign/TEditControl.cxx6
-rw-r--r--dbaccess/source/ui/tabledesign/TableController.cxx2
-rw-r--r--dbaccess/source/ui/tabledesign/TableUndo.cxx2
-rw-r--r--extensions/source/resource/oooresourceloader.cxx2
-rw-r--r--filter/source/msfilter/msdffimp.cxx4
-rw-r--r--oox/source/core/fragmenthandler.cxx4
-rw-r--r--oox/source/core/xmlfilterbase.cxx5
-rw-r--r--oox/source/drawingml/chart/plotareaconverter.cxx2
-rw-r--r--oox/source/drawingml/chart/typegroupconverter.cxx2
-rw-r--r--oox/source/drawingml/shape.cxx12
-rw-r--r--oox/source/drawingml/shapecontext.cxx4
-rw-r--r--oox/source/drawingml/shapegroupcontext.cxx8
-rw-r--r--oox/source/drawingml/textliststyle.cxx10
-rw-r--r--oox/source/drawingml/themeelementscontext.cxx6
-rw-r--r--oox/source/export/vmlexport.cxx2
-rw-r--r--oox/source/ppt/pptimport.cxx2
-rw-r--r--oox/source/ppt/presentationfragmenthandler.cxx4
-rw-r--r--oox/source/ppt/slidefragmenthandler.cxx4
-rw-r--r--oox/source/shape/WpgContext.cxx4
-rw-r--r--reportdesign/source/core/misc/conditionalexpression.cxx16
-rw-r--r--reportdesign/source/ui/misc/FunctionHelper.cxx4
-rw-r--r--sc/source/core/opencl/formulagroupcl.cxx5
-rw-r--r--sc/source/filter/excel/excimp8.cxx2
-rw-r--r--sc/source/filter/excel/xecontent.cxx2
-rw-r--r--sc/source/filter/excel/xestyle.cxx2
-rw-r--r--sc/source/filter/oox/condformatbuffer.cxx2
-rw-r--r--sd/source/core/CustomAnimationPreset.cxx2
-rw-r--r--sd/source/filter/eppt/escherex.cxx2
-rw-r--r--sd/source/filter/html/buttonset.cxx2
-rw-r--r--sd/source/ui/framework/configuration/ConfigurationUpdater.cxx2
-rw-r--r--sd/source/ui/remotecontrol/Server.cxx2
-rw-r--r--sd/source/ui/slidesorter/model/SlideSorterModel.cxx5
-rw-r--r--sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx8
-rw-r--r--sdext/source/presenter/PresenterHelpView.cxx4
-rw-r--r--sdext/source/presenter/PresenterTimer.cxx2
-rw-r--r--sfx2/source/doc/Metadatable.cxx8
-rw-r--r--slideshow/source/engine/shapes/appletshape.cxx12
-rw-r--r--slideshow/source/engine/shapes/backgroundshape.cxx5
-rw-r--r--slideshow/source/engine/shapes/mediashape.cxx6
-rw-r--r--slideshow/source/engine/slide/layer.cxx2
-rw-r--r--slideshow/source/engine/slide/slideimpl.cxx2
-rw-r--r--slideshow/source/engine/slideshowimpl.cxx4
-rw-r--r--svl/source/items/itempool.cxx2
-rw-r--r--svl/source/items/poolio.cxx4
-rw-r--r--svl/source/items/style.cxx2
-rw-r--r--svx/source/table/tablertfimporter.cxx2
-rw-r--r--sw/source/core/doc/doclay.cxx4
-rw-r--r--sw/source/core/doc/tblrwcl.cxx4
-rw-r--r--sw/source/core/frmedt/fecopy.cxx4
-rw-r--r--sw/source/core/unocore/unoobj2.cxx6
-rw-r--r--sw/source/core/unocore/unoportenum.cxx23
-rw-r--r--sw/source/core/unocore/unorefmk.cxx2
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx12
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx6
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx2
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx2
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx2
-rw-r--r--sw/source/uibase/frmdlg/colex.cxx19
-rw-r--r--toolkit/source/controls/unocontrolcontainer.cxx2
-rw-r--r--vcl/unx/generic/gdi/cairo_xlib_cairo.cxx3
-rw-r--r--writerfilter/source/dmapper/DomainMapper_Impl.cxx2
-rw-r--r--writerfilter/source/dmapper/TrackChangesHandler.cxx2
-rw-r--r--writerfilter/source/ooxml/OOXMLFastContextHandler.cxx5
-rw-r--r--xmloff/source/core/RDFaImportHelper.cxx4
-rw-r--r--xmloff/source/table/XMLTableImport.cxx2
-rw-r--r--xmloff/source/text/XMLPropertyBackpatcher.cxx2
79 files changed, 169 insertions, 182 deletions
diff --git a/basctl/source/basicide/basidesh.cxx b/basctl/source/basicide/basidesh.cxx
index 18ff4da83c30..7619e5635765 100644
--- a/basctl/source/basicide/basidesh.cxx
+++ b/basctl/source/basicide/basidesh.cxx
@@ -912,7 +912,7 @@ void Shell::SetCurLibForLocalization( const ScriptDocument& rDocument, const OUS
catch (const container::NoSuchElementException& )
{}
- m_pCurLocalizationMgr = std::shared_ptr<LocalizationMgr>(new LocalizationMgr(this, rDocument, aLibName, xStringResourceManager));
+ m_pCurLocalizationMgr = std::make_shared<LocalizationMgr>(this, rDocument, aLibName, xStringResourceManager);
m_pCurLocalizationMgr->handleTranslationbar();
}
diff --git a/canvas/source/tools/surfaceproxy.cxx b/canvas/source/tools/surfaceproxy.cxx
index e809ec9a7d56..a2ffd3204a42 100644
--- a/canvas/source/tools/surfaceproxy.cxx
+++ b/canvas/source/tools/surfaceproxy.cxx
@@ -69,12 +69,11 @@ namespace canvas
aPageSize.getY() ) );
maSurfaceList.push_back(
- SurfaceSharedPtr(
- new Surface(
+ std::make_shared<Surface>(
mpPageManager,
mpBuffer,
aOffset,
- aSize)));
+ aSize));
}
}
}
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index bd8b50a8f112..569eeaee3f47 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -1199,7 +1199,7 @@ void ChartView::init()
if( !m_pDrawModelWrapper.get() )
{
SolarMutexGuard aSolarGuard;
- m_pDrawModelWrapper = std::shared_ptr< DrawModelWrapper >( new DrawModelWrapper( m_xCC ) );
+ m_pDrawModelWrapper = std::make_shared< DrawModelWrapper >( m_xCC );
m_xShapeFactory = m_pDrawModelWrapper->getShapeFactory();
m_xDrawPage = m_pDrawModelWrapper->getMainDrawPage();
StartListening( m_pDrawModelWrapper->getSdrModel() );
diff --git a/comphelper/source/misc/threadpool.cxx b/comphelper/source/misc/threadpool.cxx
index 403612289bae..58613649e8fa 100644
--- a/comphelper/source/misc/threadpool.cxx
+++ b/comphelper/source/misc/threadpool.cxx
@@ -116,7 +116,7 @@ struct ThreadPoolStatic : public rtl::StaticWithInit< std::shared_ptr< ThreadPoo
{
std::shared_ptr< ThreadPool > operator () () {
sal_Int32 nThreads = std::max( std::thread::hardware_concurrency(), 1U );
- return std::shared_ptr< ThreadPool >( new ThreadPool( nThreads ) );
+ return std::make_shared< ThreadPool >( nThreads );
};
};
diff --git a/connectivity/source/commontools/TKeys.cxx b/connectivity/source/commontools/TKeys.cxx
index d06c91656495..03ddf7e2ca66 100644
--- a/connectivity/source/commontools/TKeys.cxx
+++ b/connectivity/source/commontools/TKeys.cxx
@@ -248,7 +248,7 @@ sdbcx::ObjectType OKeysHelper::appendObject( const OUString& _rForName, const Re
{
}
- m_pTable->addKey(sNewName,sdbcx::TKeyProperties(new sdbcx::KeyProperties(sReferencedName,nKeyType,nUpdateRule,nDeleteRule)));
+ m_pTable->addKey(sNewName,std::make_shared<sdbcx::KeyProperties>(sReferencedName,nKeyType,nUpdateRule,nDeleteRule));
return createObject( sNewName );
}
diff --git a/cppu/source/threadpool/threadpool.cxx b/cppu/source/threadpool/threadpool.cxx
index 457ff94a73ad..d80607507bd3 100644
--- a/cppu/source/threadpool/threadpool.cxx
+++ b/cppu/source/threadpool/threadpool.cxx
@@ -49,7 +49,7 @@ namespace cppu_threadpool
public rtl::StaticWithInit< DisposedCallerAdminHolder, theDisposedCallerAdmin >
{
DisposedCallerAdminHolder operator () () {
- return DisposedCallerAdminHolder(new DisposedCallerAdmin());
+ return std::make_shared<DisposedCallerAdmin>();
}
};
diff --git a/cui/source/options/optcolor.cxx b/cui/source/options/optcolor.cxx
index 101b9e92b606..afcde48d7a89 100644
--- a/cui/source/options/optcolor.cxx
+++ b/cui/source/options/optcolor.cxx
@@ -548,8 +548,8 @@ void ColorConfigWindow_Impl::CreateEntries()
for (unsigned i = 0; i != nGroupCount; ++i)
{
aModulesInstalled[i] = IsGroupVisible(vGroupInfo[i].eGroup);
- vChapters.push_back(std::shared_ptr<Chapter>(
- new Chapter(get<FixedText>(vGroupInfo[i].pGroup), aModulesInstalled[i])));
+ vChapters.push_back(std::make_shared<Chapter>(
+ get<FixedText>(vGroupInfo[i].pGroup), aModulesInstalled[i]));
}
//Here we want to get the amount to add to the position
@@ -574,8 +574,8 @@ void ColorConfigWindow_Impl::CreateEntries()
vEntries.reserve(ColorConfigEntryCount);
for (unsigned i = 0; i < SAL_N_ELEMENTS(vEntryInfo); ++i)
{
- vEntries.push_back(std::shared_ptr<Entry>(new Entry(*this, i, nCheckBoxLabelOffset,
- aModulesInstalled[vEntryInfo[i].eGroup])));
+ vEntries.push_back(std::make_shared<Entry>(*this, i, nCheckBoxLabelOffset,
+ aModulesInstalled[vEntryInfo[i].eGroup]));
}
// extended entries
@@ -586,19 +586,19 @@ void ColorConfigWindow_Impl::CreateEntries()
for (unsigned j = 0; j != nExtGroupCount; ++j)
{
OUString const sComponentName = aExtConfig.GetComponentName(j);
- vChapters.push_back(std::shared_ptr<Chapter>(new Chapter(
+ vChapters.push_back(std::make_shared<Chapter>(
m_pGrid, nLineNum,
aExtConfig.GetComponentDisplayName(sComponentName)
- )));
+ ));
++nLineNum;
unsigned nColorCount = aExtConfig.GetComponentColorCount(sComponentName);
for (unsigned i = 0; i != nColorCount; ++i)
{
ExtendedColorConfigValue const aColorEntry =
aExtConfig.GetComponentColorConfigValue(sComponentName, i);
- vEntries.push_back(std::shared_ptr<Entry>( new Entry (
+ vEntries.push_back(std::make_shared<Entry>(
m_pGrid, nLineNum, aColorEntry, nCheckBoxLabelOffset
- )));
+ ));
++nLineNum;
}
}
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();
diff --git a/extensions/source/resource/oooresourceloader.cxx b/extensions/source/resource/oooresourceloader.cxx
index eb7a6c7a6aac..df3c6c22edd3 100644
--- a/extensions/source/resource/oooresourceloader.cxx
+++ b/extensions/source/resource/oooresourceloader.cxx
@@ -189,7 +189,7 @@ namespace extensions { namespace resource
// supported resource types so far: strings
m_aResourceTypes[ OUString( "string" ) ] =
- ResourceTypePtr( new StringResourceAccess );
+ std::make_shared<StringResourceAccess>( );
}
OpenOfficeResourceBundle::~OpenOfficeResourceBundle()
diff --git a/filter/source/msfilter/msdffimp.cxx b/filter/source/msfilter/msdffimp.cxx
index af1a021656ea..dae59b1f46d8 100644
--- a/filter/source/msfilter/msdffimp.cxx
+++ b/filter/source/msfilter/msdffimp.cxx
@@ -6184,8 +6184,8 @@ bool SvxMSDffManager::GetShapeContainerData( SvStream& rSt,
{
aInfo.bReplaceByFly = true;
}
- m_xShapeInfosByTxBxComp->insert(std::shared_ptr<SvxMSDffShapeInfo>(
- new SvxMSDffShapeInfo(aInfo)));
+ m_xShapeInfosByTxBxComp->insert(std::make_shared<SvxMSDffShapeInfo>(
+ aInfo));
m_pShapeOrders->push_back(std::unique_ptr<SvxMSDffShapeOrder>(
new SvxMSDffShapeOrder( aInfo.nShapeId )));
}
diff --git a/oox/source/core/fragmenthandler.cxx b/oox/source/core/fragmenthandler.cxx
index 653b2719445f..a4e4d23f6993 100644
--- a/oox/source/core/fragmenthandler.cxx
+++ b/oox/source/core/fragmenthandler.cxx
@@ -36,12 +36,12 @@ FragmentBaseData::FragmentBaseData( XmlFilterBase& rFilter, const OUString& rFra
}
FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath ) :
- FragmentHandler_BASE( FragmentBaseDataRef( new FragmentBaseData( rFilter, rFragmentPath, rFilter.importRelations( rFragmentPath ) ) ) )
+ FragmentHandler_BASE( std::make_shared<FragmentBaseData>( rFilter, rFragmentPath, rFilter.importRelations( rFragmentPath ) ) )
{
}
FragmentHandler::FragmentHandler( XmlFilterBase& rFilter, const OUString& rFragmentPath, RelationsRef xRelations ) :
- FragmentHandler_BASE( FragmentBaseDataRef( new FragmentBaseData( rFilter, rFragmentPath, xRelations ) ) )
+ FragmentHandler_BASE( std::make_shared<FragmentBaseData>( rFilter, rFragmentPath, xRelations ) )
{
}
diff --git a/oox/source/core/xmlfilterbase.cxx b/oox/source/core/xmlfilterbase.cxx
index fe6a1aaef3a2..2019f31e26ee 100644
--- a/oox/source/core/xmlfilterbase.cxx
+++ b/oox/source/core/xmlfilterbase.cxx
@@ -452,9 +452,8 @@ Reference< XOutputStream > XmlFilterBase::openFragmentStream( const OUString& rS
FSHelperPtr XmlFilterBase::openFragmentStreamWithSerializer( const OUString& rStreamName, const OUString& rMediaType )
{
- bool bWriteHeader
- = rMediaType.indexOf( "vml" ) < 0 || rMediaType.indexOf( "+xml" ) >= 0;
- return FSHelperPtr( new FastSerializerHelper( openFragmentStream( rStreamName, rMediaType ), bWriteHeader ) );
+ bool bWriteHeader = rMediaType.indexOf( "vml" ) < 0 || rMediaType.indexOf( "+xml" ) >= 0;
+ return std::make_shared<FastSerializerHelper>( openFragmentStream( rStreamName, rMediaType ), bWriteHeader );
}
TextFieldStack& XmlFilterBase::getTextFieldStack() const
diff --git a/oox/source/drawingml/chart/plotareaconverter.cxx b/oox/source/drawingml/chart/plotareaconverter.cxx
index 2e967156cfc7..b7796db7445a 100644
--- a/oox/source/drawingml/chart/plotareaconverter.cxx
+++ b/oox/source/drawingml/chart/plotareaconverter.cxx
@@ -118,7 +118,7 @@ void AxesSetConverter::convertFromModel( const Reference< XDiagram >& rxDiagram,
typedef RefVector< TypeGroupConverter > TypeGroupConvVector;
TypeGroupConvVector aTypeGroups;
for( AxesSetModel::TypeGroupVector::iterator aIt = mrModel.maTypeGroups.begin(), aEnd = mrModel.maTypeGroups.end(); aIt != aEnd; ++aIt )
- aTypeGroups.push_back( TypeGroupConvVector::value_type( new TypeGroupConverter( *this, **aIt ) ) );
+ aTypeGroups.push_back( std::make_shared<TypeGroupConverter>( *this, **aIt ) );
OSL_ENSURE( !aTypeGroups.empty(), "AxesSetConverter::convertFromModel - no type groups in axes set" );
if( !aTypeGroups.empty() ) try
diff --git a/oox/source/drawingml/chart/typegroupconverter.cxx b/oox/source/drawingml/chart/typegroupconverter.cxx
index d0369b2532c3..e39fba78686e 100644
--- a/oox/source/drawingml/chart/typegroupconverter.cxx
+++ b/oox/source/drawingml/chart/typegroupconverter.cxx
@@ -345,7 +345,7 @@ void TypeGroupConverter::convertFromModel( const Reference< XDiagram >& rxDiagra
typedef RefVector< SeriesConverter > SeriesConvVector;
SeriesConvVector aSeries;
for( TypeGroupModel::SeriesVector::iterator aIt = mrModel.maSeries.begin(), aEnd = mrModel.maSeries.end(); aIt != aEnd; ++aIt )
- aSeries.push_back( SeriesConvVector::value_type( new SeriesConverter( *this, **aIt ) ) );
+ aSeries.push_back( std::make_shared<SeriesConverter>( *this, **aIt ) );
// reverse series order for some unstacked 2D chart types
if( isReverseSeries() )
diff --git a/oox/source/drawingml/shape.cxx b/oox/source/drawingml/shape.cxx
index 537ca03c4a66..a3ab4677f983 100644
--- a/oox/source/drawingml/shape.cxx
+++ b/oox/source/drawingml/shape.cxx
@@ -298,16 +298,16 @@ void Shape::applyShapeReference( const Shape& rReferencedShape, bool bUseText )
SAL_INFO("oox", OSL_THIS_FUNC << "apply shape reference: " << rReferencedShape.msId << " to shape id: " << msId);
if ( rReferencedShape.mpTextBody.get() && bUseText )
- mpTextBody = TextBodyPtr( new TextBody( *rReferencedShape.mpTextBody.get() ) );
+ mpTextBody = std::make_shared<TextBody>( *rReferencedShape.mpTextBody.get() );
else
mpTextBody.reset();
maShapeProperties = rReferencedShape.maShapeProperties;
- mpShapeRefLinePropPtr = LinePropertiesPtr( new LineProperties( *rReferencedShape.mpLinePropertiesPtr.get() ) );
- mpShapeRefFillPropPtr = FillPropertiesPtr( new FillProperties( *rReferencedShape.mpFillPropertiesPtr.get() ) );
- mpCustomShapePropertiesPtr = CustomShapePropertiesPtr( new CustomShapeProperties( *rReferencedShape.mpCustomShapePropertiesPtr.get() ) );
+ mpShapeRefLinePropPtr = std::make_shared<LineProperties>( *rReferencedShape.mpLinePropertiesPtr.get() );
+ mpShapeRefFillPropPtr = std::make_shared<FillProperties>( *rReferencedShape.mpFillPropertiesPtr.get() );
+ mpCustomShapePropertiesPtr = std::make_shared<CustomShapeProperties>( *rReferencedShape.mpCustomShapePropertiesPtr.get() );
mpTablePropertiesPtr = table::TablePropertiesPtr( rReferencedShape.mpTablePropertiesPtr.get() ? new table::TableProperties( *rReferencedShape.mpTablePropertiesPtr.get() ) : nullptr );
- mpShapeRefEffectPropPtr = EffectPropertiesPtr( new EffectProperties( *rReferencedShape.mpEffectPropertiesPtr.get() ) );
- mpMasterTextListStyle = TextListStylePtr( new TextListStyle( *rReferencedShape.mpMasterTextListStyle.get() ) );
+ mpShapeRefEffectPropPtr = std::make_shared<EffectProperties>( *rReferencedShape.mpEffectPropertiesPtr.get() );
+ mpMasterTextListStyle = std::make_shared<TextListStyle>( *rReferencedShape.mpMasterTextListStyle.get() );
maSize = rReferencedShape.maSize;
maPosition = rReferencedShape.maPosition;
mnRotation = rReferencedShape.mnRotation;
diff --git a/oox/source/drawingml/shapecontext.cxx b/oox/source/drawingml/shapecontext.cxx
index 9b097fc05881..fe011c94f944 100644
--- a/oox/source/drawingml/shapecontext.cxx
+++ b/oox/source/drawingml/shapecontext.cxx
@@ -95,7 +95,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const
case XML_txbxContent:
{
if (!mpShapePtr->getTextBody())
- mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
+ mpShapePtr->setTextBody( std::make_shared<TextBody>() );
return new TextBodyContext( *this, *mpShapePtr->getTextBody() );
}
case XML_txXfrm:
@@ -109,7 +109,7 @@ ContextHandlerRef ShapeContext::onCreateContext( sal_Int32 aElementToken, const
break;
case XML_bodyPr:
if (!mpShapePtr->getTextBody())
- mpShapePtr->setTextBody( TextBodyPtr(new TextBody) );
+ mpShapePtr->setTextBody( std::make_shared<TextBody>() );
return new TextBodyPropertiesContext( *this, rAttribs, mpShapePtr->getTextBody()->getTextProperties() );
break;
case XML_txbx:
diff --git a/oox/source/drawingml/shapegroupcontext.cxx b/oox/source/drawingml/shapegroupcontext.cxx
index 2dbd69424ed5..1cb33adb3e65 100644
--- a/oox/source/drawingml/shapegroupcontext.cxx
+++ b/oox/source/drawingml/shapegroupcontext.cxx
@@ -93,17 +93,17 @@ ContextHandlerRef ShapeGroupContext::onCreateContext( sal_Int32 aElementToken, c
return new ConnectorShapeContext( *this, mpGroupShapePtr, pShape );
}
case XML_grpSp: // group shape
- return new ShapeGroupContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GroupShape" ) ) );
+ return new ShapeGroupContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.GroupShape" ) );
case XML_sp: // shape
case XML_wsp:
// Don't set default character height for WPS shapes, Writer has its
// own way to set the default, and if we don't set it here, editing
// properly inherits it.
- return new ShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.CustomShape", getBaseToken(aElementToken) == XML_sp ) ) );
+ return new ShapeContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.CustomShape", getBaseToken(aElementToken) == XML_sp ) );
case XML_pic: // CT_Picture
- return new GraphicShapeContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ) );
+ return new GraphicShapeContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" ) );
case XML_graphicFrame: // CT_GraphicalObjectFrame
- return new GraphicalObjectFrameContext( *this, mpGroupShapePtr, ShapePtr( new Shape( "com.sun.star.drawing.GraphicObjectShape" ) ), true );
+ return new GraphicalObjectFrameContext( *this, mpGroupShapePtr, std::make_shared<Shape>( "com.sun.star.drawing.GraphicObjectShape" ), true );
case XML_cNvGrpSpPr:
break;
case XML_grpSpLocks:
diff --git a/oox/source/drawingml/textliststyle.cxx b/oox/source/drawingml/textliststyle.cxx
index 44b0f4121324..141c963e6a4c 100644
--- a/oox/source/drawingml/textliststyle.cxx
+++ b/oox/source/drawingml/textliststyle.cxx
@@ -26,8 +26,8 @@ TextListStyle::TextListStyle()
{
for ( int i = 0; i < 9; i++ )
{
- maListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties() ) );
- maAggregationListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties() ) );
+ maListStyle.push_back( std::make_shared<TextParagraphProperties>( ) );
+ maAggregationListStyle.push_back( std::make_shared<TextParagraphProperties>( ) );
}
}
@@ -41,8 +41,8 @@ TextListStyle::TextListStyle(const TextListStyle& rStyle)
assert(rStyle.maAggregationListStyle.size() == 9);
for ( size_t i = 0; i < 9; i++ )
{
- maListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties(*rStyle.maListStyle[i]) ) );
- maAggregationListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties(*rStyle.maAggregationListStyle[i]) ) );
+ maListStyle.push_back( std::make_shared<TextParagraphProperties>( *rStyle.maListStyle[i] ) );
+ maAggregationListStyle.push_back( std::make_shared<TextParagraphProperties>( *rStyle.maAggregationListStyle[i] ) );
}
}
@@ -75,7 +75,7 @@ void applyStyleList( const TextParagraphPropertiesVector& rSourceListStyle, Text
++aDestListStyleIter;
}
else
- rDestListStyle.push_back( TextParagraphPropertiesPtr( new TextParagraphProperties( **aSourceListStyleIter ) ) );
+ rDestListStyle.push_back( std::make_shared<TextParagraphProperties>( **aSourceListStyleIter ) );
++aSourceListStyleIter;
}
}
diff --git a/oox/source/drawingml/themeelementscontext.cxx b/oox/source/drawingml/themeelementscontext.cxx
index 1f2622f93a3f..7f757476abd3 100644
--- a/oox/source/drawingml/themeelementscontext.cxx
+++ b/oox/source/drawingml/themeelementscontext.cxx
@@ -64,7 +64,7 @@ ContextHandlerRef FillStyleListContext::onCreateContext( sal_Int32 nElement, con
case A_TOKEN( blipFill ):
case A_TOKEN( pattFill ):
case A_TOKEN( grpFill ):
- mrFillStyleList.push_back( FillPropertiesPtr( new FillProperties ) );
+ mrFillStyleList.push_back( std::make_shared<FillProperties>( ) );
return FillPropertiesContext::createFillContext( *this, nElement, rAttribs, *mrFillStyleList.back() );
}
return nullptr;
@@ -91,7 +91,7 @@ ContextHandlerRef LineStyleListContext::onCreateContext( sal_Int32 nElement, con
switch( nElement )
{
case A_TOKEN( ln ):
- mrLineStyleList.push_back( LinePropertiesPtr( new LineProperties ) );
+ mrLineStyleList.push_back( std::make_shared<LineProperties>( ) );
return new LinePropertiesContext( *this, rAttribs, *mrLineStyleList.back() );
}
return nullptr;
@@ -118,7 +118,7 @@ ContextHandlerRef EffectStyleListContext::onCreateContext( sal_Int32 nElement, c
switch( nElement )
{
case A_TOKEN( effectStyle ):
- mrEffectStyleList.push_back( EffectPropertiesPtr( new EffectProperties ) );
+ mrEffectStyleList.push_back( std::make_shared<EffectProperties>( ) );
return this;
case A_TOKEN( effectLst ): // CT_EffectList
diff --git a/oox/source/export/vmlexport.cxx b/oox/source/export/vmlexport.cxx
index a907f480cc16..8cad39ebfe0c 100644
--- a/oox/source/export/vmlexport.cxx
+++ b/oox/source/export/vmlexport.cxx
@@ -50,7 +50,7 @@ static const sal_Int32 Tag_Container = 44444;
static const sal_Int32 Tag_Commit = 44445;
VMLExport::VMLExport( ::sax_fastparser::FSHelperPtr pSerializer, VMLTextExport* pTextExport )
- : EscherEx( EscherExGlobalRef(new EscherExGlobal(0)), nullptr, /*bOOXML=*/true )
+ : EscherEx( std::make_shared<EscherExGlobal>(0), nullptr, /*bOOXML=*/true )
, m_pSerializer( pSerializer )
, m_pTextExport( pTextExport )
, m_eHOri( 0 )
diff --git a/oox/source/ppt/pptimport.cxx b/oox/source/ppt/pptimport.cxx
index 3e484065ddf2..9a606e6f1a9a 100644
--- a/oox/source/ppt/pptimport.cxx
+++ b/oox/source/ppt/pptimport.cxx
@@ -175,7 +175,7 @@ const oox::drawingml::table::TableStyleListPtr PowerPointImport::getTableStyles(
{
if ( !mpTableStyleList && !maTableStyleListPath.isEmpty() )
{
- mpTableStyleList = oox::drawingml::table::TableStyleListPtr( new oox::drawingml::table::TableStyleList() );
+ mpTableStyleList = std::make_shared<oox::drawingml::table::TableStyleList>( );
importFragment( new oox::drawingml::table::TableStyleListFragmentHandler(
*this, maTableStyleListPath, *mpTableStyleList ) );
}
diff --git a/oox/source/ppt/presentationfragmenthandler.cxx b/oox/source/ppt/presentationfragmenthandler.cxx
index 5447114339c1..944f1349cee0 100644
--- a/oox/source/ppt/presentationfragmenthandler.cxx
+++ b/oox/source/ppt/presentationfragmenthandler.cxx
@@ -201,8 +201,8 @@ void PresentationFragmentHandler::importSlide(sal_uInt32 nSlide, bool bFirstPage
else
xMasterPage = xMasterPages->insertNewByIndex( xMasterPages->getCount() );
- pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, true, false, xMasterPage,
- ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle ) );
+ pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, false, xMasterPage,
+ ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpTextListStyle );
pMasterPersistPtr->setLayoutPath( aLayoutFragmentPath );
rFilter.getMasterPages().push_back( pMasterPersistPtr );
rFilter.setActualSlidePersist( pMasterPersistPtr );
diff --git a/oox/source/ppt/slidefragmenthandler.cxx b/oox/source/ppt/slidefragmenthandler.cxx
index 972480f87ac2..bd7b6f13f763 100644
--- a/oox/source/ppt/slidefragmenthandler.cxx
+++ b/oox/source/ppt/slidefragmenthandler.cxx
@@ -109,8 +109,8 @@ SlideFragmentHandler::~SlideFragmentHandler()
if( aIter == rMasterPages.end() && !mpSlidePersistPtr->getMasterPersist() )
{
TextListStylePtr pTextListStyle(new TextListStyle);
- SlidePersistPtr pMasterPersistPtr = SlidePersistPtr( new SlidePersist( rFilter, true, true, mpSlidePersistPtr->getPage(),
- ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpSlidePersistPtr->getNotesTextStyle() ) );
+ SlidePersistPtr pMasterPersistPtr = std::make_shared<SlidePersist>( rFilter, true, true, mpSlidePersistPtr->getPage(),
+ ShapePtr( new PPTShape( Master, "com.sun.star.drawing.GroupShape" ) ), mpSlidePersistPtr->getNotesTextStyle() );
pMasterPersistPtr->setPath( aNotesFragmentPath );
rFilter.getMasterPages().push_back( pMasterPersistPtr );
FragmentHandlerRef xMasterFragmentHandler( new SlideFragmentHandler( rFilter, aNotesFragmentPath, pMasterPersistPtr, Master ) );
diff --git a/oox/source/shape/WpgContext.cxx b/oox/source/shape/WpgContext.cxx
index bfdeb26e540c..b5fe45b53ed0 100644
--- a/oox/source/shape/WpgContext.cxx
+++ b/oox/source/shape/WpgContext.cxx
@@ -53,11 +53,11 @@ oox::core::ContextHandlerRef WpgContext::onCreateContext(sal_Int32 nElementToken
}
break;
case XML_pic:
- return new oox::drawingml::GraphicShapeContext(*this, mpShape, oox::drawingml::ShapePtr(new oox::drawingml::Shape("com.sun.star.drawing.GraphicObjectShape")));
+ return new oox::drawingml::GraphicShapeContext(*this, mpShape, std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GraphicObjectShape"));
break;
case XML_grpSp:
{
- return new oox::drawingml::ShapeGroupContext(*this, mpShape, oox::drawingml::ShapePtr(new oox::drawingml::Shape("com.sun.star.drawing.GroupShape")));
+ return new oox::drawingml::ShapeGroupContext(*this, mpShape, std::make_shared<oox::drawingml::Shape>("com.sun.star.drawing.GroupShape"));
}
break;
case XML_graphicFrame:
diff --git a/reportdesign/source/core/misc/conditionalexpression.cxx b/reportdesign/source/core/misc/conditionalexpression.cxx
index da06a0768b0b..c51a757b3f35 100644
--- a/reportdesign/source/core/misc/conditionalexpression.cxx
+++ b/reportdesign/source/core/misc/conditionalexpression.cxx
@@ -174,14 +174,14 @@ namespace rptui
ConditionalExpressions aEmpty;
_out_rCondExp.swap( aEmpty );
- _out_rCondExp[ eBetween ] = PConditionalExpression( new ConditionalExpression( "AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) )" ) );
- _out_rCondExp[ eNotBetween ] = PConditionalExpression( new ConditionalExpression( "NOT( AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) ) )" ) );
- _out_rCondExp[ eEqualTo ] = PConditionalExpression( new ConditionalExpression( "( $$ ) = ( $1 )" ) );
- _out_rCondExp[ eNotEqualTo ] = PConditionalExpression( new ConditionalExpression( "( $$ ) <> ( $1 )" ) );
- _out_rCondExp[ eGreaterThan ] = PConditionalExpression( new ConditionalExpression( "( $$ ) > ( $1 )" ) );
- _out_rCondExp[ eLessThan ] = PConditionalExpression( new ConditionalExpression( "( $$ ) < ( $1 )" ) );
- _out_rCondExp[ eGreaterOrEqual ] = PConditionalExpression( new ConditionalExpression( "( $$ ) >= ( $1 )" ) );
- _out_rCondExp[ eLessOrEqual ] = PConditionalExpression( new ConditionalExpression( "( $$ ) <= ( $1 )" ) );
+ _out_rCondExp[ eBetween ] = std::make_shared<ConditionalExpression>( "AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) )" );
+ _out_rCondExp[ eNotBetween ] = std::make_shared<ConditionalExpression>( "NOT( AND( ( $$ ) >= ( $1 ); ( $$ ) <= ( $2 ) ) )" );
+ _out_rCondExp[ eEqualTo ] = std::make_shared<ConditionalExpression>( "( $$ ) = ( $1 )" );
+ _out_rCondExp[ eNotEqualTo ] = std::make_shared<ConditionalExpression>( "( $$ ) <> ( $1 )" );
+ _out_rCondExp[ eGreaterThan ] = std::make_shared<ConditionalExpression>( "( $$ ) > ( $1 )" );
+ _out_rCondExp[ eLessThan ] = std::make_shared<ConditionalExpression>( "( $$ ) < ( $1 )" );
+ _out_rCondExp[ eGreaterOrEqual ] = std::make_shared<ConditionalExpression>( "( $$ ) >= ( $1 )" );
+ _out_rCondExp[ eLessOrEqual ] = std::make_shared<ConditionalExpression>( "( $$ ) <= ( $1 )" );
return _out_rCondExp.size();
}
diff --git a/reportdesign/source/ui/misc/FunctionHelper.cxx b/reportdesign/source/ui/misc/FunctionHelper.cxx
index 00c3ae9bd3e5..584a0288e4aa 100644
--- a/reportdesign/source/ui/misc/FunctionHelper.cxx
+++ b/reportdesign/source/ui/misc/FunctionHelper.cxx
@@ -86,10 +86,10 @@ std::shared_ptr< FunctionDescription > FunctionManager::get(const uno::Reference
TCategoriesMap::iterator aCategoryFind = m_aCategories.find(sCategoryName);
if ( aCategoryFind == m_aCategories.end() )
{
- aCategoryFind = m_aCategories.insert(TCategoriesMap::value_type(sCategoryName,std::shared_ptr< FunctionCategory > (new FunctionCategory(this,xCategory->getNumber() + 1,xCategory)))).first;
+ aCategoryFind = m_aCategories.insert(TCategoriesMap::value_type(sCategoryName,std::make_shared< FunctionCategory > (this,xCategory->getNumber() + 1,xCategory))).first;
m_aCategoryIndex.push_back( aCategoryFind );
}
- aFunctionFind = m_aFunctions.insert(TFunctionsMap::value_type(sFunctionName,std::shared_ptr<FunctionDescription>(new FunctionDescription(aCategoryFind->second.get(),_xFunctionDescription)))).first;
+ aFunctionFind = m_aFunctions.insert(TFunctionsMap::value_type(sFunctionName,std::make_shared<FunctionDescription>(aCategoryFind->second.get(),_xFunctionDescription))).first;
}
pDesc = aFunctionFind->second;
}
diff --git a/sc/source/core/opencl/formulagroupcl.cxx b/sc/source/core/opencl/formulagroupcl.cxx
index 55a714e09443..c3167e3c948f 100644
--- a/sc/source/core/opencl/formulagroupcl.cxx
+++ b/sc/source/core/opencl/formulagroupcl.cxx
@@ -4010,8 +4010,7 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
else
{
FormulaTreeNodeRef pChildTreeNode =
- FormulaTreeNodeRef(
- new FormulaTreeNode(pTempFormula));
+ std::make_shared<FormulaTreeNode>(pTempFormula);
pCurNode->Children.push_back(pChildTreeNode);
}
}
@@ -4021,7 +4020,7 @@ DynamicKernel* DynamicKernel::create( const ScCalcConfig& rConfig, ScTokenArray&
aTokenList.push_back(pCur);
}
- FormulaTreeNodeRef Root = FormulaTreeNodeRef(new FormulaTreeNode(nullptr));
+ FormulaTreeNodeRef Root = std::make_shared<FormulaTreeNode>(nullptr);
Root->Children.push_back(aHashMap[aTokenList.back()]);
DynamicKernel* pDynamicKernel = new DynamicKernel(rConfig, Root, nResultSize);
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 2695c4b12e68..9abfdd546ddd 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -838,7 +838,7 @@ void XclImpAutoFilterData::EnableRemoveFilter()
void XclImpAutoFilterBuffer::Insert( RootData* pRoot, const ScRange& rRange)
{
if( !GetByTab( rRange.aStart.Tab() ) )
- maFilters.push_back( XclImpAutoFilterSharePtr(new XclImpAutoFilterData( pRoot, rRange) ));
+ maFilters.push_back( std::make_shared<XclImpAutoFilterData>( pRoot, rRange ));
}
void XclImpAutoFilterBuffer::AddAdvancedRange( const ScRange& rRange )
diff --git a/sc/source/filter/excel/xecontent.cxx b/sc/source/filter/excel/xecontent.cxx
index 24cc6565e9cd..fdc9d9a8c045 100644
--- a/sc/source/filter/excel/xecontent.cxx
+++ b/sc/source/filter/excel/xecontent.cxx
@@ -1259,7 +1259,7 @@ XclExpCondfmt::XclExpCondfmt( const XclExpRoot& rRoot, const ScConditionalFormat
pParent = xExtLst->GetItem( XclExpExtDataBarType );
}
static_cast<XclExpExtCondFormat*>(xExtLst->GetItem( XclExpExtDataBarType ).get())->AddRecord(
- XclExpExtConditionalFormattingRef(new XclExpExtConditionalFormatting( *pParent, aExtEntries, aScRanges)));
+ std::make_shared<XclExpExtConditionalFormatting>( *pParent, aExtEntries, aScRanges));
}
}
}
diff --git a/sc/source/filter/excel/xestyle.cxx b/sc/source/filter/excel/xestyle.cxx
index 7de430196b67..9ad0988d8d7a 100644
--- a/sc/source/filter/excel/xestyle.cxx
+++ b/sc/source/filter/excel/xestyle.cxx
@@ -2802,7 +2802,7 @@ sal_uInt32 XclExpXFBuffer::InsertStyleXF( const SfxStyleSheetBase& rStyleSheet )
if( rbPredefined )
{
// replace predefined built-in style (ReplaceRecord() deletes old record)
- maXFList.ReplaceRecord( XclExpXFRef( new XclExpXF( GetRoot(), rStyleSheet ) ), nXFId );
+ maXFList.ReplaceRecord( std::make_shared<XclExpXF>( GetRoot(), rStyleSheet ), nXFId );
rbPredefined = false;
}
}
diff --git a/sc/source/filter/oox/condformatbuffer.cxx b/sc/source/filter/oox/condformatbuffer.cxx
index 50eb8da79d7f..1c1eadd88518 100644
--- a/sc/source/filter/oox/condformatbuffer.cxx
+++ b/sc/source/filter/oox/condformatbuffer.cxx
@@ -1077,7 +1077,7 @@ void CondFormat::finalizeImport()
CondFormatRuleRef CondFormat::createRule()
{
- return CondFormatRuleRef( new CondFormatRule( *this, mpFormat ) );
+ return std::make_shared<CondFormatRule>( *this, mpFormat );
}
void CondFormat::insertRule( CondFormatRuleRef xRule )
diff --git a/sd/source/core/CustomAnimationPreset.cxx b/sd/source/core/CustomAnimationPreset.cxx
index 9f7bb73da750..2773050a8707 100644
--- a/sd/source/core/CustomAnimationPreset.cxx
+++ b/sd/source/core/CustomAnimationPreset.cxx
@@ -466,7 +466,7 @@ void CustomAnimationPresets::importPresets( const Reference< XMultiServiceFactor
#endif
pEffectNames++;
}
- rPresetMap.push_back( PresetCategoryPtr( new PresetCategory( aLabel, aEffectsList ) ) );
+ rPresetMap.push_back( std::make_shared<PresetCategory>( aLabel, aEffectsList ) );
}
p++;
diff --git a/sd/source/filter/eppt/escherex.cxx b/sd/source/filter/eppt/escherex.cxx
index 346fa881e4b9..3365bcac51f8 100644
--- a/sd/source/filter/eppt/escherex.cxx
+++ b/sd/source/filter/eppt/escherex.cxx
@@ -20,7 +20,7 @@
#include "escherex.hxx"
PptEscherEx::PptEscherEx( SvStream& rOutStrm, const OUString& rBaseURI ) :
- EscherEx( EscherExGlobalRef( new EscherExGlobal ), &rOutStrm )
+ EscherEx( std::make_shared<EscherExGlobal>( ), &rOutStrm )
{
mxGlobal->SetBaseURI( rBaseURI );
mnCurrentDg = 0;
diff --git a/sd/source/filter/html/buttonset.cxx b/sd/source/filter/html/buttonset.cxx
index 2d07d782e135..7828f8d63633 100644
--- a/sd/source/filter/html/buttonset.cxx
+++ b/sd/source/filter/html/buttonset.cxx
@@ -177,7 +177,7 @@ void ButtonSetImpl::scanForButtonSets( const OUString& rPath )
{
OUString sFileName( aStatus.getFileName() );
if( sFileName.endsWithIgnoreAsciiCase( ".zip" ) )
- maButtons.push_back( std::shared_ptr< ButtonsImpl >( new ButtonsImpl( aStatus.getFileURL() ) ) );
+ maButtons.push_back( std::make_shared< ButtonsImpl >( aStatus.getFileURL() ) );
}
}
}
diff --git a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
index 4bbeb6d76595..df1d5670001f 100644
--- a/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
+++ b/sd/source/ui/framework/configuration/ConfigurationUpdater.cxx
@@ -356,7 +356,7 @@ void ConfigurationUpdater::UnlockUpdates()
std::shared_ptr<ConfigurationUpdaterLock> ConfigurationUpdater::GetLock()
{
- return std::shared_ptr<ConfigurationUpdaterLock>(new ConfigurationUpdaterLock(*this));
+ return std::make_shared<ConfigurationUpdaterLock>(*this);
}
void ConfigurationUpdater::SetUpdateBeingProcessed (bool bValue)
diff --git a/sd/source/ui/remotecontrol/Server.cxx b/sd/source/ui/remotecontrol/Server.cxx
index f58d69f9b71b..be5ab7b73098 100644
--- a/sd/source/ui/remotecontrol/Server.cxx
+++ b/sd/source/ui/remotecontrol/Server.cxx
@@ -264,7 +264,7 @@ std::vector< std::shared_ptr< ClientInfo > > RemoteServer::getClients()
Sequence< OUString > aNames = xConfig->getElementNames();
for ( int i = 0; i < aNames.getLength(); i++ )
{
- aClients.push_back( std::shared_ptr< ClientInfo > ( new ClientInfo( aNames[i], true ) ) );
+ aClients.push_back( std::make_shared< ClientInfo > ( aNames[i], true ) );
}
return aClients;
diff --git a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
index 6baca008835b..68fc9a0450ed 100644
--- a/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
+++ b/sd/source/ui/slidesorter/model/SlideSorterModel.cxx
@@ -562,11 +562,10 @@ void SlideSorterModel::InsertSlide (SdPage* pPage)
// Insert the given page at index nIndex
maPageDescriptors.insert(
maPageDescriptors.begin()+nIndex,
- SharedPageDescriptor(
- new PageDescriptor (
+ std::make_shared<PageDescriptor>(
Reference<drawing::XDrawPage>(mxSlides->getByIndex(nIndex),UNO_QUERY),
pPage,
- nIndex)));
+ nIndex));
// Update page indices.
UpdateIndices(nIndex+1);
diff --git a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
index 41e878e4fdbd..2145b389c3aa 100644
--- a/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
+++ b/sd/source/ui/slidesorter/view/SlsInsertAnimator.cxx
@@ -216,11 +216,11 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun (
{
// There is only one run that contains all slides.
if (maRuns.empty())
- maRuns.insert(SharedPageObjectRun(new PageObjectRun(
+ maRuns.insert(std::make_shared<PageObjectRun>(
*this,
0,
0,
- mrModel.GetPageCount()-1)));
+ mrModel.GetPageCount()-1));
iRun = maRuns.begin();
}
else
@@ -233,11 +233,11 @@ SharedPageObjectRun InsertAnimator::Implementation::GetRun (
const sal_Int32 nEndIndex (rLayouter.GetIndex(nRow, rLayouter.GetColumnCount()-1));
if (nStartIndex <= nEndIndex)
{
- iRun = maRuns.insert(SharedPageObjectRun(new PageObjectRun(
+ iRun = maRuns.insert(std::make_shared<PageObjectRun>(
*this,
nRow,
nStartIndex,
- nEndIndex))).first;
+ nEndIndex)).first;
OSL_ASSERT(iRun != maRuns.end());
}
}
diff --git a/sdext/source/presenter/PresenterHelpView.cxx b/sdext/source/presenter/PresenterHelpView.cxx
index 12dac0864fa1..42ba18411179 100644
--- a/sdext/source/presenter/PresenterHelpView.cxx
+++ b/sdext/source/presenter/PresenterHelpView.cxx
@@ -382,8 +382,8 @@ void PresenterHelpView::ProcessString (
OUString sRightText;
PresenterConfigurationAccess::GetProperty(rsProperties, "Right") >>= sRightText;
mpTextContainer->push_back(
- std::shared_ptr<Block>(
- new Block(sLeftText, sRightText, mpFont->mxFont, mnMaximalWidth)));
+ std::make_shared<Block>(
+ sLeftText, sRightText, mpFont->mxFont, mnMaximalWidth));
}
void PresenterHelpView::CheckFontSize()
diff --git a/sdext/source/presenter/PresenterTimer.cxx b/sdext/source/presenter/PresenterTimer.cxx
index 6f46efd16914..329a3ffff097 100644
--- a/sdext/source/presenter/PresenterTimer.cxx
+++ b/sdext/source/presenter/PresenterTimer.cxx
@@ -174,7 +174,7 @@ SharedTimerTask TimerScheduler::CreateTimerTask (
const TimeValue& rDueTime,
const sal_Int64 nRepeatIntervall)
{
- return SharedTimerTask(new TimerTask(rTask, rDueTime, nRepeatIntervall, ++mnTaskId));
+ return std::make_shared<TimerTask>(rTask, rDueTime, nRepeatIntervall, ++mnTaskId);
}
void TimerScheduler::ScheduleTask (const SharedTimerTask& rpTask)
diff --git a/sfx2/source/doc/Metadatable.cxx b/sfx2/source/doc/Metadatable.cxx
index 9f3edfaa5157..f6f3ae963672 100644
--- a/sfx2/source/doc/Metadatable.cxx
+++ b/sfx2/source/doc/Metadatable.cxx
@@ -837,8 +837,8 @@ XmlIdRegistryDocument::CreateUndo(Metadatable const& i_rObject)
{
OSL_TRACE("CreateUndo: %p", &i_rObject);
- return std::shared_ptr<MetadatableUndo>(
- new MetadatableUndo(i_rObject.IsInContent()) );
+ return std::make_shared<MetadatableUndo>(
+ i_rObject.IsInContent() );
}
/*
@@ -1216,8 +1216,8 @@ XmlIdRegistryClipboard::CreateClipboard(const bool i_isInContent)
{
OSL_TRACE("CreateClipboard:");
- return std::shared_ptr<MetadatableClipboard>(
- new MetadatableClipboard(i_isInContent) );
+ return std::make_shared<MetadatableClipboard>(
+ i_isInContent );
}
MetadatableClipboard &
diff --git a/slideshow/source/engine/shapes/appletshape.cxx b/slideshow/source/engine/shapes/appletshape.cxx
index 3f3e20a66616..17aa2ec61833 100644
--- a/slideshow/source/engine/shapes/appletshape.cxx
+++ b/slideshow/source/engine/shapes/appletshape.cxx
@@ -148,12 +148,12 @@ namespace slideshow
try
{
maViewAppletShapes.push_back(
- ViewAppletShapeSharedPtr( new ViewAppletShape( rNewLayer,
- getXShape(),
- maServiceName,
- mpPropCopyTable,
- mnNumPropEntries,
- mxComponentContext )));
+ std::make_shared<ViewAppletShape>( rNewLayer,
+ getXShape(),
+ maServiceName,
+ mpPropCopyTable,
+ mnNumPropEntries,
+ mxComponentContext ));
// push new size to view shape
maViewAppletShapes.back()->resize( getBounds() );
diff --git a/slideshow/source/engine/shapes/backgroundshape.cxx b/slideshow/source/engine/shapes/backgroundshape.cxx
index 15de5c28632d..4b4a5b1384a0 100644
--- a/slideshow/source/engine/shapes/backgroundshape.cxx
+++ b/slideshow/source/engine/shapes/backgroundshape.cxx
@@ -170,9 +170,8 @@ namespace slideshow
}
maViewShapes.push_back(
- ViewBackgroundShapeSharedPtr(
- new ViewBackgroundShape( rNewLayer,
- maBounds ) ) );
+ std::make_shared<ViewBackgroundShape>(
+ rNewLayer, maBounds ) );
// render the Shape on the newly added ViewLayer
if( bRedrawLayer )
diff --git a/slideshow/source/engine/shapes/mediashape.cxx b/slideshow/source/engine/shapes/mediashape.cxx
index 0213287c0b49..62a83117d78d 100644
--- a/slideshow/source/engine/shapes/mediashape.cxx
+++ b/slideshow/source/engine/shapes/mediashape.cxx
@@ -123,9 +123,9 @@ namespace slideshow
bool bRedrawLayer )
{
maViewMediaShapes.push_back(
- ViewMediaShapeSharedPtr( new ViewMediaShape( rNewLayer,
- getXShape(),
- mxComponentContext )));
+ std::make_shared<ViewMediaShape>( rNewLayer,
+ getXShape(),
+ mxComponentContext ));
// push new size to view shape
maViewMediaShapes.back()->resize( getBounds() );
diff --git a/slideshow/source/engine/slide/layer.cxx b/slideshow/source/engine/slide/layer.cxx
index cc2f3e6be3ce..0aa3352192a8 100644
--- a/slideshow/source/engine/slide/layer.cxx
+++ b/slideshow/source/engine/slide/layer.cxx
@@ -239,7 +239,7 @@ namespace slideshow
}
}
- return EndUpdater(new LayerEndUpdate(shared_from_this()));
+ return std::make_shared<LayerEndUpdate>(shared_from_this());
}
void Layer::endUpdate()
diff --git a/slideshow/source/engine/slide/slideimpl.cxx b/slideshow/source/engine/slide/slideimpl.cxx
index a3067267f3de..0c63e51badb4 100644
--- a/slideshow/source/engine/slide/slideimpl.cxx
+++ b/slideshow/source/engine/slide/slideimpl.cxx
@@ -697,7 +697,7 @@ SlideBitmapSharedPtr SlideImpl::createCurrentSlideBitmap( const UnoViewSharedPtr
initSlideBackground( pBitmapCanvas, rBmpSize );
mpLayerManager->renderTo( pBitmapCanvas );
- return SlideBitmapSharedPtr( new SlideBitmap( pBitmap ) );
+ return std::make_shared<SlideBitmap>( pBitmap );
}
namespace
diff --git a/slideshow/source/engine/slideshowimpl.cxx b/slideshow/source/engine/slideshowimpl.cxx
index af483455d47d..ff273727af14 100644
--- a/slideshow/source/engine/slideshowimpl.cxx
+++ b/slideshow/source/engine/slideshowimpl.cxx
@@ -1856,8 +1856,8 @@ void SlideShowImpl::addShapeEventListener(
aIter = maShapeEventListeners.insert(
ShapeEventListenerMap::value_type(
xShape,
- std::shared_ptr<comphelper::OInterfaceContainerHelper2>(
- new comphelper::OInterfaceContainerHelper2(m_aMutex)))).first;
+ std::make_shared<comphelper::OInterfaceContainerHelper2>(
+ m_aMutex))).first;
}
// add new listener to broadcaster
diff --git a/svl/source/items/itempool.cxx b/svl/source/items/itempool.cxx
index d0d1ceea753c..be8a3e92762e 100644
--- a/svl/source/items/itempool.cxx
+++ b/svl/source/items/itempool.cxx
@@ -247,7 +247,7 @@ SfxItemPool::SfxItemPool
// Copy Version map
for (std::shared_ptr<SfxPoolVersion_Impl>& pOld : rPool.pImp->aVersions)
{
- SfxPoolVersion_ImplPtr pNew = SfxPoolVersion_ImplPtr( new SfxPoolVersion_Impl( *pOld ) );
+ SfxPoolVersion_ImplPtr pNew = std::make_shared<SfxPoolVersion_Impl>( *pOld );
pImp->aVersions.push_back( pNew );
}
diff --git a/svl/source/items/poolio.cxx b/svl/source/items/poolio.cxx
index d3837e957070..d380e9b8a112 100644
--- a/svl/source/items/poolio.cxx
+++ b/svl/source/items/poolio.cxx
@@ -988,8 +988,8 @@ void SfxItemPool::SetVersionMap
)
{
// Create new map entry to insert
- const SfxPoolVersion_ImplPtr pVerMap = SfxPoolVersion_ImplPtr( new SfxPoolVersion_Impl(
- nVer, nOldStart, nOldEnd, pOldWhichIdTab ) );
+ const SfxPoolVersion_ImplPtr pVerMap = std::make_shared<SfxPoolVersion_Impl>(
+ nVer, nOldStart, nOldEnd, pOldWhichIdTab );
pImp->aVersions.push_back( pVerMap );
DBG_ASSERT( nVer > pImp->nVersion, "Versions not sorted" );
diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx
index f14dd8a1137e..d0c2428930e0 100644
--- a/svl/source/items/style.cxx
+++ b/svl/source/items/style.cxx
@@ -636,7 +636,7 @@ SfxStyleSheetIteratorPtr SfxStyleSheetBasePool::CreateIterator
sal_uInt16 mask
)
{
- return SfxStyleSheetIteratorPtr(new SfxStyleSheetIterator(this,eFam,mask));
+ return std::make_shared<SfxStyleSheetIterator>(this,eFam,mask);
}
SfxStyleSheetBase* SfxStyleSheetBasePool::Create
diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx
index c785bac57e98..cb67ec81dbff 100644
--- a/svx/source/table/tablertfimporter.cxx
+++ b/svx/source/table/tablertfimporter.cxx
@@ -300,7 +300,7 @@ void SdrTableRTFParser::NewCellRow()
{
mbNewDef = false;
- maRows.push_back( RTFColumnVectorPtr( new RTFColumnVector() ) );
+ maRows.push_back( std::make_shared<std::vector<std::shared_ptr<RTFCellInfo>>>( ) );
}
mpDefMerge = nullptr;
maDefaultIterator = maDefaultList.begin();
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 3b0aff2f1a34..10b218a25586 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -529,7 +529,7 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso,
if( pCmpRange &&
!lcl_TstFlyRange( pCmpRange, pAPos, rAnchor.GetAnchorId() ))
continue; // not a valid FlyFrame
- aRetval.insert(SwPosFlyFramePtr(new SwPosFlyFrame(pAPos->nNode, pFly, aRetval.size())));
+ aRetval.insert(std::make_shared<SwPosFlyFrame>(pAPos->nNode, pFly, aRetval.size()));
}
}
}
@@ -578,7 +578,7 @@ SwPosFlyFrames SwDoc::GetAllFlyFormats( const SwPaM* pCmpRange, bool bDrawAlso,
if ( pContentFrame )
{
SwNodeIndex aIdx( *pContentFrame->GetNode() );
- aRetval.insert(SwPosFlyFramePtr(new SwPosFlyFrame(aIdx, pFly, aRetval.size())));
+ aRetval.insert(std::make_shared<SwPosFlyFrame>(aIdx, pFly, aRetval.size()));
}
}
}
diff --git a/sw/source/core/doc/tblrwcl.cxx b/sw/source/core/doc/tblrwcl.cxx
index 404167e22410..566457ea02ca 100644
--- a/sw/source/core/doc/tblrwcl.cxx
+++ b/sw/source/core/doc/tblrwcl.cxx
@@ -1736,8 +1736,8 @@ static void lcl_CalcNewWidths(const FndLines_t& rFndLines, CpyPara& rPara)
const size_t nLineCount = rFndLines.size();
if( nLineCount )
{
- rPara.pWidths = std::shared_ptr< std::vector< std::vector< sal_uLong > > >
- ( new std::vector< std::vector< sal_uLong > >( nLineCount ));
+ rPara.pWidths = std::make_shared< std::vector< std::vector< sal_uLong > > >
+ ( nLineCount );
// First we collect information about the left/right borders of all
// selected cells
for( size_t nLine = 0; nLine < nLineCount; ++nLine )
diff --git a/sw/source/core/frmedt/fecopy.cxx b/sw/source/core/frmedt/fecopy.cxx
index cf9aa55a9a44..5506cb9b8e58 100644
--- a/sw/source/core/frmedt/fecopy.cxx
+++ b/sw/source/core/frmedt/fecopy.cxx
@@ -753,8 +753,8 @@ bool SwFEShell::Paste( SwDoc* pClpDoc )
OSL_ENSURE( aIdx.GetNode().GetContentNode(), "Who filled the clipboard?!" );
if( aIdx.GetNode().GetContentNode() ) // robust
{
- Insertion aInsertion( PaMPtr( new SwPaM( aIdx ) ),
- PositionPtr( new SwPosition( aInsertPos ) ) );
+ Insertion aInsertion( std::make_shared<SwPaM>( aIdx ),
+ std::make_shared<SwPosition>( aInsertPos ) );
++aIdx;
aInsertion.first->SetMark();
if( pStartCursor == pCurrCursor->GetNext() )
diff --git a/sw/source/core/unocore/unoobj2.cxx b/sw/source/core/unocore/unoobj2.cxx
index 60c3a29497cf..71619b352d6b 100644
--- a/sw/source/core/unocore/unoobj2.cxx
+++ b/sw/source/core/unocore/unoobj2.cxx
@@ -1661,7 +1661,7 @@ SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl(
}
else if (pFormat)
{
- m_vFrames.push_back(std::shared_ptr<sw::FrameClient>(new sw::FrameClient(pFormat)));
+ m_vFrames.push_back(std::make_shared<sw::FrameClient>(pFormat));
}
else if ((PARAFRAME_PORTION_CHAR == eParaFrameMode) ||
(PARAFRAME_PORTION_TEXTRANGE == eParaFrameMode))
@@ -1672,7 +1672,7 @@ SwXParaFrameEnumerationImpl::SwXParaFrameEnumerationImpl(
for(const auto& pFlyFrame : rPaM.GetDoc()->GetAllFlyFormats(&GetCursor(), false, true))
{
const auto pFrameFormat = const_cast<SwFrameFormat*>(&pFlyFrame->GetFormat());
- m_vFrames.push_back(std::shared_ptr<sw::FrameClient>(new sw::FrameClient(pFrameFormat)));
+ m_vFrames.push_back(std::make_shared<sw::FrameClient>(pFrameFormat));
}
}
FillFrame();
@@ -1692,7 +1692,7 @@ void SwXParaFrameEnumerationImpl::FillFrame()
return;
const SwFormatFlyCnt& rFlyCnt = pTextAttr->GetFlyCnt();
SwFrameFormat* const pFrameFormat = rFlyCnt.GetFrameFormat();
- m_vFrames.push_back(std::shared_ptr<sw::FrameClient>(new sw::FrameClient(pFrameFormat)));
+ m_vFrames.push_back(std::make_shared<sw::FrameClient>(pFrameFormat));
}
bool SwXParaFrameEnumerationImpl::CreateNextObject()
diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
index 918d1f7b7722..1f0db3dfda0c 100644
--- a/sw/source/core/unocore/unoportenum.cxx
+++ b/sw/source/core/unocore/unoportenum.cxx
@@ -142,10 +142,9 @@ namespace
::sw::mark::CrossRefBookmark *const pCrossRefMark(dynamic_cast< ::sw::mark::CrossRefBookmark*>(pBkmk));
sal_uInt8 const nType = (hasOther || pCrossRefMark)
? BKM_TYPE_START : BKM_TYPE_START_END;
- rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
- new SwXBookmarkPortion_Impl(
+ rBkmArr.insert(std::make_shared<SwXBookmarkPortion_Impl>(
SwXBookmark::CreateXBookmark(rDoc, pBkmk),
- nType, rStartPos)));
+ nType, rStartPos));
}
const SwPosition& rEndPos = pBkmk->GetMarkEnd();
@@ -167,10 +166,9 @@ namespace
}
if(pEndPos)
{
- rBkmArr.insert(SwXBookmarkPortion_ImplSharedPtr(
- new SwXBookmarkPortion_Impl(
+ rBkmArr.insert(std::make_shared<SwXBookmarkPortion_Impl>(
SwXBookmark::CreateXBookmark(rDoc, pBkmk),
- BKM_TYPE_END, *pEndPos)));
+ BKM_TYPE_END, *pEndPos));
}
}
}
@@ -302,11 +300,10 @@ namespace
if ( pAnnotationFormatField != nullptr )
{
rAnnotationStartArr.insert(
- SwAnnotationStartPortion_ImplSharedPtr(
- new SwAnnotationStartPortion_Impl(
+ std::make_shared<SwAnnotationStartPortion_Impl>(
SwXTextField::CreateXTextField(&rDoc,
pAnnotationFormatField),
- rStartPos)));
+ rStartPos));
}
}
}
@@ -1073,11 +1070,11 @@ static void lcl_FillRedlineArray(
const SwPosition* pRedStart = pRedline->Start();
const SwNodeIndex nRedNode = pRedStart->nNode;
if ( nOwnNode == nRedNode )
- rRedArr.insert( SwXRedlinePortion_ImplSharedPtr (
- new SwXRedlinePortion_Impl ( pRedline, true ) ) );
+ rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>(
+ pRedline, true ) );
if( pRedline->HasMark() && pRedline->End()->nNode == nOwnNode )
- rRedArr.insert( SwXRedlinePortion_ImplSharedPtr (
- new SwXRedlinePortion_Impl ( pRedline, false) ) );
+ rRedArr.insert( std::make_shared<SwXRedlinePortion_Impl>(
+ pRedline, false ) );
}
}
}
diff --git a/sw/source/core/unocore/unorefmk.cxx b/sw/source/core/unocore/unorefmk.cxx
index 0d538d2cd95f..bcf505bac471 100644
--- a/sw/source/core/unocore/unorefmk.cxx
+++ b/sw/source/core/unocore/unorefmk.cxx
@@ -1031,7 +1031,7 @@ throw (lang::IllegalArgumentException, uno::RuntimeException)
: SetAttrMode::DONTEXPAND );
const std::shared_ptr< ::sw::Meta> pMeta( (RES_TXTATR_META == i_nWhich)
- ? std::shared_ptr< ::sw::Meta>( new ::sw::Meta() )
+ ? std::make_shared< ::sw::Meta>( )
: std::shared_ptr< ::sw::Meta>(
pDoc->GetMetaFieldManager().makeMetaField()) );
SwFormatMeta meta(pMeta, i_nWhich); // this is cloned by Insert!
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index 870077a2dcfd..ba2f094e5135 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -265,7 +265,7 @@ WidthsPtr WW8TableNodeInfoInner::getColumnWidthsBasedOnAllRows()
// Calculate the widths based on the position of the unique & sorted
// column separators
- pWidths = WidthsPtr(new Widths);
+ pWidths = std::make_shared<Widths>();
sal_uInt32 nPreviousWidth = 0;
Widths::const_iterator aItEnd2 = pSeparators->end();
for (Widths::const_iterator aIt2 = pSeparators->begin(); aIt2 != aItEnd2; ++aIt2)
@@ -296,7 +296,7 @@ WidthsPtr WW8TableNodeInfoInner::getWidthsOfRow()
const SwTableLine * pTabLine = pTabBox->GetUpper();
const SwTableBoxes & rTabBoxes = pTabLine->GetTabBoxes();
- pWidths = WidthsPtr(new Widths);
+ pWidths = std::make_shared<Widths>();
// number of cell written
sal_uInt32 nBoxes = rTabBoxes.size();
if (nBoxes > MAXTABLECELLS)
@@ -417,7 +417,7 @@ void WW8TableNodeInfo::setDepth(sal_uInt32 nDepth)
Inners_t::iterator aIt = mInners.find(mnDepth);
if (aIt == mInners.end())
- mInners[mnDepth] = WW8TableNodeInfoInner::Pointer_t(new WW8TableNodeInfoInner(this));
+ mInners[mnDepth] = std::make_shared<ww8::WW8TableNodeInfoInner>(this);
mInners[mnDepth]->setDepth(mnDepth);
}
@@ -856,7 +856,7 @@ WW8TableNodeInfo::Pointer_t WW8TableInfo::insertTableNodeInfo
if (pNodeInfo.get() == nullptr)
{
pNodeInfo =
- WW8TableNodeInfo::Pointer_t(new WW8TableNodeInfo(this, pNode));
+ std::make_shared<ww8::WW8TableNodeInfo>(this, pNode);
mMap.insert(Map_t::value_type(pNode, pNodeInfo));
}
@@ -902,7 +902,7 @@ WW8TableCellGrid::Pointer_t WW8TableInfo::getCellGridForTable
{
if (bCreate)
{
- pResult = WW8TableCellGrid::Pointer_t(new WW8TableCellGrid);
+ pResult = std::make_shared<ww8::WW8TableCellGrid>();
mCellGridMap[pTable] = pResult;
}
}
@@ -1056,7 +1056,7 @@ WW8TableCellGridRow::Pointer_t WW8TableCellGrid::getRow(long nTop, bool bCreate)
{
if (bCreate)
{
- pResult = WW8TableCellGridRow::Pointer_t(new WW8TableCellGridRow);
+ pResult = std::make_shared<ww8::WW8TableCellGridRow>();
m_aRows[nTop] = pResult;
m_aRowTops.insert(nTop);
}
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 9eba299b355b..1678188120aa 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -494,7 +494,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
*/
ww8::WW8TableInfo::Pointer_t pOldTableInfo = m_rExport.m_pTableInfo;
//Reset the table infos after saving.
- m_rExport.m_pTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+ m_rExport.m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
/** FDO#71834 :
Save the table reference attributes before calling WriteDMLTextFrame,
@@ -511,7 +511,7 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
// Reset table infos, otherwise the depth of the cells will be incorrect,
// in case the text frame had table(s) and we try to export the
// same table second time.
- m_rExport.m_pTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+ m_rExport.m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
//reset the tableReference.
m_pSerializer->startElementNS(XML_mc, XML_Fallback, FSEND);
@@ -5117,7 +5117,7 @@ void DocxAttributeOutput::WriteOutliner(const OutlinerParaObject& rParaObj)
void DocxAttributeOutput::pushToTableExportContext(DocxTableExportContext& rContext)
{
rContext.m_pTableInfo = m_rExport.m_pTableInfo;
- m_rExport.m_pTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+ m_rExport.m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
rContext.m_bTableCellOpen = m_tableReference->m_bTableCellOpen;
m_tableReference->m_bTableCellOpen = false;
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 2aa0cf676a3b..b6eebc9f6d17 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -1790,7 +1790,7 @@ void RtfAttributeOutput::writeTextFrame(const ww8::Frame& rFrame, bool bTextBox)
{
// Save table state, in case the inner text also contains a table.
ww8::WW8TableInfo::Pointer_t pTableInfoOrig = m_rExport.m_pTableInfo;
- m_rExport.m_pTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+ m_rExport.m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
std::unique_ptr<SwWriteTable> pTableWrt(m_pTableWrt.release());
sal_uInt32 nTableDepth = m_nTableDepth;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index 729ce243b66c..2cd959a8643c 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -565,7 +565,7 @@ void RtfExport::WritePageDescTable()
// reset table infos, otherwise the depth of the cells will be incorrect,
// in case the page style (header or footer) had tables
- m_pTableInfo = ww8::WW8TableInfo::Pointer_t(new ww8::WW8TableInfo());
+ m_pTableInfo = std::make_shared<ww8::WW8TableInfo>();
}
void RtfExport::ExportDocument_Impl()
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index 96a2bd4f1f6a..77d4645db57e 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -32,7 +32,7 @@
using namespace css;
RtfSdrExport::RtfSdrExport(RtfExport& rExport)
- : EscherEx(EscherExGlobalRef(new EscherExGlobal), nullptr),
+ : EscherEx(std::make_shared<EscherExGlobal>(), nullptr),
m_rExport(rExport),
m_rAttrOutput(static_cast<RtfAttributeOutput&>(m_rExport.AttrOutput())),
m_pSdrObject(nullptr),
diff --git a/sw/source/uibase/frmdlg/colex.cxx b/sw/source/uibase/frmdlg/colex.cxx
index 0da911b0ae84..4a42b146c3ad 100644
--- a/sw/source/uibase/frmdlg/colex.cxx
+++ b/sw/source/uibase/frmdlg/colex.cxx
@@ -135,9 +135,8 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
setHeaderFillAttributes(
- drawinglayer::attribute::SdrAllFillAttributesHelperPtr(
- new drawinglayer::attribute::SdrAllFillAttributesHelper(
- aTempSet)));
+ std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
+ aTempSet));
}
if ( rHeaderSet.GetItemState( RES_BOX ) == SfxItemState::SET )
@@ -182,9 +181,8 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
setFooterFillAttributes(
- drawinglayer::attribute::SdrAllFillAttributesHelperPtr(
- new drawinglayer::attribute::SdrAllFillAttributesHelper(
- aTempSet)));
+ std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
+ aTempSet));
}
if( rFooterSet.GetItemState( RES_BOX ) == SfxItemState::SET )
@@ -206,9 +204,8 @@ void SwPageExample::UpdateExample( const SfxItemSet& rSet )
setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet);
setPageFillAttributes(
- drawinglayer::attribute::SdrAllFillAttributesHelperPtr(
- new drawinglayer::attribute::SdrAllFillAttributesHelper(
- aTempSet)));
+ std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
+ aTempSet));
}
Invalidate();
@@ -255,8 +252,8 @@ void SwColExample::DrawPage(vcl::RenderContext& rRenderContext, const Point& rOr
const Color& rFieldColor = rStyleSettings.GetFieldColor();
setPageFillAttributes(
- drawinglayer::attribute::SdrAllFillAttributesHelperPtr(
- new drawinglayer::attribute::SdrAllFillAttributesHelper(rFieldColor)));
+ std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(
+ rFieldColor));
}
// #97495# make sure that the automatic column width's are always equal
diff --git a/toolkit/source/controls/unocontrolcontainer.cxx b/toolkit/source/controls/unocontrolcontainer.cxx
index a6278272a938..fe396930d6c4 100644
--- a/toolkit/source/controls/unocontrolcontainer.cxx
+++ b/toolkit/source/controls/unocontrolcontainer.cxx
@@ -267,7 +267,7 @@ UnoControlHolderList::ControlIdentifier UnoControlHolderList::impl_addControl( c
OUString sName = _pName ? *_pName : impl_getFreeName_throw();
sal_Int32 nId = impl_getFreeIdentifier_throw();
- maControls[ nId ] = ControlInfo( new UnoControlHolder( sName, _rxControl ) );
+ maControls[ nId ] = std::make_shared<UnoControlHolder>( sName, _rxControl );
return nId;
}
diff --git a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
index 83a6d98e7e73..829f228c6b8f 100644
--- a/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
+++ b/vcl/unx/generic/gdi/cairo_xlib_cairo.cxx
@@ -230,8 +230,7 @@ namespace cairo
aSysData.pRenderFormat = pFormat;
return SurfaceSharedPtr(
new X11Surface( aSysData,
- X11PixmapSharedPtr(
- new X11Pixmap(hPixmap, maSysData.pDisplay)),
+ std::make_shared<X11Pixmap>(hPixmap, maSysData.pDisplay),
CairoSurfaceSharedPtr(
cairo_xlib_surface_create_with_xrender_format(
static_cast<Display*>(maSysData.pDisplay),
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index f5db807046da..5450f1db901a 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -2644,7 +2644,7 @@ void DomainMapper_Impl::PushFieldContext()
uno::Reference< text::XTextCursor > xCrsr = xTextAppend->createTextCursorByRange( xTextAppend->getEnd() );
xStart = xCrsr->getStart();
}
- m_aFieldStack.push( FieldContextPtr( new FieldContext( xStart ) ) );
+ m_aFieldStack.push( std::make_shared<FieldContext>( xStart ) );
}
/*-------------------------------------------------------------------------
//the current field context waits for the completion of the command
diff --git a/writerfilter/source/dmapper/TrackChangesHandler.cxx b/writerfilter/source/dmapper/TrackChangesHandler.cxx
index f5864c144274..b6d592740189 100644
--- a/writerfilter/source/dmapper/TrackChangesHandler.cxx
+++ b/writerfilter/source/dmapper/TrackChangesHandler.cxx
@@ -23,7 +23,7 @@ using namespace oox;
TrackChangesHandler::TrackChangesHandler( sal_Int32 nToken ) :
LoggedProperties("TrackChangesHandler")
{
- m_pRedlineParams = RedlineParamsPtr( new RedlineParams() );
+ m_pRedlineParams = std::make_shared<RedlineParams>( );
m_pRedlineParams->m_nToken = nToken;
}
diff --git a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
index 4e8d4d497436..5edac7a4f46d 100644
--- a/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
+++ b/writerfilter/source/ooxml/OOXMLFastContextHandler.cxx
@@ -694,8 +694,7 @@ void OOXMLFastContextHandler::sendTableProperties()
void OOXMLFastContextHandler::clearTableProps()
{
- mpParserState->setTableProperties(OOXMLPropertySet::Pointer_t
- (new OOXMLPropertySet));
+ mpParserState->setTableProperties(std::make_shared<OOXMLPropertySet>());
}
void OOXMLFastContextHandler::sendPropertiesWithId(Id nId)
@@ -711,7 +710,7 @@ void OOXMLFastContextHandler::sendPropertiesWithId(Id nId)
void OOXMLFastContextHandler::clearProps()
{
- setPropertySet(OOXMLPropertySet::Pointer_t(new OOXMLPropertySet));
+ setPropertySet(std::make_shared<OOXMLPropertySet>());
}
void OOXMLFastContextHandler::setDefaultBooleanValue()
diff --git a/xmloff/source/core/RDFaImportHelper.cxx b/xmloff/source/core/RDFaImportHelper.cxx
index 6e96e6d5e9f5..1d8b440d3ea5 100644
--- a/xmloff/source/core/RDFaImportHelper.cxx
+++ b/xmloff/source/core/RDFaImportHelper.cxx
@@ -390,8 +390,8 @@ RDFaImportHelper::ParseRDFa(
const OUString datatype( !i_rDatatype.isEmpty()
? reader.ReadCURIE(i_rDatatype)
: OUString() );
- return std::shared_ptr<ParsedRDFaAttributes>(
- new ParsedRDFaAttributes(about, properties, i_rContent, datatype));
+ return std::make_shared<ParsedRDFaAttributes>(
+ about, properties, i_rContent, datatype);
}
void
diff --git a/xmloff/source/table/XMLTableImport.cxx b/xmloff/source/table/XMLTableImport.cxx
index 69899159862b..d4b505d8bb9e 100644
--- a/xmloff/source/table/XMLTableImport.cxx
+++ b/xmloff/source/table/XMLTableImport.cxx
@@ -467,7 +467,7 @@ SvXMLImportContext * XMLTableImportContext::ImportCell( sal_uInt16 nPrefix, cons
const sal_Int32 nColumnSpan = pCellContext->getColumnSpan();
const sal_Int32 nRowSpan = pCellContext->getRowSpan();
if( (nColumnSpan > 1) || (nRowSpan > 1) )
- maMergeInfos.push_back( std::shared_ptr< MergeInfo >( new MergeInfo( mnCurrentColumn, mnCurrentRow, nColumnSpan, nRowSpan ) ) );
+ maMergeInfos.push_back( std::make_shared< MergeInfo >( mnCurrentColumn, mnCurrentRow, nColumnSpan, nRowSpan ) );
const sal_Int32 nRepeated = pCellContext->getRepeated();
if( nRepeated > 1 )
diff --git a/xmloff/source/text/XMLPropertyBackpatcher.cxx b/xmloff/source/text/XMLPropertyBackpatcher.cxx
index 49f660b572b7..5f18c6d84f33 100644
--- a/xmloff/source/text/XMLPropertyBackpatcher.cxx
+++ b/xmloff/source/text/XMLPropertyBackpatcher.cxx
@@ -165,7 +165,7 @@ std::shared_ptr<XMLTextImportHelper::BackpatcherImpl>
XMLTextImportHelper::MakeBackpatcherImpl()
{
// n.b.: the shared_ptr stores the dtor!
- return std::shared_ptr<BackpatcherImpl>(new BackpatcherImpl);
+ return std::make_shared<BackpatcherImpl>();
}
static OUString GetSequenceNumber()