1
0
mirror of https://github.com/gnosygnu/xowa.git synced 2026-03-02 03:49:30 +00:00

'v3.8.5.1'

This commit is contained in:
gnosygnu
2016-08-29 23:31:58 -04:00
parent e4a2af026b
commit 232838c732
292 changed files with 4502 additions and 1838 deletions

View File

@@ -31,12 +31,12 @@ public class Imap_html__hdump__tst {
), String_.Concat_lines_nl_skip_last
( "<div class=\"thumb tright\">"
, " <div class=\"thumbinner\" style=\"width:100px;\">" // NOTE:220px is default w for "non-found" thumb; DATE:2014-09-24
, " <div id='imap_div_0' class=\"noresize\">"
, " <div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " <area href=\"/wiki/B\" shape=\"circle\" coords=\"0,0,5\" alt=\"b1\" title=\"b1\"/>"
, " <area href=\"/wiki/C\" shape=\"rect\" coords=\"0,0,4,8\" alt=\"c1\" title=\"c1\"/>"
, " </map>"
, " <img data-xowa-title=\"A.png\" data-xoimg=\"1|100|200|-1|-1|-1\" src=\"\" width=\"0\" height=\"0\" class=\"thumbimage\" alt=\"\" usemap=\"#imagemap_1_1\"/>"
, " <img data-xowa-title=\"A.png\" data-xoimg=\"1|100|200|-1|-1|-1\" src=\"\" width=\"0\" height=\"0\" alt=\"\" usemap=\"#imagemap_1_1\"/>"
, " </div>"
, " <div class=\"thumbcaption\">"
, "<div class=\"magnify\"><a href=\"/wiki/File:A.png\" class=\"internal\" title=\"Enlarge\"></a></div>a1"

View File

@@ -30,7 +30,7 @@ public class Imap_html__hview__tst {
), String_.Concat_lines_nl_skip_last
( "<div class=\"thumb tright\">"
, " <div id=\"xowa_file_div_0\" class=\"thumbinner\" style=\"width:220px;\">" // NOTE:220px is default w for "non-found" thumb; DATE:2014-09-24
, " <div id='imap_div_0' class=\"noresize\">"
, " <div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " <area href=\"/wiki/B\" shape=\"circle\" coords=\"0,0,5\" alt=\"b1\" title=\"b1\"/>"
, " <area href=\"/wiki/C\" shape=\"rect\" coords=\"0,0,4,8\" alt=\"c1\" title=\"c1\"/>"
@@ -56,7 +56,7 @@ public class Imap_html__hview__tst {
), String_.Concat_lines_nl_skip_last
( "<div class=\"thumb tright\">"
, " <div id=\"xowa_file_div_0\" class=\"thumbinner\" style=\"width:220px;\">" // NOTE:220px is default w for "non-found" thumb; DATE:2014-09-24
, " <div id='imap_div_0' class=\"noresize\">"
, " <div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " </map>"
, " <a href=\"/wiki/B\" title=\"b1\">"
@@ -77,7 +77,7 @@ public class Imap_html__hview__tst {
, "desc top-left"
, "</imagemap>"
), String_.Concat_lines_nl_skip_last
( "<div id='imap_div_0' class=\"noresize\" style=\"height:0px; width: 123px;\">"
( "<div id=\"imap_div_0\" class=\"noresize\" style=\"height:0px; width: 123px;\">"
, " <map name=\"imageMap_1_1\">"
, " </map>"
, " <img id=\"xoimg_0\" alt=\"a1\" src=\"file:///mem/wiki/repo/trg/thumb/7/0/A.png/123px.png\" width=\"123\" height=\"0\" usemap=\"#imageMap_1_1\"/>"
@@ -99,7 +99,7 @@ public class Imap_html__hview__tst {
), String_.Concat_lines_nl_skip_last
( "<div class=\"thumb tright\">"
, " <div id=\"xowa_file_div_0\" class=\"thumbinner\" style=\"width:220px;\">" // NOTE:220px is default w for "non-found" thumb; DATE:2014-09-24
, " <div id='imap_div_0' class=\"noresize\">"
, " <div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " <area href=\"http://b.org\" shape=\"circle\" coords=\"0,0,5\" alt=\"b1\" title=\"b1\"/>"
, " </map>"
@@ -138,7 +138,7 @@ public class Imap_html__hview__tst {
( "<table>"
, " <tr>"
, " <td> z"
, "<div id='imap_div_0' class=\"noresize\">"
, "<div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " </map>"
, " <img id=\"xoimg_0\" alt=\"b\" src=\"file:///mem/wiki/repo/trg/thumb/7/0/A.png/123px.png\" width=\"123\" height=\"0\" usemap=\"#imageMap_1_1\"/>" // NOTE: width must be 123, not 0
@@ -165,7 +165,7 @@ public class Imap_html__hview__tst {
), String_.Concat_lines_nl_skip_last
( "<div class=\"thumb tright\">"
, " <div id=\"xowa_file_div_0\" class=\"thumbinner\" style=\"width:220px;\">" // NOTE:220px is default w for "non-found" thumb; DATE:2014-09-24
, " <div id='imap_div_0' class=\"noresize\">"
, " <div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " <area href=\"/wiki/B\" shape=\"circle\" coords=\"0,0,5\" alt=\"b1\" title=\"b1\"/>"
, " </map>"
@@ -198,7 +198,7 @@ class Imap_xnde_html_fxt {
public void Test_html_full_frag(String raw, String expd) {fxt.Test_html_full_frag(raw, expd);}
public String Frag_html_full() {
return String_.Concat_lines_nl_skip_last
( "<div id='imap_div_0' class=\"noresize\">"
( "<div id=\"imap_div_0\" class=\"noresize\">"
, " <map name=\"imageMap_1_1\">"
, " </map>"
, " <img id=\"xoimg_0\" alt=\"\" src=\"file:///mem/wiki/repo/trg/orig/7/0/A.png\" width=\"0\" height=\"0\" usemap=\"#imageMap_1_1\"/>"

View File

@@ -20,7 +20,7 @@ import gplx.core.brys.fmtrs.*;
public class Imap_html_fmtrs {
public static final Bry_fmtr
All = Bry_fmtr.new_(String_.Concat_lines_nl_skip_last
( "<div id='imap_div_~{imap_id}' class=\"noresize\"~{desc_style}>~{map}~{img}"
( "<div id=\"imap_div_~{imap_id}\" class=\"noresize\"~{desc_style}>~{map}~{img}"
, " </div>"
), "imap_id", "desc_style", "map", "img"
)

View File

@@ -26,12 +26,14 @@ public class Imap_img_arg implements gplx.core.brys.Bfr_arg {
private final int img_elem_id, img_w, img_h;
private final byte[] img_alt, img_src, img_cls, img_href, lnki_ttl;
private final Int_2_ref margin_calc = new Int_2_ref();
private final boolean orig_exists;
public Imap_img_arg(Xoh_wtr_ctx hctx, Imap_xtn_mgr xtn_mgr, Imap_map map
, int img_elem_id, byte[] img_alt, byte[] img_src, int img_w, int img_h, byte[] img_cls, byte[] img_href, byte[] lnki_ttl) {
, int img_elem_id, byte[] img_alt, byte[] img_src, int img_w, int img_h, byte[] img_cls, byte[] img_href, byte[] lnki_ttl, boolean orig_exists) {
this.hctx = hctx; this.map = map; this.xtn_mgr = xtn_mgr;
this.img_elem_id = img_elem_id; this.img_w = img_w; this.img_h = img_h;
this.img_alt = img_alt; this.img_src = img_src; this.img_cls = img_cls; this.img_href = img_href;
this.lnki_ttl = lnki_ttl;
this.orig_exists = orig_exists;
}
public void Bfr_arg__add(Bry_bfr bfr) {
Bry_fmtr fmtr = Imap_html_fmtrs.Img_anchor_none;
@@ -43,7 +45,16 @@ public class Imap_img_arg implements gplx.core.brys.Bfr_arg {
byte[] data_xowa_image = Xoh_file_fmtr__hdump.Bld_xowa_image_data(tmp_bfr, Xop_lnki_type.Id_none, img_w, img_h, Xop_lnki_tkn.Upright_null, Xof_lnki_time.Null, Xof_lnki_page.Null);
byte[] data_xowa_title = Gfh_atr_.Make(tmp_bfr, Xoh_img_xoimg_data.Bry__data_xowa_title, lnki_ttl);
byte[] usemap = tmp_bfr.Add(Imap_xtn_mgr.Bry__usemap__html).Add_int_variable(map.Id()).Add_byte_quote().To_bry_and_clear();
Xoh_file_fmtr__hdump.Add_anch_n(tmp_bfr, data_xowa_title, data_xowa_image, Xoh_img_cls_.Tid__thumbimage, Bry_.Empty, Bry_.Empty, usemap);
int img_w_tmp = img_w; int img_h_tmp = img_h;
byte[] img_src_tmp = img_src;
if (orig_exists) {
data_xowa_image = data_xowa_title = Bry_.Empty;
}
else {
img_w_tmp = img_h_tmp = 0;
img_src_tmp = Bry_.Empty;
}
Xoh_file_fmtr__hdump.Add_anch_n(tmp_bfr, data_xowa_title, data_xowa_image, img_src_tmp, img_w_tmp, img_h_tmp, Xoh_img_cls_.Tid__none, Bry_.Empty, Bry_.Empty, usemap);
bfr.Add_byte_nl().Add_byte_repeat(Byte_ascii.Space, 6);
bfr.Add_bfr_and_clear(tmp_bfr);
} finally {tmp_bfr.Mkr_rls();}