[Libreoffice-commits] core.git: include/sfx2 sfx2/source sw/source
Xisco Fauli
anistenis at gmail.com
Mon May 23 06:22:49 UTC 2016
include/sfx2/new.hxx | 2 +-
sfx2/source/doc/new.cxx | 6 +++---
sw/source/uibase/uiview/view.cxx | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
New commits:
commit a1cfd9ff7dc0371720c4e2670e318a8282bd9735
Author: Xisco Fauli <anistenis at gmail.com>
Date: Sun May 22 17:59:30 2016 +0200
tdf#89329: use unique_ptr for pImpl in new
Fix "error: declaration of ‘pImpl’ shadows a
member of 'this' [-Werror=shadow]" too
Change-Id: Ib0fc66375ed7d9ae700d5a81a2adb5975fcae592
Reviewed-on: https://gerrit.libreoffice.org/25319
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin at gmail.com>
diff --git a/include/sfx2/new.hxx b/include/sfx2/new.hxx
index 56a7c2f..c7f5b625 100644
--- a/include/sfx2/new.hxx
+++ b/include/sfx2/new.hxx
@@ -59,7 +59,7 @@ class SFX2_DLLPUBLIC SfxNewFileDialog : public SfxModalDialog
friend class SfxNewFileDialog_Impl;
private:
- SfxNewFileDialog_Impl* pImpl;
+ std::unique_ptr< SfxNewFileDialog_Impl > pImpl;
public:
diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx
index 06e93ce..9b90f80 100644
--- a/sfx2/source/doc/new.cxx
+++ b/sfx2/source/doc/new.cxx
@@ -423,9 +423,9 @@ SfxNewFileDialog_Impl::~SfxNewFileDialog_Impl()
SfxNewFileDialog::SfxNewFileDialog(vcl::Window *pParent, sal_uInt16 nFlags)
: SfxModalDialog(pParent, "LoadTemplateDialog",
- "sfx/ui/loadtemplatedialog.ui")
+ "sfx/ui/loadtemplatedialog.ui"),
+ pImpl( new SfxNewFileDialog_Impl(this, nFlags) )
{
- pImpl = new SfxNewFileDialog_Impl(this, nFlags);
}
SfxNewFileDialog::~SfxNewFileDialog()
@@ -435,7 +435,7 @@ SfxNewFileDialog::~SfxNewFileDialog()
void SfxNewFileDialog::dispose()
{
- delete pImpl;
+ pImpl.reset();
SfxModalDialog::dispose();
}
diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx
index f02a691..354f007 100644
--- a/sw/source/uibase/uiview/view.cxx
+++ b/sw/source/uibase/uiview/view.cxx
@@ -1763,8 +1763,8 @@ void SwView::NotifyDBChanged()
SfxObjectShellLock SwView::CreateTmpSelectionDoc()
{
- SwXTextView *const pImpl = GetViewImpl()->GetUNOObject_Impl();
- return pImpl->BuildTmpSelectionDoc();
+ SwXTextView *const pTempImpl = GetViewImpl()->GetUNOObject_Impl();
+ return pTempImpl->BuildTmpSelectionDoc();
}
void SwView::AddTransferable(SwTransferable& rTransferable)
More information about the Libreoffice-commits
mailing list