From 5abc669599001bf888b97c4d3c2715e1fb7523b9 Mon Sep 17 00:00:00 2001
From: Noel Grandin <noel@peralex.com>
Date: Wed, 20 Apr 2016 10:34:01 +0200
Subject: new plugin stylepolice

check for local variables which follow our member field naming
convention, which is highly confusing

Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
---
 sd/source/filter/eppt/pptx-epptooxml.cxx           |  3 +-
 sd/source/filter/grf/sdgrffilter.cxx               | 10 ++---
 sd/source/filter/ppt/pptin.cxx                     |  4 +-
 .../accessibility/AccessibleDrawDocumentView.cxx   | 12 +++---
 sd/source/ui/animations/CustomAnimationDialog.cxx  | 14 +++---
 sd/source/ui/annotations/annotationmanager.cxx     | 12 +++---
 .../ui/framework/factories/BasicViewFactory.cxx    | 10 ++---
 sd/source/ui/func/undolayer.cxx                    | 12 +++---
 sd/source/ui/slideshow/slideshowimpl.cxx           |  8 ++--
 sd/source/ui/unoidl/unomodel.cxx                   | 50 +++++++++++-----------
 sd/source/ui/view/ViewShellBase.cxx                |  4 +-
 11 files changed, 69 insertions(+), 70 deletions(-)

(limited to 'sd')

diff --git a/sd/source/filter/eppt/pptx-epptooxml.cxx b/sd/source/filter/eppt/pptx-epptooxml.cxx
index 0132e62245ea..df82afde30d3 100644
--- a/sd/source/filter/eppt/pptx-epptooxml.cxx
+++ b/sd/source/filter/eppt/pptx-epptooxml.cxx
@@ -341,8 +341,7 @@ void PowerPointExport::writeDocumentProperties()
 
     if (xDocProps.is())
     {
-        PowerPointExport& mrExport(*this);
-        mrExport.exportDocumentProperties( xDocProps );
+        exportDocumentProperties( xDocProps );
     }
 }
 
diff --git a/sd/source/filter/grf/sdgrffilter.cxx b/sd/source/filter/grf/sdgrffilter.cxx
index f2b229b6f721..08e82b553d74 100644
--- a/sd/source/filter/grf/sdgrffilter.cxx
+++ b/sd/source/filter/grf/sdgrffilter.cxx
@@ -268,7 +268,7 @@ bool SdGRFFilter::Export()
                 const sal_uInt16 nFilter = rGraphicFilter.GetExportFormatNumberForTypeName( aTypeName );
                 if ( nFilter != GRFILTER_FORMAT_NOTFOUND )
                 {
-                    uno::Reference< task::XInteractionHandler > mXInteractionHandler;
+                    uno::Reference< task::XInteractionHandler > xInteractionHandler;
 
                     beans::PropertyValues aArgs;
                     TransformItems( SID_SAVEASDOC, *pSet, aArgs );
@@ -293,8 +293,8 @@ bool SdGRFFilter::Export()
                             uno::Reference< task::XInteractionHandler > xHdl;
                             if ( aArgs[ i ].Value >>= xHdl )
                             {
-                                mXInteractionHandler = new SdGRFFilter_ImplInteractionHdl( xHdl );
-                                aArgs[ i ].Value <<= mXInteractionHandler;
+                                xInteractionHandler = new SdGRFFilter_ImplInteractionHdl( xHdl );
+                                aArgs[ i ].Value <<= xInteractionHandler;
                             }
                         }
                     }
@@ -322,9 +322,9 @@ bool SdGRFFilter::Export()
                     }
                     xExporter->setSourceDocument( xSource );
                     bRet = xExporter->filter( aArgs );
