[poppler] Patch: New additions in LinkRendition

srinivas adicherla srinivas.adicherla at gmail.com
Wed Apr 6 03:15:14 PDT 2011


Hi,

     > +  // Get the reference object of the corresponding action
     > +  virtual Ref getRef() {};
     > where's the return value?

           Actually we are overriding this method in class LinkRendition.
But to return Ref we don't have any members in LinkAction.

On Wed, Apr 6, 2011 at 12:30 AM, <poppler-request at lists.freedesktop.org>wrote:

> Send poppler mailing list submissions to
>        poppler at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.freedesktop.org/mailman/listinfo/poppler
> or, via email, send a message with subject or body 'help' to
>        poppler-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>        poppler-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of poppler digest..."
>
>
> Today's Topics:
>
>   1. Re: Patch: New additions in FileSpec (Pino Toscano)
>   2. Re: Patch: New additions in LinkRendition (Pino Toscano)
>   3. Re: patch: set the title for screen annotation (Pino Toscano)
>   4. Error in compiling poppler-optcontent.cc file (Sreenidhi T)
>   5. Re: Error in compiling poppler-optcontent.cc file
>      (Albert Astals Cid)
>   6. Re: Patch: New additions in FileSpec (Albert Astals Cid)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Tue, 5 Apr 2011 15:41:49 +0200
> From: Pino Toscano <pino at kde.org>
> Subject: Re: [poppler] Patch: New additions in FileSpec
> To: poppler at lists.freedesktop.org
> Message-ID: <201104051542.04212.pino at kde.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:
> > +const char* getFileNameFromPath (const char *filePath) {
>
> - { goes on a new line
> - make the function static and remove its declaration from the .h
>
> > +static GBool getFileSpecObject(XRef *xref, Stream *stream, const
> > char* fileName, Object *obj) {
>
> { goes on a new line
>
> > +  Object fileSpec, obj1, obj2;
> > +  int length;
> > +
> > +  fileSpec.initDict(xref);
> > +  fileSpec.dictSet("Type", obj1.initName("Filespec"));
> > +  fileSpec.dictSet("F", obj1.initString(new GooString(fileName)));
> > +
> > +  GooString *name = new GooString(fileName);
>
> a new GooString(fileName) is already created for the "F" key, so just
> create it once, using it for "F" and passing it to
> pdfDocEncodingToUTF16, do not deleting it
>
> > +  char *fileNameUTF16 = pdfDocEncodingToUTF16(name, &length);
> > +  fileSpec.dictSet("UF", obj1.initString(new
> > GooString(fileNameUTF16, length)));
> > +
> > +  delete(fileNameUTF16);
>
> as I already said in a previous review:
> | pdfDocEncodingToUTF16 returns a new char[], which you have to
> | delete [], not free() (as also Carlos said)
> there's a difference between delete and delete []
>
> > +GBool createFilespec (XRef *xref, GooString *filePathA, Object *obj)
> > {
>
> - { goes on a new line
> - proper naming, "FileSpec"
>
> > +  fseek(fs, 0, SEEK_END);
> > +  size = ftell(fs);
>
> as I already said:
> | you are missing any kind of check on the return values of the two, for
> | example on i/o errors or simply because the passed file could be even
> | shorter than 10 bytes
>
> --
> Pino Toscano
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 190 bytes
> Desc: This is a digitally signed message part.
> URL: <
> http://lists.freedesktop.org/archives/poppler/attachments/20110405/c33c9e7a/attachment-0001.pgp
> >
>
> ------------------------------
>
> Message: 2
> Date: Tue, 5 Apr 2011 15:48:32 +0200
> From: Pino Toscano <pino at kde.org>
> Subject: Re: [poppler] Patch: New additions in LinkRendition
> To: poppler at lists.freedesktop.org
> Message-ID: <201104051548.33120.pino at kde.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:
> > +  // Get the reference object of the corresponding action
> > +  virtual Ref getRef() {};
>
> where's the return value?
>
> --
> Pino Toscano
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 190 bytes
> Desc: This is a digitally signed message part.
> URL: <
> http://lists.freedesktop.org/archives/poppler/attachments/20110405/5c1b832c/attachment-0001.pgp
> >
>
> ------------------------------
>
> Message: 3
> Date: Tue, 5 Apr 2011 15:57:52 +0200
> From: Pino Toscano <pino at kde.org>
> Subject: Re: [poppler] patch: set the title for screen annotation
> To: poppler at lists.freedesktop.org
> Message-ID: <201104051557.52482.pino at kde.org>
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi,
>
> Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:
> > +void AnnotScreen::setTitle(GooString *title) {
> > [...]
> > +  obj1.initString(new_title->copy());
> > +  update ("T", &obj1);
> > +  delete new_title;
> > +}
>
> - the 'title' parameter is still shadowing the 'title' private member
> (so rename it)
> - instead of delete 'new_title', looks like you should set it as new
> 'title' (the private member), otherwise getTitle() will give the old
> title
>
> > +void
> > +poppler_annot_screen_set_title (PopplerAnnotScreen *poppler_annot,
> > +                                const gchar       *title)
> > +{
> > [...]
> > +  goo_tmp = new GooString (tmp, length);
> > +  g_free (tmp);
> > +
> > +  annot->setTitle (goo_tmp);
> > +  delete (goo_tmp);
> > +}
>
> most probably goo_tmp can go on stack
>
> > +void                          poppler_annot_screen_set_title
> (PopplerAnnotScreen *poppler_annot,
> > +
> const gchar        *title);
> >
> > +
>
> empty line added
>
> --
> Pino Toscano
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: not available
> Type: application/pgp-signature
> Size: 190 bytes
> Desc: This is a digitally signed message part.
> URL: <
> http://lists.freedesktop.org/archives/poppler/attachments/20110405/6acf332b/attachment-0001.pgp
> >
>
> ------------------------------
>
> Message: 4
> Date: Tue, 5 Apr 2011 20:36:36 +0530
> From: Sreenidhi T <sreenidhithiru at gmail.com>
> Subject: [poppler] Error in compiling poppler-optcontent.cc file
> To: poppler at lists.freedesktop.org
> Message-ID: <BANLkTinC1A9r87OUBURWk53wEE9Afh2WvA at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Hi,
>
> I am part of a team that works on porting a MAC OS application, that uses
> poppler version 10.7 ( available on Fink).
> On building the application, the compilation fails with the following
> error:
>
> CompileC
>
> obj/TeXworks.build/Default/TeXworks.build/Objects-normal/i386/poppler-optcontent.o
> ../../../../opt/kde4/mac/include/poppler/qt4/poppler-optcontent.cc normal
> i386 c++ com.apple.compilers.gcc.4_2
>    cd /sw/src/fink.build/texworks-0.3-1/texworks-0.3
>    setenv LANG en_US.US-ASCII
>    /Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe
> -Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic
> -fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.5
> -gdwarf-2
>
> -I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/TeXworks.hmap
> -F/sw/src/fink.build/texworks-0.3-1/texworks-0.3/build/Default
> -I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/build/Default/include
> -I/sw/lib/qt4-mac/include/QtUiTools
> -I/sw/lib/qt4-mac/lib/QtCore.framework/Versions/4/Headers
> -I/sw/lib/qt4-mac/include/QtCore
> -I/sw/lib/qt4-mac/lib/QtGui.framework/Versions/4/Headers
> -I/sw/lib/qt4-mac/include/QtGui
> -I/sw/lib/qt4-mac/lib/QtXml.framework/Versions/4/Headers
> -I/sw/lib/qt4-mac/include/QtXml
> -I/sw/lib/qt4-mac/lib/QtScriptTools.framework/Versions/4/Headers
> -I/sw/lib/qt4-mac/include/QtScriptTools
> -I/sw/lib/qt4-mac/lib/QtScript.framework/Versions/4/Headers
> -I/sw/lib/qt4-mac/include/QtScript -I/sw/lib/qt4-mac/include -Isrc
> -I/sw/include/poppler -I/sw/opt/kde4/mac/include/poppler/qt4
> -I/sw/include/hunspell -I/sw/lib/fontconfig2/include -Imoc -Iui
> -I/sw/opt/kde4/mac/include -I/System/Library/Frameworks
> -I/sw/lib/qt4-mac/mkspecs/macx-xcode
>
> -I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/DerivedSources/i386
>
> -I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/DerivedSources
> -pipe -DTW_BUILD_ID=personal -DHAVE_POPPLER_XPDF_HEADERS -fexceptions -g
> -Wall -W -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB -DQT_XML_LIB -DQT_GUI_LIB
> -DQT_CORE_LIB -DQT_SHARED -c
>
> /sw/src/fink.build/texworks-0.3-1/texworks-0.3/../../../../opt/kde4/mac/include/poppler/qt4/poppler-optcontent.cc
> -o
>
> /sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/Objects-normal/i386/poppler-optcontent.o
>
>
> */sw/src/fink.build/texworks-0.3-1/texworks-0.3/../../../../opt/kde4/mac/include/poppler/qt4/poppler-optcontent.cc:428:34:
> error: poppler-optcontent.moc: No such file or directory*
>
> As seen in the above error message, the poppler-optcontent.moc file (which
> is included in the poppler-optcontent.cc file), is not available while
> compilation.
>
> The poppler 10.7 version's source folder also has only a file by the name
> poppler-optcontent.cc and no .moc file.
>
> Could anyone please provide some suggestions/ideas as to the cause for this
> error and for resolving the same.
>
>
> Thanks & Regards,
> Sreenidhi T
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.freedesktop.org/archives/poppler/attachments/20110405/90e45264/attachment-0001.htm
> >
>
> ------------------------------
>
> Message: 5
> Date: Tue, 5 Apr 2011 18:40:48 +0100
> From: Albert Astals Cid <aacid at kde.org>
> Subject: Re: [poppler] Error in compiling poppler-optcontent.cc file
> To: poppler at lists.freedesktop.org
> Message-ID: <201104051840.48859.aacid at kde.org>
> Content-Type: Text/Plain;  charset="us-ascii"
>
> A Dimarts, 5 d'abril de 2011, Sreenidhi T va escriure:
> > Hi,
> >
> > I am part of a team that works on porting a MAC OS application, that uses
> > poppler version 10.7 ( available on Fink).
>
> Poppler 10.7 does not exist, might be 0.10.7 which is two years old. Try a
> new
> release.
>
> Albert
>
>
> ------------------------------
>
> Message: 6
> Date: Tue, 5 Apr 2011 18:41:18 +0100
> From: Albert Astals Cid <aacid at kde.org>
> Subject: Re: [poppler] Patch: New additions in FileSpec
> To: poppler at lists.freedesktop.org
> Message-ID: <201104051841.18456.aacid at kde.org>
> Content-Type: Text/Plain;  charset="us-ascii"
>
> A Dimarts, 5 d'abril de 2011, srinivas adicherla va escriure:
> > Hi all,
>
> Carlos/Pino can you handle this patchset?
>
> Albert
>
>
> ------------------------------
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>
>
> End of poppler Digest, Vol 74, Issue 7
> **************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20110406/23a8d559/attachment.htm>


More information about the poppler mailing list