From 6c3b24a9b6b517c9a73cfd8bcf61c26a687ad864 Mon Sep 17 00:00:00 2001 From: Christopher Lam Date: Mon, 25 Nov 2019 20:38:16 +0800 Subject: [PATCH] [html-style-info] remove font-face/size/color from style-info These were unused in real code. --- gnucash/report/html-document.scm | 30 +----------- gnucash/report/html-style-info.scm | 79 +----------------------------- gnucash/report/report.scm | 11 ----- 3 files changed, 3 insertions(+), 117 deletions(-) diff --git a/gnucash/report/html-document.scm b/gnucash/report/html-document.scm index 17a486974c..782c41f93b 100644 --- a/gnucash/report/html-document.scm +++ b/gnucash/report/html-document.scm @@ -225,10 +225,7 @@ (extra-attrib (and (pair? rest) rest))) ;; now generate the start tag (let ((tag (gnc:html-markup-style-info-tag childinfo)) - (attr (gnc:html-markup-style-info-attributes childinfo)) - (face (gnc:html-markup-style-info-font-face childinfo)) - (size (gnc:html-markup-style-info-font-size childinfo)) - (color (gnc:html-markup-style-info-font-color childinfo))) + (attr (gnc:html-markup-style-info-attributes childinfo))) ;; "" tags mean "show no tag"; #f tags means use default. (cond ((not tag) @@ -263,33 +260,12 @@ (build-first-tag (car tag)) (for-each add-internal-tag (cdr tag))) (build-first-tag tag))) - ;; XXX Font styling should be done through CSS, NOT html code - ;; XXX Also, why is this even here? 'Font' is an html tag just like anything else, - ;; so why does it have it's own custom pseudo code here? It should be built - ;; as a call to this function just like any other tag, passing face/size/color as attributes. - (if (or face size color) - (begin - (issue-deprecation-warning - "this section is unreachable in code") - (push ""))) retval)))) (define (gnc:html-document-markup-end doc markup) (let ((childinfo (gnc:html-document-fetch-markup-style doc markup))) ;; now generate the end tag - (let ((tag (gnc:html-markup-style-info-tag childinfo)) - (closing-font-tag - (gnc:html-markup-style-info-closing-font-tag childinfo))) + (let ((tag (gnc:html-markup-style-info-tag childinfo))) ;; "" tags mean "show no tag"; #f tags means use default. (cond ((not tag) (set! tag markup)) @@ -297,8 +273,6 @@ (set! tag #f))) (let* ((retval '()) (push (lambda (l) (set! retval (cons l retval))))) - (if closing-font-tag - (push "\n")) (if tag (let ((addtag (lambda (t) (push " (deprecate) -;; font-size : string for (deprecate) -;; font-color : color (a valid HTML color spec) (deprecate) -;; closing-font-tag: private data (computed from font-face, -;; font-size, font-color) -;; don't set directly, please! (deprecate) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; @@ -49,10 +43,6 @@ (make-record-type "" '(tag attributes - font-face - font-size - font-color - closing-font-tag? inheritable?))) (define gnc:html-markup-style-info? @@ -63,7 +53,7 @@ (define (gnc:make-html-markup-style-info . rest) (let ((retval (gnc:make-html-markup-style-info-internal - #f (make-hash-table) #f #f #f #f #t))) + #f (make-hash-table) #t))) (apply gnc:html-markup-style-info-set! retval rest) retval)) @@ -76,9 +66,6 @@ (loop rest)) ((field value . rest) - (when (memq field '(font-size font-face font-color)) - (issue-deprecation-warning "font-face/size/color deprecated.") - (gnc:html-markup-style-info-set-closing-font-tag! style (and value #t))) ((record-modifier field) style value) (loop rest)) @@ -96,58 +83,6 @@ (define gnc:html-markup-style-info-set-attributes! (record-modifier 'attributes)) -(define gnc:html-markup-style-info-font-face - ;; deprecated - (record-accessor 'font-face)) - -(define gnc:html-markup-style-info-set-font-face-internal! - ;; deprecated - (record-modifier 'font-face)) - -(define (gnc:html-markup-style-info-set-font-face! record value) - (issue-deprecation-warning - "gnc:html-markup-style-info-set-font-face! is unused") - (gnc:html-markup-style-info-set-closing-font-tag! record value) - (gnc:html-markup-style-info-set-font-face-internal! record value)) - -(define gnc:html-markup-style-info-font-size - ;; deprecated - (record-accessor 'font-size)) - -(define gnc:html-markup-style-info-set-font-size-internal! - ;; deprecated - (record-modifier 'font-size)) - -(define (gnc:html-markup-style-info-set-font-size! record value) - (issue-deprecation-warning - "gnc:html-markup-style-info-set-font-size! is unused") - (gnc:html-markup-style-info-set-closing-font-tag! record value) - (gnc:html-markup-style-info-set-font-size-internal! record value)) - -(define gnc:html-markup-style-info-font-color - ;; deprecated - (record-accessor 'font-color)) - -(define gnc:html-markup-style-info-set-font-color-internal! - ;; deprecated - (record-modifier 'font-color)) - -(define (gnc:html-markup-style-info-set-font-color! record value) - (issue-deprecation-warning - "gnc:html-markup-style-info-set-font-color! is unused") - (begin - (gnc:html-markup-style-info-set-closing-font-tag! - record (not (eq? value #f))) - (gnc:html-markup-style-info-set-font-color-internal! record value))) - -(define gnc:html-markup-style-info-closing-font-tag - ;; deprecated - (record-accessor 'closing-font-tag?)) - -(define gnc:html-markup-style-info-set-closing-font-tag! - ;; deprecated - (record-modifier 'closing-font-tag?)) - (define gnc:html-markup-style-info-inheritable? (record-accessor 'inheritable?)) @@ -180,18 +115,6 @@ (lambda (k v) (hash-set! ht k v)) (gnc:html-markup-style-info-attributes s1)) ht) - ;; font face - (or (gnc:html-markup-style-info-font-face s1) - (gnc:html-markup-style-info-font-face s2)) - ;; font size - (or (gnc:html-markup-style-info-font-size s1) - (gnc:html-markup-style-info-font-size s2)) - ;; color - (or (gnc:html-markup-style-info-font-color s1) - (gnc:html-markup-style-info-font-color s2)) - ;; closing font tag - (or (gnc:html-markup-style-info-closing-font-tag s1) - (gnc:html-markup-style-info-closing-font-tag s2)) ;; inheritable (get this always from child) (gnc:html-markup-style-info-inheritable? s1))))) diff --git a/gnucash/report/report.scm b/gnucash/report/report.scm index 2429cdf456..18f8a94581 100644 --- a/gnucash/report/report.scm +++ b/gnucash/report/report.scm @@ -415,17 +415,6 @@ (export gnc:html-markup-style-info-set-tag!) (export gnc:html-markup-style-info-attributes) (export gnc:html-markup-style-info-set-attributes!) -(export gnc:html-markup-style-info-font-face) ;deprecated -(export gnc:html-markup-style-info-set-font-face-internal!) ;deprecated -(export gnc:html-markup-style-info-set-font-face!) ;deprecated -(export gnc:html-markup-style-info-font-size) ;deprecated -(export gnc:html-markup-style-info-set-font-size-internal!) ;deprecated -(export gnc:html-markup-style-info-set-font-size!) ;deprecated -(export gnc:html-markup-style-info-font-color) ;deprecated -(export gnc:html-markup-style-info-set-font-color-internal!) ;deprecated -(export gnc:html-markup-style-info-set-font-color!) ;deprecated -(export gnc:html-markup-style-info-closing-font-tag) ;deprecated -(export gnc:html-markup-style-info-set-closing-font-tag!) ;deprecated (export gnc:html-markup-style-info-inheritable?) (export gnc:html-markup-style-info-set-inheritable?!) (export gnc:html-markup-style-info-set-attribute!)