Kaydet (Commit) 0c64df24 authored tarafından Gabor Kelemen's avatar Gabor Kelemen Kaydeden (comit) Noel Grandin

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: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst fd8a724d
......@@ -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";
......
......@@ -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;
......
......@@ -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();
......
......@@ -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()
......
......@@ -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; \
......
......@@ -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
......
......@@ -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
......
......@@ -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 ) );
}
}
}
......
......@@ -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()) );
......
......@@ -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>())
{
}
......
......@@ -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));
}
}
}
......
......@@ -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 ):
......
......@@ -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>
......
......@@ -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);
......
......@@ -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,
......
......@@ -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
......
......@@ -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 );
}
......
......@@ -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
{
......
......@@ -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,
......
......@@ -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);
}
......
......@@ -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 ) );
}
}
......
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment