Alternate Footnote

From: Teus Benschop <teus_at_teusbenschop.nl>
Date: Tue Mar 27 2007 - 19:54:02 CEST

Hi,

This is my first submission of a patch in an attempt to make a start
with introducing the alternate footnote in Abiword. This alternate
footnote was first discussed in emails with subject "Footnote type", and
this alternate footnote was then called a crossreference. But I thought
that "crossreference" would be a bit misleading, because it really is no
cross reference, but just a footnote. Hence the new name
"AlternateFootnote". This envisaged alternate footnote only would differ
in the footnote caller and the style it would use, still to be programmed.

I am submitting this patch in the hope that this way of making a patch,
through "cvs diff", is appropriate, and ask the developers to commit it
if the patch is acceptable.

It really does nothing important yet, but prepares the way for
integrating the alternate footnote.

Pls. let me know if this patch is right, and how things might get improved.

Thanks!

Teus.

RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.cpp,v
retrieving revision 1.1173
diff -r1.1173 fv_View.cpp
11885c11885
< bool FV_View::insertFootnote(bool bFootnote)

---
> bool FV_View::insertFootnote(AP_FootnoteType bFootnote)
11935c11935
< 	UT_uint32 pid = m_pDoc->getUID(bFootnote ? UT_UniqueId::Footnote : UT_UniqueId::Endnote);
---
> 	UT_uint32 pid = m_pDoc->getUID(bFootnote == AP_Footnote ? UT_UniqueId::Footnote : UT_UniqueId::Endnote);
11942c11942
< 	if(!bFootnote)
---
> 	if(bFootnote == AP_Endnote)
11969c11969
< 	if (!insertFootnoteSection(bFootnote,footpid.c_str()))
---
> 	if (!insertFootnoteSection(bFootnote == AP_Footnote,footpid.c_str()))
11980c11980
< 	if(bFootnote)
---
> 	if(bFootnote == AP_Footnote)
12029c12029
< 	if(bFootnote)
---
> 	if(bFootnote == AP_Footnote)
12058c12058
< 	if(bFootnote)
---
> 	if(bFootnote == AP_Footnote)
13262d13261
< 
Index: src/text/fmt/xp/fv_View.h
===================================================================
RCS file: /cvsroot/abi/src/text/fmt/xp/fv_View.h,v
retrieving revision 1.403
diff -r1.403 fv_View.h
527c527
< 	bool	            insertFootnote(bool bFootnote);
---
> 	bool	            insertFootnote(AP_FootnoteType bFootnote);
Index: src/wp/ap/xp/ap_EditMethods.cpp
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_EditMethods.cpp,v
retrieving revision 1.878
diff -r1.878 ap_EditMethods.cpp
474c474
< 	static EV_EditMethod_Fn insFootnote;
---
> 	static EV_EditMethod_Fn insFootnote; // Teus
475a476
> 	static EV_EditMethod_Fn insAlternateFootnote; // Teus
923a925
> 	EV_EditMethod(NF(insAlternateFootnote),			0,		""), // Teus
929c931
< 	EV_EditMethod(NF(insFootnote),			0,		""),
---
> 	EV_EditMethod(NF(insFootnote),			0,		""), // Teus
10435c10437,10447
< Defun1(insFootnote)
---
> 
> Defun1(insFootnote) // Teus.
> {
> 	CHECK_FRAME;
> 	ABIWORD_VIEW;
> 	UT_return_val_if_fail(pView, false);
> 	return pView->insertFootnote(AP_Footnote);
> }
> 
> 
> Defun1(insAlternateFootnote) // Teus.
10440c10452,10453
< 	return pView->insertFootnote(true);
---
> 	return false; // Teus Todo
> 	return pView->insertFootnote(AP_Footnote);
10459c10472
< 	return pView->insertFootnote(false);
---
> 	return pView->insertFootnote(AP_Endnote);
Index: src/wp/ap/xp/ap_types.h
===================================================================
RCS file: /cvsroot/abi/src/wp/ap/xp/ap_types.h,v
retrieving revision 1.3
diff -r1.3 ap_types.h
42a43,50
> typedef enum
> {
> 	AP_Footnote,
> 	AP_Endnote,
> 	AP_AlternateFootnote
> } AP_FootnoteType; // Teus
> 
> 
Received on Tue Mar 27 19:56:45 2007

This archive was generated by hypermail 2.1.8 : Tue Mar 27 2007 - 19:56:47 CEST