Hi,<br><br>      ya I did a mistake of taking variable name as title which is shadowing with private member. I changed it now. I made it same as what poppler is already doing for setContents(). <br><br> &gt;  most probably goo_tmp can go on stack<br>
         same thing poppler is doing for setContents().<br>  <br><br><div class="gmail_quote">On Wed, Apr 6, 2011 at 12:30 AM,  <span dir="ltr">&lt;<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Send poppler mailing list submissions to<br>
        <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:poppler-owner@lists.freedesktop.org">poppler-owner@lists.freedesktop.org</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of poppler digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Re: Patch: New additions in FileSpec (Pino Toscano)<br>
   2. Re: Patch: New additions in LinkRendition (Pino Toscano)<br>
   3. Re: patch: set the title for screen annotation (Pino Toscano)<br>
   4. Error in compiling poppler-optcontent.cc file (Sreenidhi T)<br>
   5. Re: Error in compiling poppler-optcontent.cc file<br>
      (Albert Astals Cid)<br>
   6. Re: Patch: New additions in FileSpec (Albert Astals Cid)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 5 Apr 2011 15:41:49 +0200<br>
From: Pino Toscano &lt;<a href="mailto:pino@kde.org">pino@kde.org</a>&gt;<br>
Subject: Re: [poppler] Patch: New additions in FileSpec<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201104051542.04212.pino@kde.org">201104051542.04212.pino@kde.org</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:<br>
&gt; +const char* getFileNameFromPath (const char *filePath) {<br>
<br>
- { goes on a new line<br>
- make the function static and remove its declaration from the .h<br>
<br>
&gt; +static GBool getFileSpecObject(XRef *xref, Stream *stream, const<br>
&gt; char* fileName, Object *obj) {<br>
<br>
{ goes on a new line<br>
<br>
&gt; +  Object fileSpec, obj1, obj2;<br>
&gt; +  int length;<br>
&gt; +<br>
&gt; +  fileSpec.initDict(xref);<br>
&gt; +  fileSpec.dictSet(&quot;Type&quot;, obj1.initName(&quot;Filespec&quot;));<br>
&gt; +  fileSpec.dictSet(&quot;F&quot;, obj1.initString(new GooString(fileName)));<br>
&gt; +<br>
&gt; +  GooString *name = new GooString(fileName);<br>
<br>
a new GooString(fileName) is already created for the &quot;F&quot; key, so just<br>
create it once, using it for &quot;F&quot; and passing it to<br>
pdfDocEncodingToUTF16, do not deleting it<br>
<br>
&gt; +  char *fileNameUTF16 = pdfDocEncodingToUTF16(name, &amp;length);<br>
&gt; +  fileSpec.dictSet(&quot;UF&quot;, obj1.initString(new<br>
&gt; GooString(fileNameUTF16, length)));<br>
&gt; +<br>
&gt; +  delete(fileNameUTF16);<br>
<br>
as I already said in a previous review:<br>
| pdfDocEncodingToUTF16 returns a new char[], which you have to<br>
| delete [], not free() (as also Carlos said)<br>
there&#39;s a difference between delete and delete []<br>
<br>
&gt; +GBool createFilespec (XRef *xref, GooString *filePathA, Object *obj)<br>
&gt; {<br>
<br>
- { goes on a new line<br>
- proper naming, &quot;FileSpec&quot;<br>
<br>
&gt; +  fseek(fs, 0, SEEK_END);<br>
&gt; +  size = ftell(fs);<br>
<br>
as I already said:<br>
| you are missing any kind of check on the return values of the two, for<br>
| example on i/o errors or simply because the passed file could be even<br>
| shorter than 10 bytes<br>
<br>
--<br>
Pino Toscano<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 190 bytes<br>
Desc: This is a digitally signed message part.<br>
URL: &lt;<a href="http://lists.freedesktop.org/archives/poppler/attachments/20110405/c33c9e7a/attachment-0001.pgp" target="_blank">http://lists.freedesktop.org/archives/poppler/attachments/20110405/c33c9e7a/attachment-0001.pgp</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 5 Apr 2011 15:48:32 +0200<br>
From: Pino Toscano &lt;<a href="mailto:pino@kde.org">pino@kde.org</a>&gt;<br>
Subject: Re: [poppler] Patch: New additions in LinkRendition<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201104051548.33120.pino@kde.org">201104051548.33120.pino@kde.org</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:<br>
&gt; +  // Get the reference object of the corresponding action<br>
&gt; +  virtual Ref getRef() {};<br>
<br>
where&#39;s the return value?<br>
<br>
--<br>
Pino Toscano<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 190 bytes<br>
Desc: This is a digitally signed message part.<br>
URL: &lt;<a href="http://lists.freedesktop.org/archives/poppler/attachments/20110405/5c1b832c/attachment-0001.pgp" target="_blank">http://lists.freedesktop.org/archives/poppler/attachments/20110405/5c1b832c/attachment-0001.pgp</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 5 Apr 2011 15:57:52 +0200<br>
From: Pino Toscano &lt;<a href="mailto:pino@kde.org">pino@kde.org</a>&gt;<br>
Subject: Re: [poppler] patch: set the title for screen annotation<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201104051557.52482.pino@kde.org">201104051557.52482.pino@kde.org</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
Hi,<br>
<br>
Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:<br>
&gt; +void AnnotScreen::setTitle(GooString *title) {<br>
&gt; [...]<br>
&gt; +  obj1.initString(new_title-&gt;copy());<br>
&gt; +  update (&quot;T&quot;, &amp;obj1);<br>
&gt; +  delete new_title;<br>
&gt; +}<br>
<br>
- the &#39;title&#39; parameter is still shadowing the &#39;title&#39; private member<br>
(so rename it)<br>
- instead of delete &#39;new_title&#39;, looks like you should set it as new<br>
&#39;title&#39; (the private member), otherwise getTitle() will give the old<br>
title<br>
<br>
&gt; +void<br>
&gt; +poppler_annot_screen_set_title (PopplerAnnotScreen *poppler_annot,<br>
&gt; +                                const gchar       *title)<br>
&gt; +{<br>
&gt; [...]<br>
&gt; +  goo_tmp = new GooString (tmp, length);<br>
&gt; +  g_free (tmp);<br>
&gt; +<br>
&gt; +  annot-&gt;setTitle (goo_tmp);<br>
&gt; +  delete (goo_tmp);<br>
&gt; +}<br>
<br>
most probably goo_tmp can go on stack<br>
<br>
&gt; +void                          poppler_annot_screen_set_title<br>
(PopplerAnnotScreen *poppler_annot,<br>
&gt; +<br>
const gchar        *title);<br>
&gt;<br>
&gt; +<br>
<br>
empty line added<br>
<br>
--<br>
Pino Toscano<br>
-------------- next part --------------<br>
A non-text attachment was scrubbed...<br>
Name: not available<br>
Type: application/pgp-signature<br>
Size: 190 bytes<br>
Desc: This is a digitally signed message part.<br>
URL: &lt;<a href="http://lists.freedesktop.org/archives/poppler/attachments/20110405/6acf332b/attachment-0001.pgp" target="_blank">http://lists.freedesktop.org/archives/poppler/attachments/20110405/6acf332b/attachment-0001.pgp</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 5 Apr 2011 20:36:36 +0530<br>
From: Sreenidhi T &lt;<a href="mailto:sreenidhithiru@gmail.com">sreenidhithiru@gmail.com</a>&gt;<br>
Subject: [poppler] Error in compiling poppler-optcontent.cc file<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:BANLkTinC1A9r87OUBURWk53wEE9Afh2WvA@mail.gmail.com">BANLkTinC1A9r87OUBURWk53wEE9Afh2WvA@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;utf-8&quot;<br>
<br>
Hi,<br>
<br>
I am part of a team that works on porting a MAC OS application, that uses<br>
poppler version 10.7 ( available on Fink).<br>
On building the application, the compilation fails with the following error:<br>
<br>
CompileC<br>
obj/TeXworks.build/Default/TeXworks.build/Objects-normal/i386/poppler-optcontent.o<br>
../../../../opt/kde4/mac/include/poppler/qt4/poppler-optcontent.cc normal<br>
i386 c++ com.apple.compilers.gcc.4_2<br>
    cd /sw/src/fink.build/texworks-0.3-1/texworks-0.3<br>
    setenv LANG en_US.US-ASCII<br>
    /Developer/usr/bin/gcc-4.2 -x c++ -arch i386 -fmessage-length=0 -pipe<br>
-Wno-trigraphs -fpascal-strings -fasm-blocks -Os -mdynamic-no-pic<br>
-fvisibility=hidden -fvisibility-inlines-hidden -mmacosx-version-min=10.5<br>
-gdwarf-2<br>
-I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/TeXworks.hmap<br>
-F/sw/src/fink.build/texworks-0.3-1/texworks-0.3/build/Default<br>
-I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/build/Default/include<br>
-I/sw/lib/qt4-mac/include/QtUiTools<br>
-I/sw/lib/qt4-mac/lib/QtCore.framework/Versions/4/Headers<br>
-I/sw/lib/qt4-mac/include/QtCore<br>
-I/sw/lib/qt4-mac/lib/QtGui.framework/Versions/4/Headers<br>
-I/sw/lib/qt4-mac/include/QtGui<br>
-I/sw/lib/qt4-mac/lib/QtXml.framework/Versions/4/Headers<br>
-I/sw/lib/qt4-mac/include/QtXml<br>
-I/sw/lib/qt4-mac/lib/QtScriptTools.framework/Versions/4/Headers<br>
-I/sw/lib/qt4-mac/include/QtScriptTools<br>
-I/sw/lib/qt4-mac/lib/QtScript.framework/Versions/4/Headers<br>
-I/sw/lib/qt4-mac/include/QtScript -I/sw/lib/qt4-mac/include -Isrc<br>
-I/sw/include/poppler -I/sw/opt/kde4/mac/include/poppler/qt4<br>
-I/sw/include/hunspell -I/sw/lib/fontconfig2/include -Imoc -Iui<br>
-I/sw/opt/kde4/mac/include -I/System/Library/Frameworks<br>
-I/sw/lib/qt4-mac/mkspecs/macx-xcode<br>
-I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/DerivedSources/i386<br>
-I/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/DerivedSources<br>
-pipe -DTW_BUILD_ID=personal -DHAVE_POPPLER_XPDF_HEADERS -fexceptions -g<br>
-Wall -W -DQT_SCRIPT_LIB -DQT_SCRIPTTOOLS_LIB -DQT_XML_LIB -DQT_GUI_LIB<br>
-DQT_CORE_LIB -DQT_SHARED -c<br>
/sw/src/fink.build/texworks-0.3-1/texworks-0.3/../../../../opt/kde4/mac/include/poppler/qt4/poppler-optcontent.cc<br>
-o<br>
/sw/src/fink.build/texworks-0.3-1/texworks-0.3/obj/TeXworks.build/Default/TeXworks.build/Objects-normal/i386/poppler-optcontent.o<br>
<br>
*/sw/src/fink.build/texworks-0.3-1/texworks-0.3/../../../../opt/kde4/mac/include/poppler/qt4/poppler-optcontent.cc:428:34:<br>
error: poppler-optcontent.moc: No such file or directory*<br>
<br>
As seen in the above error message, the poppler-optcontent.moc file (which<br>
is included in the poppler-optcontent.cc file), is not available while<br>
compilation.<br>
<br>
The poppler 10.7 version&#39;s source folder also has only a file by the name<br>
poppler-optcontent.cc and no .moc file.<br>
<br>
Could anyone please provide some suggestions/ideas as to the cause for this<br>
error and for resolving the same.<br>
<br>
<br>
Thanks &amp; Regards,<br>
Sreenidhi T<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://lists.freedesktop.org/archives/poppler/attachments/20110405/90e45264/attachment-0001.htm" target="_blank">http://lists.freedesktop.org/archives/poppler/attachments/20110405/90e45264/attachment-0001.htm</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Tue, 5 Apr 2011 18:40:48 +0100<br>
From: Albert Astals Cid &lt;<a href="mailto:aacid@kde.org">aacid@kde.org</a>&gt;<br>
Subject: Re: [poppler] Error in compiling poppler-optcontent.cc file<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201104051840.48859.aacid@kde.org">201104051840.48859.aacid@kde.org</a>&gt;<br>
Content-Type: Text/Plain;  charset=&quot;us-ascii&quot;<br>
<br>
A Dimarts, 5 d&#39;abril de 2011, Sreenidhi T va escriure:<br>
&gt; Hi,<br>
&gt;<br>
&gt; I am part of a team that works on porting a MAC OS application, that uses<br>
&gt; poppler version 10.7 ( available on Fink).<br>
<br>
Poppler 10.7 does not exist, might be 0.10.7 which is two years old. Try a new<br>
release.<br>
<br>
Albert<br>
<br>
<br>
------------------------------<br>
<br>
Message: 6<br>
Date: Tue, 5 Apr 2011 18:41:18 +0100<br>
From: Albert Astals Cid &lt;<a href="mailto:aacid@kde.org">aacid@kde.org</a>&gt;<br>
Subject: Re: [poppler] Patch: New additions in FileSpec<br>
To: <a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
Message-ID: &lt;<a href="mailto:201104051841.18456.aacid@kde.org">201104051841.18456.aacid@kde.org</a>&gt;<br>
Content-Type: Text/Plain;  charset=&quot;us-ascii&quot;<br>
<br>
A Dimarts, 5 d&#39;abril de 2011, srinivas adicherla va escriure:<br>
&gt; Hi all,<br>
<br>
Carlos/Pino can you handle this patchset?<br>
<br>
Albert<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
<br>
<br>
End of poppler Digest, Vol 74, Issue 7<br>
**************************************<br>
</blockquote></div><br>