From 1b0b0f3c64bf8e551a70c2067f4fe87fd29e81d4 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Thu, 10 May 2018 11:54:31 +0200 Subject: [PATCH] loplugin:datamembershadow in SdGenericDrawPage Change-Id: I0c7a08206b6480ba954464be1782d4577483b15e Reviewed-on: https://gerrit.libreoffice.org/54106 Tested-by: Jenkins Reviewed-by: Noel Grandin --- sd/source/ui/inc/unopage.hxx | 2 +- sd/source/ui/unoidl/unopage.cxx | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/sd/source/ui/inc/unopage.hxx b/sd/source/ui/inc/unopage.hxx index eb49638d7ec1..6b1f2a211f13 100644 --- a/sd/source/ui/inc/unopage.hxx +++ b/sd/source/ui/inc/unopage.hxx @@ -59,7 +59,7 @@ class SdGenericDrawPage : public SvxFmDrawPage, public css::document::XLinkTargetSupplier { private: - SdXImpressDocument* mpModel; + SdXImpressDocument* mpDocModel; SdrModel* mpSdrModel; bool mbIsImpressDocument; sal_Int16 mnTempPageNumber; // for printing handouts diff --git a/sd/source/ui/unoidl/unopage.cxx b/sd/source/ui/unoidl/unopage.cxx index 4def39c4a18e..657a23ddc7ce 100644 --- a/sd/source/ui/unoidl/unopage.cxx +++ b/sd/source/ui/unoidl/unopage.cxx @@ -341,15 +341,15 @@ sal_Int64 SAL_CALL SdGenericDrawPage::getSomething( const css::uno::Sequence< sa SdGenericDrawPage::SdGenericDrawPage(SdXImpressDocument* _pModel, SdPage* pInPage, const SvxItemPropertySet* _pSet) : SvxFmDrawPage( static_cast(pInPage) ), SdUnoSearchReplaceShape(this), - mpModel ( _pModel ), + mpDocModel( _pModel ), mpSdrModel(nullptr), mbIsImpressDocument(false), mnTempPageNumber(0), mpPropSet ( _pSet ) { mpSdrModel = SvxFmDrawPage::mpModel; - if( mpModel ) - mbIsImpressDocument = mpModel->IsImpressDocument(); + if( mpDocModel ) + mbIsImpressDocument = mpDocModel->IsImpressDocument(); } @@ -359,7 +359,7 @@ SdGenericDrawPage::~SdGenericDrawPage() throw() void SdGenericDrawPage::throwIfDisposed() const { - if( (SvxFmDrawPage::mpModel == nullptr) || (mpModel == nullptr) || (SvxFmDrawPage::mpPage == nullptr) ) + if( (SvxFmDrawPage::mpModel == nullptr) || (mpDocModel == nullptr) || (SvxFmDrawPage::mpPage == nullptr) ) throw lang::DisposedException(); } @@ -367,7 +367,7 @@ SdXImpressDocument* SdGenericDrawPage::GetModel() const { if( mpSdrModel != SvxFmDrawPage::mpModel ) const_cast(this)->UpdateModel(); - return mpModel; + return mpDocModel; } bool SdGenericDrawPage::IsImpressDocument() const @@ -384,13 +384,13 @@ void SdGenericDrawPage::UpdateModel() if( mpSdrModel ) { uno::Reference< uno::XInterface > xModel( SvxFmDrawPage::mpModel->getUnoModel() ); - mpModel = SdXImpressDocument::getImplementation( xModel ); + mpDocModel = SdXImpressDocument::getImplementation( xModel ); } else { - mpModel = nullptr; + mpDocModel = nullptr; } - mbIsImpressDocument = mpModel && mpModel->IsImpressDocument(); + mbIsImpressDocument = mpDocModel && mpDocModel->IsImpressDocument(); } // this is called whenever a SdrObject must be created for a empty api shape wrapper @@ -1862,7 +1862,7 @@ void SdGenericDrawPage::release() throw() // XComponent void SdGenericDrawPage::disposing() throw() { - mpModel = nullptr; + mpDocModel = nullptr; SvxFmDrawPage::disposing(); }