? abi/src/text/fmt/xp/fl_AutoNum.h
? abi/src/text/fmt/xp/fl_AutoNum.cpp
Index: abi/src/text/fmt/xp/Makefile
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/Makefile,v
retrieving revision 1.24
diff -u -r1.24 Makefile
--- abi/src/text/fmt/xp/Makefile	1999/10/08 03:45:11	1.24
+++ abi/src/text/fmt/xp/Makefile	2000/02/27 20:29:33
@@ -31,6 +31,7 @@
 			fl_DocListener.cpp		\
 			fl_Layout.cpp			\
 			fl_SectionLayout.cpp		\
+			fl_AutoNum.cpp			\
 			fp_Column.cpp			\
 			fp_Line.cpp			\
 			fp_Page.cpp			\
Index: abi/src/text/fmt/xp/fl_BlockLayout.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fl_BlockLayout.cpp,v
retrieving revision 1.146
diff -u -r1.146 fl_BlockLayout.cpp
--- abi/src/text/fmt/xp/fl_BlockLayout.cpp	2000/01/30 04:45:31	1.146
+++ abi/src/text/fmt/xp/fl_BlockLayout.cpp	2000/02/27 20:29:46
@@ -26,6 +26,7 @@
 #include "fl_Layout.h"
 #include "fl_DocLayout.h"
 #include "fl_SectionLayout.h"
+#include "fl_AutoNum.h"
 #include "fb_LineBreaker.h"
 #include "fb_Alignment.h"
 #include "fp_Column.h"
@@ -78,20 +79,23 @@
 	m_pFirstRun = NULL;
 	m_pFirstLine = NULL;
 	m_pLastLine = NULL;
+	m_pAutoNum = NULL;
 
 	m_bNeedsReformat = UT_TRUE;
 	m_bNeedsRedraw = UT_FALSE;
 	m_bFixCharWidths = UT_FALSE;
 	m_bKeepTogether = UT_FALSE;
 	m_bKeepWithNext = UT_FALSE;
+	m_bListItem = UT_FALSE;
+	m_bStartList = UT_FALSE;
+	m_bStopList = UT_FALSE;
+	m_bListLabelCreated = UT_FALSE;
 
 	m_pLayout = m_pSectionLayout->getDocLayout();
 	m_pDoc = m_pLayout->getDocument();
 
 	setAttrPropIndex(indexAP);
 
-	_lookupProperties();
-
 	m_pPrev = pPrev;
 	if (m_pPrev)
 	{
@@ -108,6 +112,7 @@
 		m_pNext->m_pPrev = this;
 	}
 
+	_lookupProperties();
 }
 
 fl_TabStop::fl_TabStop()
@@ -393,6 +398,79 @@
 			m_dLineSpacing = m_dLineSpacingLayoutUnits = UT_convertDimensionless(pszSpacing);
 		}
 	}
