summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2016-05-17 13:09:11 +0200
committerNoel Grandin <noelgrandin@gmail.com>2016-05-18 06:58:44 +0000
commitd96c114171dada05caffd9a50f870809ebd0c450 (patch)
tree2ef1572fce732c39557b3f2f944aef86f17aa703 /slideshow
parent70aa5799336de6cbd1d964e2e9a176b44d438db2 (diff)
clang-tidy modernize-make-shared
Change-Id: I3fa866bfb3093fc876474a9d9db29fe05dc2af3a Reviewed-on: https://gerrit.libreoffice.org/25056 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'slideshow')
-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
6 files changed, 15 insertions, 16 deletions
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