? abi/AbiWord
? abi/src/Linux_2.2.5-15_i386_DBG
? 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 -c -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/11 00:35:02
***************
*** 31,36 ****
--- 31,37 ----
  			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 -c -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/11 00:35:13
***************
*** 26,31 ****
--- 26,32 ----
  #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,97 ****
  	m_pFirstRun = NULL;
  	m_pFirstLine = NULL;
  	m_pLastLine = NULL;
  
  	m_bNeedsReformat = UT_TRUE;
  	m_bNeedsRedraw = UT_FALSE;
  	m_bFixCharWidths = UT_FALSE;
  	m_bKeepTogether = UT_FALSE;
  	m_bKeepWithNext = UT_FALSE;
  
  	m_pLayout = m_pSectionLayout->getDocLayout();
  	m_pDoc = m_pLayout->getDocument();
  
  	setAttrPropIndex(indexAP);
  
- 	_lookupProperties();
- 
  	m_pPrev = pPrev;
  	if (m_pPrev)
  	{
--- 79,101 ----
  	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);
  
  	m_pPrev = pPrev;
  	if (m_pPrev)
  	{
***************
*** 108,113 ****
--- 112,118 ----
  		m_pNext->m_pPrev = this;
  	}
  
+ 	_lookupProperties();
  }
  
  fl_TabStop::fl_TabStop()
***************
*** 393,398 ****
--- 398,457 ----
  			m_dLineSpacing = m_dLineSpacingLayoutUnits = UT_convertDimensionless(pszSpacing);
  		}
  	}
+ 
+ 	const PP_AttrProp * pBlockAP = NULL;
+ 	getAttrProp(&pBlockAP);
+ 	const XML_Char * szLevel;
+ 	UT_uint32 level, last_level, curr_level;
+ 	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;
+ 	
+ 	UT_Bool starting = ((level > last_level) || (level == last_level && m_bStopList));
+ 	
+ 	if (starting && (!m_bStartList)) 
+ 	{
+ 		if (last_level > 0 && !m_bListItem && !m_bStopList)
+ 			_addBlockToPrevList();
+ 		
+ 		if (m_pAutoNum)
+ 			curr_level = m_pAutoNum->getLevel();
+ 		else curr_level = 0;
+ 		
+ 		UT_uint32 value = (UT_uint32)atoi(getProperty("start-value"));
+ 		const XML_Char * format = getProperty("format");
+ 		
+ 		while (curr_level != level)
+ 		{
+ 			_startList(value, format);
+ 			curr_level++;
+ 		}
+ 	}
+ 	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 ((level == last_level) && (level > 0) && (!m_bListItem) && (!m_bStopList))
+ 	{
+ 		_addBlockToPrevList();
+ 		m_bListItem = UT_TRUE;
+ 	}
  }
  
  fl_BlockLayout::~fl_BlockLayout()
***************
*** 403,408 ****
--- 462,474 ----
  	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,3491 ****
--- 3554,3687 ----
  		pView->updateScreen();
  		pView->_drawInsertionPoint();
  	}
