| 1748 | } |
| 1749 | |
| 1750 | void Textblock::initLine1Offset (int wordIndex) |
| 1751 | { |
| 1752 | Word *word = words->getRef (wordIndex); |
| 1753 | |
| 1754 | /* Test whether line1Offset can be used. */ |
| 1755 | if (wordIndex == 0) { |
| 1756 | if (ignoreLine1OffsetSometimes && |
| 1757 | line1Offset + word->size.width > lineBreakWidth) { |
| 1758 | line1OffsetEff = 0; |
| 1759 | } else { |
| 1760 | int indent = 0; |
| 1761 | |
| 1762 | if (word->content.type == core::Content::WIDGET_IN_FLOW && |
| 1763 | word->content.widget->isBlockLevel()) { |
| 1764 | /* don't use text-indent when nesting blocks */ |
| 1765 | } else { |
| 1766 | if (core::style::isPerLength(getStyle()->textIndent)) { |
| 1767 | indent = core::style::multiplyWithPerLengthRounded |
| 1768 | (lineBreakWidth, getStyle()->textIndent); |
| 1769 | } else { |
| 1770 | indent = core::style::absLengthVal (getStyle()->textIndent); |
| 1771 | } |
| 1772 | } |
| 1773 | line1OffsetEff = line1Offset + indent; |
| 1774 | } |
| 1775 | } |
| 1776 | } |
| 1777 | |
| 1778 | /** |
| 1779 | * Align the line. |
nothing calls this directly
no test coverage detected