summaryrefslogtreecommitdiff
path: root/sdext
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-21 10:24:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-21 11:48:33 +0200
commit419afcf902056ab0863093e5a00d91eef43a4c6b (patch)
treea674fd8c8034878b6f0ee0bfc1f194b53725f88d /sdext
parenteab3a2ffe1618e2beec820300abef1843c079bae (diff)
return shared_ptr from createDocumentElement
which is what the only callsite wants Change-Id: Ica83e7de89ec56c9b4f742f3da19d295a3250a9d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92610 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sdext')
-rw-r--r--sdext/source/pdfimport/inc/genericelements.hxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/sdext/source/pdfimport/inc/genericelements.hxx b/sdext/source/pdfimport/inc/genericelements.hxx
index d29540036f07..ff0ba6f52d84 100644
--- a/sdext/source/pdfimport/inc/genericelements.hxx
+++ b/sdext/source/pdfimport/inc/genericelements.hxx
@@ -270,9 +270,8 @@ namespace pdfi
struct DocumentElement : public Element
{
friend class ElementFactory;
- protected:
- DocumentElement() : Element( nullptr ) {}
public:
+ DocumentElement() : Element( nullptr ) {}
virtual ~DocumentElement() override;
virtual void visitedBy( ElementTreeVisitor&, const std::list< std::unique_ptr<Element> >::const_iterator& ) override;
@@ -307,8 +306,8 @@ namespace pdfi
static PageElement* createPageElement( Element* pParent,
sal_Int32 nPageNr )
{ return new PageElement( pParent, nPageNr ); }
- static DocumentElement* createDocumentElement()
- { return new DocumentElement(); }
+ static std::shared_ptr<DocumentElement> createDocumentElement()
+ { return std::make_shared<DocumentElement>(); }
};
}