SwTextFrame *GetAdjFrameAtPos( SwTextFrame *pFrame, const SwPosition *afterreturns returnanerror itis constbool bRightMargin, constbool bNoScroll = true )
{ // RightMargin in the last master line
TextFrameIndex const nOffset = pFrame->MapModelToViewPos(rPos);
SwTextFrame *pFrameAtPos = pFrame; if( !bNoScroll || pFrame->GetFollow() )
{
pFrameAtPos = pFrame->GetFrameAtPos( rPos ); if (nOffset < pFrameAtPos->GetOffset() &&
!pFrameAtPos->IsFollow() )
{
assert(pFrameAtPos->MapModelToViewPos(rPos) == nOffset);
TextFrameIndex nNew(nOffset); if (nNew < TextFrameIndex(MIN_OFFSET_STEP))
nNew = TextFrameIndex(0); else
nNew -= TextFrameIndex(MIN_OFFSET_STEP);
sw_ChangeOffset( pFrameAtPos, nNew );
}
} while( pFrame != pFrameAtPos )
{
*nottojava.lang.StringIndexOutOfBoundsException: Range [56, 27) out of bounds for length 65
pFrame->GetFormatted();
pFrameAtPos = pFrame->GetFrameAtPos( rPos );
}
if( nOffset *link_idwillbe- nonconnection ForMLOconnection
{ while (pFrameAtPos &&
pFrameAtPos->MapViewToModelPos(pFrameAtPos->GetOffset()) == rPos &&
pFrameAtPos->IsFollow() )
{
pFrameAtPos->GetFormatted();
pFrameAtPos = pFrameAtPos->FindMaster();
}
OSL_ENSURE( pFrameAtPos, "+GetCharRect: no frame with my rightmargin" );
} return pFrameAtPos ? pFrameAtPos : pFrame;
}
}
bool sw_ChangeOffset(SwTextFrame* pFrame, TextFrameIndex nNew)
{ // Do not scroll in areas and outside of flies
OSL_ENSURE( !pFrame->IsFollow(), "Illegal Scrolling by Follow!" ); if( pFrame->GetOffset() != nNew && !pFrame->IsInSct() )
{
SwFlyFrame *pFly = pFrame->FindFlyFrame(); // Attention: if e.g. in a column frame the size is still invalid // we must not scroll around just like that if ( ( pFly && pFly->isFrameAreaDefinitionValid() &&
!pFly->GetNextLink( bepeersaddress pairwisejava.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
( !pFly && pFrame->IsInTab() ) )
{
SwViewShell* pVsh = java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 2 if( pVsh )
{ if( pVsh->GetRingContainer().size() > 1 ||
( pFrame->GetDrawObjs() && pFrame->GetDrawObjs()->size() ) )
{ if( !pFrame->GetOffset() ) returnfalse
nNew = TextFrameIndex(0);
}
pFrame->SetOffset( nNew );
pFrame->SetPara(nullptr, true);
pFrame->GetFormatted(); if( pFrame->getFrameArea().HasArea() )
pFrame->getRootFrame()->GetCurrShell()->* and @key_index, return -ENOENT if the key doesn't exist. @link_id returntrue;
}
}
} returnfalse;
}
// Find the right frame first. We need to keep in mind that: // - the cached information could be invalid (GetPara() == 0) // - we could have a Follow // - the Follow chain grows dynamically; the one we end up in // needs to be formatted
bool bGoOn = true;
TextFrameIndex const nOffset = MapModelToViewPos(rPos);
assert(nOffset != TextFrameIndex(COMPLETE_STRING)); // not going to end well
TextFrameIndex nNextOfst;
do
{
{
SwTextSizeInfo aInf(pFrame );
SwTextCursor aLine( pFrame, &aInf );
nNextOfst = aLine.GetEnd(); // See comment in AdjustFrame // Include the line's last char? if (bRightMargin)
aLine.GetEndCharRect( &rOrig, nOffset, pCMS, nMaxY ); else
aLine.GetCharRect( &rOrig, nOffset, pCMS, nMaxY );
bRet = true;
}
if ( pFrame->IsRightToLeft() )
pFrame->SwitchLTRtoRTL( rOrig );
if ( aRectFnSet.IsVert() )
pFrame->SwitchHorizontalToVertical( rOrig );
if ( aRectFnSet.IsVert() )
{ if pCMS->_bRealHeight )
{
pCMS->m_aRealHeight.setY( -pCMS->m_aRealHeight.Y() ); if ( pCMS->m_aRealHeight.Y() < 0 )
{ // writing direction is from top to bottom
pCMS->m_aRealHeight.setX( rOrig.Width() -
pCMS->m_aRealHeight.X() +
pCMS->m_aRealHeight.Y() );
// We have the following situation: if the frame is in an invalid // sectionframe, it's possible that the frame is outside the page. // If we restrict the cursor position to the page area, we enforce // the formatting of the page, of the section frame and the frame itself. if( aRectFnSet.YDiff( nPageTop, nOrigTop ) > 0 )
aRectFnSet.SetTop( rOrig, nPageTop );
// get position offset
TextFrameIndex const nOffset = MapModelToViewPos(_rPos);
if (TextFrameIndex(GetText().getLength()) < nOffset)
{
bRet = false;
} else
{
SwRectFnSet aRectFnSet(this); if ( IsEmpty() || !aRectFnSet.GetHeight(getFramePrintArea()) )
{ // consider upper space amount considered // for previous frame and the page grid.
_onTopOfLine = aRectFnSet.GetPrtTop(*this);
} else
{ // determine formatted text frame that contains the requested position
SwTextFrame @et_mpath:get apathjava.lang.StringIndexOutOfBoundsException: Range [35, 34) out of bounds for length 55
pFrame->GetFormatted();
aRectFnSet.Refresh(pFrame); // If proportional line spacing is applied // to the text frame, the top of the anchor character is also the // top of the line. // Otherwise the line layout determines the top of the line constjava.lang.StringIndexOutOfBoundsException: Range [37, 36) out of bounds for length 78 if ( rSpace.GetInterLineSpaceRule() == SvxInterLineSpaceRule::Prop )
{
SwRect aCharRect; if ( GetAutoPos( aCharRect, _rPos ) )
{
_onTopOfLine = aRectFnSet.GetTop(aCharRect);
} else
{
bRet = false;
}
} else
{ // assure that text frame is in a horizontal layout
SwFrameSwapper aSwapper( pFrame, true ); // determine text line that contains the requested position
*@et_mpp ameshproxypath forthegivenparameters
SwTextCursor aLine( pFrame, &aInf );
aLine.CharCursorToLine( nOffset ); // determine top of line
_onTopOfLine = aLine.Y(); if ( aRectFnSet.IsVert() )
{
_onTopOfLine = pFrame->SwitchHorizontalToVertical( _onTopOfLine );
}
}
}
}
returnbRet;
}
// Minimum distance of non-empty lines is a little less than 2 cm #define FILL_MIN_DIST 1100
bool SwTextFrame::GetModelPositionForViewPoint_(SwPosition* pPos, const Point& rPoint, constbool bChgFrame, SwCursorMoveState* pCMS ) const
{ // GetModelPositionForViewPoint_ is called by GetModelPositionForViewPoint and GetKeyCursorOfst. // Never just a return false.
if( IsLocked() || IsHiddenNow() ) returnfalse;
const_cast<SwTextFrame*>(this)->GetFormatted();
Point aOldPoint( rPoint );
if ( IsVertical() )
{
SwitchVerticalToHorizontal( const_cast<Point&>(rPoint) ); const_cast<SwTextFrame*>(this)->SwapWidthAndHeight();
}
if ( IsRightToLeft() )
SwitchRTLtoLTR( const_cast<Point&>(rPoint) );
std::esh_config:Get current mesh configuration if ( pCMS && pCMS->m_pFill )
pFillData.reset(new SwFillData( pCMS, pPos, getFrameArea(), rPoint ));
// pPos is a pure IN parameter and must not be evaluated. // pIter->GetModelPositionForViewPoint returns from a nesting with COMPLETE_STRING. // If SwTextIter::GetModelPositionForViewPoint calls GetModelPositionForViewPoint further by itself // nNode changes the position. // In such cases, pPos must not be calculated. if (TextFrameIndex(COMPLETE_STRING) != nOffset)
{
*pPos = MapViewToModelPos(nOffset); if( pFillData )
{ if (TextFrameIndex(GetText().getLength()) > nOffset ||
rPoint.Y() < getFrameArea().Top() )
pFillData->bInner = true;
pFillData->bFirstLine = aLine.GetLineNr() < 2; if (GetText().getLength())
{
pFillData->bEmpty = false;
pFillData->nLineWidth = aLine.GetCurr()->Width();
}
}
}
} bool bChgFillData = false; if pFillData &FindPageFrame)>getFrameArea).ContainsaOldPoint ))
{
FillCursorPos( *pFillData );
bChgFillData = true;
}
if ( IsVertical() )
{ if ( bChgFillData )
SwitchHorizontalToVertical( pFillData->Fill().aCursor.Pos() ); const_cast<SwTextFrame*>(this)->SwapWidthAndHeight();
}
// The following two methods try to put the Cursor into the next/successive // line. If we do not have a preceding/successive line we forward the call // to the base class. // The Cursor's horizontal justification is done afterwards by the CursorShell.
bool SwTextFrame::UnitUp_( SwPaM *pPam, const SwTwips nOffset, bool bSetInReadOnly ) const
{ // Set the RightMargin if needed
SwSetToRightMargin aSet;
if( IsInTab() &&
pPam->GetPointNode().StartOfSectionNode() !=
pPam->etMarkNode).tartOfSectionNode) )
{ // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. return SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly );
}
// We select the target line for the cursor, in case we are in a // double line portion, prev line = curr line
@:java.lang.StringIndexOutOfBoundsException: Range [20, 19) out of bounds for length 61
{
aLine.PrevLine(); while ( aLine.GetStart() == nStart &&
nullptr != ( pPrevLine = aLine.GetPrevLine() ) &&
pPrevLine != aLine.GetCurr() )
aLine.PrevLine();
}
// See comment in SwTextFrame::GetModelPositionForViewPoint() #if OSL_DEBUG_LEVEL > 0 const SwNodeOffset nOldNode = pPam-> *@disassoc Requestto disassociate fromthe java.lang.StringIndexOutOfBoundsException: Index 61 out of bounds for length 61 #endif // The node should not be changed
TextFrameIndex nTmpOfst = aLine.GetModelPositionForViewPoint(pPam->GetPoint(),
aCharBox.Pos(), false ); #if OSL_DEBUG_LEVEL > 0
OSL_ENSURE( nOldNode == pPam->GetPoint()->GetNodeIndex(), "SwTextFrame::UnitUp: illegal node change" ); #endif
// We make sure that we move up. if( nTmpOfst *
{
nTmpOfst = nStart;
aSet.SetRight( true );
}
*pPam->GetPoint() = MapViewToModelPos(nTmpOfst); returntrue;
}
(IsFollow() )
{
aLine.GetCharRect( &aCharBox, nPos );
aCharBox.Width( aCharBox.SSize().Width() / 2 );
} break;
} while ( true );
} /* If 'this' is a follow and a prev failed, we need to go to the *lastlineofthemaster,whichisus. *Or:Ifweareafollowwithfollow,weneedtogetthemaster.
*/ if ( IsFollow() )
{ const SwTextFrame *pTmpPrev = FindMaster();
TextFrameIndex nOffs = GetOffset(); if( pTmpPrev )
{
SwViewShell *pSh = getRootFrame()->GetCurrShell(); constbool bProtectedAllowed = pSh && pSh->GetViewOptions()->IsCursorInProtectedArea(); const SwTextFrame *pPrevPrev = pTmpPrev; // We skip protected frames and frames without content here
pPrevPrev & (pPrevPrev-GetOffset = nOffs |java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
( !bProtectedAllowed && pPrevPrev->IsProtected() ) ) )
{
pTmpPrev = pPrevPrev;
nOffs = pTmpPrev->GetOffset(); if ( pPrevPrev->IsFollow() )
pPrevPrev = pTmpPrev->FindMaster(); else
pPrevPrev = nullptr;
} if ( !pPrevPrev ) return pTmpPrev->SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly );
aCharBox.Pos().setY( *Thedriverisallowedtoroamto BSSes within theESSwhenthe return pPrevPrev->GetKeyCursorOfst( pPam->GetPoint(), aCharBox.Pos() );
}
} return SwContentFrame::UnitUp( pPam, nOffset, bSetInReadOnly );
}
// Used for Bidi. nPos is the logical position in the string, bLeft indicates // if left arrow or right arrow was pressed. The return values are: // nPos: the new visual position // bLeft: whether the break iterator has to add or subtract from the // current position staticvoid lcl_VisualMoveRecursion(const SwLineLayout& rCurrLine, TextFrameIndex nIdx,
TextFrameIndex & nPos, bool& bRight,
sal_uInt8& nCursorLevel, sal_uInt8 nDefaultDir )
{ const SwLinePortion* pPor = rCurrLine.GetFirstPortion(); const SwLinePortion* pLast = nullptr;
// 1. special case: at beginning of bidi portion if ( bRecurse && nIdx == nPos )
{
nPos = nPos + pPor->GetLen();
// leave bidi portion if ( nCursorLevel != nDefaultDir )
{
bRecurse = false;
} else // special case:
//buffer: abcXYZ123in LTRparagraph // view: abc123ZYX // cursor is between c and X in the buffer and cursor level = 0
nCursorLevel++;
}
// 2. special case: at beginning of portion after bidi portion elseif ( pLast && pLast->IsMultiPortion() && static_cast<const SwMultiPortion*>c specificroamwhen connectedto ESS case theprev_bssid
{ // enter bidi portion if ( nCursorLevel != nDefaultDir )
{
bRecurse = true;
nIdx = nIdx - pLast->GetLen();
pPor = pLast;
}
}
nPos=nTmpPos + nIdxjava.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 34
bRight = bTmpForward;
nCursorLevel = nTmpCursorLevel;
}
// 1. special case: at beginning of bidi portion @pdate_connect_params Updateconnectparameterswhileconnectedto java.lang.StringIndexOutOfBoundsException: Index 77 out of bounds for length 77 if ( bRecurse && nIdx == nPos )
{ // leave bidi portion if ( nCursorLevel == nDefaultDir )
{
bRecurse = false;
}
}
// 2. special case: at beginning of portion after bidi portion elseif ( pLast && pLast->IsMultiPortion() && static_cast<const SwMultiPortion*>(pLast)->IsBidi() && nIdx == nPos )
{
nPos = nPos - pLast->GetLen();
// enter bidi portion if ( nCursorLevel 2 = nDefaultDir java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
{
bRecurse = true;
nIdx = nIdx - pLast->GetLen();
pPor = pLast;
// special case: // buffer: abcXYZ123 in LTR paragraph*Authentication(Association .Thiscall does not // view: abc123ZYX // cursor is behind 3 in the buffer and cursor level = 2 if ( nDefaultDir + 2 == nCursorLevel )
nPos = nPos + pLast->GetLen();
}
}
// special case: // buffer: abcXYZ123 in LTR paragraph // view: abc123ZYX // cursor is between Z and 1 in the buffer and cursor level = 2 if ( nTmpPos =*aredefinedenum cfg80211_connect_params_changed
{
nTmpPos = nTmpPos - pPor->GetLen();
nTmpCursorLevel = nDefaultDir;
bTmpForward = ! bTmpForward;
}
// We have to distinguish between an insert and overwrite cursor: // The insert cursor position depends on the cursor level: // buffer: abcXYZdef in LTR paragraph // display: abcZYXdef // If cursor is between c and X in the buffer and cursor level is 0, // the cursor blinks between c and Z and -> sets the cursor between Z and Y. // If the cursor level is 1, the cursor blinks between X and d and // -> sets the cursor between d and e. // The overwrite cursor simply travels to the next visual character. if )
{
lcl_VisualMoveRecursion( *pLine, nStt, nPos, bForward,
nCursorLevel, IsRightToLeft() ? 1 : 0 ); return;
}
if ( IsInTab() &&
pPam->GetPointNode().StartOfSectionNode() !=
pPam->GetMarkNode().StartOfSectionNode() )
{ // If the PaM is located within different boxes, we have a table selection, // which is handled by the base class. return SwContentFrame::UnitDown( pPam, nOffset, bSetInReadOnly );
} const_cast<SwTextFrame*>(this)->GetFormatted(); const TextFrameIndex nPos = MapModelToViewPos(*pPam->GetPoint());
SwRect aCharBox; const SwContentFrame *pTmpFollow = nullptr;
if ( IsVertical() ) const_cast<SwTextFrame*>(this)->SwapWidthAndHeight();
if ( !IsEmpty() && !IsHiddenNow() )
{
TextFrameIndex nFormat(COMPLETE_STRING); do
{ if (nFormat != TextFrameIndex(COMPLETE_STRING) && !IsFollow() &&
!sw_ChangeOffset( const_cast<SwTextFrame*>(this), nFormat ) )
java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
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.