[Libreoffice-commits] core.git: sw/inc sw/qa sw/source

Miklos Vajna (via logerrit) logerrit at kemper.freedesktop.org
Mon Sep 28 09:57:42 UTC 2020


 sw/inc/postithelper.hxx                  |    8 -
 sw/qa/extras/uiwriter/uiwriter.cxx       |    4 
 sw/qa/extras/uiwriter/uiwriter2.cxx      |    2 
 sw/qa/extras/unowriter/unowriter.cxx     |    2 
 sw/source/core/fields/postithelper.cxx   |    8 -
 sw/source/core/fields/textapi.cxx        |    6 -
 sw/source/core/inc/textapi.hxx           |   12 +-
 sw/source/core/layout/dbg_lay.cxx        |   28 +++--
 sw/source/uibase/docvw/AnnotationWin.cxx |    2 
 sw/source/uibase/docvw/PostItMgr.cxx     |  156 +++++++++++++++----------------
 sw/source/uibase/uiview/viewmdi.cxx      |    4 
 sw/source/uibase/uno/unotxdoc.cxx        |    2 
 12 files changed, 121 insertions(+), 113 deletions(-)

New commits:
commit 97bc09c1fef52c45cf299868045d250838d8e89b
Author:     Miklos Vajna <vmiklos at collabora.com>
AuthorDate: Mon Sep 28 09:06:38 2020 +0200
Commit:     Miklos Vajna <vmiklos at collabora.com>
CommitDate: Mon Sep 28 11:57:03 2020 +0200

    sw: prefix members of SwFrameChangesLeave, SwSidebarItem, ...
    
    ... SwSizeEnterLeave and SwTextAPIObject
    
    See tdf#94879 for motivation.
    
    Change-Id: Iea12ac975b68700488f7b39bbb3596a011159c61
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103528
    Reviewed-by: Miklos Vajna <vmiklos at collabora.com>
    Tested-by: Jenkins

diff --git a/sw/inc/postithelper.hxx b/sw/inc/postithelper.hxx
index 4a9e9553420a..935549ac786d 100644
--- a/sw/inc/postithelper.hxx
+++ b/sw/inc/postithelper.hxx
@@ -94,10 +94,10 @@ namespace SwPostItHelper
 class SAL_DLLPUBLIC_RTTI SwSidebarItem
 {
 public:
-    VclPtr<sw::annotation::SwAnnotationWin> pPostIt;
-    bool bShow;
-    bool bFocus;
-    bool bPendingLayout;
+    VclPtr<sw::annotation::SwAnnotationWin> mpPostIt;
+    bool mbShow;
+    bool mbFocus;
+    bool mbPendingLayout;
 
     SwPostItHelper::SwLayoutStatus mLayoutStatus;
     SwLayoutInfo maLayoutInfo;
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 5e5470507693..fd95bddfb94d 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -4517,10 +4517,10 @@ void SwUiWriterTest::testTdf89720()
     SwPostItMgr* pPostItMgr = pView->GetPostItMgr();
     for (std::unique_ptr<SwSidebarItem> const & pItem : *pPostItMgr)
     {
-        if (pItem->pPostIt->IsFollow())
+        if (pItem->mpPostIt->IsFollow())
             // This was non-0: reply comments had a text range overlay,
             // resulting in unexpected dark color.
-            CPPUNIT_ASSERT(!pItem->pPostIt->TextRange());
+            CPPUNIT_ASSERT(!pItem->mpPostIt->TextRange());
     }
 }
 
diff --git a/sw/qa/extras/uiwriter/uiwriter2.cxx b/sw/qa/extras/uiwriter/uiwriter2.cxx
index a6efc4a5ee60..334698e7c693 100644
--- a/sw/qa/extras/uiwriter/uiwriter2.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter2.cxx
@@ -2283,7 +2283,7 @@ CPPUNIT_TEST_FIXTURE(SwUiWriterTest2, testImageComment)
     SwPostItMgr* pPostItMgr = pView->GetPostItMgr();
     for (const auto& pItem : *pPostItMgr)
     {
-        const SwRect& rAnchor = pItem->pPostIt->GetAnchorRect();
+        const SwRect& rAnchor = pItem->mpPostIt->GetAnchorRect();
         CPPUNIT_ASSERT_EQUAL(nFrameLeft, rAnchor.Left());
     }
 
