| 558 | } |
| 559 | |
| 560 | bool Render::currentPageIsDoublePage() |
| 561 | { |
| 562 | if (currentIndex == 0 && Configuration::getConfiguration().getSettings()->value(COVER_IS_SP, true).toBool()) { |
| 563 | return false; |
| 564 | } |
| 565 | if (buffer[currentPageBufferedIndex]->isNull() || buffer[currentPageBufferedIndex + 1]->isNull()) { |
| 566 | return false; |
| 567 | } |
| 568 | if (imageRotation == 0 || imageRotation == 180) { |
| 569 | if (buffer[currentPageBufferedIndex]->height() > buffer[currentPageBufferedIndex]->width() && |
| 570 | buffer[currentPageBufferedIndex + 1]->height() > buffer[currentPageBufferedIndex + 1]->width()) { |
| 571 | return true; |
| 572 | } |
| 573 | } else if (imageRotation == 90 || imageRotation == 270) { |
| 574 | if (buffer[currentPageBufferedIndex]->width() > buffer[currentPageBufferedIndex]->height() && |
| 575 | buffer[currentPageBufferedIndex + 1]->width() > buffer[currentPageBufferedIndex + 1]->height()) { |
| 576 | return true; |
| 577 | } |
| 578 | } |
| 579 | return false; |
| 580 | } |
| 581 | |
| 582 | bool Render::nextPageIsDoublePage() |
| 583 | { |
no test coverage detected