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;
|
return true;
|
||||||
if (loplugin::isSamePathname(aFileName, SRCDIR "/sc/source/ui/vba/vbastyles.hxx"))
|
if (loplugin::isSamePathname(aFileName, SRCDIR "/sc/source/ui/vba/vbastyles.hxx"))
|
||||||
return true;
|
return true;
|
||||||
if (loplugin::isSamePathname(aFileName, SRCDIR "/sd/inc/Outliner.hxx"))
|
|
||||||
return true;
|
|
||||||
if (loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stortree.hxx")
|
if (loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stortree.hxx")
|
||||||
|| loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stordata.hxx"))
|
|| loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stordata.hxx"))
|
||||||
return true;
|
return true;
|
||||||
|
@@ -29,8 +29,8 @@ class SdrPage;
|
|||||||
|
|
||||||
class SVX_DLLPUBLIC SdrOutliner : public Outliner
|
class SVX_DLLPUBLIC SdrOutliner : public Outliner
|
||||||
{
|
{
|
||||||
protected:
|
|
||||||
tools::WeakReference<SdrTextObj> mpTextObj;
|
tools::WeakReference<SdrTextObj> mpTextObj;
|
||||||
|
protected:
|
||||||
const SdrPage* mpVisualizedPage;
|
const SdrPage* mpVisualizedPage;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@@ -282,7 +282,7 @@ private:
|
|||||||
SdrObject* mpFirstObj;
|
SdrObject* mpFirstObj;
|
||||||
|
|
||||||
/// Candidate for being searched/spell checked.
|
/// Candidate for being searched/spell checked.
|
||||||
SdrTextObj* mpTextObj;
|
SdrTextObj* mpSearchSpellTextObj;
|
||||||
|
|
||||||
/// Current text to be searched/spelled inside the current text object
|
/// Current text to be searched/spelled inside the current text object
|
||||||
sal_Int32 mnText;
|
sal_Int32 mnText;
|
||||||
|
@@ -156,7 +156,7 @@ SdOutliner::SdOutliner( SdDrawDocument* pDoc, OutlinerMode nMode )
|
|||||||
maMarkListCopy(),
|
maMarkListCopy(),
|
||||||
mpObj(nullptr),
|
mpObj(nullptr),
|
||||||
mpFirstObj(nullptr),
|
mpFirstObj(nullptr),
|
||||||
mpTextObj(nullptr),
|
mpSearchSpellTextObj(nullptr),
|
||||||
mnText(0),
|
mnText(0),
|
||||||
mpParaObj(nullptr),
|
mpParaObj(nullptr),
|
||||||
meStartViewMode(PageKind::Standard),
|
meStartViewMode(PageKind::Standard),
|
||||||
@@ -1069,7 +1069,7 @@ void SdOutliner::ProvideNextTextObject()
|
|||||||
SetPaperSize( Size(1, 1) );
|
SetPaperSize( Size(1, 1) );
|
||||||
SetText(OUString(), GetParagraph(0));
|
SetText(OUString(), GetParagraph(0));
|
||||||
|
|
||||||
mpTextObj = nullptr;
|
mpSearchSpellTextObj = nullptr;
|
||||||
|
|
||||||
// Iterate until a valid text object has been found or the search ends.
|
// Iterate until a valid text object has been found or the search ends.
|
||||||
do
|
do
|
||||||
@@ -1260,10 +1260,10 @@ bool SdOutliner::IsValidTextObject (const sd::outliner::IteratorPosition& rPosit
|
|||||||
|
|
||||||
void SdOutliner::PutTextIntoOutliner()
|
void SdOutliner::PutTextIntoOutliner()
|
||||||
{
|
{
|
||||||
mpTextObj = dynamic_cast<SdrTextObj*>( mpObj );
|
mpSearchSpellTextObj = dynamic_cast<SdrTextObj*>( mpObj );
|
||||||
if ( mpTextObj && mpTextObj->HasText() && !mpTextObj->IsEmptyPresObj() )
|
if ( mpSearchSpellTextObj && mpSearchSpellTextObj->HasText() && !mpSearchSpellTextObj->IsEmptyPresObj() )
|
||||||
{
|
{
|
||||||
SdrText* pText = mpTextObj->getText( maCurrentPosition.mnText );
|
SdrText* pText = mpSearchSpellTextObj->getText( maCurrentPosition.mnText );
|
||||||
mpParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
|
mpParaObj = pText ? pText->GetOutlinerParaObject() : nullptr;
|
||||||
|
|
||||||
if (mpParaObj != nullptr)
|
if (mpParaObj != nullptr)
|
||||||
@@ -1275,7 +1275,7 @@ void SdOutliner::PutTextIntoOutliner()
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
mpTextObj = nullptr;
|
mpSearchSpellTextObj = nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1408,10 +1408,10 @@ void SdOutliner::SetPage (EditMode eEditMode, sal_uInt16 nPageIndex)
|
|||||||
void SdOutliner::EnterEditMode (bool bGrabFocus)
|
void SdOutliner::EnterEditMode (bool bGrabFocus)
|
||||||
{
|
{
|
||||||
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
|
OutlinerView* pOutlinerView = mpImpl->GetOutlinerView();
|
||||||
if (pOutlinerView && mpTextObj)
|
if (pOutlinerView && mpSearchSpellTextObj)
|
||||||
{
|
{
|
||||||
pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1)));
|
pOutlinerView->SetOutputArea( ::tools::Rectangle( Point(), Size(1, 1)));
|
||||||
SetPaperSize( mpTextObj->GetLogicRect().GetSize() );
|
SetPaperSize( mpSearchSpellTextObj->GetLogicRect().GetSize() );
|
||||||
SdrPageView* pPV = mpView->GetSdrPageView();
|
SdrPageView* pPV = mpView->GetSdrPageView();
|
||||||
|
|
||||||
// Make FuText the current function.
|
// 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
|
// Starting the text edit mode is not enough so we do it here by
|
||||||
// hand.
|
// hand.
|
||||||
mpView->UnmarkAllObj (pPV);
|
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.
|
// 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);
|
SetUpdateMode(true);
|
||||||
mbFoundObject = true;
|
mbFoundObject = true;
|
||||||
|
Reference in New Issue
Block a user