-                    if ( !bRet && mXInteractionHandler.is() )
+                    if ( !bRet && xInteractionHandler.is() )
                         SdGRFFilter::HandleGraphicFilterError(
-                            static_cast< SdGRFFilter_ImplInteractionHdl* >( mXInteractionHandler.get() )->GetErrorCode(),
+                            static_cast< SdGRFFilter_ImplInteractionHdl* >( xInteractionHandler.get() )->GetErrorCode(),
                                             rGraphicFilter.GetLastError().nStreamError );
                 }
              }
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index fc5c89b68dd5..e94ac242ae6b 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -2734,8 +2734,8 @@ ImplSdPPTImport::ReadFormControl( tools::SvRef<SotStorage>& rSrc1, css::uno::Ref
     if (  mpDoc->GetDocSh() )
     {
         xModel = mpDoc->GetDocSh()->GetModel();
-        oox::ole::MSConvertOCXControls mCtrlImporter( xModel );
-        return mCtrlImporter.ReadOCXStorage( rSrc1, rFormComp );
+        oox::ole::MSConvertOCXControls aCtrlImporter( xModel );
+        return aCtrlImporter.ReadOCXStorage( rSrc1, rFormComp );
     }
     return false;
 }
diff --git a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
index 28c606216431..0af20497d857 100644
--- a/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
+++ b/sd/source/ui/accessibility/AccessibleDrawDocumentView.cxx
@@ -192,13 +192,13 @@ sal_Int32 SAL_CALL
 {
     ThrowIfDisposed ();
 
-    long mpChildCount = AccessibleDocumentViewBase::getAccessibleChildCount();
+    long nChildCount = AccessibleDocumentViewBase::getAccessibleChildCount();
 
     // Forward request to children manager.
     if (mpChildrenManager != nullptr)
-        mpChildCount += mpChildrenManager->GetChildCount ();
+        nChildCount += mpChildrenManager->GetChildCount();
 
-    return mpChildCount;
+    return nChildCount;
 }
 
 uno::Reference<XAccessible> SAL_CALL
@@ -363,10 +363,10 @@ void SAL_CALL
                 css::uno::Reference< drawing::XDrawPage > xSlide;
                 // MT IA2: Not used...
                 // sal_Int32 currentPageIndex = xSlideshow->getCurrentPageIndex();
