Logo Search packages:      
Sourcecode: calibre version File versions

calibre::ebooks::rtf2xml::paragraph_def::ParagraphDef Class Reference

List of all members.


Detailed Description

=================
Purpose
=================
Write paragraph definition tags.
States:
1. before_1st_para_def.
Before any para_def token is found. This means all the text in the preamble.
Look for the token 'cw<pf<par-def___'. This will changet the state to collect_tokens.
2. collect_tokens.
Found a paragraph_def. Need to get all tokens.
Change with start of a paragrph ('mi<mk<para-start'). State then becomes
in_paragraphs
If another paragraph definition is found, the state does not change.
But the dictionary is reset.
3. in_paragraphs
State changes when 'mi<mk<para-end__', or end of paragraph is found.
State then becomes 'self.__state = 'after_para_end'
4. after_para_end
If 'mi<mk<para-start' (the start of a paragraph) or 'mi<mk<para-end__' (the end of a paragraph--must be empty paragraph?) are found:
state changes to 'in_paragraphs'
If 'cw<pf<par-def___' (paragraph_definition) is found:
state changes to collect_tokens
if 'mi<mk<body-close', 'mi<mk<par-in-fld', 'cw<tb<cell______','cw<tb<row-def___','cw<tb<row_______',    'mi<mk<sect-close',   'mi<mk<header-beg',  'mi<mk<header-end'
are found. (All these tokens mark the start of a bigger element. para_def must
be closed:
state changes to  'after_para_def'
5. after_para_def
'mi<mk<para-start'  changes state to in_paragraphs
if another paragraph_def is found, the state changes to collect_tokens.

Definition at line 20 of file paragraph_def.py.


Public Member Functions

def __init__
def make_paragraph_def

Private Member Functions

def __after_para_def_func
def __after_para_end_func
def __before_1st_para_def_func
def __collect_tokens_func
def __continue_block_func
def __empty_table_element_func
def __end_para_def_func
def __found_para_def_func
def __found_para_end_func
def __get_num_of_style
def __in_paragraphs_func
def __initiate_values
def __new_para_def_func
def __para_def_in_para_def_func
def __parse_border
def __reset_dict
def __start_para_after_def_func
def __stop_block_func
def __tab_bar_func
def __tab_leader_func
def __tab_stop_func
def __tab_type_func
def __write_body_styles
def __write_para_def_beg
def __write_para_def_end_func

Private Attributes

 __after_para_def_dict
 __after_para_end_dict
 __att_val_dict
 __body_style_strings
 __border_obj
 __bug_handler
 __collect_tokens_dict
 __copy
 __default_font
 __end2_marker
 __end_marker
 __file
 __in_paragraphs_dict
 __run_level
 __start2_marker
 __start_marker
 __state
 __state_dict
 __style_num_strings
 __tab_type
 __tab_type_dict
 __tabs_dict
 __text_string
 __token_dict
 __token_info
 cw<pf<par-def___<nu<true
 __write_obj
 __write_to

The documentation for this class was generated from the following file:

Generated by  Doxygen 1.6.0   Back to index