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> > 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"><<a href="mailto:poppler-request@lists.freedesktop.org">poppler-request@lists.freedesktop.org</a>></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 'help' 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 "Re: Contents of poppler digest..."<br>
<br>
<br>
Today'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 <<a href="mailto:pino@kde.org">pino@kde.org</a>><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: <<a href="mailto:201104051542.04212.pino@kde.org">201104051542.04212.pino@kde.org</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:<br>
> +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>
> +static GBool getFileSpecObject(XRef *xref, Stream *stream, const<br>
> char* fileName, Object *obj) {<br>
<br>
{ goes on a new line<br>
<br>
> + Object fileSpec, obj1, obj2;<br>
> + int length;<br>
> +<br>
> + fileSpec.initDict(xref);<br>
> + fileSpec.dictSet("Type", obj1.initName("Filespec"));<br>
> + fileSpec.dictSet("F", obj1.initString(new GooString(fileName)));<br>
> +<br>
> + GooString *name = new GooString(fileName);<br>
<br>
a new GooString(fileName) is already created for the "F" key, so just<br>
create it once, using it for "F" and passing it to<br>
pdfDocEncodingToUTF16, do not deleting it<br>
<br>
> + char *fileNameUTF16 = pdfDocEncodingToUTF16(name, &length);<br>
> + fileSpec.dictSet("UF", obj1.initString(new<br>
> GooString(fileNameUTF16, length)));<br>
> +<br>
> + 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's a difference between delete and delete []<br>
<br>
> +GBool createFilespec (XRef *xref, GooString *filePathA, Object *obj)<br>
> {<br>
<br>
- { goes on a new line<br>
- proper naming, "FileSpec"<br>
<br>
> + fseek(fs, 0, SEEK_END);<br>
> + 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: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 5 Apr 2011 15:48:32 +0200<br>
From: Pino Toscano <<a href="mailto:pino@kde.org">pino@kde.org</a>><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: <<a href="mailto:201104051548.33120.pino@kde.org">201104051548.33120.pino@kde.org</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:<br>
> + // Get the reference object of the corresponding action<br>
> + virtual Ref getRef() {};<br>
<br>
where'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: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Tue, 5 Apr 2011 15:57:52 +0200<br>
From: Pino Toscano <<a href="mailto:pino@kde.org">pino@kde.org</a>><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: <<a href="mailto:201104051557.52482.pino@kde.org">201104051557.52482.pino@kde.org</a>><br>
Content-Type: text/plain; charset="iso-8859-1"<br>
<br>
Hi,<br>
<br>
Alle marted? 5 aprile 2011, srinivas adicherla ha scritto:<br>
> +void AnnotScreen::setTitle(GooString *title) {<br>
> [...]<br>
> + obj1.initString(new_title->copy());<br>
> + update ("T", &obj1);<br>
> + delete new_title;<br>
> +}<br>
<br>
- the 'title' parameter is still shadowing the 'title' private member<br>
(so rename it)<br>
- instead of delete 'new_title', looks like you should set it as new<br>
'title' (the private member), otherwise getTitle() will give the old<br>
title<br>
<br>
> +void<br>
> +poppler_annot_screen_set_title (PopplerAnnotScreen *poppler_annot,<br>
> + const gchar *title)<br>
> +{<br>
> [...]<br>
> + goo_tmp = new GooString (tmp, length);<br>
> + g_free (tmp);<br>
> +<br>
> + annot->setTitle (goo_tmp);<br>
> + delete (goo_tmp);<br>
> +}<br>
<br>
most probably goo_tmp can go on stack<br>
<br>
> +void poppler_annot_screen_set_title<br>
(PopplerAnnotScreen *poppler_annot,<br>
> +<br>
const gchar *title);<br>
><br>
> +<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: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 4<br>
Date: Tue, 5 Apr 2011 20:36:36 +0530<br>
From: Sreenidhi T <<a href="mailto:sreenidhithiru@gmail.com">sreenidhithiru@gmail.com</a>><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: <<a href="mailto:BANLkTinC1A9r87OUBURWk53wEE9Afh2WvA@mail.gmail.com">BANLkTinC1A9r87OUBURWk53wEE9Afh2WvA@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<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'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 & Regards,<br>
Sreenidhi T<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<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>><br>
<br>
------------------------------<br>
<br>
Message: 5<br>
Date: Tue, 5 Apr 2011 18:40:48 +0100<br>
From: Albert Astals Cid <<a href="mailto:aacid@kde.org">aacid@kde.org</a>><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: <<a href="mailto:201104051840.48859.aacid@kde.org">201104051840.48859.aacid@kde.org</a>><br>
Content-Type: Text/Plain; charset="us-ascii"<br>
<br>
A Dimarts, 5 d'abril de 2011, Sreenidhi T va escriure:<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>
<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 <<a href="mailto:aacid@kde.org">aacid@kde.org</a>><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: <<a href="mailto:201104051841.18456.aacid@kde.org">201104051841.18456.aacid@kde.org</a>><br>
Content-Type: Text/Plain; charset="us-ascii"<br>
<br>
A Dimarts, 5 d'abril de 2011, srinivas adicherla va escriure:<br>
> 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>