diff options
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r-- | sw/source/uibase/utlui/content.cxx | 7 | ||||
-rw-r--r-- | sw/source/uibase/utlui/glbltree.cxx | 5 |
2 files changed, 5 insertions, 7 deletions
diff --git a/sw/source/uibase/utlui/content.cxx b/sw/source/uibase/utlui/content.cxx index 3d86f271e239..b6da66af6191 100644 --- a/sw/source/uibase/utlui/content.cxx +++ b/sw/source/uibase/utlui/content.cxx @@ -25,6 +25,8 @@ #include <sfx2/dispatch.hxx> #include <sfx2/event.hxx> #include <o3tl/enumrange.hxx> +#include <o3tl/make_unique.hxx> +#include <o3tl/sorted_vector.hxx> #include <vcl/help.hxx> #include <vcl/settings.hxx> #include <sot/formats.hxx> @@ -84,7 +86,6 @@ #include <postithelper.hxx> #include <redline.hxx> #include <docary.hxx> -#include <o3tl/sorted_vector.hxx> #include <svtools/treelistentry.hxx> #include "swabstdlg.hxx" @@ -3468,9 +3469,7 @@ void SwContentTree::InitEntry(SvTreeListEntry* pEntry, const size_t nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nColToHilite )); - std::unique_ptr<SwContentLBoxString> pStr( - new SwContentLBoxString(pEntry, 0, rCol.GetText())); - pEntry->ReplaceItem(std::move(pStr), nColToHilite); + pEntry->ReplaceItem(o3tl::make_unique<SwContentLBoxString>(pEntry, 0, rCol.GetText()), nColToHilite); } void SwContentLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 9fa8273a0b78..d393b1e81726 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -49,6 +49,7 @@ #include <navicont.hxx> #include <edtwin.hxx> #include <uitool.hxx> +#include <o3tl/make_unique.hxx> #include <cmdid.h> #include <helpid.h> @@ -1232,9 +1233,7 @@ void SwGlobalTree::InitEntry(SvTreeListEntry* pEntry, const size_t nColToHilite = 1; //0==Bitmap;1=="Column1";2=="Column2" SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind ); SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nColToHilite )); - std::unique_ptr<SwLBoxString> pStr( - new SwLBoxString(pEntry, 0, rCol.GetText())); - pEntry->ReplaceItem(std::move(pStr), nColToHilite); + pEntry->ReplaceItem(o3tl::make_unique<SwLBoxString>(pEntry, 0, rCol.GetText()), nColToHilite); } void SwLBoxString::Paint(const Point& rPos, SvTreeListBox& rDev, vcl::RenderContext& rRenderContext, |