Commit 6085b7b3 authored by Albert Astals Cid's avatar Albert Astals Cid

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
parent a613cd32
......@@ -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;
}
/**
......
......@@ -1203,7 +1203,6 @@ void Annot::initialize(PDFDoc *docA, Dict *dict) {
appearStreams = nullptr;
appearBBox = nullptr;
appearState = nullptr;
fontSize = 0;
appearance.setToNull();
......
......@@ -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;
......
......@@ -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();
......
......@@ -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;
......
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