[Libreoffice-commits] core.git: Branch 'aoo/trunk' - odk/pack

Jürgen Schmidt jsc at apache.org
Tue Jun 25 05:07:33 PDT 2013


 odk/pack/gendocu/idl_ref_javadoc.patch |   37 +++++++++++++++++++++++++++++++++
 odk/pack/gendocu/makefile.mk           |    3 ++
 2 files changed, 40 insertions(+)

New commits:
commit f92962f3c6c27db9058dfa7a0d9d1e88d34b53ba
Author: Jürgen Schmidt <jsc at apache.org>
Date:   Tue Jun 25 11:29:37 2013 +0000

    #122356# patch for generated javadoc index

diff --git a/odk/pack/gendocu/idl_ref_javadoc.patch b/odk/pack/gendocu/idl_ref_javadoc.patch
new file mode 100644
index 0000000..4ff644a
--- /dev/null
+++ b/odk/pack/gendocu/idl_ref_javadoc.patch
@@ -0,0 +1,37 @@
+14a15,50
+>     if (targetPage != "" && !validURL(targetPage))
+>         targetPage = "undefined";
+>     function validURL(url) {
+>         var pos = url.indexOf(".html");
+>         if (pos == -1 || pos != url.length - 5)
+>             return false;
+>         var allowNumber = false;
+>         var allowSep = false;
+>         var seenDot = false;
+>         for (var i = 0; i < url.length - 5; i++) {
+>             var ch = url.charAt(i);
+>             if ('a' <= ch && ch <= 'z' ||
+>                     'A' <= ch && ch <= 'Z' ||
+>                     ch == '$' ||
+>                     ch == '_') {
+>                 allowNumber = true;
+>                 allowSep = true;
+>             } else if ('0' <= ch && ch <= '9'
+>                     || ch == '-') {
+>                 if (!allowNumber)
+>                      return false;
+>             } else if (ch == '/' || ch == '.') {
+>                 if (!allowSep)
+>                     return false;
+>                 allowNumber = false;
+>                 allowSep = false;
+>                 if (ch == '.')
+>                      seenDot = true;
+>                 if (ch == '/' && seenDot)
+>                      return false;
+>             } else {
+>                 return false;
+>             }
+>         }
+>         return true;
+>     }
diff --git a/odk/pack/gendocu/makefile.mk b/odk/pack/gendocu/makefile.mk
index 4498a94..624bbea 100644
--- a/odk/pack/gendocu/makefile.mk
+++ b/odk/pack/gendocu/makefile.mk
@@ -111,6 +111,9 @@ $(JAVA_SRC_FILES) : $(SOLARCOMMONBINDIR)$/$$(@:f)
 $(JAVA_DOCU_INDEX_FILE) .SEQUENTIAL : $(JAVA_SRC_FILES)
     -$(MKDIRHIER) $(@:d)        
     $(JAVADOC) -J-Xmx120m $(JAVADOCPARAMS) > $(JAVADOCLOG)
+.IF "$(OS)" != "MACOSX"
+    patch $(JAVA_DOCU_INDEX_FILE) idl_ref_javadoc.patch
+.ENDIF
 .ENDIF
 
 .ELSE


More information about the Libreoffice-commits mailing list