diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-02-04 20:41:49 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.com> | 2019-02-08 12:30:06 +0100 |
commit | 43635b474cdce65e64fa9ca9d27a3cee6d96d50b (patch) | |
tree | 04d4223ebf161e2dc83f0842a1a81cef76d784d6 /vcl/unx | |
parent | 2d6313a9fac81340883b24fe3651781d31c6039d (diff) |
o3tl::make_unique -> std::make_unique in tools..xmloff
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26
Reviewed-on: https://gerrit.libreoffice.org/67474
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/generic/app/salinst.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/cairotextrender.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/gdi/salvd.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/generic/print/genpspgraphics.cxx | 3 | ||||
-rw-r--r-- | vcl/unx/gtk/gtkinst.cxx | 5 | ||||
-rw-r--r-- | vcl/unx/gtk3/gtk3gtkinst.cxx | 60 | ||||
-rw-r--r-- | vcl/unx/kde5/KDE5SalInstance.cxx | 1 |
7 files changed, 36 insertions, 42 deletions
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> |