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

o3tl::make_unique -> std::make_unique in tools..xmloff

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

Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26
Reviewed-on: https://gerrit.libreoffice.org/67474
Tested-by: Jenkins
Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.com>
üst 2d6313a9
......@@ -13,7 +13,6 @@
#include <osl/file.hxx>
#include <string.h>
#include <o3tl/char16_t2wchar_t.hxx>
#include <o3tl/make_unique.hxx>
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#endif
......@@ -30,12 +29,12 @@ bool IsMappedWebDAVPath(const INetURLObject& aURL)
if (osl::FileBase::getSystemPathFromFileURL(sURL, aSystemPath) == osl::FileBase::E_None)
{
DWORD nSize = MAX_PATH;
auto bufUNC(o3tl::make_unique<char[]>(nSize));
auto bufUNC(std::make_unique<char[]>(nSize));
DWORD nResult = WNetGetUniversalNameW(o3tl::toW(aSystemPath.getStr()),
UNIVERSAL_NAME_INFO_LEVEL, bufUNC.get(), &nSize);
if (nResult == ERROR_MORE_DATA)
{
bufUNC = o3tl::make_unique<char[]>(nSize);
bufUNC = std::make_unique<char[]>(nSize);
nResult = WNetGetUniversalNameW(o3tl::toW(aSystemPath.getStr()),
UNIVERSAL_NAME_INFO_LEVEL, bufUNC.get(), &nSize);
}
......@@ -50,12 +49,12 @@ bool IsMappedWebDAVPath(const INetURLObject& aURL)
aReq.lpRemoteName = pInfo->lpUniversalName;
}
nSize = 1024;
auto bufInfo(o3tl::make_unique<char[]>(nSize));
auto bufInfo(std::make_unique<char[]>(nSize));
LPWSTR pSystem = nullptr;
nResult = WNetGetResourceInformationW(&aReq, bufInfo.get(), &nSize, &pSystem);
if (nResult == ERROR_MORE_DATA)
{
bufInfo = o3tl::make_unique<char[]>(nSize);
bufInfo = std::make_unique<char[]>(nSize);
nResult = WNetGetResourceInformationW(&aReq, bufInfo.get(), &nSize, &pSystem);
}
if (nResult == NO_ERROR)
......
......@@ -9,7 +9,6 @@
#include <tools/stream.hxx>
#include <tools/XmlWalker.hxx>
#include <o3tl/make_unique.hxx>
#include <libxml/tree.h>
#include <libxml/parser.h>
......@@ -35,7 +34,7 @@ struct XmlWalkerImpl
};
XmlWalker::XmlWalker()
: mpImpl(o3tl::make_unique<XmlWalkerImpl>())
: mpImpl(std::make_unique<XmlWalkerImpl>())
{
}
......
......@@ -9,7 +9,6 @@
#include <tools/stream.hxx>
#include <tools/XmlWriter.hxx>
#include <o3tl/make_unique.hxx>
#include <libxml/xmlwriter.h>
......@@ -45,7 +44,7 @@ struct XmlWriterImpl
};
XmlWriter::XmlWriter(SvStream* pStream)
: mpImpl(o3tl::make_unique<XmlWriterImpl>(pStream))
: mpImpl(std::make_unique<XmlWriterImpl>(pStream))
{
}
......
......@@ -41,7 +41,6 @@
#include "curl.hxx"
#include <curl/easy.h>
#include <comphelper/propertysequence.hxx>
#include <o3tl/make_unique.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/fd_inputstream.hxx>
......@@ -486,7 +485,7 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand,
= new DynamicResultSet(
m_xContext,
aOpenCommand,
o3tl::make_unique<ResultSetFactory>(m_xContext,
std::make_unique<ResultSetFactory>(m_xContext,
m_xProvider.get(),
aOpenCommand.Properties,
resvec));
......
......@@ -34,7 +34,6 @@
*************************************************************************/
#include <sal/log.hxx>
#include <o3tl/make_unique.hxx>
#include <com/sun/star/ucb/IllegalIdentifierException.hpp>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/ResultSetException.hpp>
......@@ -467,7 +466,7 @@ bool DataSupplier::getData()
}
m_pImpl->m_Results.push_back(
o3tl::make_unique<ResultListEntry>(pContentProperties));
std::make_unique<ResultListEntry>(pContentProperties));
}
}
catch ( DAVException const & )
......
......@@ -33,7 +33,6 @@
#include <com/sun/star/util/DateTime.hpp>
#include <com/sun/star/ucb/Lock.hpp>
#include <com/sun/star/ucb/LockEntry.hpp>
#include <o3tl/make_unique.hxx>
#include "webdavcontent.hxx"
#include "webdavprovider.hxx"
#include "DAVSession.hxx"
......@@ -54,7 +53,7 @@ bool ContentProvider::getProperty(
osl::MutexGuard aGuard( m_aMutex );
if ( !m_pProps )
{
m_pProps = o3tl::make_unique<PropertyMap>();
m_pProps = std::make_unique<PropertyMap>();
// Fill map of known properties...
......
......@@ -23,7 +23,6 @@
#include <memory>
#include <utility>
#include <o3tl/make_unique.hxx>
#include <com/sun/star/ucb/OpenMode.hpp>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/providerhelper.hxx>
......@@ -104,7 +103,7 @@ DataSupplier::DataSupplier(
const uno::Reference< uno::XComponentContext >& rxContext,
const rtl::Reference< Content >& rContent,
sal_Int32 nOpenMode )
: m_pImpl(o3tl::make_unique<DataSupplier_Impl>(rxContext, rContent, nOpenMode))
: m_pImpl(std::make_unique<DataSupplier_Impl>(rxContext, rContent, nOpenMode))
{
}
......@@ -406,7 +405,7 @@ bool DataSupplier::getData()
}
std::unique_ptr<ContentProperties> pContentProperties
= o3tl::make_unique<ContentProperties>( rRes );
= std::make_unique<ContentProperties>( rRes );
// Check resource against open mode.
switch ( m_pImpl->m_nOpenMode )
......
......@@ -31,7 +31,6 @@
#include <basic/sbmeth.hxx>
#include "vbacontrols.hxx"
#include <sal/log.hxx>
#include <o3tl/make_unique.hxx>
using namespace ::ooo::vba;
using namespace ::com::sun::star;
......@@ -53,7 +52,7 @@ ScVbaUserForm::ScVbaUserForm( uno::Sequence< uno::Any > const& aArgs, uno::Refer
m_xDialog.set( m_xControl, uno::UNO_QUERY_THROW );
uno::Reference< awt::XControl > xControl( m_xDialog, uno::UNO_QUERY_THROW );
m_xProps.set( xControl->getModel(), uno::UNO_QUERY_THROW );
setGeometryHelper( o3tl::make_unique<UserFormGeometryHelper>( xControl, 0.0, 0.0 ) );
setGeometryHelper( std::make_unique<UserFormGeometryHelper>( xControl, 0.0, 0.0 ) );
if ( aArgs.getLength() >= 4 )
aArgs[ 3 ] >>= m_sLibName;
}
......
......@@ -17,7 +17,6 @@
#include <headless/svpdummies.hxx>
#include <unx/gendata.hxx>
#include <osl/detail/android-bootstrap.h>
#include <o3tl/make_unique.hxx>
#include <rtl/strbuf.hxx>
#include <vcl/settings.hxx>
#include <vcl/svapp.hxx>
......@@ -187,7 +186,7 @@ SalData::~SalData()
SalInstance *CreateSalInstance()
{
LOGI("Android: CreateSalInstance!");
AndroidSalInstance* pInstance = new AndroidSalInstance( o3tl::make_unique<SvpSalYieldMutex>() );
AndroidSalInstance* pInstance = new AndroidSalInstance( std::make_unique<SvpSalYieldMutex>() );
new AndroidSalData( pInstance );
pInstance->AcquireYieldMutex();
return pInstance;
......
......@@ -9,7 +9,6 @@
#include <headless/svpinst.hxx>
#include <headless/svpdummies.hxx>
#include <unx/gendata.hxx>
#include <o3tl/make_unique.hxx>
class HeadlessSalInstance : public SvpSalInstance
{
......@@ -86,7 +85,7 @@ SalData::~SalData()
// This is our main entry point:
SalInstance *CreateSalInstance()
{
HeadlessSalInstance* pInstance = new HeadlessSalInstance(o3tl::make_unique<SvpSalYieldMutex>());
HeadlessSalInstance* pInstance = new HeadlessSalInstance(std::make_unique<SvpSalYieldMutex>());
new HeadlessSalData( pInstance );
pInstance->AcquireYieldMutex();
return pInstance;
......
......@@ -9,7 +9,6 @@
#include <unx/gendata.hxx>
#include <headless/svpinst.hxx>
#include <o3tl/make_unique.hxx>
class SvpSalData : public GenericUnixSalData
{
......@@ -22,7 +21,7 @@ public:
// plugin factory function
SalInstance* svp_create_SalInstance()
{
SvpSalInstance* pInstance = new SvpSalInstance( o3tl::make_unique<SvpSalYieldMutex>() );
SvpSalInstance* pInstance = new SvpSalInstance( std::make_unique<SvpSalYieldMutex>() );
new SvpSalData( pInstance );
return pInstance;
}
......
......@@ -21,7 +21,6 @@
#define VCL_INC_BITMAPSCALECONVOLUTIONFILTER_HXX
#include <vcl/BitmapFilter.hxx>
#include <o3tl/make_unique.hxx>
#include "ResampleKernel.hxx"
......@@ -49,7 +48,7 @@ class VCL_DLLPUBLIC BitmapScaleBilinearFilter : public BitmapScaleConvolutionFil
{
public:
BitmapScaleBilinearFilter(const double& rScaleX, const double& rScaleY)
: BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<BilinearKernel>())
: BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<BilinearKernel>())
{
}
};
......@@ -58,7 +57,7 @@ class VCL_DLLPUBLIC BitmapScaleBicubicFilter : public BitmapScaleConvolutionFilt
{
public:
BitmapScaleBicubicFilter(const double& rScaleX, const double& rScaleY)
: BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<BicubicKernel>())
: BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<BicubicKernel>())
{
}
};
......@@ -67,7 +66,7 @@ class VCL_DLLPUBLIC BitmapScaleLanczos3Filter : public BitmapScaleConvolutionFil
{
public:
BitmapScaleLanczos3Filter(const double& rScaleX, const double& rScaleY)
: BitmapScaleConvolutionFilter(rScaleX, rScaleY, o3tl::make_unique<Lanczos3Kernel>())
: BitmapScaleConvolutionFilter(rScaleX, rScaleY, std::make_unique<Lanczos3Kernel>())
{
}
};
......
......@@ -12,7 +12,6 @@
#define INCLUDED_VCL_INC_FONT_FEATURECOLLECTOR_HXX
#include <vcl/font/Feature.hxx>
#include <o3tl/make_unique.hxx>
#include <hb.h>
#include <i18nlangtag/lang.h>
......
......@@ -266,7 +266,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <i18nlangtag/mslangid.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <outdata.hxx>
......
......@@ -25,7 +25,6 @@
#include "headless/svpdummies.hxx"
#include "unx/gendata.hxx"
#include "quartz/utils.h"
#include <o3tl/make_unique.hxx>
#include <vcl/layout.hxx>
#include <vcl/settings.hxx>
......@@ -166,7 +165,7 @@ SalData::~SalData()
// This is our main entry point:
SalInstance *CreateSalInstance()
{
IosSalInstance* pInstance = new IosSalInstance( o3tl::make_unique<SvpSalYieldMutex>() );
IosSalInstance* pInstance = new IosSalInstance( std::make_unique<SvpSalYieldMutex>() );
new IosSalData( pInstance );
pInstance->AcquireYieldMutex();
return pInstance;
......
......@@ -18,8 +18,6 @@
#include <opengl/FixedTextureAtlas.hxx>
#include <o3tl/make_unique.hxx>
struct FixedTexture
{
std::shared_ptr<ImplOpenGLTexture> mpTexture;
......@@ -90,7 +88,7 @@ void FixedTextureAtlasManager::CreateNewTexture()
{
int nTextureWidth = mWidthFactor * mSubTextureSize;
int nTextureHeight = mHeightFactor * mSubTextureSize;
maFixedTextures.push_back(o3tl::make_unique<FixedTexture>(nTextureWidth, nTextureHeight, mWidthFactor * mHeightFactor));
maFixedTextures.push_back(std::make_unique<FixedTexture>(nTextureWidth, nTextureHeight, mWidthFactor * mHeightFactor));
}
OpenGLTexture FixedTextureAtlasManager::Reserve(int nWidth, int nHeight)
......
......@@ -34,7 +34,6 @@
#include <vcleventlisteners.hxx>
#include <vcl/lazydelete.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/make_shared.hxx>
#include <opengl/zone.hxx>
......@@ -414,11 +413,11 @@ void lclInstantiateTexture(OpenGLTexture& rTexture, const int nWidth, const int
TextureAtlasVector &sTextureAtlases = *gTextureAtlases.get();
if (sTextureAtlases.empty())
{
sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 16));
sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 24));
sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 32));
sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 48));
sTextureAtlases.push_back(o3tl::make_unique<FixedTextureAtlasManager>(8, 8, 64));
sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 16));
sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 24));
sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 32));
sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 48));
sTextureAtlases.push_back(std::make_unique<FixedTextureAtlasManager>(8, 8, 64));
}
for (std::unique_ptr<FixedTextureAtlasManager> & pTextureAtlas : sTextureAtlases)
{
......
......@@ -60,7 +60,6 @@
#include <print.h>
#include <salimestatus.hxx>
#include <o3tl/make_unique.hxx>
#include <comphelper/processfactory.hxx>
......@@ -334,7 +333,7 @@ VCLPLUG_OSX_PUBLIC SalInstance* create_SalInstance()
}
AquaSalInstance::AquaSalInstance()
: SalInstance(o3tl::make_unique<SalYieldMutex>())
: SalInstance(std::make_unique<SalYieldMutex>())
, mnActivePrintJobs( 0 )
, mbIsLiveResize( false )
, mbNoYieldLock( false )
......
......@@ -22,7 +22,6 @@
#include <Qt5Font.hxx>
#include <Qt5Painter.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/fontcharmap.hxx>
#include <unx/geninst.h>
#include <unx/fontmanager.hxx>
......@@ -190,7 +189,7 @@ std::unique_ptr<GenericSalLayout> Qt5Graphics::GetTextLayout(int nFallbackLevel)
assert(m_pTextStyle[nFallbackLevel]);
if (!m_pTextStyle[nFallbackLevel])
return nullptr;
return o3tl::make_unique<Qt5CommonSalLayout>(*m_pTextStyle[nFallbackLevel]);
return std::make_unique<Qt5CommonSalLayout>(*m_pTextStyle[nFallbackLevel]);
}
void Qt5Graphics::DrawTextLayout(const GenericSalLayout& rLayout)
......
......@@ -42,7 +42,6 @@
#include <QtWidgets/QApplication>
#include <QtWidgets/QWidget>
#include <o3tl/make_unique.hxx>
#include <vclpluginapi.h>
#include <sal/log.hxx>
#include <osl/process.h>
......@@ -50,7 +49,7 @@
#include <headless/svpbmp.hxx>
Qt5Instance::Qt5Instance(bool bUseCairo)
: SalGenericInstance(o3tl::make_unique<SalYieldMutex>())
: SalGenericInstance(std::make_unique<SalYieldMutex>())
, m_postUserEventId(-1)
, m_bUseCairo(bUseCairo)
{
......
......@@ -25,7 +25,6 @@
#include <limits>
#include <o3tl/make_shared.hxx>
#include <o3tl/make_unique.hxx>
#include <basegfx/vector/b2ivector.hxx>
#include <tools/color.hxx>
#include <vcl/bitmap.hxx>
......@@ -539,12 +538,12 @@ std::unique_ptr<ImplPixelFormat> ImplPixelFormat::GetFormat( sal_uInt16 nBits, c
{
switch( nBits )
{
case 1: return o3tl::make_unique<ImplPixelFormat1>( rPalette );
case 4: return o3tl::make_unique<ImplPixelFormat4>( rPalette );
case 8: return o3tl::make_unique<ImplPixelFormat8>( rPalette );
case 16: return o3tl::make_unique<ImplPixelFormat16>();
case 24: return o3tl::make_unique<ImplPixelFormat24>();
case 32: return o3tl::make_unique<ImplPixelFormat32>();
case 1: return std::make_unique<ImplPixelFormat1>( rPalette );
case 4: return std::make_unique<ImplPixelFormat4>( rPalette );
case 8: return std::make_unique<ImplPixelFormat8>( rPalette );
case 16: return std::make_unique<ImplPixelFormat16>();
case 24: return std::make_unique<ImplPixelFormat24>();
case 32: return std::make_unique<ImplPixelFormat32>();
default:
assert(false);
return nullptr;
......
......@@ -26,7 +26,6 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <basegfx/range/b2drectangle.hxx>
#include <o3tl/make_unique.hxx>
#include <osl/file.hxx>
#include <osl/process.h>
#include <rtl/bootstrap.h>
......@@ -508,7 +507,7 @@ std::unique_ptr<GenericSalLayout> AquaSalGraphics::GetTextLayout(int nFallbackLe
assert(mpTextStyle[nFallbackLevel]);
if (!mpTextStyle[nFallbackLevel])
return nullptr;
return o3tl::make_unique<GenericSalLayout>(*mpTextStyle[nFallbackLevel]);
return std::make_unique<GenericSalLayout>(*mpTextStyle[nFallbackLevel]);
}
const FontCharMapRef AquaSalGraphics::GetFontCharMap() const
......
This diff is collapsed.
......@@ -63,7 +63,6 @@
#endif
#include <basegfx/utils/systemdependentdata.hxx>
#include <cppuhelper/basemutex.hxx>
#include <o3tl/make_unique.hxx>
using namespace com::sun::star::uno;
using namespace com::sun::star::lang;
......@@ -116,7 +115,7 @@ namespace
public:
SystemDependentDataBuffer(const sal_Char* pDebugName)
: basegfx::SystemDependentDataManager(),
maTimer(o3tl::make_unique<Timer>(pDebugName)),
maTimer(std::make_unique<Timer>(pDebugName)),
maEntries()
{
maTimer->SetTimeout(1000);
......
......@@ -42,7 +42,6 @@
#include <svdata.hxx>
#include <window.h>
#include <controldata.hxx>
#include <o3tl/make_unique.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
......@@ -95,7 +94,7 @@ mbSmallSymbol(false), maImage(), meImageAlign(ImageAlign::Top), meSymbolAlign(Sy
Button::Button( WindowType nType ) :
Control( nType ),
mpButtonData( o3tl::make_unique<ImplCommonButtonData>() )
mpButtonData( std::make_unique<ImplCommonButtonData>() )
{
}
......
......@@ -33,7 +33,6 @@
#include <vcl/edit.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <o3tl/make_unique.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/PropertyValues.hpp>
......@@ -489,7 +488,7 @@ void TextEngine::ImpRemoveChars( const TextPaM& rPaM, sal_Int32 nChars )
break; // for
}
}
InsertUndo( o3tl::make_unique<TextUndoRemoveChars>( this, rPaM, aStr ) );
InsertUndo( std::make_unique<TextUndoRemoveChars>( this, rPaM, aStr ) );
}
mpDoc->RemoveChars( rPaM, nChars );
......@@ -504,7 +503,7 @@ TextPaM TextEngine::ImpConnectParagraphs( sal_uInt32 nLeft, sal_uInt32 nRight )
TextNode* pRight = mpDoc->GetNodes()[ nRight ].get();
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( o3tl::make_unique<TextUndoConnectParas>( this, nLeft, pLeft->GetText().getLength() ) );
InsertUndo( std::make_unique<TextUndoConnectParas>( this, nLeft, pLeft->GetText().getLength() ) );
// first lookup Portions, as pRight is gone after ConnectParagraphs
TEParaPortion* pLeftPortion = mpTEParaPortions->GetObject( nLeft );
......@@ -599,7 +598,7 @@ void TextEngine::ImpRemoveParagraph( sal_uInt32 nPara )
// the Node is handled by Undo and is deleted if appropriate
mpDoc->GetNodes().erase( mpDoc->GetNodes().begin() + nPara );
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( o3tl::make_unique<TextUndoDelPara>( this, pNode.release(), nPara ) );
InsertUndo( std::make_unique<TextUndoDelPara>( this, pNode.release(), nPara ) );
mpTEParaPortions->Remove( nPara );
......@@ -766,7 +765,7 @@ TextPaM TextEngine::ImpInsertText( const TextSelection& rCurSel, const OUString&
{
OUString aLine(aText.copy(nStart, nEnd-nStart));
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( o3tl::make_unique<TextUndoInsertChars>( this, aPaM, aLine ) );
InsertUndo( std::make_unique<TextUndoInsertChars>( this, aPaM, aLine ) );
TEParaPortion* pPortion = mpTEParaPortions->GetObject( aPaM.GetPara() );
pPortion->MarkInvalid( aPaM.GetIndex(), aLine.getLength() );
......@@ -806,7 +805,7 @@ TextPaM TextEngine::ImpInsertParaBreak( const TextSelection& rCurSel )
TextPaM TextEngine::ImpInsertParaBreak( const TextPaM& rPaM )
{
if ( IsUndoEnabled() && !IsInUndo() )
InsertUndo( o3tl::make_unique<TextUndoSplitPara>( this, rPaM.GetPara(), rPaM.GetIndex() ) );
InsertUndo( std::make_unique<TextUndoSplitPara>( this, rPaM.GetPara(), rPaM.GetIndex() ) );
TextNode* pNode = mpDoc->GetNodes()[ rPaM.GetPara() ].get();
bool bFirstParaContentChanged = rPaM.GetIndex() < pNode->GetText().getLength();
......@@ -2526,7 +2525,7 @@ void TextEngine::SetAttrib( const TextAttrib& rAttr, sal_uInt32 nPara, sal_Int32
if ( nEnd > nMax )
nEnd = nMax;
pNode->GetCharAttribs().InsertAttrib( o3tl::make_unique<TextCharAttrib>( rAttr, nStart, nEnd ) );
pNode->GetCharAttribs().InsertAttrib( std::make_unique<TextCharAttrib>( rAttr, nStart, nEnd ) );
pTEParaPortion->MarkSelectionInvalid( nStart );
mbFormatted = false;
......
......@@ -65,8 +65,6 @@
#include <algorithm>
#include <cstddef>
#include <o3tl/make_unique.hxx>
TETextDataObject::TETextDataObject( const OUString& rText ) : maText( rText )
{
}
......@@ -174,8 +172,8 @@ TextView::TextView( ExtTextEngine* pEng, vcl::Window* pWindow ) :
mpImpl->mnTravelXPos = TRAVEL_X_DONTKNOW;
mpImpl->mpSelFuncSet = o3tl::make_unique<TextSelFunctionSet>( this );
mpImpl->mpSelEngine = o3tl::make_unique<SelectionEngine>( mpImpl->mpWindow, mpImpl->mpSelFuncSet.get() );
mpImpl->mpSelFuncSet = std::make_unique<TextSelFunctionSet>( this );
mpImpl->mpSelEngine = std::make_unique<SelectionEngine>( mpImpl->mpWindow, mpImpl->mpSelFuncSet.get() );
mpImpl->mpSelEngine->SetSelectionMode( SelectionMode::Range );
mpImpl->mpSelEngine->EnableDrag( true );
......@@ -822,7 +820,7 @@ void TextView::Command( const CommandEvent& rCEvt )
{
DeleteSelected();
TextNode* pNode = mpImpl->mpTextEngine->mpDoc->GetNodes()[ GetSelection().GetEnd().GetPara() ].get();
mpImpl->mpTextEngine->mpIMEInfos = o3tl::make_unique<TEIMEInfos>( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) );
mpImpl->mpTextEngine->mpIMEInfos = std::make_unique<TEIMEInfos>( GetSelection().GetEnd(), pNode->GetText().copy( GetSelection().GetEnd().GetIndex() ) );
mpImpl->mpTextEngine->mpIMEInfos->bWasCursorOverwrite = !IsInsertMode();
}
else if ( rCEvt.GetCommand() == CommandEventId::EndExtTextInput )
......
......@@ -20,7 +20,6 @@
#include <config_folders.h>
#include <sal/log.hxx>
#include <o3tl/make_unique.hxx>
#include <osl/mutex.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/threadpool.hxx>
......@@ -1371,10 +1370,10 @@ void GraphicFilter::ImportGraphics(std::vector< std::shared_ptr<Graphic> >& rGra
else
{
Bitmap& rBitmap = const_cast<Bitmap&>(rContext.m_pGraphic->GetBitmapExRef().GetBitmapRef());
rContext.m_pAccess = o3tl::make_unique<BitmapScopedWriteAccess>(rBitmap);
rContext.m_pAccess = std::make_unique<BitmapScopedWriteAccess>(rBitmap);
rContext.m_pStream->Seek(rContext.m_nStreamBegin);
if (bThreads)
rSharedPool.pushTask(o3tl::make_unique<GraphicImportTask>(pTag, rContext));
rSharedPool.pushTask(std::make_unique<GraphicImportTask>(pTag, rContext));
else
GraphicImportTask::doImport(rContext);
}
......@@ -2021,7 +2020,7 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath,
if (aShortName == "PCD")
{
OUString aFilterConfigPath( "Office.Common/Filter/Graphic/Import/PCD" );
pFilterConfigItem = o3tl::make_unique<FilterConfigItem>( aFilterConfigPath );
pFilterConfigItem = std::make_unique<FilterConfigItem>( aFilterConfigPath );
}
}
if( !(*pFunc)( rIStream, rGraphic, pFilterConfigItem.get() ) )
......
......@@ -22,7 +22,6 @@
#include "decode.hxx"
#include "gifread.hxx"
#include <memory>
#include <o3tl/make_unique.hxx>
#include <bitmapwriteaccess.hxx>
#define NO_PENDING( rStm ) ( ( rStm ).GetError() != ERRCODE_IO_PENDING )
......@@ -798,7 +797,7 @@ bool GIFReader::ProcessGIF()
else if( NO_PENDING( rIStm ) )
{
bRead = true;
pDecomp = o3tl::make_unique<GIFLZWDecompressor>( cDataSize );
pDecomp = std::make_unique<GIFLZWDecompressor>( cDataSize );
eActAction = NEXT_BLOCK_READING;
bOverreadBlock = false;
}
......
......@@ -26,7 +26,6 @@
#include <svl/cryptosign.hxx>
#include <tools/zcodec.hxx>
#include <vcl/pdfwriter.hxx>
#include <o3tl/make_unique.hxx>
using namespace com::sun::star;
......@@ -2681,7 +2680,7 @@ void PDFObjectElement::ParseStoredObjects()
size_t nLen = aLengths[nObject];
aStream.Seek(nOffset);
m_aStoredElements.push_back(o3tl::make_unique<PDFObjectElement>(m_rDoc, nObjNum, 0));
m_aStoredElements.push_back(std::make_unique<PDFObjectElement>(m_rDoc, nObjNum, 0));
PDFObjectElement* pStored = m_aStoredElements.back().get();
aBuf.clear();
......
......@@ -9,7 +9,6 @@
#include <font/FeatureCollector.hxx>
#include <font/OpenTypeFeatureDefinitonList.hxx>
#include <o3tl/make_unique.hxx>
#include <hb-ot.h>
#include <hb-graphite2.h>
......
......@@ -43,7 +43,6 @@
#include <com/sun/star/graphic/XPrimitive2D.hpp>
#include <vcl/dibtools.hxx>
#include <memory>
#include <o3tl/make_unique.hxx>
#include <vcl/gdimetafiletools.hxx>
#include <vcl/pdfread.hxx>
......@@ -208,7 +207,7 @@ ImpGraphic::ImpGraphic(const ImpGraphic& rImpGraphic)
{
if( rImpGraphic.mpAnimation )
{
mpAnimation = o3tl::make_unique<Animation>( *rImpGraphic.mpAnimation );
mpAnimation = std::make_unique<Animation>( *rImpGraphic.mpAnimation );
maEx = mpAnimation->GetBitmapEx();
}
}
......@@ -286,7 +285,7 @@ ImpGraphic::ImpGraphic(const VectorGraphicDataPtr& rVectorGraphicDataPtr)
ImpGraphic::ImpGraphic( const Animation& rAnimation ) :
maEx ( rAnimation.GetBitmapEx() ),
mpAnimation ( o3tl::make_unique<Animation>( rAnimation ) ),
mpAnimation ( std::make_unique<Animation>( rAnimation ) ),
meType ( GraphicType::Bitmap ),
mnSizeBytes ( 0 ),
mbSwapOut ( false ),
......@@ -334,7 +333,7 @@ ImpGraphic& ImpGraphic::operator=( const ImpGraphic& rImpGraphic )
if ( rImpGraphic.mpAnimation )
{
mpAnimation = o3tl::make_unique<Animation>( *rImpGraphic.mpAnimation );
mpAnimation = std::make_unique<Animation>( *rImpGraphic.mpAnimation );
maEx = mpAnimation->GetBitmapEx();
}
else
......@@ -1459,7 +1458,7 @@ bool ImpGraphic::ImplSwapOut()
bRet = ImplSwapOut( xOStm.get() );
if( bRet )
{
mpSwapFile = o3tl::make_unique<ImpSwapFile>();
mpSwapFile = std::make_unique<ImpSwapFile>();
mpSwapFile->aSwapURL = aTmpURL;
mpSwapFile->maOriginURL = getOriginURL();
}
......@@ -1813,7 +1812,7 @@ void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic )
if( !rIStm.GetError() && ( 0x5344414e == nMagic1 ) && ( 0x494d4931 == nMagic2 ) )
{
rImpGraphic.mpAnimation = o3tl::make_unique<Animation>();
rImpGraphic.mpAnimation = std::make_unique<Animation>();
ReadAnimation( rIStm, *rImpGraphic.mpAnimation );
// #108077# manually set loaded BmpEx to Animation
......
......@@ -20,7 +20,6 @@
#include <stdlib.h>
#include <sal/log.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/bitmapaccess.hxx>
#include <tools/poly.hxx>
#include <tools/helpers.hxx>
......@@ -167,7 +166,7 @@ void ImplPointArray::ImplSetSize( sal_uLong nSize )
mnSize = nSize;
mnRealSize = 0;