+
+	const PP_AttrProp * pBlockAP = NULL;
+	getAttrProp(&pBlockAP);
+	const XML_Char * szLid, * szLevel;
+	UT_uint32 id, last_id, level, last_level, curr_level;
+
+	if (!pBlockAP || !pBlockAP->getAttribute(PT_LISTID_ATTRIBUTE_NAME, szLid))
+		szLid = NULL;
+	if (szLid)
+		id = atoi(szLid);
+	else id = 0;
+	if (m_pPrev && m_pPrev->isListItem())
+		last_id = m_pPrev->getAutoNum()->getID();
+	else last_id = 0;
+	
+	if (!pBlockAP || !pBlockAP->getAttribute(PT_LEVEL_ATTRIBUTE_NAME, szLevel))
+		szLevel = NULL;
+	if (szLevel)
+		level = atoi(szLevel);
+	else level = 0;
+	if (m_pPrev)
+		last_level = m_pPrev->getLevel();
+	else last_level = 0;
+	
+	if (id != last_id) 
+	{
+		if ((level > last_level) && !m_bStartList)
+		{
+			if (last_level > 0 && !m_bListItem && !m_bStopList)
+				_addBlockToPrevList();
+		
+			if (m_pAutoNum)
+				curr_level = m_pAutoNum->getLevel();
+			else curr_level = 0;
+		
+			while (curr_level != level)
+			{
+				_startList(id);
+				curr_level++;
+			}
+		}
+		else if ((level == last_level))
+		{
+			/* For now, stop-list then start list */
+			if (!m_bStopList)
+			{
+				if (!m_pAutoNum)
+					_addBlockToPrevList();
+				_stopList();
+			}
+			_startList(id);
+		}
+		else if ((level < last_level) && (!m_bStopList))
+		{
+			if (!m_pAutoNum)
+				_addBlockToPrevList();
+		
+			if (m_pAutoNum)
+				curr_level = m_pAutoNum->getLevel();
+			else curr_level = 0;
+		
+			while (curr_level !=  level)
+			{
+				_stopList();
+				curr_level--;
+			}
+		}
+	}
+	else if ((id > 0) && !m_bListItem)
+	{
+		_addBlockToPrevList();
+		m_bListItem = UT_TRUE;
+	}
 }
 
 fl_BlockLayout::~fl_BlockLayout()
@@ -403,6 +481,13 @@
 	UT_VECTOR_PURGEALL(fl_TabStop *, m_vecTabs);
 
 	DELETEP(m_pAlignment);
+		
+	if (m_pAutoNum) 
+	{
+		m_pAutoNum->removeItem(this);
+		if (m_pAutoNum->isEmpty())
+			DELETEP(m_pAutoNum);
+	}
 }
 
 void fl_BlockLayout::clearScreen(GR_Graphics* /* pG */)
@@ -3488,4 +3573,137 @@
 		pView->updateScreen();
 		pView->_drawInsertionPoint();
 	}
