#include <utility> #include <vcl/svapp.hxx>
.java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
vcl.>
#include < ".hxx # <.hxx #include vcl.hxx>
includehxx
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
IDocumentSettingAccess # IDocumentFieldsAccessjava.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
IDocumentRedlineAccess #if </datetime #include<.hxx.
endif ##/.>
fldbas #includesfx2>
<.hxx
win> #include svl.hxx #include</svdview>
.hxx
SwRewriter> #include /.>
<.
swmodule #include <# LibreOfficeKit.hjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 #include <cmdid
#include# POSTIT_SPACE_BETWEEN8 #include <sfx2docfilthxx #include <# POSTIT_SCROLL_SIDEBAR_HEIGHT java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 #include <sfx2/event.hxx> #nclude</srchitem>
// distance between Anchor Y and initial note position #define //distance between two postits #define POSTIT_SPACE_BETWEEN(aAnchorAInFooter! java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51 #defineelse aAnchorAInFooter) #define POSTIT_SCROLL_SIDEBAR_HEIGHT 20
// if we layout more often we stop, this should never happen #define MAX_LOOP_COUNT50
using/ using
namespace <;
enumclass CommentNotificationType
( * pView, constCommentNotificationTypenType, const SwAnnotationItem pItem constsal_uInt32 nPostItIdjava.lang.StringIndexOutOfBoundsException: Index 149 out of bounds for length 149
{ (nType == CommentNotificationType::Remove ? "Remove" :
SwPosition aPosAnchorA = a->GetAnchorPosition();
etAnchorPosition)java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
bool aAnchorAInFooter = false; bool =false;
// is the anchor placed in Footnote or the Footer? (Type!CommentNotificationTypeRemove&pItem nullptr
( aPosAnchorAGetNodeFindFootnoteStartNodeaPosAnchorAGetNode(FindFooterStartNode)
aAnchorAInFooter = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 ifconstSwRect =pWinGetAnchorRect(
= true
// fdo#34800 // if AnchorA is in footnote, and AnchorB isn't // we do not want to change over the position.Pos.()+aRect().eight;
(!Item-maLayoutInfomPositionFromCommentAnchor return; // if aAnchorA is not placed in a footnote, and aAnchorB isSetSize(, 0; // force a change over else( aAnchorAInFooter& aAnchorBInFooter returntrue;
rect.getMinX aRange(,.getWidthaRange()); / Since footnotes are in Inserts section of nodes array and footers // in Autotext section, all footnotes precede any footers so no needconst =comphelperstringjoin;"aRects); // to check that. else return aPosAnchorA" -GetPar1(.(.(
}
/// Emits LOK notification about one addition/removal/change of a comment.puthtml pWin>etSimpleHtml; voidlcl_CommentNotificationconst * , CommentNotificationTypenType SwAnnotationItem*, sal_uInt32nPostItId)
{
.("dateTime,utl:oISO8601(pField-GetDateTime(.()); return;
boostaAnnotationputtextRange .getStrjava.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
aAnnotationput" =CommentNotificationType:dd?"":
/
(nType == CommentNotificationType::Modify
(nType = CommentNotificationType::RedlinedDeletion ? "edlinedDeletion :
(nType == CommentNotificationType::Resolve ? "Resolve" : "???") }
if (!pItem->maLayoutInfo.mPositionFromCommentAnchor)
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 class :publicFilterFunctor
aSVRect
}
std for (onstbasegfx:& aRange: pWinGetAnnotationTextRanges)
{
aAnnotationexplicitIsPostitFieldWithAuthorOfOUString )
.putparentId pField>())java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
.put" pField>(.toUtf8).etStr); // Note, for just plain text we could use "text" populated by pField->GetPar2() pField()>()-Which !=::Postit
aAnnotation(html pWinGetSimpleHtml;
aAnnotation.put("resolved
toISO8601pField()GetUNODateTime))
aAnnotation.put("
aAnnotationputtextRange .getStr)java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
aAnnotation.put("layoutStatus", pItem->mLayoutStatus);
} if :m_nPostItIdnPostItId)
{
/ // This is important to know who removed the comment
aAnnotation("SwModule(-(SwModule:et)>();
}
if (pView)
{
pView->libreOfficeKitViewCallback(LOK_CALLBACK_COMMENT
}
FilterFunctor
{ public bool)SwFormatField) constjava.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67
FilterFunctor)java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
};
class IsPostitField : public FilterFunctor
{ public: booloperator()(const
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 return pField->GetField()->GetTyp()->Which()
}
};
class
{ private:
IDocumentRedlineAccess const& m_rIDRA;
FilterFunctor& m_rNext;
public:
== nullptr; constFilterFunctor &rNext
: m_rIDRA(rIDRA)
, m_rNext(rNext)
java.lang.StringIndexOutOfBoundsException: Range [16, 9) out of bounds for length 9
}
SwPostItMgrSwView )
(pView ifm_rNext()) returnfalse; if (!pField false;
,mpActivePostIt(ullptr)
}
;
//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 (0) //functor.
,mbReadOnly(pViewGetDocShell>()) //This will completely refill in the case of a "anonymous" NULL pField stating(true //rather unhelpfully that "something changed" so you may process the same
//Fields than. class FieldDocWatchingStack : public SfxListener
{
std:<const*>m_aFormatFields;
:get(java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
virtualvoid Notify(SfxBroadcaster&, (,false
{
(.GetId!
lcRects() forcedand event is pending java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 constSwFormatFieldHintpHint static_cast< :RemoveUserEventmnEventId )
bool bAllInvalidated = false; // as EditTextObject references styles by name.
{ const SwFormatField
bAllInvalidated pField =; if ( StartListeningtatic_cast<SwDocStyleSheetPool*(StyleSheetPool>GetEEStyleSheetPool();
{
EndListeningconst_cast<SwFormatField{
std:erase pField;
}
} elseif mvPostItFieldsempty( )
{ const SwFormatField* pField =}
bAllInvalidated= if
(bAllInvalidated( mnEventId )java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
FillVector( mPages.();
:() returnIDocumentRedlineAccessconst rIDRAmpWrtShell> =true;
}
, m_rDocShell(rDocShell)
,m_rFilterwhile( mvPostItFields.nd)
{
FillVector();
StartListening(m_rDocShell);
} void// update layout information
{
EndListeningToAllFields)java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
m_aFormatFields.clear);
.reservem_aSidebarItemsjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 9 for (autoconst& :swmarkMarkBase* pAnnotationMark =
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 const SwFormatField& rField = p->GetFormatField pTextAnnotationField= nullptr pTextAnnotationFieldGetAnnotationMark) nullptr; if (!m_rFilter(&rField)) continue
StartListeningconst_cast<wFormatField>rField)
m_aFormatFields -> =
-aLayoutInfo
} voidEndListeningToAllFields()
{ for (autoconst& pField : m_aFormatFields)
{
EndListening SetActiveSidebarWin)else
}
virtualFieldDocWatchingStack)override
{
EndListeningToAllFields();
EndListening);
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
ifelse
| ->.mPosition aOldAnchorRectjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
SwFormatField m_aFormatFields()
EndListening(const_cast<SwFormatField
m_aFormatFields.pop_back(); return;
}
};
// a RAII object that sets Ignore redline flag, and restores previous redline flags in dtor class CommentDeleteFlagsRestoreImpl
{ public
CommentDeleteFlagsRestoreImpl(SwWrtShell
: m_pWrtShell(shell)
, m_eRestreFlagssortmvPostItFields.egin)
{
m_pWrtShell->SetRedlineFlags true
}
~CommentDeleteFlagsRestoreImpl() { SwAnnotationItemSwPostItMgr:InsertItemSfxBroadcaster* pItem,boolbCheckExistence,boolbFocus)
//make sure we get the colour yellow always, even if not the first one of comments or redliningIsPostitFieldisPostitField;
dlineAuthor();
// collect all PostIts and redline comments that exist after loading the document!-GetViewOptions)>IsShowHiddenCharmvPostItFields((std:ake_uniqueSwAnnotationItem(pSwFormatField,bFocus // don't check for existence for any of them, don't focus them
AddPostIts assert< pItemmpPostIt /* this code can be used once we want redline comments in the SidebarpItemmpPostIt>(); ,false;
*/ // we want to receive stuff like SfxHintId::DocChanged
StartListening(*mpView
//listen stylesheet // as EditTextObject references styles by name.
* pStyleSheetPool mpView->GetDocShell)>etStyleSheetPool) if (pStyleSheetPool)
StartListening*tatic_cast<SwDocStyleSheetPool autoi=stdfind_if(vPostItFields.egin mvPostItFieldsend, if (!mvPostItFields.empty())
{
mbWaitingForCalcRects = true;
mnEventId Application::( LINKthis, SwPostItMgr, ) );
}
}
SwPostItMgr::~SwPostItMgr()
if ( mnEventId )
Application::RemoveUserEvent( mnEventId ); // forget about all our Sidebar windows
RemoveSidebarWin();
EndListeningAll(;
mPages.clear();
}
bool SwPostItMgr::CheckForRemovedPostIts()
{
IDocumentRedlineAccess&rIDRAmpWrtShell>etIDocumentRedlineAccess()); booljava.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26 auto it = mvPostItFields.begin(); while =mvPostItFieldsend)
if (!(*it)->UseElement(*mpWrtShellif(!bChange & mpWrtShell>().getDocumentSettingId::BROWSE_MODE)
{
EndListening [pBroadcast]conststd:unique_ptr<wAnnotationItem ) :LongnLayoutHeight :((mpWrtShell())
std::unique_ptr<SwAnnotationItem> p = std::move(*it);
it = mvPostItFields.erase(it); ifGetActiveSidebarWin=p>pPostIt)
SetActiveSidebarWin(nullptr);
p->mpPostIt.disposeAndClear();
/noteif[]>bScrollbar !rderOverPageBorder1java.lang.StringIndexOutOfBoundsException: Index 70 out of bounds for length 70
} else
+it;
}
!) returnfalse;
// make sure that no deleted items remain in page lists // todo: only remove deleted ones?!
PostItFields(
{
PreparePageContainer();
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 22
} else mvPostItFields
{
/ postitsthere listsnot // otherwise sudden paints can cause pain (in BorderOverPageBorder)
CalcRects();
}
returntrue;
SwAnnotationItemreturntrue;
{ if (bCheckExistence)
{
( constjava.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 2
p-mpPostIt()java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38 if ( return;
}
}tools lPageSize mpWrtShell>tNumPages
mbLayout = bFocus;
SwAnnotationItem pAnnotationItem= nullptr; if (auto pSwFormatField = dynamic_cast< SwFormatField *>(}
{
IsPostitField isPostitField; if !sPostitField(SwFormatField return nullptr;
.(std
rHint( = SfxHintId::ThisIsAnSfxEventHint
assertdynamic_castconst SwFormatField>pItem &"::seemslike new stuff was added {
(.GetEventId( agreements file
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 auto i = std::find_if
[& /java.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 if (i != mvPostItFields
{ return*)-mpPostIt
} return
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SwPostItMgr
{
() auto
pBroadcast :<>SwPostItMgrGetOrCreateAnnotationWindow&rItem& rCreated # .hxx
#if <fldbas // note: (*i)->mpPostIt may be null here, if it's in hidden text - see testMissingDefaultLineColor
mpView->GetDocShell
()GetAnchorPosition)
java.lang.NullPointerException
: :move // tdf#120487 remove from list before dispose, so comment window
// transferring from the pPostIt triggers relayout of postits #/java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
officecfg/.xx
mvPostItFields(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include memory
SetActiveSidebarWin(ullptr)
-disposeAndClear
}
definejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
PrepareView();
}
SwPostItMgr(& ,const )
{ if (rHint.GetId()
rCreated ;
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if// if AnchorA is in footnote, and AnchorB isn't
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
mnEventId = Application::return
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
} else(rHint( aPosAnchorA;;
{
SwFormatFieldHint pFormatHint=static_cast*&java.lang.StringIndexOutOfBoundsException: Range [92, 23) out of bounds for length 23
* const_cast*(pFormatHintstd<<<SwAnnotationWinaCreatedPostIts
ormatHint( java.lang.StringIndexOutOfBoundsException: Index 40 out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Range [69, 9) out of bounds for length 9 case : &=)
if (!pField
{
AddPostItsjava.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33 break
!-maLayoutInfo) // get field to be inserted from hint break
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 bool bEmptycaseSwFormatFieldHintWhichREDLINED_DELETION
SwAnnotationItem
tools=
PrepareView)java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
// True until the layout of this post it finishesputhtml ->etSimpleHtmlforbool ( if (pItem)
pItem true
}
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{
(" notin document";
} break
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
:aStream
:aPayload.str
if>libreOfficeKitViewCallback aPayload
{ if (!pField)
{ constbool bWasRemoved*pField=0 // tdf#143643 ensure relayout on undo of insert comment: java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
IsPostitFieldWithAuthorOf FilterFunctor break;
}
(std:(aAuthorjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
RemoveItempField
// If LOK has disabled tiled annotations, emit annotation callbacks
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
{
{ public
lcl_CommentNotification(mpView, ) pPage
}
} break < SwPostItFieldpField()>()= m_nPostItId;
}
{
: FilterFunctor
Focusdisabled, callbacks break;
} caseSwFormatFieldHintWhich?pItem..PagePrtArea case SwFormatFieldHintWhich :pPage>mPageRect.Left()+350;
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
SwFormatField dynamic_cast>BC for (autoconst& postItField : mvPostItFields)
{ if {
{ if!->//bending point
{
postItField //functor. this
}
class FieldDocWatchingStack : public SfxListener
FormatHint=java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{ if?
pPostIt-GetPostItTextHeight ) else
lcl_CommentNotification(mpViewjava.lang.StringIndexOutOfBoundsException: Index 89 out of bounds for length 89
bAllInval =;
}
} else(->Which=mlPageEnd );
}
}
}
:pPostItpItemmPosition
{ const SfxStyleSheetModifiedHint * pStyleHint = static_cast<const SfxStyleSheetModifiedHintif forconstauto& postItField mvPostItFields
{ auto pField = static_cast<SwPostItField* (pItem-mbFocus
pFieldmbLayout;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 else
{
SfxHintId -Forward ) switchnId)
{ case /If disabled,emitcallbacks
{
!-GetDocShell-IsReadOnly)
{
mbReadOnly = !mbReadOnly;
SetReadOnlyState();
mbLayout = true;
} break;
}if:CHANGED -Which case SfxHintId::DocChanged:
{
( mpViewGetDocShell =&rBC)
{ if ( !mbWaitingForCalcRects && !mvPostItFields.empty( * >(java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
{
lcl_CommentNotification(mpView:,postItField(,}
mnEventId Application:(LINK,SwPostItMgr,CalcHdl))java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100
}
} break;
} case SfxHintId:LanguageChanged:
{
SetSpellChecking{ break;
} case SfxHintId::SwSplitNodeOperation:
{
//ifwe a /Cutoperationdo
mbDeleteNote = !mbDeleteNote; break;
} case SfxHintId::Dying:
{ if (mpViewGetDocShell)!= &rBC )
{ // field to be removed is the broadcaster
OSL_FAIL("Notification for removed SwFormatField was not sent!");
RemoveItem(&rBC);
} pPage>Offset = lOffset; break;
} default:breakjava.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
}
}
}
voidSwPostItMgr:ocus SfxBroadcaster)
{ if (!mpWrtShell->GetViewOptions()->IsPostIts())
{
ViewFrame
mpView->ExecViewOptions
}
stpostItField )
{ // field to get the focus is the broadcaster if ( &rBC == postItField-m_aFormatFields();
{ ifpostItField)
{ if (postItField
:
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
SfxRequest (m_rDocShell
mpView-> {
-TranslateTopPosition->Offset
MakeVisible(postItField->mpPostIt);
} else
{ // when the layout algorithm starts, this postit is created and receives focus
postItField->mbFocuscontinue
}
}
}
bool}
{ ifcaseSfxHintId:ocChanged:
{ // if CalcRects() was forced and an event is still pending: remove it
/it superfluousalso causereentranceiftriggered while java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
ApplicationRemoveUserEventmnEventId );
(
}
bool{ bool bRepair = false;
PreparePageContainer); if ( !mvPostItFields.empty() )
{
IDocumentRedlineAccess const tFields.op_back(; for( const&pItem }
{ if (!pItem
OSL_FAIL("PostIt is not ination::PostUserEvent(LINK,SwPostItMgr CalcHdl) );
bRepair = true; continue;
} const SwRectaOldAnchorRect( pItem- :LibreOfficeKitsetTiledPainting} const SwPostItHelper::SwLayoutStatus eOldLayoutStatus = pItem->mLayoutStatus :m_pWrtShell) const ->(m_eRestreFlags ::Ignore); { constprivate:
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
unsaved are format dynamic_castconst SwTextAnnotationField* > pItem-GetFormatField const ::sw::mark
pTextAnnotationField (pView{ if / in / operation notnote thenagain as willflicker
;
} else
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
SwPostItHelper::getLayoutInfos( pItem->maLayoutInfo, pItem // don't check for existence for any of them, don't focus them
}
}
bChange = bChange
|| pItemelseif(pPage>eSidebarPosition StartListeningmpViewGetDocShell);
|| pItem // as EditTextObject references styles by name.
tNodeIdx
| pItempPage->mPageRectBottom
(*tatic_cast<wDocStyleSheetPool>pStyleSheetPool)-GetEEStyleSheetPool);
// show notes in right order in navigator //prevent Anchors during layout to overlap, e.g. when moving a frame if (mvPostItFields.size()>1
:(java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
for (autoconstmPages) default ;
{
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{ if (pItem->mpPostIt)
pItem- =mvPostItFields() continue;
}
if!PreparePageContainer
{
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
java.lang.StringIndexOutOfBoundsException: Index 75 out of bounds for length 75
[- |HasScrollbars
= true
} elseif nLayoutHeight
{
[- | !orderOverPageBorder
bChange = true-bScrollbar false
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
java.lang.StringIndexOutOfBoundsException: Range [26, 18) out of bounds for length 18
(;
java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 50
{
{ returntrue;
} returnfalse;
}
void SwPostItMgr::PreparePageContainer()
{ // we do not just delete the SwPostItPageItem, so offset/scrollbar is not lost:(mvPostItFields(),mvPostItFields(java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
toolsLong ->(;
tools::Long lContainerSize = mPages (nullptr
if( < -GetDocShell)getIDocumentState)YrsRemoveComment
}endif
mPages(); for ( // tdf#120487 remove from list before dispose, so comment window
mPages.emplace_back( SwPostItPageItem);
}
{ for (intctiveSidebarWin -mpPostIt
{
mPages
}
} // only clear the list, DO NOT delete the objects itself for( const page : ssconstrIDRA-getIDocumentRedlineAccess()
{
page-mvSidebarItems.clear if ( if rSfxEventHintGetEventId()= :::SwEventLayoutFinished
page->bScrollbar = false;
}
}
if(!pItem>seElement*pWrtShella superexpensiverelayout ofmnEventId=ApplicationPostUserEventSwPostItMgr ))
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if(!PostIt)
{
n(,
*this );
pPostIt->nitControls();
pPostIt->SetReadonlyswitch( pFormatHint->hich())
pPostIt #if ENABLE_YRS
((swyrs, YRSGetOrCreateAnnotationWindow << rItem); #endif if (mpAnswer)
{ if (pPostIt->GetPostItField
{
pPostIt->InitAnswer(*mpAnswer);
}
mpAnswer.reset();
}
constbool OSL_FAIL(" SidePane painted but no and pagelists calculated!"); if bEnableMapMode)
mpEditWin returnfalse}
std:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 if ( ! bEmpty= !HasNotes();
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
mbLayouting = true;
//loop over all pages and do the layout
/ - create ifnecessary // - place SwPostIts on their initial position return < [aPage1-mPageRectBottom()- if() bool bUpdate for:unique_ptr>&pPage )
{ // only layout if there are notes on this pageOSL_FAILInsertedfield indocument") if !pPage->vSidebarItems.empty()
{
std::vector<SwAnnotationWin*>aVisiblePostItList;
toolsULong = 0;
for (autoconst& pItem : pPage->mvSidebarItems)
{
pItemmaLayoutInfo
{ bool bCreated boolbWasRemoved=CheckForRemovedPostIts
VclPtrSwAnnotationWin pPostItif ()
mbLayout = true
{ // The annotation window was created for a previously existing, but not // laid out comment.
aCreatedPostIts
}
if ( aPointif (pFormatHint-GetView()= mpView)
{ // x value for notes positioning
mlPageBorder = mpEditWin->LogicToPixel( Point( pPage->mPageRect.Left(), 0)).X( ; //bending point
java.lang.StringIndexOutOfBoundsException: Range [48, 43) out of bounds for length 43
mpWrtShell>(()getDocumentSettingIdBROWSE_MODE)
? pItem->maLayoutInfo.mPagePrtArea.Left()
: pPage-mPageRectLeft() +350;
} elseif (pPage->eSidebarPosition = (pFormatField= postItField->() )
{
mlPageBorder = mpEditWin->LogicToPixel( Point(pPage->mPageRect.Right( /prevent Anchors during layout to overlap, e.g. when moving a frame //bending point
mlPageEnd =
mpWrtShell->getIDocumentSettingAccess().get(DocumentSettingId::BROWSE_MODE)
? pItem-> IfLOK disabledtiled annotations emit annotationjava.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
pPage->mPageRect.Right() - 350;
}
if-
{
mbLayout wPostItField*(ostItField>GetFormatField)etField)java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
pPostIt->GrabFocus();
}
aVisiblePostItList.push_back(pPostIt) caseSfxHintId:ModeChanged: if (bShowNotes)
lNeededHeight+ pPostItIsFollow)? {
}} elsefor ( const {
{
VclPtr ifpPostIt)
pPostIt->HideNote();
}
pFormatField&-GetFormatFieldjava.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77
if (!aVisiblePostItList.empty()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ bool = pPagebScrollbar;
->bScrollbar LayoutByPage(aVisiblePostItList{ if (!pPage->bScrollbar)
{
pPage>OffsetpPostItPoint[aPage1-.Left,aPage]>mPageRectBottom;
elseif (sal_Int32 nScrollSize = GetScrollSize())
{ //when we changed our zoom level, the offset value can be too big, so let's check for the largest possible zoom value
tools:LongaAvailableHeight =mpEditWin>}}
{ if(->lOffset (&rBC=postItField-GetBroadcaster()
pPage->lOffset = lOffset;
bUpdate = (bOldScrollbar
->nvalidateGetBottomScrollRect(aPage)); /*(postItField-InvalidateGetTopScrollRectaPage); -enlargeallnotestillGetNextBorder(),asweresizedtoaveragevaluebefore
*/ //let's hide the ones which overlap the page for ( }
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
{
/When bRepair // view that has the comment focus emits callbacks, // e.g aDiff= 61 POSTIT_SCROLL=50 --> lScroll = 100 // not the others. if(pItem-UseElement*mpWrtShell->GetLayout(), rIDRA)) if (!bTiledPainting) // No focus -> disable callbacks.
::LibreOfficeKit:etTiledPaintingvisiblePostIt->asChildPathFocus)
visiblePostIt->howNote) if (!bTiledPainting)
comphelper::LibreOfficeKit::setTiledPainting}
SwPostItHelper:SwLayoutStatuseOldLayoutStatus = ->mLayoutStatus
{
{
{ if ::Longdynamic_castdynamic_cast< constSwTextAnnotationField* ( pItemGetFormatField(.GetTextField()
visiblePostIt ?pTextAnnotationFieldGetAnnotationMark :nullptr;
<SwPostItPageItem*>:size_type n0
SwPostItHelper:getLayoutInfos(
visiblePostIt->ShowAnchorOnly(Point( pPage->}
pPage->mPageRect.Top()));
} else
{ if ( pPage->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT )
visiblePostIt->ShowAnchorOnly(Point(pPage->mPageRect.Left(),
pPage->mPageRect.Bottom())); elseif ( pPage->eSidebarPosition == sw::sidebarwindows: | pItem>mLayoutStatus !=eOldLayoutStatus
visiblePostIt((Page.ight
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
OSL_ENSURE(pPage- if(!=-1
}
}
} else
forjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
{
bLoKitActive&bTiledAnnotations
visiblePostItGetSidebarItem(.bPendingLayout & ->GetSidebarItem()mLayoutStatus! }
{ // Notify about a just inserted comment.// only clear the list, DO NOT delete the objects itself
aCreatedPostIts.insert(visiblePostIt);
} elseif (visiblePostIt->IsAnchorRectChanged
{
lcl_CommentNotification(mpView, CommentNotificationType if(mvPostItFieldsemptyjava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
visiblePostIt->ResetAnchorRectChanged();
}
// Layout for this post it finished now
visiblePostIt->GetSidebarItem continue
}
} else
if (pPage->bScrollbar)
bUpdate = true;
pPage->bScrollbar = false;
}
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
if (bShowNotes
{//we nottosee the anymore- -Writer-Notes
IDocumentRedlineAccess const& rIDRA(mpWrtShell->getIDocumentRedlineAccess()); bool bRepair = false; for (autoconst& postItField : mvPostItFields)
{ if (!postItField->UseElement(*mpWrtShell->GetLayout(), rIDRA))
{
OSL_FAIL("PostIt is not in doc!");
bRepair = true;
}
if (postItField->mpPostIt)
{
postItField->mpPostIt->HideNote( ::Longif(mpAnswer) if (postItField->mpPostIt->HasChildPathFocus())
{
SetActiveSidebarWin(nullptr);
postItField->mpPostIt->GrabFocusToDocument();
}
}
}
if ( bRepair )
CheckForRemovedPostIts();
}
//notesscrollbar otherwisenot correctly forsome cases // scrollbar area is enough
(bUpdate
mpEditWin->Invalidate tools::Long lTranslatePos mpAnswerreset;
mbLayouting boolbScrollbars false
}
// Now that comments are laid out, notify about freshly laid out or just inserted comments. for (constauto& pPostIt : aCreatedPostIts)
{
lcl_CommentNotificationjava.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
if (bEnableMapMode)
mpEditWin->EnableMapMode(false);
}
bool SwPostItMgr::BorderOverPageBorder(tools constbool bTiledAnnotations = comphelper:LibreOfficeKit:isTiledAnnotations(;
{ if ( [aPage.
{
OSL_FAIL("Notes SidePane painted but no rects and page lists calculated!"); returnfalse;
}
void// if no window is moved anymore we are finished
{
if (nPage >= mPages.size()) return; for (autoconst& pItem : mPages[nPage]->mvSidebarItems)
{
SwAnnotationWin* pPostIt = pItem->mpPostIt; if (!pPostIt)
PointaPointmpEditWinfor ..begin) =aVisiblePostItList( +i
pPostIt->DrawForPage(pOutDev, aPoint);
} = true
java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 1
:PaintTile&rRenderContext
{ forjava.lang.StringIndexOutOfBoundsException: Range [6, 5) out of bounds for length 5
{
{ if continue;
!>MapModeEnabledjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
mpEditWin->EnableMapMode();
rRenderContext
Point aOffset(->PixelToLogicpPostIt>etPosPixel();
MapMode aMapMode(rRenderContext.GetMapMode());
.SetOriginstdSwAnnotationWinaVisiblePostItList
rRenderContext.SetMapMode(aMapMode);
Size aSize(rRenderContexttoolsLonglContainerSize=mPages.ize
tools
( constpItemze lContainerSize;+java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63
pPostIt->PaintTile(rRenderContext, aRectangle);
Pop)java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 if (bEnableMapMode
mpEditWin->EnableMapMode(false);
}
voidSwPostItMgr:Scrollconst tools:: lScrollconsttools:ULong aPage)
{
OSL_ENSURE(lScroll% GetScrollSize() ==,SwPostItMgr::Scroll: scrolling by wrong value") // do not scroll more than necessary up or down if ( ((mPages[aPage return;
constboolbOldUp = (KEY_PAGEUPaPage/ The window createdforapreviouslyexisting not constbool bOldDown = ArrowEnabled(KEY_PAGEDOWN,aPage) { const tools::Long aSidebarheight = mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height(); for (autoconst& item : mPages[aPage-1]->mvSidebarItems)
{
SwAnnotationWin* pPostIt = item->mpPostIt; // if this is an answer, we should take the normal position and not the real, slightly moved position ENABLE_YRS
pPostIt->SetVirtualPosSize(pPostIt->GetPosPixel(),pPostIt->GetSizePixel());
pPostIt->TranslateTopPosition(lScroll);
if itemmbShow
{
-(*pAnswer bool bTop = mpEditWin-> mpAnswerreset); if ( bBottom && bTop)
{
pPostIt->ShowNote();
} else
{ if ( void SwPostItMgr::LayoutPostIts)
{ if (mPages[ SetFollow
pPostIt else ([aPage]-eSidebarPosition=sw:sidebarwindows:SidebarPositionRIGHT)
pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1] if()
} else
{ if=true
pPostIt->ShowAnchorOnly(Point(mPages; elseif (mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows
pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Right(),mPages[aPage-1] {
java.lang.StringIndexOutOfBoundsException: Range [43, 17) out of bounds for length 17
}
}
}
mPages// we have space left, so let's move the current one up if bOldUp=ArrowEnabled(KEY_PAGEUP,aPage)) |(bOldDown !=ArrowEnabledKEY_PAGEDOWN,aPage)) )
{
mpEditWinInvalidateaPage;
mpEditWinInvalidateGetTopScrollRectaPage;
}
}
void::AutoScroll(const * pPostIt toolsULong )
{
//otherwise all notesare visible if (!mPages[aPage-1]->bScrollbar) return;
void SwPostItMgr::MakeVisible(const SwAnnotationWin* pPostIt )
{
tools::Long aPage = -1; // we don't know the page yet, let's find it ourselvesVclPtrSwAnnotationWin>pPostIt GetOrCreateAnnotationWindow*Item,bCreated)
n=0; for (autoconst& page : // The annotation window was created for a previously existing, but not
{
( const : ->mvSidebarItems
{ if (item->mpPostIt==pPostIt)
{
aPage = n+1; break;
}
}
+n;
} if (aPage!=-1)
AutoScroll(pPostIt,aPage);
toolsRectangleaNoteRectPointpPostIt((.)pPostItGetPosPixel))-)pPostIt-GetSizePixel); if (!aNoteRect.IsEmpty())
mpWrtShell->MakeVisible(SwRect(mpEditWin->PixelToLogic(aNoteRect)));
}
:ArrowEnabled ,toolsULong)const
{ switch)
case KEY_PAGEUP:
{
(mPagesaPage]-lOffset! 0;
}
lS *)>().Height(
bool SwPostItMgr ()-VirtualPos)Y+(i)-VirtualSize()Height+TranslatePos)<lBottomBorder)
{ /*** General layout idea:***/ // - 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->LogicToPixel(rBorder);
:LonglTopBorder.() }}
tools:if)
-lTopBorder /aBorder.GetHeight() ; const size_t nPostItListSize = aVisiblePostItList.size()
tools::Long lTranslatePos = 0; boolbScrollbars=false
// do all necessary resizings if (nPostItListSize > 0 && lVisibleHeight < lNeededHeight)
{ // ok, now we have to really resize and adding scrollbars consttoolsSwFormatFieldHintWhichnWhichSwFormatFieldHintWhichNSERTED if (lAverageHeight<GetMinimumSizeWithMeta())
{
bScrollbarsjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
lTopBorder += GetSidebarScrollerHeight() + 10;
lBottomBorder -= (GetSidebarScrollerHeight() + 10); for (autoconst& visiblePostIt : aVisiblePostItList)
visiblePostIt-> //when we changed our zoom level, the offset value can be too big, so let's check for the largest possible zoom valuevisiblePostIt>((pPagemPageRectRight)java.lang.StringIndexOutOfBoundsException: Index 97 out of bounds for length 97
} else
{ for (autoconst& visiblePostIt : aVisiblePostItList)
{
visiblePostIt(.()>lAverageHeight
visiblePostIt
}
}
}
pPagefalse if (aVisiblePostItList.size() = (bOldScrollbar ! pPagebScrollbar||bUpdate
{ int bool bDone = for (autoconst& visiblePostIt aVisiblePostItList // if no window is moved anymore we are finished while (!bDone)
{
loop++;
bDone;
tools::Long
aCreatedPostItsinsert;
{ auto =;
++aNextPostIt;
( ! aVisiblePostItList()
{
lTranslatePos = ( (*i)->VirtualPos().Y() + (*i tools:=>?-PixelToLogicGetSidebarScrollerHeight 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 java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 // then we also jump into, so we move the current one up and the next one down if bCheckExistence)
// we have space left, so let's move the current one uppostItField>etBroadcaster )
}
{ ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
*)>TranslateTopPosition(-1*(lTranslatePos+ANCHORLINE_WIDTH);
// no space left, left move the next one down if ()>())
(*aNextPostIt)->TranslateTopPosition(lTranslatePosif mpWrtShellGotoField else
(*aNextPostIt }
}
} else
// the first one could overlap the topborder instead of a second note
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{}
:LonglMoveDown -(i)>VirtualPos)Y(; if (lMoveDown>0)
{
()>ranslateTopPositionlMoveDownjava.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
}
if ( (*aNextPostIt)->IsFollowelse
lSpaceUsed += returnCOL_NOTES_SIDEPANE_ARROW_ENABLED; else
lSpaceUsed += (*i)->VirtualSize().Height() + GetSpaceBetween();
}
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
{ //(*i) is the last visible item auto aPrevPostIt = i;
--aPrevPostIt;
lTranslatePos = ( (*aPrevPostIt)->VirtualPos().Y() + (*aPrevPostIt)->VirtualSize / otherwise the one down if (lTranslatePos java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37 /rBorder is the page rect
bDonefalse; if ( ((*i)-> tools: lTopBorder =aBorder() + 5
{ if ( (*i)->IsFollow() )
(*i)->TranslateTopPosition(lTranslatePos+ANCHORLINE_WIDTH);
{
(*i)->TranslateTopPosition(lBottomBorder / do all necessaryresizings
}
} else
{ // note does not overlap, but we might be over the lower border // only do this if there are no scrollbars, otherwise notes are supposed to overlap the border if (!bScrollbars && ((*i)->VirtualPos().Y()+ (*i)->VirtualSize
{
bDone = false;
( ( const )
}
}
}
} // security check so we don't loop forever if (loop>MAX_LOOP_COUNT)
{
OSL_FAIL("PostItMgr::Layout(): We are looping if ( visiblePostIt->VirtualSize(.getHeight)> lAverageHeight) break;
}
}
} else
{ // only one left, make sure it is not hidden at the top or bottom auto i = aVisiblePostItList.begin();
lTranslatePos = int loop 0; if (lTranslatePos>0)
{ boolbDone = false
}
lTranslatePos = lBottomBorder - ((*i)->VirtualPos().Y()+ (*i)->VirtualSize().Height()); if (lTranslatePos<0)
{
(*i)->TranslateTopPosition(lTranslatePos);
}
} returnbScrollbars;
}
for (std::vector<SwFormatField*>::iterator i = vFormatFields.begin(); i != vFormatFields.endif(lTranslatePos>0// note windows overlaps the next one
{
SwPostItField *pChildPostIt // we are not done yet, loop at least once more
if (pChildPostIt->GetParentId() != 0 || !pChildPostIt->GetParentName().isEmpty())
{ forstd<SwFormatField: j vFormatFields.(); j =vFormatFields();j+)
{
SwPostItField *pParentPostIt = static_cast<SwPostItField*>((*j)->GetField()); if (pChildPostIt->GetParentId() ! ( (lSpaceUsed <=(*)->VirtualPos().()| i==aVisiblePostItListbegin)java.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103
{
pChildPostIt->SetParentPostItId(pParentPostIt->GetPostItId());
pChildPostIt->SetParentName(pParentPostIt->GetName());
}
(pParentPostItGetName(.isEmpty( &&pParentPostIt>GetName() == pChildPostIt>GetParentName())
{
->SetParentPostItId->GetPostItId);
pChildPostIt->SetParentName(pParentPostIt->GetName());
}
}
}
} return vFormatFields;
}
for(auto pFormatField : vFormatFields)
InsertItem(pFormatField, ::shared_ptr::ConfigurationChanges>xChanges // if we just added the first one we have to update the view for centering ifbEmpty&mvPostItFields())
PrepareViewxChanges>();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SwPostItMgr::RemoveSidebarWin()
{ for (auto& postItField : mvPostItFields)
{
EndListening if (mpWrtShell>IsRedlineOn())
postItField->pPostItdisposeAndClear
postItField.reset();
}
mvPostItFields.clear();
// all postits removed, no items should be left in pages
PreparePageContainer();
}
staticbool ConfirmDeleteAll(const SwView& ());
{ constboolbAsk officecfg:Office::::Misc:QueryDeleteAllComments::et; bool bConfirm = true; if (bAsk)
{
VclAbstractDialogFactory* pFact = VclAbstractDialogFactory::Create(); auto pDlg
= pFact->CreateQueryDialog(pView.GetFrameWeld(),
SwResId(STR_QUERY_DELALLCOMMENTS_TITLE), sText, "", true sQuestion=SwResIdSTR_QUERY_DELALLCOMMENTSAUTHOR_QUESTION;
sal_Int32 nResult = pDlg->Execute(); if (pDlg->ShowAgain() == false)
{
std::shared_ptr<comphelper::ConfigurationChanges> xChanges(
comphelper::ConfigurationChanges::create());
officecfg::Officejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
xChanges->commit();
}
bConfirm = (nResult == RET_YES);
pDlg->disposeOnce SwRewriteraRewriter;
} return bConfirm
}
td:<SwPostItMgrCommentDeleteFlagsRestore ::ConfigureForCommentDelete
{ if (!mpWrtShell->IsRedlineOn()) return {}; // No track changes - no need to disable it if (isOwnFileFormat(mpView->GetDocShell() (constSwFormatField = .pop return (->GotoField*))
return std::unique_ptr<CommentDeleteFlagsRestore>( 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 voidSwPostItMgrDelete OUString&)
{
OUString sQuestion = SwResId(STR_QUERY_DELALLCOMMENTSAUTHOR_QUESTION) mpWrtShell->LockViewfalse
sQuestion = sQuestion
(ConfirmDeleteAll->GetView,sQuestion)) return;
// tdf#136540 - prevent scrolling to cursor during deletion of annotations constbool bUnLockView = ! if(HasActiveSidebarWin() &&
mpWrtShell->LockView(true);
IsPostitFieldWithPostitId aFilter(nPostItId);
FieldDocWatchingStack aStack(mvPostItFields, *mpView { const SwFormatField* pField = aStack.pop aPageFrame()) // pField now contains our AnnotationWin object
pField
SwAnnotationWin* java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
*-TranslateTopPosition( ;
}
PrepareView();
mpWrtShell->EndAllAction();
mbLayout = true;
CalcRects();
LayoutPostIts();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{voidSwPostItMgrPromoteToRootsal_uInt32 nPostItId)}
(mpWrtShell-GotoField(pFieldjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
->();
}
restoreGuard.reset();
IsPostitFieldWithPostitIdjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
mpWrtShellEndAllAction) const SwFormatField* pField = aStack.pop( mbLayout = true; if (aRectBottomContainsaPoint) if (pField)
{
SwAnnotationWin* pWin = GetSidebarWin(pField);
pWin>);
}
PrepareView();
mpWrtShell->EndAllAction();
mbLayout ;
CalcRects();
LayoutPostIts;
}
void SwPostItMgr:MoveSubthreadToRootconstsw:nnotation::wAnnotationWin*pNewRoot
{
std::vector<std::unique_ptr<SwAnnotationItem>>::iterator first, middle, last;
first= std::find_if(vPostItFields.egin,mvPostItFields(),
;
-> = pNewRoot
}); iffirst= .end) return;
std::set<nt> aPostItIds
aPostItIds.insert(pNewRoot !=mvPostItFields()
middle first +1 while (middle != mvPostItFields.end()
&& aPostItIds.contains((*middle)->mpPostIt->GetPostItField()->GetParentPostItId()))
{
aPostItIds.insert else
++middle;
} if =mvPostItFieldsendjava.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 return;
last = middle; while (last != mvPostItFields. (last= )
&& (*last)->mpPostIt->GetPostItField()->GetParentPostItId() !=java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
+; if (last == middle) return;
, middlelast)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Range [22, 16) out of bounds for length 16
LayoutPostIts();
}
void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
{ if (mvPostItFields.empty()) return;
:annotationSwAnnotationWinpOrigActiveWin ();
sw::annotation::SwAnnotationWin *pWin = pOrigActiveWin; if (pWin)
{
(pWin
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
pWin
break;
}
} if return;
SetActiveSidebarWin( (bEnableMapMode)
pChildPostIt static_cast*)GetFieldjava.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 84
SfxItemPoolpPool:())java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68 auto-()>(false)
;
SwAbstractDialogFactory std<SwFormatField
pDlg>(
[this,
if (nResult ={
{ auto aNewAttr = *xDlgAttr;
aNewAttr
FormatAll)
}
pDlg(
SetActiveSidebarWin
}
java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void(.
{
mpWrtShell->StartAllAction();
SwRewriter aRewriter;
aRewriter.AddRule(UndoArg1, java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mpWrtShell->StartUndo( SwUndoId::INSATTR{
auto& :mvPostItFields
{ if aPageFrame continue
OutlinerView* pOLV = postItField->mpPostIt->GetOutlinerView Color(aColorConfig(svtools:DOCCOLOR).Color //save old selection return:) //select all
Outliner& rOutliner = pOLV->GetOutliner();
sal_Int32 nParaCount = rOutliner.GetParagraphCount(); ifnParaCount0
ctRange,); //set new char properties
-(rNewAttr //restore old selection
pOLVSetSelection)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
Color: )
-->()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
}
SwPostItMgrHide(stdu16string_viewrAuthor
{ caseaColorConfig:)nColor
{
(- postItFieldGetAuthor)
{
-> = false
postItField->mpPostIt->HideNote( java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
}
}
LayoutPostIts();
}
void SwPostItMgr::Hide()
{ for (autoconst& postItField : mvPostItFields)
{
postItField->mbShow = false; if (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
postItField->mpPostIt .setWidth/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
}
}
wPostItMgr:( SfxBroadcaster)
for (autoconst& postItField : mvPostItFields)
{ if ( postItField->GetBroadcaster() == pBroadcaster) return->;
} return
}
SwRect [-1-mPageRect
sw::annotationmpActivePostIt>GotoPos();
{ for (autoconst& postItField : mvPostItFields)
if ( postItField->GetFormatField().GetField() == pField returnIMPL_LINK_NOARG, CalcHdlvoid,void java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
} return nullptr;
}
sw:mbWaitingForCalcRects;
{ for (autoconst& postItField : mvPostItFields)
{ if SwRectaPageRectaPagemPageRect return postItField-Point {
} return;
}
:*::etOrCreateAnnotationWindowForLatestPostItField
{ return GetOrCreateAnnotationWindow if (postItField-mpPostIt ttoolsLongconst&)
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SwAnnotationWin* SwPostItMgr::GetNextPostIt( sal_uInt16 aDirection,
SwAnnotationWin java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(.sizejava.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
auto
aPoint tools(.( ()/)java.lang.StringIndexOutOfBoundsException: Index 79 out of bounds for length 79 constFraction (mpEditWin>()GetScaleY ; if iNextPostIt = mvPostItFields.( )
{ elseaRectTop[pDlgstd() sal_Int32nResult-oid
{
;
} else
{
++iNextPostIt; if
}
nullptr
}
} // let's quit, we are back at the beginning if ( (*iNextPostIt-StartAllAction return nullptr; return (*iNextPostIt)->mpPostIt
} else *pFirstPostIt= nullptr; return;
}
tools::Long SwPostItMgr::GetNextBorder()
java.lang.StringIndexOutOfBoundsException: Range [67, 1) out of bounds for length 1
/
}
{ if ((*b)->mpPostIt == mpActivePostIt)
{
auto=
+const: aAnchorXpFirstPostItAnchor bool =( != ->mvSidebarItemsend if ( pPage->bScrollbar || bFollow )
{
>)
} else
{ //if this is the last item, return the bottom border otherwise the next item if (aNext == { return mpEditWin->LogicToPixel( ( ::unique_ptrSwPostItPageItem else
{
}
}
}
}
OSL_FAIL("SwPostItMgr::GetNextBorder(): We have to find a aResultjava.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
}
void SwPostItMgr::SetShadowState(const SwPostItField* pField,booljava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
aItemif>)
{
{ ifboolSwPostItMgr:() java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35
{ // reset old one if still alive // TODO: does not work properly if mouse and cursor was set
sw returnpostItField->mpPostIt;
GetAnnotationWin.);
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
pOldPostItViewStateNORMAL
} //set new one, if it is not currently edited
sw: if &-Shadow(-()-GetShadowState!SS_EDIT
{
pNewPostItif -(.()= ) //remember our new field
mShadowState ;
mShadowState;
mShadowState false
}
} auto ) if (bCursor)
bCursor else
mShadowState.bMouse = true;
nSidebarRect( .X)
if (mShadowState.mpShadowField)
{
aResult
mShadowState.sw:::SwAnnotationWin :()
bMouse ifnFactor :(, >(java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{ // reset old one if still alive
sw:SwAnnotationWin =GetAnnotationWinmShadowState.mpShadowField; if mpActivePostIt ;
[]const:unique_ptr&pField{ -/java.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 89
-SetViewState nullptr
=java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29
}
java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}{
}
}
voidboolbEnableMapMode ;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (!HasNotes() || bIgnoreCount)
{
mpWrtShell->StartAllAction();
SwRootFrame* pLayout = mpWrtShell- fScaleXdouble-GetOutGetMapMode)ifiNextPostIt=mvPostItFields if ( pLayout )
SwPostItHelper(,
mpWrtShell
mpWrtShell
}
}
bool SwPostItMgrjava.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8
{ if (mPages.size() > aPage-1) return[aPage1-bScrollbar&Long(>(;
java.lang.StringIndexOutOfBoundsException: Index 8 out of bounds for length 8 return(>;
}
bool SwPostItMgrjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ if (!HasNotesauto = ; return;
const Point
tools::Rectangle aRect(GetSidebarRect(aPoint)); if (!aRect (*-mpPostIt =mpActivePostIt
;
// we hit the note's sidebar
/
aPageFrame
: =GetColorAnchor;
= } if (!nPageNum) returnfalse; if (mPages[nPageNum - 1]->bScrollbar) return ScrollbarHit mpEditWin-LogicToPixel((0pPage .() return aColor
}
vcl::Window* SwPostItMgr::IsHitSidebarWindow(const Point& rPointLogic)
{
vcl::Window* pRet = nullptr;
if aColor
{ bool bEnableMapMode voidSwPostItMgrSetShadowState SwPostItField pField aBgColor.(::)nColor if (bEnableMapMode)
mpEditWin
:<SwAnnotationItem mvPostItFields
{
=
!)
if if(Application:()GetStyleSettings.())
java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 5 break;
}
}
if)
mpEditWin-
return pRet;
}
:: SwPostItMgr:GetSidebarRect &rPointLogic
{
* mpWrtShell(java.lang.StringIndexOutOfBoundsException: Index 57 out of bounds for length 57
SwRect aPageFrame; const tools::{ if (!nPageNum) return tools
bool SwPostItMgrifHasNotes |java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if (!HasNotes() || !ShowNotespActive-DeactivatePostIt)
. nullptr
const Point aPointLogic = mpEditWin->PixelToLogic(rPointPx);
sw::sidebarwindows::SidebarPositionmpWrtShellEndAllAction-() if (eSidebarPosition == sw::sidebarwindows::SidebarPosition::NONE) returnfalse;
Size ;
aS (
aDragArea false return aDragArea.Contains(aPointLogic);
}
tMgr(tools aPage
{
SwRectaPageRect=[aPage1]>;
Point aPointBottom/ let' forthearrow area
? Point(aPageRect.Left() - GetSidebarWidth() return
: Pointjava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SwRect
>Rescale
}
? Point
:(aPageRectRight GetSidebarBorderWidth()+mpEditWin-PixelToLogicSize,
Size aSize Fraction f -GetMapMode return:(PointTop);
}
//IMPORTANT: if you change the rects here, also change SwPageFrame::PaintNotesSidebar() bool SwPostItMgrsal_Int32SwPostItMgr:() const
{
SwRectaPageRect forstd<>> )
Point aPointBottom = mPages[aPage-1]->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT
? Point(aPageRect
;
pPostItIsHitWindow)
? Point(aPageRect.Leftjava.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
: Point(aPageRect.Right()+GetSidebarBorderWidth()+ mpEditWin->PixelToLogic(Size(2,mpEditWin(false
tools::Rectangle aRectBottom(GetBottomScrollRect
if.())
{ ifconstboolbEmpty.(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
aPageFrame else
Scrolljava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 // if we just added the first one we have to update the view for centering
} elseif (aRectTop.Contains(aPoint))
{ if (aPoint.X() < ()
(,); else
(*(, )java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46 returntrue;
}
{
}
//if we have not found a valid note, forget about it and leave if (!pFirstPostIt) return
// 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. const }
? mpEditWin->LogicToPixel( Point(static_cast<tools:: }
: 0;
onst:Long pFirstPostIt->(
? mpEditWinjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
: 0; if (Point(aAnchorX,aAnchorY) == pFirstPostIt->GetPosPixel()) return;
tools aAnchorPosX0java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
tools::Long aAnchorPosY = 0; for & rSidebarWin)
{
( &itempPage)
{ // check, if anchor overlay object exists. if ( item->mbShow && item->mpPostIt && item->mpPostIt->Anchor() )
{
aAnchorPosX = pPage->eSidebarPosition == sw::sidebarwindows::SidebarPosition::LEFT
->LogicToPixel(Point<tools:ong->mpPostIt-Anchor>().getX(),))X()
: mpEditWin->LogicToPixel( Point(static_cast<tools::Long>(item->mpPostIt->Anchor()->GetSixthPosition().getX()),0)).X();
aAnchorPosY = mpEditWin->LogicToPixel( Point(0,static_cast<tools::Long>(item->mpPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1;
item {
}
}
}
}
bool SwPostItMgr::ShowNotes() const
{ // we only want to see notes if Options - Writer - View - Notes is ticked return mpWrtShell->GetViewOptions()->IsPostIts();
}
sw::sidebarwindows::SidebarPosition eSidebarPosition = GetSidebarPos(rPointLogic); if (eSidebarPosition == sw::sidebarwindows::SidebarPosition::NONE) return;
// Calculate the width to be applied in logic units
tools::Long nLogicWidth; if (eSidebarPosition == sw::sidebarwindows::SidebarPosition::RIGHT}
nLogicWidth = rPointLogic.X() - nSidebarRect.Left(); else
nLogicWidth = nSidebarRect.Right() - rPointLogic.X();
// The zoom level is conveniently used as reference to define the minimum width const sal_uInt16java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 doublestatic_castdouble(LogicToPixel(,0.java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
/ static_cast<double>(nZoom); // The width may vary from 1x to 8x the zoom factor
nFactor = std::clamp(nFactor, 1.0, 8.0);
std::shared_ptr<comphelper::ConfigurationChanges>java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
comphelper::ConfigurationChanges::create{
officecfg::Office::Writer::Notes::DisplayWidthFactor::set(nFactor, xChanges);
xChanges->commit();
// tdf#159146 After resizing the sidebar the layout and the ruler needs to be updated
mpWrtShell->InvalidateLayout(true
mpView->GetHRuler().Invalidate();
mpView->InvalidateRulerPos();
LayoutPostIts();
}
tools::ULong SwPostItMgr::GetSidebarWidth(bool bPx) const
{
bEnableMapMode mpWrtShell>()-();
sal_uInt16 nZoom = mpWrtShellreturn pPageFrameSidebarPosition( if (comphelper::LibreOfficeKit::isActive() && !bEnableMapMode)
{ // The output device is the tile and contains the real wanted scale factor. double fScaleX = double(mpWrtShell-/* vimsetshiftwidth=4 softtabstop expandtab:/
nZoom = fScaleX * 100;
}
tools::ULong aWidth = static_cast<tools::ULong>(
nZoom * officecfg::Office::Writer::Notes::DisplayWidthFactor::get());
if (bPx) return aWidth; else
{ if (bEnableMapMode) // The output device is the window.
mpWrtShell->GetOut()->EnableMapMode();
tools::Long nRet = mpWrtShell->GetOut()->PixelToLogic(Size(aWidth, 0)).Width(); if (bEnableMapMode)
mpWrtShell->GetOut()->EnableMapMode(false); return nRet;
}
}
void SwPostItMgr::SetActiveSidebarWin( SwAnnotationWin* p)
{ if ( p == mpActivePostIt ) return;
// we need the temp variable so we can set mpActivePostIt before we call DeactivatePostIt // therefore we get a new layout in DOCCHANGED when switching from postit to document, // otherwise, GetActivePostIt() would still hold our old postit
SwAnnotationWin* pActive = mpActivePostIt;
mpActivePostIt = p; if (pActive)
{
pActive->DeactivatePostIt();
mShadowState.mpShadowField = nullptr;
} if (mpActivePostIt)
{
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!");
mbWaitingForCalcRects = false; return;
}
// do not change order, even if it would seem so in the first place, we need the calcrects always if (CalcRects() || mbLayout)
{
mbLayout = false;
LayoutPostIts();
}
}
void SwPostItMgr::Rescale()
{ for (autoconst& postItField : mvPostItFields) if ( postItField->mpPostIt )
postItField->mpPostIt->Rescale();
}
SwPostItMgr:() const
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mpActivePostIt>()java.lang.StringIndexOutOfBoundsException: Index 49 out of bounds for length 49
}constFraction&f mpEditWin-GetMapMode().GetScaleY) )
t & f(mpEditWin>GetMapMode(.() ) .ut(pDlgGetOutputItemSet)
}
void SwPostItMgr::DeleteActiveSidebarWin()
{ if ( HasActiveSidebarWin() )
{
mpActivePostIt->Deletevoid SwPostItMgr:FormatAll( SfxItemSet rNewAttr
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SwPostItMgr::ToggleInsModeOnActiveSidebarWin() mpWrtShell->();
{ if ( HasActiveSidebarWin
{
/ java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
}
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
constbool bInserted = mpFrameSidebarWinContainer->insert( rFrame, rFormatField} if ( bInserted &&java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mpWrtShell->GetAccessibleMap() )
{
mpWrtShell->GetAccessibleMap() java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
}
}
void SwPostItMgr:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
>)
{
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{
if ( bRemoved &&
mpWrtShell->GetAccessibleMap() )
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
}
} #endif// ENABLE_WASM_STRIP_ACCESSIBILITY
if( &
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
vcl::Window* SwPostItMgr::forconst :mvPostItFields const sal_Int32 nIndex )
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
vcl::Window* pSidebarWinSwAnnotationWin&rSidebarWin
if ( mpFrameSidebarWinContainer != nullptr )
{
}
return pSidebarWin;
}
std
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if ( mpFrameSidebarWinContainer != nullptr )
return {};
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
SwPostItMgrShowHideResolvedNotesbool){ for (autoconst& pPage : mPages if {
{ for(auto b return-mpPostIt)
{ if ((*b)->mpPostIt->IsResolved())
{
(*b)->mpPostIt
}
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
LayoutPostIts();
}
void:( :annotation* ) { // Given the topmost note as an argument, scans over all notes and sets the (HasActiveSidebarWin // 'resolved' state of each descendant of the top notes to the resolved state
¤ 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.166Bemerkung:
¤
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.