diff options
-rw-r--r-- | connectivity/source/commontools/RowFunctionParser.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/commontools/TTableHelper.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/commontools/sqlerror.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/drivers/hsqldb/HStorageMap.cxx | 4 | ||||
-rw-r--r-- | connectivity/source/drivers/mork/MStatement.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 6 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 2 | ||||
-rw-r--r-- | connectivity/source/sdbcx/VKey.cxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/basegfxfactory.cxx | 15 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implbitmap.cxx | 4 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implbitmapcanvas.cxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implcanvas.cxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implcustomsprite.cxx | 2 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/implspritecanvas.cxx | 11 | ||||
-rw-r--r-- | cppcanvas/source/wrapper/vclfactory.cxx | 22 | ||||
-rw-r--r-- | cppuhelper/source/servicemanager.cxx | 6 |
16 files changed, 40 insertions, 48 deletions
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) { |