+}
+
+////////////////////////////////////////////////////////////////////////////
+//List Item Stuff
+///////////////////////////////////////////////////////////////////////////
+
+void fl_BlockLayout::_startList(UT_uint32 id)
+{
+	const XML_Char * format = getProperty("format");
+	UT_uint32 start = atoi(getProperty("start-value"));
+
+	m_pAutoNum = new fl_AutoNum(id, start, format, this,  m_pAutoNum);
+	m_bListItem = UT_TRUE;
+	m_bStartList = UT_TRUE;
+}
+
+void fl_BlockLayout::_stopList()
+{
+	fl_AutoNum * pAutoNum;
+
+	UT_ASSERT(m_pAutoNum);
+	m_pAutoNum->removeItem(this);
+	
+	if (m_pAutoNum->getParent())
+	{
+		pAutoNum = m_pAutoNum->getParent();
+		if (!pAutoNum->isItem(this))
+		{
+			pAutoNum->insertItem(this, m_pAutoNum->getFirstItem());
+		}
+	}
+	else
+	{
+		if (m_bListLabelCreated)
+			_deleteListLabel();
+		m_bListItem = UT_FALSE;
+		pAutoNum = NULL;
+	}
+	
+	m_bStopList = UT_TRUE;
+	
+	if (m_pAutoNum->isEmpty())
+	{
+		DELETEP(m_pAutoNum);
+		m_bStopList = UT_FALSE;
+	}
+	
+	m_pAutoNum = pAutoNum;	
+}
+
+void fl_BlockLayout::listUpdate(void)
+{
+	if (!m_pAutoNum)
+		return;
+	
+	if (m_bStartList)
+		m_pAutoNum->update(1);
+	
+	if (!m_bListLabelCreated)
+		_createListLabel();
+	
+	recalculateFields();
+}
+
+void fl_BlockLayout::transferListFlags(void)
+{
+	UT_ASSERT(m_pNext);
+	if (m_pNext->isListItem())
+	{
+		if (!m_pNext->m_bStartList)
+			m_pNext->m_bStartList = m_bStartList;
+		if (!m_pNext->m_bStopList)
+			m_pNext->m_bStopList = m_bStopList;
+	}
+}	
+
+void fl_BlockLayout::_createListLabel(void)
+{
+/*	This is a temporary hack, we need to find out more about the field */
+	if ((m_pFirstRun->getType() == FPRUN_FIELD))
+	{
+		m_bListLabelCreated = UT_TRUE;
+		return;
+	}
+	
+	UT_ASSERT(m_pAutoNum);
+	const XML_Char * attributes[] = { "type", "list_label", 
+					  NULL, NULL,
+					  NULL,	NULL };
+	PD_Document * pDoc = m_pLayout->getDocument();
+	pDoc->insertObject(getPosition(), PTO_Field, attributes, NULL);
+	UT_UCSChar c = UCS_TAB;
+	pDoc->insertSpan(getPosition() + 1, &c, 1);
+	m_bListLabelCreated = UT_TRUE;
+}
+
+void fl_BlockLayout::_deleteListLabel(void)
+{
+	PD_Document * pDoc = m_pLayout->getDocument();
+	UT_uint32 posBlock = getPosition();
+	pDoc->deleteSpan(posBlock, posBlock + 2);
+	m_bListLabelCreated = UT_FALSE;
+}
+
+XML_Char * fl_BlockLayout::getListLabel(void) 
+{
+	UT_ASSERT(m_pAutoNum);
+	return m_pAutoNum->getLabel(this);
+}
+
+inline void fl_BlockLayout::_addBlockToPrevList(void)
+{
+	
+	UT_ASSERT(m_pPrev->getAutoNum());
+	m_pAutoNum = m_pPrev->getAutoNum();
+	m_pAutoNum->insertItem(this, m_pPrev);
+}
+
+inline UT_uint32 fl_BlockLayout::getLevel(void)
+{
+	if (!m_pAutoNum)
+		return 0;
+	else return m_pAutoNum->getLevel();
+}
+
+inline void fl_BlockLayout::setStarting(void)
+{
+	m_bStartList = UT_FALSE;
+}
+
+inline void fl_BlockLayout::setStopping(void)
+{
+	m_bStopList = UT_FALSE;
 }
Index: abi/src/text/fmt/xp/fl_BlockLayout.h
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fl_BlockLayout.h,v
retrieving revision 1.74
diff -u -r1.74 fl_BlockLayout.h
--- abi/src/text/fmt/xp/fl_BlockLayout.h	2000/01/30 04:45:32	1.74
+++ abi/src/text/fmt/xp/fl_BlockLayout.h	2000/02/27 20:29:47
@@ -55,6 +55,7 @@
 class PX_ChangeRecord_Strux;
 class PX_ChangeRecord_StruxChange;
 class fl_PartOfBlock;
