diff options
-rw-r--r-- | drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx | 19 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/shadowprimitive2d.cxx | 6 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/texteffectprimitive2d.cxx | 24 | ||||
-rw-r--r-- | drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx | 4 | ||||
-rw-r--r-- | drawinglayer/source/processor3d/defaultprocessor3d.cxx | 50 | ||||
-rw-r--r-- | drawinglayer/source/tools/converters.cxx | 5 | ||||
-rw-r--r-- | drawinglayer/source/tools/wmfemfhelper.cxx | 5 | ||||
-rw-r--r-- | editeng/source/editeng/eerdll.cxx | 2 | ||||
-rw-r--r-- | extensions/source/propctrlr/browserlistbox.cxx | 4 | ||||
-rw-r--r-- | filter/source/msfilter/mstoolbar.cxx | 22 | ||||
-rw-r--r-- | filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 2 | ||||
-rw-r--r-- | formula/source/core/api/FormulaCompiler.cxx | 12 | ||||
-rw-r--r-- | fpicker/source/office/RemoteFilesDialog.cxx | 2 | ||||
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 10 |
14 files changed, 79 insertions, 88 deletions
diff --git a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx index 6258c03d33f3..45ba38c2ece5 100644 --- a/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx +++ b/drawinglayer/source/primitive2d/graphicprimitivehelper2d.cxx @@ -605,8 +605,7 @@ namespace drawinglayer::primitive2d const Primitive2DReference aPrimitiveGrey( new ModifiedColorPrimitive2D( aRetval, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_gray()))); + std::make_shared<basegfx::BColorModifier_gray>())); aRetval = Primitive2DContainer { aPrimitiveGrey }; break; @@ -617,8 +616,7 @@ namespace drawinglayer::primitive2d const Primitive2DReference aPrimitiveBlackAndWhite( new ModifiedColorPrimitive2D( aRetval, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_black_and_white(0.5)))); + std::make_shared<basegfx::BColorModifier_black_and_white>(0.5))); aRetval = Primitive2DContainer { aPrimitiveBlackAndWhite }; break; @@ -644,13 +642,12 @@ namespace drawinglayer::primitive2d const Primitive2DReference aPrimitiveRGBLuminannceContrast( new ModifiedColorPrimitive2D( aRetval, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_RGBLuminanceContrast( + std::make_shared<basegfx::BColorModifier_RGBLuminanceContrast>( fRed, fGreen, fBlue, fLuminance, - fContrast)))); + fContrast))); aRetval = Primitive2DContainer { aPrimitiveRGBLuminannceContrast }; } @@ -661,9 +658,8 @@ namespace drawinglayer::primitive2d const Primitive2DReference aPrimitiveGamma( new ModifiedColorPrimitive2D( aRetval, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_gamma( - fGamma)))); + std::make_shared<basegfx::BColorModifier_gamma>( + fGamma))); aRetval = Primitive2DContainer { aPrimitiveGamma }; } @@ -674,8 +670,7 @@ namespace drawinglayer::primitive2d const Primitive2DReference aPrimitiveInvert( new ModifiedColorPrimitive2D( aRetval, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_invert()))); + std::make_shared<basegfx::BColorModifier_invert>())); aRetval = Primitive2DContainer { aPrimitiveInvert }; } diff --git a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx index ff198eeeb29f..ba239ee02123 100644 --- a/drawinglayer/source/primitive2d/shadowprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/shadowprimitive2d.cxx @@ -64,9 +64,9 @@ namespace drawinglayer::primitive2d if(!getChildren().empty()) { // create a modifiedColorPrimitive containing the shadow color and the content - const basegfx::BColorModifierSharedPtr aBColorModifier( - new basegfx::BColorModifier_replace( - getShadowColor())); + const basegfx::BColorModifierSharedPtr aBColorModifier = + std::make_shared<basegfx::BColorModifier_replace>( + getShadowColor()); const Primitive2DReference xRefA( new ModifiedColorPrimitive2D( getChildren(), diff --git a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx index 925d1638ae25..6d1948bee899 100644 --- a/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/texteffectprimitive2d.cxx @@ -78,9 +78,9 @@ namespace drawinglayer::primitive2d if(bDefaultTextColor) { // emboss/engrave in black, original forced to white - const basegfx::BColorModifierSharedPtr aBColorModifierToGray( - new basegfx::BColorModifier_replace( - basegfx::BColor(0.0))); + const basegfx::BColorModifierSharedPtr aBColorModifierToGray = + std::make_shared<basegfx::BColorModifier_replace>( + basegfx::BColor(0.0)); const Primitive2DReference xModifiedColor( new ModifiedColorPrimitive2D( getTextContent(), @@ -92,9 +92,9 @@ namespace drawinglayer::primitive2d Primitive2DContainer { xModifiedColor })); // add original, too - const basegfx::BColorModifierSharedPtr aBColorModifierToWhite( - new basegfx::BColorModifier_replace( - basegfx::BColor(1.0))); + const basegfx::BColorModifierSharedPtr aBColorModifierToWhite = + std::make_shared<basegfx::BColorModifier_replace>( + basegfx::BColor(1.0)); rContainer.push_back( new ModifiedColorPrimitive2D( @@ -104,9 +104,9 @@ namespace drawinglayer::primitive2d else { // emboss/engrave in gray, keep original's color - const basegfx::BColorModifierSharedPtr aBColorModifierToGray( - new basegfx::BColorModifier_replace( - basegfx::BColor(0.75))); // 192 + const basegfx::BColorModifierSharedPtr aBColorModifierToGray = + std::make_shared<basegfx::BColorModifier_replace>( + basegfx::BColor(0.75)); // 192 const Primitive2DReference xModifiedColor( new ModifiedColorPrimitive2D( getTextContent(), @@ -161,9 +161,9 @@ namespace drawinglayer::primitive2d rContainer.push_back(new TransformPrimitive2D(aTransform, getTextContent())); // at last, place original over it, but force to white - const basegfx::BColorModifierSharedPtr aBColorModifierToWhite( - new basegfx::BColorModifier_replace( - basegfx::BColor(1.0, 1.0, 1.0))); + const basegfx::BColorModifierSharedPtr aBColorModifierToWhite = + std::make_shared<basegfx::BColorModifier_replace>( + basegfx::BColor(1.0, 1.0, 1.0)); rContainer.push_back( new ModifiedColorPrimitive2D( getTextContent(), diff --git a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx index d86b51f3b0d6..5d2a2b6d2e1d 100644 --- a/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx +++ b/drawinglayer/source/primitive3d/sdrdecompositiontools3d.cxx @@ -239,8 +239,8 @@ namespace drawinglayer::primitive3d if(css::drawing::TextureKind2_LUMINANCE == aSdr3DObjectAttribute.getTextureKind()) { // use modified color primitive to force textures to gray - const basegfx::BColorModifierSharedPtr aBColorModifier( - new basegfx::BColorModifier_gray()); + const basegfx::BColorModifierSharedPtr aBColorModifier = + std::make_shared<basegfx::BColorModifier_gray>(); const Primitive3DReference xRef2( new ModifiedColorPrimitive3D( aRetval, diff --git a/drawinglayer/source/processor3d/defaultprocessor3d.cxx b/drawinglayer/source/processor3d/defaultprocessor3d.cxx index 36862b0db230..6415fb00a2ed 100644 --- a/drawinglayer/source/processor3d/defaultprocessor3d.cxx +++ b/drawinglayer/source/processor3d/defaultprocessor3d.cxx @@ -87,47 +87,45 @@ namespace drawinglayer::processor3d { case attribute::GradientStyle::Linear: { - pNewTex.reset( - new texture::GeoTexSvxGradientLinear( + pNewTex = std::make_shared<texture::GeoTexSvxGradientLinear>( aOutlineRange, aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), - rFillGradient.getAngle())); + rFillGradient.getAngle()); break; } case attribute::GradientStyle::Axial: { - pNewTex.reset( - new texture::GeoTexSvxGradientAxial( + pNewTex = std::make_shared<texture::GeoTexSvxGradientAxial>( aOutlineRange, aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), - rFillGradient.getAngle())); + rFillGradient.getAngle()); break; } case attribute::GradientStyle::Radial: { - pNewTex.reset( - new texture::GeoTexSvxGradientRadial( + pNewTex = + std::make_shared<texture::GeoTexSvxGradientRadial>( aOutlineRange, aStart, aEnd, nSteps, rFillGradient.getBorder(), rFillGradient.getOffsetX(), - rFillGradient.getOffsetY())); + rFillGradient.getOffsetY()); break; } case attribute::GradientStyle::Elliptical: { - pNewTex.reset( - new texture::GeoTexSvxGradientElliptical( + pNewTex = + std::make_shared<texture::GeoTexSvxGradientElliptical>( aOutlineRange, aStart, aEnd, @@ -135,13 +133,13 @@ namespace drawinglayer::processor3d rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), - rFillGradient.getAngle())); + rFillGradient.getAngle()); break; } case attribute::GradientStyle::Square: { - pNewTex.reset( - new texture::GeoTexSvxGradientSquare( + pNewTex = + std::make_shared<texture::GeoTexSvxGradientSquare>( aOutlineRange, aStart, aEnd, @@ -149,13 +147,13 @@ namespace drawinglayer::processor3d rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), - rFillGradient.getAngle())); + rFillGradient.getAngle()); break; } case attribute::GradientStyle::Rect: { - pNewTex.reset( - new texture::GeoTexSvxGradientRect( + pNewTex = + std::make_shared<texture::GeoTexSvxGradientRect>( aOutlineRange, aStart, aEnd, @@ -163,7 +161,7 @@ namespace drawinglayer::processor3d rFillGradient.getBorder(), rFillGradient.getOffsetX(), rFillGradient.getOffsetY(), - rFillGradient.getAngle())); + rFillGradient.getAngle()); break; } } @@ -173,7 +171,7 @@ namespace drawinglayer::processor3d else { // no color distance -> same color, use simple texture - pNewTex.reset(new texture::GeoTexSvxMono(aStart, 1.0 - aStart.luminance())); + pNewTex = std::make_shared<texture::GeoTexSvxMono>(aStart, 1.0 - aStart.luminance()); mbSimpleTextureActive = true; } @@ -235,7 +233,7 @@ namespace drawinglayer::processor3d const double fLogicTexSize(std::max(fLogicTexSizeX, fLogicTexSizeY)); // create texture and set - mpGeoTexSvx.reset(new texture::GeoTexSvxMultiHatch(rPrimitive, fLogicTexSize)); + mpGeoTexSvx = std::make_shared<texture::GeoTexSvxMultiHatch>(rPrimitive, fLogicTexSize); // process sub-list process(rSubSequence); @@ -273,19 +271,19 @@ namespace drawinglayer::processor3d if(rFillGraphicAttribute.getTiling()) { - mpGeoTexSvx.reset( - new texture::GeoTexSvxBitmapExTiled( + mpGeoTexSvx = + std::make_shared<texture::GeoTexSvxBitmapExTiled>( aBitmapEx, aGraphicRange, rFillGraphicAttribute.getOffsetX(), - rFillGraphicAttribute.getOffsetY())); + rFillGraphicAttribute.getOffsetY()); } else { - mpGeoTexSvx.reset( - new texture::GeoTexSvxBitmapEx( + mpGeoTexSvx = + std::make_shared<texture::GeoTexSvxBitmapEx>( aBitmapEx, - aGraphicRange)); + aGraphicRange); } // process sub-list diff --git a/drawinglayer/source/tools/converters.cxx b/drawinglayer/source/tools/converters.cxx index 010f71810c30..ff9b79a688fa 100644 --- a/drawinglayer/source/tools/converters.cxx +++ b/drawinglayer/source/tools/converters.cxx @@ -122,9 +122,8 @@ namespace drawinglayer const primitive2d::Primitive2DReference xRef( new primitive2d::ModifiedColorPrimitive2D( aSequence, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_replace( - basegfx::BColor(0.0, 0.0, 0.0))))); + std::make_shared<basegfx::BColorModifier_replace>( + basegfx::BColor(0.0, 0.0, 0.0)))); const primitive2d::Primitive2DContainer xSeq { xRef }; // render diff --git a/drawinglayer/source/tools/wmfemfhelper.cxx b/drawinglayer/source/tools/wmfemfhelper.cxx index e153d5d3b7a8..09217d32212e 100644 --- a/drawinglayer/source/tools/wmfemfhelper.cxx +++ b/drawinglayer/source/tools/wmfemfhelper.cxx @@ -900,9 +900,8 @@ namespace wmfemfhelper rTargetHolders.Current().append( std::make_unique<drawinglayer::primitive2d::ModifiedColorPrimitive2D>( aSubContent, - basegfx::BColorModifierSharedPtr( - new basegfx::BColorModifier_replace( - basegfx::BColor(0.0, 0.0, 0.0))))); + std::make_shared<basegfx::BColorModifier_replace>( + basegfx::BColor(0.0, 0.0, 0.0)))); } else // if(rPropertyHolders.Current().isRasterOpInvert()) { diff --git a/editeng/source/editeng/eerdll.cxx b/editeng/source/editeng/eerdll.cxx index c2fda0f6c0cf..095c3d51eb05 100644 --- a/editeng/source/editeng/eerdll.cxx +++ b/editeng/source/editeng/eerdll.cxx @@ -165,7 +165,7 @@ std::shared_ptr<DefItems> GlobalEditData::GetDefItems() auto xDefItems = m_xDefItems.lock(); if (!xDefItems) { - xDefItems.reset(new DefItems); + xDefItems = std::make_shared<DefItems>(); m_xDefItems = xDefItems; } return xDefItems; diff --git a/extensions/source/propctrlr/browserlistbox.cxx b/extensions/source/propctrlr/browserlistbox.cxx index 4b50e290daa1..a73f264db445 100644 --- a/extensions/source/propctrlr/browserlistbox.cxx +++ b/extensions/source/propctrlr/browserlistbox.cxx @@ -458,8 +458,8 @@ namespace pcr void OBrowserListBox::InsertEntry(const OLineDescriptor& rPropertyData, sal_uInt16 _nPos) { // create a new line - BrowserLinePointer pBrowserLine(new OBrowserLine(rPropertyData.sName, m_xLinesPlayground.get(), - m_xSizeGroup.get(), m_pInitialControlParent)); + BrowserLinePointer pBrowserLine = std::make_shared<OBrowserLine>(rPropertyData.sName, m_xLinesPlayground.get(), + m_xSizeGroup.get(), m_pInitialControlParent); // check that the name is unique for (auto const& line : m_aLines) diff --git a/filter/source/msfilter/mstoolbar.cxx b/filter/source/msfilter/mstoolbar.cxx index ab11ba739ade..7f0e7d70b9f6 100644 --- a/filter/source/msfilter/mstoolbar.cxx +++ b/filter/source/msfilter/mstoolbar.cxx @@ -189,8 +189,8 @@ bool TBCHeader::Read( SvStream &rS ) // bit 4 ( from lsb ) if ( bFlagsTCR & 0x10 ) { - width.reset( new sal_uInt16 ); - height.reset( new sal_uInt16 ); + width = std::make_shared<sal_uInt16>(); + height = std::make_shared<sal_uInt16>(); rS.ReadUInt16( *width ).ReadUInt16( *height ); } return true; @@ -229,13 +229,13 @@ bool TBCData::Read(SvStream &rS) { case 0x01: // (Button control) case 0x10: // (ExpandingGrid control) - controlSpecificInfo.reset( new TBCBSpecific() ); + controlSpecificInfo = std::make_shared<TBCBSpecific>(); break; case 0x0A: // (Popup control) case 0x0C: // (ButtonPopup control) case 0x0D: // (SplitButtonPopup control) case 0x0E: // (SplitButtonMRUPopup control) - controlSpecificInfo.reset( new TBCMenuSpecific() ); + controlSpecificInfo = std::make_shared<TBCMenuSpecific>(); break; case 0x02: // (Edit control) case 0x04: // (ComboBox control) @@ -243,7 +243,7 @@ bool TBCData::Read(SvStream &rS) case 0x03: // (DropDown control) case 0x06: // (SplitDropDown control) case 0x09: // (GraphicDropDown control) - controlSpecificInfo.reset( new TBCComboDropdownSpecific( rHeader ) ); + controlSpecificInfo = std::make_shared<TBCComboDropdownSpecific>( rHeader ); break; default: break; @@ -526,7 +526,7 @@ TBCMenuSpecific::Read( SvStream &rS) rS.ReadInt32( tbid ); if ( tbid == 1 ) { - name.reset( new WString() ); + name = std::make_shared<WString>(); return name->Read( rS ); } return true; @@ -566,21 +566,21 @@ bool TBCBSpecific::Read( SvStream &rS) // bFlags.fCustomBitmap = 1 ( 0x8 ) set if ( bFlags & 0x8 ) { - icon.reset( new TBCBitMap() ); - iconMask.reset( new TBCBitMap() ); + icon = std::make_shared<TBCBitMap>(); + iconMask = std::make_shared<TBCBitMap>(); if ( !icon->Read( rS ) || !iconMask->Read( rS ) ) return false; } // if bFlags.fCustomBtnFace = 1 ( 0x10 ) if ( bFlags & 0x10 ) { - iBtnFace.reset( new sal_uInt16 ); + iBtnFace = std::make_shared<sal_uInt16>(); rS.ReadUInt16( *iBtnFace ); } // if bFlags.fAccelerator equals 1 ( 0x04 ) if ( bFlags & 0x04 ) { - wstrAcc.reset( new WString() ); + wstrAcc = std::make_shared<WString>(); return wstrAcc->Read( rS ); } return true; @@ -633,7 +633,7 @@ TBCBSpecific::getIconMask() TBCComboDropdownSpecific::TBCComboDropdownSpecific(const TBCHeader& header ) { if ( header.getTcID() == 0x01 ) - data.reset( new TBCCDData() ); + data = std::make_shared<TBCCDData>(); } bool TBCComboDropdownSpecific::Read( SvStream &rS) diff --git a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx index 74d55a3c9194..5ef1bb064193 100644 --- a/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx +++ b/filter/source/xsltdialog/xmlfilterdialogcomponent.cxx @@ -278,7 +278,7 @@ sal_Int16 SAL_CALL XMLFilterDialogComponent::execute() if (!mxDialog) { Reference< XComponent > xComp( this ); - mxDialog.reset(new XMLFilterSettingsDialog(Application::GetFrameWeld(mxParent), mxContext)); + mxDialog = std::make_shared<XMLFilterSettingsDialog>(Application::GetFrameWeld(mxParent), mxContext); bLaunch = true; } diff --git a/formula/source/core/api/FormulaCompiler.cxx b/formula/source/core/api/FormulaCompiler.cxx index 9de565ea6179..fedd6b36fcf4 100644 --- a/formula/source/core/api/FormulaCompiler.cxx +++ b/formula/source/core/api/FormulaCompiler.cxx @@ -802,9 +802,9 @@ FormulaCompiler::OpCodeMapPtr FormulaCompiler::CreateOpCodeMap( { using sheet::FormulaOpCodeMapEntry; // Filter / API maps are never Core - NonConstOpCodeMapPtr xMap( new OpCodeMap( SC_OPCODE_LAST_OPCODE_ID + 1, false, + NonConstOpCodeMapPtr xMap = std::make_shared<OpCodeMap>( SC_OPCODE_LAST_OPCODE_ID + 1, false, FormulaGrammar::mergeToGrammar( FormulaGrammar::setEnglishBit( - FormulaGrammar::GRAM_EXTERNAL, bEnglish), FormulaGrammar::CONV_UNSPECIFIED))); + FormulaGrammar::GRAM_EXTERNAL, bEnglish), FormulaGrammar::CONV_UNSPECIFIED)); SvtSysLocale aSysLocale; const CharClass* pCharClass = (xMap->isEnglish() ? nullptr : aSysLocale.GetCharClassPtr()); for (auto const& rMapEntry : rMapping) @@ -838,9 +838,9 @@ static void lcl_fillNativeSymbols( FormulaCompiler::NonConstOpCodeMapPtr& xMap, else if (!aSymbolMap.mxSymbolMap) { // Core - aSymbolMap.mxSymbolMap.reset( - new FormulaCompiler::OpCodeMap( - SC_OPCODE_LAST_OPCODE_ID + 1, true, FormulaGrammar::GRAM_NATIVE_UI)); + aSymbolMap.mxSymbolMap = + std::make_shared<FormulaCompiler::OpCodeMap>( + SC_OPCODE_LAST_OPCODE_ID + 1, true, FormulaGrammar::GRAM_NATIVE_UI); OpCodeList aOpCodeListSymbols(false, RID_STRLIST_FUNCTION_NAMES_SYMBOLS, aSymbolMap.mxSymbolMap); OpCodeList aOpCodeListNative(true, RID_STRLIST_FUNCTION_NAMES, aSymbolMap.mxSymbolMap); // No AddInMap for native core mapping. @@ -935,7 +935,7 @@ void FormulaCompiler::loadSymbols(const std::pair<const char*, int>* pSymbols, F if ( !rxMap.get() ) { // not Core - rxMap.reset( new OpCodeMap( SC_OPCODE_LAST_OPCODE_ID + 1, eGrammar != FormulaGrammar::GRAM_ODFF, eGrammar )); + rxMap = std::make_shared<OpCodeMap>( SC_OPCODE_LAST_OPCODE_ID + 1, eGrammar != FormulaGrammar::GRAM_ODFF, eGrammar ); OpCodeList aOpCodeList(false, pSymbols, rxMap, eSepType); fillFromAddInMap( rxMap, eGrammar); diff --git a/fpicker/source/office/RemoteFilesDialog.cxx b/fpicker/source/office/RemoteFilesDialog.cxx index d2698983e6b9..f8791df0b27c 100644 --- a/fpicker/source/office/RemoteFilesDialog.cxx +++ b/fpicker/source/office/RemoteFilesDialog.cxx @@ -268,7 +268,7 @@ void RemoteFilesDialog::FillServicesListbox() for( sal_Int32 nPlace = 0; nPlace < placesUrlsList.getLength() && nPlace < placesNamesList.getLength(); ++nPlace ) { - ServicePtr pService( new Place( placesNamesList[nPlace], placesUrlsList[nPlace], true ) ); + ServicePtr pService = std::make_shared<Place>( placesNamesList[nPlace], placesUrlsList[nPlace], true ); m_aServices.push_back( pService ); // Add to the listbox only remote services, not local bookmarks diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 519b21329f65..4e592c5763c0 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -999,9 +999,9 @@ IMPL_LINK_NOARG ( SvtFileDialog, AddPlacePressed_Hdl, weld::Button&, void ) // Maybe open the PlacesDialog would have been a better idea // there is an ux choice to make we did not make... INetURLObject aURLObj( m_xFileView->GetViewURL() ); - PlacePtr newPlace( - new Place( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset), - m_xFileView->GetViewURL(), true)); + PlacePtr newPlace = + std::make_shared<Place>( aURLObj.GetLastName(INetURLObject::DecodeMechanism::WithCharset), + m_xFileView->GetViewURL(), true); m_xImpl->m_xPlaces->AppendPlace(newPlace); } @@ -2289,7 +2289,7 @@ void SvtFileDialog::appendDefaultExtension(OUString& rFileName, void SvtFileDialog::initDefaultPlaces( ) { - PlacePtr pRootPlace( new Place( FpsResId(STR_DEFAULT_DIRECTORY), GetStandardDir() ) ); + PlacePtr pRootPlace = std::make_shared<Place>( FpsResId(STR_DEFAULT_DIRECTORY), GetStandardDir() ); m_xImpl->m_xPlaces->AppendPlace( pRootPlace ); // Load from user settings @@ -2298,7 +2298,7 @@ void SvtFileDialog::initDefaultPlaces( ) for(sal_Int32 nPlace = 0; nPlace < placesUrlsList.getLength() && nPlace < placesNamesList.getLength(); ++nPlace) { - PlacePtr pPlace(new Place(placesNamesList[nPlace], placesUrlsList[nPlace], true)); + PlacePtr pPlace = std::make_shared<Place>(placesNamesList[nPlace], placesUrlsList[nPlace], true); m_xImpl->m_xPlaces->AppendPlace(pPlace); } |