diff --git a/sw/qa/extras/unowriter/unowriter.cxx b/sw/qa/extras/unowriter/unowriter.cxx
index 1322c89a3214..5d17fc33a1f5 100644
--- a/sw/qa/extras/unowriter/unowriter.cxx
+++ b/sw/qa/extras/unowriter/unowriter.cxx
@@ -746,7 +746,7 @@ CPPUNIT_TEST_FIXTURE(SwUnoWriter, testImageCommentAtChar)
     SwPostItMgr* pPostItMgr = pView->GetPostItMgr();
     for (const auto& pItem : *pPostItMgr)
     {
-        const SwRect& rAnchor = pItem->pPostIt->GetAnchorRect();
+        const SwRect& rAnchor = pItem->mpPostIt->GetAnchorRect();
         CPPUNIT_ASSERT_GREATEREQUAL(static_cast<long>(5892), rAnchor.Left());
     }
 }
diff --git a/sw/source/core/fields/postithelper.cxx b/sw/source/core/fields/postithelper.cxx
index 38917d5474fb..85898389d69e 100644
--- a/sw/source/core/fields/postithelper.cxx
+++ b/sw/source/core/fields/postithelper.cxx
@@ -114,10 +114,10 @@ SwAnchoredObject* GetAnchoredObjectOfAnnotationMark(const sw::mark::IMark& rAnno
 }
 
 SwSidebarItem::SwSidebarItem(const bool aFocus)