+class fl_AutoNum;
 
 class fl_CharWidths
 {
@@ -161,6 +162,16 @@
 
 	inline fp_Run* getFirstRun(void) const { return m_pFirstRun; }
 
+	inline UT_Bool isListItem(void) const { return m_bListItem; }
+	inline fl_AutoNum * getAutoNum(void) const { return m_pAutoNum; }
+
+	virtual void listUpdate(void); 
+	XML_Char * getListLabel(void);
+	void transferListFlags(void);
+	inline UT_uint32 getLevel(void);
+	inline void setStarting(void);
+	inline void setStopping(void);
+
 	void findSquigglesForRun(fp_Run* pRun);
 	UT_uint32 canSlurp(fp_Line* pLine) const;
 
@@ -311,6 +322,12 @@
 	void					_stuffAllRunsOnALine(void);
 	void					_insertFakeTextRun(void);
 
+	void 					_startList(UT_uint32 id);
+	void 					_stopList(void);
+	void					_createListLabel(void);
+	void					_deleteListLabel(void);
+	inline void				_addBlockToPrevList();	
+
 	UT_Bool					m_bNeedsReformat;
 	UT_Bool					m_bNeedsRedraw;
 	UT_Bool					m_bFixCharWidths;
@@ -354,6 +371,12 @@
 	UT_Bool					m_bKeepTogether;
 	UT_Bool					m_bKeepWithNext;
 	const XML_Char *		m_szStyle;
+
+	fl_AutoNum *				m_pAutoNum;
+	UT_Bool					m_bListItem;
+	UT_Bool					m_bStartList;
+	UT_Bool					m_bStopList;
+	UT_Bool					m_bListLabelCreated;
 
 	// spell check stuff
 	UT_Vector				m_vecSquiggles;
Index: abi/src/text/fmt/xp/fl_Layout.h
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fl_Layout.h,v
retrieving revision 1.9
diff -u -r1.9 fl_Layout.h
--- abi/src/text/fmt/xp/fl_Layout.h	1999/04/23 14:25:15	1.9
+++ abi/src/text/fmt/xp/fl_Layout.h	2000/02/27 20:29:48
@@ -48,6 +48,8 @@
 	UT_Bool				getAttrProp(const PP_AttrProp ** ppAP) const;
 	UT_Bool				getSpanAttrProp(UT_uint32 offset, UT_Bool bLeftSide, const PP_AttrProp ** ppAP) const;
 	
+	virtual	void		listUpdate(void) { return; }
+	
 	inline PD_Document *	getDocument(void) const { return m_pDoc; };
 	
 protected:
Index: abi/src/text/fmt/xp/fl_SectionLayout.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fl_SectionLayout.cpp,v
retrieving revision 1.51
diff -u -r1.51 fl_SectionLayout.cpp
--- abi/src/text/fmt/xp/fl_SectionLayout.cpp	2000/01/30 04:56:08	1.51
+++ abi/src/text/fmt/xp/fl_SectionLayout.cpp	2000/02/27 20:29:53
@@ -200,6 +200,7 @@
 	if (pBL->getNext())
 	{
 		pBL->getNext()->setPrev(pBL->getPrev());
+		pBL->transferListFlags();
 	}
 	
 	if (pBL == m_pFirstBlock)
@@ -241,13 +242,13 @@
 
 void fl_SectionLayout::_purgeLayout()
 {
-	fl_BlockLayout*	pBL = m_pFirstBlock;
+	fl_BlockLayout*	pBL = m_pLastBlock;
 
 	while (pBL)
 	{
 		fl_BlockLayout* pNuke = pBL;
 
-		pBL = pBL->getNext();
+		pBL = pBL->getPrev();
 
 		delete pNuke;
 	}
Index: abi/src/text/fmt/xp/fp_Fields.h
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Fields.h,v
retrieving revision 1.1
diff -u -r1.1 fp_Fields.h
--- abi/src/text/fmt/xp/fp_Fields.h	2000/02/12 00:40:50	1.1
+++ abi/src/text/fmt/xp/fp_Fields.h	2000/02/27 20:29:53
@@ -22,3 +22,4 @@
 _FIELDTYPE(NUMBERS, "Numbers")
 _FIELD(NUMBERS, "Page number", page_number)
 _FIELD(NUMBERS, "Number of pages", page_count)
+_FIELD(NUMBERS, "List Label", list_label)
Index: abi/src/text/fmt/xp/fp_Run.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Run.cpp,v
retrieving revision 1.89
diff -u -r1.89 fp_Run.cpp
--- abi/src/text/fmt/xp/fp_Run.cpp	2000/02/12 00:40:50	1.89
+++ abi/src/text/fmt/xp/fp_Run.cpp	2000/02/27 20:29:57
@@ -778,6 +778,13 @@
 		UT_UCS_strcpy_char(sz_ucs_FieldValue, szFieldValue);
 		break;
 	}
+	case FPFIELD_list_label:
+	{
+		char szFieldValue[FPFIELD_MAX_LENGTH + 1];
+		
+		UT_UCS_strcpy_char(sz_ucs_FieldValue, m_pBL->getListLabel());
+		break;
+	}
 	default:
 		UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
 		return UT_FALSE;
@@ -828,6 +835,7 @@
 	m_pFontLayout = pLayout->findFont(pSpanAP,pBlockAP,pSectionAP, FL_DocLayout::FIND_FONT_AT_LAYOUT_RESOLUTION),
 
 	UT_parseColor(PP_evalProperty("color",pSpanAP,pBlockAP,pSectionAP, m_pBL->getDocument(), UT_TRUE), m_colorFG);
+	UT_parseColor(PP_evalProperty("field-color",pSpanAP,pBlockAP,pSectionAP, m_pBL->getDocument(), UT_TRUE), m_colorBG);
 
 	m_pG->setFont(m_pFont);
 	m_iAscent = m_pG->getFontAscent();	
@@ -927,7 +935,6 @@
 		*/
 		
 		UT_RGBColor clrSelBackground(112, 112, 112);
-		UT_RGBColor clrNormalBackground(220, 220, 220);
 
 		UT_sint32 iFillHeight = m_pLine->getHeight();
 		UT_sint32 iFillTop = pDA->yoff - m_pLine->getAscent();
@@ -950,7 +957,7 @@
 		}
 		else
 		{
-			m_pG->fillRect(clrNormalBackground, pDA->xoff, iFillTop, m_iWidth, iFillHeight);
+			m_pG->fillRect(m_colorBG, pDA->xoff, iFillTop, m_iWidth, iFillHeight);
 		}
 	}
 
