[poppler] 13 commits - fofi/FoFiType1C.cc glib/poppler-action.cc glib/poppler-document.cc glib/poppler-page.cc makefile.vc poppler/ArthurOutputDev.cc poppler/CairoOutputDev.cc poppler/CharCodeToUnicode.cc poppler/Error.cc poppler/Gfx.cc poppler/GlobalParams.cc poppler/JBIG2Stream.cc poppler/PageLabelInfo.cc poppler/XRef.cc qt4/src qt/poppler-document.cc qt/poppler-page.cc qt/poppler-private.h test/perf-test.cc utils/HtmlOutputDev.cc utils/pdftoppm.cc

Pino Toscano toscano.pino at tiscali.it
Mon Sep 24 02:50:40 PDT 2007


> diff-tree 7ba3f198a0651d2a7c91b7d9e10a5173dc3de0a3 (from
> ab1059f594cb9fccd8568ca2a535a363c7521daa) Author: Krzysztof Kowalczyk
> <kkowalczyk at tlapx60ubu.(none)>
> Date:   Mon Sep 24 00:32:37 2007 -0700
>
>     Even less compiler warnings.
>
> diff --git a/qt/poppler-document.cc b/qt/poppler-document.cc
> index bae8418..cd77151 100644
> --- a/qt/poppler-document.cc
> +++ b/qt/poppler-document.cc
> @@ -30,6 +30,14 @@
>
>  namespace Poppler {
>
> +static GooString *QStringToGooString(const QString &s) {
> +    int len = s.length();
> +    char *cstring = (char *)gmallocn(s.length(), sizeof(char));
> +    for (int i = 0; i < len; ++i)
> +      cstring[i] = s.at(i).unicode();
> +    return new GooString(cstring, len);
> +}
> +
>  Document *Document::load(const QString &filePath)
>  {
>    if (!globalParams) {
> diff --git a/qt/poppler-private.h b/qt/poppler-private.h
> index 5a5a421..227547a 100644
> --- a/qt/poppler-private.h
> +++ b/qt/poppler-private.h
> @@ -42,14 +42,6 @@ static QString unicodeToQString(Unicode*
>      return ret;
>  }
>
> -static GooString *QStringToGooString(const QString &s) {
> -    int len = s.length();
> -    char *cstring = (char *)gmallocn(s.length(), sizeof(char));
> -    for (int i = 0; i < len; ++i)
> -      cstring[i] = s.at(i).unicode();
> -    return new GooString(cstring, len);
> -}
> -
>  static QString UnicodeParsedString(GooString *s1) {
>      GBool isUnicode;
>      int i;
> diff --git a/qt4/src/poppler-document.cc b/qt4/src/poppler-document.cc
> index e34b1f2..5c21adf 100644
> --- a/qt4/src/poppler-document.cc
> +++ b/qt4/src/poppler-document.cc
> @@ -36,6 +36,16 @@
>
>  namespace Poppler {
>
> +  static GooString *QStringToGooString(const QString &s) {
> +      int len = s.length();
> +      char *cstring = (char *)gmallocn(s.length(), sizeof(char));
> +      for (int i = 0; i < len; ++i)
> +        cstring[i] = s.at(i).unicode();
> +      GooString *ret = new GooString(cstring, len);
> +      gfree(cstring);
> +      return ret;
> +  }
> +
>    int DocumentData::count = 0;
>
>    Document *Document::load(const QString &filePath, const QByteArray
> &ownerPassword, diff --git a/qt4/src/poppler-form.cc
> b/qt4/src/poppler-form.cc
> index c9f4239..51dc935 100644
> --- a/qt4/src/poppler-form.cc
> +++ b/qt4/src/poppler-form.cc
> @@ -29,6 +29,21 @@
>
>  namespace Poppler {
>
> +static GooString *QStringToUnicodeGooString(const QString &s) {
> +    int len = s.length() * 2 + 2;
> +    char *cstring = (char *)gmallocn(len, sizeof(char));
> +    cstring[0] = 0xfe;
> +    cstring[1] = 0xff;
> +    for (int i = 0; i < s.length(); ++i)
> +    {
> +      cstring[2+i*2] = s.at(i).row();
> +      cstring[3+i*2] = s.at(i).cell();
> +    }
> +    GooString *ret = new GooString(cstring, len);
> +    gfree(cstring);
> +    return ret;
> +}
> +
>  FormField::FormField(FormFieldData &dd)
>
>    : m_formData(&dd)
>
>  {
> diff --git a/qt4/src/poppler-private.h b/qt4/src/poppler-private.h
> index 35ed164..43a67c8 100644
> --- a/qt4/src/poppler-private.h
> +++ b/qt4/src/poppler-private.h
> @@ -50,31 +50,6 @@ namespace Poppler {
>          return ret;
>      }
>
> -    static GooString *QStringToGooString(const QString &s) {
> -        int len = s.length();
> -        char *cstring = (char *)gmallocn(s.length(), sizeof(char));
> -        for (int i = 0; i < len; ++i)
> -          cstring[i] = s.at(i).unicode();
> -        GooString *ret = new GooString(cstring, len);
> -        gfree(cstring);
> -        return ret;
> -    }
> -
> -    static GooString *QStringToUnicodeGooString(const QString &s) {
> -        int len = s.length() * 2 + 2;
> -        char *cstring = (char *)gmallocn(len, sizeof(char));
> -        cstring[0] = 0xfe;
> -        cstring[1] = 0xff;
> -        for (int i = 0; i < s.length(); ++i)
> -        {
> -          cstring[2+i*2] = s.at(i).row();
> -          cstring[3+i*2] = s.at(i).cell();
> -        }
> -        GooString *ret = new GooString(cstring, len);
> -        gfree(cstring);
> -        return ret;
> -    }
> -
>      static QString UnicodeParsedString(GooString *s1) {
>          if ( !s1 || s1->getLength() == 0 )
>              return QString();

Why where they moved out of the private header?
What's the problem with them being here?

-- 
Pino Toscano
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://lists.freedesktop.org/archives/poppler/attachments/20070924/2424105d/attachment.pgp 


More information about the poppler mailing list