diff options
Diffstat (limited to 'vcl')
46 files changed, 162 insertions, 208 deletions
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) |