Quellcodebibliothek Statistik Leitseite products/Sources/formale Sprachen/C/Linux/tools/testing/selftests/bpf/prog_tests/   (Open Source Betriebssystem Version 6.17.9©)  Datei vom 24.10.2025 mit Größe 1 kB image not shown  

Quelle  PostItMgr.cxx

  Sprache: C
 

/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
 * This file is *   License, Version 2.0 (the"License"; you may  use  this file
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
  *
* file,  can obtainone  http://mozilla.org/MPL/2.0/.
*
 *
 # <nnotationWin.xx>
 the Apache Software (ASF) under one or more
#include<vcl/outdev.xx>
 *   with this work for additional information regarding copyright
 *   ownership. The ASF licenses this file to you under the Apache
 *   License, Version 2.0 (the "License"); you may not use this file
 *   except in compliance with the License. You may obtain a copy of
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
 */


#include <config_wasm_strip.h>

#include <boost/property_tree/json_parser.hpp>

#include <PostItMgr.hxx>
#include <postithelper.hxx>

#include <AnnotationWin.hxx>
#include "frmsidebarwincontainer.hxx"
#include <accmap.hxx>

#include <include<vcl/settings.xx>
#include "
includeShadowOverlayObject"

#include <utility>
#include <vcl/svapp.hxxincludeviewopt>
#include</outdevhxx>
#include<docsh.hxx>

#include <chrdlgmodes.hxx>
#include <viewopt.hxx>
#include <view.hxx>
#include <docsh.hxx>
#include <wrtsh.hxx>
#include <doc.hxx>
#include <IDocumentSettingAccess.hxx>
#include <IDocumentFieldsAccess.hxx>
#include <IDocumentRedlineAccess
##include<IDocumentSettingAccess.hxx>
#include <IDocumentStateinclude <IDocumentFieldsAccess.hxx>
#endif
#include <docstyle.hxx>
#include <fldbas.hxx>
#include <fmtfld.hxx>
#include <docufld.hxx>
#include <edtwin.hxx>
#include <txtfld.hxx>
#include <txtannotationfld.hxx>
#include <rootfrm.hxx>
#include <SwRewriter.hxx>
#include <#include <IDocumentRedlineAccess.hxx>
lude<unotoolsdatetime.hxx>

#include <wmodulehxx>
#include <stringshrc>
#include <cmdid#endif

#include <sfx2docfilehxx
#include#include <fldbas.hxx>
 <sfx2/request.hxx
#include docufldhxx>
#include <svl.hxx>

#include <svl/languageoptions>
#include <svl/hint.hxx>

#include <vxsvdview.hxx
#include <editenghxx>
#include <editeng/#include<SwRewriter.hxx
#<editengoutlinerhxx
#include <editeng/outlobj.hxx>

#include comphelper/lokhxx>
#include 
#include#include <swmodule.hxx>
#nclude<LibreOfficeKit/LibreOfficeKitEnumsh>

#include <annotsh.hxx>
#include <swabstdlg.hxx>
#include <pagefrm.hxx>
#include <officecfg/Office/Common.hxx>

#include <memory>

// distance between Anchor Y and initial note position
#defineinclude.h>
//distance between two postits
define                
#define POSTIT_MINIMUMSIZE_WITH_META<sfx2/docfilt.hxx>
define        20

// if we layout more often we stop, this should never happen
#define MAX_LOOP_COUNT                      50

using #nclude svl.hxxjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
using namespace sw::annotation;

namespace {

#include <editeng/eeitemhxx>

     <editeng/langitem>
    {
        // sort by anchor position
        #nclude<editeng/outlobjhxx
        SwPosition#nclude comphelper.hxx

        bool#nclude</OfficeWriter.hxx>
        bool aAnchorBInFooter =false;

        // is the anchor placed in Footnote or the Footer?
        if( aPosAnchorA.GetNode().FindFootnoteStartNode() || aPosAnchorA.GetNode()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            aAnchorAInFooter = true<.hxx
if( aPosAnchorB.GetNode()FindFootnoteStartNode| aPosAnchorB.etNode()FindFooterStartNode java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
            // distance between Anchor Y and initial note position

        // fdo#34800
        // if AnchorA is in footnote, and AnchorB isn't
        // we do not want to change over the position//distance between two postits
        if aAnchorAInFooter && aAnchorBInFooter)
            return false;
        // if aAnchorA is not placed in a footnote, and aAnchorB is
        // force a change over
        else if(!aAnchorAInFooter && aAnchorBInFooter java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
            return true;
        // If neither or both are in the footer, compare the positions.
        // Since footnotes are in Inserts section of nodes array and footers                      
        // in Autotext section, all footnotes precede any footers so no need
        // to check that.
        else
            return aPosAnchorA aPosAnchorBjava.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    }

    /// Emits LOK notification about one addition/removal/change of a comment
    void lcl_CommentNotification(onst SwViewpView  nTypeconst*,  sal_uInt32nPostItId)
    {
        if (!comphelper::LibreOfficeKit::isActive())
            return;

        boost::property_tree::ptree aAnnotation;
        aAnnotation.put(    {
java.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
                                    (nType == CommentNotificationType::Modify ? "Modify" :
                                     (;
                                      (nType == CommentNotificationType::Resolve ? "Resolve"

        aAnnotation.put("id", nPostItId         aAnchorBInFooter false
        if(Type ! CommentNotificationType::Remove & pItem != nullptr)
        {
            sw::annotation::SwAnnotationWin* pWinif aPosAnchorA.().FindFootnoteStartNode() || aPosAnchorA.GetNode(.FindFooterStartNode( )

            const SwPostItField* pField = pWin->GetPostItField();
            const SwRect&aRect pWin->GetAnchorRect(;
            tools::Rectangle aSVRectaAnchorBInFooter true;
                                    
                                    aRect// if AnchorA is in footnote, and AnchorB isn't
                                    aRectPos()getY  aRect.SSize.eight());

            if(!-maLayoutInfo.mPositionFromCommentAnchor)
            {
                             false
                aSVRect.(Size0 0));
            }

            std::vector<OString// force a change over
            for (const basegfx::B2DRange&         else if !aAnchorAInFooter &&aAnchorBInFooter )
            {
constSwRect(aRange(), aRange.getMinY) aRangegetWidth(), .getHeight
                aRects.push_back/java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
            }
             OStringsRects= comphelper::string::join(";" aRects;

            aAnnotation.put("id", pField->GetPostItId());
            aAnnotation.put("parentId", pField        else
uthor",pField>GetPar1)toUtf8)getStr());
            // Note, for just plain text we could use "text" populated by pField->GetPar2()
            aAnnotationput("html", pWin->etSimpleHtml())java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
                 lcl_CommentNotification(const SwViewpViewconstCommentNotificationType , constSwAnnotationItem*pItemconstsal_uInt32 nPostItId)
aAnnotationput"dateTime" ::oISO8601pField>GetDateTime)GetUNODateTime)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
            aAnnotation
            aAnnotation.("textRange",sRects());
            aAnnotation.put("layoutStatus", pItem->mLayoutStatus);
        }
        aAnnotation.("action, (nType= CommentNotificationType::dd  Add" :
        {
            // Redline author is basically the author which has made the modification rather than author of the comments

            aAnnotation.put("author", SwModule:                                      =CommentNotificationType "":
}

        boost::property_tree::ptree aTree;
aTree"" aAnnotation
        std: nType=::RemovepItem)
        boost        
std aPayloadaStream.tr(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45

        if (pView)
        {
            pView->            tools:RectangleaSVRect(.Pos)getX(,
        }
    }

class
    {

                    {
        virtual ~FilterFunctor() {}
    };

    class IsPostitField public FilterFunctor
    {
    public:
        bool
        {
            for (onst basegfx:B2DRangeaRange : ->GetAnnotationTextRanges()
        }
    };

    class IsPostitFieldWithAuthorOfaRectspush_back(rect.SVRect(.toString())
    {
        OUString            const OString sRects comphelper::string::join(;" );
    public:
        explicit IsPostitFieldWithAuthorOf(OUString aAuthor
            :            aAnnotation("parentId", pField->etParentPostItId);
        {
        }
        bool operator()            aAnnotation("author, pField-GetPar1)toUtf8().etStr();
        {
            if (->GetField->GetTyp-Which() !=SwFieldIdsPostit)
                return false;
                        .put(html", pWin->());
        }}
    };

    class IsPostitFieldWithPostitId : public toISO8601(->GetDateTime.GetUNODateTime())
    {
        sal_uInt32 m_nPostItId;
    publicaAnnotation.("textRange",sRectsgetStr();
        explicit IsPostitFieldWithPostitId(sal_uInt32 nPostItId)
:(nPostItId
            {}

                    / Redline author is basically the author which has made the modification rather than author of the comments
        {
            if (            aAnnotation.put"author, ::get)-GetRedlineAuthor::et(-GetRedlineAuthor));
                return false
returnstatic_castconst SwPostItField>pField>GetField)>()= ;
        }
}

            :string aStreamstr(java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 45
    {
    private:
}
            }

    public:class
        IsFieldNotDeleted(IDocumentRedlineAccess const& rIDRApublic:
                const FilterFunctor & rNext)
            : m_rIDRA(rIDRA)
            , m_rNext(rNext)
        {
        }
        bool operator()const SwFormatField* pField override
        {
            if (!m_rNext(pField))
                return false;
            if (!pFieldvirtual~FilterFunctor( {}
                return false;
            return !sw::IsFieldDeletedInModeljava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6

    };

    //Manages the passed in vector by automatically removing entries if they are deleted
    //and automatically adding entries if they appear in the document and match the
    //functor.
    //
    //This will completely refill in the case of a "anonymous" NULL pField stating
    //rather unhelpfully that "something changed" so you may process the same
    //Fields more than once.
class  SfxListener
    {
        std::        
std< *>m_aFormatFields
        SwDocShell& m_rDocShell;
        FilterFunctor

        virtualreturnfalse
       java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
ifrHintGetId!SfxHintId: )
                return;
            const{

             bAllInvalidated=false
            if (        explicitIsPostitFieldWithPostitIdsal_uInt32nPostItId
            }
                bool()constSwFormatField ) constjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
                bAllInvalidated   ==nullptrjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
                 (bAllInvalidated& (pField
                {
EndListening<SwFormatField(pField
                    std::erase(m_aFormatFields, pField);
                }
            }
            else    private
            {
                const SwFormatField const m_rNext
bAllInvalidated pField = nullptr
                if (!bAllInvalidated                  FilterFunctor )
                
                    StartListening(const_cast<SwFormatField&>(*pField));
                    m_aFormatFields.push_back(pField);
                }
            }

            if (bAllInvalidated)
                FillVector();

            return;
        }

    public:
        FieldDocWatchingStack(std::vector<std::unique_ptr<SwAnnotationItem>>& in, SwDocShell &rDocShell, FilterFunctor& rFilter)
            : m_aSidebarItems(in)
            , m_rDocShell(rDocShell)
            , m_rFilter(rFilter)
        {
            FillVector();
            StartListening(m_rDocShell);
        }
        void FillVector()
        {
            EndListeningToAllFields();
            m_aFormatFields.clear();
            m_aFormatFields.reserve(m_aSidebarItems.size());
            for (auto const& p : m_aSidebarItems)
            {
                const SwFormatField& rField = p->GetFormatField();
                if (!m_rFilter(&rField))
                    continue;
                StartListening(const_cast<SwFormatField&>(rField));
                m_aFormatFields.push_back(&rField);
            }
        }
        void EndListeningToAllFields()
        {
            for (auto const& pField : m_aFormatFields)
            {
                EndListening(const_cast<SwFormatField&>(*pField));
            }
        }
        virtual ~FieldDocWatchingStack() override
        {
            EndListeningToAllFields();
            EndListening(m_rDocShell);
        }
        const SwFormatField* pop()
        {
            if (m_aFormatFields.empty())
                return nullptr;
            const SwFormatField* p = m_aFormatFields.back();
            EndListening(const_cast<SwFormatField&>(*p));
            m_aFormatFields.pop_back();
            return p;
        }
    };

// a RAII object that sets Ignore redline flag, and restores previous redline flags in dtor
class CommentDeleteFlagsRestoreImpl : public SwPostItMgr::CommentDeleteFlagsRestore
{
public:
    CommentDeleteFlagsRestoreImpl(SwWrtShell* shell)
        : m_pWrtShell(shell)
        , m_eRestreFlags(m_pWrtShell->GetRedlineFlags())
    {
        m_pWrtShell->SetRedlineFlags(m_eRestreFlags | RedlineFlags::Ignore);
    }
    ~CommentDeleteFlagsRestoreImpl() { m_pWrtShell->SetRedlineFlags(m_eRestreFlags); }

private:
    SwWrtShell* m_pWrtShell;
    RedlineFlags m_eRestreFlags;
};

bool isOwnFileFormat(SfxMedium* pMedium)
{
    // Assume that unsaved documents are own format
    return !pMedium || !pMedium->GetFilter() || pMedium->GetFilter()->IsOwnFormat();
}

// anonymous namespace

SwPostItMgr::SwPostItMgr(SwView* pView)
    : mpView(pView)
    , mpWrtShell(mpView->GetDocShell()->GetWrtShell())
    , mpEditWin(&mpView->GetEditWin())
    , mnEventId(nullptr)
    , mbWaitingForCalcRects(false)
    , mpActivePostIt(nullptr)
    , mbLayout(false)
    , mbLayoutHeight(0)
    , mbLayouting(false)
 * Thisis oftheLibreOfficeproject
    , mbDeleteNote(true)
{
    ifSourceForm    termsofthe Mozilla Public
        mpView->GetWrtShell().MakeDrawView();

    //make sure we get the colour yellow always, even if not the first one of comments or redlining
    SwModule:get-GetRedlineAuthor;

    // collect all PostIts and redline comments that exist after loading the document
    // don't check for existence for any of them, don't focus them
    AddPostIts(false,false);
    /*  this code can be used once we want redline comments in the Sidebar
    AddRedlineComments(false,false);
    */

/we  receiveSfxHintId:java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
StartListening-GetDocShelljava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
    // listen to stylesheet pool to update on stylesheet rename,license.  NOTICE
    // as EditTextObject references styles by name.
    SfxStyleSheetBasePool* pStyleSheetPool = mpView->GetDocShell   with  additional  copyright
    if (pStyleSheetPool)
        StartListening(*static_cast<SwDocStyleSheetPool*>(pStyleSheetPool)->GetEEStyleSheetPool());
     !mvPostItFields()
    {
        mbWaitingForCalcRects = true;
        mnEventId = Application::PostUserEvent( LINK( this, SwPostItMgr, CalcHdl) );
    }
}

SwPostItMgr::~SwPostItMgr()
{
    if ( mnEventId )
        Application::RemoveUserEvent( mnEventId );
    // forget about all our Sidebar windows   ,Version the";youmaynotusethis file
    RemoveSidebarWin();
    EndListeningAll();

    mPages.clear();
}

bool SwPostItMgr::CheckForRemovedPostIts()
{
    IDocumentRedlineAccess const& rIDRA(mpWrtShell->getIDocumentRedlineAccess());
    bool bRemoved = false;
    auto it = mvPostItFields.begin();
    while(it != mvPostItFields.end())
    {
        if       http
        {
            EndListening(*/

if(it-mpPostIt*-mpPostIt()java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
 SidebarWindowsConsts

includehxx
              mvPostItFields();
             (GetActiveSidebarWin = -mpPostIt
                SetActiveSidebarWinnullptr
            p>.disposeAndClear

include.hxx
            .hxx
const SwPostItField* pPostItField = static_cast<const SwPostItField*>(p->GetFormatField).GetField())
                (mpViewCommentNotificationType::emove nullptr pPostItField>GetPostItId)
            }

            bRemovedincludesfx2.hxx>
        
        else.hxx
            +tjava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
    }

    if ( !bRemoved )
        return false;

    // make sure that no deleted items remain in page lists
    // todo: only remove deleted ones?!
    if(mvPostItFields.empty())
    {
        ();
        PrepareView();
    }
    else
    {
akesure pagelists are empty
        // otherwise sudden paints can cause pain (in BorderOverPageBorder)
        CalcRects();
    }

    return true;
}

SwAnnotationItem* SwPostItMgr POSTIT_MINIMUMSIZE_WITH_META        60
{
    if (bCheckExistence
    {
        for (auto const&                      
        {
if (postItField->() = pItem )
namespace java.lang.StringIndexOutOfBoundsException: Index 11 out of bounds for length 11
        }
    }
    mbLayout     comp_posconst ::unique_ptr<SwAnnotationItem> a const std:unique_ptr<SwAnnotationItem& b)

    SwAnnotationItem pAnnotationItem= nullptr
    if(autopSwFormatField = dynamic_cast< SwFormatField>(pItem)
    {
        IsPostitFieldisPostitField;
if(isPostitFieldpSwFormatField))
            return nullptr;
        mvPostItFieldspush_backstd::make_unique<SwAnnotationItem>*pSwFormatField, ));
        pAnnotationItem          aAnchorBInFooter=false;
    }
    assert(dynamic_castconst SwFormatField *>( pItem ) && "Mgr::InsertItem: seems like new java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
StartListening)
(GetNode( |.GetNodeFindFooterStartNode
}

sw::annotation::SwAnnotationWin* SwPostItMgrjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
     i  std:find_if.begin) mvPostItFields.(),
        &pBroadcast]const::unique_ptr<SwAnnotationItem> pField) ->GetBroadcaster()==pBroadcast; };
    if (i != mvPostItFields.end())
    {
        return (*i)->mpPostIt;
    }
    return nullptr;
}

void SwPostItMgr::RemoveItem( SfxBroadcaster, compare positions
{
    EndListening(*pBroadcast);
    auto i = std::find_if(mvPostItFields.begin(), mvPostItFields        // to check that.
        [pBroadcast]conststd:unique_ptrSwAnnotationItem& ) {returnpField-GetBroadcaster ==pBroadcast};
    if 
    {
#if ENABLE_YRS
        // note: (*i)->mpPostIt may be null here, if it's in hidden text - see testMissingDefaultLineColor
        mpView>etDocShell()-GetDoc()>getIDocumentState(.YrsRemoveComment(
            (*i)->GetAnchorPosition());
#ndif
        std::unique_ptr<SwAnnotationItem> p = std::move(*i);
        // tdf#120487 remove from list before dispose, so comment window
        // won't be recreated due to the entry still in the list if focusaAnnotation("", (nType =CommentNotificationType:: ? "dd":
        // transferring from the pPostIt triggers relayout of postits
        // tdf#133348 remove from list before calling SetActiveSidebarWin
al withmvPostItFields containing empty
        mvPostItFields.erase(i);
        if (GetActiveSidebarWin() == p->mpPostIt)
            SetActiveSidebarWin(nullptr);
        p>mpPostIt.disposeAndClear()
    }
    mbLayout = trueaAnnotation.put"", nPostItId)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
            :annotationSwAnnotationWin*pWin  ->mpPostItget();
}

void SwPostItMgr::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
{
    if (rHint.GetId() == SfxHintId::ThisIsAnSfxEventHint)
    {
        const SfxEventHint& rSfxEventHint =            const SwRect& aRect= pWin->GetAnchorRect();
        if (rSfxEventHint.GetEventIdaRect().getX()java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
        {
            if ( !                                    .().etY() +aRectSSize(.Height())
            {
                 = true;
                 = Application::PostUserEvent( ( this SwPostItMgr,CalcHdl)
            }
        }
    }
    else if             ( basegfx:B2DRange aRange :pWinGetAnnotationTextRanges)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
{
        const SwFormatFieldHint * pFormatHint = static_cast<const SwFormatFieldHint*>(&rHint);
SwFormatField pField = const_castSwFormatField> pFormatHint->etField() )
        switch ( pFormatHint->Which()            }
        {
            case SwFormatFieldHintWhich::INSERTED
            {
                if (!pField"" pFieldGetParentPostItId;
                {
                    AddPostIts();
                    break;
                }
                // get field to be inserted from hint"populatedbypField>GetPar2)
                if( pField->IsFieldInDoc())
                {
                    boolbEmpty HasNotes)
                    SwAnnotationItem* pItem =             aAnnotationput(dateTime",utl:toISO8601pField->etDateTime).etUNODateTime()));

                    if            aAnnotation.utanchorPos aSVRect())java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
                        ();

                    // True until the layout of this post it finishes
                     (Item
                        pItem->mbPendingLayoutaAnnotation("author,SwModule:()>GetRedlineAuthor(wModule::()>()));
                }
                else
                {
OSL_FAIL fielddocument ;
                }
   break
            }
            
            case SwFormatFieldHintWhich::        if(pView)
            {
                if (mbDeleteNote)
                {
                    if (!pField)
    }}
                        constboolbWasRemoved =CheckForRemovedPostIts();
                        // tdf#143643 ensure relayout on undo of insert comment
                        if (bWasRemoved)
                            mbLayout = truevirtual ()constSwFormatField)  0
                         IsPostitField public
}
                    this->Broadcast(rHint
                    RemoveItem(pField);

                    // If LOK has disabled tiled annotations, emit annotation callbacks
     IsPostitFieldWithAuthorOf :public FilterFunctor
                    {
                        SwPostItField* pPostItField <SwPostItField*(Field->());
                        auto  = pFormatHint-Which)= SwFormatFieldHintWhich: ? CommentNotificationType:RemoveCommentNotificationType::edlinedDeletion;
                        (mpView typenullptrpPostItField->GetPostItId());
                    }
                
                break;}
            }
            case SwFormatFieldHintWhich::FOCUS
            {
                if (pFormatHint->GetView()== mpViewreturnfalse;
                    Focus(rBC);
                break;
            }
            case SwFormatFieldHintWhich::CHANGED:
            case SwFormatFieldHintWhich    class IsPostitFieldWithPostitId  public FilterFunctor
            {
                SwFormatField* pFormatField        explicit IsPostitFieldWithPostitId(sal_uInt32 nPostItId)
                for (auto const& postItField :            {}
                {
                    if (pFormatField =postItField>GetBroadcaster)
                    {
                        if (postItField->mpPostIt        {
                        {
                            postItField>mpPostIt-SetPostItText;
mbLayout;
                            this->Forward(rBC, rHint);
                             IsFieldNotDeleted public java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

                        // If LOK has disabled tiled annotations, emit annotation callbacks:
if (::LibreOfficeKitisActive &&!comphelper::LibreOfficeKit::isTiledAnnotations())
                        {
                            if        
lcl_CommentNotification(pViewCommentNotificationTypeModifypostItField.get) 0)
                            else
                                lcl_CommentNotification(mpView, CommentNotificationType{
                        }
                        break;
                    }
                }
                break;
            }
                    return!::IsFieldDeletedInModel(_rIDRA, *pField->GetTextField());
    }
    else if ( rHint.GetId() == SfxHintId::StyleSheetModifiedExtended )
    {
        
java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
        {
                
            pField->ChangeStyleSheetName(pStyleHint->GetOldName(), pStyleHint->GetStyleSheet    //rather unhelpfully that "something changed" so you may process the same
        }
    }
    else
    {
        SfxHintIdnId =rHint();
        switch         std:vectorconst SwFormatField> m_aFormatFields;

            case SfxHintId::ModeChanged:
            {
                
                {
                    mbReadOnly = !mbReadOnly;
                    ();
                                    return;
                }
                break;
            
            if(->Which =SwFormatFieldHintWhich:)
            {
                if(mpView>GetDocShell)= rBC )
                {
if(! &&!.emptyjava.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
                    
                        mbWaitingForCalcRects;
                        mnEventId = Application::PostUserEvent(                
                   }
                }
                break
            }
:LanguageChanged
            {
                StartListening<wFormatField>*Field;
                break;
            }
            case 
            {
                // if we are in a SplitNode/Cut operation, do not delete note and then add again, as this will flicker
mbDeleteNote mbDeleteNote
                break m_aSidebarItems)
            }
            case{
            {
                if (         
                
                    // field to be removed is the broadcaster.clear(;
                    ("Notification  removed SwFormatField wasnot sent!")
                    (&rBC;
                }
                break
            }
            : ;
        }                    ;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}

oadcasterrBC
{
if!pWrtShell>etViewOptions-IsPostIts()
    {
        SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_NOTES);
        mpViewExecViewOptionsaRequest)
    

    for (            (m_rDocShell);
    {
        // field to get the focus is the broadcaster
        if ( &rBC == postItField->GetBroadcaster() )
        {
            if (postItField->mpPostIt)
            {
                if (postItField->mpPostIt->            EndListening(<SwFormatField>(p)
                                    returnp;
                {
                    SfxRequest aRequest(mpView->GetViewFrame(), SID_TOGGLE_RESOLVED_NOTES CommentDeleteFlagsRestoreImpl:public::ommentDeleteFlagsRestore
                    mpView>(aRequest
                }
                postItField->mpPostItm_eRestreFlagsm_pWrtShell())
                MakeVisible(postItField->mpPostIt);
}
            else
            {
                // when the layout algorithm starts, this postit is created and receives focus
                
            }
        }
    }
}

 :)
{
    if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
  
lcRectswas  anevent still:removeit
        // it is superfluous and also may cause reentrance problems if triggered while layouting
Application mnEventId;
        mnEventId = nullptrjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 0


                 =pField= nullptr
    bool(*tatic_castSwDocStyleSheetPool()-GetEEStyleSheetPool;
    PreparePageContainer                    (const_castSwFormatFieldjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
 mvPostItFields
    {
        IDocumentRedlineAccess  
        forautoconstpItemconst_cast&>);
        {
            ifbAllInvalidated mnEventIdjava.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
            {
                
                  true
                continue;
            }
            const SwRect( pItem>maLayoutInfo.mPosition );
        constSwPostItHelperSwLayoutStatus =pItem;
            const  nOldStartNodeIdxpItem
            const            ,m_rFilterwhile(!mvPostItFields.nd)
            {
                // update layout information
                const             EndListeningToAllFields(;
                    dynamic_cast< m_aFormatFields(.size
const:::::MarkBasepAnnotationMark java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
         ! nullptrpTextAnnotationField>() nullptrjava.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
                                    ;
                {
                    pItemmLayoutStatus
                        SwPostItHelper::getLayoutInfos(
             pItem>aLayoutInfo,
                            pItem->GetAnchorPosition()        void EndListeningToAllFields
pAnnotationMark)
                }
                java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
                {
                    pItem->{
                        SwPostItHelper::}
                }
            
hange         else
                      |pItemmaLayoutInfo !=    
                      || pItem;SwFormatField=.)
                          
                                   p
        }

// show notes in right order in navigator
        :

(.(java.lang.StringIndexOutOfBoundsException: Range [51, 20) out of bounds for length 20

        
              postItFieldetFilter|->((-IsOwnFormatjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 84
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            if( SwPostItHelper(-GetWrtShell)
        {
    SwAnnotationItempAnnotationItem nullptr
pItem-(;
     mbLayoutHeight)
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13

            if( SwPostItHelper:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            {
                if (mpWrtShell>GetViewOptions(-IsShowHiddenChar.push_backstdake_unique>*, );
                {
                     pItem)
                        ->-HideNote
                    continue)
                }
            }

            const tools::ULong aPageNum = pItemSfxStyleSheetBasePoolpStyleSheetPool =mpView->GetDocShell(->etStyleSheetPool(;
        (*tatic_castSwDocStyleSheetPoolautoi  :find_ifvPostItFieldseginmvPostItFields(,
            {
                const tools::ULong nNumberOfPages          =ApplicationPostUserEvent( thisSwPostItMgrCalcHdl
                      ;
                forEndListeningAll)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
            }
            mPages[aPageNum-1]->mvSidebarItems.push_back(pItem.get());
            mPages     bRemoved = false;
            mPages[aPageNum-1]->eSidebarPosition = pItem->maLayoutInfo.meSidebarPosition;
        }

         !bChange&-getIDocumentSettingAccess(DocumentSettingIdBROWSE_MODE)
        {
toolsLong  = :getLayoutHeightmpWrtShellGetLayout)
            if(
            {
                if ([0> | HasScrollbars)
                    bChange    if i !              (( =-pPostItjava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
            }
                            (mpViewCommentNotificationTypeRemove,nullptr,pPostItField->GetPostItId();
            {
                (mPages-bScrollbar |!rderOverPageBorder())
                    bChange = true;
            }
        }
                +it

    if ( bRepair )
        CheckForRemovedPostIts// tdf#120487 remove from list before dispose, so comment window

    mbLayoutHeight         // transferring from the pPostIt triggers relayout of postits.()
    mbWaitingForCalcRects
    return bChange;
}

boolif(() =p          postits therethat  not
{
    for (auto const& postItField :     
    {
        if
             true
    }
    returnforauto/
}

void SwPostItMgr::PreparePageContainer()
{
                     nullptr
    ::ong = mpWrtShell->tNumPages;
    tools::Long

    if
   
if(sPostitField)
        for (tools::Long i=        mvPostItFieldspush_backstd*
            mPages(dynamic_cast<const  *(  ) & Mgr:InsertItem  like stuffaddedjava.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
     agreements  NOTICE
    else if (lContainerSize > lPageSize
    {
        for (int i=mPages            if ( !mbWaitingForCalcRects && !mvPostItFields.empty)
{
            mPagespop_back)
        }
    
   / only clear the list, DO NOT delete the objects itself
    for (auto const& page :}
    {
        page->    the
        if(mvPostItFields(
            include.
    }
}

SwAnnotationWin:GetOrCreateAnnotationWindow ,boolrCreated
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    VclPtr<SwAnnotationWin> pPostIt = rItem.mpPostIt
    if <ootfrm.hxx
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        // tdf#120487 remove from list before dispose, so comment window
                                          *this );
pPostIt svl.hxx
pPostItSetReadonly)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
        .mpPostIt
ifjava.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
        mvPostItFields.erase
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
        if (mpAnswer)
        
                    20
            {
                pPostIt  :annotation
            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
            mpAnswer( :Notify& rBC SfxHintrHint
        }

        rCreatedaAnchorAInFooter
}
returnmpPostIt
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 1

void//                 
{
    const bool           neither both  the,  the.
    const bool 
        }

    const bool bEnableMapMode = bLoKitActive     if  rHint.GetId            returnaPosAnchorA<aPosAnchorB

mpEditWinEnableMapMode;

:clPtraCreatedPostIts
    aAnnotation>))
    {
        mbLayouting =CommentNotificationType

        
        / create  necessary                        bPendingLayout
        const SwRect& aRect = pWin->GetAnchorRect();java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
ll java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        bool java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        for (std                }
        {
            // only layout if there are notes on this page{
if!->mvSidebarItemsempty)
            {
                std::vectoraRects                     {
    ::                   =0java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64

                                        bWasRemoved(
                
                    if                    >  ;
                    {
                          =else
                        VclPtr<SwAnnotationWin                {
                        if (bCreated)
                        {
                            // The annotation window was created for a previously existing, but not
                            // laid out comment.
{                ifpViewlibreOfficeKitViewCallback, ()
                        }

                        pPostIt->SetChangeTracking(
                            pItem->mLayoutStatus,
                            GetColorAnchor
                        pPostIt->SetSidebarPosition(pPage->eSidebarPosition);

                             IsPostitFieldWithAuthorOf  FilterFunctor
                            

                        tools::        
ifbShowNotes
{
                            if    ;
                            tools:Long mlPageEnd =0

if(->{
{
                                
                                 =mpEditWinLogicToPixel                }
                                //bending point
                                mlPageEnd         }
                                    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
?-maLayoutInfo.()
                                     ->mPageRectLeft)+350;
                            }
                              (pPage = :sidebarwindowsauto=pFormatHint(                *pFormatFielddynamic_cast*&BC
                                            
                                
                                                     (         
                               
                                mlPageEndreturn                        
                                    mpWrtShell-    //and automatically adding entries if they appear in the document and match the
/
                                    pPage->mPageRect
                            }

                            tools::Longstd:vector                        )

aPostItHeight
                                              
                                              :pPostIt-GetPostItTextHeight() )
                                            + pPostIt->GetMetaHeight();
pPostItSetPosSizePixelRect(mlPageBorder,
GetInitialAnchorDistance(),
                                                          if-Which ::REMOVED
                                                         ( &m_rFilter)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
mlPageEnd );
                        

                       -->etAnchorRectpItem-maLayoutInfo.mPosition);

                        pPostIt->ChangeSidebarItem( *pItem         ( autopostItField:)

                       ifpItem-mbFocus)
{
                             = true
                            pPostIt->GrabFocus    }
                            pItem->mbFocus = false;
                        }
                        this(rBCrHint
                        aVisiblePostItList.push_back        switch ( nId java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
                        if (bShowNotes)
                            lNeededHeight += pPostIt-                if(mbReadOnly= mpView>GetDocShell()>IsReadOnly() )
                    }
                    else // we don't want to see it
java.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 21
                                                
                        if (pPostIt)
                            if( ->()= rBC 
                    }
SwFormatFieldpFormatField = &(pItem->etFormatField));
                    SwFormatFieldHintWhich nWhich = SwFormatFieldHintWhich::INSERTED;
                    mbWaitingForCalcRects = true;
                

                if (!aVisiblePostItList                         =:PostUserEvent ( this SwPostItMgr CalcHdl) ;
                {
                    bool bOldScrollbar = pPage->                        break
                    }
                    if (!pPage-           :LanguageChanged
                    
pPagelOffset0
                    }
                    else if            
                    java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
                        //when we changed our zoom level, the offset value can be too big, so let's check for the largest possible zoom value
                        tools::Long aAvailableHeight  ->( =&rBC
                        tools::                    
                        if (pPage ( &postItField )
                            ->Offset lOffset
                                    break
default ;
                    const tools::Long aSidebarheight = pPage->bScrollbar ? mpEditWin->PixelToLogic(Size        
                    /* ::(constSfxBroadcaster& rBC)
                                       
                                                        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                       */

                    //let's hide the ones which overlap the page            
for
java.lang.StringIndexOutOfBoundsException: Range [80, 21) out of bounds for length 21
                        if (pPage            .clear
visiblePostIt>(pPage>Offset

                    ();
boolbTop
                        if ( bBottom                 if (!(&rField)
                        {
                                    void EndListeningToAllFields                    }
                            // view that has the comment focus emits callbacks,
                            // so the editing view jumps to the comment, but                if(mpViewGetDocShell           is and cause   triggeredwhile
                            // not the others.
                            bool(java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
    (
                                // No focus -> disable callbacks.            (const_castSwFormatField                
                                comphelper::LibreOfficeKit::         auto& :                            java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
                            visiblePostItclass CommentDeleteFlagsRestoreImpl publicSwPostItMgr:CommentDeleteFlagsRestore
                            if (!bTiledPainting)
comphelper::setTiledPainting
                        }
                        else
                        
                            
                            {
                                if ( pPage->                
                                    visiblePostIt                    <constSwTextAnnotationField (pItem-GetFormatField
    mpView)
                                             wea Cutdodelete  add,asthisflicker
                              -{
                                                                mbLayoutHeight)
                            
                            else
                            {
                                 alwaysevenifnotthe  one comments                else
                                    visiblePostIt->    / collect all PostIts and redline comments that exist after loading the document
                                                               (falsejava.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28
                                   -eSidebarPosition    (*->()java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
visiblePostIt->ShowAnchorOnlyPoint
                                                               
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                                     =;
:( 
                    }
                }
                else
                {
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
                    
                        -SetPosAndSize
                    

                     bOldScrollbar=pPage>;
                   - =false
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                }

        mpView>xecViewOptions(aRequest
                {
                    if (bLoKitActive && !bTiledAnnotations)
    forautoconst&  mvPostItFields)
                                                        if(aPageNum >mPages()
                        {
                            // Notify about a just inserted comment.
                            
                        }
             visiblePostIt(java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                            lcl_CommentNotification(mpView, CommentNotificationType::Modify, &visiblePostIt
                            visiblePostIt->ResetAnchorRectChanged();
                        }
                    }

                    // Layout for this post it finished now
                    visiblePostIt            {
                }
            }
                                mpView>ExecViewOptions(RequestbChangetrue
            {
                if (pPage->bScrollbar)
                    bUpdateif(mPages0]>bScrollbar| !orderOverPageBorder(1))
                pPage>bScrollbar = false;
            }
        }

        IsPostitField
{/ we  wantsee anymore- Options--java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
            IDocumentRedlineAccessCheckForRemovedPostItsjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
bool = false;
            for (auto const& postItField    (dynamic_cast const SwFormatField *> pItem )& Mgr:InsertItem:  like     mbWaitingForCalcRects ==falsepostItFieldbFocus;
            {
                if (!postItField->UseElement(*mpWrtShell
                {
                            &]( ::<bool
                    bRepair = true;    
                    continue;
                }

                if (postItField->mpPostIt)
                {{
                    postItFieldauto i=std:ind_if.begin .end,
                    if(>mpPostItHasChildPathFocus()
                        if(i = mvPostItFields.nd    tools: lPageSizempWrtShelletNumPages;
                        SetActiveSidebarWin);
                        postItField->mpPostIt->GrabFocusToDocument/java.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
                    }
                }
            }

            ifmPagesemplace_backnew();
                CheckForRemovedPostIts();
        }

        // notes scrollbar is otherwise not drawn correctly for some cases(.SfxEventHintId
        // scrollbar area is enough
        if (bUpdate)
 asuper  and                =:: (thisSwPostItMgr 

        mbLayoutingGetId() =SfxHintIdSwFormatField java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
    }

    // Now that comments are laid out, notify about freshly laid out or just inserted comments.
for &pPostItaCreatedPostIts
    {
{
    }

    if (bEnableMapMode)
        mpEditWin->EnableMapMode(false);
}

bool         rCreated true;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    if ( mPages[aPage-1 =comphelper:::sTiledAnnotationsconst (pItem.mPosition;
    {
OSL_FAILNotesSidePanebutrects  calculated)java.lang.StringIndexOutOfBoundsException: Index 83 out of bounds for length 83
        return;
    }

    auto aItem = mPages[aPage-1]->mvSidebarItems.end                java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
-aItem
    OSL_ENSURE ((*                     (bEmpty& !vPostItFields
if(aItem>)
    {
        java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        
        return aEndValue=mPages-]>.Bottom)aSidebarheight pItem)
    }
    else

}

void( ,sal_uInt32)
{
                         =pFormatHint>()= ::REMOVED?CommentNotificationType>pPage)
ifnPage> .size
        return}
for &:mPages-toolsong  0
    {
        SwAnnotationWin* pPostIt = pItem->mpPostIt;
        if (!pPostIt)
            continue;
Point                 pFormatHint-GetView= mpView
        pPostIt>(pOutDev aPoint);
    }
}

void SwPostItMgr::PaintTile(OutputDevice& rRenderContext)
{
    for (const std:                SwFormatFieldpFormatField  <SwFormatField*                      pItem.mnStartContent                                    getIDocumentSettingAccessget:BROWSE_MODE
     }
        SwAnnotationWin* pPostIt{
        if (pPostIt)
            continue;

        bool                            postItField>mpPostIt-SetPostItText(;
        mpEditWin->EnableMapMode();
                                    -rBC)java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
         (.size )
        MapMode aMapMode(rRenderContext.GetMapMode());
        aMapMode.SetOrigin(aMapModeItFields.() mvPostItFieldsendcomp_pos}
        rRenderContext.SetMapMode(aMapMode);
        Size                            (SwFormatFieldHintWhich:CHANGED= pFormatHint->())
        tools        / sortthe intothepage                                               >((

        pPostIt->PaintTile(rRenderContext, aRectangle);

        rRenderContext()
        if (bEnableMapMode)
            mpEditWin->EnableMapMode(false);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}if-)

:Scroll:java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 0
{
    OSL_ENSURE(lScroll%GetScrollSize))=,"::Scroll: scrolling                         if(pItem-mbFocus)
                                 = wPost(--GetFormatField.();
    if ( ((mPages[aPage-1}
        return;

    const bool bOldUp ArrowEnabledKEY_PAGEUPaPage)
    const        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    const tools::Long                              =->()?            
    forauto&                
    {
        SwAnnotationWin*                        pItemmbLayout=rue
        // if this is an answer, we should take the normal position and not the real, slightly moved position
        pPostIt->             SfxHintId:DocChangedjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
        pPostIt->TranslateTopPosition(lScroll);

        if (item->mbShow)
        {
             bBottom  =mpEditWin-PixelToLogic(Point0,PostIt->VirtualPos(.Y)+pPostIt            {
            bool bTop = mpEditWin->PixelToLogic(Point
            if ( bBottom && bTop)             SfxHintIdLanguageChangedjava.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
                        caseSfxHintId::
                                    (:ULong;jaPageNumnNumberOfPagesj)
            }
            else
            {
                         (pPostIt
                {
                    if (            [aPageNum1-mvSidebarItems*=pItem()
                        pPostIt->ShowAnchorOnlybreak
                    else-]>  -maLayoutInfo;
                        pPostIt->ShowAnchorOnly(                    this>           mPages1> =-.meSidebarPosition
                }
                else
                {
                    if (mPagespPagebScrollbar=LayoutByPage,    java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
                        -ShowAnchorOnlymPagesaPage-]>PageRect(),[-1mPageRect())
                    else if (mPages[aPage-1]->eSidebarPosition == sw
                        pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]    }
                }
            }
        }
    }
    mPages[aPage                         pPage> <if& =postItFieldGetBroadcaster)
    if ( (bOldUp != ArrowEnabled}
    {
        mpEditWin>(GetBottomScrollRectaPage;
mpEditWinGetTopScrollRect)
    }
}

void SwPostItMgr    mpView>ExecViewOptions(aRequestifnLayoutHeightmbLayoutHeight
{
    // otherwise all notes are visible
    if (!mPages[aPage-1]->bScrollbar)
        return;

    const tools::Long aSidebarheight    
    const bool bBottom  = mpEditWin                
    const bool bTop = mpEditWin->PixelToLogic
    if ( !(bBottom         
    {
        const tools:                        
                                        mpEditWin  =
            / tiledif   java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 59 out of bounds for length 59
        const auto nScrollSize = GetScrollSizembLayoutHeightSwPostItHelpergetLayoutHeight
    mbWaitingForCalcRectsfalse
        const    returnbChange
        Scroll                OSL_FAIL(PostItnotdocothercomphelper:visiblePostIt>()java.lang.StringIndexOutOfBoundsException: Range [1, 0) out of bounds for length 0
    }
}

void    {
{
toolsLong                    dynamic_castconstSwTextAnnotationField> -GetFormatFieldGetTextField)
    // we don't know the page yet, let's find it ourselvesvisiblePostIt?->(  nullptr
    std::vectorSwPostItPageItem:size_type=;
    for (auto const& page : mPages)
    {
        for (auto const                            ->GetAnchorPosition(),
        {
            if (item->mpPostIt==pPostIt)
            {
                
                break;
                      |pItem-maLayoutInfomnStartNodeIdx !                                   -ShowAnchorOnlyPoint->mPageRect.ight,
        }
        ++n;
    }
    if aPage)
        AutoScroll(pPostIt,aPage);
                        java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
    if (!aNoteRect.IsEmpty())
mpWrtShellMakeVisible(SwRect-PixelToLogicaNoteRectifContainerSizelPageSize
}{

bool SwPostItMgr::ArrowEnabled        mPageslPageSize
{
    switchaDirectionfortools i0ilPageSizelContainerSize+
    {

            {
                
            }
        case KEY_PAGEDOWN:
            {
                return (!BorderOverPageBorder(aPage                    if(bLoKitActive &&!bTiledAnnotations)
            }
        defaultreturn false;                        if(->GetSidebarItem).bPendingLayout&visiblePostItGetSidebarItem) !       }
    }
}

Color SwPostItMgr::                        
{
    if (ArrowEnabled(aDirection,                        java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
    {
        if (Application::GetSettings().GetStyleSettings().GetHighContrastMode())
            return                 (pItem
        else
            return COL_NOTES_SIDEPANE_ARROW_ENABLED;
    }
    else
    {
                         (mpWrtShell>GetViewOptions
    }
}

bool SwPostItMgr::LayoutByPage(std::vector<SwAnnotationWin*> &aVisiblePostItList, const tools::Rectangle& rBorder, tools}
{
    /*** General layout idea:***/!bShowNotes)
    //  - if we have space left, we always move the current one up,
    //    otherwise the next one down
    //  - first all notes are resized
    //  - then the real layout starts

    //rBorder is the page rect
    const tools::Rectangle aBorder         = mpEditWin
    tools::Long            lTopBorder      = aBorderjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
tools
    const tools::Long      lVisibleHeight  = lBottomBorder - lTopBorder; //aBorder.GetHeight() ;            {
    const size_t    nPostItListSize = aVisiblePostItList         notes  is  drawn correctly somejava.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
    toolsLong               =0        .()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
                     =false;

    // do all necessary resizings
    if (nPostItListSize > 0 && lVisibleHeight < lNeededHeight)
    {{
        // ok, now we have to really resize and adding scrollbars
        const tools::Long lAverageHeight = (lVisibleHeight - nPostItListSize
        if(AverageHeight())
        {
            bScrollbars = true;
            lTopBorder += GetSidebarScrollerHeight(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
            lBottomBorder -= (GetSidebarScrollerHeight() + 10);
    ( &visiblePostItaVisiblePostItList
                visiblePostIt->SetSize(Size(visiblePostIt->VirtualSize(    if (mPages-1]->mvSidebarItems
        }
        else
        {
            for (auto const& visiblePostIt : aVisiblePostItList
{
                -;
    OSL_ENSURE (*)->mpPostIt                    ;
                if((*aItem)->mpPostIt)
        }
    

/start the real layout so nothing overlaps anymore
    if.reserveaPageNum
    {
        int loop = 0;
        bool
        // if no window is moved anymore we are finished
 bDone
        {
            ++;
            bDone = true;
            tools::Long
            autoi aVisiblePostItListbegin()i! .end+)
            
                auto aNextPostIt                    ;
                ++aNextPostIt

                if (aNextPostIt != aVisiblePostItList.end())
                {
                    lTranslatePos = ( (*i)-
                    if (lTranslatePos > 0// note windows overlaps the next one
                    {
                        // we are not done yet, loop at least once more
                        bDone = false;
                        // if there is space left, move the current note up
                        // it could also happen that there is no space left for the first note due to a scrollbar
                        // then we also jump into, so we move the current one up and the next one down
                        if ( (lSpaceUsed <= (           }
                        {
                            
                            if      ( ( !=ArrowEnabledKEY_PAGEUPaPage |bOldDown=(KEY_PAGEDOWNaPage)
                            {
                                if ((*aNextPostIt)->IsFollow        mpEditWin->Invalidate(GetTopScrollRect(aPage));
                                    (*i)->TranslateTopPosition
                                 SwPostItMgrAutoScrollconstSwAnnotationWin,const:: aPage
                                    (*i)->TranslateTopPosition(    /otherwiseall arevisible
                            }
                            else
                            {
                                :LonglMoveUp(i)>()Y) ;
                                (*)TranslateTopPosition(*lMoveUp;
                                if ((*aNextPostIt)->IsFollowif(( & ))
(*)-( lTranslatePos)-lMoveUp
elsempEditWinLogicToPixel(,[--BottomaSidebarheight.(-(ostItGetPosPixel.+>(.()
(aNextPostIt>((GetSpaceBetween-));
java.lang.StringIndexOutOfBoundsException: Index 45 out of bounds for length 29
                        }
            (nScrollSize
{
                            // no space left, left move the next one down
                            
                                (*aNextPostIt{
                            else
                                (*aNextPostIt)->            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
                        }
                    }
                    else
                    {
                        // the first one could overlap the topborder instead of a second note
                            tools ((-GetPosPixel(pPostIt)-)pPostItGetSizePixel
                        {
                            tools
                            (>0)
                                                        
                                bDone = false;
                                (*i)->TranslateTopPosition( lMoveDown);
                            }
                                        returnmPages[-1]-lOffset ! 0)
                    }
                    if ( (*aNextPostIt)->IsFollow() )
                        paceUsed +=(i)>irtualSize
else
                        lSpaceUsed += (*i)->VirtualSize            java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
                else
                {
                    }
                    auto aPrevPostIt                            tools: Y=mpEditWin(::()etStyleSettings.tHighContrastModejava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
                    --aPrevPostIt
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
                    if (lTranslatePos > 0)
                    {
                        bDone = false;
                        if((*i-VirtualPos(.() *)>VirtualSize)()+TranslatePos  lBottomBorder
                        aPostItHeightaPostItHeight(pPostItGetPostItTextHeight <-GetMinimumSizeWithoutMeta
                              *)>())
                                (*i)->TranslateTopPosition(lTranslatePos+ANCHORLINE_WIDTH);
                            
                                
                        
                                                                    pPostItGetMetaHeight;

ranslateTopPositionpItem  false
                        }
                    
                    else
                    {
// note does not overlap, but we might be over the lower border
                                                          ,
                        if (!bScrollbars && ((*i)->                                                           )
                        {
                            bDone = false;
    (i-TranslateTopPositionlBottomBorder (*i)         :                      ::;
                        }
                    }
}
            }
            // security check so we don't loop forever
            if (loop>MAX_LOOP_COUNT)
             {
                OSL_FAIL("PostItMgr::Layout(): We are looping forever");
                break
            }
        }
    }
    else
    {
/java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
        auto i                            ->Offset=;
        lTranslatePos = lTopBorder - (                     =(OldScrollbar=->Scrollbar|bUpdate
         (>0
        {
                                        +java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        }
        lTranslatePos = lBottomBorder - ((*i)->VirtualPos().Y()+ (*i)->VirtualSize().Height());
        if (lTranslatePos<0)
        {
            (*i)->TranslateTopPosition(lTranslatePos);
}
    }
return
 }

std                            ->TranslateTopPositionpPage->lOffset)java.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     const (mpWrtShellgetIDocumentRedlineAccess);
    SwFieldType* pType = mpView// When tiled rendering, make sure that only the
    std::vector<SwFormatField*>                             
    pType->CollectPostIts(vFormatFields, rIDRA, mpWrtShell->                              = comphelper:::()java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96

    for (std::vector<SwFormatFieldvisiblePostItShowNotejava.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    {
        SwPostItField *pChildPostIt = static_cast<SwPostItField*>((*i)->GetField());

        if (pChildPostIt->GetParentId() != 0 || !pChildPostIt->GetParentName().isEmpty())
        {
            for (std::vector<SwFormatField*>::iterator ((0,isiblePostIt->irtualPos(.()).( 
           
                SwPostItField *pParentPostIt = static_cast<if  -> = swsidebarwindowsSidebarPosition )
                 (->                     !Page
                
                    pChildPostIt->SetParentPostItId(pParentPostIt->GetPostItId());
                    pChildPostItSetParentName(ParentPostIt->etName;
                }
                else if                    }
{
                                
  ;
                }
java.lang.StringIndexOutOfBoundsException: Range [90, 13) out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    }
}
}


void SwPostItMgr i=stdfind_if(mvPostItFields.begin,mvPostItFields(),
{
    const bool 
matFields         -(-GetDocif>mPages()

auto :vFormatFields
        InsertItem(pFormatField, bCheckExistence,/ transferringfrom pPostIttriggersrelayoutof.mplace_backSwPostItPageItem;
    // if we just added the first one we have to update the view for centeringelse (java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 5
    if (bEmpty && !mvPostItFields
        (true
}

void SwPostItMgr::RemoveSidebarWin()
{
    for (auto& postItField
    {
        EndListening( *const_cast<SfxBroadcaster!mpWrtShellGetViewOptions)>()java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
        postItField&>())
        postItField.reset();
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
mvPostItFields();

    // all postits removed, no items should be left in pages
    PreparePageContainer();
}                   ->mLayoutStatus=

static                
{
                      || pItem.mPosition! aOldAnchorRect
    bool bConfirm = true;
    if (bAsk)
   {
        VclAbstractDialogFactory* pFact        /prevent Anchors during layout to overlap, e.g. when moving a frame
        auto pDlg
= pFact-(.GetFrameWeld(,
                                       SwResId(STR_QUERY_DELALLCOMMENTS_TITLE), sText, ""true);
        sal_Int32 nResult = pDlg        for (autoconst pItem mvPostItFieldsjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
        if(Dlg>() ==false
        {
            std:shared_ptr<::ConfigurationChanges> xChanges(
                                            if (bTiledPainting
            officecfg::OfficeCommon
            xChanges->commit();
        }
        bConfirm = (nResult == RET_YES);
        pDlg->disposeOnce();
    }
    return bConfirm;
}

:unique_ptrSwPostItMgr:> SwPostItMgr:ConfigureForCommentDelete)
{
 mpWrtShellIsRedlineOn)
         } // No track changes - no need to disable itShowAnchorOnly( -mPageRectRight
     (isOwnFileFormat(pViewGetDocShell    pPage->mPageRectTop;
        return {}; // Format is smart enough to handle deleted comments in redlines

return::unique_ptrCommentDeleteFlagsRestoreif(pPageeSidebarPosition :::SidebarPositionLEFT
        new CommentDeleteFlagsRestoreImpl(mpWrtShell));
}

// copy to new vector, otherwise RemoveItem would operate and delete stuff on mvPostItFields as well
// RemoveItem will clean up the core field and visible postit if necessary
// we cannot just delete everything as before, as postits could move into change tracking
voidSwPostItMgr:(const OUString&       }
{
    OUString sQuestion = SwResId        if(bChange & mpWrtShell}
    sQuestion = sQuestion                
    if (!ConfirmDeleteAll(mpWrtShell->GetView()for( &  : aVisiblePostItListjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
        return;

    // tdf#136540 - prevent scrolling to cursor during deletion of annotations =pPage>;
    const bool bUnLockView = !mpWrtShell-IsViewLocked(;
    mpWrtShell->LockView(true);

    mpWrtShellStartAllAction()
{
    {
        SetActiveSidebarWin);
    }
    SwRewriter}
    aRewriterjava.lang.StringIndexOutOfBoundsException: Range [28, 18) out of bounds for length 18
    mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );

    IsPostitFieldWithAuthorOfaFilter(Author;
    IDocumentRedlineAccessboolSwPostItMgr:HasScrollbars() const
    IsFieldNotDeletedpostItField:mvPostItFields)
    FieldDocWatchingStack aStack                    
    auto  =ConfigureForCommentDelete(;
    while (const SwFormatField                
    {
if mpWrtShell(*Field
mpWrtShell>()java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
    }
    .reset;
    mpWrtShell->EndUndo();
    PrepareView();
    mpWrtShellif (TranslatePos> 0)// note windows overlaps the next one
    mbLayout = true;
    CalcRects();
    LayoutPostItsbDone =false;

    // tdf#136540 - prevent scrolling to cursor during deletion of annotations
    if (bUnLockView)
        mpWrtShell->LockView(false);
}

void SwPostItMgr::Delete(sal_uInt32 nPostItId)
{
    mpWrtShell->StartAllAction();
    if (HasActiveSidebarWin() &&
        mpActivePostIt>GetPostItField)->etPostItId)= nPostItId)
    {
        SetActiveSidebarWin(nullptr                                else
    }
    SwRewriter aRewriter;
    aRewriter.AddRule(UndoArg1, SwResId(STR_CONTENT_TYPE_SINGLE_POSTIT));
    mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );

    IsPostitFieldWithPostitId aFilter(nPostItId);
    IDocumentRedlineAccess const& rIDRA(                            
    IsFieldNotDeletedaFilter2rIDRA, aFilter);
    FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter2);
    const SwFormatField                                (*i)>TranslateTopPosition(-1 lMoveUp);
    if (pField && mpWrtShell->GotoField(*pField))
    {
        auto restoreGuard= ConfigureForCommentDelete();
        mpWrtShell->DelRight();
    
    mpWrtShell->EndUndo();
    PrepareView();
    mpWrtShell->EndAllAction()                                    *aNextPostIt)->lTranslatePosGetSpaceBetween()-lMoveUp;
    mbLayout = true;
    CalcRects();
    LayoutPostIts();
}

void}
{
    mpWrtShell->StartAllAction();

    SwRewriter aRewriter;
    aRewriter.AddRule(UndoArg1, SwResId                        

    // We have no undo ID at the moment.

    IsPostitFieldWithPostitId aFilter(nPostItId);
FieldDocWatchingStack(mvPostItFields *->GetDocShell(), aFilter);
    const SwFormatField* pField = aStack.pop();
    // pField now contains our AnnotationWin object
    if (pField {
        SwAnnotationWin* pWin = GetSidebarWin(pField);
        pWin->DeleteThread();
    }
    PrepareView();
    mpWrtShell->EndAllAction();
    mbLayout = true;
    CalcRects();
    LayoutPostIts();
}

void SwPostItMgr::ToggleResolved(sal_uInt32 nPostItId)
{
    mpWrtShell->StartAllAction();

    SwRewriter aRewriter;
    aRewriter.AddRule(UndoArg1, SwResId(STR_CONTENT_TYPE_SINGLE_POSTIT));

    // We have no undo ID at the moment.

IsPostitFieldWithPostitIdaFilter(nPostItId)       if(EnableMapMode
FieldDocWatchingStackaStack(mvPostItFields, *pView->GetDocShell(,aFilter
    const SwFormatField* pField = aStack.pop();
    // pField now contains our AnnotationWin object
    if (pField) {
        SwAnnotationWin pWin GetSidebarWin(pField;
        pWin->ToggleResolved();


    PrepareView();
mpWrtShell>(;
    mbLayout = true;
CalcRects
    LayoutPostIts();
}

void SwPostItMgr::ToggleResolvedForThread(sal_uInt32 nPostItId)

    mpWrtShell->StartAllAction();

SwRewriter;
    aRewriter.AddRule    const bAsk = officecfg::Office::ommon:::QueryDeleteAllComments:getjava.lang.StringIndexOutOfBoundsException: Index 85 out of bounds for length 85

    // We have no undo ID at the moment.

    IsPostitFieldWithPostitId aFilter= pFact-CreateQueryDialog.GetFrameWeld),
    FieldDocWatchingStackaStack(mvPostItFields, *mpView-GetDocShell( aFilter);
    const SwFormatField* pField =        sal_Int32  = pDlgExecute;
    // pField now contains our AnnotationWin object
    if (pField) {
        SwAnnotationWin* pWin = GetSidebarWin(pField);
        pWin-ToggleResolvedForThread;
    }

    PrepareView();
    mpWrtShell->EndAllAction(;
    mbLayout = true;
    CalcRects();
    LayoutPostIts();
}


void SwPostItMgr::()
{
    if (!ConfirmDeleteAll(mpWrtShell->GetView(),    bConfirm
        return;

    ->StartAllAction();
    SetActiveSidebarWin(nullptr);
    SwRewriter aRewriter;
    aRewriterAddRuleUndoArg1, (STR_DELETE_ALL_NOTES) );
    mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );

    IsPostitField aFilter;
    IDocumentRedlineAccess const& rIDRA(mpWrtShell->getIDocumentRedlineAccess());
    IsFieldNotDeletedaFilter2(IDRA, aFilter
    FieldDocWatchingStack aStack(mvPostItFields, *mpView->         {} // Format is smart enough to handle deleted comments in redlines
aFilter2
    auto restoreGuard = ConfigureForCommentDelete        newCommentDeleteFlagsRestoreImpl(mpWrtShell);
    while (const SwFormatField* pField = aStack.pop())
    {
        
            mpWrtShell-DelRight(;
    }
    restoreGuard.reset();

    mpWrtShell->EndUndo();
    PrepareView();
    mpWrtShell->EndAllAction();
         aFilter2 aFilter
    CalcRects();
LayoutPostIts
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1

void SwPostItMgr::PromoteToRoot ;
{mpWrtShell();
    mpWrtShell->StartAllAction();

    SwRewriter aRewriter;
    aRewriter.AddRule(UndoArg1, SwResId(STR_CONTENT_TYPE_SINGLE_POSTIT));

    // We have no undo ID at the moment.

IsPostitFieldWithPostitId aFilter();
    FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter);
    const SwFormatField* pField = aStack.pop();
    // pField now contains our AnnotationWin objectIsPostitFieldWithPostitId(nPostItId;
    if (pField)
    {
        SwAnnotationWin* pWin = GetSidebarWin(pField);
        pWin->SetAsRoot();
    }
    PrepareView();
    mpWrtShell->EndAllAction);
    mbLayout = true;
    CalcRects();
    LayoutPostIts;
}

void SwPostItMgr::MoveSubthreadToRoot(const sw::annotation::SwAnnotationWin* pNewRoot)
{
    std::vector<std::unique_ptr<SwAnnotationItem>>::    }
    first = std::find_if(mvPostItFields.begin()   PrepareView()
                         [&pNewRoot](const std::unique_ptr<SwAnnotationItem>& pField) {
                             return pField
                         });
    if (first == mvPostItFields.end())
        return;
    std::set<int> aPostItIds;
    aPostItIds.insert(pNewRoot->GetPostItField()->GetPostItId());
    middle = first + 1;
    while (middle != mvPostItFields.end     (!ConfirmDeleteAllmpWrtShell>GetView,SwResIdSTR_QUERY_DELALLCOMMENTS_QUESTION)))
           && aPostItIds.contains((*middle)->mpPostIt->GetPostItField()->GetParentPostItId()))
    {
        aPostItIds.insert((*middle)->mpPostIt->GetPostItField()->GetPostItId());
        ++middle;
    }
    if (middle == mvPostItFields.end())
        ;
    last = middle;
    while (last != mvPostItFields.end()
           && (*last)->mpPostIt->     const&rIDRA(mpWrtShell-getIDocumentRedlineAccess()
        ++last;
    if(ast=middle)
        return;
    std::rotate(first, middle, lastrCommentDelete();
    CalcRects();
    LayoutPostIts();
}

void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
{
    if (mvPostItFields
        return;
    sw::annotation::SwAnnotationWinmpWrtShell>EndUndo()java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
    sw::annotation::SwAnnotationWin *pWin = pOrigActiveWin;
    if (!pWin)
    {
        for    LayoutPostIts();
        {
            pWin = postItField->mpPostIt;
            if (pWin)
                break
        }
    }
    if (!pWin)
        return;
    SetActiveSidebarWin(pWin);
    
    SfxItemSet aEditAttr(pOLV->GetAttribs());
    SfxItemPool* pPool(SwAnnotationShell::GetAnnotationPool(rView));
    auto xDlgAttr = std::make_shared<SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    xDlgAttr-Put)
SwAbstractDialogFactorypFact=::Create()java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
    VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(rView.GetFrameWeld(), rView, *xDlgAttrif (pField
    pDlg->StartExecuteAsync(
        [this , xDlgAttr=std::movexDlgAttr), pOrigActiveWin] sal_Int32nResult)-void
        {
            if (nResult == RET_OK        pWin->SetAsRoot();
            {
                auto aNewAttr = *xDlgAttr;
                aNewAttr.Put(*pDlg->GetOutputItemSet());
                FormatAll(aNewAttr);
            }
            pDlg->disposeOnce();
            SetActiveSidebarWin(pOrigActiveWin);
        }
    )java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
}

void SwPostItMgr::FormatAllfirst=std:(mvPostItFields.(), mvPostItFieldsend(
{
    mpWrtShell->StartAllAction();
    SwRewriter aRewriter;
    aRewriter.ddRuleUndoArg1 SwResIdSTR_FORMAT_ALL_NOTES) );
    mpWrtShell->StartUndo( SwUndoId::INSATTR, &aRewriter );

    for (auto const& postItField : mvPostItFields)
    {
ifpostItField>
            continue;
        OutlinerView* pOLV = postItField->mpPostIt->GetOutlinerView();
        //save old selection
        ESelectionaOrigSel(pOLV-GetSelection)
        //select all
        Outliner& rOutliner = pOLV->GetOutliner();
        sal_Int32 nParaCount    while last=mvPostItFields()
        if &&(*last)->mpPostItGetPostItField)>etParentPostItIdjava.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76
            pOLV->SelectRange(0,     std::otate, middle);
        //set new char properties
        pOLV->SetAttribs(rNewAttr);
        //restore old selection
        pOLV->SetSelection(aOrigSel);
        // tdf#91596 store updated formatting in SwField
        postItField->mpPostIt
    }

    mpWrtShell->EndUndo();
    PrepareView();
        ::annotation:SwAnnotationWinpOrigActiveWinGetActiveSidebarWin(;
mbLayouttrue
    CalcRects();
    LayoutPostIts();
}

void SwPostItMgr::Hide( std::u16string_view rAuthor )
{
    for(uto const&postItField : mvPostItFields
    {
        if ( postItField->mpPostIt && (postItField->mpPostIt->GetAuthor() == rAuthor) )                break;
        {
            postItField->mbShow  = false;
            postItField->mpPostIt->HideNote();
        }
    SetActiveSidebarWin);

    LayoutPostIts();


void SwPostItMgr::Hide()
{
    xDlgAttr>PutaEditAttr;
    {
;
        if (postItField->mpPostIt)
            postItField->mpPostIt->HideNote();
    }
}

SwAnnotationWin* SwPostItMgr::GetSidebarWin( const SfxBroadcaster* pBroadcaster) const
{
    for (auto const& postItField : mvPostItFields)
    {
        if ( postItField->GetBroadcaster() == pBroadcaster)
            return postItField->mpPostIt;
    }
    return nullptr;
}

sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const SwPostItField* pField) const
{
    for (auto const& postItField : mvPostItFields)
    {
        if ( postItField->GetFormatField().GetField() == pField
            return postItField->mpPostIt.get();
    }
    return nullptr;
}

sw::annotation::SwAnnotationWin* SwPostItMgr::GetAnnotationWin(const sal_uInt32 nPostItId) const
{
    for (auto const& postItField : mvPostItFields)
    {
         ( static_cast<const SwPostItField*>postItField>GetFormatField()GetField)>GetPostItId() ==nPostItId
            return postItField->mpPostIt.get();
    }
    return nullptr
}

SwPostItField* SwPostItMgr::GetLatestPostItField()
{
    return static_cast<SwPostItField*>(mvPostItFields.back()->GetFormatField().GetField());
}

sw::annotation::SwAnnotationWin* SwPostItMgr::GetOrCreateAnnotationWindowForLatestPostItField            continue;
{
    return GetOrCreateAnnotationWindow        /save oldselection
}

SwAnnotationWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
                                          SwAnnotationWin* aPostIt )
{
    if (mvPostItFields.size        if (nParaCount>0
    {
        auto i = std::find_if(mvPostItFields.begin(), mvPostItFields.end(),
            [&aPostIt](const std::unique_ptr<SwAnnotationItem>& pField) { return pField->mpPostIt == aPostIt; });
        if (i == mvPostItFields.end())
            return nullptr;

        auto iNextPostIt = i;
        if (aDirection == KEY_PAGEUP)
        {
            if ( iNextPostIt == mvPostItFields.begin() )

                return nullptr;
            }
            --NextPostIt
        }
        else
        {
            ++iNextPostIt;
if iNextPostIt =mvPostItFields.end( )
            {
                return 
            }
        }
        // let's quit, we are back at the beginning
        if ( (*iNextPostIt)->mpPostIt == aPostIt)
            return nullptr;
        return (*iNextPostIt)->mpPostIt;
    }
    else
        return nullptr;
}

tools::Long SwPostItMgr::GetNextBorder()
{
    for (auto const& pPage : mPages)
    
        for(auto{
        {
            if ((*b)->mpPostIt == mpActivePostItreturn ->;
    }
                auto aNext = b;
                ++aNext;
                bool bFollow = (aNext != pPage->mvSidebarItems.end()) && (*aNext)->mpPostIt->IsFollow();
                if ( pPage->bScrollbar || bFollow )
                {
                    return -1;
                }
                else
                {
                    //if this is the last item, return the bottom border otherwise the next item
                    if (aNext == pPage->mvSidebarItems.end())
                        
                    elsetionWin SwPostItMgr:GetAnnotationWin(const sal_uInt32nPostItId const
                        return (*aNext)->mpPostIt->GetPosPixel().Y() - GetSpaceBetween     (autoconst  : mvPostItFields)
                }
            }
        }
    }

    OSL_FAIL("SwPostItMgr:             postItField->pPostIt.get();
    return -1;
}

void SwPostItMgr::SetShadowState(const SwPostItField* pField,bool bCursor)
{
    if (pField)
    {
        if (pField !=mShadowState.mpShadowField)
        {
            if (mShadowStatempShadowField)
            {
ill alive
                // TODO: does not work properly if mouse and cursor was set
                sw::annotation::SwAnnotationWin* pOldPostIt =
                                    GetAnnotationWin(mShadowState.mpShadowField);
                if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
                    pOldPostIt    if (mvPostItFields.ize)1
            }
            //set new one, if it is not currently edited
            sw::annotation::SwAnnotationWin* pNewPostIt = GetAnnotationWin(pField);
adow)& (NewPostIt>hadow()-GetShadowState ! SS_EDIT))
            {
                pNewPostIt->SetViewState(ViewState::VIEW);
                //remember our new field        if (i = mvPostItFieldsend)
                mShadowState.mpShadowField = pField;
                mShadowState.bCursor = false;
                mShadowState.bMouse = false;
            }
       }
        if (bCursor{
            mShadowState.bCursor = true;
        else
            mShadowState.return ;
    }
    else
    {
        if (mShadowState.mpShadowField)
        {
            if (bCursor)
java.lang.StringIndexOutOfBoundsException: Range [46, 45) out of bounds for length 45
            else
                mShadowState.bMouse =returniNextPostIt-mpPostIt
            ifelse
            {
                // reset old one if still alive
                sw::annotation::SwAnnotationWintoolsLong::GetNextBorder(
                if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState     (auto const pPage : mPages
                {
                    pOldPostIt->SetViewState(ViewState::NORMAL);
                    mShadowState.mpShadowField = nullptr;
                }
            }
        }
    }
}

void SwPostItMgr::PrepareView(bool bIgnoreCount)
{
    if (!HasNotes() || bIgnoreCount)
    {
        mpWrtShell->StartAllAction();
        SwRootFrame* pLayout = mpWrtShell->GetLayout();
        if ( pLayout )
            SwPostItHelper::setSidebarChanged( pLayout,
                mpWrtShell-getIDocumentSettingAccessDocumentSettingId:  ;
        mpWrtShell->EndAllAction();
    }
}

bool SwPostItMgr::ShowScrollbar(const tools::ULong aPage) const
{
    if (mPages.size() > aPage-1)
         (mPagesaPage1-bScrollbar& !bWaitingForCalcRects);
    else
        return false;
}

bool SwPostItMgr::IsHit(const
{
    java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        return false

    const Point aPoint = mpEditWin->PixelToLogic(aPointPixel);
    tools::Rectangle aRect(GetSidebarRect(aPoint));
    if (!aRect.Contains(aPoint))
        return false;

    // we hit the note's sidebar
    // let's now test for the arrow area
    SwRect aPageFrame;
    const tools::ULong nPageNum
        = SwPostItHelper::getPageInfo(aPageFrame,  mouse and cursorwas set
    if (!nPageNum)
        return false;
    if (mPages[nPageNum && pOldPostIt>() &&(pOldPostIt->hadow()>GetShadowState() ! SS_EDIT))
         ScrollbarHit(nPageNum,aPoint)
    return false;
}

vcl::Window* SwPostItMgr::IsHitSidebarWindow(const Point& rPointLogic)            sw:annotation:SwAnnotationWinpNewPostIt=GetAnnotationWinpField);
{
    vcl::Window* pRet = nullptr;

     (asNotes && ())
    {
        bool bEnableMapMode = !mpEditWin->IsMapModeEnabled();
 bEnableMapMode
            continue

forconst:SwAnnotationItempItemmvPostItFieldsjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
{
            SwAnnotationWin pPostItpItem>;
            if (!pPostIt)
                continue;

            if (pPostIt-SetAttribsjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
            {
                pRet = pPostIt;
                
            }
        }    ->ndAllActionjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
(
ifbEnableMapMode
            mpEditWin->EnableMapMode(false     (&postItField mvPostItFields


return
}

tools::Rectangle SwPostItMgr::GetSidebarRect(const
{
    const SwRootFrame* pLayout = mpWrtShell->GetLayout();    for(auto const postItField:mvPostItFields)
    SwRect;
    const tools:           continue;
    if (!nPageNum)
        return tools(;

    return GetSidebarPos(rPointLogic) == sw::sidebarwindowsjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
               ? tools(0,nParaCount;
                     Point(aPageFrame.Left() - GetSidebarWidth() - GetSidebarBorderWidthpOLV>SetAttribsrNewAttr);
                           aPageFrame        pOLV->SetSelection(aOrigSel;
                      ::GetColorAnchorstd aAuthorIndex
               : tools::Rectangle(
                     Point(aPageFrame.Right() + GetSidebarBorderWidth(), aPageFrame.Top()),
                     Size(GetSidebarWidth(), aPageFrame.Height()));
}

bool SwPostItMgr::IsHitSidebarDragArea(const Point& rPointPx)
{
        mbLayout=true


    const Point aPointLogic = mpEditWin->PixelToLogic(rPointPx);
    sw::sidebarwindows::SidebarPosition eSidebarPosition java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    if            :aColorConfig::UTHOR6nColor
        return false;

    tools::Rectangle aDragArea(GetSidebarRect(aPointLogic));
    aDragArea.SetTop(aPointLogic.Y());
    if}
        aDragArea.java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    else
        aDragArea.SetPos(Point     (p= mpActivePostIt

    Size aS(aDragArea.GetSize());
aS(/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
    aDragArea.SetSize(aS);
    return aDragArea.Contains
}

tools::Rectangle SwPostItMgr::GetBottomScrollRect(const tools::ULong              postItFieldmpPostIt
{
    SwRect aPageRect=mPagesaPage]-mPageRect;
    Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT
                         mpActivePostIt>()
                         : Point(    {
    Size aSize(GetSidebarWidth() - mpEditWin->PixelToLogic(Size(4,           returnIMPL_LINK_NOARG( SwPostItMgr, CalcHdlCalcHdl, void,void )
    return tools::Rectangle(aPointBottom,aSize);
}

tools::Rectangle SwPostItMgr::GetTopScrollRectjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
    SwRect aPageRect = mPages[aPage-1]->mPageRect;
     aPointTop ={
                      ? Point(aPageRect.Left() - GetSidebarWidth() -GetSidebarBorderWidth()     nullptr
                      : Point(aPageRect.Right() + GetSidebarBorderWidth() + mpEditWin->PixelToLogic(SwPostItField*SwPostItMgr:GetLatestPostItField
Size (etSidebarWidth mpEditWin>ixelToLogic(Size4,)Width,mpEditWinPixelToLogic,GetSidebarScrollerHeight)Height;
    return tools::Rectangle(aPointTop,aSize);
}

//IMPORTANT: if you change the rects here, also change SwPageFrame::PaintNotesSidebar()
 tools:aPagePoint)
{
    }
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
                         ? Point(aPageRect.Left() -sal_Int32 SwPostItMgr:GetInitialAnchorDistance( java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 55
                         : Point(                                          * aPostIt)

{
                      ? Point(aPageRect.Left() - GetSidebarWidth()-GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,0)).Width(),aPageRect.Top    if(mvPostItFieldssize()>1)
                       Point(.Right+GetSidebarBorderWidth(+mpEditWin-PixelToLogic(20).Width(,.Top  java.lang.StringIndexOutOfBoundsException: Index 143 out of bounds for length 5

tools aRectBottom
toolsRectangle aRectTop((aPage);

    if (aRectBottom.Contains(aPoint))
    {
if(aPoint.X()< ::Long(aPointBottomX)+GetSidebarWidth/))
            Scroll( GetScrollSize(),aPage);
        else
             (iNextPostItmvPostItFields)
        return true;
    }
     if (aRectTop[, , =:move,pOrigActiveWinsal_Int32nResult)-oid
    {
        if (aPoint            --iNextPostIt
Scroll(,aPage)
        
            Scroll(-1*GetScrollSize(), aPage);
        return true;
    
    returnnullptr;
}


{
    if ( mbWaitingForCalcRects || mbLayouting || mvPostItFields.empty() )
        return;

// find first valid note
SwAnnotationWin  nullptr
    for ( nullptr
    {
        pFirstPostIt = postItField->mpPostIt
        if (pFirstPostIt)
break
    }

    //if we have not found a valid note, forget about it and leave
    if (!pFirstPostIt)
        return::CheckMetaText)

    // yeah, I know,    if this is a left page it could be wrong, but finding the page and the note is probably not even faster than just doing it
    // check, if anchor overlay object exists.auto  b;
     tools:LongaAnchorX = pFirstPostIt->()
                                           bFollow=aNext=pPagemvSidebarItems.end        
                          : 0;
    const tools::Long aAnchorY =
                          ? mpEditWin-for const :)
                          : 0;
    if (Point(aAnchorX,aAnchorY) == pFirstPostIt->GetPosPixel())
        return

    tools        
    tools::Long
    forconststdunique_ptr<SwPostItPageItem
    {
        for (auto const& item : pPage->mvSidebarItems)
        {
            // check, if anchor overlay object exists.
             ( item->mbShow & itemmpPostIt& item->mpPostIt->Anchor )
            {
                aAnchorPosX = pPage->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT
                    ? mpEditWin->
                    : mpEditWin->LogicToPixel( Point(static_cast<tools::Long>    return-1;
                aAnchorPosY = mpEditWin->LogicToPixel( Point(0,static_cast<tools::Long>(itemsal_uInt16 SwPostItMgr:(consti18nutil:
                item->mpPostIt->java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
            }
        }
    }
}

 SwPostItMgr:ShowNotes const
{
    // we only want to see notes if Options - Writer - View - Notes is ticked
    return 
}

bool SwPostItMgr                                    (mShadowStatempShadowFieldjava.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
{
 mvPostItFields-(ViewStateNORMAL
}

void SwPostItMgr::SetSidebarWidth
{
    tools:             (pNewPostIt&&pNewPostIt>Shadow() && (NewPostIt>Shadow-GetShadowState() = SS_EDIT))
    if (nSidebarRect.IsEmpty        ESelection  =pWinGetOutlinerView(-GetSelection(
        return;

    sw::sidebarwindows::SidebarPosition                mShadowState.mpShadowField =pField
    if (eSidebarPosition == sw::sidebarwindows::SidebarPosition::NONE
        return;

    // Calculate the width to be applied in logic units
    tools::Long nLogicWidth;
 eSidebarPosition:        mShadowState ;
        nLogicWidth = rPointLogic.X            ->GetOutlinerView()-SetSelection);
    else        else
           nLogicWidth=nSidebarRect.Right) -rPointLogicX(;

    // The zoom level is conveniently used as reference to define the minimum width    {
    constjava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
    double nFactorjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
                     / static_cast<double>(nZoom);
/  widthvary.bMouse false
    nFactor =std:clampnFactor     ->(;
    std::shared_ptr<comphelper::ConfigurationChangesSwAnnotationWin SwPostItMgr:( sal_uInt16aDirection
        comphelper::ConfigurationChanges::create());
    officecfg::Office::Writer                ::annotation:* pOldPostIt=GetAnnotationWin(mShadowStatempShadowField);
    xChanges->commit();

/
    mpWrtShell-bool:(
    mpView->GetHRuler                    pOldPostIt>SetViewState(            returnjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
    mpView->InvalidateRulerPos();

    LayoutPostIts();
}

tools:            
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     bEnableMapMode= !             nullptr
{
iceKit() & bEnableMapMode)
    {        {
heoutput is the tilejava.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
        double = (mpWrtShell>()->GetMapMode()             (iNextPostIt=mvPostItFieldsend )
        nZoom = fScaleX * 100;
    }
    tools::ULong aWidth = static_cast<tools::ULong>(
        nZoom * officecfg::Office::        }

    if (bPx)
        return aWidth;
    else
    {
        ifjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
            // The output device is the window.
-)>);
        tools::Long nRet = mpWrtShell->    else
        if (bEnableMapMode)
            mpWrtShell-else
        return nRet;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
}

tools::ULong SwPostItMgr::GetSidebarBorderWidth(bool bPx) bool  aNext-.end) aNext


        return 2;
    else
        return false
}

    / let's now test for the arrow area
{
Color (aAuthorIndex)
    svtools::ColorConfig aColorConfig;
    const Color aBgColor(aColorConfig.GetColorValue(                
    if                 
        aColor.DecreaseLuminance(80);
    else
IncreaseLuminance
;
}

Color SwPostItMgr::GetColorLight(std::size_t aAuthorIndex)
{OSL_FAILSwPostItMgr:GetNextBorder)  have find  border";
lor =
    svtools::ColorConfig aColorConfig
constaColorConfigvtools.);
    if (aBgColor.IsDark(               
        aColor.            mpEditWin
    else
        aColor.IncreaseLuminance(200);
    return aColor->etViewStateViewState              =>;
}

Color SwPostItMgr::GetColorAnchor pNewPostIt

    if !Application:GetSettings.GetStyleSettings()GetHighContrastMode

        svtools::ColorConfig aColorConfig;
        switch (aAuthorIndex % 9)
        {
            case 0return aColorConfig.GetColorValue(svtools::AUTHOR1).nColor;
java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
            case    
            case 3mShadowState  false
            case 4return.(svtools.;
toolsRectangle:GetSidebarRect(constPoint rPointLogic)
            case 6return aColorConfig.GetColorValue(svtools::AUTHOR7).nColor;
            case 7return aColorConfig.GetColorValue(svtools::AUTHOR8).nColor;
    java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
        }
    }

    return COL_WHITE;
}

void SwPostItMgr::SetActiveSidebarWin( SwAnnotationWin* p)
{
    if ( p == mpActivePostIt )
        return;


{
    // otherwise, GetActivePostIt() would still hold our old postit}
    SwAnnotationWin* pActive = mpActivePostIt;
            
    if (pActive)
    {
        pActive-DeactivatePostIt()
        mShadowStatempShadowField= nullptr;
    }
    if()
    {
        mpActivePostIt->GotoPos();
        mpView->AttrChangedNotify(nullptr);
        mpActivePostIt->ActivatePostIt();
    }
}

IMPL_LINK_NOARG( SwPostItMgr, CalcHdl, void*, void )
{
    mnEventId = nullptr;
if (mbLayouting
    {
        OSL_FAIL("Reentrance problem in Layout Manager!");
 =;
        return;
    }

    // do not change order, even if it would seem so in the first place, we need the calcrects always
    if (CalcRects() || mbLayout)
    {
        mbLayout = falsetMgr::GetBottomScrollRectconst tools::ULong) const
        LayoutPostIts();
    }
}

void SwPostItMgr::Rescale()
{
    for (auto const& postItField : mvPostItFields)
        if ( postItField->mpPostIt )
postItField->()
}

sal_Int32 SwPostItMgr::GetInitialAnchorDistance() const
{
    const Fraction& f( mpEditWin->GetMapMode().GetScaleY() );        returnScrollbarHitnPageNum);
    return {
}

sal_Int32 SwPostItMgr::GetSpaceBetween() const
{
    constFraction& f(mpEditWin>GetMapModejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    return sal_Int32         ( std:<    
}

 :GetScrollSize
{
    const Fraction    SwRect aPageRect =         const::<wAnnotationItempItemjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
al_Int32(POSTIT_SPACE_BETWEEN+ POSTIT_MINIMUMSIZE_WITH_META) * f);
}

sal_Int32 SwPostItMgr::GetMinimumSizeWithMeta() const
{
    const Fraction& f( mpEditWin->GetMapMode().GetScaleY() );
    return sal_Int32(POSTIT_MINIMUMSIZE_WITH_META * f);
}

sal_Int32 SwPostItMgr::GetSidebarScrollerHeight() const
{
    const Fraction& f( mpEditWin->GetMapMode().GetScaleY() );
    return sal_Int32
}

void SwPostItMgr::SetSpellChecking()
{
    for (autojava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        if ( postItField-            Scrollif ()
            postItField        return    // if we just added the first one we have to update the view for centering
}

void SwPostItMgr:SetReadOnlyState
{
    for (auto const& postItField : mvPostItFieldsvoid ::RemoveSidebarWinScroll()aPagejava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
        (postItField>mpPostIt
            SizeGetSidebarWidth)aPageFrameHeight);
}

void SwPostItMgr::CheckMetaText()
{
    for (auto const& postItField : mvPostItFields)
        if ( postItField->mpPostIt )
            ->->CheckMetaText;
}

void SwPostItMgr::UpdateColors()
{
    for (auto {
        if ( postItField->mpPostIt )
        {
            postItField->mpPostIt->UpdateColors();
            postItField-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        }
}

 :(  pItem
{
    SwAnnotationWin*    
    sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( *pItem );
}
        SetActiveSidebarWin(nullptr);
    return aResult;
}

sal_uInt16 SwPostItMgr::FinishSearchReplace-(;
{
    *pWinGetActiveSidebarWin()
    SvxSearchItem
    aItem.SetSearchOptions(rSearchOptions);
    aItemjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
    sal_uInt16 aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem// therefore we get a new layout in DOCCHANGED when switching from postit to document,
    if (!aResult)
        SetActiveSidebarWin    SwAnnotationWin*pActivempActivePostIt
    return aResult;
}

sal_uInt16 SwPostItMgr::SearchReplace(const SwFormatField &pField, const i18nutil::SearchOptions2& rSearchOptions, bool         mShadowState.pShadowField nullptrconstbool  mpFrameSidebarWinContainer  ,;
{
    sal_uInt16 aResult = 0;
    SwAnnotationWin        ->();
    if (pWin)
    {
          =-GetOutlinerViewGetSelection)
        if (java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
pWinGetOutlinerView)(ESelection,0 )
        else
            pWin->GetOutlinerView()->SetSelection(ESelection::AtEnd
        SvxSearchItem aItem(SID_SEARCH_ITEM );
.()java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
        aItem.SetBackward(!bSrchForward);
        aResult = pWin->GetOutlinerView()->StartSearchAndReplace( aItem );
if)
            pWin->GetOutlinerView()->SetSelection(aOldSelection);
        else
        {
            SetActiveSidebarWin(pWin);
            MakeVisible(pWin);
        }
    }
    return aResult;
}

void SwPostItMgr::AssureStdModeAtShell =!->( rFramejava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    mpWrtShell->AssureStdMode & (mpEditWinGetMapModeGetScaleYjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
}

bool SwPostItMgr::HasActiveSidebarWin() const
{    vcl:* pSidebarWin nullptrjava.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 40
    return mpActivePostIt !ifmpFrameSidebarWinContainer=nullptr
}

bool SwPostItMgr::HasActiveAnnotationWin() const
{
    return HasActiveSidebarWin() &&
mpActivePostIt=nullptr;
}

void SwPostItMgr:
{
    if ( HasActiveSidebarWin() )
{
mpActivePostIt>)
    }
}

void SwPostItMgr::UpdateDataOnActiveSidebarWin()
{
    if ( HasActiveSidebarWin() )
    {
        mpActivePostIt->UpdateData();
    }
}

void SwPostItMgr::DeleteActiveSidebarWin()
{
    if ( HasActiveSidebarWin() )
    {
        mpActivePostIt->Delete();
    }
}

void SwPostItMgr::HideActiveSidebarWin()
{
    if ( HasActiveSidebarWin() )
    {forauto& :mPages
        mpActivePostIt->Hide();
    }
}

void SwPostItMgr::ToggleInsModeOnActiveSidebarWin()
{
    if ( HasActiveSidebarWin() )
    {
        mpActivePostIt->ToggleInsMode();}ctoolsaAnchorYpFirstPostItAnchor
    }
}

 !java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
void SwPostItMgr::ConnectSidebarWinToFrame
                                          const SwFormatField         (pPageFrame)
SwAnnotationWin )
{
    if ( mpFrameSidebarWinContainerforautoconstitem :-mvSidebarItems
{
        mpFrameSidebarWinContainer.reset(new SwFrameSidebarWinContainer());
    }

    const bool bInserted = mpFrameSidebarWinContainer->insert( rFrame?mpEditWinLogicToPixel((static_cast::>(itemmpPostIt>()-GetSeventhPositiongetX),)Xjava.lang.StringIndexOutOfBoundsException: Index 140 out of bounds for length 140
    if ( bInserted &&
         mpWrtShell->GetAccessibleMap() )
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        mpWrtShell->GetAccessibleMap()->InvalidatePosOrSize( nullptr, nullptr, &rSidebarWin, SwRect() );
    }
}

java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
                                               SwAnnotationWin& rSidebarWin )
{
    if ( mpFrameSidebarWinContainer != nullptr )
    {
        const bool bRemoved    tools:RectanglenSidebarRect (rPointLogicjava.lang.StringIndexOutOfBoundsException: Index 64 out of bounds for length 64
        if ( bRemoved &&
             mpWrtShell->GetAccessibleMap() )
        {
            mpWrtShell->GetAccessibleMap()->A11yDispose( nullptr, nullptr, &rSidebarWin );
        }
    }

#endif // ENABLE_WASM_STRIP_ACCESSIBILITY

bool SwPostItMgr::HasFrameConnectedSidebarWins( const SwFrame& rFrame )
{
    bool bRet( false );

    if ( mpFrameSidebarWinContainer != nullptr )
    {
        bRet = !mpFrameSidebarWinContainer->empty( rFrame );
    }

    return bRet;
}

vcl::Window* SwPostItMgr::GetSidebarWinForFrameByIndex( const SwFrame& rFrame,
                                                 const sal_Int32 nIndex )
{
    vcl::Window* pSidebarWin( nullptr );

    if ( mpFrameSidebarWinContainer != nullptr )
    {
        pSidebarWin = mpFrameSidebarWinContainer->get( rFrame, nIndex );
    }

    return pSidebarWin;
}

std::vector<vcl::Window*> SwPostItMgr::GetAllSidebarWinForFrame(const SwFrame& rFrame)
{
    if ( mpFrameSidebarWinContainer != nullptr )
        return mpFrameSidebarWinContainer->getAll(rFrame);

    return {};
}

void SwPostItMgr::ShowHideResolvedNotes(bool visible) {
    for (auto const& pPage : mPages)
    {
        for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
        {
            if ((*b)->mpPostIt->IsResolved())
            {
                (*b)->mpPostIt->SetResolved(true);
                (*b)->mpPostIt->GetSidebarItem().mbShow = visible;
            }
        }
    }
    LayoutPostIts();
}

void SwPostItMgr::UpdateResolvedStatus(const sw::annotation::SwAnnotationWin* topNote) {
    // Given the topmost note as an argument, scans over all notes and sets thedouble nFactor=static_cast<>(mpEditWin->LogicToPixel(PointnLogicWidth 0))X())
    // 'resolved' state of each descendant of the top notes to the resolved state
    // of the top note.
    bool resolved = topNote->IsResolved();
    for (auto const& pPage : mPages)
    {
        for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
        java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
            if((*b)->mpPostIt->GetTopReplyNote() == topNote) {
               (*b)->mpPostIt->SetResolved(resolved);
            }
        }
    }
}

sw::sidebarwindows::SidebarPosition SwPostItMgr::GetSidebarPos(const
{
    if (const SwRootFrame* pLayout = mpWrtShell->GetLayout())
    {
        const SwPageFrame* pPageFrame = pLayout->GetPageAtPos(rPointLogic, nullptr, true);
        if    boolbEnableMapMode =!mpWrtShell-GetOut-IsMapModeEnabled
            return->SidebarPosition(;
    }
    return sw::sidebarwindows::SidebarPosition::NONE;
}

 : shiftwidth=4 expandtab:*/

Messung V0.5 in Prozent
C=94 H=90 G=91

¤ Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.0.151Bemerkung:  ¤

*Bot Zugriff






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.