filters
liststylestack.cc00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021 #include "liststylestack.h"
00022 #include "ooutils.h"
00023 #include <KoDom.h>
00024
00025 ListStyleStack::ListStyleStack()
00026 : m_initialLevel( 0 )
00027 {
00028 }
00029
00030 ListStyleStack::~ListStyleStack()
00031 {
00032 }
00033
00034 void ListStyleStack::pop()
00035 {
00036 m_stack.pop();
00037 }
00038
00039 void ListStyleStack::push( const QDomElement& style )
00040 {
00041 m_stack.push( style );
00042 }
00043
00044 void ListStyleStack::setInitialLevel( int initialLevel )
00045 {
00046 Q_ASSERT( m_stack.isEmpty() );
00047 m_initialLevel = initialLevel;
00048 }
00049
00050 QDomElement ListStyleStack::currentListStyle() const
00051 {
00052 Q_ASSERT( !m_stack.isEmpty() );
00053 return m_stack.top();
00054 }
00055
00056 QDomElement ListStyleStack::currentListStyleProperties() const
00057 {
00058 QDomElement style = currentListStyle();
00059 return KoDom::namedItemNS( style, ooNS::style, "properties" );
00060 }
|