日韩久久久精品,亚洲精品久久久久久久久久久,亚洲欧美一区二区三区国产精品 ,一区二区福利

Abiword文檔對象初始化

系統(tǒng) 2472 0

Abiword文檔對象初始化

新建或開發(fā)文檔

  • PD_Document類的實(shí)例化

如果是新建文檔,調(diào)用PD_Document::newDocument函數(shù)創(chuàng)建新文檔,或則調(diào)用PD_Document::readFromFile打開一個文檔。

  • pt_PieceTable類的實(shí)例化,通過該類初始化文檔的物理存儲架構(gòu)。也就是PieceTable數(shù)據(jù)結(jié)構(gòu)的實(shí)現(xiàn)
  1. pf_Frag_Strux_Section類,該類實(shí)例化后放入pf_Fragments中。
  2. pf_Frag_Strux_Block 類,同樣放入pf_Fragments中。
  3. pf_Frag 類,實(shí)例化pf_Frag::PFT_EndOfDoc的對象,表示文檔結(jié)尾的片段。
  • AP_Frame::_showDocument方法
  1. 調(diào)用_createViewGraphics函數(shù)創(chuàng)建:GR_Graphics對象,F(xiàn)L_DocLayout類的實(shí)例化

??? FL_DocLayout is a formatted representation of a specific PD_Document,?
??? formatted for a specific GR_Graphics context.?

  1. FV_View類的實(shí)例化,?調(diào)用AP_Frame::_replaceView函數(shù)
  2. FL_DocLayout::fillLayouts函數(shù)中,實(shí)例化 fl_DocListener
  3. PD_Document::addListener方法將 fl_DocListener 對象添加到文檔中
  4. pt_PieceTable::addListener, 循環(huán)pf_Fragments(鏈表數(shù)據(jù)結(jié)構(gòu))對象 ,初始化對應(yīng)的布局類。
  • fl_DocSectionLayout 類,該類對應(yīng)pf_Frag_Strux_Section類,并且存儲這個類對象的指針

該類實(shí)例化后,被添加到FL_DocLayout中。

- each FL_DocLayout contains a list of fl_SectionLayout objects
- each fl_SectionLayout are composed of fl_BlockLayout objects

  • fl_BlockLayout類,該類對應(yīng)pf_Frag_Strux_Block ,并且存儲這個類對象的指針

Where each fl_BlockLayout corresponds to a logical element in
?the PD_Document (i.e., usually a paragraph of text).

在fl_BlockLayout::_insertEndOfParagraphRun函數(shù)中,初始化FL_DocLayout的物理結(jié)構(gòu)。

  • ?fp_EndOfParagraphRun類的實(shí)例化。
  • fp_Line?類的實(shí)例化。
  • FL_DocLayout::addNewPage函數(shù)初始化fp_Page類
  • fp_Column 類實(shí)例化
  • 調(diào)用fp_VerticalContainer::insertContainer函數(shù)把fp_Line?添加到fp_Column 類中。
  • 把fp_EndOfParagraphRun對象添加到fp_Line?中

編輯文檔

  • ?FV_View::_charInsert函數(shù)
  1. FV_View::insertParaBreakIfNeededAtPos

    ??????? Insrts a block and returns true if the point is at the end of a?
    ??????? section or document and the previous strux is not a block

    ??????if(!isParaBreakNeededAtPos(pos))
    ???? {
    ???????? return false;
    ?????}
    ???? m_pDoc->insertStrux(pos,PTX_Block);//如果需要就插入Block
    ???? return true;

  2. ?PD_Document::insertSpan

???????? pt_PieceTable::_insertFmtMarkFragWithNotify, 實(shí)例化pf_Frag_FmtMark類、fp_FmtMarkRun類

???????? pt_PieceTable::insertSpan函數(shù),實(shí)例化pf_Frag_Text

???????? 通過構(gòu)建PX_ChangeRecord類,調(diào)用PD_Document::notifyListeners函數(shù),通過fl_DocListener::change方法通知fmt層數(shù)據(jù)發(fā)生變化。

???????? 通過fl_SectionLayout,fl_BlockLayout::_doInsertTextSpan的方法,實(shí)例化fp_TextRun

?

  • 增加新行時,實(shí)例化pf_Frag_Strux_Block、fl_BlockLayout、fp_EndOfParagraphRun、fp_Line

Abiword文檔對象初始化


更多文章、技術(shù)交流、商務(wù)合作、聯(lián)系博主

微信掃碼或搜索:z360901061

微信掃一掃加我為好友

QQ號聯(lián)系: 360901061

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描下面二維碼支持博主2元、5元、10元、20元等您想捐的金額吧,狠狠點(diǎn)擊下面給點(diǎn)支持吧,站長非常感激您!手機(jī)微信長按不能支付解決辦法:請將微信支付二維碼保存到相冊,切換到微信,然后點(diǎn)擊微信右上角掃一掃功能,選擇支付二維碼完成支付。

【本文對您有幫助就好】

您的支持是博主寫作最大的動力,如果您喜歡我的文章,感覺我的文章對您有幫助,請用微信掃描上面二維碼支持博主2元、5元、10元、自定義金額等您想捐的金額吧,站長會非常 感謝您的哦?。。?/p>

發(fā)表我的評論
最新評論 總共0條評論
主站蜘蛛池模板: 河北省| 庆云县| 车险| 辽宁省| 墨江| 泌阳县| 宁化县| 丹棱县| 禄丰县| 峨山| 沙湾县| 子洲县| 木兰县| 商丘市| 漳浦县| 和林格尔县| 花莲县| 府谷县| 邹城市| 乌海市| 通化市| 榕江县| 山阴县| 化州市| 湘西| 桦甸市| 阿鲁科尔沁旗| 岢岚县| 揭东县| 隆德县| 南宫市| 济宁市| 土默特左旗| 长垣县| 灌阳县| 鱼台县| 康保县| 鹿泉市| 黄冈市| 河津市| 柘城县|