summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-06-14 18:19:04 +0200
committerStephan Bergmann <sbergman@redhat.com>2016-06-14 18:19:26 +0200
commit83360372383fdcbab18560a5113c92115b166cd5 (patch)
treef2731a6a09ba425bd2114de95184d60bedb6828a
parent3c2803bdbc598deeaf6efe43870d4f9d61cb2c6a (diff)
tdf#94205: Some remaining new+std::move -> o3tl::make_unique
Change-Id: I6a9a46d37bf09f6b497d591498c40103f4c96f59
-rw-r--r--sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewCell.cxx10
-rw-r--r--sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx12
-rw-r--r--starmath/source/parse.cxx3
-rw-r--r--svl/source/numbers/zforlist.cxx13
5 files changed, 21 insertions, 27 deletions
diff --git a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
index 40555e2fa975..4b6f9bcabbea 100644
--- a/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePageHeaderArea.cxx
@@ -19,9 +19,6 @@
#include <sal/config.h>
-#include <memory>
-#include <utility>
-
#include <tools/gen.hxx>
#include "AccessiblePageHeaderArea.hxx"
#include "AccessibleText.hxx"
@@ -300,9 +297,10 @@ void ScAccessiblePageHeaderArea::CreateTextHelper()
{
if (!mpTextHelper)
{
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessibleHeaderTextData>(mpViewShell, mpEditObj, mbHeader, meAdjust)));
-
- mpTextHelper = new ::accessibility::AccessibleTextHelper(std::move(pEditSource));
+ mpTextHelper = new ::accessibility::AccessibleTextHelper(
+ o3tl::make_unique<ScAccessibilityEditSource>(
+ o3tl::make_unique<ScAccessibleHeaderTextData>(
+ mpViewShell, mpEditObj, mbHeader, meAdjust)));
mpTextHelper->SetEventSource(this);
}
}
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
index 89c735ca0472..5383e688bfcf 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewCell.cxx
@@ -19,9 +19,6 @@
#include <sal/config.h>
-#include <memory>
-#include <utility>
-
#include "scitems.hxx"
#include <editeng/eeitem.hxx>
#include <tools/gen.hxx>
@@ -283,9 +280,10 @@ void ScAccessiblePreviewCell::CreateTextHelper()
{
if (!mpTextHelper)
{
- ::std::unique_ptr< SvxEditSource > pEditSource (new ScAccessibilityEditSource(o3tl::make_unique<ScAccessiblePreviewCellTextData>(mpViewShell, maCellAddress)));
-
- mpTextHelper = new ::accessibility::AccessibleTextHelper( std::move(pEditSource) );
+ mpTextHelper = new ::accessibility::AccessibleTextHelper(
+ o3tl::make_unique<ScAccessibilityEditSource>(
+ o3tl::make_unique<ScAccessiblePreviewCellTextData>(
+ mpViewShell, maCellAddress)));
mpTextHelper->SetEventSource( this );
// paragraphs in preview are transient
diff --git a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
index 816a78dc4b72..3aed647783de 100644
--- a/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
+++ b/sc/source/ui/Accessibility/AccessiblePreviewHeaderCell.cxx
@@ -19,9 +19,6 @@
#include <sal/config.h>
-#include <memory>
-#include <utility>
-
/* Somehow, under same circumstances, MSVC creates object code for 2
* inlined functions. Nobody here uses them, so simply define them away
* so that there be no dupplicate symbols anymore.
@@ -420,10 +417,11 @@ void ScAccessiblePreviewHeaderCell::CreateTextHelper()
{
if (!mpTextHelper)
{
-
- ::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 = new ::accessibility::AccessibleTextHelper(
+ o3tl::make_unique<ScAccessibilityEditSource>(
+ o3tl::make_unique<ScAccessiblePreviewHeaderCellTextData>(
+ mpViewShell, OUString(getAccessibleName()), maCellPos,
+ mbColumnHeader, mbRowHeader)));
mpTextHelper->SetEventSource(this);
}
}
diff --git a/starmath/source/parse.cxx b/starmath/source/parse.cxx
index 5674e3dd4f38..26f6f45415a9 100644
--- a/starmath/source/parse.cxx
+++ b/starmath/source/parse.cxx
@@ -1566,8 +1566,7 @@ void SmParser::DoEscape()
Error(PE_UNEXPECTED_TOKEN);
}
- std::unique_ptr<SmNode> pNode(new SmMathSymbolNode(m_aCurToken));
- m_aNodeStack.push_front(std::move(pNode));
+ m_aNodeStack.push_front(o3tl::make_unique<SmMathSymbolNode>(m_aCurToken));
NextToken();
}
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index 9cfe4cc2e85a..06dc916492fa 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -24,6 +24,7 @@
#include <svl/currencytable.hxx>
#include <comphelper/string.hxx>
+#include <o3tl/make_unique.hxx>
#include <tools/debug.hxx>
#include <unotools/charclass.hxx>
#include <unotools/configmgr.hxx>
@@ -3737,12 +3738,11 @@ void SvNumberFormatter::ImpInitCurrencyTable()
aConfiguredCurrencyAbbrev, eConfiguredCurrencyLanguage );
sal_uInt16 nSecondarySystemCurrencyPosition = 0;
sal_uInt16 nMatchingSystemCurrencyPosition = 0;
- std::unique_ptr<NfCurrencyEntry> pEntry(
- // first entry is SYSTEM
- new NfCurrencyEntry( *pLocaleData, LANGUAGE_SYSTEM ));
+ // First entry is SYSTEM:
theCurrencyTable::get().insert(
- theCurrencyTable::get().begin(), std::move(pEntry));
+ theCurrencyTable::get().begin(),
+ o3tl::make_unique<NfCurrencyEntry>(*pLocaleData, LANGUAGE_SYSTEM));
sal_uInt16 nCurrencyPos = 1;
css::uno::Sequence< css::lang::Locale > xLoc = LocaleDataWrapper::getInstalledLocaleNames();
@@ -3769,6 +3769,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
if ( pCurrencies[nDefault].Default )
break;
}
+ std::unique_ptr<NfCurrencyEntry> pEntry;
if ( nDefault < nCurrencyCount )
{
pEntry.reset(new NfCurrencyEntry(pCurrencies[nDefault], *pLocaleData, eLang));
@@ -3802,10 +3803,10 @@ void SvNumberFormatter::ImpInitCurrencyTable()
{
if (pCurrencies[nCurrency].LegacyOnly)
{
- pEntry.reset(new NfCurrencyEntry(pCurrencies[nCurrency], *pLocaleData, eLang));
rLegacyOnlyCurrencyTable.insert(
rLegacyOnlyCurrencyTable.begin() + nLegacyOnlyCurrencyPos++,
- std::move(pEntry));
+ o3tl::make_unique<NfCurrencyEntry>(
+ pCurrencies[nCurrency], *pLocaleData, eLang));
}
else if ( nCurrency != nDefault )
{