diff options
83 files changed, 264 insertions, 356 deletions
diff --git a/tools/source/fsys/fileutil.cxx b/tools/source/fsys/fileutil.cxx index a24f82316813..e9efcb994e71 100644 --- a/tools/source/fsys/fileutil.cxx +++ b/tools/source/fsys/fileutil.cxx @@ -13,7 +13,6 @@ #include <osl/file.hxx> #include <string.h> #include <o3tl/char16_t2wchar_t.hxx> -#include <o3tl/make_unique.hxx> #define WIN32_LEAN_AND_MEAN #include <Windows.h> #endif @@ -30,12 +29,12 @@ bool IsMappedWebDAVPath(const INetURLObject& aURL) if (osl::FileBase::getSystemPathFromFileURL(sURL, aSystemPath) == osl::FileBase::E_None) { DWORD nSize = MAX_PATH; - auto bufUNC(o3tl::make_unique<char[]>(nSize)); + auto bufUNC(std::make_unique<char[]>(nSize)); DWORD nResult = WNetGetUniversalNameW(o3tl::toW(aSystemPath.getStr()), UNIVERSAL_NAME_INFO_LEVEL, bufUNC.get(), &nSize); if (nResult == ERROR_MORE_DATA) { - bufUNC = o3tl::make_unique<char[]>(nSize); + bufUNC = std::make_unique<char[]>(nSize); nResult = WNetGetUniversalNameW(o3tl::toW(aSystemPath.getStr()), UNIVERSAL_NAME_INFO_LEVEL, bufUNC.get(), &nSize); } @@ -50,12 +49,12 @@ bool IsMappedWebDAVPath(const INetURLObject& aURL) aReq.lpRemoteName = pInfo->lpUniversalName; } nSize = 1024; - auto bufInfo(o3tl::make_unique<char[]>(nSize)); + auto bufInfo(std::make_unique<char[]>(nSize)); LPWSTR pSystem = nullptr; nResult = WNetGetResourceInformationW(&aReq, bufInfo.get(), &nSize, &pSystem); if (nResult == ERROR_MORE_DATA) { - bufInfo = o3tl::make_unique<char[]>(nSize); + bufInfo = std::make_unique<char[]>(nSize); nResult = WNetGetResourceInformationW(&aReq, bufInfo.get(), &nSize, &pSystem); } if (nResult == NO_ERROR) diff --git a/tools/source/xml/XmlWalker.cxx b/tools/source/xml/XmlWalker.cxx index 7e6d282918d4..ca5c2c96eb2b 100644 --- a/tools/source/xml/XmlWalker.cxx +++ b/tools/source/xml/XmlWalker.cxx @@ -9,7 +9,6 @@ #include <tools/stream.hxx> #include <tools/XmlWalker.hxx> -#include <o3tl/make_unique.hxx> #include <libxml/tree.h> #include <libxml/parser.h> @@ -35,7 +34,7 @@ struct XmlWalkerImpl }; XmlWalker::XmlWalker() - : mpImpl(o3tl::make_unique<XmlWalkerImpl>()) + : mpImpl(std::make_unique<XmlWalkerImpl>()) { } diff --git a/tools/source/xml/XmlWriter.cxx b/tools/source/xml/XmlWriter.cxx index f7b288d835f9..7780bbb35fb5 100644 --- a/tools/source/xml/XmlWriter.cxx +++ b/tools/source/xml/XmlWriter.cxx @@ -9,7 +9,6 @@ #include <tools/stream.hxx> #include <tools/XmlWriter.hxx> -#include <o3tl/make_unique.hxx> #include <libxml/xmlwriter.h> @@ -45,7 +44,7 @@ struct XmlWriterImpl }; XmlWriter::XmlWriter(SvStream* pStream) - : mpImpl(o3tl::make_unique<XmlWriterImpl>(pStream)) + : mpImpl(std::make_unique<XmlWriterImpl>(pStream)) { } diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 67767892b816..3d79dca53259 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -41,7 +41,6 @@ #include "curl.hxx" #include <curl/easy.h> #include <comphelper/propertysequence.hxx> -#include <o3tl/make_unique.hxx> #include <ucbhelper/cancelcommandexecution.hxx> #include <ucbhelper/contentidentifier.hxx> #include <ucbhelper/fd_inputstream.hxx> @@ -486,7 +485,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand, = new DynamicResultSet( m_xContext, aOpenCommand, - o3tl::make_unique<ResultSetFactory>(m_xContext, + std::make_unique<ResultSetFactory>(m_xContext, m_xProvider.get(), aOpenCommand.Properties, resvec)); diff --git a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx index e5fe6403650d..66591aa1f749 100644 --- a/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx @@ -34,7 +34,6 @@ *************************************************************************/ #include <sal/log.hxx> -#include <o3tl/make_unique.hxx> #include <com/sun/star/ucb/IllegalIdentifierException.hpp> #include <com/sun/star/ucb/OpenMode.hpp> #include <com/sun/star/ucb/ResultSetException.hpp> @@ -467,7 +466,7 @@ bool DataSupplier::getData() } m_pImpl->m_Results.push_back( - o3tl::make_unique<ResultListEntry>(pContentProperties)); + std::make_unique<ResultListEntry>(pContentProperties)); } } catch ( DAVException const & ) diff --git a/ucb/source/ucp/webdav/webdavcontentcaps.cxx b/ucb/source/ucp/webdav/webdavcontentcaps.cxx index 21703fab2da1..20a2c11ff770 100644 --- a/ucb/source/ucp/webdav/webdavcontentcaps.cxx +++ b/ucb/source/ucp/webdav/webdavcontentcaps.cxx @@ -33,7 +33,6 @@ #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/ucb/Lock.hpp> #include <com/sun/star/ucb/LockEntry.hpp> -#include <o3tl/make_unique.hxx> #include "webdavcontent.hxx" #include "webdavprovider.hxx" #include "DAVSession.hxx" @@ -54,7 +53,7 @@ bool ContentProvider::getProperty( osl::MutexGuard aGuard( m_aMutex ); if ( !m_pProps ) { - m_pProps = o3tl::make_unique<PropertyMap>(); + m_pProps = std::make_unique<PropertyMap>(); // Fill map of known properties... diff --git a/ucb/source/ucp/webdav/webdavdatasupplier.cxx b/ucb/source/ucp/webdav/webdavdatasupplier.cxx index d3e6b936faa7..6225008d544d 100644 --- a/ucb/source/ucp/webdav/webdavdatasupplier.cxx +++ b/ucb/source/ucp/webdav/webdavdatasupplier.cxx @@ -23,7 +23,6 @@ #include <memory> #include <utility> -#include <o3tl/make_unique.hxx> #include <com/sun/star/ucb/OpenMode.hpp> #include <ucbhelper/contentidentifier.hxx> #include <ucbhelper/providerhelper.hxx> @@ -104,7 +103,7 @@ DataSupplier::DataSupplier( const uno::Reference< uno::XComponentContext >& rxContext, const rtl::Reference< Content >& rContent, sal_Int32 nOpenMode ) -: m_pImpl(o3tl::make_unique<DataSupplier_Impl>(rxContext, rContent, nOpenMode)) +: m_pImpl(std::make_unique<DataSupplier_Impl>(rxContext, rContent, nOpenMode)) { } @@ -406,7 +405,7 @@ bool DataSupplier::getData() } std::unique_ptr<ContentProperties> pContentProperties - = o3tl::make_unique<ContentProperties>( rRes ); + = std::make_unique<ContentProperties>( rRes ); // Check resource against open mode. switch ( m_pImpl->m_nOpenMode ) diff --git a/vbahelper/source/msforms/vbauserform.cxx b/vbahelper/source/msforms/vbauserform.cxx index 6f69f0435a9a..0b5c2d2140d9 100644 --- a/vbahelper/source/msforms/vbauserform.cxx +++ b/vbahelper/source/msforms/vbauserform.cxx @@ -31,7 +31,6 @@ #include <basic/sbmeth.hxx> #include "vbacontrols.hxx" #include <sal/log.hxx> -#include <o3tl/make_unique.hxx> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -53,7 +52,7 @@ ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Refer m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW ); uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW ); m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW ); - setGeometryHelper( o3tl::make_unique<UserFormGeometryHelper>( xControl, 0.0, 0.0 ) ); + setGeometryHelper( std::make_unique<UserFormGeometryHelper>( xControl, 0.0, 0.0 ) ); if ( aArgs.getLength() >= 4 ) aArgs[ 3 ] >>= m_sLibName; } diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx index da3889145bb7..d8f234ccc7f5 100644 --- a/vcl/android/androidinst.cxx +++ b/vcl/android/androidinst.cxx @@ -17,7 +17,6 @@ #include <headless/svpdummies.hxx> #include <unx/gendata.hxx> #include <osl/detail/android-bootstrap.h> -#include <o3tl/make_unique.hxx> #include <rtl/strbuf.hxx> #include <vcl/settings.hxx> #include <vcl/svapp.hxx> @@ -187,7 +186,7 @@ SalData::~SalData() SalInstance *CreateSalInstance() { LOGI("Android: CreateSalInstance!"); - AndroidSalInstance* pInstance = new AndroidSalInstance( o3tl::make_unique<SvpSalYieldMutex>() ); + AndroidSalInstance* pInstance = new AndroidSalInstance( std::make_unique<SvpSalYieldMutex>() ); new AndroidSalData( pInstance ); pInstance->AcquireYieldMutex(); return pInstance; diff --git a/vcl/headless/headlessinst.cxx b/vcl/headless/headlessinst.cxx index 28993b250d3e..c1bf1a7b7294 100644 --- a/vcl/headless/headlessinst.cxx +++ b/vcl/headless/headlessinst.cxx @@ -9,7 +9,6 @@ #include <headless/svpinst.hxx> #include <headless/svpdummies.hxx> #include <unx/gendata.hxx> -#include <o3tl/make_unique.hxx> class HeadlessSalInstance : public SvpSalInstance { @@ -86,7 +85,7 @@ SalData::~SalData() // This is our main entry point: SalInstance *CreateSalInstance() { - HeadlessSalInstance* pInstance = new HeadlessSalInstance(o3tl::make_unique<SvpSalYieldMutex>()); + HeadlessSalInstance* pInstance = new HeadlessSalInstance(std::make_unique<SvpSalYieldMutex>()); new HeadlessSalData( pInstance ); pInstance->AcquireYieldMutex(); return pInstance; diff --git a/vcl/headless/svpdata.cxx b/vcl/headless/svpdata.cxx index 9ca2c72fc6fa..313786ad793e 100644 --- a/vcl/headless/svpdata.cxx +++ b/vcl/headless/svpdata.cxx @@ -9,7 +9,6 @@ #include <unx/gendata.hxx> #include <headless/svpinst.hxx> -#include <o3tl/make_unique.hxx> class SvpSalData : public GenericUnixSalData { @@ -22,7 +21,7 @@ public: // plugin factory function SalInstance* svp_create_SalInstance() { - SvpSalInstance* pInstance = new SvpSalInstance( o3tl::make_unique<SvpSalYieldMutex>() ); + SvpSalInstance* pInstance = new SvpSalInstance( std::make_unique<SvpSalYieldMutex>() ); new SvpSalData( pInstance ); return pInstance; } diff --git a/vcl/inc/BitmapScaleConvolutionFilter.hxx b/vcl/inc/BitmapScaleConvolutionFilter.hxx index 41edc2acc645..74dc4b7844ad 100644 --- a/vcl/inc/BitmapScaleConvolutionFilter.hxx +++ b/vcl/inc/BitmapScaleConvolutionFilter.hxx @@ -21,7 +21,6 @@ #define VCL_INC_BITMAPSCALECONVOLUTIONFILTER_HXX #include <vcl/BitmapFilter.hxx> -#include <o3tl/make_unique.hxx> #include "ResampleKernel.hxx" @@ -49,7 +48,7 @@ class VCL_DLLPUBLIC BitmapScaleBilinearFilter : public BitmapScaleConvolutionFil { public: BitmapScaleBilinearFilter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<BilinearKernel>()) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<BilinearKernel>()) { } }; @@ -58,7 +57,7 @@ class VCL_DLLPUBLIC BitmapScaleBicubicFilter : public BitmapScaleConvolutionFilt { public: BitmapScaleBicubicFilter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<BicubicKernel>()) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<BicubicKernel>()) { } }; @@ -67,7 +66,7 @@ class VCL_DLLPUBLIC BitmapScaleLanczos3Filter : public BitmapScaleConvolutionFil { public: BitmapScaleLanczos3Filter(const double& rScaleX, const double& rScaleY) - : BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<Lanczos3Kernel>()) + : BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<Lanczos3Kernel>()) { } }; diff --git a/vcl/inc/font/FeatureCollector.hxx b/vcl/inc/font/FeatureCollector.hxx index 6ad2dfb8b076..505a0874d52c 100644 --- a/vcl/inc/font/FeatureCollector.hxx +++ b/vcl/inc/font/FeatureCollector.hxx @@ -12,7 +12,6 @@ #define INCLUDED_VCL_INC_FONT_FEATURECOLLECTOR_HXX #include <vcl/font/Feature.hxx> -#include <o3tl/make_unique.hxx> #include <hb.h> #include <i18nlangtag/lang.h> diff --git a/vcl/inc/pch/precompiled_vcl.hxx b/vcl/inc/pch/precompiled_vcl.hxx index c37db5d2bd15..64f4d7002c99 100644 --- a/vcl/inc/pch/precompiled_vcl.hxx +++ b/vcl/inc/pch/precompiled_vcl.hxx @@ -266,7 +266,6 @@ #include <i18nlangtag/languagetag.hxx> #include <i18nlangtag/mslangid.hxx> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/make_unique.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <outdata.hxx> diff --git a/vcl/ios/iosinst.cxx b/vcl/ios/iosinst.cxx index cddcdf743840..a475546e9da4 100644 --- a/vcl/ios/iosinst.cxx +++ b/vcl/ios/iosinst.cxx @@ -25,7 +25,6 @@ #include "headless/svpdummies.hxx" #include "unx/gendata.hxx" #include "quartz/utils.h" -#include <o3tl/make_unique.hxx> #include <vcl/layout.hxx> #include <vcl/settings.hxx> @@ -166,7 +165,7 @@ SalData::~SalData() // This is our main entry point: SalInstance *CreateSalInstance() { - IosSalInstance* pInstance = new IosSalInstance( o3tl::make_unique<SvpSalYieldMutex>() ); + IosSalInstance* pInstance = new IosSalInstance( std::make_unique<SvpSalYieldMutex>() ); new IosSalData( pInstance ); pInstance->AcquireYieldMutex(); return pInstance; diff --git a/vcl/opengl/FixedTextureAtlas.cxx b/vcl/opengl/FixedTextureAtlas.cxx index a81a4c113054..77c659f2bec6 100644 --- a/vcl/opengl/FixedTextureAtlas.cxx +++ b/vcl/opengl/FixedTextureAtlas.cxx @@ -18,8 +18,6 @@ #include <opengl/FixedTextureAtlas.hxx> -#include <o3tl/make_unique.hxx> - struct FixedTexture { std::shared_ptr<ImplOpenGLTexture> mpTexture; @@ -90,7 +88,7 @@ void FixedTextureAtlasManager::CreateNewTexture() { int nTextureWidth = mWidthFactor * mSubTextureSize; int nTextureHeight = mHeightFactor * mSubTextureSize; - maFixedTextures.push_back(o3tl::make_unique<FixedTexture>(nTextureWidth, nTextureHeight, mWidthFactor * mHeightFactor)); + maFixedTextures.push_back(std::make_unique<FixedTexture>(nTextureWidth, nTextureHeight, mWidthFactor * mHeightFactor)); } OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight) diff --git a/vcl/opengl/salbmp.cxx b/vcl/opengl/salbmp.cxx index 4fa46de7649e..8e2eed0479ec 100644 --- a/vcl/opengl/salbmp.cxx +++ b/vcl/opengl/salbmp.cxx @@ -34,7 +34,6 @@ #include <vcleventlisteners.hxx> #include <vcl/lazydelete.hxx> -#include <o3tl/make_unique.hxx> #include <o3tl/make_shared.hxx> #include <opengl/zone.hxx> @@ -414,11 +413,11 @@ void lclInstantiateTexture(OpenGLTexture& rTexture, const int nWidth, const int TextureAtlasVector &sTextureAtlases = *gTextureAtlases.get(); if (sTextureAtlases.empty()) { - sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 16)); - sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 24)); - sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 32)); - sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 48)); - sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 64)); + sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 16)); + sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 24)); + sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 32)); + sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 48)); + sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 64)); } for (std::unique_ptr<FixedTextureAtlasManager> & pTextureAtlas : sTextureAtlases) { diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx index f0f470545138..089b1e438b66 100644 --- a/vcl/osx/salinst.cxx +++ b/vcl/osx/salinst.cxx @@ -60,7 +60,6 @@ #include <print.h> #include <salimestatus.hxx> -#include <o3tl/make_unique.hxx> #include <comphelper/processfactory.hxx> @@ -334,7 +333,7 @@ VCLPLUG_OSX_PUBLIC SalInstance* create_SalInstance() } AquaSalInstance::AquaSalInstance() - : SalInstance(o3tl::make_unique<SalYieldMutex>()) + : SalInstance(std::make_unique<SalYieldMutex>()) , mnActivePrintJobs( 0 ) , mbIsLiveResize( false ) , mbNoYieldLock( false ) diff --git a/vcl/qt5/Qt5Graphics_Text.cxx b/vcl/qt5/Qt5Graphics_Text.cxx index 87bdb054655f..870ceb428c2d 100644 --- a/vcl/qt5/Qt5Graphics_Text.cxx +++ b/vcl/qt5/Qt5Graphics_Text.cxx @@ -22,7 +22,6 @@ #include <Qt5Font.hxx> #include <Qt5Painter.hxx> -#include <o3tl/make_unique.hxx> #include <vcl/fontcharmap.hxx> #include <unx/geninst.h> #include <unx/fontmanager.hxx> @@ -190,7 +189,7 @@ std::unique_ptr<GenericSalLayout> Qt5Graphics::GetTextLayout(int nFallbackLevel) assert(m_pTextStyle[nFallbackLevel]); if (!m_pTextStyle[nFallbackLevel]) return nullptr; - return o3tl::make_unique<Qt5CommonSalLayout>(*m_pTextStyle[nFallbackLevel]); + return std::make_unique<Qt5CommonSalLayout>(*m_pTextStyle[nFallbackLevel]); } void Qt5Graphics::DrawTextLayout(const GenericSalLayout& rLayout) diff --git a/vcl/qt5/Qt5Instance.cxx b/vcl/qt5/Qt5Instance.cxx index dceb97d89f6d..31dfb83c25ba 100644 --- a/vcl/qt5/Qt5Instance.cxx +++ b/vcl/qt5/Qt5Instance.cxx @@ -42,7 +42,6 @@ #include <QtWidgets/QApplication> #include <QtWidgets/QWidget> -#include <o3tl/make_unique.hxx> #include <vclpluginapi.h> #include <sal/log.hxx> #include <osl/process.h> @@ -50,7 +49,7 @@ #include <headless/svpbmp.hxx> Qt5Instance::Qt5Instance(bool bUseCairo) - : SalGenericInstance(o3tl::make_unique<SalYieldMutex>()) + : SalGenericInstance(std::make_unique<SalYieldMutex>()) , m_postUserEventId(-1) , m_bUseCairo(bUseCairo) { diff --git a/vcl/quartz/salbmp.cxx b/vcl/quartz/salbmp.cxx index f008b02a004e..3d7af959b90d 100644 --- a/vcl/quartz/salbmp.cxx +++ b/vcl/quartz/salbmp.cxx @@ -25,7 +25,6 @@ #include <limits> #include <o3tl/make_shared.hxx> -#include <o3tl/make_unique.hxx> #include <basegfx/vector/b2ivector.hxx> #include <tools/color.hxx> #include <vcl/bitmap.hxx> @@ -539,12 +538,12 @@ std::unique_ptr<ImplPixelFormat> ImplPixelFormat::GetFormat( sal_uInt16 nBits, c { switch( nBits ) { - case 1: return o3tl::make_unique<ImplPixelFormat1>( rPalette ); - case 4: return o3tl::make_unique<ImplPixelFormat4>( rPalette ); - case 8: return o3tl::make_unique<ImplPixelFormat8>( rPalette ); - case 16: return o3tl::make_unique<ImplPixelFormat16>(); - case 24: return o3tl::make_unique<ImplPixelFormat24>(); - case 32: return o3tl::make_unique<ImplPixelFormat32>(); + case 1: return std::make_unique<ImplPixelFormat1>( rPalette ); + case 4: return std::make_unique<ImplPixelFormat4>( rPalette ); + case 8: return std::make_unique<ImplPixelFormat8>( rPalette ); + case 16: return std::make_unique<ImplPixelFormat16>(); + case 24: return std::make_unique<ImplPixelFormat24>(); + case 32: return std::make_unique<ImplPixelFormat32>(); default: assert(false); return nullptr; diff --git a/vcl/quartz/salgdi.cxx b/vcl/quartz/salgdi.cxx index 1331c229166e..379174690968 100644 --- a/vcl/quartz/salgdi.cxx +++ b/vcl/quartz/salgdi.cxx @@ -26,7 +26,6 @@ #include <basegfx/polygon/b2dpolygon.hxx> #include <basegfx/polygon/b2dpolygontools.hxx> #include <basegfx/range/b2drectangle.hxx> -#include <o3tl/make_unique.hxx> #include <osl/file.hxx> #include <osl/process.h> #include <rtl/bootstrap.h> @@ -508,7 +507,7 @@ std::unique_ptr<GenericSalLayout> AquaSalGraphics::GetTextLayout(int nFallbackLe assert(mpTextStyle[nFallbackLevel]); if (!mpTextStyle[nFallbackLevel]) return nullptr; - return o3tl::make_unique<GenericSalLayout>(*mpTextStyle[nFallbackLevel]); + return std::make_unique<GenericSalLayout>(*mpTextStyle[nFallbackLevel]); } const FontCharMapRef AquaSalGraphics::GetFontCharMap() const diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index d7d62a85f099..4f54a0e18e86 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -57,7 +57,6 @@ #include <vcl/vclmedit.hxx> #include <vcl/virdev.hxx> #include <bitmaps.hlst> -#include <o3tl/make_unique.hxx> SalFrame::SalFrame() : m_pWindow(nullptr) @@ -2040,7 +2039,7 @@ public: void* pUserData; if (pId) { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(*pId)); + m_aUserData.emplace_back(std::make_unique<OUString>(*pId)); pUserData = m_aUserData.back().get(); } else @@ -2050,15 +2049,15 @@ public: if (pIconName || pImageSurface) { Image aImage(pIconName ? createImage(*pIconName) : createImage(*pImageSurface)); - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(aImage, aImage, false)); + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(aImage, aImage, false)); } else { Image aDummy; - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(aDummy, aDummy, false)); + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(aDummy, aDummy, false)); } if (pStr) - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(*pStr)); + pEntry->AddItem(std::make_unique<SvLBoxString>(*pStr)); pEntry->SetUserData(pUserData); m_xTreeView->Insert(pEntry, iter, nInsertPos); @@ -2218,11 +2217,11 @@ public: // blank out missing entries for (int i = pEntry->ItemCount(); i < col ; ++i) - pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); if (static_cast<size_t>(col) == pEntry->ItemCount()) { - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rText)); + pEntry->AddItem(std::make_unique<SvLBoxString>(rText)); SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pEntry); m_xTreeView->InitViewData(pViewData, pEntry); } @@ -2260,11 +2259,11 @@ public: // blank out missing entries for (int i = pEntry->ItemCount(); i < col ; ++i) - pEntry->AddItem(o3tl::make_unique<SvLBoxString>("")); + pEntry->AddItem(std::make_unique<SvLBoxString>("")); if (static_cast<size_t>(col) == pEntry->ItemCount()) { - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, + pEntry->AddItem(std::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox, bRadio ? &m_aRadioButtonData : &m_aCheckButtonData)); SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pEntry); m_xTreeView->InitViewData(pViewData, pEntry); @@ -2298,7 +2297,7 @@ public: virtual void set_id(int pos, const OUString& rId) override { SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos); - m_aUserData.emplace_back(o3tl::make_unique<OUString>(rId)); + m_aUserData.emplace_back(std::make_unique<OUString>(rId)); pEntry->SetUserData(m_aUserData.back().get()); } @@ -3218,7 +3217,7 @@ public: virtual void set_id(int row, const OUString& rId) override { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(rId)); + m_aUserData.emplace_back(std::make_unique<OUString>(rId)); m_xComboBox->SetEntryData(row, m_aUserData.back().get()); } @@ -3312,7 +3311,7 @@ public: nInsertedAt = m_xComboBox->InsertEntry(rStr, createImage(*pImageSurface), nInsertPos); if (pId) { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(*pId)); + m_aUserData.emplace_back(std::make_unique<OUString>(*pId)); m_xComboBox->SetEntryData(nInsertedAt, m_aUserData.back().get()); } } @@ -3426,7 +3425,7 @@ public: nInsertedAt = m_xComboBox->InsertEntryWithImage(rStr, createImage(*pImageSurface), nInsertPos); if (pId) { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(*pId)); + m_aUserData.emplace_back(std::make_unique<OUString>(*pId)); m_xComboBox->SetEntryData(nInsertedAt, m_aUserData.back().get()); } } @@ -3637,19 +3636,19 @@ public: virtual std::unique_ptr<weld::Window> weld_window(const OString &id, bool bTakeOwnership) override { SystemWindow* pWindow = m_xBuilder->get<SystemWindow>(id); - return pWindow ? o3tl::make_unique<SalInstanceWindow>(pWindow, bTakeOwnership) : nullptr; + return pWindow ? std::make_unique<SalInstanceWindow>(pWindow, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Widget> weld_widget(const OString &id, bool bTakeOwnership) override { vcl::Window* pWidget = m_xBuilder->get<vcl::Window>(id); - return pWidget ? o3tl::make_unique<SalInstanceWidget>(pWidget, bTakeOwnership) : nullptr; + return pWidget ? std::make_unique<SalInstanceWidget>(pWidget, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Container> weld_container(const OString &id, bool bTakeOwnership) override { vcl::Window* pContainer = m_xBuilder->get<vcl::Window>(id); - return pContainer ? o3tl::make_unique<SalInstanceContainer>(pContainer, bTakeOwnership) : nullptr; + return pContainer ? std::make_unique<SalInstanceContainer>(pContainer, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Frame> weld_frame(const OString &id, bool bTakeOwnership) override @@ -3668,73 +3667,73 @@ public: virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString &id, bool bTakeOwnership) override { VclScrolledWindow* pScrolledWindow = m_xBuilder->get<VclScrolledWindow>(id); - return pScrolledWindow ? o3tl::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership) : nullptr; + return pScrolledWindow ? std::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString &id, bool bTakeOwnership) override { TabControl* pNotebook = m_xBuilder->get<TabControl>(id); - return pNotebook ? o3tl::make_unique<SalInstanceNotebook>(pNotebook, bTakeOwnership) : nullptr; + return pNotebook ? std::make_unique<SalInstanceNotebook>(pNotebook, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Button> weld_button(const OString &id, bool bTakeOwnership) override { Button* pButton = m_xBuilder->get<Button>(id); - return pButton ? o3tl::make_unique<SalInstanceButton>(pButton, bTakeOwnership) : nullptr; + return pButton ? std::make_unique<SalInstanceButton>(pButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::MenuButton> weld_menu_button(const OString &id, bool bTakeOwnership) override { MenuButton* pButton = m_xBuilder->get<MenuButton>(id); - return pButton ? o3tl::make_unique<SalInstanceMenuButton>(pButton, bTakeOwnership) : nullptr; + return pButton ? std::make_unique<SalInstanceMenuButton>(pButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::ToggleButton> weld_toggle_button(const OString &id, bool bTakeOwnership) override { PushButton* pToggleButton = m_xBuilder->get<PushButton>(id); - return pToggleButton ? o3tl::make_unique<SalInstanceToggleButton>(pToggleButton, bTakeOwnership) : nullptr; + return pToggleButton ? std::make_unique<SalInstanceToggleButton>(pToggleButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OString &id, bool bTakeOwnership) override { RadioButton* pRadioButton = m_xBuilder->get<RadioButton>(id); - return pRadioButton ? o3tl::make_unique<SalInstanceRadioButton>(pRadioButton, bTakeOwnership) : nullptr; + return pRadioButton ? std::make_unique<SalInstanceRadioButton>(pRadioButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::CheckButton> weld_check_button(const OString &id, bool bTakeOwnership) override { CheckBox* pCheckButton = m_xBuilder->get<CheckBox>(id); - return pCheckButton ? o3tl::make_unique<SalInstanceCheckButton>(pCheckButton, bTakeOwnership) : nullptr; + return pCheckButton ? std::make_unique<SalInstanceCheckButton>(pCheckButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Scale> weld_scale(const OString &id, bool bTakeOwnership) override { Slider* pSlider = m_xBuilder->get<Slider>(id); - return pSlider ? o3tl::make_unique<SalInstanceScale>(pSlider, bTakeOwnership) : nullptr; + return pSlider ? std::make_unique<SalInstanceScale>(pSlider, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::ProgressBar> weld_progress_bar(const OString &id, bool bTakeOwnership) override { ::ProgressBar* pProgress = m_xBuilder->get<::ProgressBar>(id); - return pProgress ? o3tl::make_unique<SalInstanceProgressBar>(pProgress, bTakeOwnership) : nullptr; + return pProgress ? std::make_unique<SalInstanceProgressBar>(pProgress, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Image> weld_image(const OString &id, bool bTakeOwnership) override { FixedImage* pImage = m_xBuilder->get<FixedImage>(id); - return pImage ? o3tl::make_unique<SalInstanceImage>(pImage, bTakeOwnership) : nullptr; + return pImage ? std::make_unique<SalInstanceImage>(pImage, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Entry> weld_entry(const OString &id, bool bTakeOwnership) override { Edit* pEntry = m_xBuilder->get<Edit>(id); - return pEntry ? o3tl::make_unique<SalInstanceEntry>(pEntry, bTakeOwnership) : nullptr; + return pEntry ? std::make_unique<SalInstanceEntry>(pEntry, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::SpinButton> weld_spin_button(const OString &id, bool bTakeOwnership) override { FormattedField* pSpinButton = m_xBuilder->get<FormattedField>(id); - return pSpinButton ? o3tl::make_unique<SalInstanceSpinButton>(pSpinButton, bTakeOwnership) : nullptr; + return pSpinButton ? std::make_unique<SalInstanceSpinButton>(pSpinButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit, @@ -3746,14 +3745,14 @@ public: SalInstanceSpinButton& rButton = dynamic_cast<SalInstanceSpinButton&>(*xButton); rButton.SetUseThousandSep(); } - return o3tl::make_unique<weld::MetricSpinButton>(std::move(xButton), eUnit); + return std::make_unique<weld::MetricSpinButton>(std::move(xButton), eUnit); } virtual std::unique_ptr<weld::FormattedSpinButton> weld_formatted_spin_button(const OString& id, bool bTakeOwnership) override { FormattedField* pSpinButton = m_xBuilder->get<FormattedField>(id); - return pSpinButton ? o3tl::make_unique<SalInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership) : nullptr; + return pSpinButton ? std::make_unique<SalInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::TimeSpinButton> weld_time_spin_button(const OString& id, TimeFieldFormat eFormat, @@ -3770,59 +3769,59 @@ public: vcl::Window* pWidget = m_xBuilder->get<vcl::Window>(id); ::ComboBox* pComboBox = dynamic_cast<::ComboBox*>(pWidget); if (pComboBox) - return o3tl::make_unique<SalInstanceComboBoxWithEdit>(pComboBox, bTakeOwnership); + return std::make_unique<SalInstanceComboBoxWithEdit>(pComboBox, bTakeOwnership); ListBox* pListBox = dynamic_cast<ListBox*>(pWidget); - return pListBox ? o3tl::make_unique<SalInstanceComboBoxWithoutEdit>(pListBox, bTakeOwnership) : nullptr; + return pListBox ? std::make_unique<SalInstanceComboBoxWithoutEdit>(pListBox, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::EntryTreeView> weld_entry_tree_view(const OString& containerid, const OString& entryid, const OString& treeviewid, bool bTakeOwnership) override { vcl::Window* pContainer = m_xBuilder->get<vcl::Window>(containerid); - return pContainer ? o3tl::make_unique<SalInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership), + return pContainer ? std::make_unique<SalInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership), weld_tree_view(treeviewid, bTakeOwnership)) : nullptr; } virtual std::unique_ptr<weld::TreeView> weld_tree_view(const OString &id, bool bTakeOwnership) override { SvTabListBox* pTreeView = m_xBuilder->get<SvTabListBox>(id); - return pTreeView ? o3tl::make_unique<SalInstanceTreeView>(pTreeView, bTakeOwnership) : nullptr; + return pTreeView ? std::make_unique<SalInstanceTreeView>(pTreeView, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Label> weld_label(const OString &id, bool bTakeOwnership) override { FixedText* pLabel = m_xBuilder->get<FixedText>(id); - return pLabel ? o3tl::make_unique<SalInstanceLabel>(pLabel, bTakeOwnership) : nullptr; + return pLabel ? std::make_unique<SalInstanceLabel>(pLabel, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::TextView> weld_text_view(const OString &id, bool bTakeOwnership) override { VclMultiLineEdit* pTextView = m_xBuilder->get<VclMultiLineEdit>(id); - return pTextView ? o3tl::make_unique<SalInstanceTextView>(pTextView, bTakeOwnership) : nullptr; + return pTextView ? std::make_unique<SalInstanceTextView>(pTextView, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Expander> weld_expander(const OString &id, bool bTakeOwnership) override { VclExpander* pExpander = m_xBuilder->get<VclExpander>(id); - return pExpander ? o3tl::make_unique<SalInstanceExpander>(pExpander, bTakeOwnership) : nullptr; + return pExpander ? std::make_unique<SalInstanceExpander>(pExpander, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::DrawingArea> weld_drawing_area(const OString &id, const a11yref& rA11yImpl, FactoryFunction pUITestFactoryFunction, void* pUserData, bool bTakeOwnership) override { VclDrawingArea* pDrawingArea = m_xBuilder->get<VclDrawingArea>(id); - return pDrawingArea ? o3tl::make_unique<SalInstanceDrawingArea>(pDrawingArea, rA11yImpl, + return pDrawingArea ? std::make_unique<SalInstanceDrawingArea>(pDrawingArea, rA11yImpl, pUITestFactoryFunction, pUserData, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Menu> weld_menu(const OString &id, bool bTakeOwnership) override { PopupMenu* pMenu = m_xBuilder->get_menu(id); - return pMenu ? o3tl::make_unique<SalInstanceMenu>(pMenu, bTakeOwnership) : nullptr; + return pMenu ? std::make_unique<SalInstanceMenu>(pMenu, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::SizeGroup> create_size_group() override { - return o3tl::make_unique<SalInstanceSizeGroup>(); + return std::make_unique<SalInstanceSizeGroup>(); } virtual ~SalInstanceBuilder() override diff --git a/vcl/source/app/svdata.cxx b/vcl/source/app/svdata.cxx index 491bf03621d8..0d0930a8646a 100644 --- a/vcl/source/app/svdata.cxx +++ b/vcl/source/app/svdata.cxx @@ -63,7 +63,6 @@ #endif #include <basegfx/utils/systemdependentdata.hxx> #include <cppuhelper/basemutex.hxx> -#include <o3tl/make_unique.hxx> using namespace com::sun::star::uno; using namespace com::sun::star::lang; @@ -116,7 +115,7 @@ namespace public: SystemDependentDataBuffer(const sal_Char* pDebugName) : basegfx::SystemDependentDataManager(), - maTimer(o3tl::make_unique<Timer>(pDebugName)), + maTimer(std::make_unique<Timer>(pDebugName)), maEntries() { maTimer->SetTimeout(1000); diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 86f709ddb879..d4ba23064e03 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -42,7 +42,6 @@ #include <svdata.hxx> #include <window.h> #include <controldata.hxx> -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> @@ -95,7 +94,7 @@ mbSmallSymbol(false), maImage(), meImageAlign(ImageAlign::Top), meSymbolAlign(Sy Button::Button( WindowType nType ) : Control( nType ), - mpButtonData( o3tl::make_unique<ImplCommonButtonData>() ) + mpButtonData( std::make_unique<ImplCommonButtonData>() ) { } diff --git a/vcl/source/edit/texteng.cxx b/vcl/source/edit/texteng.cxx index 2c8e320468b0..097305df51c7 100644 --- a/vcl/source/edit/texteng.cxx +++ b/vcl/source/edit/texteng.cxx @@ -33,7 +33,6 @@ #include <vcl/edit.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> -#include <o3tl/make_unique.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/beans/PropertyValues.hpp> @@ -489,7 +488,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars ) break; // for } } - InsertUndo( o3tl::make_unique<TextUndoRemoveChars>( this, rPaM, aStr ) ); + InsertUndo( std::make_unique<TextUndoRemoveChars>( this, rPaM, aStr ) ); } mpDoc->RemoveChars( rPaM, nChars ); @@ -504,7 +503,7 @@ TextPaM TextEngine::ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight ) TextNode* pRight = mpDoc->GetNodes()[ nRight ].get(); if ( IsUndoEnabled() && !IsInUndo() ) - InsertUndo( o3tl::make_unique<TextUndoConnectParas>( this, nLeft, pLeft->GetText().getLength() ) ); + InsertUndo( std::make_unique<TextUndoConnectParas>( this, nLeft, pLeft->GetText().getLength() ) ); // first lookup Portions, as pRight is gone after ConnectParagraphs TEParaPortion* pLeftPortion = mpTEParaPortions->GetObject( nLeft ); @@ -599,7 +598,7 @@ void TextEngine::ImpRemoveParagraph( sal_uInt32 nPara ) // the Node is handled by Undo and is deleted if appropriate mpDoc->GetNodes().erase( mpDoc->GetNodes().begin() + nPara ); if ( IsUndoEnabled() && !IsInUndo() ) - InsertUndo( o3tl::make_unique<TextUndoDelPara>( this, pNode.release(), nPara ) ); + InsertUndo( std::make_unique<TextUndoDelPara>( this, pNode.release(), nPara ) ); mpTEParaPortions->Remove( nPara ); @@ -766,7 +765,7 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString& { OUString aLine(aText.copy(nStart, nEnd-nStart)); if ( IsUndoEnabled() && !IsInUndo() ) - InsertUndo( o3tl::make_unique<TextUndoInsertChars>( this, aPaM, aLine ) ); + InsertUndo( std::make_unique<TextUndoInsertChars>( this, aPaM, aLine ) ); TEParaPortion* pPortion = mpTEParaPortions->GetObject( aPaM.GetPara() ); pPortion->MarkInvalid( aPaM.GetIndex(), aLine.getLength() ); @@ -806,7 +805,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel ) TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM ) { if ( IsUndoEnabled() && !IsInUndo() ) - InsertUndo( o3tl::make_unique<TextUndoSplitPara>( this, rPaM.GetPara(), rPaM.GetIndex() ) ); + InsertUndo( std::make_unique<TextUndoSplitPara>( this, rPaM.GetPara(), rPaM.GetIndex() ) ); TextNode* pNode = mpDoc->GetNodes()[ rPaM.GetPara() ].get(); bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().getLength(); @@ -2526,7 +2525,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32 if ( nEnd > nMax ) nEnd = nMax; - pNode->GetCharAttribs().InsertAttrib( o3tl::make_unique<TextCharAttrib>( rAttr, nStart, nEnd ) ); + pNode->GetCharAttribs().InsertAttrib( std::make_unique<TextCharAttrib>( rAttr, nStart, nEnd ) ); pTEParaPortion->MarkSelectionInvalid( nStart ); mbFormatted = false; diff --git a/vcl/source/edit/textview.cxx b/vcl/source/edit/textview.cxx index 8811fe28e55b..404dbd8bb388 100644 --- a/vcl/source/edit/textview.cxx +++ b/vcl/source/edit/textview.cxx @@ -65,8 +65,6 @@ #include <algorithm> #include <cstddef> -#include <o3tl/make_unique.hxx> - TETextDataObject::TETextDataObject( const OUString& rText ) : maText( rText ) { } @@ -174,8 +172,8 @@ TextView::TextView( ExtTextEngine* pEng, vcl::Window* pWindow ) : mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW; - mpImpl->mpSelFuncSet = o3tl::make_unique<TextSelFunctionSet>( this ); - mpImpl->mpSelEngine = o3tl::make_unique<SelectionEngine>( mpImpl->mpWindow, mpImpl->mpSelFuncSet.get() ); + mpImpl->mpSelFuncSet = std::make_unique<TextSelFunctionSet>( this ); + mpImpl->mpSelEngine = std::make_unique<SelectionEngine>( mpImpl->mpWindow, mpImpl->mpSelFuncSet.get() ); mpImpl->mpSelEngine->SetSelectionMode( SelectionMode::Range ); mpImpl->mpSelEngine->EnableDrag( true ); @@ -822,7 +820,7 @@ void TextView::Command( const CommandEvent& rCEvt ) { DeleteSelected(); TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes()[ GetSelection().GetEnd().GetPara() ].get(); - mpImpl->mpTextEngine->mpIMEInfos = o3tl::make_unique<TEIMEInfos>( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) ); + mpImpl->mpTextEngine->mpIMEInfos = std::make_unique<TEIMEInfos>( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) ); mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite = !IsInsertMode(); } else if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput ) diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 67a71a21fb52..d78e054a9a87 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -20,7 +20,6 @@ #include <config_folders.h> #include <sal/log.hxx> -#include <o3tl/make_unique.hxx> #include <osl/mutex.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/threadpool.hxx> @@ -1371,10 +1370,10 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra else { Bitmap& rBitmap = const_cast<Bitmap&>(rContext.m_pGraphic->GetBitmapExRef().GetBitmapRef()); - rContext.m_pAccess = o3tl::make_unique<BitmapScopedWriteAccess>(rBitmap); + rContext.m_pAccess = std::make_unique<BitmapScopedWriteAccess>(rBitmap); rContext.m_pStream->Seek(rContext.m_nStreamBegin); if (bThreads) - rSharedPool.pushTask(o3tl::make_unique<GraphicImportTask>(pTag, rContext)); + rSharedPool.pushTask(std::make_unique<GraphicImportTask>(pTag, rContext)); else GraphicImportTask::doImport(rContext); } @@ -2021,7 +2020,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, if (aShortName == "PCD") { OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" ); - pFilterConfigItem = o3tl::make_unique<FilterConfigItem>( aFilterConfigPath ); + pFilterConfigItem = std::make_unique<FilterConfigItem>( aFilterConfigPath ); } } if( !(*pFunc)( rIStream, rGraphic, pFilterConfigItem.get() ) ) diff --git a/vcl/source/filter/igif/gifread.cxx b/vcl/source/filter/igif/gifread.cxx index 3ddcb06c643e..ad570125a2a6 100644 --- a/vcl/source/filter/igif/gifread.cxx +++ b/vcl/source/filter/igif/gifread.cxx @@ -22,7 +22,6 @@ #include "decode.hxx" #include "gifread.hxx" #include <memory> -#include <o3tl/make_unique.hxx> #include <bitmapwriteaccess.hxx> #define NO_PENDING( rStm ) ( ( rStm ).GetError() != ERRCODE_IO_PENDING ) @@ -798,7 +797,7 @@ bool GIFReader::ProcessGIF() else if( NO_PENDING( rIStm ) ) { bRead = true; - pDecomp = o3tl::make_unique<GIFLZWDecompressor>( cDataSize ); + pDecomp = std::make_unique<GIFLZWDecompressor>( cDataSize ); eActAction = NEXT_BLOCK_READING; bOverreadBlock = false; } diff --git a/vcl/source/filter/ipdf/pdfdocument.cxx b/vcl/source/filter/ipdf/pdfdocument.cxx index 7b3ce9b4a815..e12db4148a7d 100644 --- a/vcl/source/filter/ipdf/pdfdocument.cxx +++ b/vcl/source/filter/ipdf/pdfdocument.cxx @@ -26,7 +26,6 @@ #include <svl/cryptosign.hxx> #include <tools/zcodec.hxx> #include <vcl/pdfwriter.hxx> -#include <o3tl/make_unique.hxx> using namespace com::sun::star; @@ -2681,7 +2680,7 @@ void PDFObjectElement::ParseStoredObjects() size_t nLen = aLengths[nObject]; aStream.Seek(nOffset); - m_aStoredElements.push_back(o3tl::make_unique<PDFObjectElement>(m_rDoc, nObjNum, 0)); + m_aStoredElements.push_back(std::make_unique<PDFObjectElement>(m_rDoc, nObjNum, 0)); PDFObjectElement* pStored = m_aStoredElements.back().get(); aBuf.clear(); diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx index 93cc9cdb1ebb..7e5f8fa8c632 100644 --- a/vcl/source/font/FeatureCollector.cxx +++ b/vcl/source/font/FeatureCollector.cxx @@ -9,7 +9,6 @@ #include <font/FeatureCollector.hxx> #include <font/OpenTypeFeatureDefinitonList.hxx> -#include <o3tl/make_unique.hxx> #include <hb-ot.h> #include <hb-graphite2.h> diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index 45c00a8d3f88..f99d44799aaa 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -43,7 +43,6 @@ #include <com/sun/star/graphic/XPrimitive2D.hpp> #include <vcl/dibtools.hxx> #include <memory> -#include <o3tl/make_unique.hxx> #include <vcl/gdimetafiletools.hxx> #include <vcl/pdfread.hxx> @@ -208,7 +207,7 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic) { if( rImpGraphic.mpAnimation ) { - mpAnimation = o3tl::make_unique<Animation>( *rImpGraphic.mpAnimation ); + mpAnimation = std::make_unique<Animation>( *rImpGraphic.mpAnimation ); maEx = mpAnimation->GetBitmapEx(); } } @@ -286,7 +285,7 @@ ImpGraphic::ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr) ImpGraphic::ImpGraphic( const Animation& rAnimation ) : maEx ( rAnimation.GetBitmapEx() ), - mpAnimation ( o3tl::make_unique<Animation>( rAnimation ) ), + mpAnimation ( std::make_unique<Animation>( rAnimation ) ), meType ( GraphicType::Bitmap ), mnSizeBytes ( 0 ), mbSwapOut ( false ), @@ -334,7 +333,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic ) if ( rImpGraphic.mpAnimation ) { - mpAnimation = o3tl::make_unique<Animation>( *rImpGraphic.mpAnimation ); + mpAnimation = std::make_unique<Animation>( *rImpGraphic.mpAnimation ); maEx = mpAnimation->GetBitmapEx(); } else @@ -1459,7 +1458,7 @@ bool ImpGraphic::ImplSwapOut() bRet = ImplSwapOut( xOStm.get() ); if( bRet ) { - mpSwapFile = o3tl::make_unique<ImpSwapFile>(); + mpSwapFile = std::make_unique<ImpSwapFile>(); mpSwapFile->aSwapURL = aTmpURL; mpSwapFile->maOriginURL = getOriginURL(); } @@ -1813,7 +1812,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) if( !rIStm.GetError() && ( 0x5344414e == nMagic1 ) && ( 0x494d4931 == nMagic2 ) ) { - rImpGraphic.mpAnimation = o3tl::make_unique<Animation>(); + rImpGraphic.mpAnimation = std::make_unique<Animation>(); ReadAnimation( rIStm, *rImpGraphic.mpAnimation ); // #108077# manually set loaded BmpEx to Animation diff --git a/vcl/source/gdi/impvect.cxx b/vcl/source/gdi/impvect.cxx index 896182663dca..a27094c02f9a 100644 --- a/vcl/source/gdi/impvect.cxx +++ b/vcl/source/gdi/impvect.cxx @@ -20,7 +20,6 @@ #include <stdlib.h> #include <sal/log.hxx> -#include <o3tl/make_unique.hxx> #include <vcl/bitmapaccess.hxx> #include <tools/poly.hxx> #include <tools/helpers.hxx> @@ -167,7 +166,7 @@ void ImplPointArray::ImplSetSize( sal_uLong nSize ) mnSize = nSize; mnRealSize = 0; - mpArray = o3tl::make_unique<Point[]>( nTotal ); + mpArray = std::make_unique<Point[]>( nTotal ); } inline Point& ImplPointArray::operator[]( sal_uLong nPos ) diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 3afb4c509abf..cdcfdc00bd3b 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -42,7 +42,6 @@ #include <cppuhelper/implbase.hxx> #include <i18nlangtag/languagetag.hxx> #include <o3tl/numeric.hxx> -#include <o3tl/make_unique.hxx> #include <osl/file.hxx> #include <osl/thread.h> #include <rtl/crc.h> @@ -2090,8 +2089,8 @@ void PDFWriterImpl::beginCompression() { if (!g_bDebugDisableCompression) { - m_pCodec = o3tl::make_unique<ZCodec>( 0x4000, 0x4000 ); - m_pMemStream = o3tl::make_unique<SvMemoryStream>(); + m_pCodec = std::make_unique<ZCodec>( 0x4000, 0x4000 ); + m_pMemStream = std::make_unique<SvMemoryStream>(); m_pCodec->BeginCompression(); } } diff --git a/vcl/source/gdi/pngread.cxx b/vcl/source/gdi/pngread.cxx index f4bdbf8ae9bc..a3f449b4f8ab 100644 --- a/vcl/source/gdi/pngread.cxx +++ b/vcl/source/gdi/pngread.cxx @@ -35,7 +35,6 @@ #include <vcl/svapp.hxx> #include <vcl/alpha.hxx> #include <osl/endian.h> -#include <o3tl/make_unique.hxx> #include <bitmapwriteaccess.hxx> namespace vcl @@ -666,14 +665,14 @@ bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint ) if ( !mpInflateInBuf || !mpScanPrior ) return false; - mpBmp = o3tl::make_unique<Bitmap>( maTargetSize, mnTargetDepth ); + mpBmp = std::make_unique<Bitmap>( maTargetSize, mnTargetDepth ); mxAcc = BitmapScopedWriteAccess(*mpBmp); if (!mxAcc) return false; if ( mbAlphaChannel ) { - mpAlphaMask = o3tl::make_unique<AlphaMask>( maTargetSize ); + mpAlphaMask = std::make_unique<AlphaMask>( maTargetSize ); mpAlphaMask->Erase( 128 ); mxAlphaAcc = AlphaScopedWriteAccess(*mpAlphaMask); mpMaskAcc = mxAlphaAcc.get(); @@ -791,13 +790,13 @@ bool PNGReaderImpl::ImplReadTransparent() { if( bNeedAlpha) { - mpAlphaMask = o3tl::make_unique<AlphaMask>( maTargetSize ); + mpAlphaMask = std::make_unique<AlphaMask>( maTargetSize ); mxAlphaAcc = AlphaScopedWriteAccess(*mpAlphaMask); mpMaskAcc = mxAlphaAcc.get(); } else { - mpMaskBmp = o3tl::make_unique<Bitmap>( maTargetSize, 1 ); + mpMaskBmp = std::make_unique<Bitmap>( maTargetSize, 1 ); mxMaskAcc = BitmapScopedWriteAccess(*mpMaskBmp); mpMaskAcc = mxMaskAcc.get(); } diff --git a/vcl/source/gdi/region.cxx b/vcl/source/gdi/region.cxx index ce963a977dbc..ff2fbfdf0580 100644 --- a/vcl/source/gdi/region.cxx +++ b/vcl/source/gdi/region.cxx @@ -35,7 +35,6 @@ #include <basegfx/range/b2drange.hxx> #include <basegfx/matrix/b2dhommatrixtools.hxx> #include <tools/poly.hxx> -#include <o3tl/make_unique.hxx> namespace { @@ -92,7 +91,7 @@ namespace OSL_ASSERT(ImplIsPolygonRectilinear (rPolyPoly)); // Create a new RegionBand object as container of the bands. - std::unique_ptr<RegionBand> pRegionBand( o3tl::make_unique<RegionBand>() ); + std::unique_ptr<RegionBand> pRegionBand( std::make_unique<RegionBand>() ); long nLineId = 0; // Iterate over all polygons. @@ -190,7 +189,7 @@ namespace long nLineID = 0; // initialisation and creation of Bands - std::unique_ptr<RegionBand> pRegionBand( o3tl::make_unique<RegionBand>() ); + std::unique_ptr<RegionBand> pRegionBand( std::make_unique<RegionBand>() ); pRegionBand->CreateBandRange(rPolygonBoundingBox.Top(), rPolygonBoundingBox.Bottom()); // insert polygons @@ -565,7 +564,7 @@ void vcl::Region::Union( const tools::Rectangle& rRect ) return; } - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // get justified rectangle const long nLeft(std::min(rRect.Left(), rRect.Right())); @@ -656,7 +655,7 @@ void vcl::Region::Intersect( const tools::Rectangle& rRect ) return; } - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // get justified rectangle const long nLeft(std::min(rRect.Left(), rRect.Right())); @@ -735,7 +734,7 @@ void vcl::Region::Exclude( const tools::Rectangle& rRect ) return; } - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // get justified rectangle const long nLeft(std::min(rRect.Left(), rRect.Right())); @@ -818,7 +817,7 @@ void vcl::Region::XOr( const tools::Rectangle& rRect ) } // only region band mode possibility left here or null/empty - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*getRegionBand())); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*getRegionBand())); // get justified rectangle const long nLeft(std::min(rRect.Left(), rRect.Right())); @@ -913,7 +912,7 @@ void vcl::Region::Union( const vcl::Region& rRegion ) } // prepare source and target - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // union with source pNew->Union(*pSource); @@ -1031,7 +1030,7 @@ void vcl::Region::Intersect( const vcl::Region& rRegion ) else { // prepare new regionBand - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // intersect with source pNew->Intersect(*pSource); @@ -1115,7 +1114,7 @@ void vcl::Region::Exclude( const vcl::Region& rRegion ) } // prepare source and target - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // union with source const bool bSuccess(pNew->Exclude(*pSource)); @@ -1202,7 +1201,7 @@ bool vcl::Region::XOr( const vcl::Region& rRegion ) } // prepare source and target - std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent)); + std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent)); // union with source pNew->XOr(*pSource); diff --git a/vcl/source/gdi/svmconverter.cxx b/vcl/source/gdi/svmconverter.cxx index c1d40686a50a..defa1b650888 100644 --- a/vcl/source/gdi/svmconverter.cxx +++ b/vcl/source/gdi/svmconverter.cxx @@ -35,7 +35,6 @@ #include <svmconverter.hxx> #include <memory> -#include <o3tl/make_unique.hxx> // Inlines static void ImplReadRect( SvStream& rIStm, tools::Rectangle& rRect ) @@ -994,7 +993,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf ) case GDI_PUSH_ACTION: { - aLIStack.push(o3tl::make_unique<LineInfo>(aLineInfo)); + aLIStack.push(std::make_unique<LineInfo>(aLineInfo)); rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) ); // #106172# Track font relevant data in shadow VDev diff --git a/vcl/source/gdi/wall.cxx b/vcl/source/gdi/wall.cxx index 3045dfe50a9c..6c127b910944 100644 --- a/vcl/source/gdi/wall.cxx +++ b/vcl/source/gdi/wall.cxx @@ -26,7 +26,6 @@ #include <wall2.hxx> #include <vcl/dibtools.hxx> #include <vcl/settings.hxx> -#include <o3tl/make_unique.hxx> ImplWallpaper::ImplWallpaper() : maColor( COL_TRANSPARENT ), meStyle( WallpaperStyle::NONE ) @@ -37,13 +36,13 @@ ImplWallpaper::ImplWallpaper( const ImplWallpaper& rImplWallpaper ) : maColor( rImplWallpaper.maColor ), meStyle(rImplWallpaper.meStyle) { if ( rImplWallpaper.mpBitmap ) - mpBitmap = o3tl::make_unique<BitmapEx>( *rImplWallpaper.mpBitmap ); + mpBitmap = std::make_unique<BitmapEx>( *rImplWallpaper.mpBitmap ); if( rImplWallpaper.mpCache ) - mpCache = o3tl::make_unique<BitmapEx>( *rImplWallpaper.mpCache ); + mpCache = std::make_unique<BitmapEx>( *rImplWallpaper.mpCache ); if ( rImplWallpaper.mpGradient ) - mpGradient = o3tl::make_unique<Gradient>( *rImplWallpaper.mpGradient ); + mpGradient = std::make_unique<Gradient>( *rImplWallpaper.mpGradient ); if ( rImplWallpaper.mpRect ) mpRect = *rImplWallpaper.mpRect; @@ -82,13 +81,13 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper ) if( bGrad ) { - rImplWallpaper.mpGradient = o3tl::make_unique<Gradient>(); + rImplWallpaper.mpGradient = std::make_unique<Gradient>(); ReadGradient( rIStm, *rImplWallpaper.mpGradient ); } if( bBmp ) { - rImplWallpaper.mpBitmap = o3tl::make_unique<BitmapEx>(); + rImplWallpaper.mpBitmap = std::make_unique<BitmapEx>(); ReadDIBBitmapEx(*rImplWallpaper.mpBitmap, rIStm); } @@ -154,13 +153,13 @@ Wallpaper::Wallpaper( const Color& rColor ) : mpImplWallpaper() Wallpaper::Wallpaper( const BitmapEx& rBmpEx ) : mpImplWallpaper() { - mpImplWallpaper->mpBitmap = o3tl::make_unique<BitmapEx>( rBmpEx ); + mpImplWallpaper->mpBitmap = std::make_unique<BitmapEx>( rBmpEx ); mpImplWallpaper->meStyle = WallpaperStyle::Tile; } Wallpaper::Wallpaper( const Gradient& rGradient ) : mpImplWallpaper() { - mpImplWallpaper->mpGradient = o3tl::make_unique<Gradient>( rGradient ); + mpImplWallpaper->mpGradient = std::make_unique<Gradient>( rGradient ); mpImplWallpaper->meStyle = WallpaperStyle::Tile; } @@ -169,7 +168,7 @@ Wallpaper::~Wallpaper() = default; void Wallpaper::ImplSetCachedBitmap( BitmapEx& rBmp ) const { if( !mpImplWallpaper->mpCache ) - const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = o3tl::make_unique<BitmapEx>( rBmp ); + const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = std::make_unique<BitmapEx>( rBmp ); else *const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = rBmp; } @@ -229,7 +228,7 @@ void Wallpaper::SetBitmap( const BitmapEx& rBitmap ) if ( mpImplWallpaper->mpBitmap ) *(mpImplWallpaper->mpBitmap) = rBitmap; else - mpImplWallpaper->mpBitmap = o3tl::make_unique<BitmapEx>( rBitmap ); + mpImplWallpaper->mpBitmap = std::make_unique<BitmapEx>( rBitmap ); } if( WallpaperStyle::NONE == mpImplWallpaper->meStyle || WallpaperStyle::ApplicationGradient == mpImplWallpaper->meStyle) @@ -256,7 +255,7 @@ void Wallpaper::SetGradient( const Gradient& rGradient ) if ( mpImplWallpaper->mpGradient ) *(mpImplWallpaper->mpGradient) = rGradient; else - mpImplWallpaper->mpGradient = o3tl::make_unique<Gradient>( rGradient ); + mpImplWallpaper->mpGradient = std::make_unique<Gradient>( rGradient ); if( WallpaperStyle::NONE == mpImplWallpaper->meStyle || WallpaperStyle::ApplicationGradient == mpImplWallpaper->meStyle ) mpImplWallpaper->meStyle = WallpaperStyle::Tile; diff --git a/vcl/source/graphic/Manager.cxx b/vcl/source/graphic/Manager.cxx index c5408a62bce0..405aa8928649 100644 --- a/vcl/source/graphic/Manager.cxx +++ b/vcl/source/graphic/Manager.cxx @@ -20,7 +20,6 @@ #include <graphic/Manager.hxx> #include <impgraph.hxx> #include <vcl/lazydelete.hxx> -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> using namespace css; diff --git a/vcl/source/treelist/svtabbx.cxx b/vcl/source/treelist/svtabbx.cxx index 993ccc2c2580..5b026ffbf195 100644 --- a/vcl/source/treelist/svtabbx.cxx +++ b/vcl/source/treelist/svtabbx.cxx @@ -27,7 +27,6 @@ #include <unotools/accessiblestatesethelper.hxx> #include <com/sun/star/accessibility/AccessibleStateType.hpp> #include <com/sun/star/accessibility/AccessibleEventId.hpp> -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> #include <strings.hrc> @@ -89,7 +88,7 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ ) { const OUString aToken = GetToken(aCurEntry, nIndex); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(aToken)); + pEntry->AddItem(std::make_unique<SvLBoxString>(aToken)); } } diff --git a/vcl/source/treelist/treelist.cxx b/vcl/source/treelist/treelist.cxx index 00a437e19f81..d62db0dccb49 100644 --- a/vcl/source/treelist/treelist.cxx +++ b/vcl/source/treelist/treelist.cxx @@ -22,7 +22,6 @@ #include <vcl/viewdataentry.hxx> #include <tools/debug.hxx> #include <osl/diagnose.h> -#include <o3tl/make_unique.hxx> #include <memory> #include <map> @@ -1123,7 +1122,7 @@ void SvListView::Impl::InitTable() pEntry = m_rThis.pModel->First(); while( pEntry ) { - pViewData = o3tl::make_unique<SvViewDataEntry>(); + pViewData = std::make_unique<SvViewDataEntry>(); m_rThis.InitViewData( pViewData.get(), pEntry ); m_DataTable.insert(std::make_pair(pEntry, std::move(pViewData))); pEntry = m_rThis.pModel->Next( pEntry ); diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index d992e7a68fd2..b069d1d0ea12 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -48,7 +48,7 @@ #include <set> #include <string.h> #include <vector> -#include <o3tl/make_unique.hxx> + using namespace css::accessibility; // Drag&Drop @@ -1532,12 +1532,12 @@ void SvTreeListBox::InitEntry(SvTreeListEntry* pEntry, { if( nTreeFlags & SvTreeFlags::CHKBTN ) { - pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(eButtonKind, pCheckButtonData)); + pEntry->AddItem(std::make_unique<SvLBoxButton>(eButtonKind, pCheckButtonData)); } - pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded)); + pEntry->AddItem(std::make_unique<SvLBoxContextBmp>( aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded)); - pEntry->AddItem(o3tl::make_unique<SvLBoxString>(aStr)); + pEntry->AddItem(std::make_unique<SvLBoxString>(aStr)); } OUString SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const diff --git a/vcl/source/uitest/uno/uiobject_uno.cxx b/vcl/source/uitest/uno/uiobject_uno.cxx index 54368cf3fab3..7406ca6da9af 100644 --- a/vcl/source/uitest/uno/uiobject_uno.cxx +++ b/vcl/source/uitest/uno/uiobject_uno.cxx @@ -10,7 +10,6 @@ #include <memory> #include "uiobject_uno.hxx" #include <utility> -#include <o3tl/make_unique.hxx> #include <vcl/svapp.hxx> #include <vcl/idle.hxx> #include <vcl/scheduler.hxx> @@ -108,7 +107,7 @@ void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction, const css:: mAction = rAction; mPropValues = rPropValues; mReady = false; - auto aIdle = o3tl::make_unique<Idle>(); + auto aIdle = std::make_unique<Idle>(); aIdle->SetDebugName("UI Test Idle Handler"); aIdle->SetPriority(TaskPriority::HIGHEST); diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index b2c688cee952..0b0a80dc2ea5 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -60,7 +60,6 @@ #include <strings.hrc> #include <tools/svlibrary.h> #include <tools/diagnose_ex.h> -#include <o3tl/make_unique.hxx> #ifdef DISABLE_DYNLOADING #include <dlfcn.h> @@ -3493,7 +3492,7 @@ template<typename T> static bool insertItems(vcl::Window *pWindow, VclBuilder::s sal_Int32 nPos = pContainer->InsertEntry(item.m_sItem); if (!item.m_sId.isEmpty()) { - rUserData.emplace_back(o3tl::make_unique<OUString>(OUString::fromUtf8(item.m_sId))); + rUserData.emplace_back(std::make_unique<OUString>(OUString::fromUtf8(item.m_sId))); pContainer->SetEntryData(nPos, rUserData.back().get()); } } @@ -4142,7 +4141,7 @@ void VclBuilder::mungeModel(ComboBox &rTarget, const ListStore &rStore, sal_uInt { if (!rRow[1].isEmpty()) { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(rRow[1])); + m_aUserData.emplace_back(std::make_unique<OUString>(rRow[1])); rTarget.SetEntryData(nEntry, m_aUserData.back().get()); } } @@ -4169,7 +4168,7 @@ void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt1 { if (!rRow[1].isEmpty()) { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(rRow[1])); + m_aUserData.emplace_back(std::make_unique<OUString>(rRow[1])); rTarget.SetEntryData(nEntry, m_aUserData.back().get()); } } @@ -4196,7 +4195,7 @@ void VclBuilder::mungeModel(SvTabListBox& rTarget, const ListStore &rStore, sal_ { if (!rRow[1].isEmpty()) { - m_aUserData.emplace_back(o3tl::make_unique<OUString>(rRow[1])); + m_aUserData.emplace_back(std::make_unique<OUString>(rRow[1])); pEntry->SetUserData(m_aUserData.back().get()); } } diff --git a/vcl/source/window/errinf.cxx b/vcl/source/window/errinf.cxx index 036c763a8da0..bdc5aa16c6c6 100644 --- a/vcl/source/window/errinf.cxx +++ b/vcl/source/window/errinf.cxx @@ -24,7 +24,6 @@ #include <tools/debug.hxx> #include <vcl/errinf.hxx> #include <vcl/window.hxx> -#include <o3tl/make_unique.hxx> #include <vector> #include <limits.h> @@ -264,7 +263,7 @@ std::unique_ptr<ErrorInfo> ImplDynamicErrorInfo::GetDynamicErrorInfo(ErrCode nId if(pDynErrInfo && ErrCode(*pDynErrInfo)==nId) return std::unique_ptr<ErrorInfo>(pDynErrInfo); else - return o3tl::make_unique<ErrorInfo>(nId.StripDynamic()); + return std::make_unique<ErrorInfo>(nId.StripDynamic()); } std::unique_ptr<ErrorInfo> ErrorInfo::GetErrorInfo(ErrCode nId) @@ -272,7 +271,7 @@ std::unique_ptr<ErrorInfo> ErrorInfo::GetErrorInfo(ErrCode nId) if(nId.IsDynamic()) return ImplDynamicErrorInfo::GetDynamicErrorInfo(nId); else - return o3tl::make_unique<ErrorInfo>(nId); + return std::make_unique<ErrorInfo>(nId); } ErrorInfo::~ErrorInfo() diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx index 2fa82c352cda..872f15405e31 100644 --- a/vcl/unx/generic/app/salinst.cxx +++ b/vcl/unx/generic/app/salinst.cxx @@ -35,7 +35,6 @@ #include <unx/helper.hxx> #include <vcl/inputtypes.hxx> -#include <o3tl/make_unique.hxx> #include <salwtype.hxx> #include <sal/macros.h> @@ -55,7 +54,7 @@ extern "C" if( ! ( pNoXInitThreads && *pNoXInitThreads ) ) XInitThreads(); - X11SalInstance* pInstance = new X11SalInstance( o3tl::make_unique<SalYieldMutex>() ); + X11SalInstance* pInstance = new X11SalInstance( std::make_unique<SalYieldMutex>() ); // initialize SalData X11SalData *pSalData = new X11SalData( SAL_DATA_UNX, pInstance ); diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx index 30ec4d19f7e0..2c368e6a765e 100644 --- a/vcl/unx/generic/gdi/cairotextrender.cxx +++ b/vcl/unx/generic/gdi/cairotextrender.cxx @@ -40,7 +40,6 @@ #include <cairo.h> #include <cairo-ft.h> #include <sallayout.hxx> -#include <o3tl/make_unique.hxx> namespace { @@ -447,7 +446,7 @@ std::unique_ptr<GenericSalLayout> CairoTextRender::GetTextLayout(int nFallbackLe assert(mpFreetypeFont[nFallbackLevel]); if (!mpFreetypeFont[nFallbackLevel]) return nullptr; - return o3tl::make_unique<GenericSalLayout>(*mpFreetypeFont[nFallbackLevel]->GetFontInstance()); + return std::make_unique<GenericSalLayout>(*mpFreetypeFont[nFallbackLevel]->GetFontInstance()); } #if ENABLE_CAIRO_CANVAS diff --git a/vcl/unx/generic/gdi/salvd.cxx b/vcl/unx/generic/gdi/salvd.cxx index 46e0fcbdf7f0..a162a694f818 100644 --- a/vcl/unx/generic/gdi/salvd.cxx +++ b/vcl/unx/generic/gdi/salvd.cxx @@ -32,7 +32,6 @@ #include <salinst.hxx> -#include <o3tl/make_unique.hxx> #include <vcl/opengl/OpenGLHelper.hxx> #include <opengl/x11/salvd.hxx> @@ -50,7 +49,7 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(SalGrap std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphics* pGraphics, long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData) { - return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, o3tl::make_unique<X11SalGraphics>()); + return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, std::make_unique<X11SalGraphics>()); } void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap, diff --git a/vcl/unx/generic/print/genpspgraphics.cxx b/vcl/unx/generic/print/genpspgraphics.cxx index 59f62c00c57a..2ca4426d7034 100644 --- a/vcl/unx/generic/print/genpspgraphics.cxx +++ b/vcl/unx/generic/print/genpspgraphics.cxx @@ -55,7 +55,6 @@ #include <salbmp.hxx> #include <salprn.hxx> #include <sallayout.hxx> -#include <o3tl/make_unique.hxx> using namespace psp; @@ -738,7 +737,7 @@ std::unique_ptr<GenericSalLayout> GenPspGraphics::GetTextLayout(int nFallbackLev assert(m_pFreetypeFont[nFallbackLevel]); if (!m_pFreetypeFont[nFallbackLevel]) return nullptr; - return o3tl::make_unique<PspSalLayout>(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel]); + return std::make_unique<PspSalLayout>(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel]); } bool GenPspGraphics::CreateFontSubset( diff --git a/vcl/unx/gtk/gtkinst.cxx b/vcl/unx/gtk/gtkinst.cxx index feac1816ddd2..f02ab9609014 100644 --- a/vcl/unx/gtk/gtkinst.cxx +++ b/vcl/unx/gtk/gtkinst.cxx @@ -37,7 +37,6 @@ #include <rtl/strbuf.hxx> #include <sal/log.hxx> #include <rtl/uri.hxx> -#include <o3tl/make_unique.hxx> #include <vcl/settings.hxx> @@ -110,7 +109,7 @@ extern "C" gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave); SAL_INFO("vcl.gtk", "Hooked gdk threads locks"); - auto pYieldMutex = o3tl::make_unique<GtkYieldMutex>(); + auto pYieldMutex = std::make_unique<GtkYieldMutex>(); gdk_threads_init(); @@ -347,7 +346,7 @@ std::unique_ptr<SalVirtualDevice> GtkInstance::CreateVirtualDevice( SalGraphics GtkSalGraphics *pGtkSalGraphics = dynamic_cast<GtkSalGraphics*>(pG); assert(pGtkSalGraphics); return CreateX11VirtualDevice(pG, nDX, nDY, eFormat, pGd, - o3tl::make_unique<GtkSalGraphics>(pGtkSalGraphics->GetGtkFrame(), + std::make_unique<GtkSalGraphics>(pGtkSalGraphics->GetGtkFrame(), pGtkSalGraphics->GetGtkWidget(), pGtkSalGraphics->GetScreenNumber())); #endif diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index ac8f05a65776..48387790daf6 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -7969,7 +7969,7 @@ public: if (!pMessageDialog) return nullptr; gtk_window_set_transient_for(GTK_WINDOW(pMessageDialog), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget))); - return o3tl::make_unique<GtkInstanceMessageDialog>(pMessageDialog, bTakeOwnership); + return std::make_unique<GtkInstanceMessageDialog>(pMessageDialog, bTakeOwnership); } virtual std::unique_ptr<weld::Dialog> weld_dialog(const OString &id, bool bTakeOwnership) override @@ -7979,13 +7979,13 @@ public: return nullptr; if (m_pParentWidget) gtk_window_set_transient_for(GTK_WINDOW(pDialog), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget))); - return o3tl::make_unique<GtkInstanceDialog>(pDialog, bTakeOwnership); + return std::make_unique<GtkInstanceDialog>(pDialog, bTakeOwnership); } virtual std::unique_ptr<weld::Window> weld_window(const OString &id, bool bTakeOwnership) override { GtkWindow* pWindow = GTK_WINDOW(gtk_builder_get_object(m_pBuilder, id.getStr())); - return pWindow ? o3tl::make_unique<GtkInstanceWindow>(pWindow, bTakeOwnership) : nullptr; + return pWindow ? std::make_unique<GtkInstanceWindow>(pWindow, bTakeOwnership) : nullptr; } virtual std::unique_ptr<weld::Widget> weld_widget(const OString &id, bool bTakeOwnership) override @@ -7994,7 +7994,7 @@ public: if (!pWidget) return nullptr; auto_add_parentless_widgets_to_container(pWidget); - return o3tl::make_unique<GtkInstanceWidget>(pWidget, bTakeOwnership); + return std::make_unique<GtkInstanceWidget>(pWidget, bTakeOwnership); } virtual std::unique_ptr<weld::Container> weld_container(const OString &id, bool bTakeOwnership) override @@ -8003,7 +8003,7 @@ public: if (!pContainer) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pContainer)); - return o3tl::make_unique<GtkInstanceContainer>(pContainer, bTakeOwnership); + return std::make_unique<GtkInstanceContainer>(pContainer, bTakeOwnership); } virtual std::unique_ptr<weld::Frame> weld_frame(const OString &id, bool bTakeOwnership) override @@ -8012,7 +8012,7 @@ public: if (!pFrame) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pFrame)); - return o3tl::make_unique<GtkInstanceFrame>(pFrame, bTakeOwnership); + return std::make_unique<GtkInstanceFrame>(pFrame, bTakeOwnership); } virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString &id, bool bTakeOwnership) override @@ -8021,7 +8021,7 @@ public: if (!pScrolledWindow) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pScrolledWindow)); - return o3tl::make_unique<GtkInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership); + return std::make_unique<GtkInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership); } virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString &id, bool bTakeOwnership) override @@ -8030,7 +8030,7 @@ public: if (!pNotebook) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pNotebook)); - return o3tl::make_unique<GtkInstanceNotebook>(pNotebook, bTakeOwnership); + return std::make_unique<GtkInstanceNotebook>(pNotebook, bTakeOwnership); } virtual std::unique_ptr<weld::Button> weld_button(const OString &id, bool bTakeOwnership) override @@ -8039,7 +8039,7 @@ public: if (!pButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pButton)); - return o3tl::make_unique<GtkInstanceButton>(pButton, bTakeOwnership); + return std::make_unique<GtkInstanceButton>(pButton, bTakeOwnership); } virtual std::unique_ptr<weld::MenuButton> weld_menu_button(const OString &id, bool bTakeOwnership) override @@ -8048,7 +8048,7 @@ public: if (!pButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pButton)); - return o3tl::make_unique<GtkInstanceMenuButton>(pButton, bTakeOwnership); + return std::make_unique<GtkInstanceMenuButton>(pButton, bTakeOwnership); } virtual std::unique_ptr<weld::ToggleButton> weld_toggle_button(const OString &id, bool bTakeOwnership) override @@ -8057,7 +8057,7 @@ public: if (!pToggleButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pToggleButton)); - return o3tl::make_unique<GtkInstanceToggleButton>(pToggleButton, bTakeOwnership); + return std::make_unique<GtkInstanceToggleButton>(pToggleButton, bTakeOwnership); } virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OString &id, bool bTakeOwnership) override @@ -8066,7 +8066,7 @@ public: if (!pRadioButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pRadioButton)); - return o3tl::make_unique<GtkInstanceRadioButton>(pRadioButton, bTakeOwnership); + return std::make_unique<GtkInstanceRadioButton>(pRadioButton, bTakeOwnership); } virtual std::unique_ptr<weld::CheckButton> weld_check_button(const OString &id, bool bTakeOwnership) override @@ -8075,7 +8075,7 @@ public: if (!pCheckButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pCheckButton)); - return o3tl::make_unique<GtkInstanceCheckButton>(pCheckButton, bTakeOwnership); + return std::make_unique<GtkInstanceCheckButton>(pCheckButton, bTakeOwnership); } virtual std::unique_ptr<weld::Scale> weld_scale(const OString &id, bool bTakeOwnership) override @@ -8084,7 +8084,7 @@ public: if (!pScale) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pScale)); - return o3tl::make_unique<GtkInstanceScale>(pScale, bTakeOwnership); + return std::make_unique<GtkInstanceScale>(pScale, bTakeOwnership); } virtual std::unique_ptr<weld::ProgressBar> weld_progress_bar(const OString &id, bool bTakeOwnership) override @@ -8093,7 +8093,7 @@ public: if (!pProgressBar) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pProgressBar)); - return o3tl::make_unique<GtkInstanceProgressBar>(pProgressBar, bTakeOwnership); + return std::make_unique<GtkInstanceProgressBar>(pProgressBar, bTakeOwnership); } virtual std::unique_ptr<weld::Image> weld_image(const OString &id, bool bTakeOwnership) override @@ -8102,7 +8102,7 @@ public: if (!pImage) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pImage)); - return o3tl::make_unique<GtkInstanceImage>(pImage, bTakeOwnership); + return std::make_unique<GtkInstanceImage>(pImage, bTakeOwnership); } virtual std::unique_ptr<weld::Entry> weld_entry(const OString &id, bool bTakeOwnership) override @@ -8111,7 +8111,7 @@ public: if (!pEntry) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pEntry)); - return o3tl::make_unique<GtkInstanceEntry>(pEntry, bTakeOwnership); + return std::make_unique<GtkInstanceEntry>(pEntry, bTakeOwnership); } virtual std::unique_ptr<weld::SpinButton> weld_spin_button(const OString &id, bool bTakeOwnership) override @@ -8120,13 +8120,13 @@ public: if (!pSpinButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pSpinButton)); - return o3tl::make_unique<GtkInstanceSpinButton>(pSpinButton, bTakeOwnership); + return std::make_unique<GtkInstanceSpinButton>(pSpinButton, bTakeOwnership); } virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit, bool bTakeOwnership) override { - return o3tl::make_unique<weld::MetricSpinButton>(weld_spin_button(id, bTakeOwnership), eUnit); + return std::make_unique<weld::MetricSpinButton>(weld_spin_button(id, bTakeOwnership), eUnit); } virtual std::unique_ptr<weld::FormattedSpinButton> weld_formatted_spin_button(const OString &id, bool bTakeOwnership) override @@ -8135,13 +8135,13 @@ public: if (!pSpinButton) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pSpinButton)); - return o3tl::make_unique<GtkInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership); + return std::make_unique<GtkInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership); } virtual std::unique_ptr<weld::TimeSpinButton> weld_time_spin_button(const OString& id, TimeFieldFormat eFormat, bool bTakeOwnership) override { - return o3tl::make_unique<weld::TimeSpinButton>(weld_spin_button(id, bTakeOwnership), eFormat); + return std::make_unique<weld::TimeSpinButton>(weld_spin_button(id, bTakeOwnership), eFormat); } virtual std::unique_ptr<weld::ComboBox> weld_combo_box(const OString &id, bool bTakeOwnership) override @@ -8150,7 +8150,7 @@ public: if (!pComboBox) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pComboBox)); - return o3tl::make_unique<GtkInstanceComboBox>(pComboBox, bTakeOwnership); + return std::make_unique<GtkInstanceComboBox>(pComboBox, bTakeOwnership); } virtual std::unique_ptr<weld::TreeView> weld_tree_view(const OString &id, bool bTakeOwnership) override @@ -8159,7 +8159,7 @@ public: if (!pTreeView) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pTreeView)); - return o3tl::make_unique<GtkInstanceTreeView>(pTreeView, bTakeOwnership); + return std::make_unique<GtkInstanceTreeView>(pTreeView, bTakeOwnership); } virtual std::unique_ptr<weld::EntryTreeView> weld_entry_tree_view(const OString& containerid, const OString& entryid, const OString& treeviewid, bool bTakeOwnership) override @@ -8168,7 +8168,7 @@ public: if (!pContainer) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pContainer)); - return o3tl::make_unique<GtkInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership), weld_tree_view(treeviewid, bTakeOwnership)); + return std::make_unique<GtkInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership), weld_tree_view(treeviewid, bTakeOwnership)); } virtual std::unique_ptr<weld::Label> weld_label(const OString &id, bool bTakeOwnership) override @@ -8177,7 +8177,7 @@ public: if (!pLabel) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pLabel)); - return o3tl::make_unique<GtkInstanceLabel>(pLabel, bTakeOwnership); + return std::make_unique<GtkInstanceLabel>(pLabel, bTakeOwnership); } virtual std::unique_ptr<weld::TextView> weld_text_view(const OString &id, bool bTakeOwnership) override @@ -8186,7 +8186,7 @@ public: if (!pTextView) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pTextView)); - return o3tl::make_unique<GtkInstanceTextView>(pTextView, bTakeOwnership); + return std::make_unique<GtkInstanceTextView>(pTextView, bTakeOwnership); } virtual std::unique_ptr<weld::Expander> weld_expander(const OString &id, bool bTakeOwnership) override @@ -8195,7 +8195,7 @@ public: if (!pExpander) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pExpander)); - return o3tl::make_unique<GtkInstanceExpander>(pExpander, bTakeOwnership); + return std::make_unique<GtkInstanceExpander>(pExpander, bTakeOwnership); } virtual std::unique_ptr<weld::DrawingArea> weld_drawing_area(const OString &id, const a11yref& rA11y, @@ -8205,7 +8205,7 @@ public: if (!pDrawingArea) return nullptr; auto_add_parentless_widgets_to_container(GTK_WIDGET(pDrawingArea)); - return o3tl::make_unique<GtkInstanceDrawingArea>(pDrawingArea, rA11y, bTakeOwnership); + return std::make_unique<GtkInstanceDrawingArea>(pDrawingArea, rA11y, bTakeOwnership); } virtual std::unique_ptr<weld::Menu> weld_menu(const OString &id, bool bTakeOwnership) override @@ -8213,12 +8213,12 @@ public: GtkMenu* pMenu = GTK_MENU(gtk_builder_get_object(m_pBuilder, id.getStr())); if (!pMenu) return nullptr; - return o3tl::make_unique<GtkInstanceMenu>(pMenu, bTakeOwnership); + return std::make_unique<GtkInstanceMenu>(pMenu, bTakeOwnership); } virtual std::unique_ptr<weld::SizeGroup> create_size_group() override { - return o3tl::make_unique<GtkInstanceSizeGroup>(); + return std::make_unique<GtkInstanceSizeGroup>(); } }; diff --git a/vcl/unx/kde5/KDE5SalInstance.cxx b/vcl/unx/kde5/KDE5SalInstance.cxx index 209485db0cb2..6c5bc9341705 100644 --- a/vcl/unx/kde5/KDE5SalInstance.cxx +++ b/vcl/unx/kde5/KDE5SalInstance.cxx @@ -27,7 +27,6 @@ #include <QtGui/QClipboard> #include <QtWidgets/QFrame> -#include <o3tl/make_unique.hxx> #include <osl/process.h> #include <sal/log.hxx> diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx index 9a7a41f0d5db..b754dd35d362 100644 --- a/vcl/win/app/salinst.cxx +++ b/vcl/win/app/salinst.cxx @@ -28,7 +28,6 @@ #include <tools/time.hxx> #include <comphelper/solarmutex.hxx> #include <o3tl/char16_t2wchar_t.hxx> -#include <o3tl/make_unique.hxx> #include <vcl/inputtypes.hxx> #include <vcl/opengl/OpenGLHelper.hxx> @@ -389,7 +388,7 @@ VCLPLUG_WIN_PUBLIC SalInstance* create_SalInstance() } WinSalInstance::WinSalInstance() - : SalInstance(o3tl::make_unique<SalYieldMutex>()) + : SalInstance(std::make_unique<SalYieldMutex>()) , mhInst( nullptr ) , mhComWnd( nullptr ) , m_nNoYieldLock( 0 ) diff --git a/vcl/win/gdi/winlayout.cxx b/vcl/win/gdi/winlayout.cxx index 9b63fc583516..9be60fcac64e 100644 --- a/vcl/win/gdi/winlayout.cxx +++ b/vcl/win/gdi/winlayout.cxx @@ -24,7 +24,6 @@ #include <comphelper/windowserrorstring.hxx> #include <comphelper/scopeguard.hxx> -#include <o3tl/make_unique.hxx> #include <opengl/texture.hxx> #include <opengl/win/gdiimpl.hxx> @@ -295,7 +294,7 @@ std::unique_ptr<GenericSalLayout> WinSalGraphics::GetTextLayout(int nFallbackLev assert(mpWinFontEntry[nFallbackLevel]->GetFontFace()); mpWinFontEntry[nFallbackLevel]->SetGraphics(this); - return o3tl::make_unique<GenericSalLayout>(*mpWinFontEntry[nFallbackLevel]); + return std::make_unique<GenericSalLayout>(*mpWinFontEntry[nFallbackLevel]); } WinFontInstance::WinFontInstance(const WinFontFace& rPFF, const FontSelectPattern& rFSP) diff --git a/writerperfect/qa/unit/DirectoryStreamTest.cxx b/writerperfect/qa/unit/DirectoryStreamTest.cxx index 7c48e49b48e4..8d8388dc3c0d 100644 --- a/writerperfect/qa/unit/DirectoryStreamTest.cxx +++ b/writerperfect/qa/unit/DirectoryStreamTest.cxx @@ -13,8 +13,6 @@ #include <comphelper/processfactory.hxx> -#include <o3tl/make_unique.hxx> - #include <ucbhelper/content.hxx> #include <test/bootstrapfixture.hxx> diff --git a/writerperfect/source/common/DirectoryStream.cxx b/writerperfect/source/common/DirectoryStream.cxx index 7f3e1b165da6..d6d39143ecdd 100644 --- a/writerperfect/source/common/DirectoryStream.cxx +++ b/writerperfect/source/common/DirectoryStream.cxx @@ -33,8 +33,6 @@ #include <comphelper/processfactory.hxx> -#include <o3tl/make_unique.hxx> - #include <rtl/ustring.hxx> #include <ucbhelper/content.hxx> @@ -145,7 +143,7 @@ DirectoryStream::createForParent(const css::uno::Reference<css::ucb::XContent>& const uno::Reference<ucb::XContent> xDirContent(xChild->getParent(), uno::UNO_QUERY); if (xDirContent.is()) { - pDir = o3tl::make_unique<DirectoryStream>(xDirContent); + pDir = std::make_unique<DirectoryStream>(xDirContent); if (!pDir->isStructured()) pDir.reset(); } diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx index 8a2696557dea..d64ea70f5bc9 100644 --- a/xmlhelp/source/cxxhelp/provider/content.cxx +++ b/xmlhelp/source/cxxhelp/provider/content.cxx @@ -39,7 +39,6 @@ #include <ucbhelper/propertyvalueset.hxx> #include <ucbhelper/cancelcommandexecution.hxx> #include <ucbhelper/macros.hxx> -#include <o3tl/make_unique.hxx> #include "content.hxx" #include "provider.hxx" #include "resultset.hxx" @@ -291,7 +290,7 @@ uno::Any SAL_CALL Content::execute( = new DynamicResultSet( m_xContext, aOpenCommand, - o3tl::make_unique<ResultSetForRootFactory>( + std::make_unique<ResultSetForRootFactory>( m_xContext, m_xProvider.get(), aOpenCommand.Properties, @@ -305,7 +304,7 @@ uno::Any SAL_CALL Content::execute( = new DynamicResultSet( m_xContext, aOpenCommand, - o3tl::make_unique<ResultSetForQueryFactory>( + std::make_unique<ResultSetForQueryFactory>( m_xContext, m_xProvider.get(), aOpenCommand.Properties, diff --git a/xmloff/inc/pch/precompiled_xo.hxx b/xmloff/inc/pch/precompiled_xo.hxx index a7e21d470ec5..c1867abf1e86 100644 --- a/xmloff/inc/pch/precompiled_xo.hxx +++ b/xmloff/inc/pch/precompiled_xo.hxx @@ -163,7 +163,6 @@ #include <i18nlangtag/languagetag.hxx> #include <o3tl/any.hxx> #include <o3tl/cow_wrapper.hxx> -#include <o3tl/make_unique.hxx> #include <o3tl/strong_int.hxx> #include <o3tl/typed_flags_set.hxx> #include <sax/tools/converter.hxx> diff --git a/xmloff/source/chart/MultiPropertySetHandler.hxx b/xmloff/source/chart/MultiPropertySetHandler.hxx index 85391f89e071..0184b4e7a110 100644 --- a/xmloff/source/chart/MultiPropertySetHandler.hxx +++ b/xmloff/source/chart/MultiPropertySetHandler.hxx @@ -22,7 +22,6 @@ #include <memory> -#include <o3tl/make_unique.hxx> #include <rtl/ustring.hxx> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XMultiPropertySet.hpp> @@ -135,7 +134,7 @@ public: */ template<class T> void Add (const OUString & sName, T& rValue) { - aPropertyList[sName] = o3tl::make_unique<PropertyWrapper<T>>(sName, rValue); + aPropertyList[sName] = std::make_unique<PropertyWrapper<T>>(sName, rValue); } /** @descr Try to get the values for all properties added with the Add diff --git a/xmloff/source/chart/SchXMLImport.cxx b/xmloff/source/chart/SchXMLImport.cxx index 12aa351d8fcb..57e4e5fe05a7 100644 --- a/xmloff/source/chart/SchXMLImport.cxx +++ b/xmloff/source/chart/SchXMLImport.cxx @@ -24,7 +24,6 @@ #include "SchXMLTools.hxx" #include <facreg.hxx> -#include <o3tl/make_unique.hxx> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> #include <comphelper/processfactory.hxx> @@ -145,7 +144,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetDocElemTokenMap() XML_TOKEN_MAP_END }; - mpChartDocElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aDocElemTokenMap ); + mpChartDocElemTokenMap = std::make_unique<SvXMLTokenMap>( aDocElemTokenMap ); } // if( ! mpChartDocElemTokenMap ) return *mpChartDocElemTokenMap; @@ -166,7 +165,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetTableElemTokenMap() XML_TOKEN_MAP_END }; - mpTableElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aTableElemTokenMap ); + mpTableElemTokenMap = std::make_unique<SvXMLTokenMap>( aTableElemTokenMap ); } // if( ! mpTableElemTokenMap ) return *mpTableElemTokenMap; @@ -186,7 +185,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetChartElemTokenMap() XML_TOKEN_MAP_END }; - mpChartElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aChartElemTokenMap ); + mpChartElemTokenMap = std::make_unique<SvXMLTokenMap>( aChartElemTokenMap ); } // if( ! mpChartElemTokenMap ) return *mpChartElemTokenMap; @@ -211,7 +210,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap() XML_TOKEN_MAP_END }; - mpPlotAreaElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aPlotAreaElemTokenMap ); + mpPlotAreaElemTokenMap = std::make_unique<SvXMLTokenMap>( aPlotAreaElemTokenMap ); } // if( ! mpPlotAreaElemTokenMap ) return *mpPlotAreaElemTokenMap; @@ -232,7 +231,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesElemTokenMap() XML_TOKEN_MAP_END }; - mpSeriesElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aSeriesElemTokenMap ); + mpSeriesElemTokenMap = std::make_unique<SvXMLTokenMap>( aSeriesElemTokenMap ); } // if( ! mpSeriesElemTokenMap ) return *mpSeriesElemTokenMap; @@ -255,7 +254,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetChartAttrTokenMap() XML_TOKEN_MAP_END }; - mpChartAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aChartAttrTokenMap ); + mpChartAttrTokenMap = std::make_unique<SvXMLTokenMap>( aChartAttrTokenMap ); } // if( ! mpChartAttrTokenMap ) return *mpChartAttrTokenMap; @@ -288,7 +287,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaAttrTokenMap() XML_TOKEN_MAP_END }; - mpPlotAreaAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aPlotAreaAttrTokenMap ); + mpPlotAreaAttrTokenMap = std::make_unique<SvXMLTokenMap>( aPlotAreaAttrTokenMap ); } // if( ! mpPlotAreaAttrTokenMap ) return *mpPlotAreaAttrTokenMap; @@ -305,7 +304,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetCellAttrTokenMap() XML_TOKEN_MAP_END }; - mpCellAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aCellAttrTokenMap ); + mpCellAttrTokenMap = std::make_unique<SvXMLTokenMap>( aCellAttrTokenMap ); } // if( ! mpCellAttrTokenMap ) return *mpCellAttrTokenMap; @@ -327,7 +326,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap() XML_TOKEN_MAP_END }; - mpSeriesAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aSeriesAttrTokenMap ); + mpSeriesAttrTokenMap = std::make_unique<SvXMLTokenMap>( aSeriesAttrTokenMap ); } // if( ! mpSeriesAttrTokenMap ) return *mpSeriesAttrTokenMap; @@ -344,7 +343,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPropMappingAttrTokenMap() XML_TOKEN_MAP_END }; - mpPropMappingAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aPropMappingAttrTokenMap ); + mpPropMappingAttrTokenMap = std::make_unique<SvXMLTokenMap>( aPropMappingAttrTokenMap ); } return *mpPropMappingAttrTokenMap; @@ -364,7 +363,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetRegEquationAttrTokenMap() XML_TOKEN_MAP_END }; - mpRegEquationAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aRegressionEquationAttrTokenMap ); + mpRegEquationAttrTokenMap = std::make_unique<SvXMLTokenMap>( aRegressionEquationAttrTokenMap ); } // if( ! mpRegEquationAttrTokenMap ) return *mpRegEquationAttrTokenMap; diff --git a/xmloff/source/core/unoatrcn.cxx b/xmloff/source/core/unoatrcn.cxx index 47d3bb6e9d66..f142e8f60d39 100644 --- a/xmloff/source/core/unoatrcn.cxx +++ b/xmloff/source/core/unoatrcn.cxx @@ -21,7 +21,6 @@ #include <string.h> #include <com/sun/star/xml/AttributeData.hpp> #include <o3tl/any.hxx> -#include <o3tl/make_unique.hxx> #include <rtl/ustrbuf.hxx> #include <comphelper/servicehelper.hxx> #include <cppuhelper/supportsservice.hxx> @@ -44,7 +43,7 @@ SvUnoAttributeContainer::SvUnoAttributeContainer( std::unique_ptr<SvXMLAttrConta : mpContainer( std::move( pContainer ) ) { if( !mpContainer ) - mpContainer = o3tl::make_unique<SvXMLAttrContainerData>(); + mpContainer = std::make_unique<SvXMLAttrContainerData>(); } // container::XElementAccess diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index c5fbcc2fa4b8..3f94c56586bc 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -100,7 +100,6 @@ #include <comphelper/xmltools.hxx> #include <comphelper/graphicmimetype.hxx> -#include <o3tl/make_unique.hxx> using namespace ::osl; using namespace ::com::sun::star; @@ -2020,8 +2019,8 @@ XMLEventExport& SvXMLExport::GetEventExport() mpEventExport.reset( new XMLEventExport(*this) ); // and register standard handlers + names - mpEventExport->AddHandler("StarBasic", o3tl::make_unique<XMLStarBasicExportHandler>()); - mpEventExport->AddHandler("Script", o3tl::make_unique<XMLScriptExportHandler>()); + mpEventExport->AddHandler("StarBasic", std::make_unique<XMLStarBasicExportHandler>()); + mpEventExport->AddHandler("Script", std::make_unique<XMLScriptExportHandler>()); mpEventExport->AddTranslationTable(aStandardEventTable); } diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx index f557bcf77a7f..6913eb475ef7 100644 --- a/xmloff/source/core/xmlimp.cxx +++ b/xmloff/source/core/xmlimp.cxx @@ -66,7 +66,6 @@ #include <comphelper/storagehelper.hxx> #include <comphelper/attributelist.hxx> #include <unotools/fontcvt.hxx> -#include <o3tl/make_unique.hxx> #include <xmloff/fasttokenhandler.hxx> #include <vcl/GraphicExternalLink.hxx> @@ -381,7 +380,7 @@ void SvXMLImport::InitCtor_() msPackageProtocol = "vnd.sun.star.Package:"; if (mxNumberFormatsSupplier.is()) - mpNumImport = o3tl::make_unique<SvXMLNumFmtHelper>(mxNumberFormatsSupplier, GetComponentContext()); + mpNumImport = std::make_unique<SvXMLNumFmtHelper>(mxNumberFormatsSupplier, GetComponentContext()); if (mxModel.is() && !mxEventListener.is()) { @@ -1525,7 +1524,7 @@ ProgressBarHelper* SvXMLImport::GetProgressBarHelper() { if (!mpProgressBarHelper) { - mpProgressBarHelper = o3tl::make_unique<ProgressBarHelper>(mxStatusIndicator, false); + mpProgressBarHelper = std::make_unique<ProgressBarHelper>(mxStatusIndicator, false); if (mxImportInfo.is()) { @@ -1595,18 +1594,18 @@ XMLEventImportHelper& SvXMLImport::GetEventImport() { // construct event helper and register StarBasic handler and standard // event tables - mpEventImportHelper = o3tl::make_unique<XMLEventImportHelper>(); + mpEventImportHelper = std::make_unique<XMLEventImportHelper>(); const OUString& sStarBasic(GetXMLToken(XML_STARBASIC)); mpEventImportHelper->RegisterFactory(sStarBasic, - o3tl::make_unique<XMLStarBasicContextFactory>()); + std::make_unique<XMLStarBasicContextFactory>()); const OUString& sScript(GetXMLToken(XML_SCRIPT)); mpEventImportHelper->RegisterFactory(sScript, - o3tl::make_unique<XMLScriptContextFactory>()); + std::make_unique<XMLScriptContextFactory>()); mpEventImportHelper->AddTranslationTable(aStandardEventTable); // register StarBasic event handler with capitalized spelling mpEventImportHelper->RegisterFactory("StarBasic", - o3tl::make_unique<XMLStarBasicContextFactory>()); + std::make_unique<XMLStarBasicContextFactory>()); } return *mpEventImportHelper; @@ -1775,7 +1774,7 @@ void SvXMLImport::CreateDataStylesImport_() uno::Reference<util::XNumberFormatsSupplier> xNum = GetNumberFormatsSupplier(); if ( xNum.is() ) - mpNumImport = o3tl::make_unique<SvXMLNumFmtHelper>(xNum, GetComponentContext() ); + mpNumImport = std::make_unique<SvXMLNumFmtHelper>(xNum, GetComponentContext() ); } sal_Unicode SvXMLImport::ConvStarBatsCharToStarSymbol( sal_Unicode c ) @@ -1828,7 +1827,7 @@ void SvXMLImport::SetError( // create error list on demand if ( !mpXMLErrors ) - mpXMLErrors = o3tl::make_unique<XMLErrors>(); + mpXMLErrors = std::make_unique<XMLErrors>(); // save error information // use document locator (if none supplied) @@ -2194,10 +2193,10 @@ void SvXMLImportFastNamespaceHandler::registerNamespace( const OUString& rNamesp // Elements with default namespace parsed by FastParser have namespace prefix. // A default namespace needs to be registered with the prefix, to maintain the compatibility. if ( rNamespacePrefix.isEmpty() ) - m_aNamespaceDefines.push_back( o3tl::make_unique<NamespaceDefine>( + m_aNamespaceDefines.push_back( std::make_unique<NamespaceDefine>( SvXMLImport::getNamespacePrefixFromURI( rNamespaceURI ), rNamespaceURI) ); - m_aNamespaceDefines.push_back( o3tl::make_unique<NamespaceDefine>( + m_aNamespaceDefines.push_back( std::make_unique<NamespaceDefine>( rNamespacePrefix, rNamespaceURI) ); } diff --git a/xmloff/source/draw/animationimport.cxx b/xmloff/source/draw/animationimport.cxx index 814871c22f05..274032429cba 100644 --- a/xmloff/source/draw/animationimport.cxx +++ b/xmloff/source/draw/animationimport.cxx @@ -54,8 +54,6 @@ #include <vector> -#include <o3tl/make_unique.hxx> - #include <xmloff/xmltypes.hxx> #include "sdpropls.hxx" #include <xmloff/xmltoken.hxx> @@ -161,7 +159,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeTokenMap() XML_TOKEN_MAP_END }; - mpAnimationNodeTokenMap = o3tl::make_unique<SvXMLTokenMap>( aAnimationNodeTokenMap ); + mpAnimationNodeTokenMap = std::make_unique<SvXMLTokenMap>( aAnimationNodeTokenMap ); } return *mpAnimationNodeTokenMap; @@ -280,7 +278,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM XML_TOKEN_MAP_END }; - mpAnimationNodeAttributeTokenMap = o3tl::make_unique<SvXMLTokenMap>( aAnimationNodeAttributeTokenMap ); + mpAnimationNodeAttributeTokenMap = std::make_unique<SvXMLTokenMap>( aAnimationNodeAttributeTokenMap ); } return *mpAnimationNodeAttributeTokenMap; diff --git a/xmloff/source/draw/sdxmlimp.cxx b/xmloff/source/draw/sdxmlimp.cxx index 3f7950801ae0..22885511bd8e 100644 --- a/xmloff/source/draw/sdxmlimp.cxx +++ b/xmloff/source/draw/sdxmlimp.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <o3tl/make_unique.hxx> #include <osl/thread.h> #include <sal/log.hxx> #include <comphelper/processfactory.hxx> @@ -428,7 +427,7 @@ const SvXMLTokenMap& SdXMLImport::GetDocElemTokenMap() XML_TOKEN_MAP_END }; - mpDocElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aDocElemTokenMap); + mpDocElemTokenMap = std::make_unique<SvXMLTokenMap>(aDocElemTokenMap); } return *mpDocElemTokenMap; @@ -449,7 +448,7 @@ const SvXMLTokenMap& SdXMLImport::GetBodyElemTokenMap() XML_TOKEN_MAP_END }; - mpBodyElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aBodyElemTokenMap); + mpBodyElemTokenMap = std::make_unique<SvXMLTokenMap>(aBodyElemTokenMap); } return *mpBodyElemTokenMap; @@ -467,7 +466,7 @@ const SvXMLTokenMap& SdXMLImport::GetStylesElemTokenMap() XML_TOKEN_MAP_END }; - mpStylesElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aStylesElemTokenMap); + mpStylesElemTokenMap = std::make_unique<SvXMLTokenMap>(aStylesElemTokenMap); } return *mpStylesElemTokenMap; @@ -484,7 +483,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageElemTokenMap() XML_TOKEN_MAP_END }; - mpMasterPageElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aMasterPageElemTokenMap); + mpMasterPageElemTokenMap = std::make_unique<SvXMLTokenMap>(aMasterPageElemTokenMap); } return *mpMasterPageElemTokenMap; @@ -507,7 +506,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageAttrTokenMap() XML_TOKEN_MAP_END }; - mpMasterPageAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aMasterPageAttrTokenMap); + mpMasterPageAttrTokenMap = std::make_unique<SvXMLTokenMap>(aMasterPageAttrTokenMap); } return *mpMasterPageAttrTokenMap; @@ -523,7 +522,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterAttrTokenMap() XML_TOKEN_MAP_END }; - mpPageMasterAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aPageMasterAttrTokenMap); + mpPageMasterAttrTokenMap = std::make_unique<SvXMLTokenMap>(aPageMasterAttrTokenMap); } return *mpPageMasterAttrTokenMap; @@ -545,7 +544,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterStyleAttrTokenMap() XML_TOKEN_MAP_END }; - mpPageMasterStyleAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aPageMasterStyleAttrTokenMap); + mpPageMasterStyleAttrTokenMap = std::make_unique<SvXMLTokenMap>(aPageMasterStyleAttrTokenMap); } return *mpPageMasterStyleAttrTokenMap; @@ -571,7 +570,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap() XML_TOKEN_MAP_END }; - mpDrawPageAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aDrawPageAttrTokenMap); + mpDrawPageAttrTokenMap = std::make_unique<SvXMLTokenMap>(aDrawPageAttrTokenMap); } return *mpDrawPageAttrTokenMap; @@ -590,7 +589,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageElemTokenMap() XML_TOKEN_MAP_END }; - mpDrawPageElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aDrawPageElemTokenMap); + mpDrawPageElemTokenMap = std::make_unique<SvXMLTokenMap>(aDrawPageElemTokenMap); } return *mpDrawPageElemTokenMap; @@ -610,7 +609,7 @@ const SvXMLTokenMap& SdXMLImport::GetPresentationPlaceholderAttrTokenMap() XML_TOKEN_MAP_END }; - mpPresentationPlaceholderAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aPresentationPlaceholderAttrTokenMap); + mpPresentationPlaceholderAttrTokenMap = std::make_unique<SvXMLTokenMap>(aPresentationPlaceholderAttrTokenMap); } return *mpPresentationPlaceholderAttrTokenMap; diff --git a/xmloff/source/draw/shapeexport.cxx b/xmloff/source/draw/shapeexport.cxx index 7f601b2cf3af..4e32eba229d8 100644 --- a/xmloff/source/draw/shapeexport.cxx +++ b/xmloff/source/draw/shapeexport.cxx @@ -87,7 +87,6 @@ #include <officecfg/Office/Common.hxx> #include <o3tl/any.hxx> -#include <o3tl/make_unique.hxx> #include <o3tl/typed_flags_set.hxx> #include <rtl/math.hxx> @@ -3289,7 +3288,7 @@ void XMLShapeExport::ImpExportMediaShape( mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, sMimeType ); // write plugin - auto pPluginOBJ = o3tl::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true); + auto pPluginOBJ = std::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true); // export parameters const OUString aFalseStr( "false" ), aTrueStr( "true" ); diff --git a/xmloff/source/draw/shapeimport.cxx b/xmloff/source/draw/shapeimport.cxx index 3ab9181bcaf1..ef688690005f 100644 --- a/xmloff/source/draw/shapeimport.cxx +++ b/xmloff/source/draw/shapeimport.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <o3tl/make_unique.hxx> - #include <tools/debug.hxx> #include <tools/diagnose_ex.h> #include <sal/log.hxx> @@ -200,7 +198,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap() XML_TOKEN_MAP_END }; - mpGroupShapeElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aGroupShapeElemTokenMap); + mpGroupShapeElemTokenMap = std::make_unique<SvXMLTokenMap>(aGroupShapeElemTokenMap); } return *mpGroupShapeElemTokenMap; @@ -223,7 +221,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetFrameShapeElemTokenMap() XML_TOKEN_MAP_END }; - mpFrameShapeElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aFrameShapeElemTokenMap); + mpFrameShapeElemTokenMap = std::make_unique<SvXMLTokenMap>(aFrameShapeElemTokenMap); } return *mpFrameShapeElemTokenMap; @@ -243,7 +241,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeElemTokenMap() XML_TOKEN_MAP_END }; - mp3DSceneShapeElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DSceneShapeElemTokenMap); + mp3DSceneShapeElemTokenMap = std::make_unique<SvXMLTokenMap>(a3DSceneShapeElemTokenMap); } return *mp3DSceneShapeElemTokenMap; @@ -260,7 +258,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DObjectAttrTokenMap() XML_TOKEN_MAP_END }; - mp3DObjectAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DObjectAttrTokenMap); + mp3DObjectAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DObjectAttrTokenMap); } return *mp3DObjectAttrTokenMap; @@ -277,7 +275,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DPolygonBasedAttrTokenMap() XML_TOKEN_MAP_END }; - mp3DPolygonBasedAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DPolygonBasedAttrTokenMap); + mp3DPolygonBasedAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DPolygonBasedAttrTokenMap); } return *mp3DPolygonBasedAttrTokenMap; @@ -294,7 +292,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DCubeObjectAttrTokenMap() XML_TOKEN_MAP_END }; - mp3DCubeObjectAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DCubeObjectAttrTokenMap); + mp3DCubeObjectAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DCubeObjectAttrTokenMap); } return *mp3DCubeObjectAttrTokenMap; @@ -311,7 +309,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap() XML_TOKEN_MAP_END }; - mp3DSphereObjectAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DSphereObjectAttrTokenMap); + mp3DSphereObjectAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DSphereObjectAttrTokenMap); } return *mp3DSphereObjectAttrTokenMap; @@ -330,7 +328,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DLightAttrTokenMap() XML_TOKEN_MAP_END }; - mp3DLightAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DLightAttrTokenMap); + mp3DLightAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DLightAttrTokenMap); } return *mp3DLightAttrTokenMap; diff --git a/xmloff/source/draw/xexptran.cxx b/xmloff/source/draw/xexptran.cxx index b10633fdb83f..9b7a2da59285 100644 --- a/xmloff/source/draw/xexptran.cxx +++ b/xmloff/source/draw/xexptran.cxx @@ -18,7 +18,6 @@ */ #include <xexptran.hxx> -#include <o3tl/make_unique.hxx> #include <rtl/ustrbuf.hxx> #include <osl/diagnose.h> #include <sax/tools/converter.hxx> @@ -37,7 +36,7 @@ using namespace ::com::sun::star; -using o3tl::make_unique; +using std::make_unique; // parsing help functions for simple chars static void Imp_SkipSpaces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen) diff --git a/xmloff/source/draw/ximpcustomshape.cxx b/xmloff/source/draw/ximpcustomshape.cxx index 35de24ba2562..a3e0ffc13427 100644 --- a/xmloff/source/draw/ximpcustomshape.cxx +++ b/xmloff/source/draw/ximpcustomshape.cxx @@ -20,7 +20,6 @@ #include "ximpcustomshape.hxx" #include "ximpshap.hxx" #include <o3tl/any.hxx> -#include <o3tl/make_unique.hxx> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> #include <rtl/ustring.hxx> @@ -1190,7 +1189,7 @@ void XMLEnhancedCustomShapeContext::EndElement() if ( !maEquations.empty() ) { // creating hash map containing the name and index of each equation - std::unique_ptr<EquationHashMap> pH = o3tl::make_unique<EquationHashMap>(); + std::unique_ptr<EquationHashMap> pH = std::make_unique<EquationHashMap>(); std::vector< OUString >::iterator aEquationNameIter = maEquationNames.begin(); std::vector< OUString >::iterator aEquationNameEnd = maEquationNames.end(); while( aEquationNameIter != aEquationNameEnd ) diff --git a/xmloff/source/draw/ximpstyl.cxx b/xmloff/source/draw/ximpstyl.cxx index 43561742972e..237fee20a63e 100644 --- a/xmloff/source/draw/ximpstyl.cxx +++ b/xmloff/source/draw/ximpstyl.cxx @@ -24,7 +24,6 @@ #include <xmloff/xmluconv.hxx> #include "ximpnote.hxx" #include <tools/debug.hxx> -#include <o3tl/make_unique.hxx> #include <osl/diagnose.h> #include <sal/log.hxx> @@ -887,8 +886,8 @@ SdXMLStylesContext::SdXMLStylesContext( mbIsAutoStyle(bIsAutoStyle) { Reference< uno::XComponentContext > xContext = rImport.GetComponentContext(); - mpNumFormatter = o3tl::make_unique<SvNumberFormatter>( xContext, LANGUAGE_SYSTEM ); - mpNumFmtHelper = o3tl::make_unique<SvXMLNumFmtHelper>( mpNumFormatter.get(), xContext ); + mpNumFormatter = std::make_unique<SvNumberFormatter>( xContext, LANGUAGE_SYSTEM ); + mpNumFmtHelper = std::make_unique<SvXMLNumFmtHelper>( mpNumFormatter.get(), xContext ); } SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext( diff --git a/xmloff/source/forms/controlpropertyhdl.cxx b/xmloff/source/forms/controlpropertyhdl.cxx index 443ad538a2a2..62914df2d3e1 100644 --- a/xmloff/source/forms/controlpropertyhdl.cxx +++ b/xmloff/source/forms/controlpropertyhdl.cxx @@ -19,8 +19,6 @@ #include <xmloff/controlpropertyhdl.hxx> -#include <o3tl/make_unique.hxx> - #include <com/sun/star/util/MeasureUnit.hpp> #include <com/sun/star/awt/TextAlign.hpp> #include <com/sun/star/awt/FontWidth.hpp> @@ -59,49 +57,49 @@ namespace xmloff { case XML_TYPE_TEXT_ALIGN: if (!m_pTextAlignHandler) - m_pTextAlignHandler = o3tl::make_unique<XMLConstantsPropertyHandler>(aTextAlignMap, XML_TOKEN_INVALID ); + m_pTextAlignHandler = std::make_unique<XMLConstantsPropertyHandler>(aTextAlignMap, XML_TOKEN_INVALID ); pHandler = m_pTextAlignHandler.get(); break; case XML_TYPE_CONTROL_BORDER: if (!m_pControlBorderStyleHandler) - m_pControlBorderStyleHandler = o3tl::make_unique<OControlBorderHandler>( OControlBorderHandler::STYLE ); + m_pControlBorderStyleHandler = std::make_unique<OControlBorderHandler>( OControlBorderHandler::STYLE ); pHandler = m_pControlBorderStyleHandler.get(); break; case XML_TYPE_CONTROL_BORDER_COLOR: if ( !m_pControlBorderColorHandler ) - m_pControlBorderColorHandler = o3tl::make_unique<OControlBorderHandler>( OControlBorderHandler::COLOR ); + m_pControlBorderColorHandler = std::make_unique<OControlBorderHandler>( OControlBorderHandler::COLOR ); pHandler = m_pControlBorderColorHandler.get(); break; case XML_TYPE_ROTATION_ANGLE: if (!m_pRotationAngleHandler) - m_pRotationAngleHandler = o3tl::make_unique<ORotationAngleHandler>(); + m_pRotationAngleHandler = std::make_unique<ORotationAngleHandler>(); pHandler = m_pRotationAngleHandler.get(); break; case XML_TYPE_FONT_WIDTH: if (!m_pFontWidthHandler) - m_pFontWidthHandler = o3tl::make_unique<OFontWidthHandler>(); + m_pFontWidthHandler = std::make_unique<OFontWidthHandler>(); pHandler = m_pFontWidthHandler.get(); break; case XML_TYPE_CONTROL_TEXT_EMPHASIZE: if (!m_pFontEmphasisHandler) - m_pFontEmphasisHandler = o3tl::make_unique<XMLConstantsPropertyHandler>( aFontEmphasisMap, XML_NONE ); + m_pFontEmphasisHandler = std::make_unique<XMLConstantsPropertyHandler>( aFontEmphasisMap, XML_NONE ); pHandler = m_pFontEmphasisHandler.get(); break; case XML_TYPE_TEXT_FONT_RELIEF: if (!m_pFontReliefHandler) - m_pFontReliefHandler = o3tl::make_unique<XMLConstantsPropertyHandler>( aFontReliefMap, XML_NONE ); + m_pFontReliefHandler = std::make_unique<XMLConstantsPropertyHandler>( aFontReliefMap, XML_NONE ); pHandler = m_pFontReliefHandler.get(); break; case XML_TYPE_TEXT_LINE_MODE: if (!m_pTextLineModeHandler) { - m_pTextLineModeHandler = o3tl::make_unique<XMLNamedBoolPropertyHdl>( + m_pTextLineModeHandler = std::make_unique<XMLNamedBoolPropertyHdl>( ::xmloff::token::XML_SKIP_WHITE_SPACE, ::xmloff::token::XML_CONTINUOUS); } diff --git a/xmloff/source/forms/elementexport.cxx b/xmloff/source/forms/elementexport.cxx index ddbc49a87210..8ff178e015d9 100644 --- a/xmloff/source/forms/elementexport.cxx +++ b/xmloff/source/forms/elementexport.cxx @@ -19,8 +19,6 @@ #include "elementexport.hxx" -#include <o3tl/make_unique.hxx> - #include "strings.hxx" #include <xmloff/xmlnmspe.hxx> #include "eventexport.hxx" @@ -144,7 +142,7 @@ namespace xmloff void OElementExport::implStartElement(const sal_Char* _pName) { - m_pXMLElement = o3tl::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, _pName, true, true); + m_pXMLElement = std::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, _pName, true, true); } void OElementExport::implEndElement() @@ -1396,7 +1394,7 @@ namespace xmloff // before we let the base class start it's outer element, we add a wrapper element const sal_Char *pOuterElementName = getOuterXMLElementName(); if (pOuterElementName) - m_pOuterElement = o3tl::make_unique<SvXMLElementExport>( + m_pOuterElement = std::make_unique<SvXMLElementExport>( m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, pOuterElementName, true, diff --git a/xmloff/source/forms/propertyexport.cxx b/xmloff/source/forms/propertyexport.cxx index 46c58d66ba4c..61844b78e3c7 100644 --- a/xmloff/source/forms/propertyexport.cxx +++ b/xmloff/source/forms/propertyexport.cxx @@ -21,8 +21,6 @@ #include <memory> -#include <o3tl/make_unique.hxx> - #include <xmloff/xmlexp.hxx> #include "strings.hxx" #include <xmloff/xmlnmspe.hxx> @@ -124,7 +122,7 @@ namespace xmloff // now that we have the first sub-tag we need the form:properties element if (!pPropertiesTag) - pPropertiesTag = o3tl::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, token::XML_PROPERTIES, true, true); + pPropertiesTag = std::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, token::XML_PROPERTIES, true, true); // add the name attribute AddAttribute(XML_NAMESPACE_FORM, token::XML_PROPERTY_NAME, rProperty); diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx index 7a5d0cba4292..5ae6085fec2f 100644 --- a/xmloff/source/style/impastpl.cxx +++ b/xmloff/source/style/impastpl.cxx @@ -35,7 +35,7 @@ #include <xmloff/xmltoken.hxx> #include "impastpl.hxx" -#include <o3tl/make_unique.hxx> + using namespace ::std; using namespace ::com::sun::star; @@ -430,7 +430,7 @@ void SvXMLAutoStylePoolP_Impl::AddFamily( } #endif - m_FamilySet.insert(o3tl::make_unique<XMLAutoStyleFamily>(nFamily, rStrName, rMapper, aPrefix, bAsFamily)); + m_FamilySet.insert(std::make_unique<XMLAutoStyleFamily>(nFamily, rStrName, rMapper, aPrefix, bAsFamily)); } void SvXMLAutoStylePoolP_Impl::SetFamilyPropSetMapper( @@ -515,7 +515,7 @@ bool SvXMLAutoStylePoolP_Impl::Add( if (it2 == rFamily.m_ParentSet.end()) { std::pair<XMLAutoStyleFamily::ParentSetType::iterator,bool> r = - rFamily.m_ParentSet.insert(o3tl::make_unique<XMLAutoStylePoolParent>( + rFamily.m_ParentSet.insert(std::make_unique<XMLAutoStylePoolParent>( rParentName)); it2 = r.first; } @@ -549,7 +549,7 @@ bool SvXMLAutoStylePoolP_Impl::AddNamed( if (it2 == rFamily.m_ParentSet.end()) { std::pair<XMLAutoStyleFamily::ParentSetType::iterator,bool> r = - rFamily.m_ParentSet.insert(o3tl::make_unique<XMLAutoStylePoolParent>( + rFamily.m_ParentSet.insert(std::make_unique<XMLAutoStylePoolParent>( rParentName)); it2 = r.first; } diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index 9294bf9f7fbb..1a7b81c6f311 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -17,8 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <o3tl/make_unique.hxx> - #include <unotools/syslocale.hxx> #include <svl/zforlist.hxx> @@ -442,7 +440,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStylesElemTokenMap() XML_TOKEN_MAP_END }; - pStylesElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStylesElemMap ); + pStylesElemTokenMap = std::make_unique<SvXMLTokenMap>( aStylesElemMap ); } return *pStylesElemTokenMap; } @@ -480,7 +478,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemTokenMap() XML_TOKEN_MAP_END }; - pStyleElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStyleElemMap ); + pStyleElemTokenMap = std::make_unique<SvXMLTokenMap>( aStyleElemMap ); } return *pStyleElemTokenMap; } @@ -513,7 +511,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleAttrTokenMap() XML_TOKEN_MAP_END }; - pStyleAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStyleAttrMap ); + pStyleAttrTokenMap = std::make_unique<SvXMLTokenMap>( aStyleAttrMap ); } return *pStyleAttrTokenMap; } @@ -559,7 +557,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap() XML_TOKEN_MAP_END }; - pStyleElemAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStyleElemAttrMap ); + pStyleElemAttrTokenMap = std::make_unique<SvXMLTokenMap>( aStyleElemAttrMap ); } return *pStyleElemAttrTokenMap; } @@ -567,7 +565,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap() const LocaleDataWrapper& SvXMLNumImpData::GetLocaleData( LanguageType nLang ) { if ( !pLocaleData ) - pLocaleData = o3tl::make_unique<LocaleDataWrapper>( + pLocaleData = std::make_unique<LocaleDataWrapper>( pFormatter ? pFormatter->GetComponentContext() : m_xContext, LanguageTag( nLang ) ); else @@ -2269,7 +2267,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper( if (pObj) pFormatter = pObj->GetNumberFormatter(); - pData = o3tl::make_unique<SvXMLNumImpData>( pFormatter, rxContext ); + pData = std::make_unique<SvXMLNumImpData>( pFormatter, rxContext ); } SvXMLNumFmtHelper::SvXMLNumFmtHelper( @@ -2278,7 +2276,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper( { SAL_WARN_IF( !rxContext.is(), "xmloff", "got no service manager" ); - pData = o3tl::make_unique<SvXMLNumImpData>( pNumberFormatter, rxContext ); + pData = std::make_unique<SvXMLNumImpData>( pNumberFormatter, rxContext ); } SvXMLNumFmtHelper::~SvXMLNumFmtHelper() diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx index 2accb68325db..02e58ba4ecad 100644 --- a/xmloff/source/style/xmlnumi.cxx +++ b/xmloff/source/style/xmlnumi.cxx @@ -34,7 +34,6 @@ #include <com/sun/star/container/XIndexReplace.hpp> #include <o3tl/any.hxx> -#include <o3tl/make_unique.hxx> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> @@ -1044,7 +1043,7 @@ SvXMLImportContextRef SvxXMLListStyleContext::CreateChildContext( new SvxXMLListLevelStyleContext_Impl( GetImport(), nPrefix, rLocalName, xAttrList )}; if( !pLevelStyles ) - pLevelStyles = o3tl::make_unique<SvxXMLListStyle_Impl>(); + pLevelStyles = std::make_unique<SvxXMLListStyle_Impl>(); pLevelStyles->push_back( xLevelStyle ); xContext = xLevelStyle.get(); diff --git a/xmloff/source/style/xmlstyle.cxx b/xmloff/source/style/xmlstyle.cxx index d2a4435cd643..34a46f401a7d 100644 --- a/xmloff/source/style/xmlstyle.cxx +++ b/xmloff/source/style/xmlstyle.cxx @@ -29,7 +29,6 @@ #include <com/sun/star/style/XAutoStylesSupplier.hpp> #include <com/sun/star/style/XAutoStyleFamily.hpp> #include "PageMasterPropMapper.hxx" -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> #include <svl/itemset.hxx> #include <svl/style.hxx> @@ -299,7 +298,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn if( !pIndices && bCreateIndex && !aStyles.empty() ) { - pIndices = o3tl::make_unique<IndicesType>(aStyles.begin(), aStyles.end()); + pIndices = std::make_unique<IndicesType>(aStyles.begin(), aStyles.end()); SAL_WARN_IF(pIndices->size() != aStyles.size(), "xmloff.style", "Here is a duplicate Style"); #if OSL_DEBUG_LEVEL > 0 SAL_WARN_IF(0 != m_nIndexCreated, "xmloff.style", diff --git a/xmloff/source/style/xmltabi.cxx b/xmloff/source/style/xmltabi.cxx index 82a487fba1a4..5dbfcf1087aa 100644 --- a/xmloff/source/style/xmltabi.cxx +++ b/xmloff/source/style/xmltabi.cxx @@ -18,7 +18,6 @@ */ #include <com/sun/star/style/TabAlign.hpp> -#include <o3tl/make_unique.hxx> #include <rtl/ustrbuf.hxx> #include <xmloff/xmltkmap.hxx> #include <xmloff/nmspmap.hxx> @@ -186,7 +185,7 @@ SvXMLImportContextRef SvxXMLTabStopImportContext::CreateChildContext( // add new tabstop to array of tabstops if( !mpTabStops ) - mpTabStops = o3tl::make_unique<SvxXMLTabStopArray_Impl>(); + mpTabStops = std::make_unique<SvxXMLTabStopArray_Impl>(); mpTabStops->push_back( xTabStopContext ); diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 007739d6ce4b..66798582b27f 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -22,7 +22,6 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/style/VerticalAlignment.hpp> #include <com/sun/star/beans/XPropertySet.hpp> -#include <o3tl/make_unique.hxx> #include <sax/tools/converter.hxx> #include <xmloff/xmltkmap.hxx> #include <xmloff/xmluconv.hxx> @@ -301,7 +300,7 @@ SvXMLImportContextRef XMLTextColumnsContext::CreateChildContext( // add new tabstop to array of tabstops if( !pColumns ) - pColumns = o3tl::make_unique<XMLTextColumnsArray_Impl>(); + pColumns = std::make_unique<XMLTextColumnsArray_Impl>(); pColumns->push_back( xColumn ); diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx index a714582184ec..994325d5b7d9 100644 --- a/xmloff/source/text/XMLTextFrameContext.cxx +++ b/xmloff/source/text/XMLTextFrameContext.cxx @@ -17,7 +17,6 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include <o3tl/make_unique.hxx> #include <osl/diagnose.h> #include <sal/log.hxx> #include <comphelper/base64.hxx> @@ -1690,7 +1689,7 @@ void XMLTextFrameContext::SetHyperlink( const OUString& rHRef, bool bMap ) { OSL_ENSURE( !m_pHyperlink, "recursive SetHyperlink call" ); - m_pHyperlink = o3tl::make_unique<XMLTextFrameContextHyperlink_Impl>( + m_pHyperlink = std::make_unique<XMLTextFrameContextHyperlink_Impl>( rHRef, rName, rTargetFrameName, bMap ); } diff --git a/xmloff/source/text/txtlists.cxx b/xmloff/source/text/txtlists.cxx index fc8d5b3d1c62..a4ec881da6a3 100644 --- a/xmloff/source/text/txtlists.cxx +++ b/xmloff/source/text/txtlists.cxx @@ -21,8 +21,6 @@ #include <txtlists.hxx> #include <comphelper/random.hxx> -#include <o3tl/make_unique.hxx> - #include <tools/datetime.hxx> #include <sal/log.hxx> @@ -116,7 +114,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, if ( !mpProcessedLists ) { - mpProcessedLists = o3tl::make_unique<tMapForLists>(); + mpProcessedLists = std::make_unique<tMapForLists>(); } ::std::pair< OUString, OUString > @@ -131,7 +129,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId, { if ( !mpMapListIdToListStyleDefaultListId ) { - mpMapListIdToListStyleDefaultListId = o3tl::make_unique<tMapForLists>(); + mpMapListIdToListStyleDefaultListId = std::make_unique<tMapForLists>(); } if ( mpMapListIdToListStyleDefaultListId->find( sListStyleName ) == @@ -257,7 +255,7 @@ void XMLTextListsHelper::StoreLastContinuingList( const OUString& sListId, { if ( !mpContinuingLists ) { - mpContinuingLists = o3tl::make_unique<tMapForContinuingLists>(); + mpContinuingLists = std::make_unique<tMapForContinuingLists>(); } (*mpContinuingLists)[ sListId ] = sContinuingListId; @@ -284,7 +282,7 @@ void XMLTextListsHelper::PushListOnStack( const OUString& sListId, { if ( !mpListStack ) { - mpListStack = o3tl::make_unique<tStackForLists>(); + mpListStack = std::make_unique<tStackForLists>(); } ::std::pair< OUString, OUString > aListData( sListId, sListStyleName ); diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx index 9a7776eec9e3..dd89faf46654 100644 --- a/xmloff/source/text/txtparae.cxx +++ b/xmloff/source/text/txtparae.cxx @@ -20,7 +20,6 @@ #include <sal/config.h> #include <o3tl/any.hxx> -#include <o3tl/make_unique.hxx> #include <xmloff/unointerfacetouniqueidentifiermapper.hxx> #include <tools/debug.hxx> #include <rtl/ustrbuf.hxx> @@ -1311,7 +1310,7 @@ XMLTextParagraphExport::XMLTextParagraphExport( sal_Int32 nIndex = xTextPropMapper->getPropertySetMapper()->FindEntryIndex( "", XML_NAMESPACE_STYLE, GetXMLToken(XML_TEXT_COMBINE)); - pFieldExport.reset( new XMLTextFieldExport( rExp, o3tl::make_unique<XMLPropertyState>( nIndex, uno::makeAny(true) ) ) ); + pFieldExport.reset( new XMLTextFieldExport( rExp, std::make_unique<XMLPropertyState>( nIndex, uno::makeAny(true) ) ) ); PushNewTextListsHelper(); } diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx index d79a6d85fa34..674c0ac2e83b 100644 --- a/xmloff/source/text/txtparai.cxx +++ b/xmloff/source/text/txtparai.cxx @@ -26,8 +26,6 @@ #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> -#include <o3tl/make_unique.hxx> - #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/text/XTextFrame.hpp> #include <com/sun/star/text/XTextCursor.hpp> @@ -1064,7 +1062,7 @@ void XMLIndexMarkImportContext_Impl::StartElement( { ProcessAttributes(xAttrList, xMark); m_rHints.push_back( - o3tl::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos)); + std::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos)); } // else: can't create mark -> ignore break; @@ -1084,7 +1082,7 @@ void XMLIndexMarkImportContext_Impl::StartElement( { // process only if we find an ID m_rHints.push_back( - o3tl::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos, sID)); + std::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos, sID)); } // else: no ID -> we'll never find the end -> ignore } @@ -1636,7 +1634,7 @@ SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext( if( TextContentAnchorType_AT_CHARACTER == pTextFrameContext->GetAnchorType() ) { - rHints.push_back(o3tl::make_unique<XMLTextFrameHint_Impl>( + rHints.push_back(std::make_unique<XMLTextFrameHint_Impl>( pTextFrameContext, xAnchorPos)); } pContext = pTextFrameContext; @@ -1651,7 +1649,7 @@ SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext( rLocalName, xAttrList, TextContentAnchorType_AS_CHARACTER ); rHints.push_back( - o3tl::make_unique<XMLTextFrameHint_Impl>(pContext, xAnchorPos)); + std::make_unique<XMLTextFrameHint_Impl>(pContext, xAnchorPos)); } break; @@ -1726,7 +1724,7 @@ SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext( Reference < XTextRange > xAnchorPos = rImport.GetTextImport()->GetCursor()->getStart(); rHints.push_back( - o3tl::make_unique<XMLDrawHint_Impl>(pShapeContext, xAnchorPos)); + std::make_unique<XMLDrawHint_Impl>(pShapeContext, xAnchorPos)); } if( !pContext ) { |