summaryrefslogtreecommitdiff
path: root/include/vcl/pdfwriter.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-21 09:33:19 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-21 10:24:58 +0200
commit491fbb1de3697b566f1af8925896053b2a39f33c (patch)
tree42a93b1ed9c1e748c223e225233f9c3afb3d8cbf /include/vcl/pdfwriter.hxx
parentca5b322fd47f527c559f8806162b84eec7158615 (diff)
return shared_ptr from AnyWidget::Clone
which is what the only call-site wants Change-Id: I74aa7b9ce059890eb1bdd84d7a0a331ecf227be3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92606 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'include/vcl/pdfwriter.hxx')
-rw-r--r--include/vcl/pdfwriter.hxx30
1 files changed, 15 insertions, 15 deletions
diff --git a/include/vcl/pdfwriter.hxx b/include/vcl/pdfwriter.hxx
index b3b0f2c6e691..b4d1ac58b1af 100644
--- a/include/vcl/pdfwriter.hxx
+++ b/include/vcl/pdfwriter.hxx
@@ -262,7 +262,7 @@ public:
WidgetType getType() const { return Type; }
- virtual std::unique_ptr<AnyWidget> Clone() const = 0;
+ virtual std::shared_ptr<AnyWidget> Clone() const = 0;
protected:
// note that this equals the default compiler-generated copy-ctor, but we want to have it
@@ -321,9 +321,9 @@ public:
Dest( -1 ), Submit( false ), SubmitGet( false )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new PushButtonWidget( *this ));
+ return std::make_shared<PushButtonWidget>( *this );
}
};
@@ -336,9 +336,9 @@ public:
Checked( false )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new CheckBoxWidget( *this ));
+ return std::make_shared<CheckBoxWidget>( *this );
}
};
@@ -354,9 +354,9 @@ public:
RadioGroup( 0 )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new RadioButtonWidget( *this ));
+ return std::make_shared<RadioButtonWidget>( *this );
}
// radio buttons having the same RadioGroup id comprise one
// logical radio button group, that is at most one of the RadioButtons
@@ -383,9 +383,9 @@ public:
MaxLen( 0 )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new EditWidget( *this ));
+ return std::make_shared<EditWidget>( *this );
}
};
@@ -405,9 +405,9 @@ public:
MultiSelect( false )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new ListBoxWidget( *this ));
+ return std::make_shared<ListBoxWidget>( *this );
}
};
@@ -421,9 +421,9 @@ public:
: AnyWidget( vcl::PDFWriter::ComboBox )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new ComboBoxWidget( *this ));
+ return std::make_shared<ComboBoxWidget>( *this );
}
};
@@ -433,9 +433,9 @@ public:
: AnyWidget( vcl::PDFWriter::Signature )
{}
- virtual std::unique_ptr<AnyWidget> Clone() const override
+ virtual std::shared_ptr<AnyWidget> Clone() const override
{
- return std::unique_ptr<AnyWidget>(new SignatureWidget( *this ));
+ return std::make_shared<SignatureWidget>( *this );
}
};