Add a new element to the list of partner TabVectors. Partners must be added in order of increasing y coordinate of the text line that makes them partners. Groups of identical partners are merged into one.
| 490 | // that makes them partners. |
| 491 | // Groups of identical partners are merged into one. |
| 492 | void TabVector::AddPartner(TabVector* partner) { |
| 493 | if (IsSeparator() || partner->IsSeparator()) |
| 494 | return; |
| 495 | TabVector_C_IT it(&partners_); |
| 496 | if (!it.empty()) { |
| 497 | it.move_to_last(); |
| 498 | if (it.data() == partner) |
| 499 | return; |
| 500 | } |
| 501 | it.add_after_then_move(partner); |
| 502 | } |
| 503 | |
| 504 | // Return true if other is a partner of this. |
| 505 | bool TabVector::IsAPartner(const TabVector* other) { |
no test coverage detected