-                css::uno::Reference< css::presentation::XSlideShowController > mpSlideController = xSlideshow->getController();
-                if( mpSlideController.is() )
+                css::uno::Reference< css::presentation::XSlideShowController > xSlideController = xSlideshow->getController();
+                if( xSlideController.is() )
                 {
-                    xSlide = mpSlideController->getCurrentSlide();
+                    xSlide = xSlideController->getCurrentSlide();
                     if (xSlide.is())
                     {
                         mpChildrenManager->SetShapeList (uno::Reference<drawing::XShapes> (
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 7a9f50f69665..b3537296a5e2 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -2207,14 +2207,14 @@ CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySe
 {
     get(mpTabControl, "tabs");
 
-    sal_uInt16 mnEffectId = mpTabControl->GetPageId("effect");
-    sal_uInt16 mnTimingId = mpTabControl->GetPageId("timing");
-    sal_uInt16 mnTextAnimId = mpTabControl->GetPageId("textanim");
+    sal_uInt16 nEffectId = mpTabControl->GetPageId("effect");
+    sal_uInt16 nTimingId = mpTabControl->GetPageId("timing");
+    sal_uInt16 nTextAnimId = mpTabControl->GetPageId("textanim");
 
     mpEffectTabPage = VclPtr<CustomAnimationEffectTabPage>::Create( mpTabControl, mpSet );
-    mpTabControl->SetTabPage( mnEffectId, mpEffectTabPage );
+    mpTabControl->SetTabPage( nEffectId, mpEffectTabPage );
     mpDurationTabPage = VclPtr<CustomAnimationDurationTabPage>::Create( mpTabControl, mpSet );
-    mpTabControl->SetTabPage( mnTimingId, mpDurationTabPage );
+    mpTabControl->SetTabPage( nTimingId, mpDurationTabPage );
 
     bool bHasText = false;
     if( pSet->getPropertyState( nHandleHasText ) != STLPropertyState_AMBIGUOUS )
@@ -2223,12 +2223,12 @@ CustomAnimationDialog::CustomAnimationDialog(vcl::Window* pParent, STLPropertySe
     if( bHasText )
     {
         mpTextAnimTabPage = VclPtr<CustomAnimationTextAnimTabPage>::Create( mpTabControl, mpSet );
-        mpTabControl->SetTabPage( mnTextAnimId, mpTextAnimTabPage );
+        mpTabControl->SetTabPage( nTextAnimId, mpTextAnimTabPage );
     }
     else
     {
         mpTextAnimTabPage = nullptr;
-        mpTabControl->RemovePage( mnTextAnimId );
+        mpTabControl->RemovePage( nTextAnimId );
     }
 
     if (!sPage.isEmpty())
diff --git a/sd/source/ui/annotations/annotationmanager.cxx b/sd/source/ui/annotations/annotationmanager.cxx
index 20e565669b1a..154f694687de 100644
--- a/sd/source/ui/annotations/annotationmanager.cxx
+++ b/sd/source/ui/annotations/annotationmanager.cxx
@@ -103,17 +103,17 @@ namespace sd {
 
 SfxItemPool* GetAnnotationPool()
 {
-    static SfxItemPool* mpAnnotationPool = nullptr;
-    if( mpAnnotationPool == nullptr )
+    static SfxItemPool* s_pAnnotationPool = nullptr;
+    if( s_pAnnotationPool == nullptr )
     {
-        mpAnnotationPool = EditEngine::CreatePool( false );
-        mpAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
+        s_pAnnotationPool = EditEngine::CreatePool( false );
+        s_pAnnotationPool->SetPoolDefaultItem(SvxFontHeightItem(423,100,EE_CHAR_FONTHEIGHT));
 
         vcl::Font aAppFont( Application::GetSettings().GetStyleSettings().GetAppFont() );
-        mpAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
+        s_pAnnotationPool->SetPoolDefaultItem(SvxFontItem(aAppFont.GetFamilyType(),aAppFont.GetFamilyName(),"",PITCH_DONTKNOW,RTL_TEXTENCODING_DONTKNOW,EE_CHAR_FONTINFO));
     }
 
-    return mpAnnotationPool;
+    return s_pAnnotationPool;
 }
 
 static SfxBindings* getBindings( ViewShellBase& rBase )
diff --git a/sd/source/ui/framework/factories/BasicViewFactory.cxx b/sd/source/ui/framework/factories/BasicViewFactory.cxx
index 7f40961e1be6..3c8cc0291881 100644
--- a/sd/source/ui/framework/factories/BasicViewFactory.cxx
+++ b/sd/source/ui/framework/factories/BasicViewFactory.cxx
@@ -448,20 +448,20 @@ bool BasicViewFactory::IsCacheable (const std::shared_ptr<ViewDescriptor>& rpDes
     Reference<XRelocatableResource> xResource (rpDescriptor->mxView, UNO_QUERY);
     if (xResource.is())
     {
-        static ::std::vector<Reference<XResourceId> > maCacheableResources;
-        if (maCacheableResources.empty() )
+        static ::std::vector<Reference<XResourceId> > s_aCacheableResources;
+        if (s_aCacheableResources.empty() )
         {
             std::shared_ptr<FrameworkHelper> pHelper (FrameworkHelper::Instance(*mpBase));
 
             // The slide sorter and the task panel are cacheable and relocatable.
-            maCacheableResources.push_back(FrameworkHelper::CreateResourceId(
+            s_aCacheableResources.push_back(FrameworkHelper::CreateResourceId(
                 FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftDrawPaneURL));
-            maCacheableResources.push_back(FrameworkHelper::CreateResourceId(
+            s_aCacheableResources.push_back(FrameworkHelper::CreateResourceId(
                 FrameworkHelper::msSlideSorterURL, FrameworkHelper::msLeftImpressPaneURL));
         }
 
         ::std::vector<Reference<XResourceId> >::const_iterator iId;
-        for (iId=maCacheableResources.begin(); iId!=maCacheableResources.end(); ++iId)
+        for (iId=s_aCacheableResources.begin(); iId!=s_aCacheableResources.end(); ++iId)
         {
             if ((*iId)->compareTo(rpDescriptor->mxViewId) == 0)
             {
diff --git a/sd/source/ui/func/undolayer.cxx b/sd/source/ui/func/undolayer.cxx
index 0b17185bfa22..22e1adf1f4bb 100644
--- a/sd/source/ui/func/undolayer.cxx
+++ b/sd/source/ui/func/undolayer.cxx
@@ -51,10 +51,10 @@ SdLayerModifyUndoAction::SdLayerModifyUndoAction(
 
 void SdLayerModifyUndoAction::Undo()
 {
-    ::sd::DrawDocShell* mpDocSh = mpDoc->GetDocSh();
-    if( mpDocSh )
+    ::sd::DrawDocShell* pDocSh = mpDoc->GetDocSh();
+    if( pDocSh )
     {
-        ::sd::DrawViewShell* pDrViewSh = dynamic_cast< ::sd::DrawViewShell*> ( mpDocSh->GetViewShell() );
+        ::sd::DrawViewShell* pDrViewSh = dynamic_cast< ::sd::DrawViewShell*> ( pDocSh->GetViewShell() );
         if( pDrViewSh )
         {
             pDrViewSh->ModifyLayer( mpLayer, maOldLayerName, maOldLayerTitle, maOldLayerDesc, mbOldIsVisible, mbOldIsLocked, mbOldIsPrintable );
@@ -64,10 +64,10 @@ void SdLayerModifyUndoAction::Undo()
 
 void SdLayerModifyUndoAction::Redo()
 {
-    ::sd::DrawDocShell* mpDocSh = mpDoc->GetDocSh();
-    if( mpDocSh )
+    ::sd::DrawDocShell* pDocSh = mpDoc->GetDocSh();
+    if( pDocSh )
     {
-        ::sd::DrawViewShell* pDrViewSh = dynamic_cast< ::sd::DrawViewShell* >( mpDocSh->GetViewShell() );
+        ::sd::DrawViewShell* pDrViewSh = dynamic_cast< ::sd::DrawViewShell* >( pDocSh->GetViewShell() );
         if( pDrViewSh )
         {
             pDrViewSh->ModifyLayer( mpLayer, maNewLayerName, maNewLayerTitle, maNewLayerDesc, mbNewIsVisible, mbNewIsLocked, mbNewIsPrintable );
diff --git a/sd/source/ui/slideshow/slideshowimpl.cxx b/sd/source/ui/slideshow/slideshowimpl.cxx
index 6b7b463f1e52..f6c57bb4b07e 100644
--- a/sd/source/ui/slideshow/slideshowimpl.cxx
+++ b/sd/source/ui/slideshow/slideshowimpl.cxx
@@ -1774,10 +1774,10 @@ void SlideshowImpl::updateSlideShow()
                 // have a minimum frequency.
                 // => Allow up to 60 frames per second.  Call at least once
                 // every 4 seconds.
-                const static sal_Int32 mnMaximumFrameCount (60);
-                const static double mnMinimumTimeout (1.0 / mnMaximumFrameCount);
-                const static double mnMaximumTimeout (4.0);
-                fUpdate = ::basegfx::clamp(fUpdate, mnMinimumTimeout, mnMaximumTimeout);
+                const static sal_Int32 nMaximumFrameCount (60);
+                const static double nMinimumTimeout (1.0 / nMaximumFrameCount);
+                const static double nMaximumTimeout (4.0);
+                fUpdate = ::basegfx::clamp(fUpdate, nMinimumTimeout, nMaximumTimeout);
 
                 // Make sure that the maximum frame count has not been set
                 // too high (only then conversion to milliseconds and long
diff --git a/sd/source/ui/unoidl/unomodel.cxx b/sd/source/ui/unoidl/unomodel.cxx
index 569fca33d207..594c157d3d73 100644
--- a/sd/source/ui/unoidl/unomodel.cxx
+++ b/sd/source/ui/unoidl/unomodel.cxx
@@ -3072,11 +3072,11 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
 
     uno::Reference< drawing::XDrawPage > xDrawPage;
 
-    SdDrawDocument* mpDoc = mpModel->mpDoc;
-    if( mpDoc )
+    SdDrawDocument* pDoc = mpModel->mpDoc;
+    if( pDoc )
     {
         // calculate internal index and check for range errors
-        const sal_Int32 nMPageCount = mpDoc->GetMasterPageCount();
+        const sal_Int32 nMPageCount = pDoc->GetMasterPageCount();
         nInsertPos = nInsertPos * 2 + 1;
         if( nInsertPos < 0 || nInsertPos > nMPageCount )
             nInsertPos = nMPageCount;
@@ -3092,7 +3092,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
             bUnique = true;
             for( sal_Int32 nMaster = 1; nMaster < nMPageCount; nMaster++ )
             {
-                SdPage* pPage = static_cast<SdPage*>(mpDoc->GetMasterPage((sal_uInt16)nMaster));
+                SdPage* pPage = static_cast<SdPage*>(pDoc->GetMasterPage((sal_uInt16)nMaster));
                 if( pPage && pPage->GetName() == aPrefix )
                 {
                     bUnique = false;
@@ -3113,7 +3113,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
         aLayoutName += SD_RESSTR(STR_LAYOUT_OUTLINE);
 
         // create styles
-        static_cast<SdStyleSheetPool*>(mpDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix );
+        static_cast<SdStyleSheetPool*>(pDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix );
 
         // get the first page for initial size and border settings
         SdPage* pPage = mpModel->mpDoc->GetSdPage( (sal_uInt16)0, PK_STANDARD );
@@ -3127,7 +3127,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
                            pPage->GetRgtBorder(),
                            pPage->GetLwrBorder() );
         pMPage->SetLayoutName( aLayoutName );
-        mpDoc->InsertMasterPage(pMPage,  (sal_uInt16)nInsertPos);
+        pDoc->InsertMasterPage(pMPage,  (sal_uInt16)nInsertPos);
 
         {
             // ensure default MasterPage fill
@@ -3145,7 +3145,7 @@ uno::Reference< drawing::XDrawPage > SAL_CALL SdMasterPagesAccess::insertNewByIn
                                 pRefNotesPage->GetRgtBorder(),
                                 pRefNotesPage->GetLwrBorder() );
         pMNotesPage->SetLayoutName( aLayoutName );
-        mpDoc->InsertMasterPage(pMNotesPage,  (sal_uInt16)nInsertPos + 1);
+        pDoc->InsertMasterPage(pMNotesPage,  (sal_uInt16)nInsertPos + 1);
         pMNotesPage->SetAutoLayout(AUTOLAYOUT_NOTES, true, true);
         mpModel->SetModified();
     }
@@ -3290,17 +3290,17 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames()
     if( nullptr == mpModel )
         throw lang::DisposedException();
 
-    SdDrawDocument* mpDoc = mpModel->GetDoc();
-    if( mpDoc == nullptr )
+    SdDrawDocument* pDoc = mpModel->GetDoc();
+    if( pDoc == nullptr )
     {
         uno::Sequence< OUString > aSeq;
         return aSeq;
     }
 
-    if( mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW )
+    if( pDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW )
     {
-        const sal_uInt16 nMaxPages = mpDoc->GetSdPageCount( PK_STANDARD );
-        const sal_uInt16 nMaxMasterPages = mpDoc->GetMasterSdPageCount( PK_STANDARD );
+        const sal_uInt16 nMaxPages = pDoc->GetSdPageCount( PK_STANDARD );
+        const sal_uInt16 nMaxMasterPages = pDoc->GetMasterSdPageCount( PK_STANDARD );
 
         uno::Sequence< OUString > aSeq( nMaxPages + nMaxMasterPages );
         OUString* pStr = aSeq.getArray();
@@ -3308,17 +3308,17 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames()
         sal_uInt16 nPage;
         // standard pages
         for( nPage = 0; nPage < nMaxPages; nPage++ )
-            *pStr++ = mpDoc->GetSdPage( nPage, PK_STANDARD )->GetName();
+            *pStr++ = pDoc->GetSdPage( nPage, PK_STANDARD )->GetName();
 
         // master pages
         for( nPage = 0; nPage < nMaxMasterPages; nPage++ )
-            *pStr++ = mpDoc->GetMasterSdPage( nPage, PK_STANDARD )->GetName();
+            *pStr++ = pDoc->GetMasterSdPage( nPage, PK_STANDARD )->GetName();
         return aSeq;
     }
     else
     {
-        const sal_uInt16 nMaxPages = mpDoc->GetPageCount();
-        const sal_uInt16 nMaxMasterPages = mpDoc->GetMasterPageCount();
+        const sal_uInt16 nMaxPages = pDoc->GetPageCount();
+        const sal_uInt16 nMaxMasterPages = pDoc->GetMasterPageCount();
 
         uno::Sequence< OUString > aSeq( nMaxPages + nMaxMasterPages );
         OUString* pStr = aSeq.getArray();
@@ -3326,11 +3326,11 @@ uno::Sequence< OUString > SAL_CALL SdDocLinkTargets::getElementNames()
         sal_uInt16 nPage;
         // standard pages
         for( nPage = 0; nPage < nMaxPages; nPage++ )
-            *pStr++ = static_cast<SdPage*>(mpDoc->GetPage( nPage ))->GetName();
+            *pStr++ = static_cast<SdPage*>(pDoc->GetPage( nPage ))->GetName();
 
         // master pages
         for( nPage = 0; nPage < nMaxMasterPages; nPage++ )
-            *pStr++ = static_cast<SdPage*>(mpDoc->GetMasterPage( nPage ))->GetName();
+            *pStr++ = static_cast<SdPage*>(pDoc->GetMasterPage( nPage ))->GetName();
         return aSeq;
     }
 }
@@ -3366,22 +3366,22 @@ sal_Bool SAL_CALL SdDocLinkTargets::hasElements()
 
 SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exception)
 {
-    SdDrawDocument* mpDoc = mpModel->GetDoc();
-    if( mpDoc == nullptr )
+    SdDrawDocument* pDoc = mpModel->GetDoc();
+    if( pDoc == nullptr )
         return nullptr;
 
-    const sal_uInt16 nMaxPages = mpDoc->GetPageCount();
-    const sal_uInt16 nMaxMasterPages = mpDoc->GetMasterPageCount();
+    const sal_uInt16 nMaxPages = pDoc->GetPageCount();
+    const sal_uInt16 nMaxMasterPages = pDoc->GetMasterPageCount();
 
     sal_uInt16 nPage;
     SdPage* pPage;
 
-    const bool bDraw = mpDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW;
+    const bool bDraw = pDoc->GetDocumentType() == DOCUMENT_TYPE_DRAW;
 
     // standard pages
     for( nPage = 0; nPage < nMaxPages; nPage++ )
     {
-        pPage = static_cast<SdPage*>(mpDoc->GetPage( nPage ));
+        pPage = static_cast<SdPage*>(pDoc->GetPage( nPage ));
         if( (pPage->GetName() == rName) && (!bDraw || (pPage->GetPageKind() == PK_STANDARD)) )
             return pPage;
     }
@@ -3389,7 +3389,7 @@ SdPage* SdDocLinkTargets::FindPage( const OUString& rName ) const throw(std::exc
     // master pages
     for( nPage = 0; nPage < nMaxMasterPages; nPage++ )
     {
-        pPage = static_cast<SdPage*>(mpDoc->GetMasterPage( nPage ));
+        pPage = static_cast<SdPage*>(pDoc->GetMasterPage( nPage ));
         if( (pPage->GetName() == rName) && (!bDraw || (pPage->GetPageKind() == PK_STANDARD)) )
             return pPage;
     }
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx
index 580f85edeae1..b0db26731767 100644
--- a/sd/source/ui/view/ViewShellBase.cxx
+++ b/sd/source/ui/view/ViewShellBase.cxx
@@ -986,9 +986,9 @@ OUString ImplRetrieveLabelFromCommand( const Reference< XFrame >& xFrame, const
         {
             Reference< XNameAccess > const xNameAccess(
                     frame::theUICommandDescription::get(xContext) );
-            Reference< css::container::XNameAccess > m_xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
+            Reference< css::container::XNameAccess > xUICommandLabels( xNameAccess->getByName( aModuleIdentifier ), UNO_QUERY_THROW );
             Sequence< PropertyValue > aPropSeq;
-            if( m_xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
+            if( xUICommandLabels->getByName( aCmdURL ) >>= aPropSeq )
             {
                 for( sal_Int32 i = 0; i < aPropSeq.getLength(); i++ )
                 {
-- 
cgit