Index: abi/src/text/fmt/xp/fp_Run.h
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Run.h,v
retrieving revision 1.48
diff -u -r1.48 fp_Run.h
--- abi/src/text/fmt/xp/fp_Run.h	2000/02/12 00:40:50	1.48
+++ abi/src/text/fmt/xp/fp_Run.h	2000/02/27 20:29:58
@@ -279,6 +279,9 @@
 #define FPFIELD_TIME		1
 #define FPFIELD_PAGE_NUMBER	2
 #define FPFIELD_PAGE_COUNT	3
+<<<<<<< fp_Run.h
+#define FPFIELD_LIST_LABEL	4
+=======
 */
 
 #define  _FIELD(type,desc,tag)  /*nothing*/
@@ -343,6 +346,7 @@
 	GR_Font*				m_pFont;
 	GR_Font*				m_pFontLayout;
 	UT_RGBColor				m_colorFG;
+	UT_RGBColor				m_colorBG;
 	UT_UCSChar				m_sFieldValue[FPFIELD_MAX_LENGTH];
 	fp_FieldsEnum			m_iFieldType;
 };
Index: abi/src/text/fmt/xp/fv_View.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
retrieving revision 1.242
diff -u -r1.242 fv_View.cpp
--- abi/src/text/fmt/xp/fv_View.cpp	2000/02/10 21:32:08	1.242
+++ abi/src/text/fmt/xp/fv_View.cpp	2000/02/27 20:30:13
@@ -34,6 +34,7 @@
 #include "fl_DocLayout.h"
 #include "fl_BlockLayout.h"
 #include "fl_SectionLayout.h"
+#include "fl_AutoNum.h"
 #include "fp_Page.h"
 #include "fp_Column.h"
 #include "fp_Line.h"
@@ -967,6 +968,7 @@
 	// as the previous (or none if the first paragraph in the section).
 
 	m_pDoc->insertStrux(getPoint(), PTX_Block);
+	_findGetCurrentBlock()->listUpdate();
 
 	if (bDidGlob)
 		m_pDoc->endUserAtomicGlob();
