glib/poppler-form-field.cc | 5 ++++- poppler/Annot.cc | 1 - poppler/Annot.h | 3 --- poppler/Form.cc | 4 ---- poppler/Form.h | 2 -- 5 files changed, 4 insertions(+), 11 deletions(-)
New commits: commit 6085b7b35b8ee6b0aab2d1b55064f79cb7e2c2fb Author: Albert Astals Cid <aa...@kde.org> Date: Fri Mar 23 16:46:09 2018 +0100 Make poppler_form_field_get_font_size return 0 It was doing that anyway but in a more complex way. Added a note into the docu so that people can volunteer to come and fix it if someone is using it diff --git a/glib/poppler-form-field.cc b/glib/poppler-form-field.cc index 982ce149..816cb896 100644 --- a/glib/poppler-form-field.cc +++ b/glib/poppler-form-field.cc @@ -138,6 +138,9 @@ poppler_form_field_get_id (PopplerFormField *field) * * Gets the font size of @field * + * WARNING: This function always returns 0. Contact the poppler + * mailing list if you're interested in implementing it properly + * * Return value: the font size of @field **/ gdouble @@ -145,7 +148,7 @@ poppler_form_field_get_font_size (PopplerFormField *field) { g_return_val_if_fail (POPPLER_IS_FORM_FIELD (field), 0); - return field->widget->getFontSize (); + return 0; } /** diff --git a/poppler/Annot.cc b/poppler/Annot.cc index 95498560..d5a66524 100644 --- a/poppler/Annot.cc +++ b/poppler/Annot.cc @@ -1203,7 +1203,6 @@ void Annot::initialize(PDFDoc *docA, Dict *dict) { appearStreams = nullptr; appearBBox = nullptr; appearState = nullptr; - fontSize = 0; appearance.setToNull(); diff --git a/poppler/Annot.h b/poppler/Annot.h index c1acc065..83c10b39 100644 --- a/poppler/Annot.h +++ b/poppler/Annot.h @@ -635,8 +635,6 @@ public: double getXMax(); double getYMax(); - double getFontSize() { return fontSize; } - void setRect(PDFRectangle *rect); void setRect(double x1, double y1, double x2, double y2); @@ -734,7 +732,6 @@ protected: Ref ref; // object ref identifying this annotation AnnotBorder *border; // Border, BS AnnotColor *color; // C - double fontSize; GBool ok; bool hasRef; diff --git a/poppler/Form.cc b/poppler/Form.cc index 2f5a48e1..820944e8 100644 --- a/poppler/Form.cc +++ b/poppler/Form.cc @@ -129,10 +129,6 @@ void FormWidget::getRect(double *x1, double *y1, double *x2, double *y2) const { widget->getRect(x1, y1, x2, y2); } -double FormWidget::getFontSize() const { - return widget ? widget->getFontSize() : 0.; -} - bool FormWidget::isReadOnly() const { return field->isReadOnly(); diff --git a/poppler/Form.h b/poppler/Form.h index 62e8a205..8c88c8d7 100644 --- a/poppler/Form.h +++ b/poppler/Form.h @@ -110,8 +110,6 @@ public: void setChildNum (unsigned i) { childNum = i; } unsigned getChildNum () { return childNum; } - double getFontSize() const; - const GooString *getPartialName() const; void setPartialName(const GooString &name); const GooString *getAlternateUiName() const; _______________________________________________ poppler mailing list poppler@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/poppler