[Libreoffice-commits] core.git: sw/source
Stephan Bergmann
sbergman at redhat.com
Wed May 31 07:53:30 UTC 2017
sw/source/uibase/fldui/fldwrap.cxx | 22 ++++++++++------------
1 file changed, 10 insertions(+), 12 deletions(-)
New commits:
commit 82fa13614caf183c4c318b03e8ba4dae498c6f0c
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed May 31 09:52:34 2017 +0200
No need for additional pDlg variable
Change-Id: I161b49ee5c72c13372ca95ce9f9cc87d886354ae
diff --git a/sw/source/uibase/fldui/fldwrap.cxx b/sw/source/uibase/fldui/fldwrap.cxx
index ddeb77e33ad0..9bfd047be8a6 100644
--- a/sw/source/uibase/fldui/fldwrap.cxx
+++ b/sw/source/uibase/fldui/fldwrap.cxx
@@ -81,11 +81,10 @@ SwFieldDlgWrapper::SwFieldDlgWrapper( vcl::Window* _pParent, sal_uInt16 nId,
{
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
assert(pFact && "SwAbstractDialogFactory fail!");
- VclPtr<AbstractSwFieldDlg> pDlg = pFact->CreateSwFieldDlg(pB, this, _pParent);
- assert(pDlg && "Dialog creation failed!");
- pDlgInterface = pDlg;
- SetWindow( pDlg->GetWindow() );
- pDlg->Start();
+ pDlgInterface = pFact->CreateSwFieldDlg(pB, this, _pParent);
+ assert(pDlgInterface && "Dialog creation failed!");
+ SetWindow( pDlgInterface->GetWindow() );
+ pDlgInterface->Start();
}
// newly initialise dialog after Doc switch
@@ -124,14 +123,13 @@ SwFieldDataOnlyDlgWrapper::SwFieldDataOnlyDlgWrapper( vcl::Window* _pParent, sal
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- VclPtr<AbstractSwFieldDlg> pDlg = pFact->CreateSwFieldDlg(pB, this, _pParent);
- OSL_ENSURE(pDlg, "Dialog creation failed!");
- pDlgInterface = pDlg;
+ pDlgInterface = pFact->CreateSwFieldDlg(pB, this, _pParent);
+ OSL_ENSURE(pDlgInterface, "Dialog creation failed!");
- SetWindow( pDlg->GetWindow() );
- pDlg->ActivateDatabasePage();
- pDlg->Start();
- pDlg->Initialize( pInfo );
+ SetWindow( pDlgInterface->GetWindow() );
+ pDlgInterface->ActivateDatabasePage();
+ pDlgInterface->Start();
+ pDlgInterface->Initialize( pInfo );
}
// re-init after doc activation
More information about the Libreoffice-commits
mailing list