@@ -1470,6 +1472,70 @@
 		_fixInsertionPointCoords();
 		_drawInsertionPoint();
 	}
+
+	return bRet;
+}
+
+UT_Bool FV_View::cmdStartList(const XML_Char * style)
+{
+	XML_Char lid[15], buf[5];
+	UT_Bool bRet;
+	UT_uint32 id;
+
+	id = rand();
+	sprintf(lid, "%i", id);
+
+	fl_BlockLayout * pBlock = _findBlockAtPosition(getPoint());
+	UT_uint32 currLevel = pBlock->getLevel();
+	currLevel++;
+	sprintf(buf, "%i", currLevel);
+
+	const XML_Char * attribs[] = {  "listid", lid,
+					"level", buf,
+					"style", style, 0 };
+
+	pBlock->setStarting();
+	bRet = m_pDoc->changeStruxFmt(PTC_AddFmt, getPoint(), getPoint(), attribs, NULL, PTX_Block);
+	pBlock->listUpdate();
+	
+	_generalUpdate();
+
+	return bRet;
+}
+
+UT_Bool FV_View::cmdStopList(void)
+{
+	XML_Char lid[15], buf[5];
+	UT_Bool bRet;
+	UT_uint32 id;
+
+	fl_BlockLayout * pBlock = _findBlockAtPosition(getPoint());
+	
+	UT_uint32 currLevel = pBlock->getLevel();
+	UT_ASSERT(currLevel > 0);
+	currLevel--;
+	sprintf(buf, "%i", currLevel);
+	
+	if (currLevel == 0)
+	{
+		setStyle("Normal");
+		id = 0;
+	}
+	else
+	{
+		id = pBlock->getAutoNum()->getParent()->getID();
+	}
+	sprintf(lid, "%i", id);
+	
+	const XML_Char * attribs[] = { 	"listid", lid,
+					"level", buf, 0 };
+
+	pBlock->setStopping();
+	bRet = m_pDoc->changeStruxFmt(PTC_AddFmt, getPoint(), getPoint(), attribs, NULL, PTX_Block);
+	if (currLevel != 0)
+		pBlock->listUpdate();
+
+	_generalUpdate();
 
 	return bRet;
 }
Index: abi/src/text/fmt/xp/fv_View.h
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.h,v
retrieving revision 1.108
diff -u -r1.108 fv_View.h
--- abi/src/text/fmt/xp/fv_View.h	2000/02/10 21:32:08	1.108
+++ abi/src/text/fmt/xp/fv_View.h	2000/02/27 20:30:14
@@ -148,6 +148,9 @@
 	UT_Bool setBlockFormat(const XML_Char * properties[]);
 	UT_Bool getBlockFormat(const XML_Char *** properties,UT_Bool bExpandStyles=UT_TRUE);
 
+	UT_Bool cmdStartList(const XML_Char * style);
+	UT_Bool cmdStopList(void);
+
 	UT_Bool setCharFormat(const XML_Char * properties[]);
 	UT_Bool getCharFormat(const XML_Char *** properties,UT_Bool bExpandStyles=UT_TRUE);
 
