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

loplugin:datamembershadow in SdGenericDrawPage

Change-Id: I0c7a08206b6480ba954464be1782d4577483b15e
Reviewed-on: https://gerrit.libreoffice.org/54106Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 7758d660
......@@ -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
......
......@@ -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<SdrPage*>(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<SdGenericDrawPage*>(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();
}
......
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