Kaydet (Commit) 4e8a15ca authored tarafından Gabor Kelemen's avatar Gabor Kelemen Kaydeden (comit) Miklos Vajna

o3tl::make_unique -> std::make_unique in sax...svtools (except sc)

Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one

Change-Id: I6eea0877eaa1886b64c0cce06a43b8088cbccd8e
Reviewed-on: https://gerrit.libreoffice.org/66751
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 5238ff88
......@@ -22,7 +22,6 @@
#include <sal/types.h>
#include <o3tl/make_unique.hxx>
#include <rtl/textenc.h>
#include <rtl/tencinfo.h>
#include <com/sun/star/io/NotConnectedException.hpp>
......@@ -324,8 +323,8 @@ void XMLFile2UTFConverter::initializeDecoding()
rtl_TextEncoding encoding = rtl_getTextEncodingFromMimeCharset( m_sEncoding.getStr() );
if( encoding != RTL_TEXTENCODING_UTF8 )
{
m_pText2Unicode = o3tl::make_unique<Text2UnicodeConverter>( m_sEncoding );
m_pUnicode2Text = o3tl::make_unique<Unicode2TextConverter>( RTL_TEXTENCODING_UTF8 );
m_pText2Unicode = std::make_unique<Text2UnicodeConverter>( m_sEncoding );
m_pUnicode2Text = std::make_unique<Unicode2TextConverter>( RTL_TEXTENCODING_UTF8 );
}
}
}
......
......@@ -30,7 +30,6 @@
#include <sax/fastparser.hxx>
#include <memory>
#include <vector>
#include <o3tl/make_unique.hxx>
using namespace std;
using namespace ::cppu;
......@@ -85,7 +84,7 @@ void NamespaceHandler::addNSDeclAttributes( rtl::Reference < comphelper::Attribu
void NamespaceHandler::registerNamespace( const OUString& rNamespacePrefix, const OUString& rNamespaceURI )
{
m_aNamespaceDefines.push_back( o3tl::make_unique<NamespaceDefine>(
m_aNamespaceDefines.push_back( std::make_unique<NamespaceDefine>(
rNamespacePrefix, rNamespaceURI) );
}
......
......@@ -38,7 +38,6 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <osl/diagnose.h>
#include <o3tl/make_unique.hxx>
#include <rtl/tencinfo.h>
#include <rtl/ustrbuf.hxx>
#include <rtl/strbuf.hxx>
......@@ -338,7 +337,7 @@ void StringResourceImpl::setDefaultLocale( const Locale& locale )
if( m_pDefaultLocaleItem )
{
m_aChangedDefaultLocaleVector.push_back(
o3tl::make_unique<LocaleItem>( m_pDefaultLocaleItem->m_locale ) );
std::make_unique<LocaleItem>( m_pDefaultLocaleItem->m_locale ) );
}
m_pDefaultLocaleItem = pLocaleItem;
......@@ -522,7 +521,7 @@ void StringResourceImpl::removeLocale( const Locale& locale )
if( m_pDefaultLocaleItem )
{
m_aChangedDefaultLocaleVector.push_back(
o3tl::make_unique<LocaleItem>( m_pDefaultLocaleItem->m_locale ) );
std::make_unique<LocaleItem>( m_pDefaultLocaleItem->m_locale ) );
}
m_pCurrentLocaleItem = nullptr;
m_pDefaultLocaleItem = nullptr;
......
......@@ -351,7 +351,6 @@
#include <imapinfo.hxx>
#include <notifydocumentevent.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <pglink.hxx>
......
......@@ -31,7 +31,6 @@
#include <cppuhelper/basemutex.hxx>
#include <unotools/datetime.hxx>
#include <o3tl/make_unique.hxx>
#include <sfx2/viewsh.hxx>
#include <svx/svdundo.hxx>
......@@ -352,7 +351,7 @@ void Annotation::createChangeUndo()
{
SdrModel* pModel = GetModel(); // TTTT should use reference
if( pModel && pModel->IsUndoEnabled() )
pModel->AddUndo( o3tl::make_unique<UndoAnnotation>( *this ) );
pModel->AddUndo( std::make_unique<UndoAnnotation>( *this ) );
if( pModel )
{
......@@ -380,7 +379,7 @@ std::unique_ptr<SdrUndoAction> CreateUndoInsertOrRemoveAnnotation( const Referen
Annotation* pAnnotation = dynamic_cast< Annotation* >( xAnnotation.get() );
if( pAnnotation )
{
return o3tl::make_unique< UndoInsertOrRemoveAnnotation >( *pAnnotation, bInsert );
return std::make_unique< UndoInsertOrRemoveAnnotation >( *pAnnotation, bInsert );
}
else
{
......
......@@ -30,7 +30,6 @@
#include <svx/svdundo.hxx>
#include <vcl/weld.hxx>
#include <xmloff/autolayout.hxx>
#include <o3tl/make_unique.hxx>
#include <strings.hrc>
#include <drawdoc.hxx>
......@@ -497,7 +496,7 @@ bool SdDrawDocument::InsertBookmarkAsPage(
{
if( pUndoMgr )
{
pUndoMgr->AddUndoAction(o3tl::make_unique<SdMoveStyleSheetsUndoAction>(this, aCreatedStyles, true));
pUndoMgr->AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(this, aCreatedStyles, true));
}
}
}
......@@ -936,10 +935,10 @@ bool SdDrawDocument::InsertBookmarkAsPage(
// styles, so it cannot be used after this point
lcl_removeUnusedStyles(GetStyleSheetPool(), aNewGraphicStyles);
if (!aNewGraphicStyles.empty() && pUndoMgr)
pUndoMgr->AddUndoAction(o3tl::make_unique<SdMoveStyleSheetsUndoAction>(this, aNewGraphicStyles, true));
pUndoMgr->AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(this, aNewGraphicStyles, true));
lcl_removeUnusedStyles(GetStyleSheetPool(), aNewCellStyles);
if (!aNewCellStyles.empty() && pUndoMgr)
pUndoMgr->AddUndoAction(o3tl::make_unique<SdMoveStyleSheetsUndoAction>(this, aNewCellStyles, true));
pUndoMgr->AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(this, aNewCellStyles, true));
if( bUndo )
EndUndo();
......@@ -1288,7 +1287,7 @@ void SdDrawDocument::RemoveUnnecessaryMasterPages(SdPage* pMasterPage, bool bOnl
aUndoRemove.emplace_back(a.get(), true);
if (pUndoMgr)
pUndoMgr->AddUndoAction(o3tl::make_unique<SdMoveStyleSheetsUndoAction>(this, aUndoRemove, false));
pUndoMgr->AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(this, aUndoRemove, false));
}
for( const auto& a : aRemove )
......@@ -1542,7 +1541,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if (bUndo)
{
pUndoMgr->AddUndoAction(o3tl::make_unique<StyleSheetUndoAction>(this,
pUndoMgr->AddUndoAction(std::make_unique<StyleSheetUndoAction>(this,
pMySheet, &pHisSheet->GetItemSet()));
}
pMySheet->GetItemSet().Put(pHisSheet->GetItemSet());
......@@ -1613,7 +1612,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
{
// Add UndoAction for creating and inserting the stylesheets to
// the top of the UndoManager
pUndoMgr->AddUndoAction(o3tl::make_unique<SdMoveStyleSheetsUndoAction>( this, aCreatedStyles, true));
pUndoMgr->AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>( this, aCreatedStyles, true));
}
}
......@@ -1699,7 +1698,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if( bUndo )
{
pUndoMgr->AddUndoAction(o3tl::make_unique<SdPresentationLayoutUndoAction>
pUndoMgr->AddUndoAction(std::make_unique<SdPresentationLayoutUndoAction>
(this,
pPage->IsMasterPage() ? aLayoutName : aOldLayoutName,
aLayoutName,
......@@ -1765,7 +1764,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
aUndoInsert.reserve(aCreatedStyles.size());
for (const auto& a : aCreatedStyles)
aUndoInsert.emplace_back(a.get(), true);
pUndoMgr->AddUndoAction(o3tl::make_unique<SdMoveStyleSheetsUndoAction>(this, aUndoInsert, true));
pUndoMgr->AddUndoAction(std::make_unique<SdMoveStyleSheetsUndoAction>(this, aUndoInsert, true));
}
// Generate new master pages and register them with the document
......@@ -1834,7 +1833,7 @@ void SdDrawDocument::SetMasterPage(sal_uInt16 nSdPageNum,
if( bUndo )
{
pUndoMgr->AddUndoAction(o3tl::make_unique<SdPresentationLayoutUndoAction>
pUndoMgr->AddUndoAction(std::make_unique<SdPresentationLayoutUndoAction>
(this, aOldLayoutName, aName,
eOldAutoLayout, eNewAutoLayout, true,
rpPage));
......
......@@ -55,7 +55,6 @@
#include <rtl/ustring.hxx>
#include <sal/log.hxx>
#include <o3tl/enumarray.hxx>
#include <o3tl/make_unique.hxx>
#include <xmloff/autolayout.hxx>
#include <Outliner.hxx>
......@@ -569,8 +568,8 @@ SdrObject* SdPage::CreatePresObj(PresObjKind eObjKind, bool bVertical, const ::t
if( bUndo )
{
pUndoManager->AddUndoAction( o3tl::make_unique<UndoObjectPresentationKind>( *pSdrObj ) );
pUndoManager->AddUndoAction( o3tl::make_unique<UndoObjectUserCall>(*pSdrObj) );
pUndoManager->AddUndoAction( std::make_unique<UndoObjectPresentationKind>( *pSdrObj ) );
pUndoManager->AddUndoAction( std::make_unique<UndoObjectUserCall>(*pSdrObj) );
}
InsertPresObj(pSdrObj, eObjKind);
......@@ -733,7 +732,7 @@ void SdPage::Changed(const SdrObject& rObj, SdrUserCallType eType, const ::tools
if (bUndo)
pUndoManager->AddUndoAction(
o3tl::make_unique<UndoObjectUserCall>(_rObj));
std::make_unique<UndoObjectUserCall>(_rObj));
// Object was resized by user and does not listen to its slide anymore
_rObj.SetUserCall(nullptr);
......@@ -2217,7 +2216,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
{
pUndoManager->AddUndoAction( getSdrModelFromSdrPage().GetSdrUndoFactory().CreateUndoGeoObject( *pObj ) );
pUndoManager->AddUndoAction( getSdrModelFromSdrPage().GetSdrUndoFactory().CreateUndoAttrObject( *pObj, true, true ) );
pUndoManager->AddUndoAction( o3tl::make_unique<UndoObjectUserCall>( *pObj ) );
pUndoManager->AddUndoAction( std::make_unique<UndoObjectUserCall>( *pObj ) );
}
pObj->AdjustToMaxRect(rRect);
......@@ -2280,7 +2279,7 @@ SdrObject* SdPage::InsertAutoLayoutShape(SdrObject* pObj, PresObjKind eObjKind,
if( !IsPresObj( pObj ) )
{
if( bUndo )
pUndoManager->AddUndoAction( o3tl::make_unique<UndoObjectPresentationKind>( *pObj ) );
pUndoManager->AddUndoAction( std::make_unique<UndoObjectPresentationKind>( *pObj ) );
InsertPresObj( pObj, eObjKind );
}
......
......@@ -19,7 +19,6 @@
#include <vector>
#include <libxml/xmlwriter.h>
#include <o3tl/make_unique.hxx>
#include <sfx2/docfile.hxx>
#include <sfx2/linkmgr.hxx>
#include <svx/svdundo.hxx>
......@@ -448,7 +447,7 @@ SfxStyleSheet* SdPage::GetTextStyleSheetForObject( SdrObject* pObj ) const
SfxItemSet* SdPage::getOrCreateItems()
{
if( mpItems == nullptr )
mpItems = o3tl::make_unique<SfxItemSet>( getSdrModelFromSdrPage().GetItemPool(), svl::Items<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES>{} );
mpItems = std::make_unique<SfxItemSet>( getSdrModelFromSdrPage().GetItemPool(), svl::Items<SDRATTR_XMLATTRIBUTES, SDRATTR_XMLATTRIBUTES>{} );
return mpItems.get();
}
......
......@@ -30,7 +30,6 @@
#include <Outliner.hxx>
#include <svx/svdpool.hxx>
#include <svx/svdundo.hxx>
#include <o3tl/make_unique.hxx>
namespace com { namespace sun { namespace star { namespace container { class XNameContainer; } } } }
namespace com { namespace sun { namespace star { namespace text { class XTextField; } } } }
......@@ -138,7 +137,7 @@ TextApiObject::~TextApiObject() throw()
rtl::Reference< TextApiObject > TextApiObject::create( SdDrawDocument* pDoc )
{
rtl::Reference< TextApiObject > xRet( new TextApiObject( o3tl::make_unique<TextAPIEditSource>( pDoc ) ) );
rtl::Reference< TextApiObject > xRet( new TextApiObject( std::make_unique<TextAPIEditSource>( pDoc ) ) );
return xRet;
}
......@@ -161,7 +160,7 @@ void TextApiObject::SetText( OutlinerParaObject const & rText )
{
SdrModel* pModel = mpSource->GetDoc();
if( pModel && pModel->IsUndoEnabled() )
pModel->AddUndo( o3tl::make_unique<UndoTextAPIChanged>( *pModel, this ) );
pModel->AddUndo( std::make_unique<UndoTextAPIChanged>( *pModel, this ) );
mpSource->SetText( rText );
maSelection.nStartPara = EE_PARA_MAX_COUNT;
......
......@@ -19,38 +19,37 @@
#include <undo/undofactory.hxx>
#include <undo/undoobjects.hxx>
#include <o3tl/make_unique.hxx>
using namespace sd;
std::unique_ptr<SdrUndoAction> UndoFactory::CreateUndoRemoveObject( SdrObject& rObject, bool bOrdNumDirect )
{
return o3tl::make_unique<UndoRemoveObject>( rObject, bOrdNumDirect );
return std::make_unique<UndoRemoveObject>( rObject, bOrdNumDirect );
}
std::unique_ptr<SdrUndoAction> UndoFactory::CreateUndoDeleteObject( SdrObject& rObject, bool bOrdNumDirect )
{
return o3tl::make_unique<UndoDeleteObject>( rObject, bOrdNumDirect );
return std::make_unique<UndoDeleteObject>( rObject, bOrdNumDirect );
}
std::unique_ptr<SdrUndoAction> UndoFactory::CreateUndoObjectSetText( SdrObject& rNewObj, sal_Int32 nText )
{
return o3tl::make_unique<UndoObjectSetText>( rNewObj, nText );
return std::make_unique<UndoObjectSetText>( rNewObj, nText );
}
std::unique_ptr<SdrUndoAction> UndoFactory::CreateUndoReplaceObject( SdrObject& rOldObject, SdrObject& rNewObject, bool bOrdNumDirect )
{
return o3tl::make_unique<UndoReplaceObject>( rOldObject, rNewObject, bOrdNumDirect );
return std::make_unique<UndoReplaceObject>( rOldObject, rNewObject, bOrdNumDirect );
}
std::unique_ptr<SdrUndoAction> UndoFactory::CreateUndoGeoObject( SdrObject& rObject )
{
return o3tl::make_unique<UndoGeoObject>( rObject );
return std::make_unique<UndoGeoObject>( rObject );
}
std::unique_ptr<SdrUndoAction> UndoFactory::CreateUndoAttrObject( SdrObject& rObject, bool bStyleSheet1, bool bSaveText )
{
return o3tl::make_unique<UndoAttrObject>( rObject, bStyleSheet1, bSaveText );
return std::make_unique<UndoAttrObject>( rObject, bStyleSheet1, bSaveText );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -18,7 +18,6 @@
*/
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
#include <oox/token/namespaces.hxx>
#include <oox/token/tokens.hxx>
#include "epptooxml.hxx"
......@@ -1191,7 +1190,7 @@ void PPTXAnimationExport::WriteAnimations(const Reference<XDrawPage>& rXDrawPage
UNO_QUERY);
if (xEnumeration.is() && xEnumeration->hasMoreElements())
{
auto pNodeContext = o3tl::make_unique<NodeContext>(xNode, false, false);
auto pNodeContext = std::make_unique<NodeContext>(xNode, false, false);
if (pNodeContext->isValid())
{
mpFS->startElementNS(XML_p, XML_timing, FSEND);
......@@ -1296,7 +1295,7 @@ bool NodeContext::initChildNodes()
if (xChildNode.is())
{
auto pChildContext
= o3tl::make_unique<NodeContext>(xChildNode, bIsMainSeq, bIsIterateChild);
= std::make_unique<NodeContext>(xChildNode, bIsMainSeq, bIsIterateChild);
if (pChildContext->isValid())
bValid = true;
maChildNodes.push_back(std::move(pChildContext));
......
......@@ -56,7 +56,6 @@
#include <vcl/metric.hxx>
#include <vcl/outdev.hxx>
#include <vcl/virdev.hxx>
#include <o3tl/make_unique.hxx>
using namespace css;
......@@ -1212,7 +1211,7 @@ void ParagraphObj::ImplConstruct( const ParagraphObj& rParagraphObj )
mnBiDi = rParagraphObj.mnBiDi;
for ( std::vector<std::unique_ptr<PortionObj> >::const_iterator it = rParagraphObj.begin(); it != rParagraphObj.end(); ++it )
mvPortions.push_back( o3tl::make_unique<PortionObj>( **it ) );
mvPortions.push_back( std::make_unique<PortionObj>( **it ) );
maTabStop = rParagraphObj.maTabStop;
bExtendedParameters = rParagraphObj.bExtendedParameters;
......
......@@ -23,7 +23,6 @@
#include <rtl/textenc.h>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <o3tl/make_unique.hxx>
PropEntry::PropEntry( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBufSize ) :
mnId ( nId ),
......@@ -206,7 +205,7 @@ Section::Section( const Section& rSection )
for ( int i = 0; i < 16; i++ )
aFMTID[ i ] = rSection.aFMTID[ i ];
for(const std::unique_ptr<PropEntry>& rEntry : rSection.maEntries)
maEntries.push_back(o3tl::make_unique<PropEntry>(*rEntry));
maEntries.push_back(std::make_unique<PropEntry>(*rEntry));
}
Section::Section( const sal_uInt8* pFMTID )
......@@ -252,11 +251,11 @@ void Section::AddProperty( sal_uInt32 nId, const sal_uInt8* pBuf, sal_uInt32 nBu
if ( (*iter)->mnId == nId )
(*iter).reset(new PropEntry( nId, pBuf, nBufSize ));
else
maEntries.insert( iter, o3tl::make_unique<PropEntry>( nId, pBuf, nBufSize ));
maEntries.insert( iter, std::make_unique<PropEntry>( nId, pBuf, nBufSize ));
}
else
{
maEntries.push_back( o3tl::make_unique<PropEntry>( nId, pBuf, nBufSize ) );
maEntries.push_back( std::make_unique<PropEntry>( nId, pBuf, nBufSize ) );
}
}
......@@ -520,7 +519,7 @@ Section& Section::operator=( const Section& rSection )
memcpy( static_cast<void*>(aFMTID), static_cast<void const *>(rSection.aFMTID), 16 );
for(const std::unique_ptr<PropEntry>& rEntry : rSection.maEntries)
maEntries.push_back(o3tl::make_unique<PropEntry>(*rEntry));
maEntries.push_back(std::make_unique<PropEntry>(*rEntry));
}
return *this;
}
......@@ -580,7 +579,7 @@ void PropRead::Read()
{
Section aSection(aSectCLSID.data());
aSection.Read(mpSvStream.get());
maSections.push_back(o3tl::make_unique<Section>(aSection));
maSections.push_back(std::make_unique<Section>(aSection));
}
mpSvStream->Seek( nCurrent );
}
......@@ -599,7 +598,7 @@ PropRead& PropRead::operator=( const PropRead& rPropRead )
memcpy( mApplicationCLSID, rPropRead.mApplicationCLSID, 16 );
for(const std::unique_ptr<Section>& rSection : rPropRead.maSections)
maSections.push_back(o3tl::make_unique<Section>(*rSection));
maSections.push_back(std::make_unique<Section>(*rSection));
}
return *this;
}
......
......@@ -35,7 +35,6 @@
#include <vcl/commandevent.hxx>
#include <vcl/event.hxx>
#include <tools/debug.hxx>
#include <o3tl/make_unique.hxx>
#include <osl/diagnose.h>
#include <sdresid.hxx>
......@@ -903,11 +902,11 @@ void CustomAnimationList::update()
if( xShape.is() )
{
SvTreeListEntry* pLBoxEntry = new CustomAnimationListEntry;
pLBoxEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
pLBoxEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
OUString aDescription = SdResId(STR_CUSTOMANIMATION_TRIGGER);
aDescription += ": ";
aDescription += getShapeDescription( xShape, false );
pLBoxEntry->AddItem(o3tl::make_unique<CustomAnimationTriggerEntryItem>(aDescription));
pLBoxEntry->AddItem(std::make_unique<CustomAnimationTriggerEntryItem>(aDescription));
Insert( pLBoxEntry );
SvViewDataEntry* pViewData = GetViewData( pLBoxEntry );
if( pViewData )
......@@ -1020,8 +1019,8 @@ void CustomAnimationList::append( CustomAnimationEffectPtr pEffect )
// create an entry for the effect
SvTreeListEntry* pEntry = new CustomAnimationListEntry( pEffect );
pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
pEntry->AddItem(o3tl::make_unique<CustomAnimationListEntryItem>(aDescription, pEffect, this));
pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(Image(), Image(), false));
pEntry->AddItem(std::make_unique<CustomAnimationListEntryItem>(aDescription, pEffect, this));
if( pParentEntry )
{
......
......@@ -47,7 +47,6 @@
#include <createcustomanimationpanel.hxx>
#include <vcl/lstbox.hxx>
#include <vcl/fixed.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/button.hxx>
#include <vcl/scrbar.hxx>
......@@ -296,7 +295,7 @@ void CustomAnimationPane::addUndo()
{
SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
if( pPage )
pManager->AddUndoAction( o3tl::make_unique<UndoAnimation>( mrBase.GetDocShell()->GetDoc(), pPage ) );
pManager->AddUndoAction( std::make_unique<UndoAnimation>( mrBase.GetDocShell()->GetDoc(), pPage ) );
}
}
......@@ -2490,7 +2489,7 @@ void CustomAnimationPane::updatePathFromMotionPathTag( const rtl::Reference< Mot
{
SdPage* pPage = SdPage::getImplementation( mxCurrentPage );
if( pPage )
pManager->AddUndoAction( o3tl::make_unique<UndoAnimationPath>( mrBase.GetDocShell()->GetDoc(), pPage, pEffect->getNode() ) );
pManager->AddUndoAction( std::make_unique<UndoAnimationPath>( mrBase.GetDocShell()->GetDoc(), pPage, pEffect->getNode() ) );
}
pEffect->updatePathFromSdrPathObj( *pPathObj );
......
......@@ -44,7 +44,6 @@
#include <svx/svxids.hrc>
#include <svx/polypolygoneditor.hxx>
#include <svx/svddrgmt.hxx>
#include <o3tl/make_unique.hxx>
#include "CustomAnimationPane.hxx"
#include <View.hxx>
......@@ -941,23 +940,23 @@ void MotionPathTag::addCustomHandles( SdrHdlList& rHandlerList )
bool bHgt0=aRect.Top()==aRect.Bottom();
if (bWdt0 && bHgt0)
{
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopLeft(),SdrHdlKind::UpperLeft));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopLeft(),SdrHdlKind::UpperLeft));
}
else if (bWdt0 || bHgt0)
{
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomRight(),SdrHdlKind::LowerRight));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomRight(),SdrHdlKind::LowerRight));
}
else // !bWdt0 && !bHgt0
{
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopCenter() ,SdrHdlKind::Upper));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopRight() ,SdrHdlKind::UpperRight));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.LeftCenter() ,SdrHdlKind::Left ));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.RightCenter() ,SdrHdlKind::Right));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomLeft() ,SdrHdlKind::LowerLeft));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomCenter(),SdrHdlKind::Lower));
rHandlerList.AddHdl(o3tl::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomRight() ,SdrHdlKind::LowerRight));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopLeft() ,SdrHdlKind::UpperLeft));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopCenter() ,SdrHdlKind::Upper));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.TopRight() ,SdrHdlKind::UpperRight));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.LeftCenter() ,SdrHdlKind::Left ));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.RightCenter() ,SdrHdlKind::Right));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomLeft() ,SdrHdlKind::LowerLeft));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomCenter(),SdrHdlKind::Lower));
rHandlerList.AddHdl(std::make_unique<SmartHdl>( xThis, mpPathObj, aRect.BottomRight() ,SdrHdlKind::LowerRight));
}
while( nCount < rHandlerList.GetHdlCount() )
......
......@@ -93,7 +93,6 @@
#include <sfx2/charmappopup.hxx>
#include <sfx2/sidebar/SidebarChildWindow.hxx>
#include <vcl/FilterConfigItem.hxx>
#include <o3tl/make_unique.hxx>
#include <sdabstdlg.hxx>
#include <sdfilter.hxx>
#include <sdmod.hxx>
......@@ -252,7 +251,7 @@ void SdDLL::Init()
if (!utl::ConfigManager::IsFuzzing() && SvtModuleOptions().IsDraw())
pDrawFact = &::sd::GraphicDocShell::Factory();
auto pUniqueModule = o3tl::make_unique<SdModule>(pImpressFact, pDrawFact);
auto pUniqueModule = std::make_unique<SdModule>(pImpressFact, pDrawFact);
SdModule* pModule = pUniqueModule.get();
SfxApplication::SetModule(SfxToolsModule::Draw, std::move(pUniqueModule));
......
......@@ -20,7 +20,6 @@
#include <editeng/eeitem.hxx>
#include <editeng/flditem.hxx>
#include <editeng/CustomPropertyField.hxx>
#include <o3tl/make_unique.hxx>
#include <sfx2/printer.hxx>
#include <sfx2/styfitem.hxx>
#include <svl/inethist.hxx>
......@@ -460,7 +459,7 @@ std::unique_ptr<SfxItemSet> SdModule::CreateItemSet( sal_uInt16 nSlot )
SfxItemPool& rPool = GetPool();
rPool.SetDefaultMetric( MapUnit::Map100thMM );
auto pRet = o3tl::make_unique<SfxItemSet>(
auto pRet = std::make_unique<SfxItemSet>(
rPool,
svl::Items<
SID_ATTR_GRID_OPTIONS, SID_ATTR_GRID_OPTIONS,
......
......@@ -22,7 +22,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/documentconstants.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
#include <sfx2/doctempl.hxx>
......@@ -194,7 +193,7 @@ TemplateScanner::State TemplateScanner::ScanEntry()
|| (sContentType == "Impress 2.0"))
{
OUString sLocalisedTitle = SfxDocumentTemplates::ConvertResourceString(sTitle);
mpTemplateEntries.push_back(o3tl::make_unique<TemplateEntry>(sLocalisedTitle, sTargetURL));
mpTemplateEntries.push_back(std::make_unique<TemplateEntry>(sLocalisedTitle, sTargetURL));
}
}
......
......@@ -18,7 +18,6 @@
*/
#include <sfx2/objsh.hxx>
#include <o3tl/make_unique.hxx>
#include "sddlgfact.hxx"
#include <BreakDlg.hxx>
#include <copydlg.hxx>
......@@ -367,44 +366,44 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateBreakDlg(
sal_uLong nSumActionCount,
sal_uLong nObjCount )
{
return VclPtr<AbstractBreakDlg_Impl>::Create(o3tl::make_unique<::sd::BreakDlg>(pParent, pDrView, pShell, nSumActionCount, nObjCount));
return VclPtr<AbstractBreakDlg_Impl>::Create(std::make_unique<::sd::BreakDlg>(pParent, pDrView, pShell, nSumActionCount, nObjCount));
}
VclPtr<AbstractCopyDlg> SdAbstractDialogFactory_Impl::CreateCopyDlg(weld::Window* pParent,
const SfxItemSet& rInAttrs,
::sd::View* pView )
{
return VclPtr<AbstractCopyDlg_Impl>::Create(o3tl::make_unique<::sd::CopyDlg>(pParent, rInAttrs, pView));
return VclPtr<AbstractCopyDlg_Impl>::Create(std::make_unique<::sd::CopyDlg>(pParent, rInAttrs, pView));
}
VclPtr<AbstractSdCustomShowDlg> SdAbstractDialogFactory_Impl::CreateSdCustomShowDlg(weld::Window* pParent, SdDrawDocument& rDrawDoc )
{
return VclPtr<AbstractSdCustomShowDlg_Impl>::Create(o3tl::make_unique<SdCustomShowDlg>(pParent, rDrawDoc));
return VclPtr<AbstractSdCustomShowDlg_Impl>::Create(std::make_unique<SdCustomShowDlg>(pParent, rDrawDoc));
}
VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabCharDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell)
{
return VclPtr<SdAbstractTabController_Impl>::Create(o3tl::make_unique<SdCharDlg>(pParent, pAttr, pDocShell));
return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdCharDlg>(pParent, pAttr, pDocShell));
}
VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdTabPageDialog(weld::Window* pParent, const SfxItemSet* pAttr, SfxObjectShell* pDocShell, bool bAreaPage )
{
return VclPtr<SdAbstractTabController_Impl>::Create(o3tl::make_unique<SdPageDlg>(pDocShell, pParent, pAttr, bAreaPage));
return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdPageDlg>(pDocShell, pParent, pAttr, bAreaPage));
}
VclPtr<AbstractSdModifyFieldDlg> SdAbstractDialogFactory_Impl::CreateSdModifyFieldDlg(weld::Window* pParent, const SvxFieldData* pInField, const SfxItemSet& rSet)
{
return VclPtr<AbstractSdModifyFieldDlg_Impl>::Create(o3tl::make_unique<SdModifyFieldDlg>(pParent, pInField, rSet));
return VclPtr<AbstractSdModifyFieldDlg_Impl>::Create(std::make_unique<SdModifyFieldDlg>(pParent, pInField, rSet));
}
VclPtr<AbstractSdSnapLineDlg> SdAbstractDialogFactory_Impl::CreateSdSnapLineDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, ::sd::View* pView)
{
return VclPtr<AbstractSdSnapLineDlg_Impl>::Create(o3tl::make_unique<SdSnapLineDlg>(pParent, rInAttrs, pView));
return VclPtr<AbstractSdSnapLineDlg_Impl>::Create(std::make_unique<SdSnapLineDlg>(pParent, rInAttrs, pView));
}
VclPtr<AbstractSdInsertLayerDlg> SdAbstractDialogFactory_Impl::CreateSdInsertLayerDlg(weld::Window* pParent, const SfxItemSet& rInAttrs, bool bDeletable, const OUString& aStr)
{
return VclPtr<AbstractSdInsertLayerDlg_Impl>::Create(o3tl::make_unique<SdInsertLayerDlg>(pParent, rInAttrs, bDeletable, aStr));
return VclPtr<AbstractSdInsertLayerDlg_Impl>::Create(std::make_unique<SdInsertLayerDlg>(pParent, rInAttrs, bDeletable, aStr));
}
VclPtr<AbstractSdInsertPagesObjsDlg> SdAbstractDialogFactory_Impl::CreateSdInsertPagesObjsDlg( vcl::Window* pParent, const SdDrawDocument* pDoc, SfxMedium* pSfxMedium, const OUString& rFileName )
......@@ -414,23 +413,23 @@ VclPtr<AbstractSdInsertPagesObjsDlg> SdAbstractDialogFactory_Impl::CreateSdInser
VclPtr<AbstractMorphDlg> SdAbstractDialogFactory_Impl::CreateMorphDlg(weld::Window* pParent, const SdrObject* pObj1, const SdrObject* pObj2)
{
return VclPtr<AbstractMorphDlg_Impl>::Create(o3tl::make_unique<::sd::MorphDlg>(pParent, pObj1, pObj2));
return VclPtr<AbstractMorphDlg_Impl>::Create(std::make_unique<::sd::MorphDlg>(pParent, pObj1, pObj2));
}
VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdOutlineBulletTabDlg(weld::Window* pParent, const SfxItemSet* pAttr, ::sd::View* pView)
{
return VclPtr<AbstractBulletDialog_Impl>::Create(o3tl::make_unique<::sd::OutlineBulletDlg>(pParent, pAttr, pView));
return VclPtr<AbstractBulletDialog_Impl>::Create(std::make_unique<::sd::OutlineBulletDlg>(pParent, pAttr, pView));
}
VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdParagraphTabDlg(weld::Window* pParent, const SfxItemSet* pAttr )
{
return VclPtr<SdAbstractTabController_Impl>::Create(o3tl::make_unique<SdParagraphDlg>(pParent, pAttr));
return VclPtr<SdAbstractTabController_Impl>::Create(std::make_unique<SdParagraphDlg>(pParent, pAttr));
}
VclPtr<AbstractSdStartPresDlg> SdAbstractDialogFactory_Impl::CreateSdStartPresentationDlg(weld::Window* pParent,
const SfxItemSet& rInAttrs, const std::vector<OUString> &rPageNames, SdCustomShowList* pCSList)
{
return VclPtr<AbstractSdStartPresDlg_Impl>::Create(o3tl::make_unique<SdStartPresentationDlg>(pParent, rInAttrs, rPageNames, pCSList));
return VclPtr<AbstractSdStartPresDlg_Impl>::Create(std::make_unique<SdStartPresentationDlg>(pParent, rInAttrs, rPageNames, pCSList));
}
VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl::Window* pParent )
......@@ -440,17 +439,17 @@ VclPtr<VclAbstractDialog> SdAbstractDialogFactory_Impl::CreateRemoteDialog( vcl:
VclPtr<SfxAbstractTabDialog> SdAbstractDialogFactory_Impl::CreateSdPresLayoutTemplateDlg(SfxObjectShell* pDocSh, weld::Window* pParent, bool bBackgroundDlg, SfxStyleSheetBase& rStyleBase, PresentationObjects ePO, SfxStyleSheetBasePool* pSSPool)
{
return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create(o3tl::make_unique<SdPresLayoutTemplateDlg>(pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool));
return VclPtr<SdPresLayoutTemplateDlg_Impl>::Create(std::make_unique<SdPresLayoutTemplateDlg>(pDocSh, pParent, bBackgroundDlg, rStyleBase, ePO, pSSPool));