[Libreoffice-commits] core.git: compilerplugins/clang include/svx sd/inc sd/source

Noel Grandin noel.grandin at collabora.co.uk
Fri May 11 07:48:02 UTC 2018


 compilerplugins/clang/datamembershadow.cxx |    2 --
 include/svx/svdoutl.hxx                    |    2 +-
 sd/inc/Outliner.hxx                        |    2 +-
 sd/source/ui/view/Outliner.cxx             |   22 +++++++++++-----------
 4 files changed, 13 insertions(+), 15 deletions(-)

New commits:
commit 1ae25f489575c349d9860caa1336cdbd74a5a01a
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu May 10 13:39:30 2018 +0200

    loplugin:datamembershadow in SdrOutliner
    
    and make the superclass field private too
    
    Change-Id: Ibfe030859d2d81b1cb5b7f47c1292210b16ae42c
    Reviewed-on: https://gerrit.libreoffice.org/54108
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/datamembershadow.cxx b/compilerplugins/clang/datamembershadow.cxx
index 7cf7940dfb1d..5784b2c6c8b6 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -57,8 +57,6 @@ bool DataMemberShadow::VisitFieldDecl(FieldDecl const * fieldDecl)
         return true;
     if (loplugin::isSamePathname(aFileName, SRCDIR "/sc/source/ui/vba/vbastyles.hxx"))
         return true;
-    if (loplugin::isSamePathname(aFileName, SRCDIR "/sd/inc/Outliner.hxx"))
-        return true;
     if (loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stortree.hxx")
         || loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stordata.hxx"))
         return true;
diff --git a/include/svx/svdoutl.hxx b/include/svx/svdoutl.hxx
index 61f889ebd57a..ad4b02c60ab1 100644
--- a/include/svx/svdoutl.hxx
+++ b/include/svx/svdoutl.hxx
@@ -29,8 +29,8 @@ class SdrPage;
 
 class SVX_DLLPUBLIC SdrOutliner : public Outliner
 {
-protected:
     tools::WeakReference<SdrTextObj> mpTextObj;
+protected:
     const SdrPage* mpVisualizedPage;
 
 public:
diff --git a/sd/inc/Outliner.hxx b/sd/inc/Outliner.hxx
index c58e749305bf..672fd1ac4dbb 100644
--- a/sd/inc/Outliner.hxx
+++ b/sd/inc/Outliner.hxx
@@ -282,7 +282,7 @@ private:
     SdrObject* mpFirstObj;
 
     /// Candidate for being searched/spell checked.
-    SdrTextObj* mpTextObj;
+    SdrTextObj* mpSearchSpellTextObj;
 
     /// Current text to be searched/spelled inside the current text object
     sal_Int32 mnText;
diff --git a/sd/source/ui/view/Outliner.cxx b/sd/source/ui/view/Outliner.cxx
index 7c8f6a0ce7e4..1628d1c25693 100644
--- a/sd/source/ui/view/Outliner.cxx
+++ b/sd/source/ui/view/Outliner.cxx
@@ -156,7 +156,7 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode )
       maMarkListCopy(),
       mpObj(nullptr),
       mpFirstObj(nullptr),
-      mpTextObj(nullptr),
+      mpSearchSpellTextObj(nullptr),
       mnText(0),
       mpParaObj(nullptr),
       meStartViewMode(PageKind::Standard),
@@ -1069,7 +1069,7 @@ void SdOutliner::ProvideNextTextObject()
         SetPaperSize( Size(1, 1) );
     SetText(OUString(), GetParagraph(0));
 
-    mpTextObj = nullptr;
+    mpSearchSpellTextObj = nullptr;
 
     // Iterate until a valid text object has been found or the search ends.
     do
@@ -1260,10 +1260,10 @@ bool SdOutliner::IsValidTextObject (const sd::outliner::IteratorPosition& rPosit
 
 void SdOutliner::PutTextIntoOutliner()
 {
-    mpTextObj = dynamic_cast<SdrTextObj*>( mpObj );
-    if ( mpTextObj && mpTextObj->HasText() && !mpTextObj->IsEmptyPresObj() )
+    mpSearchSpellTextObj = dynamic_cast<SdrTextObj*>( mpObj );
+    if ( mpSearchSpellTextObj && mpSearchSpellTextObj->HasText() && !mpSearchSpellTextObj->IsEmptyPresObj() )
     {
-        SdrText* pText = mpTextObj->getText( maCurrentPosition.mnText );
+        SdrText* pText = mpSearchSpellTextObj->getText( maCurrentPosition.mnText );
         mpParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
 
         if (mpParaObj != nullptr)
@@ -1275,7 +1275,7 @@ void SdOutliner::PutTextIntoOutliner()
     }
     else
     {
-        mpTextObj = nullptr;
+        mpSearchSpellTextObj = nullptr;
     }
 }
 
@@ -1408,10 +1408,10 @@ void SdOutliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex)
 void SdOutliner::EnterEditMode (bool bGrabFocus)
 {
     OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
-    if (pOutlinerView && mpTextObj)
+    if (pOutlinerView && mpSearchSpellTextObj)
     {
         pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1)));
-        SetPaperSize( mpTextObj->GetLogicRect().GetSize() );
+        SetPaperSize( mpSearchSpellTextObj->GetLogicRect().GetSize() );
         SdrPageView* pPV = mpView->GetSdrPageView();
 
         // Make FuText the current function.
@@ -1425,12 +1425,12 @@ void SdOutliner::EnterEditMode (bool bGrabFocus)
         // Starting the text edit mode is not enough so we do it here by
         // hand.
         mpView->UnmarkAllObj (pPV);
-        mpView->MarkObj (mpTextObj, pPV);
+        mpView->MarkObj (mpSearchSpellTextObj, pPV);
 
-        mpTextObj->setActiveText( mnText );
+        mpSearchSpellTextObj->setActiveText( mnText );
 
         // Turn on the edit mode for the text object.
-        mpView->SdrBeginTextEdit(mpTextObj, pPV, mpWindow, true, this, pOutlinerView, true, true, bGrabFocus);
+        mpView->SdrBeginTextEdit(mpSearchSpellTextObj, pPV, mpWindow, true, this, pOutlinerView, true, true, bGrabFocus);
 
         SetUpdateMode(true);
         mbFoundObject = true;


More information about the Libreoffice-commits mailing list