pub struct DefaultStyleEntry {
pub name: &'static str,
pub eng_name: &'static str,
pub style_type: &'static str,
pub char_pr_group: u8,
pub para_pr_group: u8,
}Expand description
A single entry in a 한글 default style list.
Each entry corresponds to one <hh:style> element that 한글 expects
to find in header.xml at a specific positional ID.
§Shape index references
char_pr_group and para_pr_group are indices into the default charPr
and paraPr arrays injected at the front of the store by from_registry_with().
Extracted from golden fixture tests/fixtures/textbox.hwpx Contents/header.xml.
Modern (22 styles) mapping:
charPr groups (7 total, id 0-6):
0: 함초롬바탕 10pt #000000 (바탕글/본문/개요1-7/캡션)
1: 함초롬돋움 10pt #000000 (쪽 번호)
2: 함초롬돋움 9pt #000000 (머리말)
3: 함초롬바탕 9pt #000000 (각주/미주)
4: 함초롬돋움 9pt #000000 (메모)
5: 함초롬돋움 16pt #2E74B5 (차례 제목)
6: 함초롬돋움 11pt #000000 (차례 1-3)
paraPr groups (20 total, id 0-19):
0: JUSTIFY left=0 개요8-10 use non-sequential ids (see below)
1: JUSTIFY left=1500 본문
2: JUSTIFY left=1000 OUTLINE lv=1 개요 1
3: JUSTIFY left=2000 OUTLINE lv=2 개요 2
4: JUSTIFY left=3000 OUTLINE lv=3 개요 3
5: JUSTIFY left=4000 OUTLINE lv=4 개요 4
6: JUSTIFY left=5000 OUTLINE lv=5 개요 5
7: JUSTIFY left=6000 OUTLINE lv=6 개요 6
8: JUSTIFY left=7000 OUTLINE lv=7 개요 7
9: JUSTIFY left=0 150% spacing 머리말
10: JUSTIFY indent=-1310 130% 각주/미주
11: LEFT left=0 130% 메모
12: LEFT left=0 prev=1200 next=300 차례 제목
13: LEFT left=0 next=700 차례 1
14: LEFT left=1100 next=700 차례 2
15: LEFT left=2200 next=700 차례 3
16: JUSTIFY left=9000 OUTLINE lv=9 개요 8 (style 9 → paraPr 16)
17: JUSTIFY left=10000 OUTLINE lv=10 개요 9 (style 10 → paraPr 17) NOTE: lv=10 maps to OUTLINE lv=9 in XML but stored as id=17
18: JUSTIFY left=8000 OUTLINE lv=8 개요 10 (style 11 → paraPr 18) NOTE: lv=8 in XML (level field 7→8)
19: JUSTIFY left=0 150% next=800 캡션Fields§
§name: &'static strKorean style name (e.g. "바탕글", "개요 1").
eng_name: &'static strEnglish style name (e.g. "Normal", "Outline 1").
style_type: &'static strStyle type: "PARA" for paragraph styles, "CHAR" for character styles.
char_pr_group: u8Index into the default charPr array (0–6 for Modern).
References the charPrIDRef attribute in <hh:style> elements.
para_pr_group: u8Index into the default paraPr array (0–19 for Modern).
References the paraPrIDRef attribute in <hh:style> elements.
Implementations§
Source§impl DefaultStyleEntry
impl DefaultStyleEntry
Sourcepub fn is_char_style(&self) -> bool
pub fn is_char_style(&self) -> bool
Returns true if this is a character style ("CHAR").
Character styles use nextStyleIDRef=0 (바탕글) instead of
self-referencing like paragraph styles.
Trait Implementations§
Source§impl Clone for DefaultStyleEntry
impl Clone for DefaultStyleEntry
Source§fn clone(&self) -> DefaultStyleEntry
fn clone(&self) -> DefaultStyleEntry
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DefaultStyleEntry
impl Debug for DefaultStyleEntry
Source§impl PartialEq for DefaultStyleEntry
impl PartialEq for DefaultStyleEntry
impl Copy for DefaultStyleEntry
impl Eq for DefaultStyleEntry
impl StructuralPartialEq for DefaultStyleEntry
Auto Trait Implementations§
impl Freeze for DefaultStyleEntry
impl RefUnwindSafe for DefaultStyleEntry
impl Send for DefaultStyleEntry
impl Sync for DefaultStyleEntry
impl Unpin for DefaultStyleEntry
impl UnwindSafe for DefaultStyleEntry
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.