On 01/06/2012 12:12 PM, Stephan Bergmann wrote:
Yeah, next step I plan to do is get rid of autodoc for IDL, too (after
this topic has finally been "forced upon" me via URE gbuildification),
and then rid the code base from all that nonsense in one step.

Just a quick update on this rather low-prio thing (in case anybody wants to step in with good ideas):

Turns out there is too big an impedance mismatch between our UNOIDL syntax and doxygen, so that at least a naive attempt at replacing autodoc with doxygen for creation of the UNOIDL reference documentation (see attached doxyidl.patch) produces unacceptable results:

Services, singletons, and typedefs are mapped as "variables," and services constructors are described as functions detached from the services. Constants groups seem to be missing completely.

And its not obvious to me that this could be improved with some macro trickery or post processing.

:(

Stephan
diff --git a/odk/docs/common/ref/idl.css b/odk/docs/common/ref/idl.css
deleted file mode 100644
index ab94520..0000000
--- a/odk/docs/common/ref/idl.css
+++ /dev/null
@@ -1,135 +0,0 @@
-/*      Autodoc css file for IDL documentation      */
-
-
-/*See bottom of file for explanations.*/
-
-body { background-color:#ffffff; }
-
-#adc-idlref a { color: #000000;	text-decoration: none; }
-#adc-idlref a:link { color: #18A303;	text-decoration: none; }
-#adc-idlref a:hover { text-decoration: underline; }
-#adc-idlref a:visited { color: #106802; }
-
-#adc-idlref h3
-	    { font-size:13pt; font-weight:bold;
-	      margin-top:3pt; margin-bottom:1pt; }
-
-#adc-idlref p, #adc-idlref dt, #adc-idlref dd, #adc-idlref pre
-	    { font-size:11pt;
-	      margin-top:3pt; margin-bottom:1pt; }
-
-#adc-idlref pre            { font-family:monospace; }
-
-#adc-idlref table.subtitle { margin-top:6pt; margin-bottom:6pt; }
-
-#adc-idlref td             { font-size:11pt; }
-#adc-idlref td.title
-	    { font-family: Arial; font-size:19pt; font-weight:bold;
-	      line-height:30pt;
-	      background-color:#18a303;
-	      text-align:center; }
-
-#adc-idlref td.subtitle
-	    { font-family: Arial; font-size:13pt;
-	      line-height:20pt;
-	      background-color:#18a303; }
-
-#adc-idlref td.crosstitle
-	    { font-size:12pt; font-weight:bold;
-	      line-height:15pt;   background-color:#eeeeff; }
-
-#adc-idlref td.imdetail
-	    { width:100%;
-	      background-color:#c2f6ba; }
-
-#adc-idlref td.imsum_left  { width:30%;  }
-#adc-idlref td.imsum_right { width:70%;  }
-
-#adc-idlref table.navimain { background-color:#18a303; }
-
-#adc-idlref td.navimain
-	    { background-color:#18a303;
-	      text-align:center;
-	      font-family: Arial; font-size:12pt; font-weight:bold;
-	      padding-left:7pt; padding-right:7pt; }
-
-#adc-idlref td.navimainself
-	    { text-align:center;
-	      font-family: Arial; font-size:12pt; font-weight:bold;
-	      color:#ffffff; background-color:#106802;}
-
-#adc-idlref td.navimainnone
-	    { text-align:center;
-	      font-family: Arial; font-size:12pt;
-	      color:#ffffff; }
-
-#adc-idlref td.navisub
-	    { text-align:center;
-	      font-family: Arial; font-size:9pt; font-variant:small-caps;
-	      padding-left:7pt; padding-right:7pt; }
-
-#adc-idlref a.navimain
-	    { text-align:center;
-	      font-family: Arial; font-size:12pt; font-weight:bold;
-	      color:#C44B01; }
-
-#adc-idlref a.navisub
-	    { text-align:center;
-	      font-family: Arial; font-size:9pt; font-variant:small-caps;
-	      color:#C44B01; }
-
-#adc-idlref a.membertitle  { font-size:12pt; font-weight:bold; line-height:18pt; }
-
-#adc-idlref a:link.navisub  { color:#18a303; }
-#adc-idlref a:visited.navisub { color: #106802; }
-#adc-idlref a:hover.navisub { color: #106802; text-decoration: underline; }
-
-#adc-idlref a:link.navimain  { color:#ffffff; }
-#adc-idlref a:visited.navimain { color: #ffffff; }
-#adc-idlref a:hover.navimain { color: #ffffff; text-decoration: underline; }
-
-#adc-idlref .dt            { font-weight:bold; }
-#adc-idlref .namechain     { font-size:13pt; font-weight:bold; margin-top:3pt; margin-bottom:6pt; }
-#adc-idlref .title2        { font-size:13pt; font-style:italic; font-weight:bold; text-align:left; }
-
-#adc-idlref table { empty-cells:show; }
-
-#adc-idlref .childlist td,
-#adc-idlref .commentedlinks td,
-#adc-idlref .memberlist td,
-#adc-idlref .subtitle td,
-#adc-idlref .crosstitle td  { border: .1pt solid grey; }
-
-#adc-idlref .flag-table td { border: .1pt solid #cccccc; }
-
-#adc-idlref .title-table td,
-#adc-idlref .table-in-method td,
-#adc-idlref .table-in-data td,
-#adc-idlref .navimain td,
-#adc-idlref .navisub td,
-#adc-idlref .expl-table td,
-#adc-idlref .param-table td  { border: none; }
-
-
-/* Explanation of CSS classes:
-
-table.lightbg      Background of navigation bar.
-.navimain          Text in main navigation bar.
-.navisub           Text in lower navigation bar.
-td.navimainself    Cell in main navigation bar with "selected" shadow: You are here.
-td.navimainnone    Cell in main navigation bar with no link.
-
-.namechain         Line with current module path.
-
-td.crosstitle      Comment box for bases (base interfaces etc.)
-td.imsum_left      Left part of such boxes.
-td.imsum_right     Right part of such boxes.
-
-td.title           Main title of the page like "interface XYz"
-.subtitle          Tables, and head cells of those, which list members
-                   like "method summary" and "method details".
-
-td.imdetail        Background table of method's detail description.
-a.membertitle      Method name (as jump label) in method's detail
-                   description.
-*/
diff --git a/odk/examples/java/Spreadsheet/CalcAddins.java b/odk/examples/java/Spreadsheet/CalcAddins.java
index 60a8a1b..e8125ef 100644
--- a/odk/examples/java/Spreadsheet/CalcAddins.java
+++ b/odk/examples/java/Spreadsheet/CalcAddins.java
@@ -36,7 +36,7 @@
 
 /** You can find more
  * information on the following web page:
- * http://api.libreoffice.org/docs/common/ref/com/sun/star/module-ix.html
+ * http://api.libreoffice.org/docs/common/ref/index.html
  */
 import com.sun.star.comp.loader.FactoryHelper;
 import com.sun.star.lang.XMultiServiceFactory;
diff --git a/odk/index.html b/odk/index.html
index de905cd..2105392 100644
--- a/odk/index.html
+++ b/odk/index.html
@@ -53,7 +53,7 @@
 			  will be no limit for office automation in heterogeneous environments.
 			  Currently supported platforms of the SDK are Linux, Solaris (sparc, 
 			  x86), and Windows.</p>
-            <p>The SDK also contains <a href="docs/common/ref/com/sun/star/module-ix.html" title="link to the IDL reference documentation"> reference</a> documentation 
+            <p>The SDK also contains <a href="docs/common/ref/index.html" title="link to the IDL reference documentation"> reference</a> documentation 
               for the API and a complete <a href="http://wiki.services.openoffice.org/wiki/Documentation/DevGuide/OpenOffice.org_Developers_Guide"; title="link to the Developer's Guide in the Wiki">Developer's Guide</a> is available online in the OpenOffice.org Wiki, with 
 			  lots of examples, which introduce the API, explain the concepts behind
 			  it, and make it possible for all users to quickly get started with 
@@ -96,7 +96,7 @@
               </tr>
               <tr valign="top"> 
                 <td class="content4"><img src="docs/images/arrow-1.gif"></td>
-                <td colspan="2"><a href="docs/common/ref/com/sun/star/module-ix.html" title="link to the IDL reference documentation">IDL Reference</a></td>
+                <td colspan="2"><a href="docs/common/ref/index.html" title="link to the IDL reference documentation">IDL Reference</a></td>
                 <td class="content70">Complete LibreOffice %PRODUCT_RELEASE% API reference.</td>
               </tr>
               <tr valign="top"> 
diff --git a/odk/pack/copying/Doxyfile b/odk/pack/copying/Doxyfile
new file mode 100644
index 0000000..c84973e
--- /dev/null
+++ b/odk/pack/copying/Doxyfile
@@ -0,0 +1,47 @@
+##
+## Version: MPL 1.1 / GPLv3+ / LGPLv3+
+##
+## The contents of this file are subject to the Mozilla Public License Version
+## 1.1 (the "License"); you may not use this file except in compliance with
+## the License or as specified alternatively below. You may obtain a copy of
+## the License at http://www.mozilla.org/MPL/
+##
+## Software distributed under the License is distributed on an "AS IS" basis,
+## WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+## for the specific language governing rights and limitations under the
+## License.
+##
+## Major Contributor(s):
+## [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sberg...@redhat.com>
+##   (initial developer) ]
+##
+## All Rights Reserved.
+##
+## For minor contributions see the git repository.
+##
+## Alternatively, the contents of this file may be used under the terms of
+## either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+## the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+## in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+## instead of those above.
+##
+
+PROJECT_BRIEF = %
+OUTPUT_DIRECTORY = %
+STRIP_FROM_PATH = %
+JAVADOC_AUTOBRIEF = YES
+
+EXTRACT_ALL = YES
+CASE_SENSE_NAMES = NO
+
+QUIET = %
+WARNINGS = YES
+WARN_IF_DOC_ERROR = YES
+WARN_FORMAT = "$file:$line: $text"
+
+INPUT = %
+RECURSIVE = YES
+
+HTML_OUTPUT = .
+
+GENERATE_LATEX = NO
diff --git a/odk/pack/copying/main.dox b/odk/pack/copying/main.dox
new file mode 100644
index 0000000..9dd6f33
--- /dev/null
+++ b/odk/pack/copying/main.dox
@@ -0,0 +1,31 @@
+/*
+ * Version: MPL 1.1 / GPLv3+ / LGPLv3+
+ *
+ * The contents of this file are subject to the Mozilla Public License Version
+ * 1.1 (the "License"); you may not use this file except in compliance with
+ * the License or as specified alternatively below. You may obtain a copy of
+ * the License at http://www.mozilla.org/MPL/
+ *
+ * Software distributed under the License is distributed on an "AS IS" basis,
+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
+ * for the specific language governing rights and limitations under the
+ * License.
+ *
+ * Major Contributor(s):
+ * [ Copyright (C) 2012 Red Hat, Inc., Stephan Bergmann <sberg...@redhat.com>
+ *   (initial developer) ]
+ *
+ * All Rights Reserved.
+ *
+ * For minor contributions see the git repository.
+ *
+ * Alternatively, the contents of this file may be used under the terms of
+ * either the GNU General Public License Version 3 or later (the "GPLv3+"), or
+ * the GNU Lesser General Public License Version 3 or later (the "LGPLv3+"),
+ * in which case the provisions of the GPLv3+ or the LGPLv3+ are applicable
+ * instead of those above.
+ */
+
+/// \mainpage
+///
+/// This is a reference documentation for the LibreOffice UNO API.
diff --git a/odk/pack/copying/makefile.mk b/odk/pack/copying/makefile.mk
index 0feafee..0895ce5 100644
--- a/odk/pack/copying/makefile.mk
+++ b/odk/pack/copying/makefile.mk
@@ -42,7 +42,7 @@ DESTINCLUDELIST+=$(DESTDIRINC)/udkversion.mk
 
 DESTINCDIRLIST={$(subst,$(INCOUT),$(DESTDIRINC) $(INCLUDEDIRLIST))}
 
-IDL_DOCU_INDEX_FILE = $(DESTDIRGENIDLREF)/module-ix.html
+IDL_DOCU_INDEX_FILE = $(DESTDIRGENIDLREF)/index.html
 IDL_DOCU_CLEANUP_FLAG = $(MISC)/idl_docu_cleanup.flag
 
 IDL_CHAPTER_REFS=idl_chapter_refs.txt
@@ -172,9 +172,12 @@ DIR_FILE_LIST=\
     $(DESTIDLLIST)  \
     $(DESTINCLUDELIST) \
     $(DESTCLASSESLIST) \
-    $(IDL_DOCU_INDEX_FILE) \
     $(CONVERTTAGFLAG) 
 
+.IF "$(DOXYGEN)" != ""
+DIR_FILE_LIST += $(IDL_DOCU_INDEX_FILE)
+.END
+
 .IF "$(OS)"=="MACOSX"
 DIR_FILE_LIST += $(DESTDIRBIN)/addsym-macosx.sh
 .ENDIF
@@ -232,16 +235,30 @@ $(DESTDIRSETTINGS)/dk.mk : dk.mk
     -$(MKDIRHIER) $(@:d)
     tr -d "\015" < dk.mk | sed -e 's/@@RELEASE@@/$(PRODUCT_RELEASE)/' -e 's/@@BUILDID@@/$(RSCREVISION)/'> $@
 
-$(IDL_DOCU_CLEANUP_FLAG) : $(IDL_CHAPTER_REFS) $(PRJ)/docs/common/ref/idl.css $(DESTIDLLIST)
+$(IDL_DOCU_CLEANUP_FLAG) : $(IDL_CHAPTER_REFS) $(DESTIDLLIST) Doxyfile main.dox
     @@-$(MY_DELETE_RECURSIVE) $(DESTDIRGENIDLREF)
     $(TOUCH) $@
 
+.IF "$(VERBOSE)" == "TRUE"
+MY_QUIET = NO
+.ELSE
+MY_QUIET = YES
+.END
+
 $(IDL_DOCU_INDEX_FILE) : $(IDL_DOCU_CLEANUP_FLAG) 
     -$(MKDIRHIER) $(@:d) 
-    $(MY_AUTODOC) -html $(DESTDIRGENIDLREF) -dvgroot "http://wiki.services.openoffice.org/wiki"; \
-        -name $(IDLDOCREFNAME) -lg idl -dvgfile $(IDL_CHAPTER_REFS) -t $(DESTDIRIDL)
-    -rm $(@:d)/idl.css
-    $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)/docs/common/ref/idl.css $(MY_TEXTCOPY_TARGETPRE) $(@:d:d)/idl.css
+    $(SED) \
+        -e 's!^INPUT = %$$!INPUT = main.dox $(IDLOUT)!' \
+        -e 's!^OUTPUT_DIRECTORY = %$$!OUTPUT_DIRECTORY = $(DESTDIRGENIDLREF)!' \
+        -e 's!^PROJECT_BRIEF = %$$!PROJECT_BRIEF = $(IDLDOCREFNAME)!' \
+        -e 's!^QUIET = %$$!QUIET = $(MY_QUIET)!' \
+        -e 's!^STRIP_FROM_PATH = %$$!STRIP_FROM_PATH = $(SOLARINCDIR)!' \
+        Doxyfile > $(MISC)/idl-Doxyfile
+    $(DOXYGEN) $(MISC)/idl-Doxyfile
+#    $(MY_AUTODOC) -html $(DESTDIRGENIDLREF) -dvgroot "http://wiki.services.openoffice.org/wiki"; \
+#        -name $(IDLDOCREFNAME) -lg idl -dvgfile $(IDL_CHAPTER_REFS) -t $(DESTDIRIDL)
+#    -rm $(@:d)/idl.css
+#    $(MY_TEXTCOPY) $(MY_TEXTCOPY_SOURCEPRE) $(PRJ)/docs/common/ref/idl.css $(MY_TEXTCOPY_TARGETPRE) $(@:d:d)/idl.css
 
  
 .IF "$(SOLAR_JAVA)" != ""
diff --git a/odk/util/check.pl b/odk/util/check.pl
index 7811635..676e5b1 100644
--- a/odk/util/check.pl
+++ b/odk/util/check.pl
@@ -91,7 +91,7 @@ if (-d "$StartDir") {
              "images/nav_right.png","images/nav_up.png",
              "images/sdk_head-1.png", "images/sdk_head-2.png",
              "images/sdk_line-1.gif", "images/sdk_line-2.gif",
-             "common/ref/idl.css", "images/nada.gif",
+             "images/nada.gif",
              "images/arrow-2.gif", "images/bluball.gif",
              "images/orc-main-app_32.png", "images/ooo-main-app_32.png");
 
@@ -220,150 +220,18 @@ if (-d "$StartDir") {
 
     #check idl docu, it is only a first and simple check
     # improvement required
-    print "check idl docu: ";
-    if (-d "$StartDir/docs/common/ref") {
-    if (! -e "$StartDir/docs/common/ref/module-ix.html") {
-        print "\nERROR: \"$StartDir/docs/common/ref/module-ix.html\" is missing\n";
-        $return++;
-    }
-    if (! -d "$StartDir/docs/common/ref/index-files") {
-        print "\nERROR: \"$StartDir/docs/common/ref/index-files\" is missing\n";
-        $return++;
-    }
-    if (! -e "$StartDir/docs/common/ref/index-files/index-10.html") {
-        print "\nERROR: \"$StartDir/docs/common/ref/index-files/index-10.html\" is missing\n";
-        $return++;
-    }
-
-    my @idl_dirlist = ( "accessibility",
-                "animations",
-                "auth",
-                "awt",
-                "awt/tab",
-                "awt/tree",
-                "awt/grid",
-                "beans",
-                "bridge",
-                "bridge/oleautomation",
-                "chart",
-                "chart2",
-                "chart2/data",
-                "configuration",
-                "configuration/backend",
-                "configuration/backend/xml",
-                "configuration/bootstrap",
-                "connection",
-                "container",
-                "datatransfer",
-                "datatransfer/clipboard",
-                "datatransfer/dnd",
-                "deployment",
-                "deployment/ui",
-                "document",
-                "drawing",
-                "drawing/framework",
-                "embed",
-                "form",
-                "form/binding",
-                "form/component",
-                "form/control",
-                "form/inspection",
-                "form/runtime",
-                "form/submission",
-                "form/validation",
-                "formula",
-                "frame",
-                "frame/status",
-                "gallery",
-                "geometry",
-                "graphic",
-                "i18n",
-                "image",
-                "inspection",
-                "installation",
-                "io",
-                "java",
-                "lang",
-                "ldap",
-                "linguistic2",
-                "loader",
-                "logging",
-                "mail",
-                "media",
-                "mozilla",
-                "packages",
-                "packages/manifest",
-                "packages/zip",
-                "plugin",
-                "presentation",
-                "reflection",
-                "registry",
-                "rendering",
-                "report",
-                "report/inspection",
-                "resource",
-                "scanner",
-                "script",
-                "script/browse",
-                "script/provider",
-                "sdb",
-                "sdb/application",
-                "sdb/tools",
-                "sdbc",
-                "sdbcx",
-                "security",
-                "setup",
-                "sheet",
-                "smarttags",
-                "style",
-                "svg",
-                "sync",
-                "sync2",
-                "system",
-                "table",
-                "task",
-                "test",
-                "test/bridge",
-                "test/performance",
-                "text",
-                "text/fieldmaster",
-                "text/textfield",
-                "text/textfield/docinfo",
-                "ucb",
-                "ui",
-                "ui/dialogs",
-                "uno",
-                "uri",
-                "util",
-                "util/logging",
-                "view",
-                "xforms",
-                "xml",
-                "xml/crypto",
-                "xml/crypto/sax",
-                "xml/csax",
-                "xml/dom",
-                "xml/dom/events",
-                "xml/dom/views",
-                "xml/input",
-                "xml/sax",
-                "xml/wrapper",
-                "xml/xpath",
-                "xsd" );
-
-    foreach $i (@idl_dirlist)
-    {
-        if (! -d "$StartDir/docs/common/ref/com/sun/star/$i") {
-        $return++;
-        print "\nERROR: \"$StartDir/docs/common/ref/com/sun/star/$i\" is missing\n";
+    if ($ENV{'DOXYGEN'} ne '') {
+        print "check idl docu: ";
+        if (-d "$StartDir/docs/common/ref") {
+            if (! -e "$StartDir/docs/common/ref/index.html") {
+                print "\nERROR: \"$StartDir/docs/common/ref/index.html\" is missing\n";
+                $return++;
+            }
         } else {
-        print "+";
+            $return++;
         }
+        print "\n";
     }
-    } else {
-    $return++;
-    }
-    print "\n";
 
 } else {
     $return++;
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to