Kaydet (Commit) f2f9d431 authored tarafından Noel Grandin's avatar Noel Grandin

loplugin:useuniqueptr in XMLFilterTabDialog

Change-Id: Ic4bc1441802df3b62c1e8da69379f2677f243508
Reviewed-on: https://gerrit.libreoffice.org/55521Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 8a6722f6
......@@ -46,7 +46,7 @@ XMLFilterTabDialog::XMLFilterTabDialog(weld::Window *pParent,
, mpXSLTPage(new XMLFilterTabPageXSLT(m_xTabCtrl->get_page("transformation"), m_xDialog.get()))
{
mpOldInfo = pInfo;
mpNewInfo = new filter_info_impl( *mpOldInfo );
mpNewInfo.reset( new filter_info_impl( *mpOldInfo ) );
OUString aTitle(m_xDialog->get_title());
aTitle = aTitle.replaceAll("%s", mpNewInfo->maFilterName);
......@@ -54,19 +54,18 @@ XMLFilterTabDialog::XMLFilterTabDialog(weld::Window *pParent,
m_xOKBtn->connect_clicked( LINK( this, XMLFilterTabDialog, OkHdl ) );
mpBasicPage->SetInfo( mpNewInfo );
mpXSLTPage->SetInfo( mpNewInfo );
mpBasicPage->SetInfo( mpNewInfo.get() );
mpXSLTPage->SetInfo( mpNewInfo.get() );
}
XMLFilterTabDialog::~XMLFilterTabDialog()
{
delete mpNewInfo;
}
bool XMLFilterTabDialog::onOk()
{
mpXSLTPage->FillInfo( mpNewInfo );
mpBasicPage->FillInfo( mpNewInfo );
mpXSLTPage->FillInfo( mpNewInfo.get() );
mpBasicPage->FillInfo( mpNewInfo.get() );
OString sErrorPage;
const char* pErrorId = nullptr;
......
......@@ -34,7 +34,7 @@ public:
bool onOk();
filter_info_impl* getNewFilterInfo() const { return mpNewInfo;}
filter_info_impl* getNewFilterInfo() const { return mpNewInfo.get(); }
private:
css::uno::Reference< css::uno::XComponentContext > mxContext;
......@@ -42,7 +42,7 @@ private:
DECL_LINK(OkHdl, weld::Button&, void);
const filter_info_impl* mpOldInfo;
filter_info_impl* mpNewInfo;
std::unique_ptr<filter_info_impl> mpNewInfo;
std::unique_ptr<weld::Notebook> m_xTabCtrl;
std::unique_ptr<weld::Button> m_xOKBtn;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment