--------------------------------------------------------------------------
| 1622 | |
| 1623 | //-------------------------------------------------------------------------- |
| 1624 | void GuiMLTextCtrl::reflow() |
| 1625 | { |
| 1626 | AssertFatal(mAwake, "Can't reflow a sleeping control."); |
| 1627 | freeLineBuffers(); |
| 1628 | mDirty = false; |
| 1629 | mScanPos = 0; |
| 1630 | |
| 1631 | mLineList = NULL; |
| 1632 | mLineInsert = &mLineList; |
| 1633 | |
| 1634 | mCurStyle = allocStyle(NULL); |
| 1635 | mCurStyle->font = allocFont((char *) mProfile->mFontType, dStrlen(mProfile->mFontType), mProfile->mFontSize); |
| 1636 | if(!mCurStyle->font) |
| 1637 | return; |
| 1638 | mCurStyle->color = mProfile->mFontColor; |
| 1639 | mCurStyle->shadowColor = mProfile->mFontColor; |
| 1640 | mCurStyle->shadowOffset.set(0,0); |
| 1641 | mCurStyle->linkColor = mProfile->mFontColors[GuiControlProfile::ColorUser0]; |
| 1642 | mCurStyle->linkColorHL = mProfile->mFontColors[GuiControlProfile::ColorUser1]; |
| 1643 | |
| 1644 | U32 width = getWidth(); |
| 1645 | |
| 1646 | mCurLMargin = 0; |
| 1647 | mCurRMargin = width; |
| 1648 | mCurJustify = LeftJustify; |
| 1649 | mCurDiv = 0; |
| 1650 | mCurY = 0; |
| 1651 | mCurX = 0; |
| 1652 | mCurClipX = 0; |
| 1653 | mLineAtoms = NULL; |
| 1654 | mLineAtomPtr = &mLineAtoms; |
| 1655 | |
| 1656 | mSentinel.point.x = width; |
| 1657 | mSentinel.point.y = 0; |
| 1658 | mSentinel.extent.x = 0; |
| 1659 | mSentinel.extent.y = 0x7FFFFF; |
| 1660 | mSentinel.nextBlocker = NULL; |
| 1661 | mLineStart = 0; |
| 1662 | mEmitAtoms = 0; |
| 1663 | mMaxY = 0; |
| 1664 | mEmitAtomPtr = &mEmitAtoms; |
| 1665 | |
| 1666 | mBlockList = &mSentinel; |
| 1667 | |
| 1668 | Font *nextFont; |
| 1669 | LineTag *nextTag; |
| 1670 | mTabStops = 0; |
| 1671 | mCurTabStop = 0; |
| 1672 | mTabStopCount = 0; |
| 1673 | mCurURL = 0; |
| 1674 | Style *newStyle; |
| 1675 | |
| 1676 | U32 textStart; |
| 1677 | U32 len; |
| 1678 | U32 idx; |
| 1679 | U32 sizidx; |
| 1680 | |
| 1681 | for(;;) |
no test coverage detected