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: Miklos Vajna <vmiklos@collabora.com>
This commit is contained in:
Gabor Kelemen
2019-02-08 12:30:06 +01:00
committed by Miklos Vajna
parent 2d6313a9fa
commit 43635b474c
83 changed files with 264 additions and 356 deletions
+4 -5
View File
@@ -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)
+1 -2
View File
@@ -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>())
{
}
+1 -2
View File
@@ -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))
{
}
+1 -2
View File
@@ -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 & )
+1 -2
View File
@@ -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...
+2 -3
View File
@@ -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 )
+1 -2
View File
@@ -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;
}
+1 -2
View File
@@ -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;
+1 -2
View File
@@ -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;
+1 -2
View File
@@ -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;
}
+3 -4
View File
@@ -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>())
{
}
};
-1
View File
@@ -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>
-1
View File
@@ -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>
+1 -2
View File
@@ -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;
+1 -3
View File
@@ -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)
+5 -6
View File
@@ -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)
{
+1 -2
View File
@@ -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 )
+1 -2
View File
@@ -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)
+1 -2
View File
@@ -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)
{
+6 -7
View File
@@ -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;
+1 -2
View File
@@ -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
+39 -40
View File
@@ -57,7 +57,6 @@
#include <vcl/vclmedit.hxx>
#include <vcl/virdev.hxx>
#include <bitmaps.hlst>
#include <o3tl/make_unique.hxx>
SalFrame::SalFrame()
: m_pWindow(nullptr)
@@ -2040,7 +2039,7 @@ public:
void* pUserData;
if (pId)
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(*pId));
m_aUserData.emplace_back(std::make_unique<OUString>(*pId));
pUserData = m_aUserData.back().get();
}
else
@@ -2050,15 +2049,15 @@ public:
if (pIconName || pImageSurface)
{
Image aImage(pIconName ? createImage(*pIconName) : createImage(*pImageSurface));
pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(aImage, aImage, false));
pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(aImage, aImage, false));
}
else
{
Image aDummy;
pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>(aDummy, aDummy, false));
pEntry->AddItem(std::make_unique<SvLBoxContextBmp>(aDummy, aDummy, false));
}
if (pStr)
pEntry->AddItem(o3tl::make_unique<SvLBoxString>(*pStr));
pEntry->AddItem(std::make_unique<SvLBoxString>(*pStr));
pEntry->SetUserData(pUserData);
m_xTreeView->Insert(pEntry, iter, nInsertPos);
@@ -2218,11 +2217,11 @@ public:
// blank out missing entries
for (int i = pEntry->ItemCount(); i < col ; ++i)
pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
pEntry->AddItem(std::make_unique<SvLBoxString>(""));
if (static_cast<size_t>(col) == pEntry->ItemCount())
{
pEntry->AddItem(o3tl::make_unique<SvLBoxString>(rText));
pEntry->AddItem(std::make_unique<SvLBoxString>(rText));
SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pEntry);
m_xTreeView->InitViewData(pViewData, pEntry);
}
@@ -2260,11 +2259,11 @@ public:
// blank out missing entries
for (int i = pEntry->ItemCount(); i < col ; ++i)
pEntry->AddItem(o3tl::make_unique<SvLBoxString>(""));
pEntry->AddItem(std::make_unique<SvLBoxString>(""));
if (static_cast<size_t>(col) == pEntry->ItemCount())
{
pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox,
pEntry->AddItem(std::make_unique<SvLBoxButton>(SvLBoxButtonKind::EnabledCheckbox,
bRadio ? &m_aRadioButtonData : &m_aCheckButtonData));
SvViewDataEntry* pViewData = m_xTreeView->GetViewDataEntry(pEntry);
m_xTreeView->InitViewData(pViewData, pEntry);
@@ -2298,7 +2297,7 @@ public:
virtual void set_id(int pos, const OUString& rId) override
{
SvTreeListEntry* pEntry = m_xTreeView->GetEntry(nullptr, pos);
m_aUserData.emplace_back(o3tl::make_unique<OUString>(rId));
m_aUserData.emplace_back(std::make_unique<OUString>(rId));
pEntry->SetUserData(m_aUserData.back().get());
}
@@ -3218,7 +3217,7 @@ public:
virtual void set_id(int row, const OUString& rId) override
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(rId));
m_aUserData.emplace_back(std::make_unique<OUString>(rId));
m_xComboBox->SetEntryData(row, m_aUserData.back().get());
}
@@ -3312,7 +3311,7 @@ public:
nInsertedAt = m_xComboBox->InsertEntry(rStr, createImage(*pImageSurface), nInsertPos);
if (pId)
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(*pId));
m_aUserData.emplace_back(std::make_unique<OUString>(*pId));
m_xComboBox->SetEntryData(nInsertedAt, m_aUserData.back().get());
}
}
@@ -3426,7 +3425,7 @@ public:
nInsertedAt = m_xComboBox->InsertEntryWithImage(rStr, createImage(*pImageSurface), nInsertPos);
if (pId)
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(*pId));
m_aUserData.emplace_back(std::make_unique<OUString>(*pId));
m_xComboBox->SetEntryData(nInsertedAt, m_aUserData.back().get());
}
}
@@ -3637,19 +3636,19 @@ public:
virtual std::unique_ptr<weld::Window> weld_window(const OString &id, bool bTakeOwnership) override
{
SystemWindow* pWindow = m_xBuilder->get<SystemWindow>(id);
return pWindow ? o3tl::make_unique<SalInstanceWindow>(pWindow, bTakeOwnership) : nullptr;
return pWindow ? std::make_unique<SalInstanceWindow>(pWindow, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Widget> weld_widget(const OString &id, bool bTakeOwnership) override
{
vcl::Window* pWidget = m_xBuilder->get<vcl::Window>(id);
return pWidget ? o3tl::make_unique<SalInstanceWidget>(pWidget, bTakeOwnership) : nullptr;
return pWidget ? std::make_unique<SalInstanceWidget>(pWidget, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Container> weld_container(const OString &id, bool bTakeOwnership) override
{
vcl::Window* pContainer = m_xBuilder->get<vcl::Window>(id);
return pContainer ? o3tl::make_unique<SalInstanceContainer>(pContainer, bTakeOwnership) : nullptr;
return pContainer ? std::make_unique<SalInstanceContainer>(pContainer, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Frame> weld_frame(const OString &id, bool bTakeOwnership) override
@@ -3668,73 +3667,73 @@ public:
virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString &id, bool bTakeOwnership) override
{
VclScrolledWindow* pScrolledWindow = m_xBuilder->get<VclScrolledWindow>(id);
return pScrolledWindow ? o3tl::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership) : nullptr;
return pScrolledWindow ? std::make_unique<SalInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString &id, bool bTakeOwnership) override
{
TabControl* pNotebook = m_xBuilder->get<TabControl>(id);
return pNotebook ? o3tl::make_unique<SalInstanceNotebook>(pNotebook, bTakeOwnership) : nullptr;
return pNotebook ? std::make_unique<SalInstanceNotebook>(pNotebook, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Button> weld_button(const OString &id, bool bTakeOwnership) override
{
Button* pButton = m_xBuilder->get<Button>(id);
return pButton ? o3tl::make_unique<SalInstanceButton>(pButton, bTakeOwnership) : nullptr;
return pButton ? std::make_unique<SalInstanceButton>(pButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::MenuButton> weld_menu_button(const OString &id, bool bTakeOwnership) override
{
MenuButton* pButton = m_xBuilder->get<MenuButton>(id);
return pButton ? o3tl::make_unique<SalInstanceMenuButton>(pButton, bTakeOwnership) : nullptr;
return pButton ? std::make_unique<SalInstanceMenuButton>(pButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::ToggleButton> weld_toggle_button(const OString &id, bool bTakeOwnership) override
{
PushButton* pToggleButton = m_xBuilder->get<PushButton>(id);
return pToggleButton ? o3tl::make_unique<SalInstanceToggleButton>(pToggleButton, bTakeOwnership) : nullptr;
return pToggleButton ? std::make_unique<SalInstanceToggleButton>(pToggleButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OString &id, bool bTakeOwnership) override
{
RadioButton* pRadioButton = m_xBuilder->get<RadioButton>(id);
return pRadioButton ? o3tl::make_unique<SalInstanceRadioButton>(pRadioButton, bTakeOwnership) : nullptr;
return pRadioButton ? std::make_unique<SalInstanceRadioButton>(pRadioButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::CheckButton> weld_check_button(const OString &id, bool bTakeOwnership) override
{
CheckBox* pCheckButton = m_xBuilder->get<CheckBox>(id);
return pCheckButton ? o3tl::make_unique<SalInstanceCheckButton>(pCheckButton, bTakeOwnership) : nullptr;
return pCheckButton ? std::make_unique<SalInstanceCheckButton>(pCheckButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Scale> weld_scale(const OString &id, bool bTakeOwnership) override
{
Slider* pSlider = m_xBuilder->get<Slider>(id);
return pSlider ? o3tl::make_unique<SalInstanceScale>(pSlider, bTakeOwnership) : nullptr;
return pSlider ? std::make_unique<SalInstanceScale>(pSlider, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::ProgressBar> weld_progress_bar(const OString &id, bool bTakeOwnership) override
{
::ProgressBar* pProgress = m_xBuilder->get<::ProgressBar>(id);
return pProgress ? o3tl::make_unique<SalInstanceProgressBar>(pProgress, bTakeOwnership) : nullptr;
return pProgress ? std::make_unique<SalInstanceProgressBar>(pProgress, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Image> weld_image(const OString &id, bool bTakeOwnership) override
{
FixedImage* pImage = m_xBuilder->get<FixedImage>(id);
return pImage ? o3tl::make_unique<SalInstanceImage>(pImage, bTakeOwnership) : nullptr;
return pImage ? std::make_unique<SalInstanceImage>(pImage, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Entry> weld_entry(const OString &id, bool bTakeOwnership) override
{
Edit* pEntry = m_xBuilder->get<Edit>(id);
return pEntry ? o3tl::make_unique<SalInstanceEntry>(pEntry, bTakeOwnership) : nullptr;
return pEntry ? std::make_unique<SalInstanceEntry>(pEntry, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::SpinButton> weld_spin_button(const OString &id, bool bTakeOwnership) override
{
FormattedField* pSpinButton = m_xBuilder->get<FormattedField>(id);
return pSpinButton ? o3tl::make_unique<SalInstanceSpinButton>(pSpinButton, bTakeOwnership) : nullptr;
return pSpinButton ? std::make_unique<SalInstanceSpinButton>(pSpinButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit,
@@ -3746,14 +3745,14 @@ public:
SalInstanceSpinButton& rButton = dynamic_cast<SalInstanceSpinButton&>(*xButton);
rButton.SetUseThousandSep();
}
return o3tl::make_unique<weld::MetricSpinButton>(std::move(xButton), eUnit);
return std::make_unique<weld::MetricSpinButton>(std::move(xButton), eUnit);
}
virtual std::unique_ptr<weld::FormattedSpinButton> weld_formatted_spin_button(const OString& id,
bool bTakeOwnership) override
{
FormattedField* pSpinButton = m_xBuilder->get<FormattedField>(id);
return pSpinButton ? o3tl::make_unique<SalInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership) : nullptr;
return pSpinButton ? std::make_unique<SalInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::TimeSpinButton> weld_time_spin_button(const OString& id, TimeFieldFormat eFormat,
@@ -3770,59 +3769,59 @@ public:
vcl::Window* pWidget = m_xBuilder->get<vcl::Window>(id);
::ComboBox* pComboBox = dynamic_cast<::ComboBox*>(pWidget);
if (pComboBox)
return o3tl::make_unique<SalInstanceComboBoxWithEdit>(pComboBox, bTakeOwnership);
return std::make_unique<SalInstanceComboBoxWithEdit>(pComboBox, bTakeOwnership);
ListBox* pListBox = dynamic_cast<ListBox*>(pWidget);
return pListBox ? o3tl::make_unique<SalInstanceComboBoxWithoutEdit>(pListBox, bTakeOwnership) : nullptr;
return pListBox ? std::make_unique<SalInstanceComboBoxWithoutEdit>(pListBox, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::EntryTreeView> weld_entry_tree_view(const OString& containerid, const OString& entryid, const OString& treeviewid, bool bTakeOwnership) override
{
vcl::Window* pContainer = m_xBuilder->get<vcl::Window>(containerid);
return pContainer ? o3tl::make_unique<SalInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership),
return pContainer ? std::make_unique<SalInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership),
weld_tree_view(treeviewid, bTakeOwnership)) : nullptr;
}
virtual std::unique_ptr<weld::TreeView> weld_tree_view(const OString &id, bool bTakeOwnership) override
{
SvTabListBox* pTreeView = m_xBuilder->get<SvTabListBox>(id);
return pTreeView ? o3tl::make_unique<SalInstanceTreeView>(pTreeView, bTakeOwnership) : nullptr;
return pTreeView ? std::make_unique<SalInstanceTreeView>(pTreeView, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Label> weld_label(const OString &id, bool bTakeOwnership) override
{
FixedText* pLabel = m_xBuilder->get<FixedText>(id);
return pLabel ? o3tl::make_unique<SalInstanceLabel>(pLabel, bTakeOwnership) : nullptr;
return pLabel ? std::make_unique<SalInstanceLabel>(pLabel, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::TextView> weld_text_view(const OString &id, bool bTakeOwnership) override
{
VclMultiLineEdit* pTextView = m_xBuilder->get<VclMultiLineEdit>(id);
return pTextView ? o3tl::make_unique<SalInstanceTextView>(pTextView, bTakeOwnership) : nullptr;
return pTextView ? std::make_unique<SalInstanceTextView>(pTextView, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Expander> weld_expander(const OString &id, bool bTakeOwnership) override
{
VclExpander* pExpander = m_xBuilder->get<VclExpander>(id);
return pExpander ? o3tl::make_unique<SalInstanceExpander>(pExpander, bTakeOwnership) : nullptr;
return pExpander ? std::make_unique<SalInstanceExpander>(pExpander, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::DrawingArea> weld_drawing_area(const OString &id, const a11yref& rA11yImpl,
FactoryFunction pUITestFactoryFunction, void* pUserData, bool bTakeOwnership) override
{
VclDrawingArea* pDrawingArea = m_xBuilder->get<VclDrawingArea>(id);
return pDrawingArea ? o3tl::make_unique<SalInstanceDrawingArea>(pDrawingArea, rA11yImpl,
return pDrawingArea ? std::make_unique<SalInstanceDrawingArea>(pDrawingArea, rA11yImpl,
pUITestFactoryFunction, pUserData, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Menu> weld_menu(const OString &id, bool bTakeOwnership) override
{
PopupMenu* pMenu = m_xBuilder->get_menu(id);
return pMenu ? o3tl::make_unique<SalInstanceMenu>(pMenu, bTakeOwnership) : nullptr;
return pMenu ? std::make_unique<SalInstanceMenu>(pMenu, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::SizeGroup> create_size_group() override
{
return o3tl::make_unique<SalInstanceSizeGroup>();
return std::make_unique<SalInstanceSizeGroup>();
}
virtual ~SalInstanceBuilder() override
+1 -2
View File
@@ -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);
+1 -2
View File
@@ -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>() )
{
}
+6 -7
View File
@@ -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;
+3 -5
View File
@@ -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 )
+3 -4
View File
@@ -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() ) )
+1 -2
View File
@@ -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;
}
+1 -2
View File
@@ -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();
-1
View File
@@ -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>
+5 -6
View File
@@ -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
+1 -2
View File
@@ -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;
mpArray = o3tl::make_unique<Point[]>( nTotal );
mpArray = std::make_unique<Point[]>( nTotal );
}
inline Point& ImplPointArray::operator[]( sal_uLong nPos )
+2 -3
View File
@@ -42,7 +42,6 @@
#include <cppuhelper/implbase.hxx>
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/numeric.hxx>
#include <o3tl/make_unique.hxx>
#include <osl/file.hxx>
#include <osl/thread.h>
#include <rtl/crc.h>
@@ -2090,8 +2089,8 @@ void PDFWriterImpl::beginCompression()
{
if (!g_bDebugDisableCompression)
{
m_pCodec = o3tl::make_unique<ZCodec>( 0x4000, 0x4000 );
m_pMemStream = o3tl::make_unique<SvMemoryStream>();
m_pCodec = std::make_unique<ZCodec>( 0x4000, 0x4000 );
m_pMemStream = std::make_unique<SvMemoryStream>();
m_pCodec->BeginCompression();
}
}
+4 -5
View File
@@ -35,7 +35,6 @@
#include <vcl/svapp.hxx>
#include <vcl/alpha.hxx>
#include <osl/endian.h>
#include <o3tl/make_unique.hxx>
#include <bitmapwriteaccess.hxx>
namespace vcl
@@ -666,14 +665,14 @@ bool PNGReaderImpl::ImplReadHeader( const Size& rPreviewSizeHint )
if ( !mpInflateInBuf || !mpScanPrior )
return false;
mpBmp = o3tl::make_unique<Bitmap>( maTargetSize, mnTargetDepth );
mpBmp = std::make_unique<Bitmap>( maTargetSize, mnTargetDepth );
mxAcc = BitmapScopedWriteAccess(*mpBmp);
if (!mxAcc)
return false;
if ( mbAlphaChannel )
{
mpAlphaMask = o3tl::make_unique<AlphaMask>( maTargetSize );
mpAlphaMask = std::make_unique<AlphaMask>( maTargetSize );
mpAlphaMask->Erase( 128 );
mxAlphaAcc = AlphaScopedWriteAccess(*mpAlphaMask);
mpMaskAcc = mxAlphaAcc.get();
@@ -791,13 +790,13 @@ bool PNGReaderImpl::ImplReadTransparent()
{
if( bNeedAlpha)
{
mpAlphaMask = o3tl::make_unique<AlphaMask>( maTargetSize );
mpAlphaMask = std::make_unique<AlphaMask>( maTargetSize );
mxAlphaAcc = AlphaScopedWriteAccess(*mpAlphaMask);
mpMaskAcc = mxAlphaAcc.get();
}
else
{
mpMaskBmp = o3tl::make_unique<Bitmap>( maTargetSize, 1 );
mpMaskBmp = std::make_unique<Bitmap>( maTargetSize, 1 );
mxMaskAcc = BitmapScopedWriteAccess(*mpMaskBmp);
mpMaskAcc = mxMaskAcc.get();
}
+10 -11
View File
@@ -35,7 +35,6 @@
#include <basegfx/range/b2drange.hxx>
#include <basegfx/matrix/b2dhommatrixtools.hxx>
#include <tools/poly.hxx>
#include <o3tl/make_unique.hxx>
namespace
{
@@ -92,7 +91,7 @@ namespace
OSL_ASSERT(ImplIsPolygonRectilinear (rPolyPoly));
// Create a new RegionBand object as container of the bands.
std::unique_ptr<RegionBand> pRegionBand( o3tl::make_unique<RegionBand>() );
std::unique_ptr<RegionBand> pRegionBand( std::make_unique<RegionBand>() );
long nLineId = 0;
// Iterate over all polygons.
@@ -190,7 +189,7 @@ namespace
long nLineID = 0;
// initialisation and creation of Bands
std::unique_ptr<RegionBand> pRegionBand( o3tl::make_unique<RegionBand>() );
std::unique_ptr<RegionBand> pRegionBand( std::make_unique<RegionBand>() );
pRegionBand->CreateBandRange(rPolygonBoundingBox.Top(), rPolygonBoundingBox.Bottom());
// insert polygons
@@ -565,7 +564,7 @@ void vcl::Region::Union( const tools::Rectangle& rRect )
return;
}
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// get justified rectangle
const long nLeft(std::min(rRect.Left(), rRect.Right()));
@@ -656,7 +655,7 @@ void vcl::Region::Intersect( const tools::Rectangle& rRect )
return;
}
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// get justified rectangle
const long nLeft(std::min(rRect.Left(), rRect.Right()));
@@ -735,7 +734,7 @@ void vcl::Region::Exclude( const tools::Rectangle& rRect )
return;
}
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// get justified rectangle
const long nLeft(std::min(rRect.Left(), rRect.Right()));
@@ -818,7 +817,7 @@ void vcl::Region::XOr( const tools::Rectangle& rRect )
}
// only region band mode possibility left here or null/empty
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*getRegionBand()));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*getRegionBand()));
// get justified rectangle
const long nLeft(std::min(rRect.Left(), rRect.Right()));
@@ -913,7 +912,7 @@ void vcl::Region::Union( const vcl::Region& rRegion )
}
// prepare source and target
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// union with source
pNew->Union(*pSource);
@@ -1031,7 +1030,7 @@ void vcl::Region::Intersect( const vcl::Region& rRegion )
else
{
// prepare new regionBand
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// intersect with source
pNew->Intersect(*pSource);
@@ -1115,7 +1114,7 @@ void vcl::Region::Exclude( const vcl::Region& rRegion )
}
// prepare source and target
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// union with source
const bool bSuccess(pNew->Exclude(*pSource));
@@ -1202,7 +1201,7 @@ bool vcl::Region::XOr( const vcl::Region& rRegion )
}
// prepare source and target
std::unique_ptr<RegionBand> pNew( o3tl::make_unique<RegionBand>(*pCurrent));
std::unique_ptr<RegionBand> pNew( std::make_unique<RegionBand>(*pCurrent));
// union with source
pNew->XOr(*pSource);
+1 -2
View File
@@ -35,7 +35,6 @@
#include <svmconverter.hxx>
#include <memory>
#include <o3tl/make_unique.hxx>
// Inlines
static void ImplReadRect( SvStream& rIStm, tools::Rectangle& rRect )
@@ -994,7 +993,7 @@ void SVMConverter::ImplConvertFromSVM1( SvStream& rIStm, GDIMetaFile& rMtf )
case GDI_PUSH_ACTION:
{
aLIStack.push(o3tl::make_unique<LineInfo>(aLineInfo));
aLIStack.push(std::make_unique<LineInfo>(aLineInfo));
rMtf.AddAction( new MetaPushAction( PushFlags::ALL ) );
// #106172# Track font relevant data in shadow VDev
+10 -11
View File
@@ -26,7 +26,6 @@
#include <wall2.hxx>
#include <vcl/dibtools.hxx>
#include <vcl/settings.hxx>
#include <o3tl/make_unique.hxx>
ImplWallpaper::ImplWallpaper() :
maColor( COL_TRANSPARENT ), meStyle( WallpaperStyle::NONE )
@@ -37,13 +36,13 @@ ImplWallpaper::ImplWallpaper( const ImplWallpaper& rImplWallpaper ) :
maColor( rImplWallpaper.maColor ), meStyle(rImplWallpaper.meStyle)
{
if ( rImplWallpaper.mpBitmap )
mpBitmap = o3tl::make_unique<BitmapEx>( *rImplWallpaper.mpBitmap );
mpBitmap = std::make_unique<BitmapEx>( *rImplWallpaper.mpBitmap );
if( rImplWallpaper.mpCache )
mpCache = o3tl::make_unique<BitmapEx>( *rImplWallpaper.mpCache );
mpCache = std::make_unique<BitmapEx>( *rImplWallpaper.mpCache );
if ( rImplWallpaper.mpGradient )
mpGradient = o3tl::make_unique<Gradient>( *rImplWallpaper.mpGradient );
mpGradient = std::make_unique<Gradient>( *rImplWallpaper.mpGradient );
if ( rImplWallpaper.mpRect )
mpRect = *rImplWallpaper.mpRect;
@@ -82,13 +81,13 @@ SvStream& ReadImplWallpaper( SvStream& rIStm, ImplWallpaper& rImplWallpaper )
if( bGrad )
{
rImplWallpaper.mpGradient = o3tl::make_unique<Gradient>();
rImplWallpaper.mpGradient = std::make_unique<Gradient>();
ReadGradient( rIStm, *rImplWallpaper.mpGradient );
}
if( bBmp )
{
rImplWallpaper.mpBitmap = o3tl::make_unique<BitmapEx>();
rImplWallpaper.mpBitmap = std::make_unique<BitmapEx>();
ReadDIBBitmapEx(*rImplWallpaper.mpBitmap, rIStm);
}
@@ -154,13 +153,13 @@ Wallpaper::Wallpaper( const Color& rColor ) : mpImplWallpaper()
Wallpaper::Wallpaper( const BitmapEx& rBmpEx ) : mpImplWallpaper()
{
mpImplWallpaper->mpBitmap = o3tl::make_unique<BitmapEx>( rBmpEx );
mpImplWallpaper->mpBitmap = std::make_unique<BitmapEx>( rBmpEx );
mpImplWallpaper->meStyle = WallpaperStyle::Tile;
}
Wallpaper::Wallpaper( const Gradient& rGradient ) : mpImplWallpaper()
{
mpImplWallpaper->mpGradient = o3tl::make_unique<Gradient>( rGradient );
mpImplWallpaper->mpGradient = std::make_unique<Gradient>( rGradient );
mpImplWallpaper->meStyle = WallpaperStyle::Tile;
}
@@ -169,7 +168,7 @@ Wallpaper::~Wallpaper() = default;
void Wallpaper::ImplSetCachedBitmap( BitmapEx& rBmp ) const
{
if( !mpImplWallpaper->mpCache )
const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = o3tl::make_unique<BitmapEx>( rBmp );
const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = std::make_unique<BitmapEx>( rBmp );
else
*const_cast< ImplWallpaper* >(mpImplWallpaper.get())->mpCache = rBmp;
}
@@ -229,7 +228,7 @@ void Wallpaper::SetBitmap( const BitmapEx& rBitmap )
if ( mpImplWallpaper->mpBitmap )
*(mpImplWallpaper->mpBitmap) = rBitmap;
else
mpImplWallpaper->mpBitmap = o3tl::make_unique<BitmapEx>( rBitmap );
mpImplWallpaper->mpBitmap = std::make_unique<BitmapEx>( rBitmap );
}
if( WallpaperStyle::NONE == mpImplWallpaper->meStyle || WallpaperStyle::ApplicationGradient == mpImplWallpaper->meStyle)
@@ -256,7 +255,7 @@ void Wallpaper::SetGradient( const Gradient& rGradient )
if ( mpImplWallpaper->mpGradient )
*(mpImplWallpaper->mpGradient) = rGradient;
else
mpImplWallpaper->mpGradient = o3tl::make_unique<Gradient>( rGradient );
mpImplWallpaper->mpGradient = std::make_unique<Gradient>( rGradient );
if( WallpaperStyle::NONE == mpImplWallpaper->meStyle || WallpaperStyle::ApplicationGradient == mpImplWallpaper->meStyle )
mpImplWallpaper->meStyle = WallpaperStyle::Tile;
-1
View File
@@ -20,7 +20,6 @@
#include <graphic/Manager.hxx>
#include <impgraph.hxx>
#include <vcl/lazydelete.hxx>
#include <o3tl/make_unique.hxx>
#include <sal/log.hxx>
using namespace css;
+1 -2
View File
@@ -27,7 +27,6 @@
#include <unotools/accessiblestatesethelper.hxx>
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
#include <o3tl/make_unique.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
#include <strings.hrc>
@@ -89,7 +88,7 @@ void SvTabListBox::InitEntry(SvTreeListEntry* pEntry, const OUString& rStr,
for( sal_uInt16 nToken = 0; nToken < nCount; nToken++ )
{
const OUString aToken = GetToken(aCurEntry, nIndex);
pEntry->AddItem(o3tl::make_unique<SvLBoxString>(aToken));
pEntry->AddItem(std::make_unique<SvLBoxString>(aToken));
}
}
+1 -2
View File
@@ -22,7 +22,6 @@
#include <vcl/viewdataentry.hxx>
#include <tools/debug.hxx>
#include <osl/diagnose.h>
#include <o3tl/make_unique.hxx>
#include <memory>
#include <map>
@@ -1123,7 +1122,7 @@ void SvListView::Impl::InitTable()
pEntry = m_rThis.pModel->First();
while( pEntry )
{
pViewData = o3tl::make_unique<SvViewDataEntry>();
pViewData = std::make_unique<SvViewDataEntry>();
m_rThis.InitViewData( pViewData.get(), pEntry );
m_DataTable.insert(std::make_pair(pEntry, std::move(pViewData)));
pEntry = m_rThis.pModel->Next( pEntry );
+4 -4
View File
@@ -48,7 +48,7 @@
#include <set>
#include <string.h>
#include <vector>
#include <o3tl/make_unique.hxx>
using namespace css::accessibility;
// Drag&Drop
@@ -1532,12 +1532,12 @@ void SvTreeListBox::InitEntry(SvTreeListEntry* pEntry,
{
if( nTreeFlags & SvTreeFlags::CHKBTN )
{
pEntry->AddItem(o3tl::make_unique<SvLBoxButton>(eButtonKind, pCheckButtonData));
pEntry->AddItem(std::make_unique<SvLBoxButton>(eButtonKind, pCheckButtonData));
}
pEntry->AddItem(o3tl::make_unique<SvLBoxContextBmp>( aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded));
pEntry->AddItem(std::make_unique<SvLBoxContextBmp>( aCollEntryBmp,aExpEntryBmp, mbContextBmpExpanded));
pEntry->AddItem(o3tl::make_unique<SvLBoxString>(aStr));
pEntry->AddItem(std::make_unique<SvLBoxString>(aStr));
}
OUString SvTreeListBox::GetEntryText(SvTreeListEntry* pEntry) const
+1 -2
View File
@@ -10,7 +10,6 @@
#include <memory>
#include "uiobject_uno.hxx"
#include <utility>
#include <o3tl/make_unique.hxx>
#include <vcl/svapp.hxx>
#include <vcl/idle.hxx>
#include <vcl/scheduler.hxx>
@@ -108,7 +107,7 @@ void SAL_CALL UIObjectUnoObj::executeAction(const OUString& rAction, const css::
mAction = rAction;
mPropValues = rPropValues;
mReady = false;
auto aIdle = o3tl::make_unique<Idle>();
auto aIdle = std::make_unique<Idle>();
aIdle->SetDebugName("UI Test Idle Handler");
aIdle->SetPriority(TaskPriority::HIGHEST);
+4 -5
View File
@@ -60,7 +60,6 @@
#include <strings.hrc>
#include <tools/svlibrary.h>
#include <tools/diagnose_ex.h>
#include <o3tl/make_unique.hxx>
#ifdef DISABLE_DYNLOADING
#include <dlfcn.h>
@@ -3493,7 +3492,7 @@ template<typename T> static bool insertItems(vcl::Window *pWindow, VclBuilder::s
sal_Int32 nPos = pContainer->InsertEntry(item.m_sItem);
if (!item.m_sId.isEmpty())
{
rUserData.emplace_back(o3tl::make_unique<OUString>(OUString::fromUtf8(item.m_sId)));
rUserData.emplace_back(std::make_unique<OUString>(OUString::fromUtf8(item.m_sId)));
pContainer->SetEntryData(nPos, rUserData.back().get());
}
}
@@ -4142,7 +4141,7 @@ void VclBuilder::mungeModel(ComboBox &rTarget, const ListStore &rStore, sal_uInt
{
if (!rRow[1].isEmpty())
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(rRow[1]));
m_aUserData.emplace_back(std::make_unique<OUString>(rRow[1]));
rTarget.SetEntryData(nEntry, m_aUserData.back().get());
}
}
@@ -4169,7 +4168,7 @@ void VclBuilder::mungeModel(ListBox &rTarget, const ListStore &rStore, sal_uInt1
{
if (!rRow[1].isEmpty())
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(rRow[1]));
m_aUserData.emplace_back(std::make_unique<OUString>(rRow[1]));
rTarget.SetEntryData(nEntry, m_aUserData.back().get());
}
}
@@ -4196,7 +4195,7 @@ void VclBuilder::mungeModel(SvTabListBox& rTarget, const ListStore &rStore, sal_
{
if (!rRow[1].isEmpty())
{
m_aUserData.emplace_back(o3tl::make_unique<OUString>(rRow[1]));
m_aUserData.emplace_back(std::make_unique<OUString>(rRow[1]));
pEntry->SetUserData(m_aUserData.back().get());
}
}
+2 -3
View File
@@ -24,7 +24,6 @@
#include <tools/debug.hxx>
#include <vcl/errinf.hxx>
#include <vcl/window.hxx>
#include <o3tl/make_unique.hxx>
#include <vector>
#include <limits.h>
@@ -264,7 +263,7 @@ std::unique_ptr<ErrorInfo> ImplDynamicErrorInfo::GetDynamicErrorInfo(ErrCode nId
if(pDynErrInfo && ErrCode(*pDynErrInfo)==nId)
return std::unique_ptr<ErrorInfo>(pDynErrInfo);
else
return o3tl::make_unique<ErrorInfo>(nId.StripDynamic());
return std::make_unique<ErrorInfo>(nId.StripDynamic());
}
std::unique_ptr<ErrorInfo> ErrorInfo::GetErrorInfo(ErrCode nId)
@@ -272,7 +271,7 @@ std::unique_ptr<ErrorInfo> ErrorInfo::GetErrorInfo(ErrCode nId)
if(nId.IsDynamic())
return ImplDynamicErrorInfo::GetDynamicErrorInfo(nId);
else
return o3tl::make_unique<ErrorInfo>(nId);
return std::make_unique<ErrorInfo>(nId);
}
ErrorInfo::~ErrorInfo()
+1 -2
View File
@@ -35,7 +35,6 @@
#include <unx/helper.hxx>
#include <vcl/inputtypes.hxx>
#include <o3tl/make_unique.hxx>
#include <salwtype.hxx>
#include <sal/macros.h>
@@ -55,7 +54,7 @@ extern "C"
if( ! ( pNoXInitThreads && *pNoXInitThreads ) )
XInitThreads();
X11SalInstance* pInstance = new X11SalInstance( o3tl::make_unique<SalYieldMutex>() );
X11SalInstance* pInstance = new X11SalInstance( std::make_unique<SalYieldMutex>() );
// initialize SalData
X11SalData *pSalData = new X11SalData( SAL_DATA_UNX, pInstance );
+1 -2
View File
@@ -40,7 +40,6 @@
#include <cairo.h>
#include <cairo-ft.h>
#include <sallayout.hxx>
#include <o3tl/make_unique.hxx>
namespace {
@@ -447,7 +446,7 @@ std::unique_ptr<GenericSalLayout> CairoTextRender::GetTextLayout(int nFallbackLe
assert(mpFreetypeFont[nFallbackLevel]);
if (!mpFreetypeFont[nFallbackLevel])
return nullptr;
return o3tl::make_unique<GenericSalLayout>(*mpFreetypeFont[nFallbackLevel]->GetFontInstance());
return std::make_unique<GenericSalLayout>(*mpFreetypeFont[nFallbackLevel]->GetFontInstance());
}
#if ENABLE_CAIRO_CANVAS
+1 -2
View File
@@ -32,7 +32,6 @@
#include <salinst.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
#include <opengl/x11/salvd.hxx>
@@ -50,7 +49,7 @@ std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateX11VirtualDevice(SalGrap
std::unique_ptr<SalVirtualDevice> X11SalInstance::CreateVirtualDevice(SalGraphics* pGraphics,
long &nDX, long &nDY, DeviceFormat eFormat, const SystemGraphicsData *pData)
{
return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, o3tl::make_unique<X11SalGraphics>());
return CreateX11VirtualDevice(pGraphics, nDX, nDY, eFormat, pData, std::make_unique<X11SalGraphics>());
}
void X11SalGraphics::Init( X11SalVirtualDevice *pDevice, SalColormap* pColormap,
+1 -2
View File
@@ -55,7 +55,6 @@
#include <salbmp.hxx>
#include <salprn.hxx>
#include <sallayout.hxx>
#include <o3tl/make_unique.hxx>
using namespace psp;
@@ -738,7 +737,7 @@ std::unique_ptr<GenericSalLayout> GenPspGraphics::GetTextLayout(int nFallbackLev
assert(m_pFreetypeFont[nFallbackLevel]);
if (!m_pFreetypeFont[nFallbackLevel])
return nullptr;
return o3tl::make_unique<PspSalLayout>(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel]);
return std::make_unique<PspSalLayout>(*m_pPrinterGfx, *m_pFreetypeFont[nFallbackLevel]);
}
bool GenPspGraphics::CreateFontSubset(
+2 -3
View File
@@ -37,7 +37,6 @@
#include <rtl/strbuf.hxx>
#include <sal/log.hxx>
#include <rtl/uri.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/settings.hxx>
@@ -110,7 +109,7 @@ extern "C"
gdk_threads_set_lock_functions (GdkThreadsEnter, GdkThreadsLeave);
SAL_INFO("vcl.gtk", "Hooked gdk threads locks");
auto pYieldMutex = o3tl::make_unique<GtkYieldMutex>();
auto pYieldMutex = std::make_unique<GtkYieldMutex>();
gdk_threads_init();
@@ -347,7 +346,7 @@ std::unique_ptr<SalVirtualDevice> GtkInstance::CreateVirtualDevice( SalGraphics
GtkSalGraphics *pGtkSalGraphics = dynamic_cast<GtkSalGraphics*>(pG);
assert(pGtkSalGraphics);
return CreateX11VirtualDevice(pG, nDX, nDY, eFormat, pGd,
o3tl::make_unique<GtkSalGraphics>(pGtkSalGraphics->GetGtkFrame(),
std::make_unique<GtkSalGraphics>(pGtkSalGraphics->GetGtkFrame(),
pGtkSalGraphics->GetGtkWidget(),
pGtkSalGraphics->GetScreenNumber()));
#endif
+30 -30
View File
@@ -7969,7 +7969,7 @@ public:
if (!pMessageDialog)
return nullptr;
gtk_window_set_transient_for(GTK_WINDOW(pMessageDialog), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget)));
return o3tl::make_unique<GtkInstanceMessageDialog>(pMessageDialog, bTakeOwnership);
return std::make_unique<GtkInstanceMessageDialog>(pMessageDialog, bTakeOwnership);
}
virtual std::unique_ptr<weld::Dialog> weld_dialog(const OString &id, bool bTakeOwnership) override
@@ -7979,13 +7979,13 @@ public:
return nullptr;
if (m_pParentWidget)
gtk_window_set_transient_for(GTK_WINDOW(pDialog), GTK_WINDOW(gtk_widget_get_toplevel(m_pParentWidget)));
return o3tl::make_unique<GtkInstanceDialog>(pDialog, bTakeOwnership);
return std::make_unique<GtkInstanceDialog>(pDialog, bTakeOwnership);
}
virtual std::unique_ptr<weld::Window> weld_window(const OString &id, bool bTakeOwnership) override
{
GtkWindow* pWindow = GTK_WINDOW(gtk_builder_get_object(m_pBuilder, id.getStr()));
return pWindow ? o3tl::make_unique<GtkInstanceWindow>(pWindow, bTakeOwnership) : nullptr;
return pWindow ? std::make_unique<GtkInstanceWindow>(pWindow, bTakeOwnership) : nullptr;
}
virtual std::unique_ptr<weld::Widget> weld_widget(const OString &id, bool bTakeOwnership) override
@@ -7994,7 +7994,7 @@ public:
if (!pWidget)
return nullptr;
auto_add_parentless_widgets_to_container(pWidget);
return o3tl::make_unique<GtkInstanceWidget>(pWidget, bTakeOwnership);
return std::make_unique<GtkInstanceWidget>(pWidget, bTakeOwnership);
}
virtual std::unique_ptr<weld::Container> weld_container(const OString &id, bool bTakeOwnership) override
@@ -8003,7 +8003,7 @@ public:
if (!pContainer)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pContainer));
return o3tl::make_unique<GtkInstanceContainer>(pContainer, bTakeOwnership);
return std::make_unique<GtkInstanceContainer>(pContainer, bTakeOwnership);
}
virtual std::unique_ptr<weld::Frame> weld_frame(const OString &id, bool bTakeOwnership) override
@@ -8012,7 +8012,7 @@ public:
if (!pFrame)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pFrame));
return o3tl::make_unique<GtkInstanceFrame>(pFrame, bTakeOwnership);
return std::make_unique<GtkInstanceFrame>(pFrame, bTakeOwnership);
}
virtual std::unique_ptr<weld::ScrolledWindow> weld_scrolled_window(const OString &id, bool bTakeOwnership) override
@@ -8021,7 +8021,7 @@ public:
if (!pScrolledWindow)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pScrolledWindow));
return o3tl::make_unique<GtkInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership);
return std::make_unique<GtkInstanceScrolledWindow>(pScrolledWindow, bTakeOwnership);
}
virtual std::unique_ptr<weld::Notebook> weld_notebook(const OString &id, bool bTakeOwnership) override
@@ -8030,7 +8030,7 @@ public:
if (!pNotebook)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pNotebook));
return o3tl::make_unique<GtkInstanceNotebook>(pNotebook, bTakeOwnership);
return std::make_unique<GtkInstanceNotebook>(pNotebook, bTakeOwnership);
}
virtual std::unique_ptr<weld::Button> weld_button(const OString &id, bool bTakeOwnership) override
@@ -8039,7 +8039,7 @@ public:
if (!pButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pButton));
return o3tl::make_unique<GtkInstanceButton>(pButton, bTakeOwnership);
return std::make_unique<GtkInstanceButton>(pButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::MenuButton> weld_menu_button(const OString &id, bool bTakeOwnership) override
@@ -8048,7 +8048,7 @@ public:
if (!pButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pButton));
return o3tl::make_unique<GtkInstanceMenuButton>(pButton, bTakeOwnership);
return std::make_unique<GtkInstanceMenuButton>(pButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::ToggleButton> weld_toggle_button(const OString &id, bool bTakeOwnership) override
@@ -8057,7 +8057,7 @@ public:
if (!pToggleButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pToggleButton));
return o3tl::make_unique<GtkInstanceToggleButton>(pToggleButton, bTakeOwnership);
return std::make_unique<GtkInstanceToggleButton>(pToggleButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::RadioButton> weld_radio_button(const OString &id, bool bTakeOwnership) override
@@ -8066,7 +8066,7 @@ public:
if (!pRadioButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pRadioButton));
return o3tl::make_unique<GtkInstanceRadioButton>(pRadioButton, bTakeOwnership);
return std::make_unique<GtkInstanceRadioButton>(pRadioButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::CheckButton> weld_check_button(const OString &id, bool bTakeOwnership) override
@@ -8075,7 +8075,7 @@ public:
if (!pCheckButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pCheckButton));
return o3tl::make_unique<GtkInstanceCheckButton>(pCheckButton, bTakeOwnership);
return std::make_unique<GtkInstanceCheckButton>(pCheckButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::Scale> weld_scale(const OString &id, bool bTakeOwnership) override
@@ -8084,7 +8084,7 @@ public:
if (!pScale)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pScale));
return o3tl::make_unique<GtkInstanceScale>(pScale, bTakeOwnership);
return std::make_unique<GtkInstanceScale>(pScale, bTakeOwnership);
}
virtual std::unique_ptr<weld::ProgressBar> weld_progress_bar(const OString &id, bool bTakeOwnership) override
@@ -8093,7 +8093,7 @@ public:
if (!pProgressBar)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pProgressBar));
return o3tl::make_unique<GtkInstanceProgressBar>(pProgressBar, bTakeOwnership);
return std::make_unique<GtkInstanceProgressBar>(pProgressBar, bTakeOwnership);
}
virtual std::unique_ptr<weld::Image> weld_image(const OString &id, bool bTakeOwnership) override
@@ -8102,7 +8102,7 @@ public:
if (!pImage)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pImage));
return o3tl::make_unique<GtkInstanceImage>(pImage, bTakeOwnership);
return std::make_unique<GtkInstanceImage>(pImage, bTakeOwnership);
}
virtual std::unique_ptr<weld::Entry> weld_entry(const OString &id, bool bTakeOwnership) override
@@ -8111,7 +8111,7 @@ public:
if (!pEntry)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pEntry));
return o3tl::make_unique<GtkInstanceEntry>(pEntry, bTakeOwnership);
return std::make_unique<GtkInstanceEntry>(pEntry, bTakeOwnership);
}
virtual std::unique_ptr<weld::SpinButton> weld_spin_button(const OString &id, bool bTakeOwnership) override
@@ -8120,13 +8120,13 @@ public:
if (!pSpinButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pSpinButton));
return o3tl::make_unique<GtkInstanceSpinButton>(pSpinButton, bTakeOwnership);
return std::make_unique<GtkInstanceSpinButton>(pSpinButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::MetricSpinButton> weld_metric_spin_button(const OString& id, FieldUnit eUnit,
bool bTakeOwnership) override
{
return o3tl::make_unique<weld::MetricSpinButton>(weld_spin_button(id, bTakeOwnership), eUnit);
return std::make_unique<weld::MetricSpinButton>(weld_spin_button(id, bTakeOwnership), eUnit);
}
virtual std::unique_ptr<weld::FormattedSpinButton> weld_formatted_spin_button(const OString &id, bool bTakeOwnership) override
@@ -8135,13 +8135,13 @@ public:
if (!pSpinButton)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pSpinButton));
return o3tl::make_unique<GtkInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership);
return std::make_unique<GtkInstanceFormattedSpinButton>(pSpinButton, bTakeOwnership);
}
virtual std::unique_ptr<weld::TimeSpinButton> weld_time_spin_button(const OString& id, TimeFieldFormat eFormat,
bool bTakeOwnership) override
{
return o3tl::make_unique<weld::TimeSpinButton>(weld_spin_button(id, bTakeOwnership), eFormat);
return std::make_unique<weld::TimeSpinButton>(weld_spin_button(id, bTakeOwnership), eFormat);
}
virtual std::unique_ptr<weld::ComboBox> weld_combo_box(const OString &id, bool bTakeOwnership) override
@@ -8150,7 +8150,7 @@ public:
if (!pComboBox)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pComboBox));
return o3tl::make_unique<GtkInstanceComboBox>(pComboBox, bTakeOwnership);
return std::make_unique<GtkInstanceComboBox>(pComboBox, bTakeOwnership);
}
virtual std::unique_ptr<weld::TreeView> weld_tree_view(const OString &id, bool bTakeOwnership) override
@@ -8159,7 +8159,7 @@ public:
if (!pTreeView)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pTreeView));
return o3tl::make_unique<GtkInstanceTreeView>(pTreeView, bTakeOwnership);
return std::make_unique<GtkInstanceTreeView>(pTreeView, bTakeOwnership);
}
virtual std::unique_ptr<weld::EntryTreeView> weld_entry_tree_view(const OString& containerid, const OString& entryid, const OString& treeviewid, bool bTakeOwnership) override
@@ -8168,7 +8168,7 @@ public:
if (!pContainer)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pContainer));
return o3tl::make_unique<GtkInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership), weld_tree_view(treeviewid, bTakeOwnership));
return std::make_unique<GtkInstanceEntryTreeView>(pContainer, bTakeOwnership, weld_entry(entryid, bTakeOwnership), weld_tree_view(treeviewid, bTakeOwnership));
}
virtual std::unique_ptr<weld::Label> weld_label(const OString &id, bool bTakeOwnership) override
@@ -8177,7 +8177,7 @@ public:
if (!pLabel)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pLabel));
return o3tl::make_unique<GtkInstanceLabel>(pLabel, bTakeOwnership);
return std::make_unique<GtkInstanceLabel>(pLabel, bTakeOwnership);
}
virtual std::unique_ptr<weld::TextView> weld_text_view(const OString &id, bool bTakeOwnership) override
@@ -8186,7 +8186,7 @@ public:
if (!pTextView)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pTextView));
return o3tl::make_unique<GtkInstanceTextView>(pTextView, bTakeOwnership);
return std::make_unique<GtkInstanceTextView>(pTextView, bTakeOwnership);
}
virtual std::unique_ptr<weld::Expander> weld_expander(const OString &id, bool bTakeOwnership) override
@@ -8195,7 +8195,7 @@ public:
if (!pExpander)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pExpander));
return o3tl::make_unique<GtkInstanceExpander>(pExpander, bTakeOwnership);
return std::make_unique<GtkInstanceExpander>(pExpander, bTakeOwnership);
}
virtual std::unique_ptr<weld::DrawingArea> weld_drawing_area(const OString &id, const a11yref& rA11y,
@@ -8205,7 +8205,7 @@ public:
if (!pDrawingArea)
return nullptr;
auto_add_parentless_widgets_to_container(GTK_WIDGET(pDrawingArea));
return o3tl::make_unique<GtkInstanceDrawingArea>(pDrawingArea, rA11y, bTakeOwnership);
return std::make_unique<GtkInstanceDrawingArea>(pDrawingArea, rA11y, bTakeOwnership);
}
virtual std::unique_ptr<weld::Menu> weld_menu(const OString &id, bool bTakeOwnership) override
@@ -8213,12 +8213,12 @@ public:
GtkMenu* pMenu = GTK_MENU(gtk_builder_get_object(m_pBuilder, id.getStr()));
if (!pMenu)
return nullptr;
return o3tl::make_unique<GtkInstanceMenu>(pMenu, bTakeOwnership);
return std::make_unique<GtkInstanceMenu>(pMenu, bTakeOwnership);
}
virtual std::unique_ptr<weld::SizeGroup> create_size_group() override
{
return o3tl::make_unique<GtkInstanceSizeGroup>();
return std::make_unique<GtkInstanceSizeGroup>();
}
};
-1
View File
@@ -27,7 +27,6 @@
#include <QtGui/QClipboard>
#include <QtWidgets/QFrame>
#include <o3tl/make_unique.hxx>
#include <osl/process.h>
#include <sal/log.hxx>
+1 -2
View File
@@ -28,7 +28,6 @@
#include <tools/time.hxx>
#include <comphelper/solarmutex.hxx>
#include <o3tl/char16_t2wchar_t.hxx>
#include <o3tl/make_unique.hxx>
#include <vcl/inputtypes.hxx>
#include <vcl/opengl/OpenGLHelper.hxx>
@@ -389,7 +388,7 @@ VCLPLUG_WIN_PUBLIC SalInstance* create_SalInstance()
}
WinSalInstance::WinSalInstance()
: SalInstance(o3tl::make_unique<SalYieldMutex>())
: SalInstance(std::make_unique<SalYieldMutex>())
, mhInst( nullptr )
, mhComWnd( nullptr )
, m_nNoYieldLock( 0 )
+1 -2
View File
@@ -24,7 +24,6 @@
#include <comphelper/windowserrorstring.hxx>
#include <comphelper/scopeguard.hxx>
#include <o3tl/make_unique.hxx>
#include <opengl/texture.hxx>
#include <opengl/win/gdiimpl.hxx>
@@ -295,7 +294,7 @@ std::unique_ptr<GenericSalLayout> WinSalGraphics::GetTextLayout(int nFallbackLev
assert(mpWinFontEntry[nFallbackLevel]->GetFontFace());
mpWinFontEntry[nFallbackLevel]->SetGraphics(this);
return o3tl::make_unique<GenericSalLayout>(*mpWinFontEntry[nFallbackLevel]);
return std::make_unique<GenericSalLayout>(*mpWinFontEntry[nFallbackLevel]);
}
WinFontInstance::WinFontInstance(const WinFontFace& rPFF, const FontSelectPattern& rFSP)
@@ -13,8 +13,6 @@
#include <comphelper/processfactory.hxx>
#include <o3tl/make_unique.hxx>
#include <ucbhelper/content.hxx>
#include <test/bootstrapfixture.hxx>
@@ -33,8 +33,6 @@
#include <comphelper/processfactory.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/ustring.hxx>
#include <ucbhelper/content.hxx>
@@ -145,7 +143,7 @@ DirectoryStream::createForParent(const css::uno::Reference<css::ucb::XContent>&
const uno::Reference<ucb::XContent> xDirContent(xChild->getParent(), uno::UNO_QUERY);
if (xDirContent.is())
{
pDir = o3tl::make_unique<DirectoryStream>(xDirContent);
pDir = std::make_unique<DirectoryStream>(xDirContent);
if (!pDir->isStructured())
pDir.reset();
}
+2 -3
View File
@@ -39,7 +39,6 @@
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/macros.hxx>
#include <o3tl/make_unique.hxx>
#include "content.hxx"
#include "provider.hxx"
#include "resultset.hxx"
@@ -291,7 +290,7 @@ uno::Any SAL_CALL Content::execute(
= new DynamicResultSet(
m_xContext,
aOpenCommand,
o3tl::make_unique<ResultSetForRootFactory>(
std::make_unique<ResultSetForRootFactory>(
m_xContext,
m_xProvider.get(),
aOpenCommand.Properties,
@@ -305,7 +304,7 @@ uno::Any SAL_CALL Content::execute(
= new DynamicResultSet(
m_xContext,
aOpenCommand,
o3tl::make_unique<ResultSetForQueryFactory>(
std::make_unique<ResultSetForQueryFactory>(
m_xContext,
m_xProvider.get(),
aOpenCommand.Properties,
-1
View File
@@ -163,7 +163,6 @@
#include <i18nlangtag/languagetag.hxx>
#include <o3tl/any.hxx>
#include <o3tl/cow_wrapper.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/strong_int.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <sax/tools/converter.hxx>
@@ -22,7 +22,6 @@
#include <memory>
#include <o3tl/make_unique.hxx>
#include <rtl/ustring.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/XMultiPropertySet.hpp>
@@ -135,7 +134,7 @@ public:
*/
template<class T> void Add (const OUString & sName, T& rValue)
{
aPropertyList[sName] = o3tl::make_unique<PropertyWrapper<T>>(sName, rValue);
aPropertyList[sName] = std::make_unique<PropertyWrapper<T>>(sName, rValue);
}
/** @descr Try to get the values for all properties added with the Add
+11 -12
View File
@@ -24,7 +24,6 @@
#include "SchXMLTools.hxx"
#include <facreg.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <comphelper/processfactory.hxx>
@@ -145,7 +144,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetDocElemTokenMap()
XML_TOKEN_MAP_END
};
mpChartDocElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aDocElemTokenMap );
mpChartDocElemTokenMap = std::make_unique<SvXMLTokenMap>( aDocElemTokenMap );
} // if( ! mpChartDocElemTokenMap )
return *mpChartDocElemTokenMap;
@@ -166,7 +165,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetTableElemTokenMap()
XML_TOKEN_MAP_END
};
mpTableElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aTableElemTokenMap );
mpTableElemTokenMap = std::make_unique<SvXMLTokenMap>( aTableElemTokenMap );
} // if( ! mpTableElemTokenMap )
return *mpTableElemTokenMap;
@@ -186,7 +185,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetChartElemTokenMap()
XML_TOKEN_MAP_END
};
mpChartElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aChartElemTokenMap );
mpChartElemTokenMap = std::make_unique<SvXMLTokenMap>( aChartElemTokenMap );
} // if( ! mpChartElemTokenMap )
return *mpChartElemTokenMap;
@@ -211,7 +210,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaElemTokenMap()
XML_TOKEN_MAP_END
};
mpPlotAreaElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aPlotAreaElemTokenMap );
mpPlotAreaElemTokenMap = std::make_unique<SvXMLTokenMap>( aPlotAreaElemTokenMap );
} // if( ! mpPlotAreaElemTokenMap )
return *mpPlotAreaElemTokenMap;
@@ -232,7 +231,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesElemTokenMap()
XML_TOKEN_MAP_END
};
mpSeriesElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aSeriesElemTokenMap );
mpSeriesElemTokenMap = std::make_unique<SvXMLTokenMap>( aSeriesElemTokenMap );
} // if( ! mpSeriesElemTokenMap )
return *mpSeriesElemTokenMap;
@@ -255,7 +254,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetChartAttrTokenMap()
XML_TOKEN_MAP_END
};
mpChartAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aChartAttrTokenMap );
mpChartAttrTokenMap = std::make_unique<SvXMLTokenMap>( aChartAttrTokenMap );
} // if( ! mpChartAttrTokenMap )
return *mpChartAttrTokenMap;
@@ -288,7 +287,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPlotAreaAttrTokenMap()
XML_TOKEN_MAP_END
};
mpPlotAreaAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aPlotAreaAttrTokenMap );
mpPlotAreaAttrTokenMap = std::make_unique<SvXMLTokenMap>( aPlotAreaAttrTokenMap );
} // if( ! mpPlotAreaAttrTokenMap )
return *mpPlotAreaAttrTokenMap;
@@ -305,7 +304,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetCellAttrTokenMap()
XML_TOKEN_MAP_END
};
mpCellAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aCellAttrTokenMap );
mpCellAttrTokenMap = std::make_unique<SvXMLTokenMap>( aCellAttrTokenMap );
} // if( ! mpCellAttrTokenMap )
return *mpCellAttrTokenMap;
@@ -327,7 +326,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetSeriesAttrTokenMap()
XML_TOKEN_MAP_END
};
mpSeriesAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aSeriesAttrTokenMap );
mpSeriesAttrTokenMap = std::make_unique<SvXMLTokenMap>( aSeriesAttrTokenMap );
} // if( ! mpSeriesAttrTokenMap )
return *mpSeriesAttrTokenMap;
@@ -344,7 +343,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetPropMappingAttrTokenMap()
XML_TOKEN_MAP_END
};
mpPropMappingAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aPropMappingAttrTokenMap );
mpPropMappingAttrTokenMap = std::make_unique<SvXMLTokenMap>( aPropMappingAttrTokenMap );
}
return *mpPropMappingAttrTokenMap;
@@ -364,7 +363,7 @@ const SvXMLTokenMap& SchXMLImportHelper::GetRegEquationAttrTokenMap()
XML_TOKEN_MAP_END
};
mpRegEquationAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aRegressionEquationAttrTokenMap );
mpRegEquationAttrTokenMap = std::make_unique<SvXMLTokenMap>( aRegressionEquationAttrTokenMap );
} // if( ! mpRegEquationAttrTokenMap )
return *mpRegEquationAttrTokenMap;
+1 -2
View File
@@ -21,7 +21,6 @@
#include <string.h>
#include <com/sun/star/xml/AttributeData.hpp>
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx>
#include <comphelper/servicehelper.hxx>
#include <cppuhelper/supportsservice.hxx>
@@ -44,7 +43,7 @@ SvUnoAttributeContainer::SvUnoAttributeContainer( std::unique_ptr<SvXMLAttrConta
: mpContainer( std::move( pContainer ) )
{
if( !mpContainer )
mpContainer = o3tl::make_unique<SvXMLAttrContainerData>();
mpContainer = std::make_unique<SvXMLAttrContainerData>();
}
// container::XElementAccess
+2 -3
View File
@@ -100,7 +100,6 @@
#include <comphelper/xmltools.hxx>
#include <comphelper/graphicmimetype.hxx>
#include <o3tl/make_unique.hxx>
using namespace ::osl;
using namespace ::com::sun::star;
@@ -2020,8 +2019,8 @@ XMLEventExport& SvXMLExport::GetEventExport()
mpEventExport.reset( new XMLEventExport(*this) );
// and register standard handlers + names
mpEventExport->AddHandler("StarBasic", o3tl::make_unique<XMLStarBasicExportHandler>());
mpEventExport->AddHandler("Script", o3tl::make_unique<XMLScriptExportHandler>());
mpEventExport->AddHandler("StarBasic", std::make_unique<XMLStarBasicExportHandler>());
mpEventExport->AddHandler("Script", std::make_unique<XMLScriptExportHandler>());
mpEventExport->AddTranslationTable(aStandardEventTable);
}
+10 -11
View File
@@ -66,7 +66,6 @@
#include <comphelper/storagehelper.hxx>
#include <comphelper/attributelist.hxx>
#include <unotools/fontcvt.hxx>
#include <o3tl/make_unique.hxx>
#include <xmloff/fasttokenhandler.hxx>
#include <vcl/GraphicExternalLink.hxx>
@@ -381,7 +380,7 @@ void SvXMLImport::InitCtor_()
msPackageProtocol = "vnd.sun.star.Package:";
if (mxNumberFormatsSupplier.is())
mpNumImport = o3tl::make_unique<SvXMLNumFmtHelper>(mxNumberFormatsSupplier, GetComponentContext());
mpNumImport = std::make_unique<SvXMLNumFmtHelper>(mxNumberFormatsSupplier, GetComponentContext());
if (mxModel.is() && !mxEventListener.is())
{
@@ -1525,7 +1524,7 @@ ProgressBarHelper* SvXMLImport::GetProgressBarHelper()
{
if (!mpProgressBarHelper)
{
mpProgressBarHelper = o3tl::make_unique<ProgressBarHelper>(mxStatusIndicator, false);
mpProgressBarHelper = std::make_unique<ProgressBarHelper>(mxStatusIndicator, false);
if (mxImportInfo.is())
{
@@ -1595,18 +1594,18 @@ XMLEventImportHelper& SvXMLImport::GetEventImport()
{
// construct event helper and register StarBasic handler and standard
// event tables
mpEventImportHelper = o3tl::make_unique<XMLEventImportHelper>();
mpEventImportHelper = std::make_unique<XMLEventImportHelper>();
const OUString& sStarBasic(GetXMLToken(XML_STARBASIC));
mpEventImportHelper->RegisterFactory(sStarBasic,
o3tl::make_unique<XMLStarBasicContextFactory>());
std::make_unique<XMLStarBasicContextFactory>());
const OUString& sScript(GetXMLToken(XML_SCRIPT));
mpEventImportHelper->RegisterFactory(sScript,
o3tl::make_unique<XMLScriptContextFactory>());
std::make_unique<XMLScriptContextFactory>());
mpEventImportHelper->AddTranslationTable(aStandardEventTable);
// register StarBasic event handler with capitalized spelling
mpEventImportHelper->RegisterFactory("StarBasic",
o3tl::make_unique<XMLStarBasicContextFactory>());
std::make_unique<XMLStarBasicContextFactory>());
}
return *mpEventImportHelper;
@@ -1775,7 +1774,7 @@ void SvXMLImport::CreateDataStylesImport_()
uno::Reference<util::XNumberFormatsSupplier> xNum =
GetNumberFormatsSupplier();
if ( xNum.is() )
mpNumImport = o3tl::make_unique<SvXMLNumFmtHelper>(xNum, GetComponentContext() );
mpNumImport = std::make_unique<SvXMLNumFmtHelper>(xNum, GetComponentContext() );
}
sal_Unicode SvXMLImport::ConvStarBatsCharToStarSymbol( sal_Unicode c )
@@ -1828,7 +1827,7 @@ void SvXMLImport::SetError(
// create error list on demand
if ( !mpXMLErrors )
mpXMLErrors = o3tl::make_unique<XMLErrors>();
mpXMLErrors = std::make_unique<XMLErrors>();
// save error information
// use document locator (if none supplied)
@@ -2194,10 +2193,10 @@ void SvXMLImportFastNamespaceHandler::registerNamespace( const OUString& rNamesp
// Elements with default namespace parsed by FastParser have namespace prefix.
// A default namespace needs to be registered with the prefix, to maintain the compatibility.
if ( rNamespacePrefix.isEmpty() )
m_aNamespaceDefines.push_back( o3tl::make_unique<NamespaceDefine>(
m_aNamespaceDefines.push_back( std::make_unique<NamespaceDefine>(
SvXMLImport::getNamespacePrefixFromURI( rNamespaceURI ), rNamespaceURI) );
m_aNamespaceDefines.push_back( o3tl::make_unique<NamespaceDefine>(
m_aNamespaceDefines.push_back( std::make_unique<NamespaceDefine>(
rNamespacePrefix, rNamespaceURI) );
}
+2 -4
View File
@@ -54,8 +54,6 @@
#include <vector>
#include <o3tl/make_unique.hxx>
#include <xmloff/xmltypes.hxx>
#include "sdpropls.hxx"
#include <xmloff/xmltoken.hxx>
@@ -161,7 +159,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeTokenMap()
XML_TOKEN_MAP_END
};
mpAnimationNodeTokenMap = o3tl::make_unique<SvXMLTokenMap>( aAnimationNodeTokenMap );
mpAnimationNodeTokenMap = std::make_unique<SvXMLTokenMap>( aAnimationNodeTokenMap );
}
return *mpAnimationNodeTokenMap;
@@ -280,7 +278,7 @@ const SvXMLTokenMap& AnimationsImportHelperImpl::getAnimationNodeAttributeTokenM
XML_TOKEN_MAP_END
};
mpAnimationNodeAttributeTokenMap = o3tl::make_unique<SvXMLTokenMap>( aAnimationNodeAttributeTokenMap );
mpAnimationNodeAttributeTokenMap = std::make_unique<SvXMLTokenMap>( aAnimationNodeAttributeTokenMap );
}
return *mpAnimationNodeAttributeTokenMap;
+10 -11
View File
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <o3tl/make_unique.hxx>
#include <osl/thread.h>
#include <sal/log.hxx>
#include <comphelper/processfactory.hxx>
@@ -428,7 +427,7 @@ const SvXMLTokenMap& SdXMLImport::GetDocElemTokenMap()
XML_TOKEN_MAP_END
};
mpDocElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aDocElemTokenMap);
mpDocElemTokenMap = std::make_unique<SvXMLTokenMap>(aDocElemTokenMap);
}
return *mpDocElemTokenMap;
@@ -449,7 +448,7 @@ const SvXMLTokenMap& SdXMLImport::GetBodyElemTokenMap()
XML_TOKEN_MAP_END
};
mpBodyElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aBodyElemTokenMap);
mpBodyElemTokenMap = std::make_unique<SvXMLTokenMap>(aBodyElemTokenMap);
}
return *mpBodyElemTokenMap;
@@ -467,7 +466,7 @@ const SvXMLTokenMap& SdXMLImport::GetStylesElemTokenMap()
XML_TOKEN_MAP_END
};
mpStylesElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aStylesElemTokenMap);
mpStylesElemTokenMap = std::make_unique<SvXMLTokenMap>(aStylesElemTokenMap);
}
return *mpStylesElemTokenMap;
@@ -484,7 +483,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageElemTokenMap()
XML_TOKEN_MAP_END
};
mpMasterPageElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aMasterPageElemTokenMap);
mpMasterPageElemTokenMap = std::make_unique<SvXMLTokenMap>(aMasterPageElemTokenMap);
}
return *mpMasterPageElemTokenMap;
@@ -507,7 +506,7 @@ const SvXMLTokenMap& SdXMLImport::GetMasterPageAttrTokenMap()
XML_TOKEN_MAP_END
};
mpMasterPageAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aMasterPageAttrTokenMap);
mpMasterPageAttrTokenMap = std::make_unique<SvXMLTokenMap>(aMasterPageAttrTokenMap);
}
return *mpMasterPageAttrTokenMap;
@@ -523,7 +522,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterAttrTokenMap()
XML_TOKEN_MAP_END
};
mpPageMasterAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aPageMasterAttrTokenMap);
mpPageMasterAttrTokenMap = std::make_unique<SvXMLTokenMap>(aPageMasterAttrTokenMap);
}
return *mpPageMasterAttrTokenMap;
@@ -545,7 +544,7 @@ const SvXMLTokenMap& SdXMLImport::GetPageMasterStyleAttrTokenMap()
XML_TOKEN_MAP_END
};
mpPageMasterStyleAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aPageMasterStyleAttrTokenMap);
mpPageMasterStyleAttrTokenMap = std::make_unique<SvXMLTokenMap>(aPageMasterStyleAttrTokenMap);
}
return *mpPageMasterStyleAttrTokenMap;
@@ -571,7 +570,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageAttrTokenMap()
XML_TOKEN_MAP_END
};
mpDrawPageAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aDrawPageAttrTokenMap);
mpDrawPageAttrTokenMap = std::make_unique<SvXMLTokenMap>(aDrawPageAttrTokenMap);
}
return *mpDrawPageAttrTokenMap;
@@ -590,7 +589,7 @@ const SvXMLTokenMap& SdXMLImport::GetDrawPageElemTokenMap()
XML_TOKEN_MAP_END
};
mpDrawPageElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aDrawPageElemTokenMap);
mpDrawPageElemTokenMap = std::make_unique<SvXMLTokenMap>(aDrawPageElemTokenMap);
}
return *mpDrawPageElemTokenMap;
@@ -610,7 +609,7 @@ const SvXMLTokenMap& SdXMLImport::GetPresentationPlaceholderAttrTokenMap()
XML_TOKEN_MAP_END
};
mpPresentationPlaceholderAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(aPresentationPlaceholderAttrTokenMap);
mpPresentationPlaceholderAttrTokenMap = std::make_unique<SvXMLTokenMap>(aPresentationPlaceholderAttrTokenMap);
}
return *mpPresentationPlaceholderAttrTokenMap;
+1 -2
View File
@@ -87,7 +87,6 @@
#include <officecfg/Office/Common.hxx>
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
#include <o3tl/typed_flags_set.hxx>
#include <rtl/math.hxx>
@@ -3289,7 +3288,7 @@ void XMLShapeExport::ImpExportMediaShape(
mrExport.AddAttribute( XML_NAMESPACE_DRAW, XML_MIME_TYPE, sMimeType );
// write plugin
auto pPluginOBJ = o3tl::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true);
auto pPluginOBJ = std::make_unique<SvXMLElementExport>(mrExport, XML_NAMESPACE_DRAW, XML_PLUGIN, !( nFeatures & XMLShapeExportFlags::NO_WS ), true);
// export parameters
const OUString aFalseStr( "false" ), aTrueStr( "true" );
+8 -10
View File
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <o3tl/make_unique.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <sal/log.hxx>
@@ -200,7 +198,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetGroupShapeElemTokenMap()
XML_TOKEN_MAP_END
};
mpGroupShapeElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aGroupShapeElemTokenMap);
mpGroupShapeElemTokenMap = std::make_unique<SvXMLTokenMap>(aGroupShapeElemTokenMap);
}
return *mpGroupShapeElemTokenMap;
@@ -223,7 +221,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::GetFrameShapeElemTokenMap()
XML_TOKEN_MAP_END
};
mpFrameShapeElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(aFrameShapeElemTokenMap);
mpFrameShapeElemTokenMap = std::make_unique<SvXMLTokenMap>(aFrameShapeElemTokenMap);
}
return *mpFrameShapeElemTokenMap;
@@ -243,7 +241,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSceneShapeElemTokenMap()
XML_TOKEN_MAP_END
};
mp3DSceneShapeElemTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DSceneShapeElemTokenMap);
mp3DSceneShapeElemTokenMap = std::make_unique<SvXMLTokenMap>(a3DSceneShapeElemTokenMap);
}
return *mp3DSceneShapeElemTokenMap;
@@ -260,7 +258,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DObjectAttrTokenMap()
XML_TOKEN_MAP_END
};
mp3DObjectAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DObjectAttrTokenMap);
mp3DObjectAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DObjectAttrTokenMap);
}
return *mp3DObjectAttrTokenMap;
@@ -277,7 +275,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DPolygonBasedAttrTokenMap()
XML_TOKEN_MAP_END
};
mp3DPolygonBasedAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DPolygonBasedAttrTokenMap);
mp3DPolygonBasedAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DPolygonBasedAttrTokenMap);
}
return *mp3DPolygonBasedAttrTokenMap;
@@ -294,7 +292,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DCubeObjectAttrTokenMap()
XML_TOKEN_MAP_END
};
mp3DCubeObjectAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DCubeObjectAttrTokenMap);
mp3DCubeObjectAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DCubeObjectAttrTokenMap);
}
return *mp3DCubeObjectAttrTokenMap;
@@ -311,7 +309,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DSphereObjectAttrTokenMap()
XML_TOKEN_MAP_END
};
mp3DSphereObjectAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DSphereObjectAttrTokenMap);
mp3DSphereObjectAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DSphereObjectAttrTokenMap);
}
return *mp3DSphereObjectAttrTokenMap;
@@ -330,7 +328,7 @@ const SvXMLTokenMap& XMLShapeImportHelper::Get3DLightAttrTokenMap()
XML_TOKEN_MAP_END
};
mp3DLightAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>(a3DLightAttrTokenMap);
mp3DLightAttrTokenMap = std::make_unique<SvXMLTokenMap>(a3DLightAttrTokenMap);
}
return *mp3DLightAttrTokenMap;
+1 -2
View File
@@ -18,7 +18,6 @@
*/
#include <xexptran.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx>
#include <osl/diagnose.h>
#include <sax/tools/converter.hxx>
@@ -37,7 +36,7 @@
using namespace ::com::sun::star;
using o3tl::make_unique;
using std::make_unique;
// parsing help functions for simple chars
static void Imp_SkipSpaces(const OUString& rStr, sal_Int32& rPos, const sal_Int32 nLen)
+1 -2
View File
@@ -20,7 +20,6 @@
#include "ximpcustomshape.hxx"
#include "ximpshap.hxx"
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/math.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/ustring.hxx>
@@ -1190,7 +1189,7 @@ void XMLEnhancedCustomShapeContext::EndElement()
if ( !maEquations.empty() )
{
// creating hash map containing the name and index of each equation
std::unique_ptr<EquationHashMap> pH = o3tl::make_unique<EquationHashMap>();
std::unique_ptr<EquationHashMap> pH = std::make_unique<EquationHashMap>();
std::vector< OUString >::iterator aEquationNameIter = maEquationNames.begin();
std::vector< OUString >::iterator aEquationNameEnd = maEquationNames.end();
while( aEquationNameIter != aEquationNameEnd )
+2 -3
View File
@@ -24,7 +24,6 @@
#include <xmloff/xmluconv.hxx>
#include "ximpnote.hxx"
#include <tools/debug.hxx>
#include <o3tl/make_unique.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
@@ -887,8 +886,8 @@ SdXMLStylesContext::SdXMLStylesContext(
mbIsAutoStyle(bIsAutoStyle)
{
Reference< uno::XComponentContext > xContext = rImport.GetComponentContext();
mpNumFormatter = o3tl::make_unique<SvNumberFormatter>( xContext, LANGUAGE_SYSTEM );
mpNumFmtHelper = o3tl::make_unique<SvXMLNumFmtHelper>( mpNumFormatter.get(), xContext );
mpNumFormatter = std::make_unique<SvNumberFormatter>( xContext, LANGUAGE_SYSTEM );
mpNumFmtHelper = std::make_unique<SvXMLNumFmtHelper>( mpNumFormatter.get(), xContext );
}
SvXMLStyleContext* SdXMLStylesContext::CreateStyleChildContext(
+8 -10
View File
@@ -19,8 +19,6 @@
#include <xmloff/controlpropertyhdl.hxx>
#include <o3tl/make_unique.hxx>
#include <com/sun/star/util/MeasureUnit.hpp>
#include <com/sun/star/awt/TextAlign.hpp>
#include <com/sun/star/awt/FontWidth.hpp>
@@ -59,49 +57,49 @@ namespace xmloff
{
case XML_TYPE_TEXT_ALIGN:
if (!m_pTextAlignHandler)
m_pTextAlignHandler = o3tl::make_unique<XMLConstantsPropertyHandler>(aTextAlignMap, XML_TOKEN_INVALID );
m_pTextAlignHandler = std::make_unique<XMLConstantsPropertyHandler>(aTextAlignMap, XML_TOKEN_INVALID );
pHandler = m_pTextAlignHandler.get();
break;
case XML_TYPE_CONTROL_BORDER:
if (!m_pControlBorderStyleHandler)
m_pControlBorderStyleHandler = o3tl::make_unique<OControlBorderHandler>( OControlBorderHandler::STYLE );
m_pControlBorderStyleHandler = std::make_unique<OControlBorderHandler>( OControlBorderHandler::STYLE );
pHandler = m_pControlBorderStyleHandler.get();
break;
case XML_TYPE_CONTROL_BORDER_COLOR:
if ( !m_pControlBorderColorHandler )
m_pControlBorderColorHandler = o3tl::make_unique<OControlBorderHandler>( OControlBorderHandler::COLOR );
m_pControlBorderColorHandler = std::make_unique<OControlBorderHandler>( OControlBorderHandler::COLOR );
pHandler = m_pControlBorderColorHandler.get();
break;
case XML_TYPE_ROTATION_ANGLE:
if (!m_pRotationAngleHandler)
m_pRotationAngleHandler = o3tl::make_unique<ORotationAngleHandler>();
m_pRotationAngleHandler = std::make_unique<ORotationAngleHandler>();
pHandler = m_pRotationAngleHandler.get();
break;
case XML_TYPE_FONT_WIDTH:
if (!m_pFontWidthHandler)
m_pFontWidthHandler = o3tl::make_unique<OFontWidthHandler>();
m_pFontWidthHandler = std::make_unique<OFontWidthHandler>();
pHandler = m_pFontWidthHandler.get();
break;
case XML_TYPE_CONTROL_TEXT_EMPHASIZE:
if (!m_pFontEmphasisHandler)
m_pFontEmphasisHandler = o3tl::make_unique<XMLConstantsPropertyHandler>( aFontEmphasisMap, XML_NONE );
m_pFontEmphasisHandler = std::make_unique<XMLConstantsPropertyHandler>( aFontEmphasisMap, XML_NONE );
pHandler = m_pFontEmphasisHandler.get();
break;
case XML_TYPE_TEXT_FONT_RELIEF:
if (!m_pFontReliefHandler)
m_pFontReliefHandler = o3tl::make_unique<XMLConstantsPropertyHandler>( aFontReliefMap, XML_NONE );
m_pFontReliefHandler = std::make_unique<XMLConstantsPropertyHandler>( aFontReliefMap, XML_NONE );
pHandler = m_pFontReliefHandler.get();
break;
case XML_TYPE_TEXT_LINE_MODE:
if (!m_pTextLineModeHandler)
{
m_pTextLineModeHandler = o3tl::make_unique<XMLNamedBoolPropertyHdl>(
m_pTextLineModeHandler = std::make_unique<XMLNamedBoolPropertyHdl>(
::xmloff::token::XML_SKIP_WHITE_SPACE,
::xmloff::token::XML_CONTINUOUS);
}
+2 -4
View File
@@ -19,8 +19,6 @@
#include "elementexport.hxx"
#include <o3tl/make_unique.hxx>
#include "strings.hxx"
#include <xmloff/xmlnmspe.hxx>
#include "eventexport.hxx"
@@ -144,7 +142,7 @@ namespace xmloff
void OElementExport::implStartElement(const sal_Char* _pName)
{
m_pXMLElement = o3tl::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, _pName, true, true);
m_pXMLElement = std::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, _pName, true, true);
}
void OElementExport::implEndElement()
@@ -1396,7 +1394,7 @@ namespace xmloff
// before we let the base class start it's outer element, we add a wrapper element
const sal_Char *pOuterElementName = getOuterXMLElementName();
if (pOuterElementName)
m_pOuterElement = o3tl::make_unique<SvXMLElementExport>(
m_pOuterElement = std::make_unique<SvXMLElementExport>(
m_rContext.getGlobalContext(),
XML_NAMESPACE_FORM,
pOuterElementName, true,
+1 -3
View File
@@ -21,8 +21,6 @@
#include <memory>
#include <o3tl/make_unique.hxx>
#include <xmloff/xmlexp.hxx>
#include "strings.hxx"
#include <xmloff/xmlnmspe.hxx>
@@ -124,7 +122,7 @@ namespace xmloff
// now that we have the first sub-tag we need the form:properties element
if (!pPropertiesTag)
pPropertiesTag = o3tl::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, token::XML_PROPERTIES, true, true);
pPropertiesTag = std::make_unique<SvXMLElementExport>(m_rContext.getGlobalContext(), XML_NAMESPACE_FORM, token::XML_PROPERTIES, true, true);
// add the name attribute
AddAttribute(XML_NAMESPACE_FORM, token::XML_PROPERTY_NAME, rProperty);
+4 -4
View File
@@ -35,7 +35,7 @@
#include <xmloff/xmltoken.hxx>
#include "impastpl.hxx"
#include <o3tl/make_unique.hxx>
using namespace ::std;
using namespace ::com::sun::star;
@@ -430,7 +430,7 @@ void SvXMLAutoStylePoolP_Impl::AddFamily(
}
#endif
m_FamilySet.insert(o3tl::make_unique<XMLAutoStyleFamily>(nFamily, rStrName, rMapper, aPrefix, bAsFamily));
m_FamilySet.insert(std::make_unique<XMLAutoStyleFamily>(nFamily, rStrName, rMapper, aPrefix, bAsFamily));
}
void SvXMLAutoStylePoolP_Impl::SetFamilyPropSetMapper(
@@ -515,7 +515,7 @@ bool SvXMLAutoStylePoolP_Impl::Add(
if (it2 == rFamily.m_ParentSet.end())
{
std::pair<XMLAutoStyleFamily::ParentSetType::iterator,bool> r =
rFamily.m_ParentSet.insert(o3tl::make_unique<XMLAutoStylePoolParent>(
rFamily.m_ParentSet.insert(std::make_unique<XMLAutoStylePoolParent>(
rParentName));
it2 = r.first;
}
@@ -549,7 +549,7 @@ bool SvXMLAutoStylePoolP_Impl::AddNamed(
if (it2 == rFamily.m_ParentSet.end())
{
std::pair<XMLAutoStyleFamily::ParentSetType::iterator,bool> r =
rFamily.m_ParentSet.insert(o3tl::make_unique<XMLAutoStylePoolParent>(
rFamily.m_ParentSet.insert(std::make_unique<XMLAutoStylePoolParent>(
rParentName));
it2 = r.first;
}
+7 -9
View File
@@ -17,8 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <o3tl/make_unique.hxx>
#include <unotools/syslocale.hxx>
#include <svl/zforlist.hxx>
@@ -442,7 +440,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStylesElemTokenMap()
XML_TOKEN_MAP_END
};
pStylesElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStylesElemMap );
pStylesElemTokenMap = std::make_unique<SvXMLTokenMap>( aStylesElemMap );
}
return *pStylesElemTokenMap;
}
@@ -480,7 +478,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemTokenMap()
XML_TOKEN_MAP_END
};
pStyleElemTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStyleElemMap );
pStyleElemTokenMap = std::make_unique<SvXMLTokenMap>( aStyleElemMap );
}
return *pStyleElemTokenMap;
}
@@ -513,7 +511,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleAttrTokenMap()
XML_TOKEN_MAP_END
};
pStyleAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStyleAttrMap );
pStyleAttrTokenMap = std::make_unique<SvXMLTokenMap>( aStyleAttrMap );
}
return *pStyleAttrTokenMap;
}
@@ -559,7 +557,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap()
XML_TOKEN_MAP_END
};
pStyleElemAttrTokenMap = o3tl::make_unique<SvXMLTokenMap>( aStyleElemAttrMap );
pStyleElemAttrTokenMap = std::make_unique<SvXMLTokenMap>( aStyleElemAttrMap );
}
return *pStyleElemAttrTokenMap;
}
@@ -567,7 +565,7 @@ const SvXMLTokenMap& SvXMLNumImpData::GetStyleElemAttrTokenMap()
const LocaleDataWrapper& SvXMLNumImpData::GetLocaleData( LanguageType nLang )
{
if ( !pLocaleData )
pLocaleData = o3tl::make_unique<LocaleDataWrapper>(
pLocaleData = std::make_unique<LocaleDataWrapper>(
pFormatter ? pFormatter->GetComponentContext() : m_xContext,
LanguageTag( nLang ) );
else
@@ -2269,7 +2267,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper(
if (pObj)
pFormatter = pObj->GetNumberFormatter();
pData = o3tl::make_unique<SvXMLNumImpData>( pFormatter, rxContext );
pData = std::make_unique<SvXMLNumImpData>( pFormatter, rxContext );
}
SvXMLNumFmtHelper::SvXMLNumFmtHelper(
@@ -2278,7 +2276,7 @@ SvXMLNumFmtHelper::SvXMLNumFmtHelper(
{
SAL_WARN_IF( !rxContext.is(), "xmloff", "got no service manager" );
pData = o3tl::make_unique<SvXMLNumImpData>( pNumberFormatter, rxContext );
pData = std::make_unique<SvXMLNumImpData>( pNumberFormatter, rxContext );
}
SvXMLNumFmtHelper::~SvXMLNumFmtHelper()
+1 -2
View File
@@ -34,7 +34,6 @@
#include <com/sun/star/container/XIndexReplace.hpp>
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <osl/diagnose.h>
@@ -1044,7 +1043,7 @@ SvXMLImportContextRef SvxXMLListStyleContext::CreateChildContext(
new SvxXMLListLevelStyleContext_Impl( GetImport(), nPrefix,
rLocalName, xAttrList )};
if( !pLevelStyles )
pLevelStyles = o3tl::make_unique<SvxXMLListStyle_Impl>();
pLevelStyles = std::make_unique<SvxXMLListStyle_Impl>();
pLevelStyles->push_back( xLevelStyle );
xContext = xLevelStyle.get();
+1 -2
View File
@@ -29,7 +29,6 @@
#include <com/sun/star/style/XAutoStylesSupplier.hpp>
#include <com/sun/star/style/XAutoStyleFamily.hpp>
#include "PageMasterPropMapper.hxx"
#include <o3tl/make_unique.hxx>
#include <sal/log.hxx>
#include <svl/itemset.hxx>
#include <svl/style.hxx>
@@ -299,7 +298,7 @@ const SvXMLStyleContext *SvXMLStylesContext_Impl::FindStyleChildContext( sal_uIn
if( !pIndices && bCreateIndex && !aStyles.empty() )
{
pIndices = o3tl::make_unique<IndicesType>(aStyles.begin(), aStyles.end());
pIndices = std::make_unique<IndicesType>(aStyles.begin(), aStyles.end());
SAL_WARN_IF(pIndices->size() != aStyles.size(), "xmloff.style", "Here is a duplicate Style");
#if OSL_DEBUG_LEVEL > 0
SAL_WARN_IF(0 != m_nIndexCreated, "xmloff.style",
+1 -2
View File
@@ -18,7 +18,6 @@
*/
#include <com/sun/star/style/TabAlign.hpp>
#include <o3tl/make_unique.hxx>
#include <rtl/ustrbuf.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/nmspmap.hxx>
@@ -186,7 +185,7 @@ SvXMLImportContextRef SvxXMLTabStopImportContext::CreateChildContext(
// add new tabstop to array of tabstops
if( !mpTabStops )
mpTabStops = o3tl::make_unique<SvxXMLTabStopArray_Impl>();
mpTabStops = std::make_unique<SvxXMLTabStopArray_Impl>();
mpTabStops->push_back( xTabStopContext );
+1 -2
View File
@@ -22,7 +22,6 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/style/VerticalAlignment.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <o3tl/make_unique.hxx>
#include <sax/tools/converter.hxx>
#include <xmloff/xmltkmap.hxx>
#include <xmloff/xmluconv.hxx>
@@ -301,7 +300,7 @@ SvXMLImportContextRef XMLTextColumnsContext::CreateChildContext(
// add new tabstop to array of tabstops
if( !pColumns )
pColumns = o3tl::make_unique<XMLTextColumnsArray_Impl>();
pColumns = std::make_unique<XMLTextColumnsArray_Impl>();
pColumns->push_back( xColumn );
+1 -2
View File
@@ -17,7 +17,6 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <o3tl/make_unique.hxx>
#include <osl/diagnose.h>
#include <sal/log.hxx>
#include <comphelper/base64.hxx>
@@ -1690,7 +1689,7 @@ void XMLTextFrameContext::SetHyperlink( const OUString& rHRef,
bool bMap )
{
OSL_ENSURE( !m_pHyperlink, "recursive SetHyperlink call" );
m_pHyperlink = o3tl::make_unique<XMLTextFrameContextHyperlink_Impl>(
m_pHyperlink = std::make_unique<XMLTextFrameContextHyperlink_Impl>(
rHRef, rName, rTargetFrameName, bMap );
}
+4 -6
View File
@@ -21,8 +21,6 @@
#include <txtlists.hxx>
#include <comphelper/random.hxx>
#include <o3tl/make_unique.hxx>
#include <tools/datetime.hxx>
#include <sal/log.hxx>
@@ -116,7 +114,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId,
if ( !mpProcessedLists )
{
mpProcessedLists = o3tl::make_unique<tMapForLists>();
mpProcessedLists = std::make_unique<tMapForLists>();
}
::std::pair< OUString, OUString >
@@ -131,7 +129,7 @@ void XMLTextListsHelper::KeepListAsProcessed( const OUString& sListId,
{
if ( !mpMapListIdToListStyleDefaultListId )
{
mpMapListIdToListStyleDefaultListId = o3tl::make_unique<tMapForLists>();
mpMapListIdToListStyleDefaultListId = std::make_unique<tMapForLists>();
}
if ( mpMapListIdToListStyleDefaultListId->find( sListStyleName ) ==
@@ -257,7 +255,7 @@ void XMLTextListsHelper::StoreLastContinuingList( const OUString& sListId,
{
if ( !mpContinuingLists )
{
mpContinuingLists = o3tl::make_unique<tMapForContinuingLists>();
mpContinuingLists = std::make_unique<tMapForContinuingLists>();
}
(*mpContinuingLists)[ sListId ] = sContinuingListId;
@@ -284,7 +282,7 @@ void XMLTextListsHelper::PushListOnStack( const OUString& sListId,
{
if ( !mpListStack )
{
mpListStack = o3tl::make_unique<tStackForLists>();
mpListStack = std::make_unique<tStackForLists>();
}
::std::pair< OUString, OUString >
aListData( sListId, sListStyleName );
+1 -2
View File
@@ -20,7 +20,6 @@
#include <sal/config.h>
#include <o3tl/any.hxx>
#include <o3tl/make_unique.hxx>
#include <xmloff/unointerfacetouniqueidentifiermapper.hxx>
#include <tools/debug.hxx>
#include <rtl/ustrbuf.hxx>
@@ -1311,7 +1310,7 @@ XMLTextParagraphExport::XMLTextParagraphExport(
sal_Int32 nIndex = xTextPropMapper->getPropertySetMapper()->FindEntryIndex(
"", XML_NAMESPACE_STYLE,
GetXMLToken(XML_TEXT_COMBINE));
pFieldExport.reset( new XMLTextFieldExport( rExp, o3tl::make_unique<XMLPropertyState>( nIndex, uno::makeAny(true) ) ) );
pFieldExport.reset( new XMLTextFieldExport( rExp, std::make_unique<XMLPropertyState>( nIndex, uno::makeAny(true) ) ) );
PushNewTextListsHelper();
}
+5 -7
View File
@@ -26,8 +26,6 @@
#include <rtl/ustrbuf.hxx>
#include <sal/log.hxx>
#include <o3tl/make_unique.hxx>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/text/XTextFrame.hpp>
#include <com/sun/star/text/XTextCursor.hpp>
@@ -1064,7 +1062,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
{
ProcessAttributes(xAttrList, xMark);
m_rHints.push_back(
o3tl::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos));
std::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos));
}
// else: can't create mark -> ignore
break;
@@ -1084,7 +1082,7 @@ void XMLIndexMarkImportContext_Impl::StartElement(
{
// process only if we find an ID
m_rHints.push_back(
o3tl::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos, sID));
std::make_unique<XMLIndexMarkHint_Impl>(xMark, xPos, sID));
}
// else: no ID -> we'll never find the end -> ignore
}
@@ -1636,7 +1634,7 @@ SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext(
if( TextContentAnchorType_AT_CHARACTER ==
pTextFrameContext->GetAnchorType() )
{
rHints.push_back(o3tl::make_unique<XMLTextFrameHint_Impl>(
rHints.push_back(std::make_unique<XMLTextFrameHint_Impl>(
pTextFrameContext, xAnchorPos));
}
pContext = pTextFrameContext;
@@ -1651,7 +1649,7 @@ SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext(
rLocalName, xAttrList,
TextContentAnchorType_AS_CHARACTER );
rHints.push_back(
o3tl::make_unique<XMLTextFrameHint_Impl>(pContext, xAnchorPos));
std::make_unique<XMLTextFrameHint_Impl>(pContext, xAnchorPos));
}
break;
@@ -1726,7 +1724,7 @@ SvXMLImportContextRef XMLImpSpanContext_Impl::CreateChildContext(
Reference < XTextRange > xAnchorPos =
rImport.GetTextImport()->GetCursor()->getStart();
rHints.push_back(
o3tl::make_unique<XMLDrawHint_Impl>(pShapeContext, xAnchorPos));
std::make_unique<XMLDrawHint_Impl>(pShapeContext, xAnchorPos));
}
if( !pContext )
{