[Libreoffice-commits] core.git: 2 commits - chart2/source comphelper/source connectivity/source cppcanvas/source cppuhelper/source
Noel Grandin (via logerrit)
logerrit at kemper.freedesktop.org
Fri Jan 24 06:19:08 UTC 2020
chart2/source/controller/accessibility/AccessibleChartView.cxx | 4 -
chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx | 2
chart2/source/controller/dialogs/DataBrowser.cxx | 6 +-
chart2/source/controller/dialogs/DialogModel.cxx | 4 -
chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx | 2
chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx | 2
chart2/source/controller/main/UndoGuard.cxx | 2
chart2/source/view/main/ChartView.cxx | 4 -
comphelper/source/misc/DirectoryHelper.cxx | 2
comphelper/source/misc/backupfilehelper.cxx | 8 +--
comphelper/source/misc/logging.cxx | 2
comphelper/source/misc/sharedmutex.cxx | 2
connectivity/source/commontools/RowFunctionParser.cxx | 2
connectivity/source/commontools/TTableHelper.cxx | 4 -
connectivity/source/commontools/sqlerror.cxx | 2
connectivity/source/drivers/hsqldb/HStorageMap.cxx | 4 -
connectivity/source/drivers/mork/MStatement.cxx | 2
connectivity/source/parse/sqliterator.cxx | 6 +-
connectivity/source/parse/sqlnode.cxx | 2
connectivity/source/sdbcx/VKey.cxx | 2
cppcanvas/source/wrapper/basegfxfactory.cxx | 15 ++----
cppcanvas/source/wrapper/implbitmap.cxx | 4 -
cppcanvas/source/wrapper/implbitmapcanvas.cxx | 2
cppcanvas/source/wrapper/implcanvas.cxx | 2
cppcanvas/source/wrapper/implcustomsprite.cxx | 2
cppcanvas/source/wrapper/implspritecanvas.cxx | 11 ++---
cppcanvas/source/wrapper/vclfactory.cxx | 22 ++++------
cppuhelper/source/servicemanager.cxx | 6 +-
28 files changed, 60 insertions(+), 68 deletions(-)
New commits:
commit e5cfe9c050fbd601b64dc13fe6760e762a35a4d4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jan 23 16:36:33 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 24 07:18:44 2020 +0100
loplugin:makeshared in connectivity..cppuhelper
Change-Id: Id8064e961a64bb03bc0fb61e375cdcf769b340cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87276
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/connectivity/source/commontools/RowFunctionParser.cxx b/connectivity/source/commontools/RowFunctionParser.cxx
index e63e0e4a63b7..2246b7636797 100644
--- a/connectivity/source/commontools/RowFunctionParser.cxx
+++ b/connectivity/source/commontools/RowFunctionParser.cxx
@@ -386,7 +386,7 @@ private:
const ParserContextSharedPtr& getParserContext()
{
- static ParserContextSharedPtr lcl_parserContext( new ParserContext );
+ static ParserContextSharedPtr lcl_parserContext = std::make_shared<ParserContext>();
// clear node stack (since we reuse the static object, that's
// the whole point here)
diff --git a/connectivity/source/commontools/TTableHelper.cxx b/connectivity/source/commontools/TTableHelper.cxx
index 95ec25398600..d677887db1d4 100644
--- a/connectivity/source/commontools/TTableHelper.cxx
+++ b/connectivity/source/commontools/TTableHelper.cxx
@@ -374,7 +374,7 @@ void OTableHelper::refreshForeignKeys(::std::vector< OUString>& _rNames)
m_pImpl->m_aKeys.emplace(sOldFKName,pKeyProps);
const OUString sReferencedName = ::dbtools::composeTableName(getMetaData(),sCatalog,aSchema,aName,false,::dbtools::EComposeRule::InDataManipulation);
- pKeyProps.reset(new sdbcx::KeyProperties(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule));
+ pKeyProps = std::make_shared<sdbcx::KeyProperties>(sReferencedName,KeyType::FOREIGN,nUpdateRule,nDeleteRule);
pKeyProps->m_aKeyColumnNames.push_back(sForeignKeyColumn);
_rNames.push_back(sFkName);
if ( m_pTables->hasByName(sReferencedName) )
@@ -555,7 +555,7 @@ std::shared_ptr<sdbcx::KeyProperties> OTableHelper::getKeyProperties(const OUStr
else // only a fall back
{
OSL_FAIL("No key with the given name found");
- pKeyProps.reset(new sdbcx::KeyProperties());
+ pKeyProps = std::make_shared<sdbcx::KeyProperties>();
}
return pKeyProps;
diff --git a/connectivity/source/commontools/sqlerror.cxx b/connectivity/source/commontools/sqlerror.cxx
index f5dd3def56cd..db4c59f2f480 100644
--- a/connectivity/source/commontools/sqlerror.cxx
+++ b/connectivity/source/commontools/sqlerror.cxx
@@ -240,7 +240,7 @@ namespace connectivity
}
SQLError::SQLError()
- :m_pImpl( new SQLError_Impl )
+ :m_pImpl( std::make_shared<SQLError_Impl>() )
{
}
diff --git a/connectivity/source/drivers/hsqldb/HStorageMap.cxx b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
index 4d79ba80f21a..0d49ce333575 100644
--- a/connectivity/source/drivers/hsqldb/HStorageMap.cxx
+++ b/connectivity/source/drivers/hsqldb/HStorageMap.cxx
@@ -282,7 +282,7 @@ namespace connectivity::hsqldb
{
try
{
- pHelper.reset(new StreamHelper(storage->openStreamElement(sName,_nMode)));
+ pHelper = std::make_shared<StreamHelper>(storage->openStreamElement(sName,_nMode));
}
catch(const Exception&)
{
@@ -302,7 +302,7 @@ namespace connectivity::hsqldb
if ( !bIsStream )
return pHelper; // readonly file without data stream
}
- pHelper.reset( new StreamHelper(storage->openStreamElement( sStrippedName, _nMode ) ) );
+ pHelper = std::make_shared<StreamHelper>(storage->openStreamElement( sStrippedName, _nMode ) );
}
aFind->second.streams.emplace(sName,pHelper);
}
diff --git a/connectivity/source/drivers/mork/MStatement.cxx b/connectivity/source/drivers/mork/MStatement.cxx
index 3c5e392d2b7b..408a54dbfc49 100644
--- a/connectivity/source/drivers/mork/MStatement.cxx
+++ b/connectivity/source/drivers/mork/MStatement.cxx
@@ -60,7 +60,7 @@ OCommonStatement::OCommonStatement(OConnection* _pConnection )
,m_pTable(nullptr)
,m_pConnection(_pConnection)
,m_aParser( comphelper::getComponentContext(_pConnection->getDriver()->getFactory()) )
- ,m_pSQLIterator( new OSQLParseTreeIterator( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser ) )
+ ,m_pSQLIterator( std::make_shared<OSQLParseTreeIterator>( _pConnection, _pConnection->createCatalog()->getTables(), m_aParser ) )
{
}
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 0f59720e1868..686a2d46b522 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -82,8 +82,8 @@ namespace connectivity
m_xDatabaseMetaData = m_xConnection->getMetaData();
m_bIsCaseSensitive = m_xDatabaseMetaData.is() && m_xDatabaseMetaData->supportsMixedCaseQuotedIdentifiers();
- m_pTables.reset( new OSQLTables( m_bIsCaseSensitive ) );
- m_pSubTables.reset( new OSQLTables( m_bIsCaseSensitive ) );
+ m_pTables = std::make_shared<OSQLTables>( m_bIsCaseSensitive );
+ m_pSubTables = std::make_shared<OSQLTables>( m_bIsCaseSensitive );
m_xTableContainer = _rxTables;
@@ -124,7 +124,7 @@ namespace connectivity
,m_sForbiddenQueryName( _rForbiddenQueryName )
{
if ( !m_rpAllForbiddenNames.get() )
- m_rpAllForbiddenNames.reset( new QueryNameSet );
+ m_rpAllForbiddenNames = std::make_shared<QueryNameSet>();
m_rpAllForbiddenNames->insert( m_sForbiddenQueryName );
}
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index a7985de03008..0ea8acdafef8 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -195,7 +195,7 @@ SQLParseNodeParameter::SQLParseNodeParameter( const Reference< XConnection >& _r
:rLocale(_rLocale)
,aMetaData( _rxConnection )
,pParser( nullptr )
- ,pSubQueryHistory( new QueryNameSet )
+ ,pSubQueryHistory( std::make_shared<QueryNameSet>() )
,xFormatter(_xFormatter)
,xField(_xField)
,sPredicateTableAlias(_sPredicateTableAlias)
diff --git a/connectivity/source/sdbcx/VKey.cxx b/connectivity/source/sdbcx/VKey.cxx
index d6ad5ebf1ac2..a310f984a7c3 100644
--- a/connectivity/source/sdbcx/VKey.cxx
+++ b/connectivity/source/sdbcx/VKey.cxx
@@ -54,7 +54,7 @@ sal_Bool SAL_CALL OKey::supportsService( const OUString& _rServiceName )
OKey::OKey(bool _bCase) : ODescriptor_BASE(m_aMutex)
, ODescriptor(ODescriptor_BASE::rBHelper, _bCase, true)
- , m_aProps(new KeyProperties())
+ , m_aProps(std::make_shared<KeyProperties>())
{
}
diff --git a/cppcanvas/source/wrapper/basegfxfactory.cxx b/cppcanvas/source/wrapper/basegfxfactory.cxx
index 30410e75c66f..0549c4e12175 100644
--- a/cppcanvas/source/wrapper/basegfxfactory.cxx
+++ b/cppcanvas/source/wrapper/basegfxfactory.cxx
@@ -48,11 +48,10 @@ namespace cppcanvas
if( !xCanvas.is() )
return PolyPolygonSharedPtr();
- return PolyPolygonSharedPtr(
- new internal::ImplPolyPolygon( rCanvas,
+ return std::make_shared<internal::ImplPolyPolygon>( rCanvas,
::basegfx::unotools::xPolyPolygonFromB2DPolygon(
xCanvas->getDevice(),
- rPoly) ) );
+ rPoly) );
}
BitmapSharedPtr BaseGfxFactory::createBitmap( const CanvasSharedPtr& rCanvas,
@@ -69,10 +68,9 @@ namespace cppcanvas
if( !xCanvas.is() )
return BitmapSharedPtr();
- return BitmapSharedPtr(
- new internal::ImplBitmap( rCanvas,
+ return std::make_shared<internal::ImplBitmap>( rCanvas,
xCanvas->getDevice()->createCompatibleBitmap(
- ::basegfx::unotools::integerSize2DFromB2ISize(rSize) ) ) );
+ ::basegfx::unotools::integerSize2DFromB2ISize(rSize) ) );
}
BitmapSharedPtr BaseGfxFactory::createAlphaBitmap( const CanvasSharedPtr& rCanvas,
@@ -89,10 +87,9 @@ namespace cppcanvas
if( !xCanvas.is() )
return BitmapSharedPtr();
- return BitmapSharedPtr(
- new internal::ImplBitmap( rCanvas,
+ return std::make_shared<internal::ImplBitmap>( rCanvas,
xCanvas->getDevice()->createCompatibleAlphaBitmap(
- ::basegfx::unotools::integerSize2DFromB2ISize(rSize) ) ) );
+ ::basegfx::unotools::integerSize2DFromB2ISize(rSize) ) );
}
}
diff --git a/cppcanvas/source/wrapper/implbitmap.cxx b/cppcanvas/source/wrapper/implbitmap.cxx
index e5e8b8734c85..f7465e5d7188 100644
--- a/cppcanvas/source/wrapper/implbitmap.cxx
+++ b/cppcanvas/source/wrapper/implbitmap.cxx
@@ -40,9 +40,9 @@ namespace cppcanvas::internal
uno::Reference< rendering::XBitmapCanvas > xBitmapCanvas( rBitmap,
uno::UNO_QUERY );
if( xBitmapCanvas.is() )
- mpBitmapCanvas.reset( new ImplBitmapCanvas(
+ mpBitmapCanvas = std::make_shared<ImplBitmapCanvas>(
uno::Reference< rendering::XBitmapCanvas >(rBitmap,
- uno::UNO_QUERY) ) );
+ uno::UNO_QUERY) );
}
ImplBitmap::~ImplBitmap()
diff --git a/cppcanvas/source/wrapper/implbitmapcanvas.cxx b/cppcanvas/source/wrapper/implbitmapcanvas.cxx
index 3cd4085ad526..c4751d2923eb 100644
--- a/cppcanvas/source/wrapper/implbitmapcanvas.cxx
+++ b/cppcanvas/source/wrapper/implbitmapcanvas.cxx
@@ -52,7 +52,7 @@ namespace cppcanvas::internal
CanvasSharedPtr ImplBitmapCanvas::clone() const
{
- return BitmapCanvasSharedPtr( new ImplBitmapCanvas( *this ) );
+ return std::make_shared<ImplBitmapCanvas>( *this );
}
}
diff --git a/cppcanvas/source/wrapper/implcanvas.cxx b/cppcanvas/source/wrapper/implcanvas.cxx
index e5c936dab908..da7eda676347 100644
--- a/cppcanvas/source/wrapper/implcanvas.cxx
+++ b/cppcanvas/source/wrapper/implcanvas.cxx
@@ -80,7 +80,7 @@ namespace cppcanvas::internal
CanvasSharedPtr ImplCanvas::clone() const
{
- return CanvasSharedPtr( new ImplCanvas( *this ) );
+ return std::make_shared<ImplCanvas>( *this );
}
void ImplCanvas::clear() const
diff --git a/cppcanvas/source/wrapper/implcustomsprite.cxx b/cppcanvas/source/wrapper/implcustomsprite.cxx
index 999f312c3c2f..624c15dee7e1 100644
--- a/cppcanvas/source/wrapper/implcustomsprite.cxx
+++ b/cppcanvas/source/wrapper/implcustomsprite.cxx
@@ -60,7 +60,7 @@ namespace cppcanvas::internal
if( mpLastCanvas.get() == nullptr ||
mpLastCanvas->getUNOCanvas() != xCanvas )
{
- mpLastCanvas = CanvasSharedPtr( new ImplCanvas( xCanvas ) );
+ mpLastCanvas = std::make_shared<ImplCanvas>( xCanvas );
}
return mpLastCanvas;
diff --git a/cppcanvas/source/wrapper/implspritecanvas.cxx b/cppcanvas/source/wrapper/implspritecanvas.cxx
index 0166ccd82d0a..a33615eb9ef3 100644
--- a/cppcanvas/source/wrapper/implspritecanvas.cxx
+++ b/cppcanvas/source/wrapper/implspritecanvas.cxx
@@ -43,7 +43,7 @@ namespace cppcanvas::internal
ImplSpriteCanvas::ImplSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& rCanvas ) :
ImplCanvas( rCanvas ),
mxSpriteCanvas( rCanvas ),
- mpTransformArbiter( new TransformationArbiter() )
+ mpTransformArbiter( std::make_shared<TransformationArbiter>() )
{
OSL_ENSURE( mxSpriteCanvas.is(), "ImplSpriteCanvas::ImplSpriteCanvas(): Invalid canvas" );
}
@@ -53,7 +53,7 @@ namespace cppcanvas::internal
SpriteCanvas(),
ImplCanvas( rOrig ),
mxSpriteCanvas( rOrig.getUNOSpriteCanvas() ),
- mpTransformArbiter( new TransformationArbiter() )
+ mpTransformArbiter( std::make_shared<TransformationArbiter>() )
{
OSL_ENSURE( mxSpriteCanvas.is(), "ImplSpriteCanvas::ImplSpriteCanvas( const ImplSpriteCanvas& ): Invalid canvas" );
@@ -88,15 +88,14 @@ namespace cppcanvas::internal
if( !mxSpriteCanvas.is() )
return CustomSpriteSharedPtr();
- return CustomSpriteSharedPtr(
- new ImplCustomSprite( mxSpriteCanvas,
+ return std::make_shared<ImplCustomSprite>( mxSpriteCanvas,
mxSpriteCanvas->createCustomSprite( ::basegfx::unotools::size2DFromB2DSize(rSize) ),
- mpTransformArbiter ) );
+ mpTransformArbiter );
}
CanvasSharedPtr ImplSpriteCanvas::clone() const
{
- return SpriteCanvasSharedPtr( new ImplSpriteCanvas( *this ) );
+ return std::make_shared<ImplSpriteCanvas>( *this );
}
uno::Reference< rendering::XSpriteCanvas > ImplSpriteCanvas::getUNOSpriteCanvas() const
diff --git a/cppcanvas/source/wrapper/vclfactory.cxx b/cppcanvas/source/wrapper/vclfactory.cxx
index 4fe30f4324b2..c90d91b23de8 100644
--- a/cppcanvas/source/wrapper/vclfactory.cxx
+++ b/cppcanvas/source/wrapper/vclfactory.cxx
@@ -34,27 +34,23 @@ namespace cppcanvas
{
CanvasSharedPtr VCLFactory::createCanvas( const uno::Reference< rendering::XCanvas >& xCanvas )
{
- return CanvasSharedPtr(
- new internal::ImplCanvas( xCanvas ) );
+ return std::make_shared<internal::ImplCanvas>( xCanvas );
}
BitmapCanvasSharedPtr VCLFactory::createBitmapCanvas( const uno::Reference< rendering::XBitmapCanvas >& xCanvas )
{
- return BitmapCanvasSharedPtr(
- new internal::ImplBitmapCanvas( xCanvas ) );
+ return std::make_shared<internal::ImplBitmapCanvas>( xCanvas );
}
SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const vcl::Window& rVCLWindow )
{
- return SpriteCanvasSharedPtr(
- new internal::ImplSpriteCanvas(
- rVCLWindow.GetSpriteCanvas() ) );
+ return std::make_shared<internal::ImplSpriteCanvas>(
+ rVCLWindow.GetSpriteCanvas() );
}
SpriteCanvasSharedPtr VCLFactory::createSpriteCanvas( const uno::Reference< rendering::XSpriteCanvas >& xCanvas )
{
- return SpriteCanvasSharedPtr(
- new internal::ImplSpriteCanvas( xCanvas ) );
+ return std::make_shared<internal::ImplSpriteCanvas>( xCanvas );
}
BitmapSharedPtr VCLFactory::createBitmap( const CanvasSharedPtr& rCanvas,
@@ -71,17 +67,17 @@ namespace cppcanvas
if( !xCanvas.is() )
return BitmapSharedPtr();
- return BitmapSharedPtr( new internal::ImplBitmap( rCanvas,
- vcl::unotools::xBitmapFromBitmapEx(rBmpEx) ) );
+ return std::make_shared<internal::ImplBitmap>( rCanvas,
+ vcl::unotools::xBitmapFromBitmapEx(rBmpEx) );
}
RendererSharedPtr VCLFactory::createRenderer( const CanvasSharedPtr& rCanvas,
const ::GDIMetaFile& rMtf,
const Renderer::Parameters& rParms )
{
- return RendererSharedPtr( new internal::ImplRenderer( rCanvas,
+ return std::make_shared<internal::ImplRenderer>( rCanvas,
rMtf,
- rParms ) );
+ rParms );
}
}
diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index e9c0ce9907f2..77e4d2d49e04 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -376,10 +376,10 @@ void Parser::handleImplementation() {
reader_.getUrl()
+ ": <implementation> is missing \"name\" attribute");
}
- implementation_.reset(
- new cppuhelper::ServiceManager::Data::Implementation(
+ implementation_ =
+ std::make_shared<cppuhelper::ServiceManager::Data::Implementation>(
attrName, attrLoader_, attrUri_, attrEnvironment_, attrConstructor,
- attrPrefix_, alienContext_, reader_.getUrl()));
+ attrPrefix_, alienContext_, reader_.getUrl());
if (!data_->namedImplementations.emplace(attrName, implementation_).
second)
{
commit b1d48a0e22bb8d2eabead41a6a6b53ffaec932e4
Author: Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Jan 23 16:36:03 2020 +0200
Commit: Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Fri Jan 24 07:18:35 2020 +0100
loplugin:makeshared in chart2..comphelper
Change-Id: Ia25f5de3167fd554d463ce6111e8c5b0e7842907
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87275
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/chart2/source/controller/accessibility/AccessibleChartView.cxx b/chart2/source/controller/accessibility/AccessibleChartView.cxx
index 4d5e1d89ae7f..9ce465b70613 100644
--- a/chart2/source/controller/accessibility/AccessibleChartView.cxx
+++ b/chart2/source/controller/accessibility/AccessibleChartView.cxx
@@ -297,8 +297,8 @@ void SAL_CALL AccessibleChartView::initialize( const Sequence< Any >& rArguments
MutexGuard aGuard( m_aMutex);
Reference< chart2::XChartDocument > xChartDoc( xChartModel, uno::UNO_QUERY );
if( xChartDoc.is())
- m_spObjectHierarchy.reset(
- new ObjectHierarchy( xChartDoc, comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(m_xChartView) ));
+ m_spObjectHierarchy =
+ std::make_shared<ObjectHierarchy>( xChartDoc, comphelper::getUnoTunnelImplementation<ExplicitValueProvider>(m_xChartView) );
else
m_spObjectHierarchy.reset();
}
diff --git a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
index 74b0bf7bb65c..593ac535338d 100644
--- a/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
+++ b/chart2/source/controller/chartapiwrapper/ChartDocumentWrapper.cxx
@@ -639,7 +639,7 @@ Any WrappedHasSubTitleProperty::getPropertyDefault( const Reference< beans::XPro
ChartDocumentWrapper::ChartDocumentWrapper(
const Reference< uno::XComponentContext > & xContext ) :
- m_spChart2ModelContact( new Chart2ModelContact( xContext ) ),
+ m_spChart2ModelContact( std::make_shared<Chart2ModelContact>( xContext ) ),
m_bUpdateAddIn( true ),
m_bIsDisposed( false )
{
diff --git a/chart2/source/controller/dialogs/DataBrowser.cxx b/chart2/source/controller/dialogs/DataBrowser.cxx
index 7d293852857f..cbfb03b50031 100644
--- a/chart2/source/controller/dialogs/DataBrowser.cxx
+++ b/chart2/source/controller/dialogs/DataBrowser.cxx
@@ -851,9 +851,9 @@ void DataBrowser::SetDataFromModel(
m_xChartDoc.set( xChartDoc );
m_apDataBrowserModel.reset( new DataBrowserModel( m_xChartDoc, xContext ));
- m_spNumberFormatterWrapper.reset(
- new NumberFormatterWrapper(
- Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY )));
+ m_spNumberFormatterWrapper =
+ std::make_shared<NumberFormatterWrapper>(
+ Reference< util::XNumberFormatsSupplier >( m_xChartDoc, uno::UNO_QUERY ));
m_aNumberEditField->SetFormatter( m_spNumberFormatterWrapper->getSvNumberFormatter() );
diff --git a/chart2/source/controller/dialogs/DialogModel.cxx b/chart2/source/controller/dialogs/DialogModel.cxx
index cdd1a187d766..6dc9201bc61f 100644
--- a/chart2/source/controller/dialogs/DialogModel.cxx
+++ b/chart2/source/controller/dialogs/DialogModel.cxx
@@ -395,8 +395,8 @@ std::shared_ptr< RangeSelectionHelper > const &
DialogModel::getRangeSelectionHelper() const
{
if( ! m_spRangeSelectionHelper.get())
- m_spRangeSelectionHelper.reset(
- new RangeSelectionHelper( m_xChartDocument ));
+ m_spRangeSelectionHelper =
+ std::make_shared<RangeSelectionHelper>( m_xChartDocument );
return m_spRangeSelectionHelper;
}
diff --git a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
index 580b81e11190..ec37591200c0 100644
--- a/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/ErrorBarItemConverter.cxx
@@ -84,7 +84,7 @@ ErrorBarItemConverter::ErrorBarItemConverter(
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory ) :
ItemConverter( rPropertySet, rItemPool ),
- m_spGraphicConverter( new GraphicPropertyItemConverter(
+ m_spGraphicConverter( std::make_shared<GraphicPropertyItemConverter>(
rPropertySet, rItemPool, rDrawModel,
xNamedPropertyContainerFactory,
GraphicObjectType::LineProperties )),
diff --git a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
index f2ee1d4cbfce..482c48e8efbe 100644
--- a/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
+++ b/chart2/source/controller/itemsetwrapper/RegressionCurveItemConverter.cxx
@@ -90,7 +90,7 @@ RegressionCurveItemConverter::RegressionCurveItemConverter(
SdrModel& rDrawModel,
const uno::Reference< lang::XMultiServiceFactory > & xNamedPropertyContainerFactory ) :
ItemConverter( rPropertySet, rItemPool ),
- m_spGraphicConverter( new GraphicPropertyItemConverter(
+ m_spGraphicConverter( std::make_shared<GraphicPropertyItemConverter>(
rPropertySet, rItemPool, rDrawModel,
xNamedPropertyContainerFactory,
GraphicObjectType::LineProperties )),
diff --git a/chart2/source/controller/main/UndoGuard.cxx b/chart2/source/controller/main/UndoGuard.cxx
index b173332c9ed4..91687aebd28f 100644
--- a/chart2/source/controller/main/UndoGuard.cxx
+++ b/chart2/source/controller/main/UndoGuard.cxx
@@ -41,7 +41,7 @@ UndoGuard::UndoGuard( const OUString& i_undoString, const uno::Reference< docume
,m_aUndoString( i_undoString )
,m_bActionPosted( false )
{
- m_pDocumentSnapshot.reset( new ChartModelClone( m_xChartModel, i_facet ) );
+ m_pDocumentSnapshot = std::make_shared<ChartModelClone>( m_xChartModel, i_facet );
}
UndoGuard::~UndoGuard()
diff --git a/chart2/source/view/main/ChartView.cxx b/chart2/source/view/main/ChartView.cxx
index 530ea060f390..c25492e91ef1 100644
--- a/chart2/source/view/main/ChartView.cxx
+++ b/chart2/source/view/main/ChartView.cxx
@@ -2167,7 +2167,7 @@ std::shared_ptr<VTitle> lcl_createTitle( TitleHelper::eTitleType eType
return apVTitle;
//create title
- apVTitle.reset(new VTitle(xTitle));
+ apVTitle = std::make_shared<VTitle>(xTitle);
OUString aCID = ObjectIdentifier::createClassifiedIdentifierForObject(xTitle, rModel);
apVTitle->init(xPageShapes, xShapeFactory, aCID);
apVTitle->createShapes(awt::Point(0,0), rPageSize);
@@ -2969,7 +2969,7 @@ void ChartView::createShapes2D( const awt::Size& rPageSize )
if (aParam.maRemainingSpace.Width <= 0|| aParam.maRemainingSpace.Height <= 0)
return;
- aParam.mpSeriesPlotterContainer.reset(new SeriesPlotterContainer(m_aVCooSysList));
+ aParam.mpSeriesPlotterContainer = std::make_shared<SeriesPlotterContainer>(m_aVCooSysList);
aParam.mpSeriesPlotterContainer->initializeCooSysAndSeriesPlotter( mrChartModel );
if(maTimeBased.bTimeBased && maTimeBased.nFrame != 0)
{
diff --git a/comphelper/source/misc/DirectoryHelper.cxx b/comphelper/source/misc/DirectoryHelper.cxx
index a659421654b3..fa5380d425dd 100644
--- a/comphelper/source/misc/DirectoryHelper.cxx
+++ b/comphelper/source/misc/DirectoryHelper.cxx
@@ -46,7 +46,7 @@ bool DirectoryHelper::fileExists(const OUString& rBaseURL)
{
if (!rBaseURL.isEmpty())
{
- FileSharedPtr aBaseFile(new osl::File(rBaseURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(rBaseURL);
return (osl::File::E_None == aBaseFile->open(osl_File_OpenFlag_Read));
}
diff --git a/comphelper/source/misc/backupfilehelper.cxx b/comphelper/source/misc/backupfilehelper.cxx
index ffbcb1386222..e58fe768f15b 100644
--- a/comphelper/source/misc/backupfilehelper.cxx
+++ b/comphelper/source/misc/backupfilehelper.cxx
@@ -1166,7 +1166,7 @@ namespace
maPackedFileEntryVector(),
mbChanged(false)
{
- FileSharedPtr aSourceFile(new osl::File(rURL));
+ FileSharedPtr aSourceFile = std::make_shared<osl::File>(rURL);
if (osl::File::E_None == aSourceFile->open(osl_File_OpenFlag_Read))
{
@@ -2083,7 +2083,7 @@ namespace comphelper
{
const OUString aPackURL(createPackURL(rTargetURL, rName));
PackedFile aPackedFile(aPackURL);
- FileSharedPtr aBaseFile(new osl::File(aFileURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(aFileURL);
if (aPackedFile.tryPush(aBaseFile, mbCompress))
{
@@ -2284,7 +2284,7 @@ namespace comphelper
{
const OUString aPackURL(createPackURL(rTargetURL, "ExtensionInfo"));
PackedFile aPackedFile(aPackURL);
- FileSharedPtr aBaseFile(new osl::File(aTempURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(aTempURL);
if (aPackedFile.tryPush(aBaseFile, mbCompress))
{
@@ -2336,7 +2336,7 @@ namespace comphelper
{
// last config is in temp file, load it to ExtensionInfo
ExtensionInfo aLoadedExtensionInfo;
- FileSharedPtr aBaseFile(new osl::File(aTempURL));
+ FileSharedPtr aBaseFile = std::make_shared<osl::File>(aTempURL);
if (osl::File::E_None == aBaseFile->open(osl_File_OpenFlag_Read))
{
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index 4054222c855d..405a4acaeb68 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -65,7 +65,7 @@ namespace comphelper
}
EventLogger::EventLogger( const Reference< XComponentContext >& _rxContext, const char* _pAsciiLoggerName )
- :m_pImpl( new EventLogger_Impl( _rxContext, OUString::createFromAscii( _pAsciiLoggerName ) ) )
+ :m_pImpl( std::make_shared<EventLogger_Impl>( _rxContext, OUString::createFromAscii( _pAsciiLoggerName ) ) )
{
}
diff --git a/comphelper/source/misc/sharedmutex.cxx b/comphelper/source/misc/sharedmutex.cxx
index 176c8acaa7f2..58ae35df5924 100644
--- a/comphelper/source/misc/sharedmutex.cxx
+++ b/comphelper/source/misc/sharedmutex.cxx
@@ -26,7 +26,7 @@ namespace comphelper
{
SharedMutex::SharedMutex()
- :m_pMutexImpl( new ::osl::Mutex )
+ :m_pMutexImpl( std::make_shared<::osl::Mutex >())
{
}
More information about the Libreoffice-commits
mailing list