a patch to fix some CHM issue

"Kirby Zhou" <[email protected]>
Newsgroups gmane.text.doxygen.devel
Message-ID <004801cacb5d$3c847070$b58d5150$@com>
HtmlHelp::addContentsItem ignores the 'ref' argument.

So if you want to create some separate .CHM files and use TAG to make them
know each other, you will fail.

HtmlHelp::addContentsItem DO NOT write corrent information into 'index.hhc'.

 

This patch fix that bug.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev

_______________________________________________
Doxygen-develop mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/doxygen-develop
doxygen-1.6.0-chmfix.patch (application/octet-stream, 2.3 KB)
--- src/htmlhelp.cpp.bk	2010-03-24 12:34:30.000000000 +0800
+++ src/htmlhelp.cpp	2010-03-24 12:49:53.000000000 +0800
@@ -484,7 +484,7 @@
          "Language=" << getLanguageString() << endl;
     if (Config_getBool("BINARY_TOC")) t << "Binary TOC=YES\n";
     if (Config_getBool("GENERATE_CHI")) t << "Create CHI file=YES\n";
-    t << "Title=" << recode(Config_getString("PROJECT_NAME")) << endl << endl;
+    t << "Title=" << recode(Config_getString("PROJECT_NAME")) << "-" << recode(Config_getString("PROJECT_NUMBER")) << endl << endl;
     
     t << "[WINDOWS]" << endl;
 
@@ -494,8 +494,8 @@
     //       the font-size one is not normally settable by the HTML Help Workshop
     //       utility but the way to set it is described here:
     //          http://support.microsoft.com/?scid=kb%3Ben-us%3B240062&x=17&y=18
-    t << "main=\"" << recode(Config_getString("PROJECT_NAME")) << "\",\"index.hhc\","
-         "\"index.hhk\",\"" << indexName << "\",\"" << 
+    t << "main=\"" << recode(Config_getString("PROJECT_NAME")) << "-" << recode(Config_getString("PROJECT_NUMBER")) <<
+         "\",\"index.hhc\",\"index.hhk\",\"" << indexName << "\",\"" << 
          indexName << "\",,,,,0x23520,,0x10387e,,,,,,,,0" << endl << endl;
     
     t << "[FILES]" << endl;
@@ -612,22 +612,27 @@
  */
 void HtmlHelp::addContentsItem(bool isDir,
                                const char *name,
-                               const char * /*ref*/, 
+                               const char *ref, 
                                const char *file,
                                const char *anchor)
 {
   // If we're using a binary toc then folders cannot have links. 
   if(Config_getBool("BINARY_TOC") && isDir) 
   {
     file = 0;
     anchor = 0;
   }
-  int i; for (i=0;i<dc;i++) cts << "  ";
+  for (int i=0;i<dc;i++) cts << "  ";
   cts << "<LI><OBJECT type=\"text/sitemap\">";
   cts << "<param name=\"Name\" value=\"" << recode(name) << "\">";
   if (file)      // made file optional param - KPW
   {
-    cts << "<param name=\"Local\" value=\"" << file << Doxygen::htmlFileExtension;
+    cts << "<param name=\"Local\" value=\"";
+    if (ref) {
+      const QCString* dest;
+      if ((dest=Doxygen::tagDestinationDict[ref])) cts << *dest << "/";
+    }
+    cts << file << Doxygen::htmlFileExtension;
     if (anchor) cts << "#" << anchor;  
     cts << "\">";
   }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.