diff options
24 files changed, 69 insertions, 67 deletions
diff --git a/svl/source/items/slstitm.cxx b/svl/source/items/slstitm.cxx index 95de93e7b635..05e5401db18e 100644 --- a/svl/source/items/slstitm.cxx +++ b/svl/source/items/slstitm.cxx @@ -41,7 +41,7 @@ SfxStringListItem::SfxStringListItem( sal_uInt16 which, const std::vector<OUStri // Therefore the query after the count is commented out if( pList /*!!! && pList->Count() */ ) { - mpList.reset(new std::vector<OUString>); + mpList = std::make_shared<std::vector<OUString>>(); *mpList = *pList; } } @@ -55,7 +55,7 @@ SfxStringListItem::~SfxStringListItem() std::vector<OUString>& SfxStringListItem::GetList() { if( !mpList ) - mpList.reset( new std::vector<OUString> ); + mpList = std::make_shared<std::vector<OUString>>(); return *mpList; } @@ -95,7 +95,7 @@ SfxStringListItem* SfxStringListItem::Clone( SfxItemPool *) const void SfxStringListItem::SetString( const OUString& rStr ) { - mpList.reset( new std::vector<OUString> ); + mpList = std::make_shared<std::vector<OUString>>(); sal_Int32 nStart = 0; OUString aStr(convertLineEnd(rStr, LINEEND_CR)); @@ -143,7 +143,7 @@ OUString SfxStringListItem::GetString() void SfxStringListItem::SetStringList( const css::uno::Sequence< OUString >& rList ) { - mpList.reset(new std::vector<OUString>); + mpList = std::make_shared<std::vector<OUString>>(); // String belongs to the list comphelper::sequenceToContainer(*mpList, rList); diff --git a/svl/source/items/style.cxx b/svl/source/items/style.cxx index f1463d501c3e..6d2095ad93b3 100644 --- a/svl/source/items/style.cxx +++ b/svl/source/items/style.cxx @@ -98,7 +98,7 @@ public: std::shared_ptr<svl::IndexedStyleSheets> mxIndexedStyleSheets; SfxStyleSheetBasePool_Impl() : - mxIndexedStyleSheets(new svl::IndexedStyleSheets) {} + mxIndexedStyleSheets(std::make_shared<svl::IndexedStyleSheets>()) {} }; diff --git a/svtools/source/table/cellvalueconversion.cxx b/svtools/source/table/cellvalueconversion.cxx index 6219eee3efc5..2ca15c7ca514 100644 --- a/svtools/source/table/cellvalueconversion.cxx +++ b/svtools/source/table/cellvalueconversion.cxx @@ -340,25 +340,25 @@ namespace svt if ( sTypeName == ::cppu::UnoType< DateTime >::get().getTypeName() ) { - o_formatter.reset( new DateTimeNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<DateTimeNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< css::util::Date >::get().getTypeName() ) { - o_formatter.reset( new DateNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<DateNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< css::util::Time >::get().getTypeName() ) { - o_formatter.reset( new TimeNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<TimeNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< sal_Bool >::get().getTypeName() ) { - o_formatter.reset( new BooleanNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<BooleanNormalization>( io_data.xNumberFormatter ); } else if ( sTypeName == ::cppu::UnoType< double >::get().getTypeName() || sTypeName == ::cppu::UnoType< float >::get().getTypeName() ) { - o_formatter.reset( new DoubleNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<DoubleNormalization>( io_data.xNumberFormatter ); } else if ( ( eTypeClass == TypeClass_BYTE ) || ( eTypeClass == TypeClass_SHORT ) @@ -368,7 +368,7 @@ namespace svt || ( eTypeClass == TypeClass_HYPER ) ) { - o_formatter.reset( new IntegerNormalization( io_data.xNumberFormatter ) ); + o_formatter = std::make_shared<IntegerNormalization>( io_data.xNumberFormatter ); } else { diff --git a/svtools/source/table/tablecontrol.cxx b/svtools/source/table/tablecontrol.cxx index 175d711d4704..dda4d974dabe 100644 --- a/svtools/source/table/tablecontrol.cxx +++ b/svtools/source/table/tablecontrol.cxx @@ -49,7 +49,7 @@ namespace svt { namespace table TableControl::TableControl( vcl::Window* _pParent, WinBits _nStyle ) :Control( _pParent, _nStyle ) - ,m_pImpl( new TableControl_Impl( *this ) ) + ,m_pImpl( std::make_shared<TableControl_Impl>( *this ) ) { TableDataWindow& rDataWindow = m_pImpl->getDataWindow(); rDataWindow.SetSelectHdl( LINK( this, TableControl, ImplSelectHdl ) ); diff --git a/svtools/source/table/tablecontrol_impl.cxx b/svtools/source/table/tablecontrol_impl.cxx index 42e65a02b7a4..d413f9e28b69 100644 --- a/svtools/source/table/tablecontrol_impl.cxx +++ b/svtools/source/table/tablecontrol_impl.cxx @@ -218,7 +218,7 @@ namespace svt { namespace table TableControl_Impl::TableControl_Impl( TableControl& _rAntiImpl ) :m_rAntiImpl ( _rAntiImpl ) - ,m_pModel ( new EmptyTableModel ) + ,m_pModel ( std::make_shared<EmptyTableModel>() ) ,m_pInputHandler ( ) ,m_nRowHeightPixel ( 15 ) ,m_nColHeaderHeightPixel( 0 ) @@ -265,7 +265,7 @@ namespace svt { namespace table m_pModel = _pModel; if ( !m_pModel) - m_pModel.reset( new EmptyTableModel ); + m_pModel = std::make_shared<EmptyTableModel>(); m_pModel->addTableModelListener( shared_from_this() ); @@ -563,7 +563,7 @@ namespace svt { namespace table { m_pInputHandler = m_pModel->getInputHandler(); if ( !m_pInputHandler ) - m_pInputHandler.reset( new DefaultInputHandler ); + m_pInputHandler = std::make_shared<DefaultInputHandler>(); m_nColumnCount = m_pModel->getColumnCount(); if ( m_nLeftColumn >= m_nColumnCount ) diff --git a/svtools/source/uno/svtxgridcontrol.cxx b/svtools/source/uno/svtxgridcontrol.cxx index 31f46d0d9d7a..0526b2e4f680 100644 --- a/svtools/source/uno/svtxgridcontrol.cxx +++ b/svtools/source/uno/svtxgridcontrol.cxx @@ -70,7 +70,7 @@ using namespace ::svt::table; SVTXGridControl::SVTXGridControl() - :m_xTableModel( new UnoControlTableModel() ) + :m_xTableModel( std::make_shared<UnoControlTableModel>() ) ,m_bTableModelInitCompleted( false ) ,m_aSelectionListeners( *this ) { diff --git a/svtools/source/uno/unocontroltablemodel.cxx b/svtools/source/uno/unocontroltablemodel.cxx index dce3b908d320..12b48d129e33 100644 --- a/svtools/source/uno/unocontroltablemodel.cxx +++ b/svtools/source/uno/unocontroltablemodel.cxx @@ -123,8 +123,8 @@ namespace svt { namespace table m_pImpl->bHasColumnHeaders = true; m_pImpl->bHasRowHeaders = false; m_pImpl->bEnabled = true; - m_pImpl->pRenderer.reset( new GridTableRenderer( *this ) ); - m_pImpl->pInputHandler.reset( new DefaultInputHandler ); + m_pImpl->pRenderer = std::make_shared<GridTableRenderer>( *this ); + m_pImpl->pInputHandler = std::make_shared<DefaultInputHandler>(); } @@ -217,7 +217,7 @@ namespace svt { namespace table ENSURE_OR_RETURN_VOID( ( i_position >= 0 ) && ( size_t( i_position ) <= m_pImpl->aColumns.size() ), "UnoControlTableModel::insertColumn: illegal position!" ); - const PColumnModel pColumn( new UnoGridColumnFacade( *this, i_column ) ); + const PColumnModel pColumn = std::make_shared<UnoGridColumnFacade>( *this, i_column ); m_pImpl->aColumns.insert( m_pImpl->aColumns.begin() + i_position, pColumn ); // notify listeners diff --git a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx index 4d15cfce2905..2c761e9d7360 100644 --- a/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx +++ b/svx/source/customshapes/EnhancedCustomShapeFunctionParser.cxx @@ -1104,7 +1104,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/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index dd6d410532bf..21eea0663987 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -34,7 +34,7 @@ void Style::implEnsureImplStyle() { if(!maImplStyle) { - maImplStyle.reset(new implStyle()); + maImplStyle = std::make_shared<implStyle>(); } } @@ -44,7 +44,7 @@ Style::Style() : } Style::Style( double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale ) : - maImplStyle(new implStyle()) + maImplStyle(std::make_shared<implStyle>()) { maImplStyle->mnType = nType; maImplStyle->mfPatternScale = fScale; @@ -52,7 +52,7 @@ Style::Style( double nP, double nD, double nS, SvxBorderLineStyle nType, double } Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor, double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale ) : - maImplStyle(new implStyle()) + maImplStyle(std::make_shared<implStyle>()) { maImplStyle->mnType = nType; maImplStyle->mfPatternScale = fScale; @@ -64,7 +64,7 @@ Style::Style( const editeng::SvxBorderLine* pBorder, double fScale ) : { if(nullptr != pBorder) { - maImplStyle.reset(new implStyle()); + maImplStyle = std::make_shared<implStyle>(); maImplStyle->mfPatternScale = fScale; Set( pBorder, fScale ); } diff --git a/svx/source/dialog/hdft.cxx b/svx/source/dialog/hdft.cxx index 2d718523bd26..cf3f9f259b94 100644 --- a/svx/source/dialog/hdft.cxx +++ b/svx/source/dialog/hdft.cxx @@ -636,8 +636,8 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void) if (mbEnableDrawingLayerFillStyles) { // create FillAttributes directly from DrawingLayer FillStyle entries - aFillAttributes.reset( - new drawinglayer::attribute::SdrAllFillAttributesHelper(*pBBSet)); + aFillAttributes = + std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(*pBBSet); } else { @@ -652,8 +652,8 @@ IMPL_LINK_NOARG(SvxHFPage, BackgroundHdl, weld::Button&, void) svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); - aFillAttributes.reset( - new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + aFillAttributes = + std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet); } } @@ -712,7 +712,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) if(mbEnableDrawingLayerFillStyles) { // create FillAttributes directly from DrawingLayer FillStyle entries - aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet)); + aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rTmpSet); } else { @@ -725,7 +725,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); - aHeaderFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + aHeaderFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet); } } @@ -748,7 +748,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) if(mbEnableDrawingLayerFillStyles) { // create FillAttributes directly from DrawingLayer FillStyle entries - aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rTmpSet)); + aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rTmpSet); } else { @@ -761,7 +761,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) SfxItemSet aTempSet(*rTmpSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); - aFooterFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + aFooterFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet); } } @@ -774,7 +774,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) if(mbEnableDrawingLayerFillStyles) { // create FillAttributes directly from DrawingLayer FillStyle entries - aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(rSet)); + aPageFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(rSet); } else { @@ -787,7 +787,7 @@ void SvxHFPage::ResetBackground_Impl( const SfxItemSet& rSet ) SfxItemSet aTempSet(*rSet.GetPool(), svl::Items<XATTR_FILL_FIRST, XATTR_FILL_LAST>{}); setSvxBrushItemAsFillAttributesToTargetSet(rItem, aTempSet); - aPageFillAttributes.reset(new drawinglayer::attribute::SdrAllFillAttributesHelper(aTempSet)); + aPageFillAttributes = std::make_shared<drawinglayer::attribute::SdrAllFillAttributesHelper>(aTempSet); } } diff --git a/svx/source/dialog/imapwnd.cxx b/svx/source/dialog/imapwnd.cxx index 377ea12907dd..2cf21a5652b5 100644 --- a/svx/source/dialog/imapwnd.cxx +++ b/svx/source/dialog/imapwnd.cxx @@ -372,8 +372,8 @@ void IMapWindow::SdrObjChanged( const SdrObject& rObj ) { case OBJ_RECT: { - pUserData->ReplaceObject( IMapObjectPtr(new IMapRectangleObject( static_cast<const SdrRectObj&>(rObj).GetLogicRect(), - aURL, aAltText, aDesc, aTarget, "", bActive, false ) ) ); + pUserData->ReplaceObject( std::make_shared<IMapRectangleObject>( static_cast<const SdrRectObj&>(rObj).GetLogicRect(), + aURL, aAltText, aDesc, aTarget, "", bActive, false ) ); } break; diff --git a/svx/source/dialog/srchdlg.cxx b/svx/source/dialog/srchdlg.cxx index bba78509188c..23d21ede6a8b 100644 --- a/svx/source/dialog/srchdlg.cxx +++ b/svx/source/dialog/srchdlg.cxx @@ -2351,7 +2351,7 @@ SvxSearchDialogWrapper::SvxSearchDialogWrapper( vcl::Window* _pParent, sal_uInt1 SfxBindings* pBindings, SfxChildWinInfo const * pInfo ) : SfxChildWindow( _pParent, nId ) - , dialog(new SvxSearchDialog(_pParent->GetFrameWeld(), this, *pBindings)) + , dialog(std::make_shared<SvxSearchDialog>(_pParent->GetFrameWeld(), this, *pBindings)) { SetController(dialog); dialog->Initialize( pInfo ); diff --git a/svx/source/form/fmscriptingenv.cxx b/svx/source/form/fmscriptingenv.cxx index 4dcae395248b..91760b358ebf 100644 --- a/svx/source/form/fmscriptingenv.cxx +++ b/svx/source/form/fmscriptingenv.cxx @@ -970,7 +970,7 @@ namespace svxform if ( _rEvent.ScriptType != "StarBasic" ) { - pScript.reset( new NewStyleUNOScript( *xObjectShell, _rEvent.ScriptCode ) ); + pScript = std::make_shared<NewStyleUNOScript>( *xObjectShell, _rEvent.ScriptCode ); } else { @@ -1007,7 +1007,7 @@ namespace svxform "?language=Basic&location=" + sMacroLocation; - pScript.reset( new NewStyleUNOScript( *xObjectShell, sScriptURI ) ); + pScript = std::make_shared<NewStyleUNOScript>( *xObjectShell, sScriptURI ); } assert(pScript && "FormScriptingEnvironment::doFireScriptEvent: no script to execute!"); diff --git a/svx/source/form/sqlparserclient.cxx b/svx/source/form/sqlparserclient.cxx index f1cd230a8e0d..e350dc1f1c3a 100644 --- a/svx/source/form/sqlparserclient.cxx +++ b/svx/source/form/sqlparserclient.cxx @@ -32,7 +32,7 @@ namespace svxform using namespace ::com::sun::star::lang; OSQLParserClient::OSQLParserClient(const Reference< XComponentContext >& rxContext) - : m_pParser(new OSQLParser(rxContext, getParseContext())) + : m_pParser(std::make_shared<OSQLParser>(rxContext, getParseContext())) { } diff --git a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx index 7fe63399e16c..36587b8761a8 100644 --- a/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx +++ b/svx/source/sdr/attribute/sdrallfillattributeshelper.cxx @@ -59,23 +59,23 @@ namespace drawinglayer::attribute maFillGradientAttribute(), maPrimitives() { - maFillAttribute.reset( - new drawinglayer::attribute::SdrFillAttribute( + maFillAttribute = + std::make_shared<drawinglayer::attribute::SdrFillAttribute>( 0.0, rColor.GetRGBColor().getBColor(), drawinglayer::attribute::FillGradientAttribute(), drawinglayer::attribute::FillHatchAttribute(), - drawinglayer::attribute::SdrFillGraphicAttribute())); + drawinglayer::attribute::SdrFillGraphicAttribute()); } SdrAllFillAttributesHelper::SdrAllFillAttributesHelper(const SfxItemSet& rSet) : maLastPaintRange(), maLastDefineRange(), maFillAttribute( - new drawinglayer::attribute::SdrFillAttribute( + std::make_shared<drawinglayer::attribute::SdrFillAttribute>( drawinglayer::primitive2d::createNewSdrFillAttribute(rSet))), maFillGradientAttribute( - new drawinglayer::attribute::FillGradientAttribute( + std::make_shared<drawinglayer::attribute::FillGradientAttribute>( drawinglayer::primitive2d::createNewTransparenceGradientAttribute(rSet))), maPrimitives() { @@ -117,7 +117,8 @@ namespace drawinglayer::attribute { if(!maFillAttribute.get()) { - const_cast< SdrAllFillAttributesHelper* >(this)->maFillAttribute.reset(new drawinglayer::attribute::SdrFillAttribute()); + const_cast< SdrAllFillAttributesHelper* >(this)->maFillAttribute = + std::make_shared<drawinglayer::attribute::SdrFillAttribute>(); } return *maFillAttribute; @@ -127,7 +128,8 @@ namespace drawinglayer::attribute { if(!maFillGradientAttribute.get()) { - const_cast< SdrAllFillAttributesHelper* >(this)->maFillGradientAttribute.reset(new drawinglayer::attribute::FillGradientAttribute()); + const_cast< SdrAllFillAttributesHelper* >(this)->maFillGradientAttribute = + std::make_shared<drawinglayer::attribute::FillGradientAttribute>(); } return *maFillGradientAttribute; diff --git a/svx/source/sdr/attribute/sdrtextattribute.cxx b/svx/source/sdr/attribute/sdrtextattribute.cxx index cb0c88d845a4..fb0826b4ebe5 100644 --- a/svx/source/sdr/attribute/sdrtextattribute.cxx +++ b/svx/source/sdr/attribute/sdrtextattribute.cxx @@ -89,7 +89,7 @@ namespace drawinglayer::attribute bool bWrongSpell, bool bChainable) : mpSdrText(pSdrText), - mxOutlinerParaObject(new OutlinerParaObject(rOutlinerParaObject)), + mxOutlinerParaObject(std::make_shared<OutlinerParaObject>(rOutlinerParaObject)), maSdrFormTextAttribute(), maTextLeftDistance(aTextLeftDistance), maTextUpperDistance(aTextUpperDistance), diff --git a/svx/source/sdr/contact/viewobjectcontact.cxx b/svx/source/sdr/contact/viewobjectcontact.cxx index 4a7adf2c61b0..ded29812eae6 100644 --- a/svx/source/sdr/contact/viewobjectcontact.cxx +++ b/svx/source/sdr/contact/viewobjectcontact.cxx @@ -319,10 +319,10 @@ drawinglayer::primitive2d::Primitive2DContainer ViewObjectContact::createPrimiti if(isPrimitiveGhosted(rDisplayInfo)) { const basegfx::BColor aRGBWhite(1.0, 1.0, 1.0); - const basegfx::BColorModifierSharedPtr aBColorModifier( - new basegfx::BColorModifier_interpolate( + const basegfx::BColorModifierSharedPtr aBColorModifier = + std::make_shared<basegfx::BColorModifier_interpolate>( aRGBWhite, - 0.5)); + 0.5); const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::ModifiedColorPrimitive2D( xRetval, diff --git a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx index 64ba2bbd0631..88fe38ca3c01 100644 --- a/svx/source/sdr/contact/viewobjectcontactofe3d.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofe3d.cxx @@ -46,10 +46,10 @@ namespace sdr::contact if(isPrimitiveGhosted(rDisplayInfo)) { const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0); - const ::basegfx::BColorModifierSharedPtr aBColorModifier( - new basegfx::BColorModifier_interpolate( + const ::basegfx::BColorModifierSharedPtr aBColorModifier = + std::make_shared<basegfx::BColorModifier_interpolate>( aRGBWhite, - 0.5)); + 0.5); const drawinglayer::primitive3d::Primitive3DReference xReference( new drawinglayer::primitive3d::ModifiedColorPrimitive3D( xRetval, diff --git a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx index 72a8043e70bc..aa7eb9058c05 100644 --- a/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx +++ b/svx/source/sdr/contact/viewobjectcontactofe3dscene.cxx @@ -103,10 +103,10 @@ namespace sdr::contact if(isPrimitiveGhosted(rDisplayInfo)) { const ::basegfx::BColor aRGBWhite(1.0, 1.0, 1.0); - const ::basegfx::BColorModifierSharedPtr aBColorModifier( - new basegfx::BColorModifier_interpolate( + const ::basegfx::BColorModifierSharedPtr aBColorModifier = + std::make_shared<basegfx::BColorModifier_interpolate>( aRGBWhite, - 0.5)); + 0.5); const drawinglayer::primitive2d::Primitive2DReference xReference( new drawinglayer::primitive2d::ModifiedColorPrimitive2D( xRetval, diff --git a/svx/source/stbctrls/modctrl.cxx b/svx/source/stbctrls/modctrl.cxx index 1faddf461c23..634781f11956 100644 --- a/svx/source/stbctrls/modctrl.cxx +++ b/svx/source/stbctrls/modctrl.cxx @@ -68,7 +68,7 @@ struct SvxModifyControl::ImplData SvxModifyControl::SvxModifyControl( sal_uInt16 _nSlotId, sal_uInt16 _nId, StatusBar& rStb ) : SfxStatusBarControl( _nSlotId, _nId, rStb ), - mxImpl(new ImplData) + mxImpl(std::make_shared<ImplData>()) { mxImpl->maIdle.SetInvokeHandler( LINK(this, SvxModifyControl, OnTimer) ); } diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx index 5e6eb95bad8d..2908d7edcf7b 100644 --- a/svx/source/svdraw/svdedxv.cxx +++ b/svx/source/svdraw/svdedxv.cxx @@ -2644,8 +2644,8 @@ void SdrObjEditView::TakeFormatPaintBrush(std::shared_ptr<SfxItemSet>& rFormatSe { OutlinerView* pOLV = GetTextEditOutlinerView(); - rFormatSet.reset( - new SfxItemSet(GetModel()->GetItemPool(), GetFormatRangeImpl(pOLV != nullptr))); + rFormatSet = std::make_shared<SfxItemSet>(GetModel()->GetItemPool(), + GetFormatRangeImpl(pOLV != nullptr)); if (pOLV) { rFormatSet->Put(pOLV->GetAttribs()); diff --git a/svx/source/svdraw/svdomedia.cxx b/svx/source/svdraw/svdomedia.cxx index abb8a70fa8a9..2389504217f2 100644 --- a/svx/source/svdraw/svdomedia.cxx +++ b/svx/source/svdraw/svdomedia.cxx @@ -275,7 +275,7 @@ void SdrMediaObj::SetInputStream(uno::Reference<io::XInputStream> const& xStream if (bSuccess) { - m_xImpl->m_pTempFile.reset(new ::avmedia::MediaTempFile(tempFileURL)); + m_xImpl->m_pTempFile = std::make_shared<::avmedia::MediaTempFile>(tempFileURL); #if HAVE_FEATURE_AVMEDIA m_xImpl->m_MediaProperties.setURL( m_xImpl->m_LastFailedPkgURL, tempFileURL, ""); @@ -353,8 +353,8 @@ void SdrMediaObj::mediaPropertiesChanged( const ::avmedia::MediaItem& rNewProper if (bSuccess) { - m_xImpl->m_pTempFile.reset( - new ::avmedia::MediaTempFile(tempFileURL)); + m_xImpl->m_pTempFile = + std::make_shared<::avmedia::MediaTempFile>(tempFileURL); m_xImpl->m_MediaProperties.setURL(url, tempFileURL, ""); } else // this case is for Clone via operator= diff --git a/svx/source/table/tablertfimporter.cxx b/svx/source/table/tablertfimporter.cxx index d342856bedee..2bbef503ae94 100644 --- a/svx/source/table/tablertfimporter.cxx +++ b/svx/source/table/tablertfimporter.cxx @@ -216,7 +216,7 @@ void SdrTableRTFParser::NextRow() void SdrTableRTFParser::InsertCell( RtfImportInfo const * pInfo ) { - RTFCellInfoPtr xCellInfo( new RTFCellInfo(mrItemPool) ); + RTFCellInfoPtr xCellInfo = std::make_shared<RTFCellInfo>(mrItemPool); xCellInfo->mnStartPara = mnStartPara; xCellInfo->mnParaCount = pInfo->aSelection.nEndPara - 1 - mnStartPara; diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx index cb718f018be6..7aee71bb5d81 100644 --- a/svx/source/tbxctrls/tbcontrl.cxx +++ b/svx/source/tbxctrls/tbcontrl.cxx @@ -3399,7 +3399,7 @@ void SvxColorToolBoxControl::EnsurePaletteManager() { if (!m_xPaletteManager) { - m_xPaletteManager.reset(new PaletteManager); + m_xPaletteManager = std::make_shared<PaletteManager>(); m_xPaletteManager->SetBtnUpdater(m_xBtnUpdater.get()); } } @@ -4031,7 +4031,7 @@ void SvxColorListBox::EnsurePaletteManager() { if (!m_xPaletteManager) { - m_xPaletteManager.reset(new PaletteManager); + m_xPaletteManager = std::make_shared<PaletteManager>(); m_xPaletteManager->SetColorSelectFunction(std::ref(m_aColorWrapper)); } } @@ -4040,7 +4040,7 @@ void ColorListBox::EnsurePaletteManager() { if (!m_xPaletteManager) { - m_xPaletteManager.reset(new PaletteManager); + m_xPaletteManager = std::make_shared<PaletteManager>(); m_xPaletteManager->SetColorSelectFunction(std::ref(m_aColorWrapper)); } } |