From 539ef5283748436ed90cf60bfe34118c18ff8ff3 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Thu, 18 Dec 2014 16:47:20 +0100 Subject: [PATCH] Whitespace cosmetics Replace tabs with spaces Align some related lines Remove trailing whitespace --- src/report/report-system/html-document.scm | 206 ++++++++++----------- 1 file changed, 103 insertions(+), 103 deletions(-) diff --git a/src/report/report-system/html-document.scm b/src/report/report-system/html-document.scm index 8af0ba71e8..7916eda017 100644 --- a/src/report/report-system/html-document.scm +++ b/src/report/report-system/html-document.scm @@ -1,18 +1,18 @@ ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; html-document.scm : generate HTML programmatically, with support -;; for simple style elements. +;; for simple style elements. ;; Copyright 2000 Bill Gribble -;; -;; This program is free software; you can redistribute it and/or -;; modify it under the terms of the GNU General Public License as -;; published by the Free Software Foundation; either version 2 of -;; the License, or (at your option) any later version. -;; -;; This program is distributed in the hope that it will be useful, -;; but WITHOUT ANY WARRANTY; without even the implied warranty of -;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;; GNU General Public License for more details. -;; +;; +;; This program is free software; you can redistribute it and/or +;; modify it under the terms of the GNU General Public License as +;; published by the Free Software Foundation; either version 2 of +;; the License, or (at your option) any later version. +;; +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. +;; ;; You should have received a copy of the GNU General Public License ;; along with this program; if not, contact: ;; @@ -25,29 +25,29 @@ (use-modules (gnucash printf)) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; class +;; class ;; this is the top-level object representing an entire HTML document. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -(define - (make-record-type "" +(define + (make-record-type "" '(style-sheet style-stack style style-text title headline objects))) -(define gnc:html-document? +(define gnc:html-document? (record-predicate )) (define gnc:make-html-document-internal (record-constructor )) (define (gnc:make-html-document) - (gnc:make-html-document-internal - #f ;; the stylesheet + (gnc:make-html-document-internal + #f ;; the stylesheet '() ;; style stack (gnc:make-html-style-table) ;; document style info #f ;; style text "" ;; document title #f ;; headline - '() ;; subobjects + '() ;; subobjects )) (define gnc:html-document-set-title! @@ -102,9 +102,9 @@ (let ((newstyle #f)) (if (and (= (length rest) 2) (procedure? (car rest))) - (set! newstyle + (set! newstyle (apply gnc:make-html-data-style-info rest)) - (set! newstyle + (set! newstyle (apply gnc:make-html-markup-style-info rest))) (gnc:html-style-table-set! (gnc:html-document-style doc) tag newstyle))) @@ -117,7 +117,7 @@ (set! retval (cons elt retval)) (if (not (list? elt)) (set! retval - (cons (with-output-to-string + (cons (with-output-to-string (lambda () (display elt))) retval)) (do-list elt)))) @@ -127,66 +127,66 @@ ;; first optional argument is "headers?" ;; returns the html document as a string, I think. -(define (gnc:html-document-render doc . rest) +(define (gnc:html-document-render doc . rest) (let ((stylesheet (gnc:html-document-style-sheet doc)) (headers? (if (null? rest) #f (if (car rest) #t #f))) - (style-text (gnc:html-document-style-text doc)) - ) - (if stylesheet - ;; if there's a style sheet, let it do the rendering + (style-text (gnc:html-document-style-text doc)) + ) + (if stylesheet + ;; if there's a style sheet, let it do the rendering (gnc:html-style-sheet-render stylesheet doc headers?) - - ;; otherwise, do the trivial render. + + ;; otherwise, do the trivial render. (let* ((retval '()) (push (lambda (l) (set! retval (cons l retval)))) - (objs (gnc:html-document-objects doc)) - (work-to-do (length objs)) - (css? (gnc-html-engine-supports-css)) - (work-done 0) + (objs (gnc:html-document-objects doc)) + (work-to-do (length objs)) + (css? (gnc-html-engine-supports-css)) + (work-done 0) (title (gnc:html-document-title doc))) - ;; compile the doc style + ;; compile the doc style (gnc:html-style-table-compile (gnc:html-document-style doc) (gnc:html-document-style-stack doc)) - ;; push it + ;; push it (gnc:html-document-push-style doc (gnc:html-document-style doc)) (if (not (string-null? title)) (gnc:report-render-starting (gnc:html-document-title doc))) (if (not (null? headers?)) - (begin + (begin ;;This is the only place where appears - ;;with the exception of 2 reports: + ;;with the exception of 2 reports: ;;./share/gnucash/scm/gnucash/report/taxinvoice.eguile.scm: ;;./share/gnucash/scm/gnucash/report/balsheet-eg.eguile.scm: (push "\n") (push "\n") - (if css? - (if style-text - (push (list "" style-text "" style-text "