loplugin:useuniqueptr in SwTextAPIObject
Change-Id: Ied235aefe2cc2ce5e88487503c17e1a54d25ac52 Reviewed-on: https://gerrit.libreoffice.org/56624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
parent
b75d084f67
commit
35c165e46a
@ -62,6 +62,12 @@ public:
|
|||||||
// sometimes it owns, sometimes it doesn't
|
// sometimes it owns, sometimes it doesn't
|
||||||
if (fn == SRCDIR "/editeng/source/misc/svxacorr.cxx")
|
if (fn == SRCDIR "/editeng/source/misc/svxacorr.cxx")
|
||||||
return;
|
return;
|
||||||
|
// SwDoc::m_PageDescs has weird handling
|
||||||
|
if (fn == SRCDIR "/sw/source/core/doc/docnew.cxx")
|
||||||
|
return;
|
||||||
|
// SwRedlineData::pNext and pExtraData have complex handling
|
||||||
|
if (fn == SRCDIR "/sw/source/core/doc/docredln.cxx")
|
||||||
|
return;
|
||||||
|
|
||||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
||||||
}
|
}
|
||||||
|
@ -1826,7 +1826,7 @@ void SwPostItField::SetTextObject( OutlinerParaObject* pText )
|
|||||||
|
|
||||||
sal_Int32 SwPostItField::GetNumberOfParagraphs() const
|
sal_Int32 SwPostItField::GetNumberOfParagraphs() const
|
||||||
{
|
{
|
||||||
return (mpText) ? mpText->Count() : 1;
|
return mpText ? mpText->Count() : 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
|
bool SwPostItField::QueryValue( uno::Any& rAny, sal_uInt16 nWhichId ) const
|
||||||
|
@ -61,7 +61,7 @@ SwTextAPIObject::SwTextAPIObject( SwTextAPIEditSource* p )
|
|||||||
SwTextAPIObject::~SwTextAPIObject() throw()
|
SwTextAPIObject::~SwTextAPIObject() throw()
|
||||||
{
|
{
|
||||||
pSource->Dispose();
|
pSource->Dispose();
|
||||||
delete pSource;
|
pSource.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
struct SwTextAPIEditSource_Impl
|
struct SwTextAPIEditSource_Impl
|
||||||
|
@ -53,7 +53,7 @@ public:
|
|||||||
|
|
||||||
class SwTextAPIObject : public SvxUnoText
|
class SwTextAPIObject : public SvxUnoText
|
||||||
{
|
{
|
||||||
SwTextAPIEditSource* pSource;
|
std::unique_ptr<SwTextAPIEditSource> pSource;
|
||||||
public:
|
public:
|
||||||
SwTextAPIObject( SwTextAPIEditSource* p);
|
SwTextAPIObject( SwTextAPIEditSource* p);
|
||||||
virtual ~SwTextAPIObject() throw() override;
|
virtual ~SwTextAPIObject() throw() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user