mirror of
https://github.com/gnosygnu/xowa.git
synced 2026-03-02 03:49:30 +00:00
v2.11.1.1
This commit is contained in:
39
400_xowa/src/gplx/xowa/wikis/pages/Xopg_hdump_data.java
Normal file
39
400_xowa/src/gplx/xowa/wikis/pages/Xopg_hdump_data.java
Normal file
@@ -0,0 +1,39 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
import gplx.xowa.htmls.core.makes.imgs.*; import gplx.xowa.files.*;
|
||||
import gplx.xowa.parsers.lnkis.redlinks.*;
|
||||
public class Xopg_hdump_data {
|
||||
public byte[] Body() {return body;} public void Body_(byte[] v) {body = v;} private byte[] body;
|
||||
public Xopg_redlink_idx_list Redlink_mgr() {return redlink_mgr;} private final Xopg_redlink_idx_list redlink_mgr = new Xopg_redlink_idx_list();
|
||||
public List_adp Imgs() {return imgs;} private final List_adp imgs = List_adp_.new_();
|
||||
public void Imgs_add(Xohd_img_itm itm) {imgs.Add(itm);}
|
||||
public void Imgs_add_img(Xohd_img_itm__base img, Xof_file_itm xfer, int tid) {
|
||||
img.Data_init_base
|
||||
( xfer.Lnki_ttl(), xfer.Lnki_type(), xfer.Lnki_upright(), xfer.Lnki_w(), xfer.Lnki_h(), xfer.Lnki_time(), xfer.Lnki_page()
|
||||
, xfer.Orig_repo_id(), xfer.Orig_ext().Id(), xfer.File_is_orig(), xfer.File_w()
|
||||
, xfer.Html_uid(), xfer.Html_w(), xfer.Html_h()
|
||||
);
|
||||
imgs.Add(img);
|
||||
}
|
||||
public void Clear() {
|
||||
body = null;
|
||||
imgs.Clear();
|
||||
redlink_mgr.Clear();
|
||||
}
|
||||
}
|
||||
@@ -39,6 +39,7 @@ public class Xopg_html_data {
|
||||
public Bry_bfr Portal_div_xtn() {return portal_div_xtn;} private Bry_bfr portal_div_xtn = Bry_bfr.reset_(255);
|
||||
public byte[] Edit_preview_w_dbg() {return Bry_.Add(xtn_scribunto_dbg, edit_preview);} public void Edit_preview_(byte[] v) {edit_preview = v;} private byte[] edit_preview = Bry_.Empty;
|
||||
public int Lnke_autonumber_next() {return lnke_autonumber++;} private int lnke_autonumber = 1;
|
||||
public int Sect_uid() {return sect_uid;} private int sect_uid = -1; public int Sect_uid_next() {return ++sect_uid;}
|
||||
public boolean Lang_convert_content() {return lang_convert_content;} public void Lang_convert_content_(boolean v) {lang_convert_content = v;} private boolean lang_convert_content = true;
|
||||
public boolean Lang_convert_title() {return lang_convert_title;} public void Lang_convert_title_(boolean v) {lang_convert_title = v;} private boolean lang_convert_title = true;
|
||||
public Xopg_xtn_skin_mgr Xtn_skin_mgr() {return xtn_skin_mgr;} private Xopg_xtn_skin_mgr xtn_skin_mgr = new Xopg_xtn_skin_mgr();
|
||||
@@ -71,6 +72,7 @@ public class Xopg_html_data {
|
||||
display_ttl = content_sub = display_ttl_vnt = null;
|
||||
lang_convert_content = lang_convert_title = true;
|
||||
lnke_autonumber = 1;
|
||||
sect_uid = -1;
|
||||
xtn_skin_mgr.Clear();
|
||||
xtn_gallery_packed_exists = false;
|
||||
xtn_imap_next_id = 0; xtn_gallery_next_id = -1;
|
||||
|
||||
54
400_xowa/src/gplx/xowa/wikis/pages/Xopg_module_mgr.java
Normal file
54
400_xowa/src/gplx/xowa/wikis/pages/Xopg_module_mgr.java
Normal file
@@ -0,0 +1,54 @@
|
||||
/*
|
||||
XOWA: the XOWA Offline Wiki Application
|
||||
Copyright (C) 2012 gnosygnu@gmail.com
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU Affero General Public License as
|
||||
published by the Free Software Foundation, either version 3 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 Affero General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU Affero General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package gplx.xowa.wikis.pages; import gplx.*; import gplx.xowa.*; import gplx.xowa.wikis.*;
|
||||
public class Xopg_module_mgr {
|
||||
public boolean Math_exists() {return math_exists;} public void Math_exists_(boolean v) {math_exists = v;} private boolean math_exists;
|
||||
public boolean Imap_exists() {return imap_exists;} public void Imap_exists_(boolean v) {imap_exists = v;} private boolean imap_exists;
|
||||
public boolean Gallery_packed_exists() {return gallery_packed_exists;} public void Gallery_packed_exists_(boolean v) {gallery_packed_exists = v;} private boolean gallery_packed_exists;
|
||||
public boolean Hiero_exists() {return hiero_exists;} public void Hiero_exists_(boolean v) {hiero_exists = v;} private boolean hiero_exists;
|
||||
public void Init(boolean math, boolean imap, boolean packed, boolean hiero) {
|
||||
this.math_exists = math;
|
||||
this.imap_exists = imap;
|
||||
this.gallery_packed_exists = packed;
|
||||
this.hiero_exists = hiero;
|
||||
}
|
||||
public int Flag() {return Calc_flag(math_exists, imap_exists, gallery_packed_exists, hiero_exists);}
|
||||
public void Flag_(int v) {
|
||||
this.math_exists = Bitmask_.Has_int(v, Tid_math);
|
||||
this.imap_exists = Bitmask_.Has_int(v, Tid_imap);
|
||||
this.gallery_packed_exists = Bitmask_.Has_int(v, Tid_packed);
|
||||
this.hiero_exists = Bitmask_.Has_int(v, Tid_hiero);
|
||||
}
|
||||
public void Clear() {
|
||||
math_exists = imap_exists = gallery_packed_exists = hiero_exists = false;
|
||||
}
|
||||
private static int Calc_flag(boolean math, boolean imap, boolean packed, boolean hiero) {
|
||||
int rv = 0;
|
||||
if (math) rv = Bitmask_.Add_int(rv, Tid_math);
|
||||
if (imap) rv = Bitmask_.Add_int(rv, Tid_imap);
|
||||
if (packed) rv = Bitmask_.Add_int(rv, Tid_packed);
|
||||
if (hiero) rv = Bitmask_.Add_int(rv, Tid_hiero);
|
||||
return rv;
|
||||
}
|
||||
private static final int // SERIALIZED; only supports 8 different types
|
||||
Tid_math = 1
|
||||
, Tid_imap = 2
|
||||
, Tid_packed = 4
|
||||
, Tid_hiero = 8
|
||||
;
|
||||
}
|
||||
Reference in New Issue
Block a user