-    : pPostIt(nullptr)
-    , bShow(true)
-    , bFocus(aFocus)
-    , bPendingLayout(false)
+    : mpPostIt(nullptr)
+    , mbShow(true)
+    , mbFocus(aFocus)
+    , mbPendingLayout(false)
     , mLayoutStatus(SwPostItHelper::INVISIBLE)
     , maLayoutInfo()
 {
diff --git a/sw/source/core/fields/textapi.cxx b/sw/source/core/fields/textapi.cxx
index e0eb014d303a..511f5df9e87c 100644
--- a/sw/source/core/fields/textapi.cxx
+++ b/sw/source/core/fields/textapi.cxx
@@ -60,14 +60,14 @@ static const SvxItemPropertySet* ImplGetSvxTextPortionPropertySet()
 
 SwTextAPIObject::SwTextAPIObject( std::unique_ptr<SwTextAPIEditSource> p )
 : SvxUnoText( p.get(), ImplGetSvxTextPortionPropertySet(), uno::Reference < text::XText >() )
-, pSource(std::move(p))
+, m_pSource(std::move(p))
 {
 }
 
 SwTextAPIObject::~SwTextAPIObject() throw()
 {
-    pSource->Dispose();
-    pSource.reset();
+    m_pSource->Dispose();
+    m_pSource.reset();
 }
 
 struct SwTextAPIEditSource_Impl
diff --git a/sw/source/core/inc/textapi.hxx b/sw/source/core/inc/textapi.hxx
index cf24742aa0f8..94bbc0403801 100644
--- a/sw/source/core/inc/textapi.hxx
+++ b/sw/source/core/inc/textapi.hxx
@@ -49,15 +49,15 @@ public:
 
 class SwTextAPIObject : public SvxUnoText
 {
-    std::unique_ptr<SwTextAPIEditSource> pSource;
+    std::unique_ptr<SwTextAPIEditSource> m_pSource;
 public:
                         SwTextAPIObject( std::unique_ptr<SwTextAPIEditSource> p);
     virtual             ~SwTextAPIObject() throw() override;
-    void                DisposeEditSource() { pSource->Dispose(); }
-    std::unique_ptr<OutlinerParaObject> CreateText() { return pSource->CreateText(); }
-    void                SetString( const OUString& rText ) { pSource->SetString( rText ); }
-    void                SetText( OutlinerParaObject const & rText ) { pSource->SetText( rText ); }
-    OUString            GetText() const { return pSource->GetText(); }
+    void                DisposeEditSource() { m_pSource->Dispose(); }
+    std::unique_ptr<OutlinerParaObject> CreateText() { return m_pSource->CreateText(); }
+    void                SetString( const OUString& rText ) { m_pSource->SetString( rText ); }
+    void                SetText( OutlinerParaObject const & rText ) { m_pSource->SetText( rText ); }
+    OUString            GetText() const { return m_pSource->GetText(); }
 };
 
 #endif
diff --git a/sw/source/core/layout/dbg_lay.cxx b/sw/source/core/layout/dbg_lay.cxx
index 506e2960895a..7b7304a0f50c 100644
--- a/sw/source/core/layout/dbg_lay.cxx
+++ b/sw/source/core/layout/dbg_lay.cxx
@@ -182,10 +182,14 @@ namespace {
 
 class SwSizeEnterLeave : public SwImplEnterLeave
 {
-    long nFrameHeight;
+    long m_nFrameHeight;
+
 public:
-    SwSizeEnterLeave( const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar )
-        : SwImplEnterLeave( pF, nFunct, nAct, pPar ), nFrameHeight( pF->getFrameArea().Height() ) {}
+    SwSizeEnterLeave(const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar)
+        : SwImplEnterLeave(pF, nFunct, nAct, pPar)
+        , m_nFrameHeight(pF->getFrameArea().Height())
+    {
+    }
 
     virtual void Leave() override;           // resize message
 };
@@ -203,10 +207,14 @@ public:
 
 class SwFrameChangesLeave : public SwImplEnterLeave
 {
-    SwRect aFrame;
+    SwRect m_aFrame;
+
 public:
-    SwFrameChangesLeave( const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar )
-        : SwImplEnterLeave( pF, nFunct, nAct, pPar ), aFrame( pF->getFrameArea() ) {}
+    SwFrameChangesLeave(const SwFrame* pF, PROT nFunct, DbgAction nAct, void* pPar)
+        : SwImplEnterLeave(pF, nFunct, nAct, pPar)
+        , m_aFrame(pF->getFrameArea())
+    {
+    }
 
     virtual void Enter() override;           // no message
     virtual void Leave() override;           // message when resizing the Frame area
@@ -889,8 +897,8 @@ void SwImplEnterLeave::Leave()
 
 void SwSizeEnterLeave::Leave()
 {
-    nFrameHeight = pFrame->getFrameArea().Height() - nFrameHeight;
-    SwProtocol::Record( pFrame, nFunction, DbgAction::End, &nFrameHeight );
+    m_nFrameHeight = pFrame->getFrameArea().Height() - m_nFrameHeight;
+    SwProtocol::Record(pFrame, nFunction, DbgAction::End, &m_nFrameHeight);
 }
 
 void SwUpperEnterLeave::Enter()
@@ -911,8 +919,8 @@ void SwFrameChangesLeave::Enter()
 
 void SwFrameChangesLeave::Leave()
 {
-    if( pFrame->getFrameArea() != aFrame )
-        SwProtocol::Record( pFrame, PROT::FrmChanges, DbgAction::NONE, &aFrame );
+    if (pFrame->getFrameArea() != m_aFrame)
+        SwProtocol::Record(pFrame, PROT::FrmChanges, DbgAction::NONE, &m_aFrame);
 }
 
 #endif // DBG_UTIL
diff --git a/sw/source/uibase/docvw/AnnotationWin.cxx b/sw/source/uibase/docvw/AnnotationWin.cxx
index c3ee1bac8d96..45afbc5c1f0a 100644
--- a/sw/source/uibase/docvw/AnnotationWin.cxx
+++ b/sw/source/uibase/docvw/AnnotationWin.cxx
@@ -249,7 +249,7 @@ void SwAnnotationWin::SetResolved(bool resolved)
     bool oldState = IsResolved();
     static_cast<SwPostItField*>(mpFormatField->GetField())->SetResolved(resolved);
     const SwViewOption* pVOpt = mrView.GetWrtShellPtr()->GetViewOptions();
-    mrSidebarItem.bShow = !IsResolved() || (pVOpt->IsResolvedPostIts());
+    mrSidebarItem.mbShow = !IsResolved() || (pVOpt->IsResolvedPostIts());
 
     mpTextRangeOverlay.reset();
 
diff --git a/sw/source/uibase/docvw/PostItMgr.cxx b/sw/source/uibase/docvw/PostItMgr.cxx
index 7d78333a91c2..f2b7fe80669f 100644
--- a/sw/source/uibase/docvw/PostItMgr.cxx
+++ b/sw/source/uibase/docvw/PostItMgr.cxx
@@ -141,7 +141,7 @@ namespace {
         aAnnotation.put("id", nPostItId);
         if (nType != CommentNotificationType::Remove && pItem != nullptr)
         {
-            sw::annotation::SwAnnotationWin* pWin = pItem->pPostIt.get();
+            sw::annotation::SwAnnotationWin* pWin = pItem->mpPostIt.get();
 
             const SwPostItField* pField = pWin->GetPostItField();
             const SwRect& aRect = pWin->GetAnchorRect();
@@ -250,9 +250,9 @@ void SwPostItMgr::CheckForRemovedPostIts()
             EndListening(const_cast<SfxBroadcaster&>(*(*it)->GetBroadcaster()));
             std::unique_ptr<SwSidebarItem> p = std::move(*it);
             it = mvPostItFields.erase(it);
-            if (GetActiveSidebarWin() == p->pPostIt)
+            if (GetActiveSidebarWin() == p->mpPostIt)
                 SetActiveSidebarWin(nullptr);
-            p->pPostIt.disposeAndClear();
+            p->mpPostIt.disposeAndClear();
             bRemoved = true;
         }
         else
@@ -312,9 +312,9 @@ void SwPostItMgr::RemoveItem( SfxBroadcaster* pBroadcast )
         // tdf#133348 remove from list before calling SetActiveSidebarWin
         // so GetNextPostIt won't deal with mvPostItFields containing empty unique_ptr
         mvPostItFields.erase(i);
-        if (GetActiveSidebarWin() == p->pPostIt)
+        if (GetActiveSidebarWin() == p->mpPostIt)
             SetActiveSidebarWin(nullptr);
-        p->pPostIt.disposeAndClear();
+        p->mpPostIt.disposeAndClear();
     }
     mbLayout = true;
     PrepareView();
@@ -356,7 +356,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
 
                     // True until the layout of this post it finishes
                     if (pItem)
-                        pItem->bPendingLayout = true;
+                        pItem->mbPendingLayout = true;
                 }
                 else
                 {
@@ -398,9 +398,9 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
                 {
                     if ( pFormatField == postItField->GetBroadcaster() )
                     {
-                        if (postItField->pPostIt)
+                        if (postItField->mpPostIt)
                         {
-                            postItField->pPostIt->SetPostItText();
+                            postItField->mpPostIt->SetPostItText();
                             mbLayout = true;
                         }
 
@@ -425,7 +425,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
                 {
                     if ( pFormatField == postItField->GetBroadcaster() )
                     {
-                        if (postItField->pPostIt)
+                        if (postItField->mpPostIt)
                         {
                             const SvtScriptType nScriptType = SvtLanguageOptions::GetScriptTypeOfLanguage( postItField->GetFormatField().GetField()->GetLanguage() );
                             sal_uInt16 nLangWhichId = 0;
@@ -436,7 +436,7 @@ void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
                             case SvtScriptType::COMPLEX :  nLangWhichId = EE_CHAR_LANGUAGE_CTL; break;
                             default: break;
                             }
-                            postItField->pPostIt->SetLanguage(
+                            postItField->mpPostIt->SetLanguage(
                                 SvxLanguageItem(
                                 postItField->GetFormatField().GetField()->GetLanguage(),
                                 nLangWhichId) );
@@ -509,15 +509,15 @@ void SwPostItMgr::Focus(SfxBroadcaster& rBC)
         // field to get the focus is the broadcaster
         if ( &rBC == postItField->GetBroadcaster() )
         {
-            if (postItField->pPostIt)
+            if (postItField->mpPostIt)
             {
-                postItField->pPostIt->GrabFocus();
-                MakeVisible(postItField->pPostIt);
+                postItField->mpPostIt->GrabFocus();
+                MakeVisible(postItField->mpPostIt);
             }
             else
             {
                 // when the layout algorithm starts, this postit is created and receives focus
-                postItField->bFocus = true;
+                postItField->mbFocus = true;
             }
         }
     }
@@ -588,8 +588,8 @@ bool SwPostItMgr::CalcRects()
         {
             if( SwPostItHelper::INVISIBLE == pItem->mLayoutStatus )
             {
-                if (pItem->pPostIt)
-                    pItem->pPostIt->HideNote();
+                if (pItem->mpPostIt)
+                    pItem->mpPostIt->HideNote();
                 continue;
             }
 
@@ -597,8 +597,8 @@ bool SwPostItMgr::CalcRects()
             {
                 if (!mpWrtShell->GetViewOptions()->IsShowHiddenChar())
                 {
-                    if (pItem->pPostIt)
-                        pItem->pPostIt->HideNote();
+                    if (pItem->mpPostIt)
+                        pItem->mpPostIt->HideNote();
                     continue;
                 }
             }
@@ -644,7 +644,7 @@ bool SwPostItMgr::HasScrollbars() const
 {
     for (auto const& postItField : mvPostItFields)
     {
-        if (postItField->bShow && postItField->pPostIt && postItField->pPostIt->HasScrollbar())
+        if (postItField->mbShow && postItField->mpPostIt && postItField->mpPostIt->HasScrollbar())
             return true;
     }
     return false;
@@ -705,7 +705,7 @@ void SwPostItMgr::LayoutPostIts()
 
                 for (auto const& pItem : pPage->mvSidebarItems)
                 {
-                    VclPtr<SwAnnotationWin> pPostIt = pItem->pPostIt;
+                    VclPtr<SwAnnotationWin> pPostIt = pItem->mpPostIt;
 
                     if (pPage->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT )
                     {
@@ -728,7 +728,7 @@ void SwPostItMgr::LayoutPostIts()
                             pPage->mPageRect.Right() - 350;
                     }
 
-                    if (pItem->bShow)
+                    if (pItem->mbShow)
                     {
                         long Y = mpEditWin->LogicToPixel( Point(0,pItem->maLayoutInfo.mPosition.Bottom())).Y();
                         long aPostItHeight = 0;
@@ -738,7 +738,7 @@ void SwPostItMgr::LayoutPostIts()
                                                               *this );
                             pPostIt->InitControls();
                             pPostIt->SetReadonly(mbReadOnly);
-                            pItem->pPostIt = pPostIt;
+                            pItem->mpPostIt = pPostIt;
                             if (mpAnswer)
                             {
                                 if (static_cast<bool>(pPostIt->CalcParent())) //do we really have another note in front of this one
@@ -765,11 +765,11 @@ void SwPostItMgr::LayoutPostIts()
                                                       mlPageEnd );
                         pPostIt->ChangeSidebarItem( *pItem );
 
-                        if (pItem->bFocus)
+                        if (pItem->mbFocus)
                         {
                             mbLayout = true;
                             pPostIt->GrabFocus();
-                            pItem->bFocus = false;
+                            pItem->mbFocus = false;
                         }
                         // only the visible postits are used for the final layout
                         aVisiblePostItList.push_back(pPostIt);
@@ -872,7 +872,7 @@ void SwPostItMgr::LayoutPostIts()
                 {
                     if (comphelper::LibreOfficeKit::isActive() && !comphelper::LibreOfficeKit::isTiledAnnotations())
                     {
-                        if (visiblePostIt->GetSidebarItem().bPendingLayout)
+                        if (visiblePostIt->GetSidebarItem().mbPendingLayout)
                             lcl_CommentNotification(mpView, CommentNotificationType::Add, &visiblePostIt->GetSidebarItem(), 0);
                         else if (visiblePostIt->IsAnchorRectChanged())
                         {
@@ -882,7 +882,7 @@ void SwPostItMgr::LayoutPostIts()
                     }
 
                     // Layout for this post it finished now
-                    visiblePostIt->GetSidebarItem().bPendingLayout = false;
+                    visiblePostIt->GetSidebarItem().mbPendingLayout = false;
                 }
             }
             else
@@ -906,13 +906,13 @@ void SwPostItMgr::LayoutPostIts()
                     continue;
                 }
 
-                if (postItField->pPostIt)
+                if (postItField->mpPostIt)
                 {
-                    postItField->pPostIt->HideNote();
-                    if (postItField->pPostIt->HasChildPathFocus())
+                    postItField->mpPostIt->HideNote();
+                    if (postItField->mpPostIt->HasChildPathFocus())
                     {
                         SetActiveSidebarWin(nullptr);
-                        postItField->pPostIt->GrabFocusToDocument();
+                        postItField->mpPostIt->GrabFocusToDocument();
                     }
                 }
             }
@@ -943,11 +943,11 @@ bool SwPostItMgr::BorderOverPageBorder(unsigned long aPage) const
 
     auto aItem = mPages[aPage-1]->mvSidebarItems.end();
     --aItem;
-    OSL_ENSURE ((*aItem)->pPostIt,"BorderOverPageBorder: NULL postIt, should never happen");
-    if ((*aItem)->pPostIt)
+    OSL_ENSURE ((*aItem)->mpPostIt,"BorderOverPageBorder: NULL postIt, should never happen");
+    if ((*aItem)->mpPostIt)
     {
         const long aSidebarheight = mPages[aPage-1]->bScrollbar ? mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height() : 0;
-        const long aEndValue = mpEditWin->PixelToLogic(Point(0,(*aItem)->pPostIt->GetPosPixel().Y()+(*aItem)->pPostIt->GetSizePixel().Height())).Y();
+        const long aEndValue = mpEditWin->PixelToLogic(Point(0,(*aItem)->mpPostIt->GetPosPixel().Y()+(*aItem)->mpPostIt->GetSizePixel().Height())).Y();
         return aEndValue <= mPages[aPage-1]->mPageRect.Bottom()-aSidebarheight;
     }
     else
@@ -961,7 +961,7 @@ void SwPostItMgr::DrawNotesForPage(OutputDevice *pOutDev, sal_uInt32 nPage)
         return;
     for (auto const& pItem : mPages[nPage]->mvSidebarItems)
     {
-        SwAnnotationWin* pPostIt = pItem->pPostIt;
+        SwAnnotationWin* pPostIt = pItem->mpPostIt;
         if (!pPostIt)
             continue;
         Point aPoint(mpEditWin->PixelToLogic(pPostIt->GetPosPixel()));
@@ -973,7 +973,7 @@ void SwPostItMgr::PaintTile(OutputDevice& rRenderContext)
 {
     for (const std::unique_ptr<SwSidebarItem>& pItem : mvPostItFields)
     {
-        SwAnnotationWin* pPostIt = pItem->pPostIt;
+        SwAnnotationWin* pPostIt = pItem->mpPostIt;
         if (!pPostIt)
             continue;
 
@@ -1007,12 +1007,12 @@ void SwPostItMgr::Scroll(const long lScroll,const unsigned long aPage)
     const long aSidebarheight = mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height();
     for (auto const& item : mPages[aPage-1]->mvSidebarItems)
     {
-        SwAnnotationWin* pPostIt = item->pPostIt;
+        SwAnnotationWin* pPostIt = item->mpPostIt;
         // if this is an answer, we should take the normal position and not the real, slightly moved position
         pPostIt->SetVirtualPosSize(pPostIt->GetPosPixel(),pPostIt->GetSizePixel());
         pPostIt->TranslateTopPosition(lScroll);
 
-        if (item->bShow)
+        if (item->mbShow)
         {
             bool bBottom  = mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y()+pPostIt->VirtualSize().Height())).Y() <= (mPages[aPage-1]->mPageRect.Bottom()-aSidebarheight);
             bool bTop = mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y())).Y() >=   (mPages[aPage-1]->mPageRect.Top()+aSidebarheight);
@@ -1078,7 +1078,7 @@ void SwPostItMgr::MakeVisible(const SwAnnotationWin* pPostIt )
     {
         for (auto const& item : page->mvSidebarItems)
         {
-            if (item->pPostIt==pPostIt)
+            if (item->mpPostIt==pPostIt)
             {
                 aPage = n+1;
                 break;
@@ -1315,7 +1315,7 @@ void SwPostItMgr::RemoveSidebarWin()
     for (auto& postItField : mvPostItFields)
     {
         EndListening( *const_cast<SfxBroadcaster*>(postItField->GetBroadcaster()) );
-        postItField->pPostIt.disposeAndClear();
+        postItField->mpPostIt.disposeAndClear();
         postItField.reset();
     }
     mvPostItFields.clear();
@@ -1663,7 +1663,7 @@ void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
     {
         for (auto const& postItField : mvPostItFields)
         {
-            pWin = postItField->pPostIt;
+            pWin = postItField->mpPostIt;
             if (pWin)
                 break;
         }
@@ -1697,9 +1697,9 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr)
 
     for (auto const& postItField : mvPostItFields)
     {
-        if (!postItField->pPostIt)
+        if (!postItField->mpPostIt)
             continue;
-        OutlinerView* pOLV = postItField->pPostIt->GetOutlinerView();
+        OutlinerView* pOLV = postItField->mpPostIt->GetOutlinerView();
         //save old selection
         ESelection aOrigSel(pOLV->GetSelection());
         //select all
@@ -1715,7 +1715,7 @@ void SwPostItMgr::FormatAll(const SfxItemSet &rNewAttr)
         //restore old selection
         pOLV->SetSelection(aOrigSel);
         // tdf#91596 store updated formatting in SwField
-        postItField->pPostIt->UpdateData();
+        postItField->mpPostIt->UpdateData();
     }
 
     mpWrtShell->EndUndo();
@@ -1730,10 +1730,10 @@ void SwPostItMgr::Hide( const OUString& rAuthor )
 {
     for (auto const& postItField : mvPostItFields)
     {
-        if ( postItField->pPostIt && (postItField->pPostIt->GetAuthor() == rAuthor) )
+        if ( postItField->mpPostIt && (postItField->mpPostIt->GetAuthor() == rAuthor) )
         {
-            postItField->bShow  = false;
-            postItField->pPostIt->HideNote();
+            postItField->mbShow  = false;
+            postItField->mpPostIt->HideNote();
         }
     }
 
@@ -1744,8 +1744,8 @@ void SwPostItMgr::Hide()
 {
     for (auto const& postItField : mvPostItFields)
     {
-        postItField->bShow = false;
-        postItField->pPostIt->HideNote();
+        postItField->mbShow = false;
+        postItField->mpPostIt->HideNote();
     }
 }
 
@@ -1753,7 +1753,7 @@ void SwPostItMgr::Show()
 {
     for (auto const& postItField : mvPostItFields)
     {
-        postItField->bShow = true;
+        postItField->mbShow = true;
     }
     LayoutPostIts();
 }
@@ -1763,7 +1763,7 @@ SwAnnotationWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster)
     for (auto const& postItField : mvPostItFields)
     {
         if ( postItField->GetBroadcaster() == pBroadcaster)
-            return postItField->pPostIt;
+            return postItField->mpPostIt;
     }
     return nullptr;
 }
@@ -1773,7 +1773,7 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItFie
     for (auto const& postItField : mvPostItFields)
     {
         if ( postItField->GetFormatField().GetField() == pField )
-            return postItField->pPostIt.get();
+            return postItField->mpPostIt.get();
     }
     return nullptr;
 }
@@ -1783,7 +1783,7 @@ sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const sal_uInt32
     for (auto const& postItField : mvPostItFields)
     {
         if ( static_cast<const SwPostItField*>(postItField->GetFormatField().GetField())->GetPostItId() == nPostItId )
-            return postItField->pPostIt.get();
+            return postItField->mpPostIt.get();
     }
     return nullptr;
 }
@@ -1794,7 +1794,7 @@ SwAnnotationWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
     if (mvPostItFields.size()>1)
     {
         auto i = std::find_if(mvPostItFields.begin(), mvPostItFields.end(),
-            [&aPostIt](const std::unique_ptr<SwSidebarItem>& pField) { return pField->pPostIt == aPostIt; });
+            [&aPostIt](const std::unique_ptr<SwSidebarItem>& pField) { return pField->mpPostIt == aPostIt; });
         if (i == mvPostItFields.end())
             return nullptr;
 
@@ -1816,9 +1816,9 @@ SwAnnotationWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
             }
         }
         // lets quit, we are back at the beginning
-        if ( (*iNextPostIt)->pPostIt == aPostIt)
+        if ( (*iNextPostIt)->mpPostIt == aPostIt)
             return nullptr;
-        return (*iNextPostIt)->pPostIt;
+        return (*iNextPostIt)->mpPostIt;
     }
     else
         return nullptr;
@@ -1830,11 +1830,11 @@ long SwPostItMgr::GetNextBorder()
     {
         for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
         {
-            if ((*b)->pPostIt == mpActivePostIt)
+            if ((*b)->mpPostIt == mpActivePostIt)
             {
                 auto aNext = b;
                 ++aNext;
-                bool bFollow = (aNext != pPage->mvSidebarItems.end()) && (*aNext)->pPostIt->IsFollow();
+                bool bFollow = (aNext != pPage->mvSidebarItems.end()) && (*aNext)->mpPostIt->IsFollow();
                 if ( pPage->bScrollbar || bFollow )
                 {
                     return -1;
@@ -1845,7 +1845,7 @@ long SwPostItMgr::GetNextBorder()
                     if (aNext == pPage->mvSidebarItems.end())
                         return mpEditWin->LogicToPixel(Point(0,pPage->mPageRect.Bottom())).Y() - GetSpaceBetween();
                     else
-                        return (*aNext)->pPostIt->GetPosPixel().Y() - GetSpaceBetween();
+                        return (*aNext)->mpPostIt->GetPosPixel().Y() - GetSpaceBetween();
                 }
             }
         }
@@ -1970,7 +1970,7 @@ vcl::Window* SwPostItMgr::IsHitSidebarWindow(const Point& rPointLogic)
 
         for (const std::unique_ptr<SwSidebarItem>& pItem : mvPostItFields)
         {
-            SwAnnotationWin* pPostIt = pItem->pPostIt;
+            SwAnnotationWin* pPostIt = pItem->mpPostIt;
             if (!pPostIt)
                 continue;
 
@@ -2051,7 +2051,7 @@ void SwPostItMgr::CorrectPositions()
     SwAnnotationWin *pFirstPostIt = nullptr;
     for (auto const& postItField : mvPostItFields)
     {
-        pFirstPostIt = postItField->pPostIt;
+        pFirstPostIt = postItField->mpPostIt;
         if (pFirstPostIt)
             break;
     }
@@ -2078,13 +2078,13 @@ void SwPostItMgr::CorrectPositions()
         for (auto const& item : pPage->mvSidebarItems)
         {
             // check, if anchor overlay object exists.
-            if ( item->bShow && item->pPostIt && item->pPostIt->Anchor() )
+            if ( item->mbShow && item->mpPostIt && item->mpPostIt->Anchor() )
             {
                 aAnchorPosX = pPage->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT
-                    ? mpEditWin->LogicToPixel( Point(static_cast<long>(item->pPostIt->Anchor()->GetSeventhPosition().getX()),0)).X()
-                    : mpEditWin->LogicToPixel( Point(static_cast<long>(item->pPostIt->Anchor()->GetSixthPosition().getX()),0)).X();
-                aAnchorPosY = mpEditWin->LogicToPixel( Point(0,static_cast<long>(item->pPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1;
-                item->pPostIt->SetPosPixel(Point(aAnchorPosX,aAnchorPosY));
+                    ? mpEditWin->LogicToPixel( Point(static_cast<long>(item->mpPostIt->Anchor()->GetSeventhPosition().getX()),0)).X()
+                    : mpEditWin->LogicToPixel( Point(static_cast<long>(item->mpPostIt->Anchor()->GetSixthPosition().getX()),0)).X();
+                aAnchorPosY = mpEditWin->LogicToPixel( Point(0,static_cast<long>(item->mpPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1;
+                item->mpPostIt->SetPosPixel(Point(aAnchorPosX,aAnchorPosY));
             }
         }
     }
@@ -2224,8 +2224,8 @@ IMPL_LINK_NOARG( SwPostItMgr, CalcHdl, void*, void )
 void SwPostItMgr::Rescale()
 {
     for (auto const& postItField : mvPostItFields)
-        if ( postItField->pPostIt )
-            postItField->pPostIt->Rescale();
+        if ( postItField->mpPostIt )
+            postItField->mpPostIt->Rescale();
 }
 
 sal_Int32 SwPostItMgr::GetInitialAnchorDistance() const
@@ -2261,22 +2261,22 @@ sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const
 void SwPostItMgr::SetSpellChecking()
 {
     for (auto const& postItField : mvPostItFields)
-        if ( postItField->pPostIt )
-            postItField->pPostIt->SetSpellChecking();
+        if ( postItField->mpPostIt )
+            postItField->mpPostIt->SetSpellChecking();
 }
 
 void SwPostItMgr::SetReadOnlyState()
 {
     for (auto const& postItField : mvPostItFields)
-        if ( postItField->pPostIt )
-            postItField->pPostIt->SetReadonly( mbReadOnly );
+        if ( postItField->mpPostIt )
+            postItField->mpPostIt->SetReadonly( mbReadOnly );
 }
 
 void SwPostItMgr::CheckMetaText()
 {
     for (auto const& postItField : mvPostItFields)
-        if ( postItField->pPostIt )
-            postItField->pPostIt->CheckMetaText();
+        if ( postItField->mpPostIt )
+            postItField->mpPostIt->CheckMetaText();
 
 }
 
@@ -2473,10 +2473,10 @@ void SwPostItMgr::ShowHideResolvedNotes(bool visible) {
     {
         for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
         {
-            if ((*b)->pPostIt->IsResolved())
+            if ((*b)->mpPostIt->IsResolved())
             {
-                (*b)->pPostIt->SetResolved(true);
-                (*b)->pPostIt->GetSidebarItem().bShow = visible;
+                (*b)->mpPostIt->SetResolved(true);
+                (*b)->mpPostIt->GetSidebarItem().mbShow = visible;
             }
         }
     }
@@ -2492,8 +2492,8 @@ void SwPostItMgr::UpdateResolvedStatus(const sw::annotation::SwAnnotationWin* to
     {
         for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
         {
-            if((*b)->pPostIt->GetTopReplyNote() == topNote) {
-               (*b)->pPostIt->SetResolved(resolved);
+            if((*b)->mpPostIt->GetTopReplyNote() == topNote) {
+               (*b)->mpPostIt->SetResolved(resolved);
             }
         }
     }
diff --git a/sw/source/uibase/uiview/viewmdi.cxx b/sw/source/uibase/uiview/viewmdi.cxx
index 3b18942f150d..398d8369370f 100644
--- a/sw/source/uibase/uiview/viewmdi.cxx
+++ b/sw/source/uibase/uiview/viewmdi.cxx
@@ -515,8 +515,8 @@ IMPL_LINK( SwView, MoveNavigationHdl, void*, p, void )
                 SwFieldType* pFieldType = rSh.GetFieldType(0, SwFieldIds::Postit);
                 if ( !rSh.MoveFieldType( pFieldType, bNext ) )
                 {
-                    bNext ? (*(m_pPostItMgr->begin()))->pPostIt->GotoPos() :
-                        (*(m_pPostItMgr->end()-1))->pPostIt->GotoPos();
+                    bNext ? (*(m_pPostItMgr->begin()))->mpPostIt->GotoPos() :
+                        (*(m_pPostItMgr->end()-1))->mpPostIt->GotoPos();
                     SvxSearchDialogWrapper::SetSearchLabel( bNext ? SearchLabel::EndWrapped : SearchLabel::StartWrapped );
                 }
                 else
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index b7a00bea7fe9..c42238a864a9 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -3323,7 +3323,7 @@ void SwXTextDocument::getPostIts(tools::JsonWriter& rJsonWriter)
     auto commentsNode = rJsonWriter.startNode("comments");
     for (auto const& sidebarItem : *pDocShell->GetView()->GetPostItMgr())
     {
-        sw::annotation::SwAnnotationWin* pWin = sidebarItem->pPostIt.get();
+        sw::annotation::SwAnnotationWin* pWin = sidebarItem->mpPostIt.get();
 
         const SwPostItField* pField = pWin->GetPostItField();
         const SwRect& aRect = pWin->GetAnchorRect();


More information about the Libreoffice-commits mailing list