Index: abi/src/text/ptbl/xp/pp_Property.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/ptbl/xp/pp_Property.cpp,v
retrieving revision 1.26
diff -u -r1.26 pp_Property.cpp
--- abi/src/text/ptbl/xp/pp_Property.cpp	1999/11/21 04:15:08	1.26
+++ abi/src/text/ptbl/xp/pp_Property.cpp	2000/02/27 20:30:15
@@ -40,6 +40,7 @@
 static PP_Property _props[] =
 {
 	{ "color",					"000000",			1},
+	{ "field-color",				"dcdcdc",	1},
 	{ "font-family",			"Times New Roman",	1},	// TODO this is Win32-specific.  must fix!
 	{ "font-size",				"14pt",				1},	// MS word defaults to 10pt, but it just seems too small
 	{ "font-stretch",			"normal",			1},
@@ -55,6 +56,9 @@
 	{ "margin-right",			"0in",				0},
 	{ "text-indent",			"0in",				0},
 	{ "text-align",				"left",				1},
+
+	{ "start-value",			"1",				1},
+	{ "format",				"%*%d.",			1},
 
 	{ "width",					"",					0},
 	{ "height",					"",					0},
Index: abi/src/text/ptbl/xp/pt_PT_Styles.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/ptbl/xp/pt_PT_Styles.cpp,v
retrieving revision 1.4
diff -u -r1.4 pt_PT_Styles.cpp
--- abi/src/text/ptbl/xp/pt_PT_Styles.cpp	1999/04/29 15:19:22	1.4
+++ abi/src/text/ptbl/xp/pt_PT_Styles.cpp	2000/02/27 20:30:16
@@ -49,6 +49,8 @@
 	_s("Heading 3",	"P", "Normal", "Normal", "font-family:Arial; font-size:12pt; margin-top:12pt; margin-bottom:3pt; keep-with-next:1");
 	_s("Plain Text","P", "Normal", "Plain Text", "font-family:Courier New");
 	_s("Block Text","P", "Normal", "Block Text", "margin-left:1in; margin-right:1in; margin-bottom:6pt");
+	_s("Numbered List","P", "Normal", "Numbered List", "format:%*%d.; start-value:1; margin-left:0.25in; text-indent:-0.2500in; field-color: ffffff");
+	_s("Bulleted List", "P", "Numbered List", "Bulleted List", "format:%b");
 
 	return UT_TRUE;
 
Index: abi/src/text/ptbl/xp/pt_Types.h
===================================================================
RCS file: /cvsroot/abi/src/text/ptbl/xp/pt_Types.h,v
retrieving revision 1.22
diff -u -r1.22 pt_Types.h
--- abi/src/text/ptbl/xp/pt_Types.h	1999/09/26 18:17:31	1.22
+++ abi/src/text/ptbl/xp/pt_Types.h	2000/02/27 20:30:17
@@ -75,6 +75,8 @@
 
 #define PT_PROPS_ATTRIBUTE_NAME			((const XML_Char *)"props")
 #define PT_STYLE_ATTRIBUTE_NAME			((const XML_Char *)"style")
+#define PT_LEVEL_ATTRIBUTE_NAME			((const XML_Char *)"level")
+#define PT_LISTID_ATTRIBUTE_NAME		((const XML_Char *)"listid")
 #define PT_NAME_ATTRIBUTE_NAME			((const XML_Char *)"name")
 #define PT_TYPE_ATTRIBUTE_NAME			((const XML_Char *)"type")
 #define PT_BASEDON_ATTRIBUTE_NAME		((const XML_Char *)"basedon")
Index: abi/src/wp/ap/xp/ap_EditMethods.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_EditMethods.cpp,v
retrieving revision 1.181
diff -u -r1.181 ap_EditMethods.cpp
--- abi/src/wp/ap/xp/ap_EditMethods.cpp	2000/02/17 18:38:07	1.181
+++ abi/src/wp/ap/xp/ap_EditMethods.cpp	2000/02/27 20:30:33
@@ -352,6 +352,10 @@
 	static EV_EditMethod_Fn viCmd_yw;
 	static EV_EditMethod_Fn viCmd_yy;
 
+	static EV_EditMethod_Fn listStartNumbered;
+	static EV_EditMethod_Fn listStartBulleted;
+	static EV_EditMethod_Fn listStop;
+
 	static EV_EditMethod_Fn noop;
 
 	// Test routines
@@ -630,6 +634,10 @@
 	EV_EditMethod(NF(viCmd_yb),		0,	""),
 	EV_EditMethod(NF(viCmd_yw),		0,	""),
 	EV_EditMethod(NF(viCmd_yy),		0,	""),
+	
+	EV_EditMethod(NF(listStartNumbered),		0,	""),
+	EV_EditMethod(NF(listStartBulleted),		0,	""),
+	EV_EditMethod(NF(listStop),			0,	""),
 
 	EV_EditMethod(NF(noop),					0,	""),
 
@@ -4531,4 +4539,22 @@
 {
 	//copy current line
 	return ( EX(warpInsPtBOL) && EX(extSelEOL) && EX(copy) );
+}
+
+Defun1(listStartNumbered)
+{
+	ABIWORD_VIEW;
+	return pView->cmdStartList("Numbered List");
+}
+
+Defun1(listStartBulleted)
+{
+	ABIWORD_VIEW;
+	return pView->cmdStartList("Bulleted List");
+}
+
+Defun1(listStop)
+{
+	ABIWORD_VIEW;
+	return pView->cmdStopList();
 }
Index: abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp,v
retrieving revision 1.26
diff -u -r1.26 ap_Menu_ActionSet.cpp
--- abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp	2000/02/17 18:38:07	1.26
+++ abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp	2000/02/27 20:30:34
@@ -173,6 +173,9 @@
 
 	// ... add others here ...
 	
+	_s(AP_MENU_ID_FMT_STARTLIST,	0,0,0,	"listStartNumbered",	NULL,	NULL);
+	_s(AP_MENU_ID_FMT_STOPLIST,	0,0,0,	"listStop",	NULL,	NULL);
+	
 	_s(AP_MENU_ID__BOGUS2__,		0,0,0,	NULL,				NULL,					NULL);
 
 #undef _s
Index: abi/src/wp/ap/xp/ap_Menu_Id.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Menu_Id.h,v
retrieving revision 1.17
diff -u -r1.17 ap_Menu_Id.h
--- abi/src/wp/ap/xp/ap_Menu_Id.h	2000/02/17 18:38:07	1.17
+++ abi/src/wp/ap/xp/ap_Menu_Id.h	2000/02/27 20:30:35
@@ -145,6 +145,9 @@
 
 	/* ... add others here ... */
 
+	AP_MENU_ID_FMT_STARTLIST,
+	AP_MENU_ID_FMT_STOPLIST,
+
 	AP_MENU_ID__BOGUS2__				/* must be last */
 
 };
