| 1796 | } |
| 1797 | |
| 1798 | void Editor::LinesSplit ( int pixelWidth ) |
| 1799 | { |
| 1800 | if ( !RangeContainsProtected ( targetStart, targetEnd ) ) { |
| 1801 | if ( pixelWidth == 0 ) { |
| 1802 | PRectangle rcText = GetTextRectangle(); |
| 1803 | pixelWidth = rcText.Width(); |
| 1804 | } |
| 1805 | int lineStart = pdoc->LineFromPosition ( targetStart ); |
| 1806 | int lineEnd = pdoc->LineFromPosition ( targetEnd ); |
| 1807 | const char *eol = StringFromEOLMode ( pdoc->eolMode ); |
| 1808 | UndoGroup ug ( pdoc ); |
| 1809 | for ( int line = lineStart; line <= lineEnd; line++ ) { |
| 1810 | AutoSurface surface ( this ); |
| 1811 | AutoLineLayout ll ( llc, RetrieveLineLayout ( line ) ); |
| 1812 | if ( surface && ll ) { |
| 1813 | unsigned int posLineStart = pdoc->LineStart ( line ); |
| 1814 | LayoutLine ( line, surface, vs, ll, pixelWidth ); |
| 1815 | for ( int subLine = 1; subLine < ll->lines; subLine++ ) { |
| 1816 | pdoc->InsertCString ( |
| 1817 | static_cast<int> ( posLineStart + ( subLine - 1 ) * strlen ( eol ) + |
| 1818 | ll->LineStart ( subLine ) ), |
| 1819 | eol ); |
| 1820 | targetEnd += static_cast<int> ( strlen ( eol ) ); |
| 1821 | } |
| 1822 | } |
| 1823 | lineEnd = pdoc->LineFromPosition ( targetEnd ); |
| 1824 | } |
| 1825 | } |
| 1826 | } |
| 1827 | |
| 1828 | int Editor::SubstituteMarkerIfEmpty ( int markerCheck, int markerDefault ) |
| 1829 | { |
nothing calls this directly
no test coverage detected