[Libreoffice-commits] core.git: chart2/source cui/source dbaccess/source sc/source sd/source sfx2/source starmath/source svtools/source svx/source sw/source xmloff/source
Sheikha AL-Hinai
sheikha443 at gmail.com
Tue Jan 5 03:48:12 PST 2016
chart2/source/controller/accessibility/AccessibleTextHelper.cxx | 5 +--
cui/source/customize/acccfg.cxx | 11 +++-----
cui/source/options/optHeaderTabListbox.cxx | 6 +---
dbaccess/source/ui/control/dbtreelistbox.cxx | 5 +--
dbaccess/source/ui/misc/WNameMatch.cxx | 5 +--
sc/source/filter/html/htmlpars.cxx | 8 ++----
sc/source/filter/xml/xmlimprt.cxx | 5 +--
sc/source/ui/Accessibility/AccessibleCell.cxx | 6 +---
sc/source/ui/Accessibility/AccessibleCsvControl.cxx | 7 +----
sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx | 6 +---
sc/source/ui/Accessibility/AccessibleEditObject.cxx | 6 +---
sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx | 6 +---
sc/source/ui/Accessibility/AccessiblePreviewCell.cxx | 6 +---
sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx | 7 ++---
sc/source/ui/navipi/content.cxx | 5 +--
sc/source/ui/undo/undorangename.cxx | 8 ++----
sd/source/ui/dlg/sdtreelb.cxx | 5 +--
sfx2/source/dialog/templdlg.cxx | 10 ++-----
starmath/source/accessibility.cxx | 6 +---
svtools/source/contnr/svtabbx.cxx | 5 +--
svtools/source/contnr/treelistbox.cxx | 13 +++-------
svtools/source/uno/treecontrolpeer.cxx | 6 +---
svx/source/accessibility/AccessibleShape.cxx | 8 ++----
svx/source/dialog/docrecovery.cxx | 6 +---
svx/source/table/accessiblecell.cxx | 6 ++--
sw/source/core/doc/fmtcol.cxx | 5 +--
sw/source/core/text/blink.cxx | 5 +--
sw/source/core/undo/undobj.cxx | 5 +--
sw/source/core/undo/unsort.cxx | 8 ++----
sw/source/core/undo/untbl.cxx | 7 ++---
xmloff/source/style/impastpl.cxx | 6 +---
31 files changed, 74 insertions(+), 129 deletions(-)
New commits:
commit d75b9fd582f0aa83bd2fc99028b3f83eb7171d61
Author: Sheikha AL-Hinai <sheikha443 at gmail.com>
Date: Mon Dec 28 13:56:23 2015 +0400
tdf#94205: Use o3tl::make_unique insted of new+std::move.
Change-Id: I9ff14760479d2ac882546e2e5b74ab750ba2fa4b
Reviewed-on: https://gerrit.libreoffice.org/20984
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
Tested-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
index cc88d35..e715e07 100644
--- a/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
+++ b/chart2/source/controller/accessibility/AccessibleTextHelper.cxx
@@ -34,7 +34,7 @@
#include <vcl/window.hxx>
#include <com/sun/star/accessibility/AccessibleRole.hpp>
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -90,8 +90,7 @@ void SAL_CALL AccessibleTextHelper::initialize( const Sequence< uno::Any >& aArg
SdrObject * pTextObj = m_pDrawViewWrapper->getNamedSdrObject( aCID );
if( pTextObj )
{
- std::unique_ptr<SvxEditSource> pEditSource(new SvxTextEditSource( *pTextObj, nullptr, *pView, *pWindow ));
- m_pTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
+ m_pTextHelper = new ::accessibility::AccessibleTextHelper(o3tl::make_unique<SvxTextEditSource>(*pTextObj, nullptr, *pView, *pWindow));
m_pTextHelper->SetEventSource( xEventSource );
}
}
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index ee07d7e..19cfe65 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -69,7 +69,7 @@
#include <vcl/help.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/sequenceashashmap.hxx>
-
+#include <o3tl/make_unique.hxx>
// namespaces
using namespace css;
@@ -911,13 +911,10 @@ void SfxAcceleratorConfigPage::CreateCustomItems(SvTreeListEntry* pEntry,
const OUString& sCol1 ,
const OUString& sCol2)
{
- std::unique_ptr<SfxAccCfgLBoxString_Impl> pStringItem1(
- new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol1));
- pEntry->ReplaceItem(std::move(pStringItem1), 1);
- std::unique_ptr<SfxAccCfgLBoxString_Impl> pStringItem2(
- new SfxAccCfgLBoxString_Impl(pEntry, 0, sCol2));
- pEntry->ReplaceItem(std::move(pStringItem2), 2);
+ pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(pEntry, 0, sCol1), 1);
+
+ pEntry->ReplaceItem(o3tl::make_unique<SfxAccCfgLBoxString_Impl>(pEntry, 0, sCol2), 2);
}
diff --git a/cui/source/options/optHeaderTabListbox.cxx b/cui/source/options/optHeaderTabListbox.cxx
index db5a7ea..8abd261 100644
--- a/cui/source/options/optHeaderTabListbox.cxx
+++ b/cui/source/options/optHeaderTabListbox.cxx
@@ -23,7 +23,7 @@
#include <svtools/headbar.hxx>
#include <svtools/svlbitm.hxx>
#include <svtools/treelistentry.hxx>
-
+#include <o3tl/make_unique.hxx>
namespace svx
{
// class OptLBoxString_Impl ----------------------------------------------
@@ -71,9 +71,7 @@ void OptHeaderTabListBox::InitEntry( SvTreeListEntry* pEntry, const OUString& rT
{
// initialize all columns with own class (column 0 == Bitmap)
SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nCol ));
- std::unique_ptr<OptLBoxString_Impl> pStr(
- new OptLBoxString_Impl(pEntry, 0, rCol.GetText()));
- pEntry->ReplaceItem(std::move(pStr), nCol);
+ pEntry->ReplaceItem(o3tl::make_unique<OptLBoxString_Impl>(pEntry, 0, rCol.GetText()), nCol);
}
}
diff --git a/dbaccess/source/ui/control/dbtreelistbox.cxx b/dbaccess/source/ui/control/dbtreelistbox.cxx
index b39efbd..d275601 100644
--- a/dbaccess/source/ui/control/dbtreelistbox.cxx
+++ b/dbaccess/source/ui/control/dbtreelistbox.cxx
@@ -39,7 +39,7 @@
#include "svtools/treelistentry.hxx"
#include <memory>
-
+#include <o3tl/make_unique.hxx>
namespace dbaui
{
@@ -139,8 +139,7 @@ void DBTreeListBox::InitEntry(SvTreeListEntry* _pEntry, const OUString& aStr, co
{
SvTreeListBox::InitEntry( _pEntry, aStr, _rCollEntryBmp,_rExpEntryBmp, eButtonKind);
SvLBoxItem* pTextItem(_pEntry->GetFirstItem(SV_ITEM_ID_LBOXSTRING));
- std::unique_ptr<SvLBoxString> pString(new OBoldListboxString(_pEntry, 0, aStr));
- _pEntry->ReplaceItem(std::move(pString), _pEntry->GetPos(pTextItem));
+ _pEntry->ReplaceItem(o3tl::make_unique<OBoldListboxString>(_pEntry, 0, aStr), _pEntry->GetPos(pTextItem));
}
void DBTreeListBox::implStopSelectionTimer()
diff --git a/dbaccess/source/ui/misc/WNameMatch.cxx b/dbaccess/source/ui/misc/WNameMatch.cxx
index 004f33a..4f49278 100644
--- a/dbaccess/source/ui/misc/WNameMatch.cxx
+++ b/dbaccess/source/ui/misc/WNameMatch.cxx
@@ -28,7 +28,7 @@
#include <vcl/builderfactory.hxx>
#include "svtools/treelistentry.hxx"
#include <com/sun/star/sdbc/DataType.hpp>
-
+#include <o3tl/make_unique.hxx>
using namespace ::dbaui;
// OWizColumnSelect
OWizNameMatching::OWizNameMatching( vcl::Window* pParent)
@@ -373,8 +373,7 @@ VCL_BUILDER_FACTORY(OColumnTreeBox)
void OColumnTreeBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr, const Image& rImg1, const Image& rImg2, SvLBoxButtonKind eButtonKind)
{
DBTreeListBox::InitEntry(pEntry, rStr, rImg1, rImg2, eButtonKind);
- std::unique_ptr<SvLBoxString> pString(new OColumnString(pEntry, 0, rStr,false));
- pEntry->ReplaceItem(std::move(pString), pEntry->ItemCount() - 1);
+ pEntry->ReplaceItem(o3tl::make_unique<OColumnString>(pEntry, 0, rStr,false), pEntry->ItemCount() - 1);
}
bool OColumnTreeBox::Select( SvTreeListEntry* pEntry, bool bSelect )
diff --git a/sc/source/filter/html/htmlpars.cxx b/sc/source/filter/html/htmlpars.cxx
index 35a6072..b68159a 100644
--- a/sc/source/filter/html/htmlpars.cxx
+++ b/sc/source/filter/html/htmlpars.cxx
@@ -57,7 +57,7 @@
#include "rangelst.hxx"
#include <config_orcus.h>
-
+#include <o3tl/make_unique.hxx>
#if ENABLE_ORCUS
#include <orcus/css_parser.hpp>
#endif
@@ -86,9 +86,8 @@ void ScHTMLStyles::add(const char* pElemName, size_t nElemName, const char* pCla
if (itrElem == m_ElemProps.end())
{
// new element
- std::unique_ptr<NamePropsType> p(new NamePropsType);
std::pair<ElemsType::iterator, bool> r =
- m_ElemProps.insert(std::make_pair(aElem, std::move(p)));
+ m_ElemProps.insert(std::make_pair(aElem, o3tl::make_unique<NamePropsType>()));
if (!r.second)
// insertion failed.
return;
@@ -171,9 +170,8 @@ void ScHTMLStyles::insertProp(
if (itr == rStore.end())
{
// new element
- std::unique_ptr<PropsType> p(new PropsType);
std::pair<NamePropsType::iterator, bool> r =
- rStore.insert(std::make_pair(aName, std::move(p)));
+ rStore.insert(std::make_pair(aName, o3tl::make_unique<PropsType>()));
if (!r.second)
// insertion failed.
return;
diff --git a/sc/source/filter/xml/xmlimprt.cxx b/sc/source/filter/xml/xmlimprt.cxx
index f62f350..f03a13a 100644
--- a/sc/source/filter/xml/xmlimprt.cxx
+++ b/sc/source/filter/xml/xmlimprt.cxx
@@ -96,7 +96,7 @@
#include <memory>
#include <utility>
-
+#include <o3tl/make_unique.hxx>
#define SC_LOCALE "Locale"
#define SC_CURRENCYSYMBOL "CurrencySymbol"
#define SC_REPEAT_ROW "repeat-row"
@@ -2401,9 +2401,8 @@ void ScXMLImport::AddNamedExpression(SCTAB nTab, ScMyNamedExpression* pNamedExp)
if (itr == m_SheetNamedExpressions.end())
{
// No chain exists for this sheet. Create one.
- ::std::unique_ptr<ScMyNamedExpressions> pNew(new ScMyNamedExpressions);
::std::pair<SheetNamedExpMap::iterator, bool> r =
- m_SheetNamedExpressions.insert(std::make_pair(nTab, std::move(pNew)));
+ m_SheetNamedExpressions.insert(std::make_pair(nTab, o3tl::make_unique<ScMyNamedExpressions>()));
if (!r.second)
// insertion failed.
return;
diff --git a/sc/source/ui/Accessibility/AccessibleCell.cxx b/sc/source/ui/Accessibility/AccessibleCell.cxx
index eb10c60..c615155 100644
--- a/sc/source/ui/Accessibility/AccessibleCell.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCell.cxx
@@ -49,7 +49,7 @@
#include <vcl/svapp.hxx>
#include "AccessibleSpreadsheet.hxx"
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -398,9 +398,7 @@ ScDocument* ScAccessibleCell::GetDocument(ScTabViewShell* pViewShell)
{
return ::std::unique_ptr< SvxEditSource >();
}
- ::std::unique_ptr < ScAccessibleTextData > pAccessibleCellTextData
- ( new ScAccessibleCellTextData( pViewShell, aCell, eSplitPos, this ) );
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleCellTextData)));
+ ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessibleCellTextData>(pViewShell, aCell, eSplitPos, this)));
return pEditSource;
}
diff --git a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
index d5561f4..3ea7a9a 100644
--- a/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
+++ b/sc/source/ui/Accessibility/AccessibleCsvControl.cxx
@@ -51,7 +51,7 @@
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include "editutil.hxx"
-
+#include <o3tl/make_unique.hxx>
using ::utl::AccessibleRelationSetHelper;
using ::utl::AccessibleStateSetHelper;
using ::accessibility::AccessibleStaticTextBase;
@@ -1575,10 +1575,7 @@ Rectangle ScAccessibleCsvCell::implGetBoundingBox() const
Rectangle aBoundRect( implGetBoundingBox() );
aBoundRect -= implGetRealPos();
- ::std::unique_ptr< ScAccessibleTextData > pCsvTextData( new ScAccessibleCsvTextData(
- &rGrid, rGrid.GetEditEngine(), maCellText, aBoundRect, implGetRealSize() ) );
-
- ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( std::move(pCsvTextData) ) );
+ ::std::unique_ptr< SvxEditSource > pEditSource( new ScAccessibilityEditSource( o3tl::make_unique<ScAccessibleCsvTextData>(&rGrid, rGrid.GetEditEngine(), maCellText, aBoundRect, implGetRealSize()) ) );
return pEditSource;
}
diff --git a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
index 4cccf56..81f06b2 100644
--- a/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
+++ b/sc/source/ui/Accessibility/AccessibleDocumentPagePreview.cxx
@@ -58,7 +58,7 @@
#include <list>
#include <algorithm>
#include <memory>
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -140,9 +140,7 @@ ScNotesChildren::~ScNotesChildren()
::accessibility::AccessibleTextHelper* ScNotesChildren::CreateTextHelper(const OUString& rString, const Rectangle& rVisRect, const ScAddress& aCellPos, bool bMarkNote, sal_Int32 nChildOffset) const
{
- ::std::unique_ptr < ScAccessibleTextData > pAccessiblePreviewHeaderCellTextData
- (new ScAccessibleNoteTextData(mpViewShell, rString, aCellPos, bMarkNote));
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessiblePreviewHeaderCellTextData)));
+ ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessibleNoteTextData>(mpViewShell, rString, aCellPos, bMarkNote)));
::accessibility::AccessibleTextHelper* pTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
diff --git a/sc/source/ui/Accessibility/AccessibleEditObject.cxx b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
index 122a080..df9c3e2 100644
--- a/sc/source/ui/Accessibility/AccessibleEditObject.cxx
+++ b/sc/source/ui/Accessibility/AccessibleEditObject.cxx
@@ -49,7 +49,7 @@
#include <com/sun/star/accessibility/AccessibleRelationType.hpp>
#include <unotools/accessiblerelationsethelper.hxx>
#include <com/sun/star/accessibility/XAccessibleText.hpp>
-
+#include <o3tl/make_unique.hxx>
using ::com::sun::star::lang::IndexOutOfBoundsException;
using ::com::sun::star::uno::RuntimeException;
using namespace ::com::sun::star;
@@ -368,9 +368,7 @@ void ScAccessibleEditObject::CreateTextHelper()
pAccessibleTextData.reset
(new ScAccessibleEditLineTextData(nullptr, mpWindow));
}
-
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleTextData)));
- mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
+ mpTextHelper = new ::accessibility::AccessibleTextHelper(o3tl::make_unique<ScAccessibilityEditSource>(std::move(pAccessibleTextData)));
mpTextHelper->SetEventSource(this);
const ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 0c76e2a..40555e2 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -42,7 +42,7 @@
#include <rtl/ustrbuf.hxx>
#include <toolkit/helper/convert.hxx>
#include <vcl/svapp.hxx>
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -300,9 +300,7 @@ void ScAccessiblePageHeaderArea::CreateTextHelper()
{
if (!mpTextHelper)
{
- ::std::unique_ptr < ScAccessibleTextData > pAccessibleHeaderTextData
- (new ScAccessibleHeaderTextData(mpViewShell, mpEditObj, mbHeader, meAdjust));
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessibleHeaderTextData)));
+ ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessibleHeaderTextData>(mpViewShell, mpEditObj, mbHeader, meAdjust)));
mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
mpTextHelper->SetEventSource(this);
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 939b529..89c735c 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -40,7 +40,7 @@
#include <toolkit/helper/convert.hxx>
#include <comphelper/servicehelper.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
@@ -283,9 +283,7 @@ void ScAccessiblePreviewCell::CreateTextHelper()
{
if (!mpTextHelper)
{
- ::std::unique_ptr < ScAccessibleTextData > pAccessiblePreviewCellTextData
- (new ScAccessiblePreviewCellTextData(mpViewShell, maCellAddress));
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessiblePreviewCellTextData)));
+ ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessiblePreviewCellTextData>(mpViewShell, maCellAddress)));
mpTextHelper = new ::accessibility::AccessibleTextHelper( std::move(pEditSource) );
mpTextHelper->SetEventSource( this );
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 34c1ca2..5a40bcf 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -63,7 +63,7 @@
#include <comphelper/sequence.hxx>
#include <comphelper/servicehelper.hxx>
#include <toolkit/helper/convert.hxx>
-
+#include <o3tl/make_unique.hxx>
#ifdef indices
#undef indices
#endif
@@ -426,9 +426,8 @@ void ScAccessiblePreviewHeaderCell::CreateTextHelper()
{
if (!mpTextHelper)
{
- ::std::unique_ptr < ScAccessibleTextData > pAccessiblePreviewHeaderCellTextData
- (new ScAccessiblePreviewHeaderCellTextData(mpViewShell, OUString(getAccessibleName()), maCellPos, mbColumnHeader, mbRowHeader));
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(std::move(pAccessiblePreviewHeaderCellTextData)));
+
+ ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessiblePreviewHeaderCellTextData>(mpViewShell, OUString(getAccessibleName()), maCellPos, mbColumnHeader, mbRowHeader)));
mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
mpTextHelper->SetEventSource(this);
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 29535bd..89a428e 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -60,7 +60,7 @@
#include "drawview.hxx"
#include "clipparam.hxx"
#include "markdata.hxx"
-
+#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
// Reihenfolge der Kategorien im Navigator -------------------------------------
@@ -1674,8 +1674,7 @@ void ScContentTree::InitEntry(SvTreeListEntry* pEntry,
sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nColToHilite ));
- std::unique_ptr<SvLBoxString> pStr(new SvLBoxString(pEntry, 0, rCol.GetText()));
- pEntry->ReplaceItem(std::move(pStr), nColToHilite);
+ pEntry->ReplaceItem(o3tl::make_unique<SvLBoxString>(pEntry, 0, rCol.GetText()), nColToHilite);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/undo/undorangename.cxx b/sc/source/ui/undo/undorangename.cxx
index f387848..eb42eb4 100644
--- a/sc/source/ui/undo/undorangename.cxx
+++ b/sc/source/ui/undo/undorangename.cxx
@@ -17,7 +17,7 @@
#include <memory>
#include <utility>
-
+#include <o3tl/make_unique.hxx>
using ::std::unique_ptr;
ScUndoAllRangeNames::ScUndoAllRangeNames(
@@ -29,14 +29,12 @@ ScUndoAllRangeNames::ScUndoAllRangeNames(
std::map<OUString, ScRangeName*>::const_iterator itr, itrEnd;
for (itr = rOldNames.begin(), itrEnd = rOldNames.end(); itr != itrEnd; ++itr)
{
- unique_ptr<ScRangeName> p(new ScRangeName(*itr->second));
- m_OldNames.insert(std::make_pair(itr->first, std::move(p)));
+ m_OldNames.insert(std::make_pair(itr->first,o3tl::make_unique<ScRangeName>(*itr->second)));
}
for (auto const& it : rNewNames)
{
- unique_ptr<ScRangeName> p(new ScRangeName(*it.second));
- m_NewNames.insert(std::make_pair(it.first, std::move(p)));
+ m_NewNames.insert(std::make_pair(it.first, o3tl::make_unique<ScRangeName>(*it.second)));
}
}
diff --git a/sd/source/ui/dlg/sdtreelb.cxx b/sd/source/ui/dlg/sdtreelb.cxx
index e7cd06b..ed3ee16 100644
--- a/sd/source/ui/dlg/sdtreelb.cxx
+++ b/sd/source/ui/dlg/sdtreelb.cxx
@@ -55,7 +55,7 @@
#include <comphelper/servicehelper.hxx>
#include <comphelper/processfactory.hxx>
#include <tools/diagnose_ex.h>
-
+#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
class SdPageObjsTLB::IconProvider
@@ -373,8 +373,7 @@ void SdPageObjsTLB::InitEntry(SvTreeListEntry* pEntry,
sal_uInt16 nColToHilite = 1; //0==Bitmap;1=="Spalte1";2=="Spalte2"
SvTreeListBox::InitEntry( pEntry, rStr, rImg1, rImg2, eButtonKind );
SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem( nColToHilite ));
- std::unique_ptr<SvLBoxString> pStr(new SvLBoxString(pEntry, 0, rCol.GetText()));
- pEntry->ReplaceItem(std::move(pStr), nColToHilite );
+ pEntry->ReplaceItem(o3tl::make_unique<SvLBoxString>(pEntry, 0, rCol.GetText()), nColToHilite );
}
void SdPageObjsTLB::SaveExpandedTreeItemState(SvTreeListEntry* pEntry, std::vector<OUString>& vectTreeItem)
diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx
index 2b7c1dd..473ef30 100644
--- a/sfx2/source/dialog/templdlg.cxx
+++ b/sfx2/source/dialog/templdlg.cxx
@@ -69,7 +69,7 @@
#include <sfx2/StyleManager.hxx>
#include <sfx2/StylePreviewRenderer.hxx>
-
+#include <o3tl/make_unique.hxx>
using namespace css;
using namespace css::beans;
using namespace css::frame;
@@ -640,9 +640,7 @@ SvTreeListEntry* FillBox_Impl(SvTreeListBox* pBox,
if (officecfg::Office::Common::StylesAndFormatting::Preview::get())
{
- std::unique_ptr<StyleLBoxString> pStyleLBoxString(
- new StyleLBoxString(pTreeListEntry, 0, pEntry->getName(), eStyleFamily));
- pTreeListEntry->ReplaceItem(std::move(pStyleLBoxString), 1);
+ pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(pTreeListEntry, 0, pEntry->getName(), eStyleFamily), 1);
}
pBox->GetModel()->InvalidateEntry(pTreeListEntry);
@@ -1258,9 +1256,7 @@ void SfxCommonTemplateDialog_Impl::UpdateStyles_Impl(sal_uInt16 nFlags)
SvTreeListEntry* pTreeListEntry = aFmtLb->InsertEntry(aStrings[nPos], nullptr, false, nPos);
if (officecfg::Office::Common::StylesAndFormatting::Preview::get())
{
- std::unique_ptr<StyleLBoxString> pStyleLBoxString(
- new StyleLBoxString(pTreeListEntry, 0, aStrings[nPos], eFam));
- pTreeListEntry->ReplaceItem(std::move(pStyleLBoxString), 1);
+ pTreeListEntry->ReplaceItem(o3tl::make_unique<StyleLBoxString>(pTreeListEntry, 0, aStrings[nPos], eFam), 1);
}
aFmtLb->GetModel()->InvalidateEntry(pTreeListEntry);
}
diff --git a/starmath/source/accessibility.cxx b/starmath/source/accessibility.cxx
index d5e8217..6070737 100644
--- a/starmath/source/accessibility.cxx
+++ b/starmath/source/accessibility.cxx
@@ -59,7 +59,7 @@
#include <unomodel.hxx>
#include <document.hxx>
#include <view.hxx>
-
+#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
using namespace com::sun::star::lang;
using namespace com::sun::star::uno;
@@ -1625,10 +1625,8 @@ void SmEditAccessible::Init()
EditView *pEditView = pWin->GetEditView();
if (pEditEngine && pEditView)
{
- ::std::unique_ptr< SvxEditSource > pEditSource(
- new SmEditSource( pWin, *this ) );
assert(!pTextHelper);
- pTextHelper.reset(new ::accessibility::AccessibleTextHelper( std::move(pEditSource) ));
+ pTextHelper.reset(new ::accessibility::AccessibleTextHelper( o3tl::make_unique<SmEditSource>( pWin, *this ) ));
pTextHelper->SetEventSource( this );
}
}
diff --git a/svtools/source/contnr/svtabbx.cxx b/svtools/source/contnr/svtabbx.cxx
index 068758a..8e845bb 100644
--- a/svtools/source/contnr/svtabbx.cxx
+++ b/svtools/source/contnr/svtabbx.cxx
@@ -27,7 +27,7 @@
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include "svtaccessiblefactory.hxx"
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::accessibility;
@@ -83,8 +83,7 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
{
const OUString aToken = GetToken(aCurEntry, nIndex);
- std::unique_ptr<SvLBoxString> pStr(new SvLBoxString(pEntry, 0, aToken));
- pEntry->AddItem(std::move(pStr));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxString>(pEntry, 0, aToken));
}
}
SvTabListBox::SvTabListBox( vcl::Window* pParent, WinBits nBits )
diff --git a/svtools/source/contnr/treelistbox.cxx b/svtools/source/contnr/treelistbox.cxx
index 540f5b0..0397aed 100644
--- a/svtools/source/contnr/treelistbox.cxx
+++ b/svtools/source/contnr/treelistbox.cxx
@@ -44,7 +44,7 @@
#include <set>
#include <string.h>
#include <vector>
-
+#include <o3tl/make_unique.hxx>
using namespace css::accessibility;
// Drag&Drop
@@ -1730,17 +1730,12 @@ void SvTreeListBox::InitEntry(SvTreeListEntry* pEntry,
{
if( nTreeFlags & SvTreeFlags::CHKBTN )
{
- std::unique_ptr<SvLBoxButton> pButton(
- new SvLBoxButton(pEntry, eButtonKind, 0, pCheckButtonData));
- pEntry->AddItem(std::move(pButton));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(pEntry, eButtonKind, 0, pCheckButtonData));
}
- std::unique_ptr<SvLBoxContextBmp> pContextBmp(new SvLBoxContextBmp(
- pEntry,0, aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded));
- pEntry->AddItem(std::move(pContextBmp));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( pEntry,0, aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded));
- std::unique_ptr<SvLBoxString> pString(new SvLBoxString(pEntry, 0, aStr));
- pEntry->AddItem(std::move(pString));
+ pEntry->AddItem(o3tl::make_unique<SvLBoxString>(pEntry, 0, aStr));
}
OUString SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const
diff --git a/svtools/source/uno/treecontrolpeer.cxx b/svtools/source/uno/treecontrolpeer.cxx
index 0f4ed9b..e2699e9 100644
--- a/svtools/source/uno/treecontrolpeer.cxx
+++ b/svtools/source/uno/treecontrolpeer.cxx
@@ -39,7 +39,7 @@
#include <svtools/svlbitm.hxx>
#include <map>
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace css::uno;
using namespace css::lang;
@@ -239,10 +239,8 @@ UnoTreeListEntry* TreeControlPeer::createEntry( const Reference< XTreeNode >& xN
Image aImage;
pEntry = new UnoTreeListEntry( xNode, this );
{
- std::unique_ptr<ImplContextGraphicItem> pContextBmp(
- new ImplContextGraphicItem(pEntry, 0, aImage, aImage, true));
- pEntry->AddItem(std::move(pContextBmp));
+ pEntry->AddItem(o3tl::make_unique<ImplContextGraphicItem>(pEntry, 0, aImage, aImage, true));
}
std::unique_ptr<UnoTreeListItem> pUnoItem(new UnoTreeListItem(pEntry));
diff --git a/svx/source/accessibility/AccessibleShape.cxx b/svx/source/accessibility/AccessibleShape.cxx
index 310ef49..93b4e13 100644
--- a/svx/source/accessibility/AccessibleShape.cxx
+++ b/svx/source/accessibility/AccessibleShape.cxx
@@ -58,7 +58,7 @@
#include <algorithm>
#include <memory>
#include <utility>
-
+#include <o3tl/make_unique.hxx>
using namespace ::com::sun::star;
using namespace ::com::sun::star::accessibility;
using ::com::sun::star::uno::Reference;
@@ -172,14 +172,12 @@ void AccessibleShape::Init()
if( !pOutlinerParaObject )
{
// empty text -> use proxy edit source to delay creation of EditEngine
- ::std::unique_ptr<SvxEditSource> pEditSource( new AccessibleEmptyEditSource ( *pSdrObject, *pView, *pWindow) );
- mpText = new AccessibleTextHelper( std::move(pEditSource) );
+ mpText = new AccessibleTextHelper( o3tl::make_unique<AccessibleEmptyEditSource >(*pSdrObject, *pView, *pWindow) );
}
else
{
// non-empty text -> use full-fledged edit source right away
- ::std::unique_ptr<SvxEditSource> pEditSource( new SvxTextEditSource ( *pSdrObject, nullptr, *pView, *pWindow) );
- mpText = new AccessibleTextHelper( std::move(pEditSource) );
+ mpText = new AccessibleTextHelper( o3tl::make_unique<SvxTextEditSource >(*pSdrObject, nullptr, *pView, *pWindow) );
}
if( bOwnParaObj )
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index a81c369..ba48e63 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -57,7 +57,7 @@
#include <unotools/pathoptions.hxx>
#include "svtools/treelistentry.hxx"
#include <officecfg/Office/Recovery.hxx>
-
+#include <o3tl/make_unique.hxx>
namespace svx{
namespace DocRecovery{
@@ -845,9 +845,7 @@ void RecovDocList::InitEntry(SvTreeListEntry* pEntry,
DBG_ASSERT( TabCount() == 2, "*RecovDocList::InitEntry(): structure missmatch" );
SvLBoxString& rCol = static_cast<SvLBoxString&>(pEntry->GetItem(2));
- std::unique_ptr<RecovDocListEntry> p(
- new RecovDocListEntry(pEntry, 0, rCol.GetText()));
- pEntry->ReplaceItem(std::move(p), 2);
+ pEntry->ReplaceItem(o3tl::make_unique<RecovDocListEntry>(pEntry, 0, rCol.GetText()), 2);
}
diff --git a/svx/source/table/accessiblecell.cxx b/svx/source/table/accessiblecell.cxx
index 74b4fa8..0aec0e7 100644
--- a/svx/source/table/accessiblecell.cxx
+++ b/svx/source/table/accessiblecell.cxx
@@ -36,7 +36,7 @@
#include <editeng/outlobj.hxx>
#include <svx/unoshtxt.hxx>
#include <svx/svdotext.hxx>
-
+#include <o3tl/make_unique.hxx>
using namespace sdr::table;
using namespace ::com::sun::star;
using namespace ::com::sun::star::uno;
@@ -83,8 +83,8 @@ void AccessibleCell::Init()
if( pOutlinerParaObject )
{
// non-empty text -> use full-fledged edit source right away
- ::std::unique_ptr<SvxEditSource> pEditSource( new SvxTextEditSource( mxCell->GetObject(), mxCell.get(), *pView, *pWindow) );
- mpText = new AccessibleTextHelper( std::move(pEditSource) );
+
+ mpText = new AccessibleTextHelper( o3tl::make_unique<SvxTextEditSource>(mxCell->GetObject(), mxCell.get(), *pView, *pWindow) );
mpText->SetEventSource(this);
}
diff --git a/sw/source/core/doc/fmtcol.cxx b/sw/source/core/doc/fmtcol.cxx
index e436506..04a067f 100644
--- a/sw/source/core/doc/fmtcol.cxx
+++ b/sw/source/core/doc/fmtcol.cxx
@@ -35,7 +35,7 @@
#include <calbck.hxx>
#include <svl/intitem.hxx>
-
+#include <o3tl/make_unique.hxx>
namespace TextFormatCollFunc
{
// #i71574#
@@ -582,8 +582,7 @@ void SwConditionTextFormatColl::InsertCondition( const SwCollCondition& rCond )
}
// Not found -> so insert it
- std::unique_ptr<SwCollCondition> pNew(new SwCollCondition( rCond ));
- m_CondColls.push_back( std::move(pNew) );
+ m_CondColls.push_back( o3tl::make_unique<SwCollCondition> (rCond) );
}
bool SwConditionTextFormatColl::RemoveCondition( const SwCollCondition& rCond )
diff --git a/sw/source/core/text/blink.cxx b/sw/source/core/text/blink.cxx
index 9588973..e17a760 100644
--- a/sw/source/core/text/blink.cxx
+++ b/sw/source/core/text/blink.cxx
@@ -23,7 +23,7 @@
#include "blink.hxx"
#include "porlin.hxx"
#include "porlay.hxx"
-
+#include <o3tl/make_unique.hxx>
// Visible time
#define BLINK_ON_TIME 2400L
// Invisible time
@@ -147,9 +147,8 @@ void SwBlink::Replace( const SwLinePortion* pOld, const SwLinePortion* pNew )
SwBlinkSet::iterator it = m_List.find( pBlinkPortion );
if (it != m_List.end())
{
- std::unique_ptr<SwBlinkPortion> pTmp(new SwBlinkPortion(it->get(), pNew));
m_List.erase( it );
- m_List.insert(std::move(pTmp));
+ m_List.insert(o3tl::make_unique<SwBlinkPortion>(it->get(), pNew));
}
}
diff --git a/sw/source/core/undo/undobj.cxx b/sw/source/core/undo/undobj.cxx
index 928b831..400765c 100644
--- a/sw/source/core/undo/undobj.cxx
+++ b/sw/source/core/undo/undobj.cxx
@@ -996,9 +996,8 @@ bool SwUndo::FillSaveData(
&& eCmpPos != POS_COLLIDE_END
&& eCmpPos != POS_COLLIDE_START )
{
- std::unique_ptr<SwRedlineSaveData> pNewData(
- new SwRedlineSaveData(eCmpPos, *pStt, *pEnd, *pRedl, bCopyNext));
- rSData.push_back(std::move(pNewData));
+
+ rSData.push_back(o3tl::make_unique<SwRedlineSaveData>(eCmpPos, *pStt, *pEnd, *pRedl, bCopyNext));
}
}
if( !rSData.empty() && bDelRange )
diff --git a/sw/source/core/undo/unsort.cxx b/sw/source/core/undo/unsort.cxx
index 4399cdd..1e99538 100644
--- a/sw/source/core/undo/unsort.cxx
+++ b/sw/source/core/undo/unsort.cxx
@@ -29,7 +29,7 @@
#include <docsort.hxx>
#include <redline.hxx>
#include <node2lay.hxx>
-
+#include <o3tl/make_unique.hxx>
// Undo for Sorting
SwSortUndoElement::~SwSortUndoElement()
{
@@ -249,14 +249,12 @@ void SwUndoSort::RepeatImpl(::sw::RepeatContext & rContext)
void SwUndoSort::Insert( const OUString& rOrgPos, const OUString& rNewPos)
{
- std::unique_ptr<SwSortUndoElement> p(new SwSortUndoElement(rOrgPos, rNewPos));
- m_SortList.push_back(std::move(p));
+ m_SortList.push_back(o3tl::make_unique< SwSortUndoElement>(rOrgPos, rNewPos));
}
void SwUndoSort::Insert( sal_uLong nOrgPos, sal_uLong nNewPos)
{
- std::unique_ptr<SwSortUndoElement> p(new SwSortUndoElement(nOrgPos, nNewPos));
- m_SortList.push_back(std::move(p));
+ m_SortList.push_back(o3tl::make_unique<SwSortUndoElement>(nOrgPos, nNewPos));
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/core/undo/untbl.cxx b/sw/source/core/undo/untbl.cxx
index 116c686..d9efba0 100644
--- a/sw/source/core/undo/untbl.cxx
+++ b/sw/source/core/undo/untbl.cxx
@@ -66,7 +66,7 @@
#include <memory>
#include <vector>
-
+#include <o3tl/make_unique.hxx>
#ifdef DBG_UTIL
#define CHECK_TABLE(t) (t).CheckConsistency();
#else
@@ -674,9 +674,8 @@ void SwUndoTableToText::SetRange( const SwNodeRange& rRg )
void SwUndoTableToText::AddBoxPos( SwDoc& rDoc, sal_uLong nNdIdx, sal_uLong nEndIdx, sal_Int32 nContentIdx )
{
- std::unique_ptr<SwTableToTextSave> pNew(
- new SwTableToTextSave(rDoc, nNdIdx, nEndIdx, nContentIdx));
- m_pBoxSaves->push_back(std::move(pNew));
+
+ m_pBoxSaves->push_back(o3tl::make_unique<SwTableToTextSave>(rDoc, nNdIdx, nEndIdx, nContentIdx));
}
SwUndoTextToTable::SwUndoTextToTable( const SwPaM& rRg,
diff --git a/xmloff/source/style/impastpl.cxx b/xmloff/source/style/impastpl.cxx
index 69e535b..51a59e9 100644
--- a/xmloff/source/style/impastpl.cxx
+++ b/xmloff/source/style/impastpl.cxx
@@ -34,7 +34,7 @@
#include <xmloff/xmltoken.hxx>
#include "impastpl.hxx"
-
+#include <o3tl/make_unique.hxx>
using namespace ::std;
using namespace ::com::sun::star;
@@ -433,9 +433,7 @@ void SvXMLAutoStylePoolP_Impl::AddFamily(
}
#endif
- std::unique_ptr<XMLAutoStyleFamily> pFamily(
- new XMLAutoStyleFamily(nFamily, rStrName, rMapper, aPrefix, bAsFamily));
- m_FamilySet.insert(std::move(pFamily));
+ m_FamilySet.insert(o3tl::make_unique<XMLAutoStyleFamily>(nFamily, rStrName, rMapper, aPrefix, bAsFamily));
}
void SvXMLAutoStylePoolP_Impl::SetFamilyPropSetMapper(
More information about the Libreoffice-commits
mailing list