Back to index

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

List of all members.

Public Member Functions

 SpanAction_body ()
 ~SpanAction_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
CharStyle * lastStyle

Detailed Description

Definition at line 1519 of file storytext.cpp.


Constructor & Destructor Documentation

Definition at line 1522 of file storytext.cpp.

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

Definition at line 1525 of file storytext.cpp.

       {
              if (lastStyle)
                     delete lastStyle;
       }

Member Function Documentation

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

Reimplemented from desaxe::Action_body.

Definition at line 1531 of file storytext.cpp.

       {
//            qDebug(QString("spanaction: begin %1").arg(tag));
              if (tag == "span")
              {
                     StoryText* story = this->dig->top<StoryText>();
                     lastPos = story->length();
                     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 SpanAction_body::end ( const Xml_string tag) [inline, virtual]

Reimplemented from desaxe::Action_body.

Definition at line 1544 of file storytext.cpp.

       {
              if (tag == CharStyle::saxxDefaultElem)
//                   qDebug(QString("spanaction: end %1").arg(tag));
              {
                     if (lastStyle)
                            delete lastStyle;
                     lastStyle = this->dig->top<CharStyle>(0);
              }
              else if (tag == "span")
              {
                     StoryText* story = this->dig->top<StoryText>();
                     int len = story->length();
                     if (len > lastPos && lastStyle)
                     {
                            story->applyCharStyle(lastPos, len - lastPos, *lastStyle);
                     }
              }
       }

Member Data Documentation

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

Definition at line 38 of file actions.h.

Definition at line 1564 of file storytext.cpp.

CharStyle* SpanAction_body::lastStyle [private]

Definition at line 1565 of file storytext.cpp.


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