Index: abi/src/wp/ap/xp/ap_Menu_LabelSet_en-US.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Menu_LabelSet_en-US.h,v
retrieving revision 1.25
diff -u -r1.25 ap_Menu_LabelSet_en-US.h
--- abi/src/wp/ap/xp/ap_Menu_LabelSet_en-US.h	2000/02/22 21:35:54	1.25
+++ abi/src/wp/ap/xp/ap_Menu_LabelSet_en-US.h	2000/02/27 20:30:36
@@ -144,6 +144,9 @@
 
 	// ... add others here ...
 
+	MenuLabel(AP_MENU_ID_FMT_STARTLIST,	"Start List",	"Temp")
+	MenuLabel(AP_MENU_ID_FMT_STOPLIST,	"Stop List",	"Temp"
+
 	MenuLabel(AP_MENU_ID__BOGUS2__,			NULL,				NULL)
 
 EndSet()
Index: abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h,v
retrieving revision 1.17
diff -u -r1.17 ap_Menu_Layouts_MainMenu.h
--- abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h	2000/02/17 18:38:07	1.17
+++ abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h	2000/02/27 20:30:37
@@ -112,6 +112,9 @@
 			MenuItem(AP_MENU_ID_ALIGN_JUSTIFY)
 		EndSubMenu()
 		MenuItem(AP_MENU_ID_FMT_STYLE)
+		Separator()
+		MenuItem(AP_MENU_ID_FMT_STARTLIST)
+		MenuItem(AP_MENU_ID_FMT_STOPLIST)
 	EndSubMenu()
 
 	BeginSubMenu(AP_MENU_ID_TOOLS)
