summaryrefslogtreecommitdiff
path: root/reportdesign/source
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 10:53:52 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-01-24 11:03:58 +0100
commit9aeff6adce7287f7e85bc47ac9c418b93351e3d4 (patch)
tree24c7cdbdad9ab83aff1f57a4a215d013c00eef31 /reportdesign/source
parent9fac817100fcdd0563b740ddd498b88b4f623605 (diff)
loplugin:makeshared in reportdesign
Change-Id: I3f7cb6010142c8bdce96bf541a7efb650233942e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87325 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'reportdesign/source')
-rw-r--r--reportdesign/source/core/api/ReportDefinition.cxx12
-rw-r--r--reportdesign/source/ui/dlg/Condition.cxx2
2 files changed, 7 insertions, 7 deletions
diff --git a/reportdesign/source/core/api/ReportDefinition.cxx b/reportdesign/source/core/api/ReportDefinition.cxx
index 8daff443c111..f711547b3899 100644
--- a/reportdesign/source/core/api/ReportDefinition.cxx
+++ b/reportdesign/source/core/api/ReportDefinition.cxx
@@ -541,8 +541,8 @@ OReportDefinition::OReportDefinition(uno::Reference< uno::XComponentContext > co
ReportDefinitionBase(m_aMutex),
ReportDefinitionPropertySet(_xContext,IMPLEMENTS_PROPERTY_SET,uno::Sequence< OUString >()),
::comphelper::IEmbeddedHelper(),
- m_aProps(new OReportComponentProperties(_xContext)),
- m_pImpl(new OReportDefinitionImpl(m_aMutex))
+ m_aProps(std::make_shared<OReportComponentProperties>(_xContext)),
+ m_pImpl(std::make_shared<OReportDefinitionImpl>(m_aMutex))
{
m_aProps->m_sName = RptResId(RID_STR_REPORT);
osl_atomic_increment(&m_refCount);
@@ -563,8 +563,8 @@ OReportDefinition::OReportDefinition(
ReportDefinitionBase(m_aMutex),
ReportDefinitionPropertySet(_xContext,IMPLEMENTS_PROPERTY_SET,uno::Sequence< OUString >()),
::comphelper::IEmbeddedHelper(),
- m_aProps(new OReportComponentProperties(_xContext)),
- m_pImpl(new OReportDefinitionImpl(m_aMutex))
+ m_aProps(std::make_shared<OReportComponentProperties>(_xContext)),
+ m_pImpl(std::make_shared<OReportDefinitionImpl>(m_aMutex))
{
m_aProps->m_sName = RptResId(RID_STR_REPORT);
m_aProps->m_xFactory = _xFactory;
@@ -593,7 +593,7 @@ void OReportDefinition::init()
{
try
{
- m_pImpl->m_pReportModel.reset(new OReportModel(this));
+ m_pImpl->m_pReportModel = std::make_shared<OReportModel>(this);
m_pImpl->m_pReportModel->GetItemPool().FreezeIdRanges();
m_pImpl->m_pReportModel->SetScaleUnit( MapUnit::Map100thMM );
SdrLayerAdmin& rAdmin = m_pImpl->m_pReportModel->GetLayerAdmin();
@@ -616,7 +616,7 @@ void OReportDefinition::init()
if ( sMediaType.isEmpty() )
xStorProps->setPropertyValue("MediaType",uno::makeAny<OUString>(MIMETYPE_OASIS_OPENDOCUMENT_REPORT_ASCII));
}
- m_pImpl->m_pObjectContainer.reset( new comphelper::EmbeddedObjectContainer(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) ) );
+ m_pImpl->m_pObjectContainer = std::make_shared<comphelper::EmbeddedObjectContainer>(m_pImpl->m_xStorage , static_cast<cppu::OWeakObject*>(this) );
}
catch (const uno::Exception&)
{
diff --git a/reportdesign/source/ui/dlg/Condition.cxx b/reportdesign/source/ui/dlg/Condition.cxx
index b2add1cb3709..50a28cb405f6 100644
--- a/reportdesign/source/ui/dlg/Condition.cxx
+++ b/reportdesign/source/ui/dlg/Condition.cxx
@@ -95,7 +95,7 @@ void ConditionColorWrapper::operator()(const OUString& /*rCommand*/, const Named
// = Condition
Condition::Condition(weld::Container* pParent, weld::Window* pDialog, IConditionalFormatAction& _rAction, ::rptui::OReportController& _rController)
- : m_xPaletteManager(new PaletteManager)
+ : m_xPaletteManager(std::make_shared<PaletteManager>())
, m_aBackColorWrapper(this, SID_BACKGROUND_COLOR)
, m_aForeColorWrapper(this, SID_ATTR_CHAR_COLOR2)
, m_rController(_rController)