Kaydet (Commit) b2465ef0 authored tarafından Arnold Dumas's avatar Arnold Dumas Kaydeden (comit) Noel Grandin

tdf#89329: use unique_ptr for pImpl in dlgsave

Change-Id: I3743637b2ad5747073e61a46cdb28604dd9fb95f
Reviewed-on: https://gerrit.libreoffice.org/28114Reviewed-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
Tested-by: 's avatarNoel Grandin <noelgrandin@gmail.com>
üst d6439570
......@@ -179,7 +179,7 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent,
: ModalDialog(pParent, "SaveDialog", "dbaccess/ui/savedialog.ui")
, m_xContext( _rxContext )
{
m_pImpl = new OSaveAsDlgImpl(this,_rType,_xConnection,rDefault,_rObjectNameCheck,_nFlags);
m_pImpl.reset( new OSaveAsDlgImpl(this,_rType,_xConnection,rDefault,_rObjectNameCheck,_nFlags) );
switch (_rType) {
case CommandType::QUERY:
......@@ -261,7 +261,7 @@ OSaveAsDlg::OSaveAsDlg( vcl::Window * pParent,
: ModalDialog(pParent, "SaveDialog", "dbaccess/ui/savedialog.ui")
, m_xContext( _rxContext )
{
m_pImpl = new OSaveAsDlgImpl(this,rDefault,_rObjectNameCheck,_nFlags);
m_pImpl.reset( new OSaveAsDlgImpl(this,rDefault,_rObjectNameCheck,_nFlags) );
implInitOnlyTitle(_sLabel);
implInit();
}
......@@ -273,7 +273,7 @@ OSaveAsDlg::~OSaveAsDlg()
void OSaveAsDlg::dispose()
{
DELETEZ(m_pImpl);
m_pImpl.reset();
ModalDialog::dispose();
}
......
......@@ -25,6 +25,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/uno/XComponentContext.hpp>
#include <vcl/msgbox.hxx>
#include <memory>
namespace com { namespace sun { namespace star {
namespace sdbc {
......@@ -49,7 +50,7 @@ namespace dbaui
class OSaveAsDlg : public ModalDialog
{
private:
OSaveAsDlgImpl* m_pImpl;
std::unique_ptr<OSaveAsDlgImpl> m_pImpl;
css::uno::Reference< css::uno::XComponentContext > m_xContext;
public:
OSaveAsDlg( vcl::Window * pParent, sal_Int32 _rType,
......
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