|
Revision 155, 2.1 kB
(checked in by jordi, 2 years ago)
|
The PDF document now can actually search for a text in a page and return the rectangles with the position of the found text. The rectangle is kept in a new class called DocumentRectangle? that just holds the rectangle corners' coordinates.
The DocumentLink? class has been also updated to use the new DocumentRectangle? class instead of holding the rectangles coordinates by itself.
|
| Line | |
|---|
| 1 |
|
|---|
| 2 |
|
|---|
| 3 |
|
|---|
| 4 |
|
|---|
| 5 |
|
|---|
| 6 |
|
|---|
| 7 |
|
|---|
| 8 |
|
|---|
| 9 |
|
|---|
| 10 |
|
|---|
| 11 |
|
|---|
| 12 |
|
|---|
| 13 |
|
|---|
| 14 |
|
|---|
| 15 |
|
|---|
| 16 |
|
|---|
| 17 |
|
|---|
| 18 |
#if !defined (__PDF_DOCUMENT_TEST_H__) |
|---|
| 19 |
#define __PDF_DOCUMENT_TEST_H__ |
|---|
| 20 |
|
|---|
| 21 |
#include <cppunit/extensions/HelperMacros.h> |
|---|
| 22 |
|
|---|
| 23 |
namespace ePDFView |
|---|
| 24 |
{ |
|---|
| 25 |
class PDFDocumentTest: public CppUnit::TestFixture |
|---|
| 26 |
{ |
|---|
| 27 |
CPPUNIT_TEST_SUITE (PDFDocumentTest); |
|---|
| 28 |
CPPUNIT_TEST (emptyDocument); |
|---|
| 29 |
CPPUNIT_TEST (fileNotFound); |
|---|
| 30 |
CPPUNIT_TEST (invalidFile); |
|---|
| 31 |
CPPUNIT_TEST (encryptedFile); |
|---|
| 32 |
CPPUNIT_TEST (validFile); |
|---|
| 33 |
CPPUNIT_TEST (relativePath); |
|---|
| 34 |
CPPUNIT_TEST (pageChange); |
|---|
| 35 |
CPPUNIT_TEST (pageRotate); |
|---|
| 36 |
CPPUNIT_TEST (pageZoom); |
|---|
| 37 |
CPPUNIT_TEST (pageRender); |
|---|
| 38 |
CPPUNIT_TEST (pageLinks); |
|---|
| 39 |
CPPUNIT_TEST (pageFindText); |
|---|
| 40 |
CPPUNIT_TEST_SUITE_END (); |
|---|
| 41 |
|
|---|
| 42 |
public: |
|---|
| 43 |
void setUp (void); |
|---|
| 44 |
void tearDown (void); |
|---|
| 45 |
|
|---|
| 46 |
void emptyDocument (void); |
|---|
| 47 |
void fileNotFound (void); |
|---|
| 48 |
void invalidFile (void); |
|---|
| 49 |
void encryptedFile (void); |
|---|
| 50 |
void validFile (void); |
|---|
| 51 |
void relativePath (void); |
|---|
| 52 |
void pageChange (void); |
|---|
| 53 |
void pageRotate (void); |
|---|
| 54 |
void pageZoom (void); |
|---|
| 55 |
void pageRender (void); |
|---|
| 56 |
void pageLinks (void); |
|---|
| 57 |
void pageFindText (void); |
|---|
| 58 |
|
|---|
| 59 |
private: |
|---|
| 60 |
PDFDocument *m_Document; |
|---|
| 61 |
DumbDocumentObserver *m_Observer; |
|---|
| 62 |
}; |
|---|
| 63 |
} |
|---|
| 64 |
|
|---|
| 65 |
#endif // !__PDF_DOCUMENT_TEST_H__ |
|---|