| 159 | } |
| 160 | |
| 161 | int BoxSplitter::getBreakPosition(const sptr<HorizontalBox>& hb, int i) { |
| 162 | if (hb->_breakPositions.empty()) return -1; |
| 163 | |
| 164 | if (hb->_breakPositions.size() == 1 && hb->_breakPositions[0] <= i) |
| 165 | return hb->_breakPositions[0]; |
| 166 | |
| 167 | size_t pos = 0; |
| 168 | for (; pos < hb->_breakPositions.size(); pos++) { |
| 169 | if (hb->_breakPositions[pos] > i) { |
| 170 | if (pos == 0) return -1; |
| 171 | return hb->_breakPositions[pos - 1]; |
| 172 | } |
| 173 | } |
| 174 | |
| 175 | return hb->_breakPositions[pos - 1]; |
| 176 | } |
| 177 | |
| 178 | /************************************* TeXEnvironment implementation ******************************/ |
| 179 |
nothing calls this directly
no outgoing calls
no test coverage detected