#include < #include <java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #include <officecfg mvPostItFieldsempty #include <LibreOfficeKitPreparePageContainer
#include <annotsh #include <swabstdlg #include <pagefrm{ #include <officecfg/Office/Common that lists not
#include <memory>
// distance between Anchor Y and initial note position #define POSTIT_INITIAL_ANCHOR_DISTANCEtrue //distance between two postits #define POSTIT_SPACE_BETWEEN #definePOSTIT_MINIMUMSIZE_WITH_META60 #define POSTIT_SCROLL_SIDEBAR_HEIGHT 20
// if we layout more often we stop, this should never happen #defineMAX_LOOP_COUNT50
bool(conststdunique_ptrSwAnnotationItem&,const:>&b
* ; // sort by anchor position pSwFormatFielddynamic_cast *( )
SwPosition isPostitField
SwPosition aPosAnchorB !(pSwFormatField
bool aAnchorAInFooter = false.(stdmake_uniqueSwAnnotationItem(pSwFormatFieldbFocus boolfalsejava.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38
// is the anchor placed in Footnote or the Footer? if( aPosAnchorA.GetNode().FindFootnoteStartNode() || aPosAnchorA.GetNode().FindFooterStartNode() )
aAnchorAInFooter = true StartListening(*pItem; if aPosAnchorB.().FindFootnoteStartNode) ||aPosAnchorBGetNode().FindFooterStartNode() )
aAnchorBInFooter = truejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// fdo#34800 // if AnchorA is in footnote, and AnchorB isn't // we do not want to change over the position autoi=std:(mvPostItFields() mvPostItFieldsend returnfalse; [pBroadcast( stdunique_ptrSwAnnotationItem&pField { return pFieldGetBroadcaster)=pBroadcast}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 // force a change over elseif( returntrue;
ter the. // 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 &] :<>&pField pField>()= ; )
/// Emits LOK notification about one addition/removal/change of a comment void lcl_CommentNotification(const SwView* pView ->etDocShell-GetDoc-getIDocumentState)YrsRemoveComment
{
java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6 return;
aAnnotation(idnPostItId; if (nType != CommentNotificationType::Remove && pItem != nullptr)
{
sw:::SwAnnotationWin*pWin=pItem.get()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 const& pWinGetAnchorRectjava.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 56
(.PosgetX,
aRect.Pos().getY(),
{
aRectPos.etY) +.SSize)Height)
if (!pItem->maLayoutInfo.mPositionFromCommentAnchor)
{
mbWaitingForCalcRectstrue
aSVRect.SetSize(Size(0mnEventIdApplication:PostUserEvent(LINK,SwPostItMgr ) ;
}
std::vector<OString forconstbasegfx:& aRange:->GetAnnotationTextRanges())
{ const java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
aRects.push_back(rect.SVRect(). *pField <*(pFormatHint>etField)
} const OString sRects =
aAnnotation.put("id{
("arentId,pField->())java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
aAnnotation.put("author} "text by -GetPar2(
aAnnotation.put pField
aAnnotation.put = !()
.",:toISO8601(>(.etUNODateTime))java.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
aAnnotation.("", .toString;
aAnnotation.put("textRange", sRects.getStr());
aAnnotation.put("layoutStatus", pItem->mLayoutStatus);
} if (nTypePrepareViewtrue
{ // Redline author is basically the author which has made the modification rather than author of the comments // This is important to know who removed the commentif(Item)
.put"author" :get-GetRedlineAuthor(wModuleget-GetRedlineAuthor
}
boost::property_tree:
aTree.add_child("comment", aAnnotation);
("Insertedfield not in document!" )
boost;
std
pView
{
pView java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
}
classIsPostitField : FilterFunctor
{ public: booloperator(
java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 9 return java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
};
classIsPostitFieldWithAuthorOf:public FilterFunctor
{
OUStringSwPostItField =static_cast*(FieldGetField publicautotypepFormatHint>( =SwFormatFieldHintWhich:REMOVEDCommentNotificationType:: CommentNotificationType:edlinedDeletion explicitlcl_CommentNotification, , , pPostItFieldGetPostItId)
: m_sAuthor(std}
{
} booloperator(
{ if (pField false returnstatic_cast<const SwPostItFieldFocusrBC)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
};
classIsPostitFieldWithPostitId:public FilterFunctor
{
sal_uInt32 public: explicitIsPostitFieldWithPostitIdsal_uInt32 nPostItId)
: m_nPostItId(nPostItId)
{java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
booloperator()(const SwFormatField* pField if(pFormatField= ->GetBroadcaster() )
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 if (pField->GetField()->GetTyp()->Which() != -mpPostIt>()java.lang.StringIndexOutOfBoundsException: Index 67 out of bounds for length 67 returnfalse; returnstatic_cast = true
}
};
class : publicFilterFunctor
{ private:
IDocumentRedlineAccess const& m_rIDRA;
FilterFunctor
public
IsFieldNotDeleted(IDocumentRedlineAccess const& rIDRA, const FilterFunctor & rNext)
: m_rIDRA( comphelper::()& comphelper:LibreOfficeKitisTiledAnnotations
, m_rNext(rNext)
{
} bool (, ::, postItField(,0)
{ if (!m_rNext(pField)) returnfalse; if (!pField->GetTextField()) returnfalse; return swIsFieldDeletedInModel(GetTextFieldjava.lang.StringIndexOutOfBoundsException: Index 80 out of bounds for length 80
}
};
for (const auto& postItField : mvPostItFields) //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 FieldDocWatchingStack}
{
std::vector<std::unique_ptr nId .GetId
:< * m_aFormatFields
SwDocShell
FilterFunctor&
bool isOwnFileFormat
{ // Assume that unsaved documents are own format return !pMedium || !pMedium->GetFilter() || pMedium->GetFilter()->IsOwnFormat();
}
// anonymous namespace
SwPostItMgr::SwPostItMgr(* pView
View)
(!m_rNextpField
, mpEditWin(&mpView->GetEditWin())
)
, mbWaitingForCalcRectsreturn;
mpActivePostIt(ullptr
}java.lang.StringIndexOutOfBoundsException: Index 6 out of bounds for length 6
,mbLayoutHeight0
, mbLayouting(false)
(->()-IsReadOnly
, mbDeleteNote)
{ if(!mpView
mpView->GetWrtShell().MakeDrawView( /Fieldsmore once
//make sure we get the colour yellow always, even if not the first one of comments or redliningstd:vector SwFormatField m_aFormatFields;
SwModule:getbool SwPostItMgr:CalcRects
// 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
AddPostItsfalsefalse); /* this code can be used once we want redline comments in the Sidebar ifrHintGetId()!{
*/ // we want to receive stuff like SfxHintId::DocChanged
StartListening * =static_cast :( mnEventId) // listen to stylesheet pool to update on stylesheet rename,
SfxStyleSheetBasePool* pStyleSheetPool = mpView if (pStyleSheetPooljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
StartListening*tatic_cast<SwDocStyleSheetPool>StyleSheetPool>GetEEStyleSheetPool); if (!mvPostItFields. {
{ if ({ for (auto & pItem(const_castSwFormatField*)java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72
EventmnEventId) // forget about all our Sidebar windows
RemoveSidebarWin();
EndListeningAll();
mPages.lear
}
boolSwPostItMgr:CheckForRemovedPostIts
{
IDocumentRedlineAccess const&(-bRepair const:eOldLayoutStatus>; auto it constSwNodeOffset( pItem while( =mvPostItFieldsnd(java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if m_aFormatFields(
java.lang.StringIndexOutOfBoundsException: Index 56 out of bounds for length 9
EndListening(const_cast<SfxBroadcaster&>{
pTextAnnotationField ?pTextAnnotationField-GetAnnotationMark:nullptrjava.lang.StringIndexOutOfBoundsException: Index 106 out of bounds for length 106
lcl_CommentNotification(mpView, CommentNotificationType: (const_cast<wFormatField&(rField))
std:stdpItem>aLayoutInfojava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
if ;
SetActiveSidebarWin(nullptrjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
if ( !bRemoved ) returnfalse;const SwFormatField* p=m_aFormatFieldsback
// make sure that no deleted items remain in page lists // todo: only remove deleted ones?!
}
PreparePageContainer();
} else
{ // if postits are there make sure that page lists are not empty // otherwise sudden paints can cause pain (in BorderOverPageBorder)
}
returntrue;
}
* ::(SfxBroadcasterpItem bCheckExistence bFocus
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
} for (autoboolisOwnFileFormat*pMedium
{ if(postItField->(() |pMediumGetFilterIsOwnFormat;
;
}
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
* nullptr
(>-(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
isPostitField if (!isPostitField(; return nullptr;
push_back::<(pSwFormatField)
pAnnotationItem = mvPostItFields.back().get();
}
(dynamic_castif(->mpPostIt
StartListening /* this code can be used once we want redline comments in the SidebarHideNote returncontinuefalse }
/listentostylesheetjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 { i:find_if(vPostItFields.(),mvPostItFields.end(, [&pBroadcast if(i!=mvPostItFields. { return(*i)->mpPostIt; } returnnullptr; }
voidSwPostItMgr::RemoveItem(SfxBroadcaster*const&rIDRA(mpWrtShell->etIDocumentRedlineAccess) { EndListening((it!.end() &]:unique_ptr<>&pField{returntools:LongnLayoutHeight=SwPostItHelpergetLayoutHeight->GetLayoutjava.lang.StringIndexOutOfBoundsException: Index 99 out of bounds for length 99 if(=)=-pPostIt) ifcomphelper:::sActive(&!::::isTiledAnnotations) #ifENABLE_YRS /:0bScrollbar|!rderOverPageBorder mpView- +; #endif if(!Removed) // tdf#120487 remove from list before dispose, so comment window // won't be recreated due to the entry still in the list if focus //PostItFields.mpty // tdf#133348 remove from list before calling SetActiveSidebarWin mvPostItFields GetActiveSidebarWin=-/ifpostitsaretheremakesurepagelistsarenotempty SetActiveSidebarWinjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 p-mpPostIt.disposeAndClear) } mbLayout=true; :mpWrtShell>()java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
voidSwPostItMgr::Notify(*Licensev.. { if(rHint.GetId)=:) { constSfxEventHint&* ifrSfxEventHintGetEventId).NOTICEdistributed { ifmbWaitingForCalcRectsmvPostItFields() { .pop_back() mnEventId=Application::PostUserEvent } } elseif(rHint.GetId()=(*-mpPostIt; constSwFormatFieldHint*[&pBroadcast](conststd:VclPtrSwAnnotationWinSwPostItMgr::GetOrCreateAnnotationWindow(SwAnnotationItemrItem) SwFormatField*=const_cast:unique_ptrSwAnnotationItemp=std:move*i) switchpFormatHint-Which())
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 9 caseSwFormatFieldHintWhich::INSERTED: #include<officecfg/OfficeCommon.hxx> #POSTIT_MINIMUMSIZE_WITH_METAp>pPostIt.disposeAndClear) {
java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 33 break; } // get field to be inserted from hint (pField-IsFieldInDoc( { boolbEmpty=!else(aAnchorAInFooter&aAnchorBInFooter SwAnnotationItem*pItem=InsertItem(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if(bEmpty&&!mvPostItFields.empty()) (true);
(nType == CommentNotificationType::RedlinedDeletion ? "RedlinedDeletion" : pItem-> } else { .().getY; } break } caseSwFormatFieldHintWhich::REMOVED: SwFormatFieldHintWhich::REDLINED_DELETION:
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 { if(!Field) { bWasRemoved=CheckForRemovedPostIts // tdf#143643 ensure relayout on undo of insert comment aAnnotationput("",utl:toISO8601(if(-mbPendingLayout=true mbLayout break; }mlPageBorder->} RemoveItem(pField);
LOKhasdisabledtiledannotations,emitannotationcallbacks java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 (rIDRA) autotypepFormatHint-Which*pFormatField<SwFormatField>&BC); lcl_CommentNotification(mpView,returnfalse; } break; //rather unhelpfully that "something changed" so you may process the same java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 { if(-GetView=mpView Focus(rBC break; } caseSwFormatFieldHintWhich{ caseSwFormatFieldHintWhich::RESOLVED(rHint.()=SfxHintId::SwFormatField) { SwFormatField*bAllInvalidated&m_rFilter(pField) for(autoconst&postItField:mvPostItFields) { ifjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 { if(postItField->mpPostIt) { postItField->mpPostIt->SetPostItText(); mbLayout=true; >ForwardrBC,rHint; }
/IfLOKhasdisabledtiledannotationsemitannotationcallbacks if(comphelper::LibreOfficeKit::isActive { if(SwFormatFieldHintWhich:CHANGED==pFormatHint>Which()) lcl_CommentNotification(mpView,CommentNotificationType::Modify,postItField.get{ else lcl_CommentNotificationmpView,CommentNotificationType::esolvepostItField.get) } ; } break; } } } ->lOffset=; { constSfxStyleSheetModifiedHint*pStyleHint=static_cast<ifareinSplitNodeCutoperation,not{ for(onstautopostItField:mvPostItFields { autopField;java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 } } else { SfxHintId&postItField:mvPostItFields switch(StartListening(const_cast<&>*pField); { caseSfxHintId::ModeChanged: { if(mbReadOnlym_rFilter() { SetReadOnlyState mbLayoutbTop{ } break; ::ocChanged: { ifmpView->()/itissuperfluousmaycauseproblemstriggeredlayouting { pop_back(; java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 / ationPostUserEvent(this,java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 100 break java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 SfxHintId:LanguageChanged: { SetSpellChecking) break; } caseSfxHintId::SwSplitNodeOperation: ifareCut,donoteandthenaddagain,aswilljava.lang.StringIndexOutOfBoundsException: Index 118 out of bounds for length 118 bDeleteNote=!mbDeleteNote; break} } caseSfxHintId:: { if(mpView->GetDocShell/* this code can be used once we want redline comments in the Sidebar { // field to be removed is the broadcaster OSL_FAIL("NotificationforremovedSwFormatFieldwasnot|pItemmPageRect.java.lang.StringIndexOutOfBoundsException: Index 86 out of bounds for length 24 RemoveItem } break; } default:break java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 } }
voidSwPostItMgr::whileit { if boolbOldScrollbarpPage-bScrollbar SfxRequestaRequest(mpView->GetViewFrame(),SID_TOGGLE_NOTES); ->xecViewOptions); }
&mvPostItFields java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 // field to get the focus is the broadcaster forbRemoved=;
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 9 [aPageNumelseifvisiblePostIt-() java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 (!(); !mpWrtShell->GetViewOptions()-{ { SfxRequestaRequest(mpView->GetViewFrame(),SID_TOGGLE_RESOLVED_NOTES mpView-ExecViewOptions(Request=true; } postItField->mpPostIt{ MakeVisible(postItField-(postItField-GetBroadcasterpItem) } else { /wedonotwanttoseethenotesanymore-OptionsWriterViewNotes -=; } }
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 }
{ { *mpPostItjava.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30 { // if CalcRects() was forced and an event is still pending: remove it EndListeningpBroadcast) Application::pBroadcast-mpPostIt->HasChildPathFocus() mnEventId=nullptrif(ContainerSize>(-GetDoc)getIDocumentState()YrsRemoveComment }
.erase(); boolbRepair=false; PreparePageContainer { &((mpWrtShell() mvSidebarItems)
java.lang.StringIndexOutOfBoundsException: Range [79, 9) out of bounds for length 9 ->(*pWrtShellsuperexpensiverelayoutandrenderofApplication:LINK,SwPostItMgr,CalcHdl; pPostIt>; OSL_FAIL; bRepaircaseSwFormatFieldHintWhichSAL_INFO(.yrs",YRSGetOrCreateAnnotationWindow.mpPostIt(constautopPostIt:aCreatedPostItsjava.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 continue; } constaOldAnchorRect->maLayoutInfomPosition; java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 constSwNodeOffsetnOldStartNodeIdx(pItem-if(bEnableMapMode) constsal_Int32nOldStartContent(pItem-maLayoutInfomnStartContent; -; // update layout information (*aItem)-mpPostIt java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 const::sw::mark::MarkBase*pAnnotationMark= pTextAnnotationField!=nullptr?pTextAnnotationField->GetAnnotationMark():nullptr; if(pAnnotationMark{ { SwPostItHelper::getLayoutInfos( -maLayoutInfo, pItem->GetAnchorPosition(), pAnnotationMark<>pPostItbWasRemoved } else {
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 LayoutInfo,pItem->GetAnchorPosition()void::rawNotesForPage(utputDevice*,sal_uInt32nPage) } } for(autoconst&pItem:mPages[nPage]-::ongaPostItHeight=0 ||pItem->maLayoutInfo.mPosition!=aOldAnchorRect |->mLayoutStatus=eOldLayoutStatus ||SwFormatFieldHintWhich:CHANGED |-maLayoutInfomnStartContent!mpWrtShell-getIDocumentSettingAccess.((DocumentSettingIdBROWSE_MODE) java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
// show notes in right order in navigator /java.lang.StringIndexOutOfBoundsException: Index 76 out of bounds for length 76 ifmvPostItFieldssize()>1) ItFieldsbegin)mvPostItFields.(),comp_pos
/sortitemsrightvector,so?-GetMinimumSizeWithoutMeta for(autoconst&pItem:mvPostItFields) { ifSwPostItHelper} { (pItem-mpPostIt) pItem-elseostItMgr:Scrollconsttools:Longjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 continue
if(SwPostItHelper::HIDDEN==pItem // only the visible postits are used for the final layout if(!mpWrtShell->GetViewOptions()->IsShowHiddenChar()) if(pItem->mpPostIt) ->=rue; continue; } }
ols:aPageNum=pItem>maLayoutInfo.mnPageNumber; if(aPageNum>mPages.size()) java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13 consttools::ULongnNumberOfPages=mPagesbreak mPages.reserve(aPageNum); fortools:j0<nNumberOfPages;+jjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 SfxHintId:Dying: { mPagesaPageNum-1]>mvSidebarItemsSwFormatFieldpFormatField&-GetFormatField)java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 Num1-mPageRect=pItem-maLayoutInfo.mPageFrame mPages[-]eSidebarPosition-maLayoutInfomeSidebarPosition }
if(!bChangejava.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 { tools::LongnLayoutHeight (>) { if} bChange=true; } } { mPagesmnEventId ;
java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 13 } }
(bRepairjava.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18 CheckForRemovedPostIts();
voidSwPostItMgr::PreparePageContainer) { // we do not just delete the SwPostItPageItem, so offset/scrollbar is not lost tools::LonglPageSize=mpWrtShell->::getLayoutInfos(pItem>aLayoutInfo,pItem-GetAnchorPosition; tools::LonglContainerSize=mPages.size();
(<lPageSizejava.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 35 { mPages.reserve(); Longi0ilPageSizelContainerSizei) mPages.emplace_back(new }} elseif(lContainerSize>lPageSize) { java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17 { mPages.pop_back(); } } for(autoconst&page:mPages) { page->mvSidebarItems.clear(); ifmvPostItFields.empty()) page->bScrollbar=false; } }
VclPtr<SwAnnotationWin>SwPostItMgr::GetOrCreateAnnotationWindowelse { VclPtr<SwAnnotationWin>pPostIt} if(!pPostIt) { pPostIt=rItem.GetSidebarWindow(mpView} *this); pPostIt->InitControls(); pPostIt->SetReadonly(mbReadOnly); rItem.mpPostItdowantseethenotesanymore-OptionsWriter-ViewNotes #ifENABLE_YRS
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 #endif mpAnswer) { if(pPostIt->GetPostItField()->GetParentPostItId()!=java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21 pPostIt->java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9 }ifbUpdate)
}
rCreated=true; } returnrItem.mpPostIt; }
voidSwPostItMgr::LayoutPostIts() { constboolbLoKitActive=comphelper::if(AverageHeight<GetMinimumSizeWithMetajava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52 constbTiledAnnotationscomphelper:LibreOfficeKit:isTiledAnnotations) constfor(autoconst:aVisiblePostItList)
//loop over all pages and do the layout // - create SwPostIt if necessary } /necessaryforallPostItstogether boolbUpdate=false; for(std::<SwPostItPageItem>&pPage) { // only layout if there are notes on this pageSwPostItMgr:HasScrollbarsconst if(!postItFieldboolbEnableMapModepEditWin>MapModeEnabled()java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 { std:<*;; ng0;
forautoconst&pItem-lContainerSizei+ { ifPop()java.lang.StringIndexOutOfBoundsException: Index 29 out of bounds for length 29 { boolbCreated=false; VclPtr<SwAnnotationWin>pPostIt=GetOrCreateAnnotationWindow(*pItem,bCreated); if(bCreated) annotationwindowwascreatedforexistingnot // laid out comment. ->(); }
pItem GetColorAnchor pPostIt->SetSidebarPosition
if(pPostIt{ pPostIt->(truejava.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
if(pPage->eSidebarPosition==sw::sidebarwindows: { // x value for notes positioning mlPageBorder=mpEditWin->LogicToPixel(Point(mpEditWin-LogicToPixelPoint0mPagesaPage]mPageRect(-aSidebarheight)Y)-(ostIt-GetPosPixel)(pPostItGetSizePixel.(); //bending point mlPageEnd= mpWrtShell0 ?pItem->maLayoutInfo.mPagePrtArea.Left() :pPage->mPageRect.Left()+350; } elseif(pPage->eSidebarPosition==sw+njava.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12 { // x value for notes positioning mlPageBorder=mpEditWin->LogicToPixel(Point(pPage->mPageRect.Right(),0)).X()boolSwPostItMgr:(sal_uInt16aDirectiontools::ULongaPageconst //bending point mlPageEnd= mpWrtShell->getIDocumentSettingAccess().//bending point
pPostIt-GetPostItTextHeight(<-GetMinimumSizeWithoutMeta ?} :pPostIt->GetPostItTextHeight()) +pPostIt->()java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71 pPostItranslateTopPosition(-mbFocus=false; Y-GetInitialAnchorDistance(), GetSidebarWidth(true), aPostItHeight, mlPageEnd) }
if(pItem-(aVisiblePostItList->.(),lNeededHeight; { mbLayout=true; pPostIt->GrabFocus(); >=false; } // only the visible postits are used for the final layout aVisiblePostItList. if(bShowNotes) lNeededHeight } else// we don't want to see it { VclPtr<SwAnnotationWin>pPostIt=pItem->{ if(pPostIt) pPostIt->HideNote()bScrollbars; } SwFormatField*pFormatField=&(pItem->GetFormatField()); SwFormatFieldHintWhichnWhich=SwFormatFieldHintWhich::INSERTED
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
if(!aVisiblePostItList.empty()&{ {
pPage->bScrollbar=LayoutByPage(aVisiblePostItList,{ if(Page>) { pPage->lOffset=0; } elseif(sal_Int32nScrollSize=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->LogicToPixel(Size(0,pPage->mPageRect.Height())).Height()-2*GetSidebarScrollerHeight(); tools::LonglOffset=-1*nScrollSize*(aVisiblePostItList.size()-aAvailableHeight/nScrollSize); if(pPage->lOffset<lOffset) pPage->lOffset=lOffset; //Notifyaboutajustinsertedcomment. bUpdate=(bOldScrollbarifaNextPostIt=; const::LongaSidebarheightpPage-bScrollbarmpEditWin>PixelToLogic((Size(0, /* TODO -enlargeallnotestillGetNextBorder(),asweresizedtoaveragevaluebefore
*/ //let's hide the ones which overlap the page for (autoconst& visiblePostIt : aVisiblePostItList)
{ if (pPage->lOffset != 0)
{
bool bBottom = mpEditWin->PixelToLogic(Point(0,visiblePostIt->VirtualPos().Y()+visiblePostIt- java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
} if ( bBottom && bTop )
{
tiledrendering, make sure that only // view that has the comment focus emits callbacks, // so the editing view jumps to the comment, but // not the others. bool ->mpPostIt-GrabFocusToDocument) if (!bTiledPainting) // No focus -> disable callbacks.
comphelper::LibreOfficeKit::setTiledPainting(!visiblePostIt->HasChildPathFocus());
visiblePostIt->ShowNote(); if (!bTiledPainting)
comphelper::LibreOfficeKit::setTiledPaintingif (Update)
} else
{ if mpEditWin>(Point(,->VirtualPos)Y))Y(<(pPage-mPageRectTop(+))
{ if ( pPage->eSidebarPosition == java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
-) ( .size
t java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 if}
:Notify ,constSfxHintrHint >mbLayoutHeight
else
visiblePostIt->AddPostIts
SwPostItMgr( java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39 elseif (java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
visiblePostIt pItem:lPageSize-()java.lang.StringIndexOutOfBoundsException: Index 55 out of bounds for length 54
pPage.Bottom)java.lang.StringIndexOutOfBoundsException: Index 91 out of bounds for length 91
} for =.size
}
} else
(autoconstvisiblePostIt:aVisiblePostItList)
{
visiblePostIt->java.lang.StringIndexOutOfBoundsException: Index 13 out of bounds for length 13
}
ifpostItFieldmpPostIt
{
postItField->mpPostIt->HideNote(); if (postItField-> (pPostIt java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
.mpPostIt ;
SetActiveSidebarWin(nullptr);
postItField->mpPostIt->GrabFocusToDocument( java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
OSL_FAIL(NotesSidePanepainted rects pagecalculated!;
}
}
if ( bRepair )
CheckForRemovedPostIts();
}
// scrollbar area is enough
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
mbLayouting)
mbLayouting tenecessary for PostIts
java.lang.StringIndexOutOfBoundsException: Index 95 out of bounds for length 95 for (constauto& pPostIt
{
lcl_CommentNotification:: -GetSidebarItem)java.lang.StringIndexOutOfBoundsException: Index 101 out of bounds for length 101
}
(Notes but ([--Offset&(>)|(aPage lScrolljava.lang.StringIndexOutOfBoundsException: Index 108 out of bounds for length 108 returnfalse;
}
auto aItem = mPagesmlPageBorder=mpEditWinPoint-java.lang.StringIndexOutOfBoundsException: Index 100 out of bounds for length 83
-java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
*} if ((*aItem)->mpPostItjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ const tools::Long aSidebarheight = mPages[aPage-1}
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20 return
else
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
}
void SwPostItMgr /
{=aVisiblePostItList(java.lang.StringIndexOutOfBoundsException: Index 58 out of bounds for length 58
assert(nPage < mPages.size
return; forjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
{
SwAnnotationWin* pPostIt = pItem->mpPostIt >nvalidate(GetTopScrollRectaPage)); if mpView()-GetDoc().GetFieldTypeSwFieldIdsOUString -(Size,GetSidebarScrollerHeight
java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
Point
pPostIt->DrawForPage(pOutDev, aPoint);
}
}
voidif(ConfirmDeleteAll(pWrtShell>(), ))
{ for (const std::unique_ptr<SwAnnotationItem if136540-prevent scrollingcursor deletionannotations
{
SwAnnotationWin* if (!pPostIt) continue;
bool= (,*pView,aFilter2java.lang.StringIndexOutOfBoundsException: Index 84 out of bounds for length 83
mpEditWin->EnableMapMode();
rRenderContext HasActiveSidebarWin&
Point aOffset(mpEditWin->PixelToLogic(pPostIt->GetPosPixel()));
MapMode aMapMode(rRenderContext.GetMapMode());
aMapMode.SetOrigin(aMapMode.GetOriginjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
rRenderContext.Pop();
(EnableMapMode
mpEditWin aStackmvPostItFields *pViewGetDocShell( );
java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
}
void SwPostItMgr::Scroll(const tools::Long lScroll,const tools::ULong
{
OSL_ENSURE((lScroll % GetScrollSize() )==0,"SwPostItMgr::Scroll: scrolling by wrong value"); // do not scroll more than necessary up or down if ( ((mPages[ { return;
constbool bOldUp =ArrowEnabledKEY_PAGEUPaPage) constbool bOldDown = ArrowEnabled(KEY_PAGEDOWN,aPage); const tools::Long aSidebarheight = mpEditWin->PixelToLogic(Size(0,GetSidebarScrollerHeight())).Height(); for(utoconst& item : mPagesaPage]->mvSidebarItems)
{
SwAnnotationWin* pPostIt = item->mpPostIt; // if this is an answer, we should take the normal position and not the real, slightly moved position
pPostIt->SetVirtualPosSize(pPostIt->GetPosPixel(),pPostIt->GetSizePixel());
pPostIt>ranslateTopPosition);
if (item->mbShow)
{ bool bBottom = mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y()+pPostIt->VirtualSize().Height())).Y bool bTop = mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y() if ( bBottom && bTop)
{
pPostIt->ShowNote();
} else
{ if ( mpEditWin->PixelToLogic(Point(0,pPostIt->VirtualPos().Y())).Y() < (mPages /note not overlap, butwe beover the lower border
{ if([aPage1]>eSidebarPosition =sw::sidebarwindowsSidebarPosition::)
pPostIt-> java.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25 elseif (mPages[aPage-1] *)-TranslateTopPosition (i)-VirtualPos)Y) (*i)->VirtualSize()Height;
pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect }
} else
}
{
pPostIt->ShowAnchorOnly(Point(mPages[aPage-1]->mPageRect.Left(),mPages[aPage-1]->mPageRect.Bottom())); else mPages-]-eSidebarPosition ::sidebarwindowsSidebarPosition::) iflTranslatePos
}
}
}
}
mPages[aPage-1]->lOffset += lScroll; if != (KEY_PAGEUPaPage |(OldDown=ArrowEnabled(KEY_PAGEDOWN,aPage))
{
mpEditWin->Invalidate(GetBottomScrollRect(aPage)); returnbScrollbarsjava.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
mpEditWin-{
}
}
voidSwPostItMgrAutoScroll( * pPostIt,const tools::ULong aPage )
{ // otherwise all notes are visible if (!mPages[aPage-1]->bScrollbar) return;
const java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 constbBottom-) constbool bTop = mpEditWin-> std<SwFormatField:iterator vFormatFieldsbegin(;j! vFormatFields() +)
( &bTop
{ const
pChildPostIt-SetParentName->GetNamejava.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 if(pParentPostIt-GetName.() &&pParentPostIt-GetName)== pChildPostIt>GetParentName()) // e.g aDiff= 61 POSTIT_SCROLL=50 --> lScroll = 100
GetScrollSize(;
assert(nScrollSize); const tools::Long lScroll = bBottom ? (aDiff + ( nScrollSize - (aDiff
Scroll(lScroll, aPage);
}
}
void SwPostItMgr::MakeVisible
{
tools: aPage -; // we don't know the page yet, let's find it ourselves
aRewriter
{ for (autoconst& item : page->mvSidebarItems)
{ ifpChildPostIt>(pParentPostIt>()java.lang.StringIndexOutOfBoundsException: Index 74 out of bounds for length 74
{
aPage = n+1; break;
}
}
++n;
} if!-1)
AutoScroll(pPostIt,aPage);
tools::Rectangle aNoteRect (Point(pPostIt->GetPosPixel(). if (!aNoteRect.IsEmpty())
mpWrtShellMakeVisible(mpEditWinPixelToLogicaNoteRect);
}
bool SwPostItMgr::ArrowEnabled(sal_uInt16 aDirection,tools::ULong aPage (bEmpty& !mvPostItFields(java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
{ switch (aDirection)
{ case KEY_PAGEUP:
{ return{
} case KEY_PAGEDOWN.isposeAndClear(java.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
mvPostItFields.(); return (!BorderOverPageBorder(aPage));
default: returnfalse;
}
}
ColorstaticboolConfirmDeleteAll(constSwView& pView const OUString& sText)
{ if *i->ranslateTopPosition( lMoveDown);
{ if (Application::GetSettings().GetStyleSettings return COL_WHITE;} else return COL_NOTES_SIDEPANE_ARROW_ENABLEDjava.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
} else
{ return COL_NOTES_SIDEPANE_ARROW_DISABLED;
}
}
bool SwPostItMgr::LayoutByPage(std::vector<SwAnnotationWin else
{ /*** General layout idea:***/ // - if we have space left, we always move the current one up,
//otherwise next down // - first all notes are resized // - then the real layout starts
/ const = false;
:LonglTopBorder .Top ;
tools::Long lBottomBorder = aBorder.Bottom const tools::Long lVisibleHeight = lBottomBorder - lTopBorder; //aBorder.GetHeight() ; else
tools =java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47 else
/doall resizings if (nPostItListSize > 0 && lVisibleHeight
{ // ok, now we have to really resize and adding scrollbars const tools::Long lAverageHeight = (lVisibleHeight - nPostItListSize*GetSpaceBetween()) / nPostItListSize; if (lAverageHeight<GetMinimumSizeWithMeta())
{
bScrollbars = true;
lTopBorder += GetSidebarScrollerHeight() + 10;
lBottomBorder -= (GetSidebarScrollerHeight() + 10); for(utoconst& visiblePostIt : aVisiblePostItList
visiblePostIt->SetSize(Size(visiblePostIt-
} else
{ for (autoconst& visiblePostIt : aVisiblePostItList)
{
visiblePostIt(( lAverageHeight
visiblePostIt->SetSize(Size(visiblePostIt->VirtualSize().getWidth break
}
}
}
//start the real layout so nothing overlaps anymore if (aVisiblePostItList.size()>1)
{ int =java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
bDone; // if no window is moved anymore we are finished while (!bDone)
{
loop++;
bDone =
tools::Long lSpaceUsedreturn bScrollbars for(auto i = aVisiblePostItList.td:vectorSwFormatField>SwPostItMgrUpdatePostItsParentInfojava.lang.StringIndexOutOfBoundsException: Index 66 out of bounds for length 66
{ autoaNextPostIt i;
++aNextPostIt;
if(NextPostIt =aVisiblePostItList.nd)
{
lTranslatePos = ( (*i)->VirtualPos().Y() + (*i)->VirtualSize().Height()) -
lTranslatePos >) // note windows overlaps the next one
{
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 (::vectorSwFormatField*>:iterator=vFormatFieldsbegin! .end;j+) // then we also jump into, so we move the current one up and the next one down if *VirtualPos.) |(i.())
{ // we have space left, so let's move the current one up
{
{ ifif (
(*i)->TranslateTopPosition(-1*(lTranslatePosjava.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 else
(*i)->TranslateTopPosition bCursor
; else
{
tools::Long lMoveUp pNewPostIt-ifasNotes&ShowNotes
(*i-TranslateTopPosition-* lMoveUpjava.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 if ((*aNextPostIt)->IsFollow
(*aNextPostIt else
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
} else
{
no leftleft movetheone java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73 if ((*aNextPostIt)-java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
(*aNextPostIt)->TranslateTopPosition(lTranslatePos (.size> aPage1) else returnfalse;
}
} else !() |!())
{ // the first one could overlap the topborder instead of a second noteaPoint-(aPointPixel; if (i==aVisiblePostItList.begin())
{
tools::Long lMoveDown = lTopBorder - (*i)->VirtualPos().Y(); // we hit the note's sidebar
{
bDone = falseconsttools:ULong nPageNum
(*i)->TranslateTopPosition( lMoveDown);
}
}
} if(aNextPostIt->sFollow) java.lang.StringIndexOutOfBoundsException: Index 53 out of bounds for length 53
lSpaceUsed += (*i)->VirtualSize().Height()java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 else
lSpaceUsed()-VirtualSize(.Height GetSpaceBetween(java.lang.StringIndexOutOfBoundsException: Index 87 out of bounds for length 87
} else
//(*i) is the last visible item auto aPrevPostItpRet pPostIt;
-
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 iflTranslatePos0
{ return pRet if java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ if ( (*i)->IsFollow() ) const tools:ULong SwPostItHelpergetPageInfoSwAnnotationWin* =GetSidebarWin) else
;
} else
{
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
} 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! & (*iifpField) {
{
bDone;
(*)-TranslateTopPosition(lBottomBorder -(return
}
}
} // security check so we don't loop forever
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
OSL_FAIL("PostItMgr::Layout(): java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 break;
}
}
} else
// only one left, make sure it is not hidden at the top or bottom auto i = aVisiblePostItList
lTranslatePos -()VirtualPos) if (lTranslatePos>0)
{
*-(lTranslatePos();
}
lTranslatePos = lBottomBorder - ((*i)->VirtualPos().Y()+ (*i)->VirtualSize aStack, *pView()java.lang.StringIndexOutOfBoundsException: Index 72 out of bounds for length 72 if (lTranslatePos<0)
java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 9
(*i)->TranslateTopPosition(lTranslatePos);
}
} return bScrollbars;
}
for (std::vector<SwFormatField*>::iterator i = vFormatFields.begin(); i != vFormatFields.end( if ( {
{
SwPostItField*pChildPostIt =static_cast<SwPostItField>((*i->GetField());
if (pChildPostIt->GetParentId() != 0 || !pChildPostIt
{ for(::vectorSwFormatField
{
SwPostItField pDlg->tartExecuteAsync if (pChildPostIt->GetParentId() != 0 && pParentPostIt->GetParaId() == pChildPostIt->GetParentId())
{ if (bPx)
pChildPostIt->SetParentName(pParentPostIt->GetName()); return->()>PixelToLogic FormatAllaNewAttr; elseif (!pParentPostIt->GetName( pDlg->disposeOnce)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
pChildPostIt->SetParentPostItId(pParentPostIt->GetPostItId());
ItGetName)
}
}
}
} return vFormatFields;
}
for(auto pFormatField : vFormatFields)
InsertItem(pFormatField, bCheckExistence, bFocus); // if we just added the first one we have to update the view for centering if( && !mvPostItFieldsempty
PrepareView(true);
}
xChanges)java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
}
pDlg->disposeOnce();
}
;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
std::unique_ptr<SwPostItMgr::CommentDeleteFlagsRestore> SwPostItMgr::ConfigureForCommentDelete()
{ if (!mpWrtShell->IsRedlineOn())
{;//No changesno todisable it if ( [1eSidebarPosition:sidebarwindows:LEFT return /Formatis enough handledeleted comments inredlines
stdunique_ptrCommentDeleteFlagsRestore> new } aSize -PixelToLogic(0)() ->(SizeGetSidebarScrollerHeightHeight
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
// 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 void SwPostItMgr::Delete(const OUString& rAuthor)
{
OUString :ULongnPageNum=wPostItHelpergetPageInfo(, pLayout,rPointLogicjava.lang.StringIndexOutOfBoundsException: Index 96 out of bounds for length 96
sQuestion = sQuestion.replaceAll("%AUTHOR (!nPageNum) if(ConfirmDeleteAll->GetView),sQuestionjava.lang.StringIndexOutOfBoundsException: Index 60 out of bounds for length 60 return;
// tdf#136540 - prevent scrolling to cursor during deletion of annotations constboolbUnLockView !->IsViewLocked);
mpWrtShell
IsPostitFieldWithAuthorOf aFilter(rAuthor);
IDocumentRedlineAccess const& rIDRA(mpWrtShell->getIDocumentRedlineAccess());
IsFieldNotDeleted aFilter2(rIDRA, aFilter)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
auto =(); while ( mpEditWin: SwPostItMgrGetBottomScrollRect ::ULong const
{
(mpWrtShell>(*pField))
mpWrtShell->DelRight();
}
restoreGuard:aAnchorPosX
-(java.lang.StringIndexOutOfBoundsException: Index 26 out of bounds for length 26
PrepareView();
->
(aPageRect() GetSidebarWidth( )mpEditWin/
(
LayoutPostItsjava.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
mpWrtShell->LockView(false);
}
void SwPostItMgr::Delete(sal_uInt32 nPostItId)
{
mpWrtShell->StartAllAction();
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
mpActivePostIt->GetPostItField()->GetPostItId() {
{
SetActiveSidebarWin(nullptr);
}
SwRewriter aRewriter;
.UndoArg1)java.lang.StringIndexOutOfBoundsException: Index 73 out of bounds for length 73
mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );
IsPostitFieldWithPostitId aFilter(nPostItId);
IDocumentRedlineAccess (SidebarRectIsEmpty)
IsFieldNotDeletedPoint =aPage- =::sidebarwindows:java.lang.StringIndexOutOfBoundsException: Index 103 out of bounds for length 103
mvPostItFields-()aFilter2 const:(RightGetSidebarBorderWidth -PixelToLogicSize20Width swsidebarwindowsNONE if (pField && mpWrtShell->GotoField(*pField))
{ auto restoreGuard = ConfigureForCommentDelete();
mpWrtShell Point java.lang.StringIndexOutOfBoundsException: Index 71 out of bounds for length 71
}
mpWrtShell->EndUndo();
PrepareView
mpWrtShell
mbLayout = true;
CalcRects
LayoutPostIts();
}
void SwPostItMgr::DeleteCommentThread(sal_uInt32 nPostItId true
{
:Office:DisplayWidthFactornFactor)java.lang.StringIndexOutOfBoundsException: Index 81 out of bounds for length 81
aRewriter((;
// We have no undo ID at the moment.
IsPostitFieldWithPostitId
FieldDocWatchingStack aStack(mvPostItFields, *mpView->GetDocShell(), aFilter);
=.); // pField now contains our AnnotationWin object if (pField) {
* GetSidebarWin)/
>(;
}
PrepareView();
mpWrtShell->EndAllAction();
mbLayout
CalcRects();
LayoutPostItsreturnjava.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
}
void SwPostItMgr--(java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{
(nableMapMode
SwRewriterjava.lang.StringIndexOutOfBoundsException: Index 25 out of bounds for length 25
aRewriter.AddRule(UndoArg1, SwResId(STR_CONTENT_TYPE_SINGLE_POSTIT));
:: SwPostItMgr(bool java.lang.StringIndexOutOfBoundsException: Index 63 out of bounds for length 63 // We have no undo ID at the moment.
// pField now contains our AnnotationWin object if (pField) {
SwAnnotationWin* pWin = GetSidebarWin(pField item> &&itemjava.lang.StringIndexOutOfBoundsException: Range [48, 38) out of bounds for length 38
-()
}
FieldDocWatchingStack aStack(mvPostItFields, *mpView; const SwFormatField* pField = aStack.pop(); // pField now contains our AnnotationWin object if (pField) cas aColorConfigsvtools);
SwAnnotationWinGetSidebarWin) caseaColorConfig(:).;
}
PrepareView();
-EndAllActionjava.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
mbLayout = true;
(
:doubledouble>((LogicWidth)java.lang.StringIndexOutOfBoundsException: Index 92 out of bounds for length 92
}
void SwPostItMgr::Delete()
{ if// otherwise, GetActivePostIt() would still hold our old postit return;
SetActiveSidebarWin(nullptr mpWrtShell>InvalidateLayout)java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
SwRewriter;
aRewriter.AddRule(UndoArg1, SwResId(STR_DELETE_ALL_NOTES) );
mpWrtShell->StartUndo( SwUndoId::DELETE, &aRewriter );(;
IsPostitField
&(mpWrtShell();
IsFieldNotDeleted aFilter2(rIDRA, aFilter
(, mpView)
sal_uInt16 mpWrtShell>()>(); auto restoreGuard = ConfigureForCommentDelete(); while (const SwFormatField
{ if (mpWrtShell->GotoField(*pField))
mpWrtShell->DelRight();
}
restoreGuard.reset();
IsPostitFieldWithPostitId aFilter(nPostItId);
FieldDocWatchingStack java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1 const SwFormatField* pField // pField now contains our AnnotationWin object if (pField)
{
SwAnnotationWin* pWinconstFraction (mpEditWinGetMapMode).etScaleYjava.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61
pWin->SetAsRoot();
}
PrepareView();
->EndAllAction);
mbLayout = true;
CalcRects();
LayoutPostIts();
}
void SwPostItMgr::MoveSubthreadToRoot(const swpostItField-mpPostIt>UpdateColors)
{
std::vector<std::unique_ptr<SwAnnotationItem>
first = std::find_if(mvPostItFields.begin(
[&pNewRoot](const std::unique_ptr<SwAnnotationItem>& pField) { return pField-
}); if (first == mvPostItFields.end())
sal_uInt16aResult=pWin>GetOutlinerView()->StartSearchAndReplace( aItem );
std if(aResult
aPostItIds.insert(pNewRoot->GetPostItField()->GetPostItId());
middle = first + 1; while (middle != mvPostItFields.end()
&& aPostItIds.contains((*middle)->mpPostIt->GetPostItField()->GetParentPostItId()))
{
aPostItIds.insert((*middle)->mpPostIt->GetPostItField()->GetPostItId());
++middle;
} if} return;
last = middle while (last != mvPostItFields.end()
&& (*last)->mpPostIt->java.lang.StringIndexOutOfBoundsException: Index 12 out of bounds for length 12
++last; if (last == middle) return
std::rotate(first, middle, last);
CalcRects();
LayoutPostIts();
}
void SwPostItMgr::ExecuteFormatAllDialog(SwView& rView)
{ if (mvPostItFields.empty()) return;
sw::annotation:java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
sw::annotation::SwAnnotationWin *pWin = pOrigActiveWin; if (!pWin)
{ for (autoconst& postItField
{
pWin = postItFieldsal_uInt16 SwPostItMgr:(SvxSearchItem * pItem if (pWin) break;
}
} if (!pWin) return;
SetActiveSidebarWin(pWin);
pWin-GetOutlinerView);
SfxItemSet aEditAttr(pOLV->GetAttribs());
SfxItemPool(SwAnnotationShell:(rView auto xDlgAttr = std::make_shared<SfxItemSetFixed<XATTR_FILLSTYLE, XATTR_FILLCOLOR, EE_ITEMS_START, EE_ITEMS_END>>(*pPool);
->utaEditAttr;
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
VclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateSwCharDlg(rView.GetFrameWeld(nullptr
pDlg->StartExecuteAsync(
[this, pDlg, xDlgAttr=std::move(xDlgAttr), pOrigActiveWin] (sal_Int32 nResult)->void
{ if (nResult == RET_OK)
{ auto {
aNewAttrpDlg((
FormatAll(aNewAttr);
}
pDlg->disposeOnce();
SetActiveSidebarWin(pOrigActiveWin);
}
)
}
void:FormatAllconstSfxItemSet&)
{
mpWrtShell()java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 33
SwRewriter aRewriter; returnsal_Int32(POSTIT_MINIMUMSIZE_WITH_META );
mpWrtShell- ((()
forautoconst& postItField mvPostItFields
java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5 if (!postItField->mpPostIt){ continue;
OutlinerView* pOLV = postItField->mpPostIt->GetOutlinerView(); //save old selection
ESelection for(autoconst&postItField :mvPostItFields
/selectall
OutlinerrOutliner =pOLV->etOutliner()
sal_Int32} if :HasActiveAnnotationWinjava.lang.StringIndexOutOfBoundsException: Index 48 out of bounds for length 48
pOLV->SelectRange(0, nParaCount); //set new char properties
pOLV->SetAttribs(rNewAttr); //restore old selection
pOLV->SetSelection(aOrigSel); // tdf#91596 store updated formatting in SwField
postItField->mpPostIt->UpdateData();
}
mpWrtShell->EndUndo();
PrepareView();
mpWrtShellvoidSwPostItMgr::UpdateColors()
mbLayout = true;
CalcRects() ->UpdateData)java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
LayoutPostIts();
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
void SwPostItMgr::Hide( std::u16string_view rAuthor )
{ for (autoconst& postItFieldSvxSearchItemconst *pItem
{ if ( postItField-> if
sw::annotation::SwAnnotationWin*
{ returnvoid SwPostItMgr:UpdateResolvedStatusconstsw:::SwAnnotationWintopNotejava.lang.StringIndexOutOfBoundsException: Index 88 out of bounds for length 88
}
SwAnnotationWin*SwPostItMgr::GetNextPostIt(sal_uInt16 aDirection,
SwAnnotationWin* aPostIt )
{ if(mvPostItFields.size>)
{ auto std::find_ifmvPostItFieldsbegin( return {}java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 14
[&aPostIt](const std::unique_ptr<SwAnnotationItem>& pField) { return pField->mpPostIt if (i == mvPostItFields.end()) return nullptr;
iNextPostIti; if (aDirection == KEY_PAGEUP)
{ if
{ return nullptr;
--iNextPostIt;
} else
{
++iNextPostIt; if ( iNextPostIt == mvPostItFields.end() )
{ return nullptr;
}
} // let's quit, we are back at the beginning if ( (*iNextPostIt)->mpPostIt == aPostIt) return nullptr; return (*iNextPostIt)->mpPostIt;
} else return nullptrsw:sidebarwindowsSidebarPosition ::(constPoint
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
tools::Long SwPostItMgr::GetNextBorder()
{
( != nullptr
{ for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
{ if ((*b)->mpPostIt == ->(A11yDispose( nullptr, nullptr, &rSidebarWin );
{ auto
++aNext; bool bFollow = (aNext != pPage->mvSidebarItems.end()) && (*aNext)->mpPostIt->IsFollow(); if ( pPage->bScrollbar || bFollow ) boolbRet )java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23 return -1;
} else
{ //if this is the last item, return the bottom border otherwise the next item if (aNext == pPage->mvSidebarItems.end()) return mpEditWin->LogicToPixel(Point(0,pPage->mPageRect.Bottom else return (*aNext)->mpPostIt->GetPosPixel().Y() - GetSpaceBetween();
}
}
}
}
OSL_FAIL("SwPostItMgr::GetNextBorder(): We have to find a next border here"); return -1;
}
void SwPostItMgr::SetShadowState(const SwPostItField* pField,bool bCursor)
{ if (pField)
{ if pField!mShadowState.mpShadowField
{ if(mShadowState.mpShadowField)
{ // reset old one if still alive // TODO: does not work properly if mouse and cursor was set
sw::annotation::SwAnnotationWin* pOldPostIt =
GetAnnotationWinvoidSwPostItMgr:ShowHideResolvedNotesbool visible) { if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
pOldPostItSetViewState:);
} //set new one, if it is not currently edited
sw::annotation::SwAnnotationWin* pNewPostIt = GetAnnotationWin(pField); if (*b)-mpPostIt>SetResolved(true
{
pNewPostIt} //remember our new field
mShadowState.mpShadowField = pField;
mShadowState.bMouse = false;
}
} if
mShadowState.bCursor = true; else
mShadowState.bMouse = true;
} else
{ if (mShadowState.mpShadowField)
{ if (bCursor)
mShadowState.bCursor = false; else
mShadowState.bMouse = false; if *>->SetResolvedresolved
{ // reset old one if still alive
sw::annotation::SwAnnotationWin* pOldPostIt = } if (pOldPostIt && pOldPostIt->Shadow() && (pOldPostIt->Shadow()->GetShadowState() != SS_EDIT))
{
pOldPostIt->SetViewState(ViewState::NORMAL);
mShadowState.mpShadowField = nullptr;
}
}
}
}
}
bool SwPostItMgr::IsHit(const Point& aPointPixel)
{ if (!HasNotes() || !ShowNotes()) returnfalse;
const Point aPoint = mpEditWin->PixelToLogic(aPointPixel);
tools::Rectangle aRect(GetSidebarRect(aPoint)); if (!aRect.Contains(aPoint)) returnfalse;
// we hit the note's sidebar // let's now test for the arrow area
SwRect aPageFrame; const tools::ULong nPageNum
= SwPostItHelper::getPageInfo(aPageFrame, mpWrtShell->GetLayout(), aPoint); if (!nPageNum) returnfalse; if (mPages[nPageNum - 1]->bScrollbar) return ScrollbarHit(nPageNum, aPoint); returnfalse;
}
vcl::Window* SwPostItMgr::IsHitSidebarWindow(const Point& rPointLogic)
{
vcl::Window* pRet = nullptr;
if (HasNotes() && ShowNotes())
{ bool bEnableMapMode = !mpEditWin->IsMapModeEnabled(); if (bEnableMapMode)
mpEditWin->EnableMapMode();
for (const std::unique_ptr<SwAnnotationItem>& pItem : mvPostItFields)
{
SwAnnotationWin* pPostIt = pItem->mpPostIt; if (!pPostIt) continue;
if (pPostIt->IsHitWindow(rPointLogic))
{
pRet = pPostIt; break;
}
}
if (bEnableMapMode)
mpEditWin->EnableMapMode(false);
}
// find first valid note
SwAnnotationWin *pFirstPostIt = nullptr; for (autoconst& postItField : mvPostItFields)
{
pFirstPostIt = postItField->mpPostIt; if (pFirstPostIt) break;
}
//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 tools::Long aAnchorX = pFirstPostIt->Anchor()
? mpEditWin->LogicToPixel( Point(static_cast<tools::Long>(pFirstPostIt->Anchor()->GetSixthPosition().getX()),0)).X()
: 0; const tools::Long aAnchorY = pFirstPostIt->Anchor()
? mpEditWin->LogicToPixel( Point(0,static_cast<tools::Long>(pFirstPostIt->Anchor()->GetSixthPosition().getY()))).Y() + 1
: 0; if (Point(aAnchorX,aAnchorY) == pFirstPostIt->GetPosPixel()) return;
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_uInt16 nZoom = mpWrtShell->GetViewOptions()->GetZoom(); double nFactor = static_cast<double>(mpEditWin->LogicToPixel(Point(nLogicWidth, 0)).X())
/ 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> xChanges(
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
{ bool bEnableMapMode = !mpWrtShell->GetOut()->IsMapModeEnabled();
sal_uInt16 nZoom = mpWrtShell->GetViewOptions()->GetZoom(); if (comphelper::LibreOfficeKit::isActive() && !bEnableMapMode)
{ // The output device is the tile and contains the real wanted scale factor. double fScaleX = double(mpWrtShell->GetOut()->GetMapMode().GetScaleX());
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();
}
void SwPostItMgr::ShowHideResolvedNotes(bool visible) { for (autoconst& 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 the // 'resolved' state of each descendant of the top notes to the resolved state // of the top note. bool resolved = topNote->IsResolved(); for (autoconst& pPage : mPages)
{ for(auto b = pPage->mvSidebarItems.begin(); b!= pPage->mvSidebarItems.end(); ++b)
{ if((*b)->mpPostIt->GetTopReplyNote() == topNote) {
(*b)->mpPostIt->SetResolved(resolved);
}
}
}
}
¤ 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.199Bemerkung:
¤
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.