lib

KoListStyleStack.cpp
1#include "KoListStyleStack.h"
2#include <KoDom.h>
3#include <KoXmlNS.h>
4
5KoListStyleStack::KoListStyleStack()
6 : m_initialLevel( 0 )
7{
8}
9
10KoListStyleStack::~KoListStyleStack()
11{
12}
13
15{
16 m_stack.pop();
17}
18
19void KoListStyleStack::push( const TQDomElement& style )
20{
21 m_stack.push( style );
22}
23
24void KoListStyleStack::setInitialLevel( int initialLevel )
25{
26 Q_ASSERT( m_stack.isEmpty() );
27 m_initialLevel = initialLevel;
28}
29
31{
32 Q_ASSERT( !m_stack.isEmpty() );
33 return m_stack.top();
34}
35
37{
38 TQDomElement style = currentListStyle();
39 return KoDom::namedItemNS( style, KoXmlNS::style, "list-level-properties" );
40}
41
43{
44 TQDomElement style = currentListStyle();
45 return KoDom::namedItemNS( style, KoXmlNS::style, "text-properties" );
46}
int initialLevel() const
TQDomElement currentListStyleProperties() const
void pop()
Removes the style on top of the stack.
void setInitialLevel(int initialLevel)
Set the initial level of the list, i.e.
void push(const TQDomElement &style)
Pushes the new list-style onto the stack.
TQDomElement currentListStyle() const
TQDomElement currentListStyleTextProperties() const
KOFFICECORE_EXPORT TQDomElement namedItemNS(const TQDomNode &node, const char *nsURI, const char *localName)
A namespace-aware version of TQDomNode::namedItem(), which also takes care of casting to a TQDomEleme...
Definition KoDom.cpp:22