tdf#89329: use unique_ptr for pImpl in defaultoptions
Change-Id: I355888c44d1413f8d0ebd7a247649b79647c38ec Reviewed-on: https://gerrit.libreoffice.org/25629 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
This commit is contained in:
committed by
Noel Grandin
parent
ea01963baf
commit
7bc1c79c26
@@ -22,6 +22,7 @@
|
|||||||
#include <unotools/unotoolsdllapi.h>
|
#include <unotools/unotoolsdllapi.h>
|
||||||
#include <rtl/ustring.hxx>
|
#include <rtl/ustring.hxx>
|
||||||
#include <unotools/options.hxx>
|
#include <unotools/options.hxx>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
class SvtDefaultOptions_Impl;
|
class SvtDefaultOptions_Impl;
|
||||||
|
|
||||||
@@ -29,7 +30,7 @@ class SvtDefaultOptions_Impl;
|
|||||||
class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtDefaultOptions : public utl::detail::Options
|
class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtDefaultOptions : public utl::detail::Options
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
SvtDefaultOptions_Impl* pImp;
|
std::unique_ptr<SvtDefaultOptions_Impl> pImpl;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
@@ -326,7 +326,7 @@ SvtDefaultOptions::SvtDefaultOptions()
|
|||||||
ItemHolder1::holdConfigItem(E_DEFAULTOPTIONS);
|
ItemHolder1::holdConfigItem(E_DEFAULTOPTIONS);
|
||||||
}
|
}
|
||||||
++nRefCount;
|
++nRefCount;
|
||||||
pImp = pOptions;
|
pImpl.reset(pOptions);
|
||||||
}
|
}
|
||||||
|
|
||||||
SvtDefaultOptions::~SvtDefaultOptions()
|
SvtDefaultOptions::~SvtDefaultOptions()
|
||||||
@@ -343,7 +343,7 @@ SvtDefaultOptions::~SvtDefaultOptions()
|
|||||||
|
|
||||||
OUString SvtDefaultOptions::GetDefaultPath( sal_uInt16 nId ) const
|
OUString SvtDefaultOptions::GetDefaultPath( sal_uInt16 nId ) const
|
||||||
{
|
{
|
||||||
return pImp->GetDefaultPath( nId );
|
return pImpl->GetDefaultPath( nId );
|
||||||
}
|
}
|
||||||
|
|
||||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||||
|
Reference in New Issue
Block a user