| 1797 | return; |
| 1798 | } |
| 1799 | if (to < 0 || to >= _sections.Size()) |
| 1800 | { |
| 1801 | return; |
| 1802 | } |
| 1803 | |
| 1804 | HTMLSection& src = _sections[from]; |
| 1805 | HTMLSection& dest = _sections[to]; |
| 1806 | |
| 1807 | for (int i = 0; i < src.fields.Size(); i++) |
| 1808 | { |
| 1809 | HTMLField& fld = src.fields[i]; |
| 1810 | int index = dest.fields.Add(fld); |
| 1811 | dest.fields[index].indent += _indent; |
| 1812 | } |
| 1813 | } |
| 1814 | |
| 1815 | void CHTMLContainer::FormatSection(int s) |
| 1816 | { |
| 1817 | float maxLineWidth = GetPageWidth(); |
| 1818 | float minHeight = _sizeP; |
| 1819 | |
| 1820 | HTMLSection& section = _sections[s]; |
| 1821 | section.rows.Clear(); |
| 1822 | |
| 1823 | int r = section.rows.Add(); |
| 1824 | HTMLRow* row = §ion.rows[r]; |
| 1825 | row->firstField = 0; |
| 1826 | row->firstPos = 0; |
| 1827 | row->width = 0; |
| 1828 | row->align = HALeft; |
| 1829 | row->height = minHeight; |
| 1830 | |
| 1831 | HTMLFormat format = HFP; |
| 1832 | bool bold = false; |
| 1833 | Font* font = _fontP; |
| 1834 | float size = _sizeP; |
| 1835 | |
| 1836 | bool bottom = false; |
| 1837 | |
| 1838 | int n = section.fields.Size(); |
| 1839 | for (int f = 0; f < n; f++) |
| 1840 | { |
| 1841 | HTMLField& field = section.fields[f]; |
| 1842 | float lineWidth = maxLineWidth - field.indent; |
| 1843 | if (field.bottom) |
| 1844 | { |
| 1845 | bottom = true; |
| 1846 | } |
| 1847 | if (field.nextline) |
| 1848 | { |
| 1849 | row->lastField = f + 1; |
| 1850 | row->lastPos = 0; |
| 1851 | row->bottom = bottom; |
| 1852 | r = section.rows.Add(); |
| 1853 | row = §ion.rows[r]; |
| 1854 | row->firstField = f + 1; |
| 1855 | row->firstPos = 0; |
| 1856 | row->width = 0; |
no test coverage detected