Commit b66df684 authored by Joao Oliveira's avatar Joao Oliveira Committed by Albert Astals Cid

Implemented support for setAppearanceText defined on Poppler

parent b7249ce8
...@@ -341,6 +341,13 @@ class OKULARCORE_EXPORT FormFieldText : public FormField ...@@ -341,6 +341,13 @@ class OKULARCORE_EXPORT FormFieldText : public FormField
* @since 1.5 * @since 1.5
*/ */
virtual void setInternalText( const QString &text ); virtual void setInternalText( const QString &text );
/**
* Set the text which should be rendered by the PDF.
*
* @since 1.9
*/
virtual void setAppearanceText( const QString &text ) = 0;
protected: protected:
FormFieldText(); FormFieldText();
......
...@@ -292,6 +292,15 @@ void PopplerFormFieldText::setText( const QString& text ) ...@@ -292,6 +292,15 @@ void PopplerFormFieldText::setText( const QString& text )
m_field->setText( text ); m_field->setText( text );
} }
void PopplerFormFieldText::setAppearanceText( const QString& text )
{
#ifdef HAVE_POPPLER_0_80
m_field->setAppearanceText( text );
#else
Q_UNUSED( text );
#endif
}
bool PopplerFormFieldText::isPassword() const bool PopplerFormFieldText::isPassword() const
{ {
......
...@@ -79,6 +79,7 @@ class PopplerFormFieldText : public Okular::FormFieldText ...@@ -79,6 +79,7 @@ class PopplerFormFieldText : public Okular::FormFieldText
Okular::FormFieldText::TextType textType() const override; Okular::FormFieldText::TextType textType() const override;
QString text() const override; QString text() const override;
void setText( const QString& text ) override; void setText( const QString& text ) override;
void setAppearanceText( const QString& text ) override;
bool isPassword() const override; bool isPassword() const override;
bool isRichText() const override; bool isRichText() const override;
int maximumLength() const override; int maximumLength() const override;
......
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