Back to index

scribus-ng  1.3.4.dfsg+svn20071115
Public Member Functions | Protected Member Functions | Protected Attributes | Private Attributes
Paragraph_body Class Reference
Inheritance diagram for Paragraph_body:
Inheritance graph
[legend]
Collaboration diagram for Paragraph_body:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Paragraph_body ()
 ~Paragraph_body ()
void begin (const Xml_string &tag, Xml_attr)
void end (const Xml_string &tag)

Protected Member Functions

virtual void chars (const Xml_string &)

Protected Attributes

Digester * dig

Private Attributes

int lastPos
ParagraphStyle * lastStyle

Detailed Description

Definition at line 1459 of file storytext.cpp.


Constructor & Destructor Documentation

Definition at line 1462 of file storytext.cpp.

                        : lastPos(0), lastStyle(NULL)
       {}

Definition at line 1465 of file storytext.cpp.

       {
              if (lastStyle)
                     delete lastStyle;
       }

Member Function Documentation

void Paragraph_body::begin ( const Xml_string tag,
Xml_attr   
) [inline, virtual]

Reimplemented from desaxe::Action_body.

Definition at line 1471 of file storytext.cpp.

       {
              if (tag == "p")
              {
                     StoryText* story = this->dig->top<StoryText>();
//                   qDebug(QString("startpar: %1->%2 %3->NULL").arg(lastPos).arg(story->length()).arg((ulong)lastStyle));
                     lastPos = story->length();
                     if (lastPos > 0) {
                            story->insertChars(-1, SpecialChars::PARSEP);
                            ++lastPos;
                     }
                     if (lastStyle)
                            delete lastStyle;
                     lastStyle = NULL;
              }
       }
virtual void desaxe::Action_body::chars ( const Xml_string ) [inline, protected, virtual, inherited]

Reimplemented in AppendText_body, desaxe::SetText_body< Obj_Type >, and desaxe::AddText_body< Obj_Type >.

Definition at line 36 of file actions.h.

{}

Here is the caller graph for this function:

void Paragraph_body::end ( const Xml_string tag) [inline, virtual]

Reimplemented from desaxe::Action_body.

Definition at line 1488 of file storytext.cpp.

       {
              if (tag == ParagraphStyle::saxxDefaultElem)
              {
                     if (lastStyle)
                            delete lastStyle;
                     lastStyle = this->dig->top<ParagraphStyle>(0);
//                   qDebug(QString("endstyle: %1 %2 %3").arg("?").arg(lastPos).arg((ulong)lastStyle));
              }
              else if (tag == "p")
              {
                     StoryText* story = this->dig->top<StoryText>();
                     int len = story->length();
//                   qDebug(QString("endpar: %1 %2 %3 %4").arg(len).arg(lastPos).arg((ulong)lastStyle).arg(lastStyle? lastStyle->parent() : QString()));
                     if (len > lastPos && lastStyle)
                     {
                            story->applyStyle(lastPos, *lastStyle);
                     }
              }
       }

Member Data Documentation

Digester* desaxe::Action_body::dig [protected, inherited]

Definition at line 38 of file actions.h.

Definition at line 1509 of file storytext.cpp.

ParagraphStyle* Paragraph_body::lastStyle [private]

Definition at line 1510 of file storytext.cpp.


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