summaryrefslogtreecommitdiffstats
path: root/lib/kotext/KoListStyleStack.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-01-20 01:29:50 +0000
commit8362bf63dea22bbf6736609b0f49c152f975eb63 (patch)
tree0eea3928e39e50fae91d4e68b21b1e6cbae25604 /lib/kotext/KoListStyleStack.cpp
downloadkoffice-8362bf63dea22bbf6736609b0f49c152f975eb63.tar.gz
koffice-8362bf63dea22bbf6736609b0f49c152f975eb63.zip
Added old abandoned KDE3 version of koffice
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/koffice@1077364 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'lib/kotext/KoListStyleStack.cpp')
-rw-r--r--lib/kotext/KoListStyleStack.cpp46
1 files changed, 46 insertions, 0 deletions
diff --git a/lib/kotext/KoListStyleStack.cpp b/lib/kotext/KoListStyleStack.cpp
new file mode 100644
index 000000000..45631b07b
--- /dev/null
+++ b/lib/kotext/KoListStyleStack.cpp
@@ -0,0 +1,46 @@
+#include "KoListStyleStack.h"
+#include <KoDom.h>
+#include <KoXmlNS.h>
+
+KoListStyleStack::KoListStyleStack()
+ : m_initialLevel( 0 )
+{
+}
+
+KoListStyleStack::~KoListStyleStack()
+{
+}
+
+void KoListStyleStack::pop()
+{
+ m_stack.pop();
+}
+
+void KoListStyleStack::push( const QDomElement& style )
+{
+ m_stack.push( style );
+}
+
+void KoListStyleStack::setInitialLevel( int initialLevel )
+{
+ Q_ASSERT( m_stack.isEmpty() );
+ m_initialLevel = initialLevel;
+}
+
+QDomElement KoListStyleStack::currentListStyle() const
+{
+ Q_ASSERT( !m_stack.isEmpty() );
+ return m_stack.top();
+}
+
+QDomElement KoListStyleStack::currentListStyleProperties() const
+{
+ QDomElement style = currentListStyle();
+ return KoDom::namedItemNS( style, KoXmlNS::style, "list-level-properties" );
+}
+
+QDomElement KoListStyleStack::currentListStyleTextProperties() const
+{
+ QDomElement style = currentListStyle();
+ return KoDom::namedItemNS( style, KoXmlNS::style, "text-properties" );
+}