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@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
@@ -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;
|
||||
|
@@ -29,8 +29,8 @@ class SdrPage;
|
||||
|
||||
class SVX_DLLPUBLIC SdrOutliner : public Outliner
|
||||
{
|
||||
protected:
|
||||
tools::WeakReference<SdrTextObj> mpTextObj;
|
||||
protected:
|
||||
const SdrPage* mpVisualizedPage;
|
||||
|
||||
public:
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user