Commit 47d5def5 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Add const

svn path=/trunk/kdegraphics/kpdf/; revision=234942
parent 1ad2dedb
......@@ -67,7 +67,7 @@ public:
// Does this device use beginType3Char/endType3Char? Otherwise,
// text in Type 3 fonts will be drawn with drawChar/drawString.
virtual GBool interpretType3Chars() { return gFalse; }
// Does this device need non-text content?
virtual GBool needNonText() { return gFalse; }
......@@ -133,7 +133,7 @@ public:
// of page. If found, sets the text bounding rectange and returns
// true; otherwise returns false.
GBool findText ( Unicode *s, int len, GBool top, GBool bottom, int *xMin, int *yMin, int *xMax, int *yMax );
//----- special QT access
bool findText ( const QString &str, int &l, int &t, int &w, int &h, bool top = 0, bool bottom = 0 );
......@@ -144,7 +144,7 @@ public:
QString getText ( const QRect &r );
public:
QPixmap * getPixmap() { return m_pixmap; };
QPixmap * getPixmap() const { return m_pixmap; };
private:
QPixmap * m_pixmap; // pixmap to draw into
......@@ -152,7 +152,7 @@ private:
TextPage * m_text; // text from the current page
private:
private:
QFont matchFont ( GfxFont *, fp_t m11, fp_t m12, fp_t m21, fp_t m22 );
void updateLineAttrs ( GfxState *state, GBool updateDash );
......
......@@ -43,22 +43,22 @@ public:
~PDFDoc();
// Was PDF document successfully opened?
GBool isOk() { return ok; }
GBool isOk() const { return ok; }
// Get the error code (if isOk() returns false).
int getErrorCode() { return errCode; }
int getErrorCode() const { return errCode; }
// Get file name.
GString *getFileName() { return fileName; }
GString *getFileName() const { return fileName; }
// Get the xref table.
XRef *getXRef() { return xref; }
XRef *getXRef() const { return xref; }
// Get catalog.
Catalog *getCatalog() { return catalog; }
Catalog *getCatalog() const{ return catalog; }
// Get base stream.
BaseStream *getBaseStream() { return str; }
BaseStream *getBaseStream() const { return str; }
// Get page parameters.
double getPageWidth(int page)
......@@ -84,14 +84,14 @@ public:
}
// Get number of pages.
int getNumPages() { return catalog->getNumPages(); }
int getNumPages() const { return catalog->getNumPages(); }
// Return the contents of the metadata stream, or NULL if there is
// no metadata.
GString *readMetadata() { return catalog->readMetadata(); }
GString *readMetadata() const { return catalog->readMetadata(); }
// Return the structure tree root object.
Object *getStructTreeRoot() { return catalog->getStructTreeRoot(); }
Object *getStructTreeRoot() const { return catalog->getStructTreeRoot(); }
// Display a page.
void displayPage(OutputDev *out, int page, double zoom,
......@@ -130,11 +130,11 @@ public:
#ifndef DISABLE_OUTLINE
// Return the outline object.
Outline *getOutline() { return outline; }
Outline *getOutline() const { return outline; }
#endif
// Is the file encrypted?
GBool isEncrypted() { return xref->isEncrypted(); }
GBool isEncrypted() const { return xref->isEncrypted(); }
// Check various permissions.
GBool okToPrint(GBool ignoreOwnerPW = gFalse)
......@@ -150,11 +150,11 @@ public:
GBool isLinearized();
// Return the document's Info dictionary (if any).
Object *getDocInfo(Object *obj) { return xref->getDocInfo(obj); }
Object *getDocInfoNF(Object *obj) { return xref->getDocInfoNF(obj); }
Object *getDocInfo(Object *obj) const { return xref->getDocInfo(obj); }
Object *getDocInfoNF(Object *obj) const { return xref->getDocInfoNF(obj); }
// Return the PDF version specified by the file.
double getPDFVersion() { return pdfVersion; }
double getPDFVersion() const { return pdfVersion; }
// Save this file with another name.
GBool saveAs(GString *name);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment