diff options
author | Gabor Kelemen <kelemen.gabor2@nisz.hu> | 2019-01-21 21:26:50 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-01-22 08:38:28 +0100 |
commit | 0c64df243259f574daaa4bc03bc4ddcc791c9073 (patch) | |
tree | 657a489d604ae2f7938369ef1789e746df0a3e69 | |
parent | fd8a724d22c92e3ebef4a3da126baaac3d3bde79 (diff) |
o3tl::make_unique -> std::make_unique in i18npool...reportdesign
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: I8bee1344f7df82536f31bc5e4ec4fd379cac1d04
Reviewed-on: https://gerrit.libreoffice.org/66704
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
23 files changed, 43 insertions, 67 deletions
diff --git a/i18npool/source/breakiterator/breakiterator_cjk.cxx b/i18npool/source/breakiterator/breakiterator_cjk.cxx index 356782b119f0..921ab47c220e 100644 --- a/i18npool/source/breakiterator/breakiterator_cjk.cxx +++ b/i18npool/source/breakiterator/breakiterator_cjk.cxx @@ -21,8 +21,6 @@ #include <localedata.hxx> #include <i18nutil/unicode.hxx> -#include <o3tl/make_unique.hxx> - using namespace ::com::sun::star::uno; using namespace ::com::sun::star::i18n; using namespace ::com::sun::star::lang; @@ -141,7 +139,7 @@ LineBreakResults SAL_CALL BreakIterator_CJK::getLineBreak( // ----------------------------------------------------; BreakIterator_zh::BreakIterator_zh() { - m_xDict = o3tl::make_unique<xdictionary>("zh"); + m_xDict = std::make_unique<xdictionary>("zh"); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "CN")); cBreakIterator = "com.sun.star.i18n.BreakIterator_zh"; } @@ -151,7 +149,7 @@ BreakIterator_zh::BreakIterator_zh() // ----------------------------------------------------; BreakIterator_zh_TW::BreakIterator_zh_TW() { - m_xDict = o3tl::make_unique<xdictionary>("zh"); + m_xDict = std::make_unique<xdictionary>("zh"); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("zh", "TW")); cBreakIterator = "com.sun.star.i18n.BreakIterator_zh_TW"; } @@ -161,7 +159,7 @@ BreakIterator_zh_TW::BreakIterator_zh_TW() // ----------------------------------------------------; BreakIterator_ja::BreakIterator_ja() { - m_xDict = o3tl::make_unique<xdictionary>("ja"); + m_xDict = std::make_unique<xdictionary>("ja"); m_xDict->setJapaneseWordBreak(); hangingCharacters = LocaleDataImpl::get()->getHangingCharacters(LOCALE("ja", "JP")); cBreakIterator = "com.sun.star.i18n.BreakIterator_ja"; diff --git a/i18npool/source/collator/gencoll_rule.cxx b/i18npool/source/collator/gencoll_rule.cxx index 88b8b50ea423..31480f3dc574 100644 --- a/i18npool/source/collator/gencoll_rule.cxx +++ b/i18npool/source/collator/gencoll_rule.cxx @@ -19,6 +19,7 @@ #include <sal/config.h> +#include <memory> #include <vector> #include <stdio.h> #include <string.h> @@ -27,7 +28,6 @@ #include <sal/main.h> #include <sal/types.h> #include <rtl/ustrbuf.hxx> -#include <o3tl/make_unique.hxx> #include <unicode/tblcoll.h> @@ -113,7 +113,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) //UCollator *coll = ucol_openRules(Obuf.getStr(), Obuf.getLength(), UCOL_OFF, // UCOL_DEFAULT_STRENGTH, &parseError, &status); - auto coll = o3tl::make_unique<icu::RuleBasedCollator>(reinterpret_cast<const UChar *>(Obuf.getStr()), status); + auto coll = std::make_unique<icu::RuleBasedCollator>(reinterpret_cast<const UChar *>(Obuf.getStr()), status); if (U_SUCCESS(status)) { std::vector<uint8_t> data; diff --git a/idl/source/cmptools/hash.cxx b/idl/source/cmptools/hash.cxx index 22899d6e5c64..ef11b489e5ae 100644 --- a/idl/source/cmptools/hash.cxx +++ b/idl/source/cmptools/hash.cxx @@ -25,7 +25,6 @@ #include <hash.hxx> #include <rtl/character.hxx> -#include <o3tl/make_unique.hxx> SvStringHashEntry * SvStringHashTable::Insert( const OString& rElement, sal_uInt32 * pInsertPos ) { @@ -35,7 +34,7 @@ SvStringHashEntry * SvStringHashTable::Insert( const OString& rElement, sal_uInt return maInt2EntryMap[*pInsertPos].get(); } maString2IntMap[rElement] = mnNextId; - maInt2EntryMap[mnNextId] = o3tl::make_unique<SvStringHashEntry>(rElement); + maInt2EntryMap[mnNextId] = std::make_unique<SvStringHashEntry>(rElement); *pInsertPos = mnNextId; mnNextId++; return maInt2EntryMap[*pInsertPos].get(); diff --git a/idlc/source/astexpression.cxx b/idlc/source/astexpression.cxx index f9f91a719435..486c74977864 100644 --- a/idlc/source/astexpression.cxx +++ b/idlc/source/astexpression.cxx @@ -23,7 +23,6 @@ #include <astscope.hxx> #include <errorhandler.hxx> -#include <o3tl/make_unique.hxx> #include <osl/diagnose.h> #include <limits.h> @@ -921,7 +920,7 @@ std::unique_ptr<AstExprValue> AstExpression::eval_symbol() pConst = static_cast< AstConstant* >(pDecl); pConst->getConstValue()->evaluate(); auto const val = pConst->getConstValue()->getExprValue(); - return val == nullptr ? nullptr : o3tl::make_unique<AstExprValue>(*val); + return val == nullptr ? nullptr : std::make_unique<AstExprValue>(*val); } OString AstExpression::toString() diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx index 84ac2b31b12e..a56e137cca85 100644 --- a/include/sfx2/childwin.hxx +++ b/include/sfx2/childwin.hxx @@ -230,11 +230,11 @@ public: std::unique_ptr<SfxChildWindowContext> Class::CreateImpl( vcl::Window *pParent, \ SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ { \ - return o3tl::make_unique<Class>(pParent,0,pBindings,pInfo);\ + return std::make_unique<Class>(pParent,0,pBindings,pInfo);\ } \ void Class::RegisterChildWindowContext(sal_uInt16 nId, SfxModule* pMod) \ { \ - auto pFact = o3tl::make_unique<SfxChildWinContextFactory>( \ + auto pFact = std::make_unique<SfxChildWinContextFactory>( \ Class::CreateImpl, nId ); \ SfxChildWindowContext::RegisterChildWindowContext(pMod, MyID, std::move(pFact)); \ } @@ -260,11 +260,11 @@ public: std::unique_ptr<SfxChildWindow> Class::CreateImpl( vcl::Window *pParent, \ sal_uInt16 nId, SfxBindings *pBindings, SfxChildWinInfo* pInfo ) \ { \ - return o3tl::make_unique<Class>(pParent, nId, pBindings, pInfo);\ + return std::make_unique<Class>(pParent, nId, pBindings, pInfo);\ } \ void Class::RegisterChildWindow (bool bVis, SfxModule *pMod, SfxChildWindowFlags nFlags) \ { \ - auto pFact = o3tl::make_unique<SfxChildWinFactory>( \ + auto pFact = std::make_unique<SfxChildWinFactory>( \ Class::CreateImpl, MyID, Pos ); \ pFact->aInfo.nFlags |= nFlags; \ pFact->aInfo.bVisible = bVis; \ diff --git a/include/svx/ClassificationField.hxx b/include/svx/ClassificationField.hxx index 84bf50754a79..31e033965621 100644 --- a/include/svx/ClassificationField.hxx +++ b/include/svx/ClassificationField.hxx @@ -77,7 +77,7 @@ public: std::unique_ptr<SvxFieldData> Clone() const override { - return o3tl::make_unique<ClassificationField>(meType, msDescription, msFullClassName, msIdentifier); + return std::make_unique<ClassificationField>(meType, msDescription, msFullClassName, msIdentifier); } bool operator==(const SvxFieldData& rOther) const override diff --git a/lingucomponent/source/spellcheck/spell/sspellimp.cxx b/lingucomponent/source/spellcheck/spell/sspellimp.cxx index b4bf958a045e..e62dfe5c6194 100644 --- a/lingucomponent/source/spellcheck/spell/sspellimp.cxx +++ b/lingucomponent/source/spellcheck/spell/sspellimp.cxx @@ -52,7 +52,6 @@ #include <vector> #include <set> #include <string.h> -#include <o3tl/make_unique.hxx> using namespace utl; using namespace osl; @@ -314,7 +313,7 @@ sal_Int16 SpellChecker::GetSpellFailure(const OUString &rWord, const Locale &rLo OString aTmpdict(OU2ENC(dict,osl_getThreadTextEncoding())); #endif - currDict.m_pDict = o3tl::make_unique<Hunspell>(aTmpaff.getStr(),aTmpdict.getStr()); + currDict.m_pDict = std::make_unique<Hunspell>(aTmpaff.getStr(),aTmpdict.getStr()); #if defined(H_DEPRECATED) currDict.m_aDEnc = getTextEncodingFromCharset(currDict.m_pDict->get_dict_encoding().c_str()); #else diff --git a/linguistic/source/lngsvcmgr.cxx b/linguistic/source/lngsvcmgr.cxx index 5a28687a5589..7b46b4af5eba 100644 --- a/linguistic/source/lngsvcmgr.cxx +++ b/linguistic/source/lngsvcmgr.cxx @@ -42,7 +42,6 @@ #include <cppuhelper/factory.hxx> #include <cppuhelper/implbase.hxx> #include <cppuhelper/supportsservice.hxx> -#include <o3tl/make_unique.hxx> #include "lngsvcmgr.hxx" #include "lngopt.hxx" @@ -1022,7 +1021,7 @@ void LngSvcMgr::GetAvailableSpellSvcs_Impl() aLanguages = LocaleSeqToLangVec( aLocaleSequence ); } - pAvailSpellSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); + pAvailSpellSvcs->push_back( std::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1085,7 +1084,7 @@ void LngSvcMgr::GetAvailableGrammarSvcs_Impl() aLanguages = LocaleSeqToLangVec( aLocaleSequence ); } - pAvailGrammarSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); + pAvailGrammarSvcs->push_back( std::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1145,7 +1144,7 @@ void LngSvcMgr::GetAvailableHyphSvcs_Impl() uno::Sequence<lang::Locale> aLocaleSequence(xSuppLoc->getLocales()); aLanguages = LocaleSeqToLangVec( aLocaleSequence ); } - pAvailHyphSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); + pAvailHyphSvcs->push_back( std::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } @@ -1207,7 +1206,7 @@ void LngSvcMgr::GetAvailableThesSvcs_Impl() aLanguages = LocaleSeqToLangVec( aLocaleSequence ); } - pAvailThesSvcs->push_back( o3tl::make_unique<SvcInfo>( aImplName, aLanguages ) ); + pAvailThesSvcs->push_back( std::make_unique<SvcInfo>( aImplName, aLanguages ) ); } } } diff --git a/lotuswordpro/source/filter/lwptblformula.cxx b/lotuswordpro/source/filter/lwptblformula.cxx index 4a1e6ecd8978..26081262ad5b 100644 --- a/lotuswordpro/source/filter/lwptblformula.cxx +++ b/lotuswordpro/source/filter/lwptblformula.cxx @@ -67,7 +67,6 @@ #include <osl/thread.h> #include <rtl/ustrbuf.hxx> #include <sal/log.hxx> -#include <o3tl/make_unique.hxx> #include <memory> LwpFormulaArg::~LwpFormulaArg() @@ -88,7 +87,7 @@ void LwpFormulaInfo::ReadConst() { double Constant = m_pObjStrm->QuickReadDouble(); - m_aStack.push_back( o3tl::make_unique<LwpFormulaConst>(Constant) ); + m_aStack.push_back( std::make_unique<LwpFormulaConst>(Constant) ); } /** @@ -107,7 +106,7 @@ void LwpFormulaInfo::ReadText() aText += OUString(aBuf.data(), nStrLen, osl_getThreadTextEncoding()); aText += "\""; - m_aStack.push_back(o3tl::make_unique<LwpFormulaText>(aText)); + m_aStack.push_back(std::make_unique<LwpFormulaText>(aText)); } void LwpFormulaInfo::ReadCellID() @@ -118,7 +117,7 @@ void LwpFormulaInfo::ReadCellID() RowSpecifier.QuickRead(m_pObjStrm.get()); ColumnSpecifier.QuickRead(m_pObjStrm.get()); - m_aStack.push_back( o3tl::make_unique<LwpFormulaCellAddr>(ColumnSpecifier.ColumnID(cColumn), + m_aStack.push_back( std::make_unique<LwpFormulaCellAddr>(ColumnSpecifier.ColumnID(cColumn), RowSpecifier.RowID(m_nFormulaRow)) ); } @@ -132,7 +131,7 @@ void LwpFormulaInfo::ReadCellRange() std::unique_ptr<LwpFormulaCellAddr> pEndCellAddr(static_cast<LwpFormulaCellAddr*>(m_aStack.back().release())); m_aStack.pop_back(); - m_aStack.push_back( o3tl::make_unique<LwpFormulaCellRangeAddr>(pStartCellAddr->GetCol(), + m_aStack.push_back( std::make_unique<LwpFormulaCellRangeAddr>(pStartCellAddr->GetCol(), pStartCellAddr->GetRow(), pEndCellAddr->GetCol(), pEndCellAddr->GetRow()) ); diff --git a/oox/source/crypto/CryptTools.cxx b/oox/source/crypto/CryptTools.cxx index ffe548d5912e..96290e0dc5fc 100644 --- a/oox/source/crypto/CryptTools.cxx +++ b/oox/source/crypto/CryptTools.cxx @@ -12,8 +12,6 @@ #include <filter/msfilter/mscodec.hxx> #include <com/sun/star/uno/RuntimeException.hpp> -#include <o3tl/make_unique.hxx> - #if USE_TLS_OPENSSL #include <openssl/evp.h> #include <openssl/sha.h> @@ -316,7 +314,7 @@ struct CryptoImpl #endif Crypto::Crypto() - : mpImpl(o3tl::make_unique<CryptoImpl>()) + : mpImpl(std::make_unique<CryptoImpl>()) { } diff --git a/oox/source/drawingml/effectproperties.cxx b/oox/source/drawingml/effectproperties.cxx index ff9ded567784..bbfee474b3f2 100644 --- a/oox/source/drawingml/effectproperties.cxx +++ b/oox/source/drawingml/effectproperties.cxx @@ -15,7 +15,6 @@ #include <oox/token/tokens.hxx> #include <basegfx/numeric/ftools.hxx> -#include <o3tl/make_unique.hxx> namespace oox { namespace drawingml { @@ -36,7 +35,7 @@ void EffectProperties::assignUsed( const EffectProperties& rSourceProps ) m_Effects.reserve(rSourceProps.m_Effects.size()); for (auto const& it : rSourceProps.m_Effects) { - m_Effects.push_back(o3tl::make_unique<Effect>(*it)); + m_Effects.push_back(std::make_unique<Effect>(*it)); } } } diff --git a/oox/source/drawingml/effectpropertiescontext.cxx b/oox/source/drawingml/effectpropertiescontext.cxx index 0316abbf752d..4c779e75f1ef 100644 --- a/oox/source/drawingml/effectpropertiescontext.cxx +++ b/oox/source/drawingml/effectpropertiescontext.cxx @@ -15,8 +15,6 @@ #include <oox/token/namespaces.hxx> #include <oox/token/tokens.hxx> -#include <o3tl/make_unique.hxx> - using namespace ::oox::core; using namespace ::com::sun::star::uno; using namespace ::com::sun::star::xml::sax; @@ -75,7 +73,7 @@ void EffectPropertiesContext::saveUnsupportedAttribs( Effect& rEffect, const Att ContextHandlerRef EffectPropertiesContext::onCreateContext( sal_Int32 nElement, const AttributeList& rAttribs ) { sal_Int32 nPos = mrEffectProperties.m_Effects.size(); - mrEffectProperties.m_Effects.push_back(o3tl::make_unique<Effect>()); + mrEffectProperties.m_Effects.push_back(std::make_unique<Effect>()); switch( nElement ) { case A_TOKEN( outerShdw ): diff --git a/package/inc/pch/precompiled_package2.hxx b/package/inc/pch/precompiled_package2.hxx index 6330a6611edb..57da3538fca5 100644 --- a/package/inc/pch/precompiled_package2.hxx +++ b/package/inc/pch/precompiled_package2.hxx @@ -140,7 +140,6 @@ #include <cppuhelper/weak.hxx> #include <cppuhelper/weakagg.hxx> #include <cppuhelper/weakref.hxx> -#include <o3tl/make_unique.hxx> #include <typelib/typeclass.h> #include <typelib/typedescription.h> #include <typelib/uik.h> diff --git a/package/qa/cppunit/test_package.cxx b/package/qa/cppunit/test_package.cxx index 0c49e55dca11..acd2b5c795a6 100644 --- a/package/qa/cppunit/test_package.cxx +++ b/package/qa/cppunit/test_package.cxx @@ -13,7 +13,6 @@ #include <comphelper/threadpool.hxx> #include <com/sun/star/packages/zip/ZipFileAccess.hpp> #include <com/sun/star/beans/NamedValue.hpp> -#include <o3tl/make_unique.hxx> #include <iterator> @@ -160,7 +159,7 @@ namespace mxNA->getByName(aName) >>= xStrm; CPPUNIT_ASSERT(xStrm.is()); - aPool.pushTask(o3tl::make_unique<Worker>(pTag, xStrm, *itBuf)); + aPool.pushTask(std::make_unique<Worker>(pTag, xStrm, *itBuf)); } aPool.waitUntilDone(pTag); diff --git a/package/source/zipapi/ZipFile.cxx b/package/source/zipapi/ZipFile.cxx index 60bdced74b5a..4f3092e56755 100644 --- a/package/source/zipapi/ZipFile.cxx +++ b/package/source/zipapi/ZipFile.cxx @@ -33,7 +33,6 @@ #include <rtl/digest.h> #include <sal/log.hxx> #include <osl/diagnose.h> -#include <o3tl/make_unique.hxx> #include <algorithm> #include <iterator> @@ -648,7 +647,7 @@ uno::Reference< XInputStream > ZipFile::createStreamForZipEntry( std::unique_ptr<ZipEnumeration> ZipFile::entries() { - return o3tl::make_unique<ZipEnumeration>(aEntries); + return std::make_unique<ZipEnumeration>(aEntries); } uno::Reference< XInputStream > ZipFile::getInputStream( ZipEntry& rEntry, diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx index 16efa6c4afba..6cbd1807b6c9 100644 --- a/package/source/zippackage/ZipPackage.cxx +++ b/package/source/zippackage/ZipPackage.cxx @@ -80,7 +80,6 @@ #include <comphelper/sequenceashashmap.hxx> #include <cppuhelper/supportsservice.hxx> #include <comphelper/sequence.hxx> -#include <o3tl/make_unique.hxx> using namespace std; using namespace osl; @@ -771,7 +770,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments ) OUString message; try { - m_pZipFile = o3tl::make_unique<ZipFile>(m_aMutexHolder, m_xContentStream, m_xContext, true, m_bForceRecovery); + m_pZipFile = std::make_unique<ZipFile>(m_aMutexHolder, m_xContentStream, m_xContext, true, m_bForceRecovery); getZipFileContents(); } catch ( IOException & e ) @@ -1151,7 +1150,7 @@ void ZipPackage::ConnectTo( const uno::Reference< io::XInputStream >& xInStream if ( m_pZipFile ) m_pZipFile->setInputStream( m_xContentStream ); else - m_pZipFile = o3tl::make_unique<ZipFile>(m_aMutexHolder, m_xContentStream, m_xContext, false); + m_pZipFile = std::make_unique<ZipFile>(m_aMutexHolder, m_xContentStream, m_xContext, false); } namespace diff --git a/package/source/zippackage/ZipPackageFolder.cxx b/package/source/zippackage/ZipPackageFolder.cxx index 8026ffc5cbf9..54ec4e40bbee 100644 --- a/package/source/zippackage/ZipPackageFolder.cxx +++ b/package/source/zippackage/ZipPackageFolder.cxx @@ -37,8 +37,6 @@ #include <EncryptedDataHeader.hxx> #include <rtl/instance.hxx> -#include <o3tl/make_unique.hxx> - using namespace com::sun::star; using namespace com::sun::star::packages::zip::ZipConstants; using namespace com::sun::star::packages::zip; @@ -409,9 +407,9 @@ uno::Any SAL_CALL ZipPackageFolder::getPropertyValue( const OUString& PropertyNa void ZipPackageFolder::doInsertByName ( ZipPackageEntry *pEntry, bool bSetParent ) { if ( pEntry->IsFolder() ) - maContents[pEntry->getName()] = o3tl::make_unique<ZipContentInfo>(static_cast<ZipPackageFolder*>(pEntry)); + maContents[pEntry->getName()] = std::make_unique<ZipContentInfo>(static_cast<ZipPackageFolder*>(pEntry)); else - maContents[pEntry->getName()] = o3tl::make_unique<ZipContentInfo>(static_cast<ZipPackageStream*>(pEntry)); + maContents[pEntry->getName()] = std::make_unique<ZipContentInfo>(static_cast<ZipPackageStream*>(pEntry)); if ( bSetParent ) pEntry->setParent ( *this ); } diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx index 6dad7d6f8b07..a1cc4bc34511 100644 --- a/package/source/zippackage/ZipPackageStream.cxx +++ b/package/source/zippackage/ZipPackageStream.cxx @@ -50,7 +50,6 @@ #include <cppuhelper/exc_hlp.hxx> #include <cppuhelper/supportsservice.hxx> #include <cppuhelper/typeprovider.hxx> -#include <o3tl/make_unique.hxx> #include <rtl/instance.hxx> #include <rtl/random.h> @@ -837,7 +836,7 @@ bool ZipPackageStream::saveChild( // Start a new thread deflating this zip entry ZipOutputEntry *pZipEntry = new ZipOutputEntry( m_xContext, *pTempEntry, this, bToBeEncrypted); - rZipOut.addDeflatingThread( pZipEntry, o3tl::make_unique<DeflateThread>(rZipOut.getThreadTaskTag(), pZipEntry, xStream) ); + rZipOut.addDeflatingThread( pZipEntry, std::make_unique<DeflateThread>(rZipOut.getThreadTaskTag(), pZipEntry, xStream) ); } else { diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx index 9d7e3d355a19..461da35829e3 100644 --- a/package/source/zippackage/zipfileaccess.cxx +++ b/package/source/zippackage/zipfileaccess.cxx @@ -34,7 +34,6 @@ #include <ucbhelper/content.hxx> #include <rtl/ref.hxx> -#include <o3tl/make_unique.hxx> #include <sal/log.hxx> #include <osl/diagnose.h> @@ -242,7 +241,7 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu } // TODO: in case xSeekable is implemented on separated XStream implementation a wrapper is required - m_pZipFile = o3tl::make_unique<ZipFile>( + m_pZipFile = std::make_unique<ZipFile>( m_aMutexHolder, m_xContentStream, m_xContext, diff --git a/reportdesign/source/core/sdr/ReportUndoFactory.cxx b/reportdesign/source/core/sdr/ReportUndoFactory.cxx index 1033a3eabc2d..3ceba3851749 100644 --- a/reportdesign/source/core/sdr/ReportUndoFactory.cxx +++ b/reportdesign/source/core/sdr/ReportUndoFactory.cxx @@ -20,7 +20,6 @@ #include <RptObject.hxx> #include <UndoActions.hxx> #include <strings.hrc> -#include <o3tl/make_unique.hxx> namespace rptui { @@ -35,9 +34,9 @@ static std::unique_ptr<SdrUndoAction> lcl_createUndo(SdrObject& rObject, Action uno::Reference< report::XSection> xSection = pObj->getSection(); uno::Reference< report::XGroup> xGroup = xSection->getGroup(); if ( xGroup.is() ) - return o3tl::make_unique<OUndoGroupSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OGroupHelper::getMemberFunction(xSection),xGroup,xReportComponent,pCommentId); + return std::make_unique<OUndoGroupSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OGroupHelper::getMemberFunction(xSection),xGroup,xReportComponent,pCommentId); else - return o3tl::make_unique<OUndoReportSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OReportHelper::getMemberFunction(xSection),xSection->getReportDefinition(),xReportComponent,pCommentId); + return std::make_unique<OUndoReportSectionAction>(rObject.getSdrModelFromSdrObject(),_eAction,OReportHelper::getMemberFunction(xSection),xSection->getReportDefinition(),xReportComponent,pCommentId); } diff --git a/reportdesign/source/core/sdr/UndoEnv.cxx b/reportdesign/source/core/sdr/UndoEnv.cxx index 5d6b46cff3a6..0b3e081df367 100644 --- a/reportdesign/source/core/sdr/UndoEnv.cxx +++ b/reportdesign/source/core/sdr/UndoEnv.cxx @@ -44,7 +44,6 @@ #include <dbaccess/dbsubcomponentcontroller.hxx> #include <svx/unoshape.hxx> #include <osl/mutex.hxx> -#include <o3tl/make_unique.hxx> namespace rptui { @@ -392,7 +391,7 @@ void SAL_CALL OXUndoEnvironment::elementInserted(const ContainerEvent& evt) if ( xContainer.is() ) { m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( - o3tl::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(), + std::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Inserted, xContainer.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) ); } } @@ -458,7 +457,7 @@ void SAL_CALL OXUndoEnvironment::elementRemoved(const ContainerEvent& evt) uno::Reference< report::XFunctions> xFunctions(evt.Source,uno::UNO_QUERY); if ( xFunctions.is() ) { - m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( o3tl::make_unique<OUndoContainerAction>( + m_pImpl->m_rModel.GetSdrUndoManager()->AddUndoAction( std::make_unique<OUndoContainerAction>( m_pImpl->m_rModel, rptui::Removed, xFunctions.get(), xIface, RID_STR_UNDO_ADDFUNCTION ) ); } } diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx index 809357a86495..cefc45f953b3 100644 --- a/reportdesign/source/ui/report/ReportController.cxx +++ b/reportdesign/source/ui/report/ReportController.cxx @@ -129,7 +129,6 @@ #include <unotools/syslocale.hxx> #include <unotools/viewoptions.hxx> #include <unotools/localedatawrapper.hxx> -#include <o3tl/make_unique.hxx> #include <osl/mutex.hxx> #include <PropertyForward.hxx> @@ -3769,13 +3768,13 @@ void OReportController::switchReportSection(const sal_Int16 _nId) const OUString sUndoAction(RptResId(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO + addUndoAction(std::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTHEADER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getReportHeader) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed )); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO + addUndoAction(std::make_unique<OReportSectionUndo>(*(m_aReportModel),SID_REPORTFOOTER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getReportFooter) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed @@ -3816,14 +3815,14 @@ void OReportController::switchPageSection(const sal_Int16 _nId) const OUString sUndoAction(RptResId(bSwitchOn ? RID_STR_UNDO_ADD_REPORTHEADERFOOTER : RID_STR_UNDO_REMOVE_REPORTHEADERFOOTER)); pUndoContext.reset( new UndoContext( getUndoManager(), sUndoAction ) ); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*m_aReportModel + addUndoAction(std::make_unique<OReportSectionUndo>(*m_aReportModel ,SID_PAGEHEADER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getPageHeader) ,m_xReportDefinition ,bSwitchOn ? Inserted : Removed )); - addUndoAction(o3tl::make_unique<OReportSectionUndo>(*m_aReportModel + addUndoAction(std::make_unique<OReportSectionUndo>(*m_aReportModel ,SID_PAGEFOOTER_WITHOUT_UNDO ,::std::mem_fn(&OReportHelper::getPageFooter) ,m_xReportDefinition @@ -3870,7 +3869,7 @@ void OReportController::modifyGroup(const bool _bAppend, const Sequence< Propert rUndoEnv.AddElement( xGroup->getFunctions() ); } - addUndoAction( o3tl::make_unique<OGroupUndo>( + addUndoAction( std::make_unique<OGroupUndo>( *m_aReportModel, _bAppend ? RID_STR_UNDO_APPEND_GROUP : RID_STR_UNDO_REMOVE_GROUP, _bAppend ? Inserted : Removed, @@ -3904,7 +3903,7 @@ void OReportController::createGroupSection(const bool _bUndo,const bool _bHeader { const OXUndoEnvironment::OUndoEnvLock aLock(m_aReportModel->GetUndoEnv()); if ( _bUndo ) - addUndoAction(o3tl::make_unique<OGroupSectionUndo>(*m_aReportModel + addUndoAction(std::make_unique<OGroupSectionUndo>(*m_aReportModel ,_bHeader ? SID_GROUPHEADER_WITHOUT_UNDO : SID_GROUPFOOTER_WITHOUT_UNDO ,_bHeader ? ::std::mem_fn(&OGroupHelper::getHeader) : ::std::mem_fn(&OGroupHelper::getFooter) ,xGroup diff --git a/reportdesign/source/ui/report/SectionView.cxx b/reportdesign/source/ui/report/SectionView.cxx index c1c3c48bd853..1181581737cb 100644 --- a/reportdesign/source/ui/report/SectionView.cxx +++ b/reportdesign/source/ui/report/SectionView.cxx @@ -29,7 +29,6 @@ #include <strings.hxx> #include <tools/debug.hxx> #include <tools/diagnose_ex.h> -#include <o3tl/make_unique.hxx> namespace rptui { @@ -177,7 +176,7 @@ void OSectionView::SetMarkedToLayer( SdrLayerID _nLayerNo ) SdrObject* pObj = rMark.GetMark(i)->GetMarkedSdrObj(); if ( dynamic_cast< const OCustomShape *>( pObj ) != nullptr ) { - AddUndo( o3tl::make_unique<SdrUndoObjectLayerChange>( *pObj, pObj->GetLayer(), _nLayerNo) ); + AddUndo( std::make_unique<SdrUndoObjectLayerChange>( *pObj, pObj->GetLayer(), _nLayerNo) ); pObj->SetLayer( _nLayerNo ); OObjectBase& rBaseObj = dynamic_cast<OObjectBase&>(*pObj); try |