diff options
author | Albert Astals Cid <aacid@kde.org> | 2018-09-23 23:47:54 +0200 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2018-09-24 01:13:18 +0200 |
commit | b8b82412a8123369335c37e546cec38eaa460d05 (patch) | |
tree | b42f61fa290131b7c91e702e5a34c2dbe6e5d526 /poppler/TextOutputDev.h | |
parent | d5d6dd939e06cd8048d9d8090502915b0488b1dd (diff) |
More const
Marked some caches as mutable
Fixed an actual bug in page::text that was swapping the page cropbox in
each call
Diffstat (limited to 'poppler/TextOutputDev.h')
-rw-r--r-- | poppler/TextOutputDev.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/poppler/TextOutputDev.h b/poppler/TextOutputDev.h index e793401f..1af11909 100644 --- a/poppler/TextOutputDev.h +++ b/poppler/TextOutputDev.h @@ -84,28 +84,28 @@ public: TextFontInfo(const TextFontInfo &) = delete; TextFontInfo& operator=(const TextFontInfo &) = delete; - GBool matches(GfxState *state); - GBool matches(TextFontInfo *fontInfo); + GBool matches(GfxState *state) const; + GBool matches(const TextFontInfo *fontInfo) const; // Get the font ascent, or a default value if the font is not set - double getAscent(); + double getAscent() const; // Get the font descent, or a default value if the font is not set - double getDescent(); + double getDescent() const; // Get the writing mode (0 or 1), or 0 if the font is not set - int getWMode(); + int getWMode() const; #ifdef TEXTOUT_WORD_LIST // Get the font name (which may be NULL). - GooString *getFontName() { return fontName; } + const GooString *getFontName() const { return fontName; } // Get font descriptor flags. - GBool isFixedWidth() { return flags & fontFixedWidth; } - GBool isSerif() { return flags & fontSerif; } - GBool isSymbolic() { return flags & fontSymbolic; } - GBool isItalic() { return flags & fontItalic; } - GBool isBold() { return flags & fontBold; } + GBool isFixedWidth() const { return flags & fontFixedWidth; } + GBool isSerif() const { return flags & fontSerif; } + GBool isSymbolic() const { return flags & fontSymbolic; } + GBool isItalic() const { return flags & fontItalic; } + GBool isBold() const { return flags & fontBold; } #endif private: @@ -129,7 +129,7 @@ class TextWord { public: // Constructor. - TextWord(GfxState *state, int rotA, double fontSize); + TextWord(const GfxState *state, int rotA, double fontSize); // Destructor. ~TextWord(); |