20#include "KPrTextDocument.h"
22#include "KPrDocument.h"
23#include "KPrTextObject.h"
24#include <KoTextParag.h>
27#include "KPrVariableCollection.h"
29#include <KoOasisContext.h>
34 : KoTextDocument( textobj->kPresenterDocument()->zoomHandler(), fc, formatter, true ), m_textobj( textobj )
39KPrTextDocument::~KPrTextDocument()
45 KoTextParag* parag, uint pos,
46 TQString& textData, KoTextCustomItem* & customItem )
48 const TQString localName( tag.localName() );
49 const bool isTextNS = tag.namespaceURI() == KoXmlNS::text;
50 kdDebug( 32500 ) << "KPrTextDocument::loadSpanTag: " << localName << endl;
54 if ( localName == "a" )
56 TQString href( tag.attributeNS( KoXmlNS::xlink, "href", TQString() ) );
57 if ( href.startsWith( "#" ) )
59 context.styleStack().save();
62 parag->loadOasisSpan( tag, context, pos );
63 context.styleStack().restore();
71 TQDomElement spanElem = KoDom::namedItemNS( tag, KoXmlNS::text, "span" );
73 if ( spanElem.isNull() )
75 if ( spanElem.isNull() )
81 context.fillStyleStack( spanElem, KoXmlNS::text, "style-name", "text" );
82 text = spanElem.text();
84 textData = KoTextObject::customItemChar();
86 KoVariableCollection& coll = context.variableCollection();
87 customItem = new KoLinkVariable( this, text, href,
88 coll.formatCollection()->format( "STRING" ),
96 kdDebug()<< "Extension found tagName : "<< localName <<endl;
102#include "KPrTextDocument.moc"
KPrTextDocument(KPrTextObject *textobj, KoTextFormatCollection *fc, KoTextFormatter *formatter=0L) A text document inside a kptextobject.
bool loadSpanTag(const TQDomElement &tag, KoOasisContext &context, KoTextParag *parag, uint pos, TQString &textData, KoTextCustomItem *&customItem) Extensions to KoTextParag::loadOasisSpan.
|