+ }
+ 
+ ////////////////////////////////////////////////////////////////////////////
+ //List Item Stuff
+ ///////////////////////////////////////////////////////////////////////////
+ 
+ void fl_BlockLayout::_startList(UT_uint32 start, const XML_Char * format)
+ {
+ 	m_pAutoNum = new fl_AutoNum(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 -c -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/11 00:35:15
***************
*** 55,60 ****
--- 55,61 ----
  class PX_ChangeRecord_Strux;
  class PX_ChangeRecord_StruxChange;
  class fl_PartOfBlock;
+ class fl_AutoNum;
  
  class fl_CharWidths
  {
***************
*** 161,166 ****
--- 162,177 ----
  
  	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,316 ****
--- 322,333 ----
  	void					_stuffAllRunsOnALine(void);
  	void					_insertFakeTextRun(void);
  
+ 	void 					_startList(UT_uint32 start, const XML_Char * format);
+ 	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,359 ****
--- 371,382 ----
  	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 -c -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/11 00:35:16
***************
*** 48,53 ****
--- 48,55 ----
  	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 -c -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/11 00:35:21
***************
*** 200,205 ****
--- 200,206 ----
  	if (pBL->getNext())
  	{
  		pBL->getNext()->setPrev(pBL->getPrev());
+ 		pBL->transferListFlags();
  	}
  	
  	if (pBL == m_pFirstBlock)
***************
*** 241,253 ****
  
  void fl_SectionLayout::_purgeLayout()
  {
! 	fl_BlockLayout*	pBL = m_pFirstBlock;
  
  	while (pBL)
  	{
  		fl_BlockLayout* pNuke = pBL;
  
! 		pBL = pBL->getNext();
  
  		delete pNuke;
  	}
--- 242,254 ----
  
  void fl_SectionLayout::_purgeLayout()
  {
! 	fl_BlockLayout*	pBL = m_pLastBlock;
  
  	while (pBL)
  	{
  		fl_BlockLayout* pNuke = pBL;
  
! 		pBL = pBL->getPrev();
  
  		delete pNuke;
  	}
Index: abi/src/text/fmt/xp/fp_Run.cpp
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fp_Run.cpp,v
retrieving revision 1.88
diff -c -r1.88 fp_Run.cpp
*** abi/src/text/fmt/xp/fp_Run.cpp	2000/01/07 09:51:40	1.88
--- abi/src/text/fmt/xp/fp_Run.cpp	2000/02/11 00:35:24
***************
*** 749,754 ****
--- 749,763 ----
  		UT_UCS_strcpy_char(sz_ucs_FieldValue, szFieldValue);
  		break;
  	}
+ 	case FPFIELD_LIST_LABEL:
+ 	{
+ 		char szFieldValue[FPFIELD_MAX_LENGTH + 1];
+ 		
+ 		sprintf(szFieldValue, "%s", m_pBL->getListLabel());
+ 		
+ 		UT_UCS_strcpy_char(sz_ucs_FieldValue, szFieldValue);
+ 		break;
+ 	}
  	default:
  		UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
  		return UT_FALSE;
***************
*** 799,804 ****
--- 808,814 ----
  	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();	
***************
*** 828,833 ****
--- 838,847 ----
  	{
  		m_iFieldType = FPFIELD_PAGE_COUNT;
  	}
+ 	else if (0 == UT_stricmp(pszType, "list-label"))
+ 	{
+ 		m_iFieldType = FPFIELD_LIST_LABEL;
+ 	}
  	else
  	{
  		UT_ASSERT(UT_SHOULD_NOT_HAPPEN);
***************
*** 901,907 ****
  		*/
  		
  		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();
--- 915,920 ----
***************
*** 924,930 ****
  		}
  		else
  		{
! 			m_pG->fillRect(clrNormalBackground, pDA->xoff, iFillTop, m_iWidth, iFillHeight);
  		}
  	}
  
--- 937,943 ----
  		}
  		else
  		{
! 			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.47
diff -c -r1.47 fp_Run.h
*** abi/src/text/fmt/xp/fp_Run.h	2000/01/21 13:49:39	1.47
--- abi/src/text/fmt/xp/fp_Run.h	2000/02/11 00:35:26
***************
*** 278,283 ****
--- 278,284 ----
  #define FPFIELD_TIME		1
  #define FPFIELD_PAGE_NUMBER	2
  #define FPFIELD_PAGE_COUNT	3
+ #define FPFIELD_LIST_LABEL	4
  
  class fp_FieldRun : public fp_Run
  {
***************
*** 300,305 ****
--- 301,307 ----
  	GR_Font*				m_pFont;
  	GR_Font*				m_pFontLayout;
  	UT_RGBColor				m_colorFG;
+ 	UT_RGBColor				m_colorBG;
  	UT_UCSChar				m_sFieldValue[FPFIELD_MAX_LENGTH];
  	unsigned char			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.241
diff -c -r1.241 fv_View.cpp
*** abi/src/text/fmt/xp/fv_View.cpp	2000/02/01 10:34:39	1.241
--- abi/src/text/fmt/xp/fv_View.cpp	2000/02/11 00:35:41
***************
*** 967,972 ****
--- 967,973 ----
  	// 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,1475 ****
--- 1471,1524 ----
  		_fixInsertionPointCoords();
  		_drawInsertionPoint();
  	}
+ 
+ 	return bRet;
+ }
+ 
+ UT_Bool FV_View::cmdStartList(const XML_Char * style)
+ {
+ 	XML_Char buf[5];
+ 	UT_Bool bRet;
+ 	
+ 	fl_BlockLayout * pBlock = _findBlockAtPosition(getPoint());
+ 	UT_uint32 currLevel = pBlock->getLevel();
+ 	currLevel++;
+ 	sprintf(buf, "%i", currLevel);
+ 
+ 	const XML_Char * attribs[] = { 	"level", buf, 
+ 					"style", style, 0 };
+ 
+ 	/* I have to do this to get around setStyle wiping out props */
+ 	
+ 	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 buf[5];
+ 	UT_Bool bRet;
+ 	
+ 	fl_BlockLayout * pBlock = _findBlockAtPosition(getPoint());
+ 	UT_uint32 currLevel = pBlock->getLevel();
+ 	UT_ASSERT(currLevel > 0);
+ 	currLevel--;
+ 	sprintf(buf, "%i", currLevel);
+ 	const XML_Char * attribs[] = { "level", buf, 0 };
+ 
+ 	if (currLevel == 0)
+ 		setStyle("Normal");
+ 	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.107
diff -c -r1.107 fv_View.h
*** abi/src/text/fmt/xp/fv_View.h	2000/02/01 10:34:39	1.107
--- abi/src/text/fmt/xp/fv_View.h	2000/02/11 00:35:42
***************
*** 147,152 ****
--- 147,155 ----
  	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 -c -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/11 00:35:43
***************
*** 40,45 ****
--- 40,46 ----
  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,60 ****
--- 56,65 ----
  	{ "margin-right",			"0in",				0},
  	{ "text-indent",			"0in",				0},
  	{ "text-align",				"left",				1},
+ 
+ 	{ "level",				"0",				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 -c -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/11 00:35:44
***************
*** 49,54 ****
--- 49,56 ----
  	_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 -c -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/11 00:35:45
***************
*** 75,80 ****
--- 75,81 ----
  
  #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_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.177
diff -c -r1.177 ap_EditMethods.cpp
*** abi/src/wp/ap/xp/ap_EditMethods.cpp	2000/02/08 01:35:23	1.177
--- abi/src/wp/ap/xp/ap_EditMethods.cpp	2000/02/11 00:36:01
***************
*** 349,354 ****
--- 349,357 ----
  	static EV_EditMethod_Fn viCmd_yw;
  	static EV_EditMethod_Fn viCmd_yy;
  
+ 	static EV_EditMethod_Fn startList;
+ 	static EV_EditMethod_Fn stopList;
+ 
  	static EV_EditMethod_Fn noop;
  
  	// Test routines
***************
*** 625,630 ****
--- 628,635 ----
  	EV_EditMethod(NF(viCmd_yb),		0,	""),
  	EV_EditMethod(NF(viCmd_yw),		0,	""),
  	EV_EditMethod(NF(viCmd_yy),		0,	""),
+ 	EV_EditMethod(NF(startList),		0,	""),
+ 	EV_EditMethod(NF(stopList),		0,	""),
  
  	EV_EditMethod(NF(noop),					0,	""),
  
***************
*** 4474,4477 ****
--- 4479,4494 ----
  {
  	//copy current line
  	return ( EX(warpInsPtBOL) && EX(extSelEOL) && EX(copy) );
+ }
+ 
+ Defun1(startList)
+ {
+ 	ABIWORD_VIEW;
+ 	return pView->cmdStartList("Numbered List");
+ }
+ 
+ Defun1(stopList)
+ {
+ 	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.25
diff -c -r1.25 ap_Menu_ActionSet.cpp
*** abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp	2000/01/10 19:32:37	1.25
--- abi/src/wp/ap/xp/ap_Menu_ActionSet.cpp	2000/02/11 00:36:03
***************
*** 170,175 ****
--- 170,178 ----
  
  	// ... add others here ...
  	
+ 	_s(AP_MENU_ID_FMT_STARTLIST,	0,0,0,	"startList",	NULL,	NULL);
+ 	_s(AP_MENU_ID_FMT_STOPLIST,	0,0,0,	"stopList",	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.16
diff -c -r1.16 ap_Menu_Id.h
*** abi/src/wp/ap/xp/ap_Menu_Id.h	2000/01/10 19:32:37	1.16
--- abi/src/wp/ap/xp/ap_Menu_Id.h	2000/02/11 00:36:03
***************
*** 140,145 ****
--- 140,148 ----
  
  	/* ... 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_EnUS.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_Menu_LabelSet_EnUS.h,v
retrieving revision 1.22
diff -c -r1.22 ap_Menu_LabelSet_EnUS.h
*** abi/src/wp/ap/xp/ap_Menu_LabelSet_EnUS.h	2000/01/27 14:45:06	1.22
--- abi/src/wp/ap/xp/ap_Menu_LabelSet_EnUS.h	2000/02/11 00:36:05
***************
*** 141,146 ****
--- 141,149 ----
  
  	// ... 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.16
diff -c -r1.16 ap_Menu_Layouts_MainMenu.h
*** abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h	2000/01/10 19:32:37	1.16
--- abi/src/wp/ap/xp/ap_Menu_Layouts_MainMenu.h	2000/02/11 00:36:06
***************
*** 115,120 ****
--- 115,123 ----
  			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_WINDOW)
