ooo-build r13793 - in branches/ooo-build-3-0: . patches/dev300



Author: freuter
Date: Thu Sep  4 12:41:36 2008
New Revision: 13793
URL: http://svn.gnome.org/viewvc/ooo-build?rev=13793&view=rev

Log:
Enabled field patches and added support for DropDown Lists (n#404242)

Modified:
   branches/ooo-build-3-0/ChangeLog
   branches/ooo-build-3-0/patches/dev300/apply
   branches/ooo-build-3-0/patches/dev300/offapi-field-patch.diff
   branches/ooo-build-3-0/patches/dev300/svtools-field-patch.diff
   branches/ooo-build-3-0/patches/dev300/sw-field-patch.diff
   branches/ooo-build-3-0/patches/dev300/xmloff-field-patch.diff

Modified: branches/ooo-build-3-0/patches/dev300/apply
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/apply	(original)
+++ branches/ooo-build-3-0/patches/dev300/apply	Thu Sep  4 12:41:36 2008
@@ -2379,10 +2379,10 @@
 [ TemporaryHacks ]
 
 # First work on field enhancements...
-#FIXME dev300: offapi-field-patch.diff, flr, n#248354
-#FIXME dev300: svtools-field-patch.diff, flr, n#248354
-#FIXME dev300: sw-field-patch.diff, flr, n#248354
-#FIXME dev300: xmloff-field-patch.diff, flr, n#248354
+offapi-field-patch.diff, flr, n#248354
+svtools-field-patch.diff, flr, n#248354
+sw-field-patch.diff, flr, n#248354
+xmloff-field-patch.diff, flr, n#248354
 
 [ NovellOnly ]
 #only enable enhanced field work in Novell OOo by default

Modified: branches/ooo-build-3-0/patches/dev300/offapi-field-patch.diff
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/offapi-field-patch.diff	(original)
+++ branches/ooo-build-3-0/patches/dev300/offapi-field-patch.diff	Thu Sep  4 12:41:36 2008
@@ -26,16 +26,14 @@
 + 
 + #endif
 diff --git a/offapi/com/sun/star/text/makefile.mk b/offapi/com/sun/star/text/makefile.mk
-index 31d1337..6367eb9 100644
+index c9c2cd4..3f3b6c4 100644
 --- offapi/com/sun/star/text/makefile.mk
 +++ offapi/com/sun/star/text/makefile.mk
-@@ -266,7 +266,8 @@ IDLFILES=\
-     XTextContentAppend.idl \
+@@ -267,6 +267,7 @@ IDLFILES=\
      XTextConvert.idl \
      XTextAppendAndConvert.idl \
--    XTextAppend.idl 
-+    XTextAppend.idl \
-+    XFormField.idl
-     
- 
- # ------------------------------------------------------------------
+     XTextAppend.idl \
++    XFormField.idl \
+         XFlatParagraph.idl \
+         XFlatParagraphIterator.idl \
+         XFlatParagraphIteratorProvider.idl

Modified: branches/ooo-build-3-0/patches/dev300/svtools-field-patch.diff
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/svtools-field-patch.diff	(original)
+++ branches/ooo-build-3-0/patches/dev300/svtools-field-patch.diff	Thu Sep  4 12:41:36 2008
@@ -1,8 +1,8 @@
 diff --git a/svtools/inc/fltrcfg.hxx b/svtools/inc/fltrcfg.hxx
-index e13565b..1f91edf 100644
+index ddc00a9..40fd314 100644
 --- svtools/inc/fltrcfg.hxx
 +++ svtools/inc/fltrcfg.hxx
-@@ -84,6 +84,9 @@ public:
+@@ -76,6 +76,9 @@ public:
  	sal_Bool IsWriter2WinWord() const;
  	void SetWriter2WinWord( sal_Bool bFlag );
  
@@ -13,18 +13,19 @@
  	void SetExcel2Calc( sal_Bool bFlag );
  	sal_Bool IsCalc2Excel() const;
 diff --git a/svtools/source/config/fltrcfg.cxx b/svtools/source/config/fltrcfg.cxx
-index 12611b9..451f578 100644
+index f52ffa5..748757d 100644
 --- svtools/source/config/fltrcfg.cxx
 +++ svtools/source/config/fltrcfg.cxx
-@@ -72,6 +72,7 @@ using namespace com::sun::star::uno;
- #define FILTERCFG_CALC_SAVE				0x2000
- #define FILTERCFG_IMPRESS_LOAD			0x4000
- #define FILTERCFG_IMPRESS_SAVE			0x8000
-+#define FILTERCFG_USE_ENHANCED_FIELDS			0x10000
+@@ -63,6 +63,8 @@ using namespace com::sun::star::uno;
+ #define FILTERCFG_ENABLE_PPT_PREVIEW    0x20000
+ #define FILTERCFG_ENABLE_EXCEL_PREVIEW  0x40000
+ #define FILTERCFG_ENABLE_WORD_PREVIEW   0x80000
++#define FILTERCFG_USE_ENHANCED_FIELDS	0x100000
++
  
  static SvtFilterOptions* pOptions=0;
  
-@@ -171,7 +172,7 @@ struct SvtFilterOptions_Impl
+@@ -210,7 +212,7 @@ struct SvtFilterOptions_Impl
  					FILTERCFG_MATH_LOAD		| FILTERCFG_MATH_SAVE |
  					FILTERCFG_WRITER_LOAD	| FILTERCFG_WRITER_SAVE |
  					FILTERCFG_CALC_LOAD		| FILTERCFG_CALC_SAVE	|
@@ -33,34 +34,32 @@
  		   Load();
  		}
  
-@@ -247,7 +248,7 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
+@@ -288,7 +290,7 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
  	static Sequence<OUString> aNames;
  	if(!aNames.getLength())
  	{
--		int nCount = 8;
-+		int nCount = 9;
+-		int nCount = 11;
++		int nCount = 12;
  		aNames.realloc(nCount);
  		static const char* aPropNames[] =
  		{
-@@ -258,7 +259,8 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
- 			"Export/MathToMathType",            //  4
- 			"Export/WriterToWinWord",           //  5
- 			"Export/ImpressToPowerPoint",       //  6
--			"Export/CalcToExcel"            	//  7
-+			"Export/CalcToExcel",            	//  7
-+                        "Import/ImportWWFieldsAsEnhancedFields" // 8
+@@ -303,6 +305,7 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames()
+ 			"Export/EnablePowerPointPreview",	//	8
+ 			"Export/EnableExcelPreview",		//	9
+ 			"Export/EnableWordPreview"			// 10
++			"Import/ImportWWFieldsAsEnhancedFields" // 11
  		};
  		OUString* pNames = aNames.getArray();
  		for(int i = 0; i < nCount; i++)
-@@ -280,6 +282,7 @@ static ULONG lcl_GetFlag(sal_Int32 nProp)
- 		case  5: nFlag = FILTERCFG_WRITER_SAVE; break;
- 		case  6: nFlag = FILTERCFG_IMPRESS_SAVE; break;
- 		case  7: nFlag = FILTERCFG_CALC_SAVE; break;
-+		case  8: nFlag =  FILTERCFG_USE_ENHANCED_FIELDS; break;
+@@ -327,6 +330,7 @@ static ULONG lcl_GetFlag(sal_Int32 nProp)
+ 		case  8: nFlag = FILTERCFG_ENABLE_PPT_PREVIEW; break;
+ 		case  9: nFlag = FILTERCFG_ENABLE_EXCEL_PREVIEW; break;
+ 		case 10: nFlag = FILTERCFG_ENABLE_WORD_PREVIEW; break;
++   	        case 11: nFlag = FILTERCFG_USE_ENHANCED_FIELDS; break;
+ 
  		default: DBG_ERROR("illegal value");
  	}
- 	return nFlag;
-@@ -453,6 +456,16 @@ void SvtFilterOptions::SetWriter2WinWord( BOOL bFlag )
+@@ -512,6 +516,16 @@ void SvtFilterOptions::SetWriter2WinWord( BOOL bFlag )
  	SetModified();
  }
  

Modified: branches/ooo-build-3-0/patches/dev300/sw-field-patch.diff
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/sw-field-patch.diff	(original)
+++ branches/ooo-build-3-0/patches/dev300/sw-field-patch.diff	Thu Sep  4 12:41:36 2008
@@ -1,9 +1,9 @@
 diff --git a/sw/inc/IDocumentBookmarkAccess.hxx b/sw/inc/IDocumentBookmarkAccess.hxx
-index edcc15f..850dd49 100644
+index 90ed40d..6521bdd 100644
 --- sw/inc/IDocumentBookmarkAccess.hxx
 +++ sw/inc/IDocumentBookmarkAccess.hxx
-@@ -41,10 +41,12 @@
- #endif
+@@ -34,11 +34,13 @@
+ #include <sal/types.h>
  
  class SwBookmark;
 +class SwFieldBookmark;
@@ -11,67 +11,87 @@
  class SwPaM;
  class KeyCode;
  class String;
+ class SwTxtNode;
 +class SwPosition;
  
-  /** Provides access to the bookmarks of a document.
-  */
-@@ -57,7 +59,10 @@ class String;
-         MARK, 
-         DDE_BOOKMARK, 
+ /** Provides access to the bookmarks of a document.
+ */
+@@ -51,6 +53,9 @@ public:
+         MARK,
+         DDE_BOOKMARK,
          UNO_BOOKMARK,
--        HIDDEN_BOOKMARK
-+        HIDDEN_BOOKMARK,
-+//		FIELDMARK, // for future use...
-+		FORM_FIELDMARK_TEXT,
-+		FORM_FIELDMARK_NO_TEXT
-     };
-     
-  public:    
-@@ -147,7 +152,11 @@ class String;
-        the bookmark.
++	FIELD_MARK,
++	FORM_FIELDMARK_TEXT,
++	FORM_FIELDMARK_NO_TEXT,
+         // --> OD 2007-10-11 #i81002# - bookmark type for cross-references
+         CROSSREF_BOOKMARK
+         // <--
+@@ -167,6 +172,12 @@ public:
      */
      virtual SwBookmark& getBookmark(  /*[in]*/sal_uInt16 nPos, /*[in]*/bool bBkmrk) = 0;
--    
+ 
 +
 +    virtual SwBookmark* getFieldBookmarkFor(const SwPosition &pos) const = 0;    
 +    virtual SwFieldBookmark* getFormFieldBookmarkFor(const SwPosition &pos) const = 0;    
 +    virtual SwBookmark* getNextFieldBookmarkFor(const SwPosition &pos) const = 0;    
 +    virtual SwBookmark* getPrevFieldBookmarkFor(const SwPosition &pos) const = 0;    
- protected:
-     virtual ~IDocumentBookmarkAccess() {};
-  };
++
+     /** Get cross-reference bookmark name for certain text node
+ 
+         OD 2007-11-16 #i83479#
 diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
-index 59e7901..970d034 100644
+index 0466286..2478dbf 100644
 --- sw/inc/IDocumentSettingAccess.hxx
 +++ sw/inc/IDocumentSettingAccess.hxx
-@@ -91,6 +91,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
+@@ -80,6 +80,7 @@ namespace com { namespace sun { namespace star { namespace i18n { struct Forbidd
           UNIX_FORCE_ZERO_EXT_LEADING,
           USE_OLD_PRINTER_METRICS,
           TABS_RELATIVE_TO_INDENT,
-+         PROTECT_FORM,
-          // COMPATIBILITY FLAGS END
- 
-          BROWSE_MODE,
++	 PROTECT_FORM,
+          // --> OD 2008-06-05 #i89181#
+          TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST,
+          // <--
 diff --git a/sw/inc/bookmrk.hxx b/sw/inc/bookmrk.hxx
-index 97b619b..c908548 100644
+index ec2522d..a6d1871 100644
 --- sw/inc/bookmrk.hxx
 +++ sw/inc/bookmrk.hxx
-@@ -108,11 +108,12 @@ public:
+@@ -54,6 +54,7 @@ struct SwPosition;	// fwd Decl. wg. UI
+ 
+ class SwBookmark : public SwModify
+ {
++    friend class SwDoc;
+ 	SwPosition *pPos1, *pPos2;	// wird im CTOR gesetzt, im DTOR geloescht
+                                 // pPos1 is always != 0, pPos2 may be 0
+ 	SwServerObjectRef refObj;	// falls DataServer -> Pointer gesetzt
+@@ -81,6 +82,9 @@ public:
+ 	// Beim Loeschen von Text werden Bookmarks mitgeloescht!
+ 	virtual ~SwBookmark();
+ 
++	const SwPosition& GetPos() const { return *pPos1; }
++	const SwPosition* GetOtherPos() const { return pPos2; }
++
+     // --> OD 2007-10-10 #i81002#
+     // made virtual and thus no longer inline
+     virtual const SwPosition& GetBookmarkPos() const;
+@@ -100,7 +104,7 @@ public:
  	// falls man wirklich auf gleiche Position abfragen will.
  	BOOL IsEqualPos( const SwBookmark &rBM ) const;
  
--	BOOL IsBookMark() const 	{ return IDocumentBookmarkAccess::BOOKMARK == eMarkType; }
-+	BOOL IsBookMark() const 	{ return IDocumentBookmarkAccess::BOOKMARK == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; }
+-    BOOL IsBookMark() const    { return IDocumentBookmarkAccess::BOOKMARK == eMarkType; }
++    BOOL IsBookMark() const 	{ return IDocumentBookmarkAccess::BOOKMARK == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; }
+ //    // --> OD 2007-10-17 #TESTING#
+ //    BOOL IsBookMark() const
+ //    {
+@@ -110,6 +114,7 @@ public:
+ //    // <--
  	BOOL IsMark() const 		{ return IDocumentBookmarkAccess::MARK == eMarkType; }
-     BOOL IsDDEMark() const      { return IDocumentBookmarkAccess::DDE_BOOKMARK == eMarkType; }
- 	BOOL IsUNOMark() const 		{ return IDocumentBookmarkAccess::UNO_BOOKMARK == eMarkType; }
-     BOOL IsHiddenBookMark() const { return IDocumentBookmarkAccess::HIDDEN_BOOKMARK == eMarkType; }
-+	BOOL IsFormFieldMark() const 	{ return IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; }
- 	void SetType( IDocumentBookmarkAccess::BookmarkType eNewType ) 	{ eMarkType = eNewType; }
- 	IDocumentBookmarkAccess::BookmarkType GetType() const 	{ return eMarkType; }
- 
-@@ -160,5 +161,57 @@ public:
- 		const String& rName, const String& rShortName);
+     BOOL IsUNOMark() const      { return IDocumentBookmarkAccess::UNO_BOOKMARK == eMarkType; }
++    BOOL IsFormFieldMark() const 	{ return IDocumentBookmarkAccess::FORM_FIELDMARK_TEXT == eMarkType || IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT == eMarkType; }
+     // --> OD 2007-10-11 #i81002# - bookmark type for cross-references
+     BOOL IsCrossRefMark() const { return IDocumentBookmarkAccess::CROSSREF_BOOKMARK == eMarkType; }
+     // <--
+@@ -160,5 +165,71 @@ public:
+     // <--
  };
  
 +class SwFieldBookmark : public SwBookmark
@@ -88,6 +108,7 @@
 +
 +	String ffname;
 +	String ffhelptext;
++        std::vector<String> *ffListEntries;
 +
 +public:
 +    SwFieldBookmark(const SwPosition& aPos,
@@ -95,14 +116,16 @@
 +	       const String& rName, const String& rShortName,
 +		   IDocumentBookmarkAccess::BookmarkType eMark);
 +
++    virtual ~SwFieldBookmark();
++
 +	void SetType(int fftype);
 +	int GetType();
 +
 +	void SetChecked(bool checked);
 +	bool IsChecked();
 +
-+	void SetFFName(String ffname) {
-+		this->ffname=ffname;
++	void SetFFName(String name) {
++		this->ffname=name;
 +	}
 +
 +	String GetFFName()
@@ -114,27 +137,38 @@
 +		return ffres;
 +	}
 +
-+	void SetFFRes(int ffres) {
-+		this->ffres=ffres;
++	void SetFFRes(int res) {
++		this->ffres=res;
 +	}
 +
-+	void SetFFHelpText(String ffhelptext) {
-+		this->ffhelptext=ffhelptext;
++	void SetFFHelpText(String helptext) {
++		this->ffhelptext=helptext;
 +	}
 +
 +	String GetFFHelpText() {
 +		return ffhelptext;
 +	}
++
++        void invalidate();
++
++
++        void addListItem(String item);
++        int getListItems();
++        String getListItem(int pos);
++        void setCurrentListItem(int pos);
++        int getCurrentListItem();
++        String getCurrentListItemText();
++
 +};
  
  #endif
 diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
-index 7832da2..0d4a97d 100644
+index bd77643..5830026 100644
 --- sw/inc/crsrsh.hxx
 +++ sw/inc/crsrsh.hxx
-@@ -83,12 +83,14 @@
+@@ -46,12 +46,14 @@
+ #include <tblsel.hxx>
  #include <IDocumentBookmarkAccess.hxx>
- #endif
  
 +
  // einige Forward Deklarationen
@@ -147,7 +181,7 @@
  class SwCntntFrm;
  class SwCrsrShell;
  class SwCursor;
-@@ -144,7 +146,8 @@ struct SwContentAtPos
+@@ -110,7 +112,8 @@ struct SwContentAtPos
          SW_REFMARK          = 0x0100,
          SW_NUMLABEL         = 0x0200, // #i23726#
          SW_CONTENT_CHECK    = 0x0400, // --> FME 2005-05-13 #i43742# <--
@@ -157,7 +191,7 @@
  #ifndef PRODUCT
  		,SW_CURR_ATTRS 		= 0x4000		// nur zum Debuggen
  		,SW_TABLEBOXVALUE	= 0x8000		// nur zum Debuggen
-@@ -156,6 +159,7 @@ struct SwContentAtPos
+@@ -122,6 +125,7 @@ struct SwContentAtPos
  		const SfxPoolItem* pAttr;
  		const SwRedline* pRedl;
          SwCntntNode * pNode; // #i23726#
@@ -165,7 +199,7 @@
  	} aFnd;
  
      int nDist; // #i23726#
-@@ -630,6 +634,13 @@ public:
+@@ -587,6 +591,13 @@ public:
  		// werden, es wird dann bei gleichen Namen nur durchnumeriert.
  	void MakeUniqueBookmarkName( String& rNm );
  
@@ -180,18 +214,18 @@
  	// Das sollte nur aufgerufen werden, wenn der Cursor z.B. beim
  	// Loeschen von Rahmen irgendwohin gesetzt wurde. Die Position
 diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
-index d8f3bc0..1c9b6d4 100644
+index bb76766..49e35c8 100644
 --- sw/inc/doc.hxx
 +++ sw/inc/doc.hxx
-@@ -619,6 +619,7 @@ class SwDoc :
+@@ -600,6 +600,7 @@ private:
+     bool mbClipAsCharacterAnchoredWriterFlyFrames   : 1;   // OD 2006-04-13 #b6402800#
      bool mbUnixForceZeroExtLeading                  : 1;   // FME 2006-10-09 #i60945#
      bool mbOldPrinterMetrics                        : 1;   // FME 2007-05-14 #147385#
-     bool mbTabRelativeToIndent;                            // #i24363# tab stops relative to indent
 +    bool mbProtectForm                              : 1;
+     bool mbTabRelativeToIndent;                            // #i24363# tab stops relative to indent
+     bool mbTabAtLeftIndentForParagraphsInList;             // OD 2008-06-05 #i89181# - see above
  
- 	// #i78591#
- 	sal_uInt32  n32DummyCompatabilityOptions1;
-@@ -790,6 +791,10 @@ public:
+@@ -772,6 +773,11 @@ public:
      virtual void makeUniqueBookmarkName( /*[in/out]*/String& rName );
      virtual sal_uInt16 getBookmarkCount( /*[in]*/ bool bBkmrk ) const;
      virtual SwBookmark& getBookmark( /*[in]*/sal_uInt16 nPos, /*[in]*/bool bBkmrk );
@@ -199,10 +233,11 @@
 +    SwBookmark* getNextFieldBookmarkFor(const SwPosition &pos) const;
 +    SwBookmark* getPrevFieldBookmarkFor(const SwPosition &pos) const;
 +    SwFieldBookmark* getFormFieldBookmarkFor(const SwPosition &pos) const;
- 
-     /** IDocumentRedlineAccess
-     */
-@@ -973,6 +978,7 @@ public:
++
+     virtual String getCrossRefBookmarkName(
+             /*[in]*/const SwTxtNode& rTxtNode,
+             /*[in]*/const CrossReferenceBookmarkSubType nCrossRefType ) const;
+@@ -958,6 +964,7 @@ public:
  	/** IDocumentState
  	*/
  	virtual void SetModified();
@@ -211,10 +246,10 @@
  	virtual bool IsModified() const;
  	virtual bool IsLoaded() const;
 diff --git a/sw/inc/hintids.hxx b/sw/inc/hintids.hxx
-index aaaf228..3323363 100644
+index 3d1406e..2662495 100644
 --- sw/inc/hintids.hxx
 +++ sw/inc/hintids.hxx
-@@ -52,7 +52,16 @@
+@@ -40,7 +40,16 @@
  #define CH_TXTATR_INWORD		((sal_Unicode)0x02)
  #define CH_TXTATR_TAB           ((sal_Unicode)'\t')
  #define CH_TXTATR_NEWLINE       ((sal_Unicode)'\n')
@@ -232,11 +267,24 @@
  /*
   * Hier kommen erst mal die enums fuer die Hints
   */
+diff --git a/sw/inc/pam.hxx b/sw/inc/pam.hxx
+index b9a9c43..5348fd7 100644
+--- sw/inc/pam.hxx
++++ sw/inc/pam.hxx
+@@ -254,6 +254,8 @@ public:
+ 	DECL_FIXEDMEMPOOL_NEWDEL(SwPaM);
+ 
+     String GetTxt() const;
++
++    void Invalidate();
+ };
+ 
+ 
 diff --git a/sw/inc/unocoll.hxx b/sw/inc/unocoll.hxx
-index f28f44f..a3394fd 100644
+index b2b3556..b7ace31 100644
 --- sw/inc/unocoll.hxx
 +++ sw/inc/unocoll.hxx
-@@ -220,8 +220,10 @@ class SwUnoCollection
+@@ -192,8 +192,10 @@ class SwUnoCollection
  #define SW_SERVICE_IMAP_POLYGON                         104
  #define SW_SERVICE_TYPE_TEXT_GRAPHIC                    105
  #define SW_SERVICE_CHART2_DATA_PROVIDER                 106
@@ -248,7 +296,7 @@
  
  #define SW_SERVICE_INVALID			USHRT_MAX
  
-@@ -501,7 +503,6 @@ public:
+@@ -469,7 +471,6 @@ public:
  	static SwXBookmark* 	GetObject( SwBookmark& rBkm, SwDoc* pDoc );
  };
  
@@ -257,41 +305,29 @@
  <
      ::com::sun::star::container::XIndexAccess
 diff --git a/sw/inc/unoobj.hxx b/sw/inc/unoobj.hxx
-index 0c71066..c7de042 100644
+index 98e3abe..5794183 100644
 --- sw/inc/unoobj.hxx
 +++ sw/inc/unoobj.hxx
-@@ -151,6 +151,9 @@
- #ifndef _CPPUHELPER_FACTORY_HXX_
+@@ -72,6 +72,7 @@
+ #include <com/sun/star/text/XRedline.hpp>
+ #include <cppuhelper/weak.hxx>
  #include <cppuhelper/factory.hxx>	// helper for factories
- #endif
-+#ifndef _CPPUHELPER_IMPLBASE1_HXX_
 +#include <cppuhelper/implbase1.hxx>	// helper for implementations
-+#endif
- #ifndef _CPPUHELPER_IMPLBASE3_HXX_
  #include <cppuhelper/implbase3.hxx>	// helper for implementations
- #endif
-@@ -184,6 +187,9 @@
- #ifndef _CPPUHELPER_WEAKREF_HXX_
- #include <cppuhelper/weakref.hxx>
- #endif
-+#ifndef _COM_SUN_STAR_TEXT_XFORMFIELD_HPP_ 
-+#include <com/sun/star/text/XFormField.hpp> 
-+#endif 
- 
+ #include <cppuhelper/implbase4.hxx>	// helper for implementations
+ #include <cppuhelper/implbase5.hxx>	// helper for implementations
+@@ -88,6 +89,10 @@
  #include <unomid.h>
- 
-@@ -191,6 +197,10 @@
  #include <tools/link.hxx>
- #endif
  
-+#ifndef IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED 
 +#include <IDocumentBookmarkAccess.hxx> 
-+#endif 
++#include <com/sun/star/text/XFormField.hpp> 
++
 +
  class SwUnoCrsr;
  class SwCursor;
  class SwBookmark;
-@@ -678,6 +688,7 @@ SwRefBookmarkBaseClass;
+@@ -579,6 +584,7 @@ SwRefBookmarkBaseClass;
  class SwXBookmark : public SwRefBookmarkBaseClass,
  	public SwClient
  {
@@ -299,50 +335,53 @@
  	SwEventListenerContainer	aLstnrCntnr;
  	SwDoc*						pDoc;
  	String 						m_aName;
-@@ -721,7 +732,8 @@ public:
+@@ -622,7 +628,8 @@ public:
      virtual void SAL_CALL addVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
      virtual void SAL_CALL removeVetoableChangeListener( const ::rtl::OUString& PropertyName, const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XVetoableChangeListener >& aListener ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
  
 -	void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
-+	void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentBookmarkAccess::BookmarkType eMark)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
-+	virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
++         void attachToRangeEx(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange, IDocumentBookmarkAccess::BookmarkType eMark)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
++         virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
  
  	//SwClient
  	virtual void 	Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-@@ -730,6 +742,28 @@ public:
- 	SwDoc*			GetDoc(){return pDoc;}
+@@ -1458,6 +1465,30 @@ public:
+ 	SwDoc*				GetDoc() const{return pDoc;}
+ 	void				Invalidate();
  };
+-#endif
  
 +typedef cppu::ImplInheritanceHelper1< SwXBookmark, ::com::sun::star::text::XFormField > SwXFieldmark_BASE;
-+
++ 
 +class SwXFieldmark : public SwXFieldmark_BASE 
 +{
 +private:
-+	bool isReplacementObject;
++    bool isReplacementObject;
 +public:
-+	SwXFieldmark(bool isReplacementObject, SwBookmark* pBkm = 0, SwDoc* pDoc = 0);
-+
-+	virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
-+	virtual ::rtl::OUString SAL_CALL getDescription(void)  throw( ::com::sun::star::uno::RuntimeException );
++    SwXFieldmark(bool isReplacementObject, SwBookmark* pBkm = 0, SwDoc* pDoc = 0);
++    
++    virtual void attachToRange(const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > & xTextRange)throw( ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException );
++    virtual ::rtl::OUString SAL_CALL getDescription(void)  throw( ::com::sun::star::uno::RuntimeException );
 +    virtual ::sal_Int16 SAL_CALL getType(  ) throw (::com::sun::star::uno::RuntimeException);
 +    virtual ::sal_Int16 SAL_CALL getRes(  ) throw (::com::sun::star::uno::RuntimeException);
-+
++    
 +    virtual void SAL_CALL setType( ::sal_Int16 fieldType ) throw (::com::sun::star::uno::RuntimeException);
 +    virtual void SAL_CALL setRes( ::sal_Int16 res ) throw (::com::sun::star::uno::RuntimeException);
 +    virtual void SAL_CALL setDescription( const ::rtl::OUString& description ) throw (::com::sun::star::uno::RuntimeException);
++    
++    //    virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException);
++    
++};
 +
-+//    virtual ::com::sun::star::uno::Any SAL_CALL queryInterface( ::com::sun::star::uno::Type const & rType ) throw (::com::sun::star::uno::RuntimeException);
 +
-+};
 +
- /*-----------------23.02.98 10:45-------------------
++#endif
  
- --------------------------------------------------*/
 diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
-index 152ca09..6b755ad 100644
+index ac52d30..102a9c1 100644
 --- sw/inc/unoport.hxx
 +++ sw/inc/unoport.hxx
-@@ -107,7 +107,10 @@ enum SwTextPortionType
+@@ -72,7 +72,10 @@ enum SwTextPortionType
  	PORTION_REDLINE_END,
  	PORTION_RUBY_START,
  	PORTION_RUBY_END,
@@ -355,10 +394,10 @@
  
  class SwXRubyPortion;
 diff --git a/sw/source/core/crsr/crbm.cxx b/sw/source/core/crsr/crbm.cxx
-index 6e0c5f3..0848736 100644
+index a430392..4f870e0 100644
 --- sw/source/core/crsr/crbm.cxx
 +++ sw/source/core/crsr/crbm.cxx
-@@ -47,6 +47,7 @@
+@@ -40,6 +40,7 @@
  #include "callnk.hxx"
  #include "swcrsr.hxx"
  #include <IDocumentBookmarkAccess.hxx>
@@ -366,7 +405,7 @@
  
  /*
   * Methoden der SwCrsrShell fuer Bookmark
-@@ -156,6 +157,65 @@ BOOL SwCrsrShell::GoNextBookmark()
+@@ -165,6 +166,65 @@ BOOL SwCrsrShell::GoNextBookmark()
  	return TRUE;
  }
  
@@ -433,18 +472,18 @@
  BOOL SwCrsrShell::GoPrevBookmark()
  {
 diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
-index 26874d2..39d7d8c 100644
+index 544c5f5..376329e 100644
 --- sw/source/core/crsr/crstrvl.cxx
 +++ sw/source/core/crsr/crstrvl.cxx
-@@ -165,6 +165,7 @@
+@@ -78,6 +78,7 @@
  #include <wrong.hxx>
  
  #include <vcl/window.hxx>
 +#include <bookmrk.hxx>
+ #include <docufld.hxx> // OD 2008-06-19 #i90516#
  
  using namespace ::com::sun::star;
- 
-@@ -1256,6 +1257,16 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
+@@ -1170,6 +1171,16 @@ BOOL SwCrsrShell::GetContentAtPos( const Point& rPt,
  					}
  				}
  
@@ -462,21 +501,22 @@
  				{
  					if( aTmpState.bFtnNoInfo )
 diff --git a/sw/source/core/crsr/pam.cxx b/sw/source/core/crsr/pam.cxx
-index bd820b4..0a83a1c 100644
+index 2f38a8a..4decb4f 100644
 --- sw/source/core/crsr/pam.cxx
 +++ sw/source/core/crsr/pam.cxx
-@@ -101,6 +101,10 @@
+@@ -55,6 +55,11 @@
+ // <--
  #include <ndtxt.hxx> // #111827#
- #endif
  
 +#ifndef _BOOKMRK_HXX
 +#include <bookmrk.hxx>
 +#endif
++#include <hints.hxx>
 +
  // fuer den dummen ?MSC-? Compiler
  inline xub_StrLen GetSttOrEnd( BOOL bCondition, const SwCntntNode& rNd )
  {
-@@ -811,6 +815,29 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
+@@ -765,6 +770,29 @@ BOOL SwPaM::HasReadonlySel( bool bFormView ) const
  			}
  		}
  	}
@@ -506,19 +546,35 @@
  	return bRet;
  }
  
+@@ -1136,3 +1164,15 @@ String SwPaM::GetTxt() const
+ 
+     return aResult;
+ }
++
++void SwPaM::Invalidate()
++{
++    const SwNode *_pNd=this->GetNode();
++    const SwTxtNode *_pTxtNd=(_pNd!=NULL?_pNd->GetTxtNode():NULL);
++    if (_pTxtNd!=NULL) {
++	//pretent we've added a char to force layout to recalc the portion...
++	SwInsChr aHint(_pTxtNd->GetIndex());
++	SwModify *_pModify=(SwModify*)_pTxtNd;
++	_pModify->Modify( 0, &aHint);
++    }
++}
 diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
-index f45f651..b78b4be 100644
+index 2ad2cea..cbb208a 100644
 --- sw/source/core/doc/doc.cxx
 +++ sw/source/core/doc/doc.cxx
-@@ -300,6 +300,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
+@@ -180,6 +180,7 @@ bool SwDoc::get(/*[in]*/ DocumentSettingId id) const
          case UNIX_FORCE_ZERO_EXT_LEADING: return mbUnixForceZeroExtLeading;
          case USE_OLD_PRINTER_METRICS: return mbOldPrinterMetrics;
          case TABS_RELATIVE_TO_INDENT : return mbTabRelativeToIndent;
-+        case PROTECT_FORM: return mbProtectForm;
-          // COMPATIBILITY FLAGS END
- 
-         case BROWSE_MODE: return mbBrowseMode;
-@@ -408,6 +409,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
++	case PROTECT_FORM: return mbProtectForm;  
+         // --> OD 2008-06-05 #i89181#
+         case TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST: return mbTabAtLeftIndentForParagraphsInList;
+         // <--
+@@ -291,6 +292,9 @@ void SwDoc::set(/*[in]*/ DocumentSettingId id, /*[in]*/ bool value)
          case UNIX_FORCE_ZERO_EXT_LEADING:
              mbUnixForceZeroExtLeading = value;
              break;
@@ -526,155 +582,178 @@
 +	    mbProtectForm = value;
 +	    break;
  
-         case USE_OLD_PRINTER_METRICS:            
+         case USE_OLD_PRINTER_METRICS:
              mbOldPrinterMetrics = value;
---- sw/source/core/doc/docbm.cxx.old	2008-05-16 17:02:47.000000000 +0200
-+++ sw/source/core/doc/docbm.cxx	2008-05-16 17:06:13.000000000 +0200
-@@ -100,7 +100,13 @@
- #ifndef _NDTXT_HXX
- #include "ndtxt.hxx" // for lcl_FixPosition
- #endif
-+#ifndef _SWUNDO_HXX
+diff --git a/sw/source/core/doc/docbm.cxx b/sw/source/core/doc/docbm.cxx
+index c20eaba..e53c617 100644
+--- sw/source/core/doc/docbm.cxx
++++ sw/source/core/doc/docbm.cxx
+@@ -61,6 +61,10 @@
+ // --> OD 2007-10-23 #i81002#
+ #include <ndtxt.hxx>
+ // <--
 +#include "swundo.hxx"
-+#endif
-+
 +#include "hintids.hxx"
- 
++
 +static bool _checkFieldBookmarkSanity(const SwDoc *pDoc);
  
  SV_IMPL_OP_PTRARR_SORT(SwBookmarks, SwBookmarkPtr)
  
-@@ -156,7 +162,23 @@ SwBookmark* SwDoc::makeBookmark( /*[in]*
+@@ -87,6 +91,24 @@ SV_IMPL_OP_PTRARR_SORT(SwBookmarks, SwBookmarkPtr)
+ 	}
+ 
+ 
++static void lcl_docbm_FixPosition( SwPosition& rPos )
++{
++    // make sure the position has 1) the proper node, and 2) a proper index
++    SwTxtNode* pTxtNode = rPos.nNode.GetNode().GetTxtNode();
++
++    if( rPos.nContent.GetIndex() > ( pTxtNode == NULL ? 0 : pTxtNode->Len() ) )
++    {
++        DBG_ERROR( "illegal position" );
++        xub_StrLen nLen = rPos.nContent.GetIndex();
++        if( pTxtNode == NULL )
++            nLen = 0;
++        else if( nLen >= pTxtNode->Len() )
++            nLen = pTxtNode->Len();
++        rPos.nContent.Assign( pTxtNode, nLen );
++    }
++}
++
++
+ /** IDocumentBookmarkAccess ssc
+ */
+ const SwBookmarks& SwDoc::getBookmarks() const
+@@ -99,7 +121,23 @@ SwBookmark* SwDoc::makeBookmark( /*[in]*/const SwPaM& rPaM, /*[in]*/const KeyCod
                                   /*[in]*/IDocumentBookmarkAccess::BookmarkType eMark )
  {
- 	SwBookmark *pBM;
+     SwBookmark *pBM( 0 );
 -	if( MARK == eMark )
-+	if (FORM_FIELDMARK_TEXT == eMark || FORM_FIELDMARK_NO_TEXT == eMark /* rName.CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0 */) {
-+	    pBM = new SwFieldBookmark(*rPaM.GetPoint(), rCode, rName, rShortName, eMark);
-+	    if( rPaM.HasMark() )
-+		pBM->pPos2 = new SwPosition( *rPaM.GetMark() );
-+	    else
-+		pBM->pPos2 = new SwPosition( *pBM->pPos1 );
-+
-+	    lcl_FixPosition( *pBM->pPos1 );
-+	    lcl_FixPosition( *pBM->pPos2 );
-+	    if (*pBM->pPos2<*pBM->pPos1) {
-+		SwPosition *_pos=pBM->pPos1;
-+		pBM->pPos1=pBM->pPos2;
-+		pBM->pPos2=_pos;
-+	    }
-+	    ASSERT(*PBM->pPos1<=*pBM->pPos2, "");
-+	}
-+	else if( MARK == eMark )
- 		pBM = new SwMark( *rPaM.GetPoint(), rCode, rName, rShortName );
- 	else if( BOOKMARK == eMark || HIDDEN_BOOKMARK == eMark)
- 	{
-@@ -171,10 +193,44 @@ SwBookmark* SwDoc::makeBookmark( /*[in]*
- 			pBM->pPos2 = new SwPosition( *rPaM.GetMark() );
- 	}
- 
--    // fix bookmark positions if they are invalid
--    lcl_FixPosition( *pBM->pPos1 );
--    if( pBM->pPos2 != NULL )
--        lcl_FixPosition( *pBM->pPos2 );
-+	if (FORM_FIELDMARK_TEXT == eMark || FORM_FIELDMARK_NO_TEXT == eMark /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0 */) {
-+	    StartUndo(UNDO_UI_REPLACE, NULL);
-+	    ASSERT(*PBM->pPos1<=*pBM->pPos2, "Bookmark positions not normalized!!!!");
-+	    const SwTxtNode* pStartTxtNode=this->GetNodes()[pBM->GetPos().nNode]->GetTxtNode();
-+	    const SwTxtNode* pEndTxtNode=this->GetNodes()[pBM->GetOtherPos()->nNode]->GetTxtNode();
-+	    xub_StrLen ch_start_pos=pBM->GetPos().nContent.GetIndex();
-+	    xub_StrLen ch_end_pos=pBM->GetOtherPos()->nContent.GetIndex();
-+	    if (ch_end_pos==0 || ch_end_pos<=ch_start_pos) {
-+		ch_end_pos=ch_start_pos;
-+	    } else {
-+		ch_end_pos--;
-+	    }
-+	    sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(ch_start_pos);
-+	    sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(ch_end_pos);
-+	    bool form=(IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT==eMark);  /*(pBM->GetName().CompareToAscii(FIELD_FORM_BOOKMARK_PREFIX, strlen(FIELD_FORM_BOOKMARK_PREFIX))==0);*/
-+	    if (form) {
-+		if (ch_start!=CH_TXT_ATR_FORMELEMENT) {
-+			const SwPaM rRg(*pBM->pPos1);
-+		    Insert(rRg, CH_TXT_ATR_FORMELEMENT);
-+		    pBM->pPos1->nContent--;
-+		}
-+	    } else {
-+		if (ch_start!=CH_TXT_ATR_FIELDSTART) {
-+			const SwPaM rRg(*pBM->pPos1);
-+		    Insert(rRg, CH_TXT_ATR_FIELDSTART);
-+		    pBM->pPos1->nContent--;
-+		}
-+		if (ch_end!=CH_TXT_ATR_FIELDEND) {
-+			const SwPaM rRg(*pBM->pPos2);
-+		    Insert(rRg, CH_TXT_ATR_FIELDEND);
-+		}
-+	    }
-+	} else {
-+	    // fix bookmark positions if they are invalid
-+	    lcl_FixPosition( *pBM->pPos1 );
-+	    if( pBM->pPos2 != NULL )
-+		lcl_FixPosition( *pBM->pPos2 );
++    if (FORM_FIELDMARK_TEXT == eMark || FORM_FIELDMARK_NO_TEXT == eMark) {
++	pBM = new SwFieldBookmark(*rPaM.GetPoint(), rCode, rName, rShortName, eMark);
++	if( rPaM.HasMark() )
++	    pBM->pPos2 = new SwPosition( *rPaM.GetMark() );
++	else
++	    pBM->pPos2 = new SwPosition( *pBM->pPos1 );
++	
++	lcl_docbm_FixPosition( *pBM->pPos1 );
++	lcl_docbm_FixPosition( *pBM->pPos2 );
++	if (*pBM->pPos2<*pBM->pPos1) {
++	    SwPosition *_pos=pBM->pPos1;
++	    pBM->pPos1=pBM->pPos2;
++	    pBM->pPos2=_pos;
 +	}
- 
- 	if( !pBookmarkTbl->Insert( pBM ) )
- 		delete pBM, pBM = 0;
-@@ -194,7 +250,117 @@ SwBookmark* SwDoc::makeBookmark( /*[in]*
- 			    SetModified();
- 	    }
- 	}
-+	if (FORM_FIELDMARK_TEXT == eMark || FORM_FIELDMARK_NO_TEXT == eMark /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0*/) {
++	ASSERT(*PBM->pPos1<=*pBM->pPos2, "");
++    }
++    else if( MARK == eMark )
+     {
+         pBM = new SwMark( *rPaM.GetPoint(), rCode, rName, rShortName );
+     }
+@@ -167,6 +205,45 @@ SwBookmark* SwDoc::makeBookmark( /*[in]*/const SwPaM& rPaM, /*[in]*/const KeyCod
+     // --> OD 2007-10-18 #i81002#
+     if ( pBM )
+     {
++ 	if (FORM_FIELDMARK_TEXT == eMark || FORM_FIELDMARK_NO_TEXT == eMark ) {
++ 	    StartUndo(UNDO_UI_REPLACE, NULL);
++ 	    ASSERT(*PBM->pPos1<=*pBM->pPos2, "Bookmark positions not normalized!!!!");
++ 	    const SwTxtNode* pStartTxtNode=this->GetNodes()[pBM->GetPos().nNode]->GetTxtNode();
++ 	    const SwTxtNode* pEndTxtNode=this->GetNodes()[pBM->GetOtherPos()->nNode]->GetTxtNode();
++ 	    xub_StrLen ch_start_pos=pBM->GetPos().nContent.GetIndex();
++ 	    xub_StrLen ch_end_pos=pBM->GetOtherPos()->nContent.GetIndex();
++ 	    if (ch_end_pos==0 || ch_end_pos<=ch_start_pos) {
++ 		ch_end_pos=ch_start_pos;
++ 	    } else {
++ 		ch_end_pos--;
++ 	    }
++ 	    sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(ch_start_pos);
++ 	    sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(ch_end_pos);
++ 	    bool form=(IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT==eMark);
++ 	    if (form) {
++ 		if (ch_start!=CH_TXT_ATR_FORMELEMENT) {
++		    const SwPaM rRg(*pBM->pPos1);
++ 		    Insert(rRg, CH_TXT_ATR_FORMELEMENT);
++ 		    pBM->pPos1->nContent--;
++ 		}
++ 	    } else {
++ 		if (ch_start!=CH_TXT_ATR_FIELDSTART) {
++		    const SwPaM rRg(*pBM->pPos1);
++ 		    Insert(rRg, CH_TXT_ATR_FIELDSTART);
++ 		    pBM->pPos1->nContent--;
++ 		}
++ 		if (ch_end!=CH_TXT_ATR_FIELDEND) {
++		    const SwPaM rRg(*pBM->pPos2);
++ 		    Insert(rRg, CH_TXT_ATR_FIELDEND);
++ 		}
++ 	    }
++ 	} else {
++ 	    // fix bookmark positions if they are invalid
++ 	    lcl_docbm_FixPosition( *pBM->pPos1 );
++ 	    if( pBM->pPos2 != NULL )
++ 		lcl_docbm_FixPosition( *pBM->pPos2 );
++ 	}
++	
+         if ( !pBookmarkTbl->Insert( pBM ) )
+             delete pBM, pBM = 0;
+         else
+@@ -185,10 +262,121 @@ SwBookmark* SwDoc::makeBookmark( /*[in]*/const SwPaM& rPaM, /*[in]*/const KeyCod
+                     SetModified();
+             }
+         }
++	if (FORM_FIELDMARK_TEXT == eMark || FORM_FIELDMARK_NO_TEXT == eMark ) {
 +	    EndUndo(UNDO_UI_REPLACE, NULL);
 +	}
-+	return pBM;
++    }
++    return pBM;
 +}
 +
 +SwBookmark* SwDoc::getFieldBookmarkFor(const SwPosition &pos) const {
-+//@TODO make impl recursive
++    //@TODO make impl recursive
 +    int nCount=pBookmarkTbl->Count();
 +    while(--nCount>=0) {
-+	SwBookmark *pBM=(*pBookmarkTbl)[nCount];
-+	if (pBM->GetOtherPos()!=NULL 
-+	    && FORM_FIELDMARK_TEXT==pBM->GetType() /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0 */
-+	    && pBM->GetPos()<pos 
-+	    && pos < *(pBM->GetOtherPos())) {
-+	    return pBM;
-+	}
++ 	SwBookmark *pBM=(*pBookmarkTbl)[nCount];
++ 	if (pBM->GetOtherPos()!=NULL 
++ 	    && FORM_FIELDMARK_TEXT==pBM->GetType() /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0 */
++ 	    && pBM->GetPos()<pos 
++ 	    && pos < *(pBM->GetOtherPos())) {
++ 	    return pBM;
++ 	}
 +    }
 +    return NULL;
 +}
 +
 +SwFieldBookmark* SwDoc::getFormFieldBookmarkFor(const SwPosition &pos) const {
-+//@TODO make impl recursive
++    //@TODO make impl recursive
 +    int nCount=pBookmarkTbl->Count();
 +    while(--nCount>=0) {
-+	SwBookmark *pBM=(*pBookmarkTbl)[nCount];
-+	if (pBM->GetOtherPos()!=NULL 
-+	    && FORM_FIELDMARK_NO_TEXT==pBM->GetType() /* pBM->GetName().CompareToAscii(FIELD_FORM_BOOKMARK_PREFIX, strlen(FIELD_FORM_BOOKMARK_PREFIX))==0 */
-+	    && pBM->GetPos()<=pos 
-+	    && pos <= *(pBM->GetOtherPos())) {
-+	    return (SwFieldBookmark*)pBM;
-+	}
-+    }
++ 	SwBookmark *pBM=(*pBookmarkTbl)[nCount];
++ 	if (pBM->GetOtherPos()!=NULL 
++ 	    && FORM_FIELDMARK_NO_TEXT==pBM->GetType() /* pBM->GetName().CompareToAscii(FIELD_FORM_BOOKMARK_PREFIX, strlen(FIELD_FORM_BOOKMARK_PREFIX))==0 */
++ 	    && pBM->GetPos()<=pos 
++ 	    && pos <= *(pBM->GetOtherPos())) {
++ 	    return (SwFieldBookmark*)pBM;
++ 	}
+     }
+-	return pBM;
 +    return NULL;
-+}
-+
+ }
+ 
 +SwBookmark* SwDoc::getNextFieldBookmarkFor(const SwPosition &pos) const {
 +    int i=0;
 +    int nCount=pBookmarkTbl->Count();
 +    SwBookmark *pBM=NULL;
 +    while(i<nCount
-+	  && ((pBM=(*pBookmarkTbl)[i])==NULL
-+	  || !pBM->IsFormFieldMark() /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0 */
-+	  || pos >= pBM->GetPos() )) i++;
-+
++ 	  && ((pBM=(*pBookmarkTbl)[i])==NULL
++	      || !pBM->IsFormFieldMark() /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0 */
++	      || pos >= pBM->GetPos() )) i++;
++    
 +    if (i<nCount) {
-+	return pBM;
++ 	return pBM;
 +    } else {
-+	i=0; 
-+	while(i<nCount && (
-+	     (pBM=(*pBookmarkTbl)[i])==NULL
-+	     ||  !pBM->IsFormFieldMark() /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0*/ )) i++;
-+	return (i<nCount?pBM:NULL);
++ 	i=0; 
++ 	while(i<nCount && (
++		  (pBM=(*pBookmarkTbl)[i])==NULL
++		  ||  !pBM->IsFormFieldMark() /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0*/ )) i++;
++ 	return (i<nCount?pBM:NULL);
 +    }
 +}
 +
@@ -683,115 +762,170 @@
 +    int i=nCount-1;
 +    SwBookmark *pBM=NULL;
 +    while(i>=0
-+	  && ((pBM=(*pBookmarkTbl)[i])==NULL
-+	  || !pBM->IsFormFieldMark() /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0*/
-+	  || pBM->GetOtherPos()==NULL
-+	  || pos <= *pBM->GetOtherPos() )) i--;
-+
++ 	  && ((pBM=(*pBookmarkTbl)[i])==NULL
++	      || !pBM->IsFormFieldMark() /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0*/
++	      || pBM->GetOtherPos()==NULL
++	      || pos <= *pBM->GetOtherPos() )) i--;
++    
 +    if (i>=0) {
- 	return pBM;
++ 	return pBM;
 +    } else {
-+	i=nCount-1; 
-+	while(i>=0 && (
-+	     (pBM=(*pBookmarkTbl)[i])==NULL
-+	     ||  !pBM->IsFormFieldMark() /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0*/ )) i--;
-+	return (i>=0?pBM:NULL);
++ 	i=nCount-1; 
++ 	while(i>=0 && (
++		  (pBM=(*pBookmarkTbl)[i])==NULL
++		  ||  !pBM->IsFormFieldMark() /*pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))!=0*/ )) i--;
++ 	return (i>=0?pBM:NULL);
 +    }
 +}
 +
 +/*
-+bool SwDoc::isValidSelectionWrtFieldBookmarks(const SwPosition &posA, const SwPostion &posB) {
-+//@TODO optimize this
-+    SwBookmark *pA=getFieldBookmarkFor(posA);
-+    SwBookmark *pB=getFieldBookmarkFor(posB);
-+    return pA==pB;    
-+}
-+*/
++ bool SwDoc::isValidSelectionWrtFieldBookmarks(const SwPosition &posA, const SwPostion &posB) {
++ //@TODO optimize this
++     SwBookmark *pA=getFieldBookmarkFor(posA);
++     SwBookmark *pB=getFieldBookmarkFor(posB);
++     return pA==pB;    
++ }
++ */
++ 
++ // not finished yet, still neet to add this check
++ bool _checkFieldBookmarkSanity(const SwDoc *pDoc) {
++     int nCount=pDoc->getBookmarks().Count();
++     while(--nCount>=0) {
++	 SwBookmark *pBM=pDoc->getBookmarks()[nCount];
++	 if (pBM->IsFormFieldMark() /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0 */) {
++	     {
++		 rtl::OUString s(pBM->GetName());
++		 rtl::OString aOString = ::rtl::OUStringToOString (s, RTL_TEXTENCODING_UTF8);
++		 const SwTxtNode* pStartTxtNode=pDoc->GetNodes()[pBM->GetPos().nNode]->GetTxtNode();
++		 const SwTxtNode* pEndTxtNode=pDoc->GetNodes()[pBM->GetOtherPos()->nNode]->GetTxtNode();
++		 xub_StrLen ch_start_pos=pBM->GetPos().nContent.GetIndex();
++		 xub_StrLen ch_end_pos=pBM->GetOtherPos()->nContent.GetIndex();
++		 if (ch_end_pos==0 || ch_end_pos<=ch_start_pos) {
++		     ch_end_pos=ch_start_pos;
++		 } else {
++ 		    ch_end_pos--;
++		 }
++		 sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(ch_start_pos);
++		 sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(ch_end_pos);
++		 printf("CHECK(%s %p[%i/'%c'] %p[%i/'%c']);\n", aOString.getStr(), pStartTxtNode, ch_start, ch_start, pEndTxtNode, ch_end, ch_end);
++	     }	    
++	 }
++     }
++     return true;
++ }
++  
 +
-+// not finished yet, still neet to add this check
-+bool _checkFieldBookmarkSanity(const SwDoc *pDoc) {
-+    int nCount=pDoc->getBookmarks().Count();
-+    while(--nCount>=0) {
-+	SwBookmark *pBM=pDoc->getBookmarks()[nCount];
-+	if (pBM->IsFormFieldMark() /* pBM->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0 */) {
-+	    {
-+		rtl::OUString s(pBM->GetName());
-+		rtl::OString aOString = ::rtl::OUStringToOString (s, RTL_TEXTENCODING_UTF8);
-+		const SwTxtNode* pStartTxtNode=pDoc->GetNodes()[pBM->GetPos().nNode]->GetTxtNode();
-+		const SwTxtNode* pEndTxtNode=pDoc->GetNodes()[pBM->GetOtherPos()->nNode]->GetTxtNode();
-+		xub_StrLen ch_start_pos=pBM->GetPos().nContent.GetIndex();
-+		xub_StrLen ch_end_pos=pBM->GetOtherPos()->nContent.GetIndex();
-+		if (ch_end_pos==0 || ch_end_pos<=ch_start_pos) {
-+		    ch_end_pos=ch_start_pos;
-+		} else {
-+		    ch_end_pos--;
-+		}
-+		sal_Unicode ch_start=pStartTxtNode->GetTxt().GetChar(ch_start_pos);
-+		sal_Unicode ch_end=pEndTxtNode->GetTxt().GetChar(ch_end_pos);
-+		printf("CHECK(%s %p[%i/'%c'] %p[%i/'%c']);\n", aOString.getStr(), pStartTxtNode, ch_start, ch_start, pEndTxtNode, ch_end, ch_end);
-+	    }	    
-+	}
-+    }
-+    return true;
- }
- 
  void SwDoc::deleteBookmark( /*[in]*/sal_uInt16 nPos )
-@@ -703,7 +869,7 @@ void _SaveCntntIdx( SwDoc* pDoc, ULONG n
- 		}
- 
- 		if( pBkmk->GetOtherPos() && pBkmk->GetOtherPos()->nNode.GetIndex() ==
--			nNode && pBkmk->GetOtherPos()->nContent.GetIndex() < nCntnt )
-+			nNode && pBkmk->GetOtherPos()->nContent.GetIndex() <= nCntnt )
- 		{
- 			aSave.SetContent( pBkmk->GetOtherPos()->nContent.GetIndex() );
- 			aSave.IncType();
-@@ -1166,3 +1332,41 @@ void _RestoreCntntIdx( SvULongs& rSaveAr
+ {
+ 	SwBookmark *pBM = (*pBookmarkTbl)[nPos];
+@@ -761,6 +949,8 @@ int lcl_RelativePosition( const SwPosition& rPos, ULONG nNode, xub_StrLen nCntnt
+     return nReturn;
  }
  
- 
++
++
+ void _SaveCntntIdx( SwDoc* pDoc, ULONG nNode, xub_StrLen nCntnt,
+ 					SvULongs& rSaveArr, BYTE nSaveFly )
+ {
+@@ -1375,3 +1565,93 @@ namespace bookmarkfunc
+     }
+ }
+ // <--
++
++
 +SwFieldBookmark::SwFieldBookmark(const SwPosition& aPos,
-+		const KeyCode& rCode,
-+		const String& rName, const String& rShortName,
-+		IDocumentBookmarkAccess::BookmarkType eMark)
++				 const KeyCode& rCode,
++				 const String& rName, const String& rShortName,
++				 IDocumentBookmarkAccess::BookmarkType eMark)
 +    : SwBookmark(aPos, rCode, rName, rShortName),
-+		fftype(0), // Type: 0 = Text, 1 = Check Box, 2 = List
-+		ffres(0),
-+		ffprot(0),
-+		ffsize(0), // 0 = Auto, 1=Exact (see ffhps)
-+		fftypetxt(0), // Type of text field: 0 = Regular text, 1 = Number, 2 = Date, 3 = Current date, 4 = Current time, 5 = Calculation
-+		ffrecalc(0), 
-+		ffmaxlen(0), // Number of characters for text field. Zero means unlimited.
-+		ffhps(24) // Check box size (half-point sizes).
++      fftype(0), // Type: 0 = Text, 1 = Check Box, 2 = List
++      ffres(0),
++      ffprot(0),
++      ffsize(0), // 0 = Auto, 1=Exact (see ffhps)
++      fftypetxt(0), // Type of text field: 0 = Regular text, 1 = Number, 2 = Date, 3 = Current date, 4 = Current time, 5 = Calculation
++      ffrecalc(0), 
++      ffmaxlen(0), // Number of characters for text field. Zero means unlimited.
++      ffhps(24), // Check box size (half-point sizes).
++      ffListEntries(NULL)
 +{
-+	eMarkType = eMark;
++    eMarkType = eMark;
++}
++
++SwFieldBookmark::~SwFieldBookmark()
++{
++    if (ffListEntries!=NULL) {
++	delete ffListEntries;
++    }
 +}
 +
 +void SwFieldBookmark::SetChecked(bool checked)
 +{
-+	ASSERT(fftype==1, "This method is for checkboxes only...");
-+	ffres=(checked?1:0);
++    ASSERT(fftype==1, "This method is for checkboxes only...");
++    ffres=(checked?1:0);
 +}
 +
 +bool SwFieldBookmark::IsChecked()
 +{
-+	ASSERT(fftype==1, "This method is for checkboxes only...");
-+	return ffres!=0;
++    ASSERT(fftype==1, "This method is for checkboxes only...");
++    return ffres!=0;
 +}
 +
-+void SwFieldBookmark::SetType(int fftype)
++void SwFieldBookmark::SetType(int type)
 +{
-+	this->fftype=fftype;
++    this->fftype=type;
 +}
 +
 +int SwFieldBookmark::GetType()
 +{
-+	return fftype;
++    return fftype;
++}
++
++void SwFieldBookmark::addListItem(String item)
++{
++    if (ffListEntries==NULL) {
++	ffListEntries=new std::vector<String>();
++    }
++    assert(ffListEntries!=NULL);
++    ffListEntries->push_back(item);
++}
++
++int SwFieldBookmark::getListItems()
++{
++    return (ffListEntries!=NULL?ffListEntries->size():0);
++}
++
++String SwFieldBookmark::getListItem(int pos)
++{
++    return (ffListEntries!=NULL?(*ffListEntries)[pos]:String());
++}
++
++void SwFieldBookmark::setCurrentListItem(int pos)
++{
++    if (ffListEntries!=NULL && (size_t)pos<ffListEntries->size()) {
++	ffres=pos;
++    }
++}
++
++int SwFieldBookmark::getCurrentListItem()
++{
++    return ffres;
++}
++
++String SwFieldBookmark::getCurrentListItemText()
++{
++    return getListItem(ffres);
++}
++
++void SwFieldBookmark::invalidate() 
++{
++    SwPaM aPaM(this->GetPos(), *this->GetOtherPos());
++    aPaM.Invalidate();
 +}
 diff --git a/sw/source/core/doc/docedt.cxx b/sw/source/core/doc/docedt.cxx
-index 472f1b6..8633c3d 100644
+index ea83635..824c414 100644
 --- sw/source/core/doc/docedt.cxx
 +++ sw/source/core/doc/docedt.cxx
-@@ -902,6 +902,12 @@ bool SwDoc::Insert( const SwPaM &rRg, sal_Unicode c )
+@@ -827,6 +827,12 @@ bool SwDoc::Insert( const SwPaM &rRg, sal_Unicode c )
  |*	  Beschreibung		Zeichen ueberschreiben
  *************************************************************************/
  
@@ -805,22 +939,22 @@
  {
  	SwPosition& rPt = *(SwPosition*)rRg.GetPoint();
 diff --git a/sw/source/core/doc/docnew.cxx b/sw/source/core/doc/docnew.cxx
-index ffbd429..a90db25 100644
+index 84150be..403acf8 100644
 --- sw/source/core/doc/docnew.cxx
 +++ sw/source/core/doc/docnew.cxx
-@@ -419,6 +419,7 @@ SwDoc::SwDoc() :
+@@ -319,6 +319,7 @@ SwDoc::SwDoc() :
      mbUnixForceZeroExtLeading               = false;        // hidden
      mbOldPrinterMetrics                     = false;        // hidden
      mbTabRelativeToIndent                   = true;         // hidden
 +    mbProtectForm                           = false;        // hidden
- 
-     //
-     // COMPATIBILITY FLAGS END
+     // --> OD 2008-06-05 #i89181#
+     mbTabAtLeftIndentForParagraphsInList    = false;        // hidden
+     // <--
 diff --git a/sw/source/core/layout/trvlfrm.cxx b/sw/source/core/layout/trvlfrm.cxx
-index 019835a..fa677c9 100644
+index 258aaf7..7becfed 100644
 --- sw/source/core/layout/trvlfrm.cxx
 +++ sw/source/core/layout/trvlfrm.cxx
-@@ -1715,6 +1715,13 @@ BOOL SwRootFrm::IsDummyPage( USHORT nPageNum ) const
+@@ -1628,6 +1628,13 @@ BOOL SwRootFrm::IsDummyPage( USHORT nPageNum ) const
  |*************************************************************************/
  BOOL SwFrm::IsProtected() const
  {
@@ -835,10 +969,10 @@
  	//Geht auch FlyFrms rekursiv hoch. Geht auch von Fussnoten zum Anker.
  	const SwFrm *pFrm = this;
 diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
-index 9637868..e60e283 100644
+index 7d240ee..06ec52c 100644
 --- sw/source/core/text/inftxt.cxx
 +++ sw/source/core/text/inftxt.cxx
-@@ -156,6 +156,9 @@
+@@ -84,6 +84,9 @@
  
  #include <unomid.h>
  
@@ -848,7 +982,7 @@
  using namespace ::com::sun::star;
  using namespace ::com::sun::star::linguistic2;
  using namespace ::com::sun::star::uno;
-@@ -1185,6 +1188,41 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
+@@ -1172,6 +1175,41 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
  {
  	ASSERT( pFnt->GetBackColor(), "DrawBackBrush: Lost Color" );
  
@@ -890,7 +1024,7 @@
      SwRect aIntersect;
      CalcRect( rPor, 0, &aIntersect );
  
-@@ -1207,6 +1245,36 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
+@@ -1194,6 +1232,36 @@ void SwTxtPaintInfo::_DrawBackBrush( const SwLinePortion &rPor ) const
      }
  }
  
@@ -927,7 +1061,7 @@
  /*************************************************************************
   *					   SwTxtPaintInfo::DrawViewOpt()
   *************************************************************************/
-@@ -1241,6 +1309,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
+@@ -1228,6 +1296,7 @@ void SwTxtPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
  			default:
  			{
  				ASSERT( !this, "SwTxtPaintInfo::DrawViewOpt: don't know how to draw this" );
@@ -936,10 +1070,10 @@
  			}
  		}
 diff --git a/sw/source/core/text/inftxt.hxx b/sw/source/core/text/inftxt.hxx
-index 21cbddc..e96c784 100644
+index 5a2518a..1796f40 100644
 --- sw/source/core/text/inftxt.hxx
 +++ sw/source/core/text/inftxt.hxx
-@@ -455,7 +455,9 @@ public:
+@@ -471,7 +471,9 @@ public:
  	void DrawBackground( const SwLinePortion &rPor ) const;
  	void DrawViewOpt( const SwLinePortion &rPor, const MSHORT nWhich ) const;
  	inline void DrawBackBrush( const SwLinePortion &rPor ) const
@@ -951,10 +1085,10 @@
  	inline void NotifyURL( const SwLinePortion &rPor ) const
  		{ if( URLNotify() ) _NotifyURL( rPor ); }
 diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx
-index 4193a09..22e9ce3 100644
+index b1faa94..af34e9e 100644
 --- sw/source/core/text/itratr.cxx
 +++ sw/source/core/text/itratr.cxx
-@@ -417,6 +417,17 @@ xub_StrLen SwAttrIter::GetNextAttr( ) const
+@@ -346,6 +346,17 @@ xub_StrLen SwAttrIter::GetNextAttr( ) const
  			if ( nNextEnd<nNext ) nNext = nNextEnd; // Wer ist naeher?
  		}
  	}
@@ -973,10 +1107,10 @@
  		return pRedln->GetNextRedln( nNext );
  	return nNext;
 diff --git a/sw/source/core/text/itratr.hxx b/sw/source/core/text/itratr.hxx
-index 67bcca7..4372eb3 100644
+index 719ac63..b0f1354 100644
 --- sw/source/core/text/itratr.hxx
 +++ sw/source/core/text/itratr.hxx
-@@ -82,18 +82,19 @@ private:
+@@ -75,18 +75,19 @@ private:
  	inline void SetFnt( SwFont* pNew ) { pFnt = pNew; }
  	const void* aMagicNo[ SW_SCRIPTS ];
  	MSHORT aFntIdx[ SW_SCRIPTS ];
@@ -1000,10 +1134,10 @@
  
  	virtual ~SwAttrIter();
 diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
-index dc8ae00..757f02b 100644
+index 239ba28..7feb1e1 100644
 --- sw/source/core/text/itrform2.cxx
 +++ sw/source/core/text/itrform2.cxx
-@@ -893,14 +893,23 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
+@@ -837,14 +837,23 @@ SwTxtPortion *SwTxtFormatter::WhichTxtPor( SwTxtFormatInfo &rInf ) const
  			// Erst zum Schluss !
  			// Wenn pCurr keine Breite hat, kann sie trotzdem schon Inhalt haben,
  			// z.B. bei nicht darstellbaren Zeichen.
@@ -1033,10 +1167,10 @@
  		}
  	}
 diff --git a/sw/source/core/text/itrform2.hxx b/sw/source/core/text/itrform2.hxx
-index 26526d6..cb57ca0 100644
+index 134f0bf..21667ab 100644
 --- sw/source/core/text/itrform2.hxx
 +++ sw/source/core/text/itrform2.hxx
-@@ -144,7 +144,7 @@ public:
+@@ -139,7 +139,7 @@ public:
  	sal_Bool CalcOnceMore();
  
  	void CtorInitTxtFormatter( SwTxtFrm *pFrm, SwTxtFormatInfo *pInf );
@@ -1046,10 +1180,10 @@
  	~SwTxtFormatter();
  
 diff --git a/sw/source/core/text/itrpaint.hxx b/sw/source/core/text/itrpaint.hxx
-index 3545abc..89d9dac 100644
+index af542fb..d6bc99d 100644
 --- sw/source/core/text/itrpaint.hxx
 +++ sw/source/core/text/itrpaint.hxx
-@@ -52,9 +52,10 @@ class SwTxtPainter : public SwTxtCursor
+@@ -47,9 +47,10 @@ class SwTxtPainter : public SwTxtCursor
                                  long nAdjustBaseLine = 0 );
  protected:
  	void CtorInitTxtPainter( SwTxtFrm *pFrm, SwTxtPaintInfo *pInf );
@@ -1063,10 +1197,10 @@
  	void DrawTextLine( const SwRect &rPaint, SwSaveClip &rClip,
  					   const sal_Bool bUnderSz );
 diff --git a/sw/source/core/text/itrtxt.hxx b/sw/source/core/text/itrtxt.hxx
-index aa495ce..3d9aa7b 100644
+index 5a23f5d..5a529ab 100644
 --- sw/source/core/text/itrtxt.hxx
 +++ sw/source/core/text/itrtxt.hxx
-@@ -73,10 +73,10 @@ protected:
+@@ -68,10 +68,10 @@ protected:
  	// Zuruecksetzen in die erste Zeile.
  	void Init();
  	void CtorInitTxtIter( SwTxtFrm *pFrm, SwTxtInfo *pInf );
@@ -1079,7 +1213,7 @@
             { CtorInitTxtIter( pTxtFrm, pTxtInf ); }
  	inline const SwLineLayout *GetCurr() const { return pCurr; } // niemals 0!
  	inline const SwLineLayout *GetNext() const { return pCurr->GetNext(); }
-@@ -159,9 +159,9 @@ protected:
+@@ -157,9 +157,9 @@ protected:
  	inline void SetDropLeft( const KSHORT nNew ) { nDropLeft = nNew; }
  
  	void CtorInitTxtMargin( SwTxtFrm *pFrm, SwTxtSizeInfo *pInf );
@@ -1091,7 +1225,7 @@
             { CtorInitTxtMargin( pTxtFrm, pTxtSizeInf ); }
  	inline SwTwips GetLeftMargin() const;
  	inline SwTwips Left() const;
-@@ -223,13 +223,13 @@ class SwTxtAdjuster : public SwTxtMargin
+@@ -227,13 +227,13 @@ class SwTxtAdjuster : public SwTxtMargin
  								  const SwRect &rCurrRect );
  
  protected:
@@ -1107,7 +1241,7 @@
             { CtorInitTxtMargin( pTxtFrm, pTxtSizeInf ); }
  
  	// wird von SwTxtFormatter wegen UpdatePos ueberladen
-@@ -262,9 +262,9 @@ class SwTxtCursor : public SwTxtAdjuster
+@@ -266,9 +266,9 @@ class SwTxtCursor : public SwTxtAdjuster
  	void _GetCharRect(SwRect *, const xub_StrLen, SwCrsrMoveState* );
  protected:
  	void CtorInitTxtCursor( SwTxtFrm *pFrm, SwTxtSizeInfo *pInf );
@@ -1120,12 +1254,12 @@
  	sal_Bool GetCharRect(SwRect *, const xub_StrLen, SwCrsrMoveState* = 0,
  		const long nMax = 0 );
 diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
-index 469cdfc..fe9673d 100644
+index b7d0ddc..e6ecf6e 100644
 --- sw/source/core/text/portxt.cxx
 +++ sw/source/core/text/portxt.cxx
-@@ -85,6 +85,10 @@
+@@ -52,6 +52,10 @@
+ #include <IDocumentSettingAccess.hxx>
  #include <viewopt.hxx>  // SwViewOptions
- #endif
  
 +#include <bookmrk.hxx>
 +#include <pam.hxx>
@@ -1134,7 +1268,7 @@
  #if OSL_DEBUG_LEVEL > 1
  const sal_Char *GetLangName( const MSHORT nLang );
  #endif
-@@ -596,7 +600,17 @@ SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
+@@ -564,7 +568,17 @@ SwPosSize SwTxtPortion::GetTxtSize( const SwTxtSizeInfo &rInf ) const
  
  void SwTxtPortion::Paint( const SwTxtPaintInfo &rInf ) const
  {
@@ -1153,7 +1287,7 @@
  	{
          rInf.DrawBackBrush( *this );
  
-@@ -780,3 +794,48 @@ void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) const
+@@ -750,3 +764,75 @@ void SwHolePortion::HandlePortion( SwPortionHandler& rPH ) const
      rPH.Text( GetLen(), GetWhichPor() );
  }
  
@@ -1180,22 +1314,49 @@
 +    SwPosition aPosition(*pNd, aIndex);
 +    SwFieldBookmark *pBM=doc->getFormFieldBookmarkFor(aPosition);
 +    ASSERT(pBM!=NULL, "Where is my form field bookmark???");
-+    bool checked=(pBM!=NULL?pBM->IsChecked():false);
-+    rInf.DrawCheckBox( *this , checked);
-+//    const XubString aTxt = XubString::CreateFromAscii("[ ]");
-+//    rInf.DrawText( aTxt, *this, 0, aTxt.Len(), false );	  
++    if (pBM!=NULL) {
++	if (pBM->GetType()==1) { // a checkbox...	    
++	    bool checked=pBM->IsChecked();
++	    rInf.DrawCheckBox( *this , checked);
++	} else if (pBM->GetType()==2) { // a list...
++	    const XubString aTxt(pBM->getCurrentListItemText());
++	    rInf.DrawViewOpt( *this, POR_FLD );
++	    rInf.DrawText( aTxt, *this, 0, aTxt.Len(), false );	  
++	} else {
++	    assert(0); // unknown type...
++	}
++    }
 +}
 +
 +sal_Bool SwFieldFormPortion::Format( SwTxtFormatInfo &rInf ) 
 +{
 +    sal_Bool ret=0;
-+//	ret=SwTxtPortion::Format(rInf);
++    SwTxtNode *pNd=const_cast<SwTxtNode*>(rInf.GetTxtFrm()->GetTxtNode());
++    const SwDoc *doc=pNd->GetDoc();
++    SwIndex aIndex( pNd, rInf.GetIdx() );
++    SwPosition aPosition(*pNd, aIndex);
++    SwFieldBookmark *pBM=doc->getFormFieldBookmarkFor(aPosition);
++    ASSERT(pBM!=NULL, "Where is my form field bookmark???");
++    if (pBM!=NULL) {
++	if (pBM->GetType()==1) { // a checkbox...	    
++	    Width(rInf.GetTxtHeight());
++	    Height(rInf.GetTxtHeight());
++	    SetAscent(rInf.GetAscent());
++	} else if (pBM->GetType()==2) { // a list...
++	    const XubString aTxt(pBM->getCurrentListItemText());
++	    SwPosSize aPosSize=rInf.GetTxtSize(aTxt);
++	    Width(aPosSize.Width());
++	    Height(aPosSize.Height());
++	    SetAscent(rInf.GetAscent());
++	} else {
++	    assert(0); // unknown type...
++	}
 +
-+	Width(rInf.GetTxtHeight());
-+	Height(rInf.GetTxtHeight());
-+	SetAscent(rInf.GetAscent());
-+	int h=rInf.GetTxtHeight();
-+	
++    }
++//	ret=SwTxtPortion::Format(rInf);
++#if 0
++//	int h=rInf.GetTxtHeight();
++#endif
 +/*
 +	Height(100);
 +	SetAscent(100);
@@ -1203,10 +1364,10 @@
 +    return ret;
 +}
 diff --git a/sw/source/core/text/portxt.hxx b/sw/source/core/text/portxt.hxx
-index ca2fde9..dbf9b27 100644
+index 819d285..0ab463e 100644
 --- sw/source/core/text/portxt.hxx
 +++ sw/source/core/text/portxt.hxx
-@@ -103,8 +103,30 @@ public:
+@@ -95,8 +95,30 @@ public:
  	DECL_FIXEDMEMPOOL_NEWDEL(SwHolePortion)
  };
  
@@ -1238,10 +1399,10 @@
 +
  #endif
 diff --git a/sw/source/core/txtnode/swfont.cxx b/sw/source/core/txtnode/swfont.cxx
-index 0d54f85..63c9027 100644
+index 8be8c0e..6009f71 100644
 --- sw/source/core/txtnode/swfont.cxx
 +++ sw/source/core/txtnode/swfont.cxx
-@@ -869,6 +869,32 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
+@@ -795,6 +795,32 @@ Size SwSubFont::_GetTxtSize( SwDrawTextInfo& rInf )
  		}
  	}
  
@@ -1275,10 +1436,10 @@
  }
  
 diff --git a/sw/source/core/unocore/unobkm.cxx b/sw/source/core/unocore/unobkm.cxx
-index 6114e6a..bb55fa2 100644
+index 5667bd6..f2e41ed 100644
 --- sw/source/core/unocore/unobkm.cxx
 +++ sw/source/core/unocore/unobkm.cxx
-@@ -126,7 +126,7 @@ SwXBookmark::~SwXBookmark()
+@@ -101,7 +101,7 @@ SwXBookmark::~SwXBookmark()
  /*-- 10.12.98 10:14:39---------------------------------------------------
  
    -----------------------------------------------------------------------*/
@@ -1287,16 +1448,16 @@
  										throw( lang::IllegalArgumentException, uno::RuntimeException )
  {
  	if(!bIsDescriptor)
-@@ -160,7 +160,7 @@ void SwXBookmark::attachToRange(const uno::Reference< text::XTextRange > & xText
+@@ -137,7 +137,7 @@ void SwXBookmark::attachToRange(const uno::Reference< text::XTextRange > & xText
+             IDocumentBookmarkAccess::BookmarkType eBkmkType =
+                                     pDoc->isCrossRefBookmarkName( m_aName )
+                                     ? IDocumentBookmarkAccess::CROSSREF_BOOKMARK
+-                                    : IDocumentBookmarkAccess::BOOKMARK;
++                                    : eMark;
+             // <--
              if( USHRT_MAX != pDoc->findBookmark(m_aName) )
                  pDoc->makeUniqueBookmarkName( m_aName );
- 			KeyCode aCode;
--            pBkm = pDoc->makeBookmark( aPam, aCode, m_aName, aEmptyStr, IDocumentBookmarkAccess::BOOKMARK);
-+            pBkm = pDoc->makeBookmark( aPam, aCode, m_aName, aEmptyStr, eMark);
- 			pBkm->Add(this);
- 			bIsDescriptor = sal_False;
- 		}
-@@ -168,6 +168,118 @@ void SwXBookmark::attachToRange(const uno::Reference< text::XTextRange > & xText
+@@ -163,6 +163,118 @@ void SwXBookmark::attachToRange(const uno::Reference< text::XTextRange > & xText
  	else
  		throw lang::IllegalArgumentException();
  }
@@ -1307,8 +1468,8 @@
 +	attachToRangeEx(xTextRange, IDocumentBookmarkAccess::BOOKMARK);
 +}
 +
-+SwXFieldmark::SwXFieldmark(bool isReplacementObject, SwBookmark* pBkm, SwDoc* pDc) : SwXFieldmark_BASE(pBkm, pDc),
-+isReplacementObject(isReplacementObject)
++SwXFieldmark::SwXFieldmark(bool _isReplacementObject, SwBookmark* pBkm, SwDoc* pDc) : SwXFieldmark_BASE(pBkm, pDc),
++isReplacementObject(_isReplacementObject)
 +{
 +}
 +
@@ -1416,19 +1577,10 @@
   *
   * --------------------------------------------------*/
 diff --git a/sw/source/core/unocore/unocoll.cxx b/sw/source/core/unocore/unocoll.cxx
-index acdadee..319c6f3 100644
+index ba8fa57..dc4b53c 100644
 --- sw/source/core/unocore/unocoll.cxx
 +++ sw/source/core/unocore/unocoll.cxx
-@@ -20,7 +20,7 @@
-  *    This library is free software; you can redistribute it and/or
-  *    modify it under the terms of the GNU Lesser General Public
-  *    License version 2.1, as published by the Free Software Foundation.
-- *
-+ *	
-  *    This library is distributed in the hope that it will be useful,
-  *    but WITHOUT ANY WARRANTY; without even the implied warranty of
-  *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-@@ -271,6 +271,8 @@ const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
+@@ -201,6 +201,8 @@ const ProvNamesId_Type __FAR_DATA aProvNamesId[] =
      { "com.sun.star.image.ImageMapPolygonObject",             SW_SERVICE_IMAP_POLYGON },
      { "com.sun.star.text.TextGraphicObject",                  SW_SERVICE_TYPE_TEXT_GRAPHIC },
      { "com.sun.star.chart2.data.DataProvider",                SW_SERVICE_CHART2_DATA_PROVIDER },
@@ -1437,7 +1589,7 @@
  
      // case-correct versions of the service names (see #i67811)
      { CSS_TEXT_TEXTFIELD_DATE_TIME,                   SW_SERVICE_FIELDTYPE_DATETIME },
-@@ -443,6 +445,18 @@ uno::Reference< uno::XInterface >  	SwXServiceProvider::MakeInstance(sal_uInt16
+@@ -369,6 +371,18 @@ uno::Reference< uno::XInterface >  	SwXServiceProvider::MakeInstance(sal_uInt16
  			xRet =  (cppu::OWeakObject*)pBookmark;
  		}
  		break;
@@ -1456,7 +1608,7 @@
  		case  SW_SERVICE_TYPE_FOOTNOTE :
  			xRet =  (cppu::OWeakObject*)new SwXFootnote(sal_False);
  		break;
-@@ -1645,8 +1659,15 @@ SwXBookmark* 	SwXBookmarks::GetObject( SwBookmark& rBkm, SwDoc* pDoc )
+@@ -1569,8 +1583,15 @@ SwXBookmark* 	SwXBookmarks::GetObject( SwBookmark& rBkm, SwDoc* pDoc )
  {
  	SwXBookmark* pBkm = (SwXBookmark*)SwClientIter( rBkm ).
  									First( TYPE( SwXBookmark ));
@@ -1475,10 +1627,10 @@
  }
  /******************************************************************
 diff --git a/sw/source/core/unocore/unoport.cxx b/sw/source/core/unocore/unoport.cxx
-index f3eb739..83968a3 100644
+index ef8f73f..05fefba 100644
 --- sw/source/core/unocore/unoport.cxx
 +++ sw/source/core/unocore/unoport.cxx
-@@ -350,6 +350,9 @@ void SwXTextPortion::GetPropertyValue(
+@@ -314,6 +314,9 @@ void SwXTextPortion::GetPropertyValue(
                  case PORTION_RUBY_START:
                  case PORTION_RUBY_END:      pRet = "Ruby";break;
                  case PORTION_SOFT_PAGEBREAK:pRet = "SoftPageBreak";break;
@@ -1488,7 +1640,7 @@
                  default:
                      pRet = 0;
                  }
-@@ -393,6 +396,8 @@ void SwXTextPortion::GetPropertyValue(
+@@ -357,6 +360,8 @@ void SwXTextPortion::GetPropertyValue(
                      case PORTION_REDLINE_END :
                      case PORTION_RUBY_START:
                      case PORTION_RUBY_END:
@@ -1497,7 +1649,7 @@
                          rVal.setValue(&bIsCollapsed, ::getBooleanCppuType());
                      break;
                      default:
-@@ -410,6 +415,7 @@ void SwXTextPortion::GetPropertyValue(
+@@ -374,6 +379,7 @@ void SwXTextPortion::GetPropertyValue(
                      case PORTION_TOXMARK_START:
                      case PORTION_REDLINE_START:
                      case PORTION_RUBY_START:
@@ -1505,7 +1657,7 @@
                      break;
  
                      case PORTION_REFMARK_END:
-@@ -417,6 +423,7 @@ void SwXTextPortion::GetPropertyValue(
+@@ -381,6 +387,7 @@ void SwXTextPortion::GetPropertyValue(
                      case PORTION_BOOKMARK_END:
                      case PORTION_REDLINE_END:
                      case PORTION_RUBY_END:
@@ -1514,30 +1666,21 @@
                      break;
                      default:
 diff --git a/sw/source/core/unocore/unoportenum.cxx b/sw/source/core/unocore/unoportenum.cxx
-index f3ad5da..356d503 100644
+index 17c144e..4371eed 100644
 --- sw/source/core/unocore/unoportenum.cxx
 +++ sw/source/core/unocore/unoportenum.cxx
-@@ -694,6 +694,19 @@ void lcl_FillBookmarkArray(SwDoc& rDoc,SwUnoCrsr& rUnoCrsr, SwXBookmarkPortion_I
- 			if( !pMark->IsBookMark() )
+@@ -658,6 +658,10 @@ void lcl_FillBookmarkArray(SwDoc& rDoc,SwUnoCrsr& rUnoCrsr, SwXBookmarkPortion_I
+                  !dynamic_cast<SwCrossRefBookmark*>(pMark) )
  				continue;
  
-+			/*
-+			if (pMark!=NULL && pMark->GetName().CompareToAscii(FIELD_BOOKMARK_PREFIX, strlen(FIELD_BOOKMARK_PREFIX))==0) {
-+				continue;
-+			}
-+
-+			if (pMark!=NULL && pMark->GetName().CompareToAscii(FIELD_FORM_BOOKMARK_PREFIX, strlen(FIELD_FORM_BOOKMARK_PREFIX))==0) {
-+				continue;
-+			}
-+			*/
-+			if (pMark!=NULL && pMark->IsFormFieldMark()) {
-+				continue;
-+			}
++	    if (pMark!=NULL && pMark->IsFormFieldMark()) {
++		continue;
++	    }
 +
- 			const SwPosition& rPos1 = pMark->GetPos();
- 			const SwPosition* pPos2 = pMark->GetOtherPos();
- 			BOOL bBackward = pPos2 ? rPos1 > *pPos2: FALSE;
-@@ -999,8 +1012,78 @@ void SwXTextPortionEnumeration::CreatePortions()
+             const SwPosition& rPos1 = pMark->GetBookmarkPos();
+             // --> OD 2007-10-23 #i81002#
+ //            const SwPosition* pPos2 = pMark->GetOtherBookmarkPos();
+@@ -981,8 +985,78 @@ void SwXTextPortionEnumeration::CreatePortions()
  							}
  						}
  					}
@@ -1619,10 +1762,10 @@
  						aPortionArr.Insert(new Reference<XTextRange>(xRef), aPortionArr.Count());
  				}
 diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
-index a0d4d0f..fbd51b1 100644
+index 1a13705..5bee930 100644
 --- sw/source/filter/inc/fltshell.hxx
 +++ sw/source/filter/inc/fltshell.hxx
-@@ -96,6 +96,7 @@ public:
+@@ -80,6 +80,7 @@ public:
  	BOOL bOld;			// to mark Attributes *before* skipping field results
  	BOOL bLocked;
  	BOOL bCopied;
@@ -1630,7 +1773,7 @@
  
  	SwFltStackEntry(const SwPosition & rStartPos, SfxPoolItem* pHt );
  	SwFltStackEntry(const SwFltStackEntry& rEntry);
-@@ -144,7 +145,7 @@ public:
+@@ -128,7 +129,7 @@ public:
  
  	void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr );
  
@@ -1640,10 +1783,10 @@
  	void StealAttr(const SwPosition* pPos, USHORT nAttrId = 0);
  	void MarkAllAttrsOld();
 diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
-index f2092b4..6ce3d32 100644
+index bd671f7..4779d61 100644
 --- sw/source/filter/ww1/fltshell.cxx
 +++ sw/source/filter/ww1/fltshell.cxx
-@@ -189,6 +189,7 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt )
+@@ -106,6 +106,7 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt )
  	bOld	= FALSE;	// used for marking Attributes *before* skipping field results
  	bLocked = TRUE; 	// locke das Attribut --> darf erst
  	bCopied = FALSE;	// gesetzt werden, wenn es wieder geunlocked ist
@@ -1651,7 +1794,7 @@
  }
  
  SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
-@@ -199,6 +200,7 @@ SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
+@@ -116,6 +117,7 @@ SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
  	nMkCntnt= rEntry.nMkCntnt;
  	bOld	= rEntry.bOld;
  	bLocked	= bCopied = TRUE; // when rEntry were NOT bLocked we would never have been called
@@ -1659,7 +1802,7 @@
  }
  
  
-@@ -385,7 +387,7 @@ void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
+@@ -302,7 +304,7 @@ void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
  // Returned, ob das gesuchte Attribut / die gesuchten Attribute
  // ueberhaupt auf dem Stack standen
  void SwFltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
@@ -1668,7 +1811,7 @@
  {
  	ASSERT(!nAttrId ||
  		(POOLATTR_BEGIN <= nAttrId && POOLATTR_END > nAttrId) ||
-@@ -413,8 +415,10 @@ void SwFltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
+@@ -330,8 +332,10 @@ void SwFltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
  					bF = true;
  				}
  			}
@@ -1680,7 +1823,7 @@
  			continue;
  		}
  
-@@ -583,7 +587,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
+@@ -503,7 +507,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
  				}
  			}
  			if( !pB->IsOnlyRef() &&
@@ -1690,12 +1833,12 @@
  				MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
                  pDoc->makeBookmark( aRegion, aEmptyKeyCode, rName, aEmptyStr, IDocumentBookmarkAccess::BOOKMARK);
 diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
-index 26290b6..1d1749a 100644
+index bbb2d97..b25a1b6 100644
 --- sw/source/filter/ww8/wrtw8nds.cxx
 +++ sw/source/filter/ww8/wrtw8nds.cxx
-@@ -216,6 +216,10 @@
+@@ -104,6 +104,10 @@
+ #include "wrtww8.hxx"
  #include "ww8par.hxx"
- #endif
  
 +#ifndef _BOOKMRK_HXX
 +#include <bookmrk.hxx>
@@ -1704,7 +1847,7 @@
  using namespace ::com::sun::star;
  using namespace ::com::sun::star::i18n;
  using namespace sw::util;
-@@ -400,12 +404,22 @@ xub_StrLen WW8_SwAttrIter::SearchNext( xub_StrLen nStartPos )
+@@ -288,12 +292,22 @@ xub_StrLen WW8_SwAttrIter::SearchNext( xub_StrLen nStartPos )
      xub_StrLen nMinPos = STRING_MAXLEN;
      xub_StrLen i=0;
  
@@ -1728,59 +1871,7 @@
      }
  
      if( nCurRedlinePos < rWrt.pDoc->GetRedlineTbl().Count() )
-@@ -525,7 +539,7 @@ void WW8_SwAttrIter::OutAttr(xub_StrLen nSwPos)
-     }
- 
- 	// #i46087# patch from james_clark; complex texts needs the undocumented SPRM 0x0882 with param 0x81.
--	if (rWrt.bWrtWW8 && GetScript() == ScriptType::COMPLEX && !IsCharRTL())
-+	if (rWrt.bWrtWW8 && GetScript() == com::sun::star::i18n::ScriptType::COMPLEX && !IsCharRTL())
-     {
- 		rWrt.InsUInt16(0x882);
- 		rWrt.pO->Insert((BYTE)0x81, rWrt.pO->Count());
-@@ -818,7 +832,7 @@ void WW8_SwAttrIter::OutSwFmtRuby(const SwFmtRuby& rRuby, bool bStart)
-         if( pBreakIt->xBreak.is() )
-             nRubyScript = pBreakIt->xBreak->getScriptType( rRuby.GetText(), 0);
-         else
--            nRubyScript = ScriptType::ASIAN;
-+            nRubyScript = com::sun::star::i18n::ScriptType::ASIAN;
- 
-         const SwTxtRuby* pRubyTxt = rRuby.GetTxtRuby();
-         const SwCharFmt* pFmt = pRubyTxt ? pRubyTxt->GetCharFmt() : 0;
-@@ -869,7 +883,7 @@ void WW8_SwAttrIter::OutSwFmtRuby(const SwFmtRuby& rRuby, bool bStart)
-             nRubyScript = pBreakIt->xBreak->getScriptType( rNd.GetTxt(),
-                 *(pRubyTxt->GetStart()));
-         else
--            nRubyScript = ScriptType::ASIAN;
-+            nRubyScript = com::sun::star::i18n::ScriptType::ASIAN;
- 
-         const SwAttrSet& rSet = rNd.GetSwAttrSet();
-         const SvxFontHeightItem &rHeightItem  =
-@@ -1470,20 +1484,20 @@ String WW8_SwAttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
- 
-     if (SVX_CASEMAP_TITEL == ((const SvxCaseMapItem&)rItem).GetValue())
-     {
--        sal_uInt16 nScriptType = ScriptType::LATIN;
-+        sal_uInt16 nScriptType = com::sun::star::i18n::ScriptType::LATIN;
-         if (pBreakIt->xBreak.is())
-             nScriptType = pBreakIt->xBreak->getScriptType(aSnippet, 0);
- 
-         LanguageType nLanguage;
-         switch (nScriptType)
-         {
--            case ScriptType::ASIAN:
-+            case com::sun::star::i18n::ScriptType::ASIAN:
-                 nLanguage = ((const SvxLanguageItem&)GetItem(RES_CHRATR_CJK_LANGUAGE)).GetLanguage();
-                 break;
--            case ScriptType::COMPLEX:
-+            case com::sun::star::i18n::ScriptType::COMPLEX:
-                 nLanguage = ((const SvxLanguageItem&)GetItem(RES_CHRATR_CTL_LANGUAGE)).GetLanguage();
-                 break;
--            case ScriptType::LATIN:
-+            case com::sun::star::i18n::ScriptType::LATIN:
-             default:
-                 nLanguage = ((const SvxLanguageItem&)GetItem(RES_CHRATR_LANGUAGE)).GetLanguage();
-                 break;
-@@ -1620,8 +1634,50 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
+@@ -1526,8 +1540,65 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
          xub_StrLen nLen = nNextAttr - nAktPos;
          if (!bTxtAtr && nLen)
          {
@@ -1817,12 +1908,27 @@
 +				if (pFieldmark!=NULL) {
 +					rWW8Wrt.AppendBookmark( pFieldmark->GetName(), 1);
 +				}
-+				rWW8Wrt.OutField(NULL, ww::eFORMCHECKBOX, String::CreateFromAscii(" FORMCHECKBOX "), WRITEFIELD_START | WRITEFIELD_CMD_START);
 +				if (pFieldmark!=NULL) {
++				    switch (pFieldmark->GetType()) {
++					case 0: assert(0); /* should not happend*/ break;
++					case 1: /* CHECKBOX */ 
++					    rWW8Wrt.OutField(NULL, ww::eFORMCHECKBOX, String::CreateFromAscii(" FORMCHECKBOX "), WRITEFIELD_START | WRITEFIELD_CMD_START);
++					    
++					    rWW8Wrt.WriteFormData( *pFieldmark );
++					    rWW8Wrt.OutField(NULL, ww::eFORMCHECKBOX, String(), WRITEFIELD_CMD_END | WRITEFIELD_CLOSE);
++					    break;
++					case 2: /* LIST */ 
++					    rWW8Wrt.OutField(NULL, ww::eFORMDROPDOWN, String::CreateFromAscii(" FORMDROPDOWN "), WRITEFIELD_START | WRITEFIELD_CMD_START);
++					    
++					    rWW8Wrt.WriteFormData( *pFieldmark );
++					    rWW8Wrt.OutField(NULL, ww::eFORMDROPDOWN, String(), WRITEFIELD_CMD_END | WRITEFIELD_CLOSE);
++					    break;
++					default:
++					    break;
 +
-+					rWW8Wrt.WriteFormData( *pFieldmark );
++
++				    }
 +				}
-+				rWW8Wrt.OutField(NULL, ww::eFORMCHECKBOX, String(), WRITEFIELD_CMD_END | WRITEFIELD_CLOSE);
 +				if (pFieldmark!=NULL) {
 +					rWW8Wrt.AppendBookmark( pFieldmark->GetName(), 0);
 +				}
@@ -1833,7 +1939,7 @@
              {
                  // Insert tab for aesthetic puposes #i24762#
                  if (aSnippet.GetChar(0) != 0x09)
-@@ -1629,7 +1685,7 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
+@@ -1535,7 +1606,7 @@ Writer& OutWW8_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
                      nLen++;
                      aSnippet.Insert(0x09,0);
                  }
@@ -1843,12 +1949,12 @@
          }
  
 diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
-index 421ec5b..f85fa08 100644
+index 4f1ba07..935d5c6 100644
 --- sw/source/filter/ww8/wrtww8.cxx
 +++ sw/source/filter/ww8/wrtww8.cxx
-@@ -204,6 +204,10 @@
- #include "writerwordglue.hxx"
- #endif
+@@ -103,6 +103,10 @@
+ #include <com/sun/star/document/XDocumentProperties.hpp>
+ 
  
 +#ifndef IDOCUMENTBOOKMARKACCESS_HXX_INCLUDED
 +#include <IDocumentBookmarkAccess.hxx>
@@ -1857,7 +1963,7 @@
  using namespace sw::util;
  using namespace sw::types;
  
-@@ -286,7 +290,7 @@ public:
+@@ -185,7 +189,7 @@ public:
      WW8_WrtBookmarks();
      ~WW8_WrtBookmarks();
  
@@ -1866,7 +1972,7 @@
      void Write( SwWW8Writer& rWrt );
      void MoveFieldBookmarks(ULONG nFrom,ULONG nTo);
  
-@@ -1307,7 +1311,7 @@ WW8_WrtBookmarks::~WW8_WrtBookmarks()
+@@ -1222,7 +1226,7 @@ WW8_WrtBookmarks::~WW8_WrtBookmarks()
  {
  }
  
@@ -1875,7 +1981,7 @@
  {
      USHORT nPos = GetPos( rNm );
      if( USHRT_MAX == nPos )
-@@ -1339,7 +1343,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm )
+@@ -1254,7 +1258,7 @@ void WW8_WrtBookmarks::Append( WW8_CP nStartCp, const String& rNm )
          if (aFieldBookmarks[nPos])
              --nStartCp;
  
@@ -1884,19 +1990,17 @@
      }
  }
  
-@@ -1437,6 +1441,11 @@ void SwWW8Writer::AppendBookmarks( const SwTxtNode& rNd,
+@@ -1352,6 +1356,9 @@ void SwWW8Writer::AppendBookmarks( const SwTxtNode& rNd,
          for( USHORT n = 0; n < aArr.Count(); ++n )
          {
              const SwBookmark& rBkmk = *(SwBookmark*)aArr[ n ];
-+
-+			if (rBkmk.IsFormFieldMark()) {
-+				continue;
-+			}
-+
-             const SwPosition* pPos = &rBkmk.GetPos(),
-                             * pOPos = rBkmk.GetOtherPos();
++	    if (rBkmk.IsFormFieldMark()) {
++		continue;
++	    }
+             const SwPosition* pPos = &rBkmk.GetBookmarkPos(),
+                             * pOPos = rBkmk.GetOtherBookmarkPos();
              if( pOPos && pOPos->nNode == pPos->nNode &&
-@@ -1451,14 +1460,14 @@ void SwWW8Writer::AppendBookmarks( const SwTxtNode& rNd,
+@@ -1366,14 +1373,14 @@ void SwWW8Writer::AppendBookmarks( const SwTxtNode& rNd,
                  nCntnt < nAktEnd ) )
              {
                  ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
@@ -1914,7 +2018,7 @@
              }
          }
      }
-@@ -1650,6 +1659,17 @@ void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
+@@ -1565,6 +1572,17 @@ void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
          rStrm.Write(&aBytes[0], aBytes.size());
  }
  
@@ -1932,7 +2036,7 @@
  void SwWW8Writer::WriteString8(SvStream& rStrm, const String& rStr,
      bool bAddZero, rtl_TextEncoding eCodeSet)
  {
-@@ -2652,5 +2672,97 @@ void SwWW8Writer::RestoreMacroCmds()
+@@ -2580,5 +2598,118 @@ void SwWW8Writer::RestoreMacroCmds()
      pFib->lcbCmds = pTableStrm->Tell() - pFib->fcCmds;
  }
  
@@ -1971,6 +2075,11 @@
 +	int ffres=rFieldmark.GetFFRes();
 +	aFldHeader[4] |= ((ffres<<2) & 0x7C);
 +
++
++	if (rFieldmark.GetType()==2) {
++	    aFldHeader[5] |= 0x80; // ffhaslistbox
++	}
++
 +	const String ffdeftext;
 +	const String ffformat;
 +	const String ffhelptext;
@@ -1997,6 +2106,15 @@
 +		+2*ffstattext.Len()+4
 +		+2*ffentrymcr.Len()+4
 +		+2*ffexitmcr.Len()+4;
++	if (type==2) {
++	    slen+=2; // for 0xFF, 0xFF
++	    slen+=4; // for num of list items
++	    const int items=rFieldmark.getListItems();
++	    for(int i=0;i<items;i++) {
++		String item=rFieldmark.getListItem(i);
++		slen+=2*item.Len()+2;
++	    }
++	}
 +#ifdef OSL_BIGENDIAN
 +	slen=SWAPLONG(slen);
 +#endif // OSL_BIGENDIAN
@@ -2007,14 +2125,14 @@
 +
 +	len=sizeof(aFldHeader);
 +	assert(len==8);
-+    pDataStrm->Write( aFldHeader, len);
++	pDataStrm->Write( aFldHeader, len);
 +
-+    WriteString_xstz( *pDataStrm, ffname, true); // Form field name
++	WriteString_xstz( *pDataStrm, ffname, true); // Form field name
 +
 +	if (type==0) {
-+		WriteString_xstz( *pDataStrm, ffdeftext, true);
++	    WriteString_xstz( *pDataStrm, ffdeftext, true);
 +	} else {
-+		pDataStrm->WriteNumber((sal_uInt16)0);
++	    *pDataStrm<<(sal_uInt16)0;
 +	}	
 +	WriteString_xstz( *pDataStrm, ffformat, true);
 +	WriteString_xstz( *pDataStrm, ffhelptext, true);
@@ -2022,19 +2140,26 @@
 +	WriteString_xstz( *pDataStrm, ffentrymcr, true);
 +	WriteString_xstz( *pDataStrm, ffexitmcr, true);
 +	if (type==2) {
-+		// 0xFF, 0xFF
-+		// sal_uInt32 number of strings
-+		// (sal_uInt16 len; sal_uInt16 unicode char[len])*num of strings
++	    *pDataStrm<<(sal_uInt16)0xFFFF;
++	    const int items=rFieldmark.getListItems();
++	    *pDataStrm<<(sal_uInt32)items;
++	    for(int i=0;i<items;i++) {
++		String item=rFieldmark.getListItem(i);
++		WriteString_xstz( *pDataStrm, item, false);
++	    }
++	    // 0xFF, 0xFF
++	    // sal_uInt32 number of strings
++	    // (sal_uInt16 len; sal_uInt16 unicode char[len])*num of strings
 +	}
 +
 +}
  
  /* vi:set tabstop=4 shiftwidth=4 expandtab: */
 diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
-index 177007c..6415871 100644
+index a7ca0c1..9d47ee3 100644
 --- sw/source/filter/ww8/wrtww8.hxx
 +++ sw/source/filter/ww8/wrtww8.hxx
-@@ -678,6 +678,7 @@ public:
+@@ -654,6 +654,7 @@ public:
      static void WriteString8(SvStream& rStrm, const String& rStr,
          bool bAddZero, rtl_TextEncoding eCodeSet);
  
@@ -2042,7 +2167,7 @@
  #if 1
      //Prefer ww::bytes to WW8Bytes, migrate away from the other ones.
      static void InsUInt16(ww::bytes &rO, sal_uInt16 n);
-@@ -734,6 +735,8 @@ public:
+@@ -710,6 +711,8 @@ public:
      void AddLinkTarget(const String& rURL);
      void CollectOutlineBookmarks(const SwDoc &rDoc);
      void AddBookmark(String sBkmkName);
@@ -2052,19 +2177,19 @@
      //No copying
      SwWW8Writer(const SwWW8Writer&);
 diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
-index b902c49..d94b2e1 100644
+index 45f0396..16bad6c 100644
 --- sw/source/filter/ww8/ww8par.cxx
 +++ sw/source/filter/ww8/ww8par.cxx
-@@ -286,6 +286,8 @@
+@@ -139,6 +139,8 @@
+ #include <com/sun/star/document/XDocumentProperties.hpp>
  #   include <svtools/itemiter.hxx>  //SfxItemIter
- #endif
  
 +#include <stdio.h>
 +
  #define MM_250 1417             // WW-Default fuer Hor. Seitenraender: 2.5 cm
  #define MM_200 1134             // WW-Default fuer u.Seitenrand: 2.0 cm
  
-@@ -1616,6 +1618,12 @@ void SwWW8ImplReader::ImportDop()
+@@ -1508,6 +1510,12 @@ void SwWW8ImplReader::ImportDop()
          }
      }
  
@@ -2077,7 +2202,7 @@
      maTracer.LeaveEnvironment(sw::log::eDocumentProperties);
  }
  
-@@ -1722,6 +1730,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) :
+@@ -1614,6 +1622,7 @@ WW8ReaderSave::WW8ReaderSave(SwWW8ImplReader* pRdr ,WW8_CP nStartCp) :
      maOldApos.push_back(false);
      maOldApos.swap(pRdr->maApos);
      maOldFieldStack.swap(pRdr->maFieldStack);
@@ -2085,7 +2210,7 @@
  }
  
  void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
-@@ -1768,6 +1777,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
+@@ -1660,6 +1669,7 @@ void WW8ReaderSave::Restore( SwWW8ImplReader* pRdr )
          pRdr->pPlcxMan->RestoreAllPLCFx(maPLCFxSave);
      pRdr->maApos.swap(maOldApos);
      pRdr->maFieldStack.swap(maOldFieldStack);
@@ -2093,7 +2218,7 @@
  }
  
  void SwWW8ImplReader::Read_HdFtFtnText( const SwNodeIndex* pSttIdx,
-@@ -2737,6 +2747,22 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
+@@ -2674,6 +2684,22 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
          case 0x15:
              if( !bSpec )        // Juristenparagraph
                  cInsert = '\xa7';
@@ -2116,7 +2241,7 @@
              break;
          case 0x9:
              cInsert = '\x9';    // Tab
-@@ -3522,6 +3548,8 @@ bool wwSectionManager::IsNewDoc() const
+@@ -3461,6 +3487,8 @@ bool wwSectionManager::IsNewDoc() const
  
  void wwSectionManager::InsertSegments()
  {
@@ -2125,9 +2250,9 @@
      mySegIter aEnd = maSegments.end();
      mySegIter aStart = maSegments.begin();
      for (mySegIter aIter = aStart; aIter != aEnd; ++aIter)
-@@ -3530,7 +3558,7 @@ void wwSectionManager::InsertSegments()
+@@ -3475,7 +3503,7 @@ void wwSectionManager::InsertSegments()
  
-         bool bInsertSection = aIter != aStart ? aIter->IsContinous() : false;
+         bool bInsertSection = (aIter != aStart) ? (aIter->IsContinous() &&  bThisAndPreviousAreCompatible): false;
          bool bInsertPageDesc = !bInsertSection;
 -        bool bProtected = SectionIsProtected(*aIter);
 +        bool bProtected = !bUseEnhFields && SectionIsProtected(*aIter); // do we really  need this ?? I guess I have a different logic in editshell which disales this...
@@ -2135,10 +2260,10 @@
          if (bInsertPageDesc)
          {
 diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
-index 5748ff8..cb1124a 100644
+index 1f8446c..f7c8871 100644
 --- sw/source/filter/ww8/ww8par.hxx
 +++ sw/source/filter/ww8/ww8par.hxx
-@@ -390,6 +390,32 @@ public:
+@@ -365,6 +365,32 @@ public:
      void Swap(FieldEntry &rOther) throw();
  };
  
@@ -2171,7 +2296,7 @@
  //-----------------------------------------
  //    Mini-Merker fuer einige Flags
  //-----------------------------------------
-@@ -422,6 +448,7 @@ private:
+@@ -397,6 +423,7 @@ private:
      bool mbWasParaEnd;
      bool mbHasBorder;
      bool mbFirstPara;
@@ -2179,7 +2304,7 @@
  public:
      WW8ReaderSave(SwWW8ImplReader* pRdr, WW8_CP nStart=-1);
      void Restore(SwWW8ImplReader* pRdr);
-@@ -876,6 +903,9 @@ private:
+@@ -851,6 +878,9 @@ private:
      std::deque<FieldEntry> maFieldStack;
      typedef std::deque<FieldEntry>::const_iterator mycFieldIter;
  
@@ -2190,12 +2315,12 @@
      A stack of open footnotes. Should only be one in it at any time.
      */
 diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
-index 9bfd62e..5c0a897 100644
+index ce79eaf..ea3b681 100644
 --- sw/source/filter/ww8/ww8par3.cxx
 +++ sw/source/filter/ww8/ww8par3.cxx
-@@ -221,9 +221,58 @@
+@@ -94,9 +94,58 @@
+ #include "ww8par.hxx"
  #include "ww8par2.hxx"  // wg. Listen-Attributen in Styles
- #endif
  
 +#include <bookmrk.hxx>	
 +#include <svtools/fltrcfg.hxx>
@@ -2252,7 +2377,7 @@
  //-----------------------------------------
  //            UNO-Controls
  //-----------------------------------------
-@@ -241,8 +290,9 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
+@@ -114,8 +163,9 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
  {
      WW8FormulaEditBox aFormula(*this);
  
@@ -2263,7 +2388,7 @@
  
      /* #80205#
      Here we have a small complication. This formula control contains
-@@ -254,23 +304,58 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
+@@ -127,23 +177,58 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
      the field result into the formula here in place of the default
      text.
      */
@@ -2335,7 +2460,7 @@
  }
  
  eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
-@@ -282,9 +367,47 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
+@@ -155,9 +240,47 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
  
      if (0x01 == rStr.GetChar(writer_cast<xub_StrLen>(pF->nLCode-1)))
          ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_CHECKBOX);
@@ -2386,22 +2511,119 @@
  }
  
  eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
-@@ -2041,6 +2164,10 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
+@@ -167,24 +290,72 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
+     if (0x01 == rStr.GetChar(writer_cast<xub_StrLen>(pF->nLCode-1)))
+         ImportFormulaControl(aFormula,pF->nSCode+pF->nLCode-1, WW8_CT_DROPDOWN);
+ 
+-    SwDropDownField aFld(
+-        (SwDropDownFieldType*)rDoc.GetSysFldType(RES_DROPDOWN));
+-
+-    aFld.SetName(aFormula.sTitle);
+-    aFld.SetHelp(aFormula.sHelp);
+-    aFld.SetToolTip(aFormula.sToolTip);
+-
+-    if (!aFormula.maListEntries.empty())
+-    {
+-        aFld.SetItems(aFormula.maListEntries);
+-        int nIndex = aFormula.fDropdownIndex  < aFormula.maListEntries.size()
+-            ? aFormula.fDropdownIndex : 0;
+-        aFld.SetSelectedItem(aFormula.maListEntries[nIndex]);
++    const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
++    sal_Bool bUseEnhFields=(pOpt && pOpt->IsUseEnhancedFields());
++
++    if (!bUseEnhFields) {
++	SwDropDownField aFld(
++	    (SwDropDownFieldType*)rDoc.GetSysFldType(RES_DROPDOWN));
++
++	aFld.SetName(aFormula.sTitle);
++	aFld.SetHelp(aFormula.sHelp);
++	aFld.SetToolTip(aFormula.sToolTip);
++	
++	if (!aFormula.maListEntries.empty())
++	{
++	    aFld.SetItems(aFormula.maListEntries);
++	    int nIndex = aFormula.fDropdownIndex  < aFormula.maListEntries.size()
++		? aFormula.fDropdownIndex : 0;
++	    aFld.SetSelectedItem(aFormula.maListEntries[nIndex]);
++	}
++	
++	rDoc.Insert(*pPaM, SwFmtFld(aFld), 0);
++	return FLD_OK;
++    } else {
++	//@TODO fix: copy pasting here!!!!!!!!!!!!!!
++	//REVIEW: don't let this throught.... sometime I forget to get rid of my proof of concept stuff. Please kindly remind me!!!!!
++
++	String aBookmarkName;
++	WW8PLCFx_Book* pB = pPlcxMan->GetBook();
++	if (pB!=NULL) {
++		WW8_CP currentCP=pF->nSCode;
++		WW8_CP currentLen=pF->nLen;
++
++		USHORT bkmFindIdx;
++		String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
++
++		if (aBookmarkFind.Len()>0) { 
++			pB->SetStatus(bkmFindIdx, BOOK_FIELD); // mark as consumed by field
++			if (aBookmarkFind.Len()>0) {
++				aBookmarkName=aBookmarkFind;
++			}
++		}
++	}
++
++	if (pB!=NULL && aBookmarkName.Len()==0) {
++		aBookmarkName=pB->GetUniqueBookmarkName(aFormula.sTitle);
++	}
++
++	if (aBookmarkName.Len()>0) {
++		SwFieldBookmark *pFieldmark=(SwFieldBookmark*)rDoc.makeBookmark(*pPaM, KeyCode(), aBookmarkName, String(), IDocumentBookmarkAccess::FORM_FIELDMARK_NO_TEXT);
++		ASSERT(pFieldmark!=NULL, "hmmm; why was the bookmark not created?");
++		if (pFieldmark!=NULL) {
++			pFieldmark->SetType(2); // 0==Checkbox
++//			pFieldmark->SetFFName(aFormula.sTitle);
++//			pFieldmark->SetFFHelpText(aFormula.sToolTip);
++//			pFieldmark->SetChecked(aFormula.nChecked!=0);
++			// set field data here...
++			std::vector<String>::iterator it=aFormula.maListEntries.begin();
++			for(;it!=aFormula.maListEntries.end();it++) {
++			    pFieldmark->addListItem(*it);
++			}
++			pFieldmark->setCurrentListItem(aFormula.fDropdownIndex);
++		}
++	}
++
++	return FLD_OK;
+     }
+ 
+-    rDoc.Insert(*pPaM, SwFmtFld(aFld), 0);
+-
+-    return FLD_OK;
+ }
+ 
+ void SwWW8ImplReader::DeleteFormImpl()
+@@ -1968,6 +2139,18 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
      if((aPic.lcb > 0x3A) && !pDataStream->GetError() )
      {
          pDataStream->Seek( nPicLocFc + aPic.cbHeader );
 +		int len=aPic.lcb-aPic.cbHeader;
 +		char *pBuf=(char*)malloc(len);
 +		pDataStream->Read( pBuf, len);
++#if 0 // some debug fun; remove this later...
++	static int _h=0;
++	char fname[255];
++	sprintf(fname, "data%03i.data", _h++);
++	FILE *out=fopen(fname, "wb");
++	fwrite(pBuf, len, 1, out);
++	fclose(out);
++#endif
 +        pDataStream->Seek( nPicLocFc + aPic.cbHeader );
          aFormula.FormulaRead(nWhich,pDataStream);
          bRet = true;
      }
 diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
-index 405d291..6877159 100644
+index c71044b..eca252a 100644
 --- sw/source/filter/ww8/ww8par5.cxx
 +++ sw/source/filter/ww8/ww8par5.cxx
-@@ -422,7 +422,7 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
+@@ -323,7 +323,7 @@ long SwWW8ImplReader::Read_Book(WW8PLCFManResult*)
      if (pB->GetIsEnd())
      {
          pReffedStck->SetAttr(*pPaM->GetPoint(), RES_FLTR_BOOKMARK, true,
@@ -2411,10 +2633,10 @@
      }
  
 diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
-index a10fd30..3e982c5 100644
+index 6050423..a9cdb03 100644
 --- sw/source/filter/ww8/ww8scan.cxx
 +++ sw/source/filter/ww8/ww8scan.cxx
-@@ -3954,7 +3954,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
+@@ -3951,7 +3951,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
  }
  
  WW8PLCFx_Book::WW8PLCFx_Book(SvStream* pTblSt, const WW8Fib& rFib)
@@ -2423,7 +2645,7 @@
  {
      if( !rFib.fcPlcfbkf || !rFib.lcbPlcfbkf || !rFib.fcPlcfbkl ||
          !rFib.lcbPlcfbkl || !rFib.fcSttbfbkmk || !rFib.lcbSttbfbkmk )
-@@ -4165,6 +4165,26 @@ String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
+@@ -4162,6 +4162,26 @@ String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
      return bFound ? aBookNames[i] : aEmptyStr;
  }
  
@@ -2451,10 +2673,10 @@
  {
      if( !pBook[0] || !pBook[1] )
 diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
-index a6a15c7..69d5303 100644
+index c20a112..b43ad9d 100644
 --- sw/source/filter/ww8/ww8scan.hxx
 +++ sw/source/filter/ww8/ww8scan.hxx
-@@ -732,7 +732,7 @@ public:
+@@ -707,7 +707,7 @@ public:
      bool GetPara(long nIdx, WW8FieldDesc& rF);
  };
  
@@ -2463,7 +2685,7 @@
  
  // Iterator for Booknotes
  class WW8PLCFx_Book : public WW8PLCFx
-@@ -743,6 +743,7 @@ private:
+@@ -718,6 +718,7 @@ private:
      eBookStatus* pStatus;
      long nIMax;                         // Number of Booknotes
      USHORT nIsEnd;
@@ -2471,7 +2693,7 @@
      
      //No copying
      WW8PLCFx_Book(const WW8PLCFx_Book&);
-@@ -769,6 +770,7 @@ public:
+@@ -744,6 +745,7 @@ public:
      bool MapName(String& rName);
      String GetBookmark(long nStart,long nEnd, USHORT &nIndex);
      eBookStatus GetStatus() const;
@@ -2480,12 +2702,12 @@
  
  /*
 diff --git a/sw/source/ui/docvw/edtwin.cxx b/sw/source/ui/docvw/edtwin.cxx
-index 382eff6..d8eebb6 100644
+index b288da4..1e57a48 100644
 --- sw/source/ui/docvw/edtwin.cxx
 +++ sw/source/ui/docvw/edtwin.cxx
-@@ -325,6 +325,9 @@
- #include <vcl/svapp.hxx>
- #endif
+@@ -152,6 +152,9 @@
+ #include "PostItMgr.hxx"
+ #include "postit.hxx"
  
 +#include <bookmrk.hxx>
 +#include <doc.hxx>
@@ -2493,7 +2715,7 @@
  //JP 11.10.2001: enable test code for bug fix 91313
  #if !defined( PRODUCT ) && (OSL_DEBUG_LEVEL > 1)
  //#define TEST_FOR_BUG91313
-@@ -1583,6 +1586,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
+@@ -1449,6 +1452,10 @@ void SwEditWin::KeyInput(const KeyEvent &rKEvt)
                         KS_Fly_Change, KS_Draw_Change,
                         KS_SpecialInsert,
                         KS_EnterCharCell,
@@ -2504,7 +2726,7 @@
                         KS_Ende };
  
  	SW_KeyState eKeyState = bIsDocReadOnly ? KS_CheckDocReadOnlyKeys
-@@ -1997,10 +2004,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
+@@ -1863,10 +1870,15 @@ KEYINPUT_CHECKTABLE_INSDEL:
  					}
                  case KEY_TAB:
  				{
@@ -2521,7 +2743,7 @@
  						!rSh.HasReadonlySel() )
                      {
                          // --> OD 2007-10-02 #b660435#
-@@ -2049,8 +2061,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
+@@ -1915,8 +1927,11 @@ KEYINPUT_CHECKTABLE_INSDEL:
  #ifdef SW_CRSR_TIMER
  					BOOL bOld = rSh.ChgCrsrTimerFlag( FALSE );
  #endif
@@ -2535,7 +2757,7 @@
                      {
                          // --> OD 2007-10-02 #b660435#
  //                        if (rSh.IsFirstOfNumRule()) // #i23725#
-@@ -2297,7 +2312,29 @@ KEYINPUT_CHECKTABLE_INSDEL:
+@@ -2180,7 +2195,37 @@ KEYINPUT_CHECKTABLE_INSDEL:
  			aCh = '\t';
  			// kein break!
  		case KS_InsChar:
@@ -2544,21 +2766,29 @@
 +		    SwFieldBookmark *fieldBM=rSh.IsInFormFieldBookmark(); //$flr refactor!!!
 +   		    ASSERT(fieldBM!=NULL, "Where is my FieldBookmark??");
 +		    if (fieldBM!=NULL) {
-+			fieldBM->SetChecked(!fieldBM->IsChecked());
-+			SwDocShell* pDocSh = rView.GetDocShell();
-+			SwDoc *pDoc=pDocSh->GetDoc();
-+			ASSERT(fieldBM->GetOtherPos()!=NULL, "where is the otherpos?");
-+			if (fieldBM->GetOtherPos()!=NULL) {
-+			    SwPaM aPaM(fieldBM->GetPos(), *fieldBM->GetOtherPos());
-+			    if (0) {
-+				rSh.StartAllAction();  //$flr TODO: understand why this not works
-+				pDoc->SetModified(aPaM);
-+				rSh.EndAllAction();
-+			    } else {
-+				rSh.CalcLayout(); // workaround
-+			    }
-+			}
-+			
++			switch (fieldBM->GetType()) {
++			    case 0: // TEXT
++				assert(0); // should not happen; since "TEXT" should never get CH_TXT_ATR_FORMELEMENT...
++				break;
++			    case 1: // CHECKBOX
++				fieldBM->SetChecked(!fieldBM->IsChecked());
++				fieldBM->invalidate();
++				rSh.InvalidateWindows(rView.GetVisArea());
++				break;
++			    case 2: // LIST
++				if (fieldBM && fieldBM->getListItems()>0) {
++				    int li=fieldBM->getCurrentListItem()+1;
++				    if (li>=fieldBM->getListItems()) {
++					li=0;
++				    }
++				    fieldBM->setCurrentListItem(li);
++				}
++				fieldBM->invalidate();
++				rSh.InvalidateWindows(rView.GetVisArea());
++				break;
++			    default:
++				break;				
++			}			
 +		    }
 +//		    rSh.Overwrite(String('X'));
 +		    eKeyState = KS_Ende;
@@ -2566,7 +2796,7 @@
  		{
  			BOOL bIsNormalChar = GetAppCharClass().isLetterNumeric(
  														String( aCh ), 0 );
-@@ -2406,6 +2443,24 @@ KEYINPUT_CHECKTABLE_INSDEL:
+@@ -2291,6 +2336,24 @@ KEYINPUT_CHECKTABLE_INSDEL:
                  nKS_NUMINDENTINC_Count = 2;
                  break;
  
@@ -2589,9 +2819,9 @@
 +	        break;
 +
              case KS_NumIndentDec:
-                 rSh.NumIndent(-360);
-                 break;
-@@ -4188,7 +4243,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
+                 // --> OD 2008-06-16 #i90078#
+                 rSh.ChangeIndentOfAllListLevels(-360);
+@@ -4094,7 +4157,8 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
  
                          SwContentAtPos aCntntAtPos( SwContentAtPos::SW_CLICKFIELD |
  													SwContentAtPos::SW_INETATTR |
@@ -2601,7 +2831,7 @@
  
  						if( rSh.GetContentAtPos( aDocPt, aCntntAtPos, TRUE ) )
  						{
-@@ -4209,7 +4265,16 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
+@@ -4115,7 +4179,34 @@ void SwEditWin::MouseButtonUp(const MouseEvent& rMEvt)
                                      if ( bExecSmarttags && SwSmartTagMgr::Get().IsSmartTagsEnabled() )
                                          rView.ExecSmartTagPopup( aDocPt );
                              }
@@ -2611,82 +2841,300 @@
 +				ASSERT( aCntntAtPos.aFnd.pFldBookmark!=NULL, "where is my field ptr???");
 +				if ( aCntntAtPos.aFnd.pFldBookmark!=NULL) {
 +				    SwFieldBookmark *fieldBM=const_cast<SwFieldBookmark *>(aCntntAtPos.aFnd.pFldBookmark);
-+				    fieldBM->SetChecked(!fieldBM->IsChecked());
-+				    rSh.CalcLayout(); // workaround; is there a better way to update/invalidate???
++				    SwDocShell* pDocSh = rView.GetDocShell();
++				    SwDoc *pDoc=pDocSh->GetDoc();
++				    switch(fieldBM->GetType()) {
++					case 0: // Text
++					    assert(0); // should not happend; a "text" has not SW_FORMCTRL content pos...
++					    break;
++					case 1: // CheckBox
++					    fieldBM->SetChecked(!fieldBM->IsChecked());
++					    fieldBM->invalidate();
++					    rSh.InvalidateWindows(rView.GetVisArea());
++					    break;
++					case 2: // List
++					    rView.ExecFieldPopup( aDocPt, fieldBM );
++					    fieldBM->invalidate();
++					    rSh.InvalidateWindows(rView.GetVisArea());
++					    break;
++					default: 
++					    break;
++				    }
++
 +				}
 +			    }
 +			    else // if ( SwContentAtPos::SW_INETATTR == aCntntAtPos.eCntntAtPos )
  							{
                                  if ( bExecHyperlinks )
                                      rSh.ClickToINetAttr( *(SwFmtINetFmt*)aCntntAtPos.aFnd.pAttr, nFilter );
+diff --git a/sw/source/ui/inc/view.hxx b/sw/source/ui/inc/view.hxx
+index dc74558..1fe66b1 100644
+--- sw/source/ui/inc/view.hxx
++++ sw/source/ui/inc/view.hxx
+@@ -93,6 +93,7 @@ struct SwConversionArgs;
+ class Graphic;
+ class GraphicFilter;
+ class SwPostItMgr;
++class SwFieldBookmark;
+ 	
+ namespace com{ namespace sun { namespace star {
+ 	namespace view{ class XSelectionSupplier; }
+@@ -463,6 +464,7 @@ public:
+ 	DECL_LINK( SpellError, LanguageType * );
+ 	BOOL 			ExecSpellPopup( const Point& rPt );
+ 
++        BOOL            ExecFieldPopup( const Point& rPt, SwFieldBookmark *fieldBM );
+     // SMARTTAGS
+     BOOL            ExecSmartTagPopup( const Point& rPt );
+ 
 diff --git a/sw/source/ui/inc/wrtsh.hxx b/sw/source/ui/inc/wrtsh.hxx
-index f20d199..c51f15b 100644
+index a4273e5..e4ee381 100644
 --- sw/source/ui/inc/wrtsh.hxx
 +++ sw/source/ui/inc/wrtsh.hxx
-@@ -429,6 +429,8 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
- 	BOOL GoNextBookmark(); // TRUE, wenn's noch eine gab
- 	BOOL GoPrevBookmark();
+@@ -415,6 +415,8 @@ typedef BOOL (SwWrtShell:: *FNSimpleMove)();
+ 
+ 	BOOL GotoField( const SwFmtFld& rFld );
  
 +        bool GotoFieldBookmark(SwBookmark *pBkmk);
 +
  	// jump to the next / previous hyperlink - inside text and also
  	// on graphics
  	BOOL SelectNextPrevHyperlink( BOOL bNext = TRUE );
+diff --git a/sw/source/ui/uiview/viewling.cxx b/sw/source/ui/uiview/viewling.cxx
+index 9d89f6b..894b3c1 100644
+--- sw/source/ui/uiview/viewling.cxx
++++ sw/source/ui/uiview/viewling.cxx
+@@ -101,6 +101,7 @@
+ #include <svx/dialogs.hrc>
+ 
+ #include <unomid.h>
++#include <bookmrk.hxx>
+ 
+ using namespace ::com::sun::star;
+ using namespace ::com::sun::star::beans;
+@@ -798,3 +799,143 @@ sal_Bool SwView::ExecSmartTagPopup( const Point& rPt )
+     return bRet;
+ }
+ 
++class SwFieldPopup : public PopupMenu
++{
++public:
++    SwFieldPopup()  {
++	InsertItem(1, ::rtl::OUString::createFromAscii("Hello"));
++    }
++};
++
++class SwFieldListBox : public ListBox
++{
++public:
++    SwFieldListBox(Window* pParent) : ListBox(pParent /*, WB_DROPDOWN*/) {
++    }
++
++    void *GetImplWin() {
++	return NULL; //FIXME!!!
++//	return mpImplWin;
++    }
++
++protected:
++    virtual void LoseFocus() {
++//	printf("ListBox: lose focus!!\n");
++	ListBox::LoseFocus();
++    }    
++
++    virtual void Select() {
++//	printf("SELECT!!! IsTravelSelect=%i\n", IsTravelSelect());
++	ListBox::Select();
++    }
++};
++
++class SwFieldDialog : public Dialog
++{
++private:
++    SwFieldListBox aListBox;
++    Edit aText;
++    int selection;
++
++    DECL_LINK( MyListBoxHandler, ListBox * );
++
++public:
++    SwFieldDialog(Window* parent, SwFieldBookmark *fieldBM) : Dialog(parent, WB_BORDER | WB_SYSTEMWINDOW | WB_NOSHADOW ), aListBox(this), aText(this, WB_RIGHT | WB_READONLY), selection(-1) {
++
++	assert(fieldBM!=NULL);
++	if (fieldBM!=NULL) {
++	    int listitems=fieldBM->getListItems();
++	    for(int i=0;i<listitems;i++) {
++		aListBox.InsertEntry(fieldBM->getListItem(i));
++	    }
++	}
++/*
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXY"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("Hello"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("World"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("Red"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("Green"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("Blue"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("Pink"));
++	aListBox.InsertEntry(::rtl::OUString::createFromAscii("Orange"));
++*/
++//	aListBox.SetPosPixel(Size(0, 0));
++	Size lbSize=aListBox.GetOptimalSize(WINDOWSIZE_PREFERRED);
++	lbSize.Width()+=50;
++	lbSize.Height()+=20;
++	aListBox.SetSizePixel(lbSize);
++	aListBox.SetSelectHdl( LINK( this, SwFieldDialog, MyListBoxHandler ) );
++	aListBox.Show();
++	aText.SetText(rtl::OUString::createFromAscii("Cancel"));
++	Size tSize=aText.GetOptimalSize(WINDOWSIZE_PREFERRED);
++	aText.SetSizePixel(Size(lbSize.Width(), tSize.Height()));
++	aText.SetPosPixel(Point(0, lbSize.Height()));     	
++	aText.Show();
++	SetSizePixel(Size(lbSize.Width(), lbSize.Height()+tSize.Height()));	
++//	SetSizePixel(Size(200, 200));
++    }
++
++    int getSelection() {
++	return selection;
++    }
++protected:
++    /*
++    virtual void LoseFocus() {
++	printf("lose focus!!\n");
++	Dialog::LoseFocus();
++	printf("close:\n");
++	EndDialog(8);
++    }
++    */
++
++    virtual long PreNotify( NotifyEvent& rNEvt ) {
++	if (rNEvt.GetType() == EVENT_LOSEFOCUS && aListBox.GetImplWin()==rNEvt.GetWindow()) {
++	    EndDialog(8);
++	    return 1;	   
++	}
++	if (rNEvt.GetType() == EVENT_KEYINPUT) {
++//	    printf("PreNotify::KEYINPUT\n");
++	}
++	return Dialog::PreNotify(rNEvt);
++    }
++};
++
++IMPL_LINK( SwFieldDialog, MyListBoxHandler, ListBox *, pBox )
++{
++//    printf("### DROP DOWN SELECT... IsTravelSelect=%i\n", pBox->IsTravelSelect());
++    if (pBox->IsTravelSelect()) {
++	return 0;
++    } else {
++	this->selection=pBox->GetSelectEntryPos();
++	EndDialog(9); //@TODO have meaningfull returns...
++	return 1;
++    }
++}
++
++
++BOOL SwView::ExecFieldPopup( const Point& rPt, SwFieldBookmark *fieldBM )
++{
++    sal_Bool bRet = sal_False;
++    const sal_Bool bOldViewLock = pWrtShell->IsViewLocked();
++    pWrtShell->LockView( sal_True );
++    pWrtShell->Push();
++
++    {
++	bRet=sal_True;
++	const Point aPixPos = GetEditWin().LogicToPixel( rPt );
++
++	SwFieldDialog aFldDlg(pEditWin, fieldBM);
++	aFldDlg.SetPosPixel(pEditWin->OutputToScreenPixel(aPixPos));
++
++	short ret=aFldDlg.Execute();
++	int selection=aFldDlg.getSelection();
++	if (selection>=0) {
++	    fieldBM->setCurrentListItem((unsigned int)selection);
++	}
++    }
++
++    pWrtShell->Pop( sal_False );
++    pWrtShell->LockView( bOldViewLock );
++
++    return bRet;
++}
 diff --git a/sw/source/ui/uno/SwXDocumentSettings.cxx b/sw/source/ui/uno/SwXDocumentSettings.cxx
-index 70c570e..661cc1b 100644
+index 1240531..d187c0e 100644
 --- sw/source/ui/uno/SwXDocumentSettings.cxx
 +++ sw/source/ui/uno/SwXDocumentSettings.cxx
-@@ -160,7 +160,8 @@ enum SwDocumentSettingsPropertyHandles
-     HANDLE_CLIP_AS_CHARACTER_ANCHORED_WRITER_FLY_FRAMES,
+@@ -127,6 +127,7 @@ enum SwDocumentSettingsPropertyHandles
      HANDLE_UNIX_FORCE_ZERO_EXT_LEADING,
      HANDLE_USE_OLD_PRINTER_METRICS,
--    HANDLE_TABS_RELATIVE_TO_INDENT
-+    HANDLE_TABS_RELATIVE_TO_INDENT,
-+    HANDLE_PROTECT_FORM
- };
- 
- MasterPropertySetInfo * lcl_createSettingsInfo()
-@@ -211,6 +212,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
+     HANDLE_TABS_RELATIVE_TO_INDENT,
++    HANDLE_PROTECT_FORM,
+     // --> OD 2008-06-05 #i89181#
+     HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST
+     // <--
+@@ -180,6 +181,7 @@ MasterPropertySetInfo * lcl_createSettingsInfo()
          { RTL_CONSTASCII_STRINGPARAM("UnxForceZeroExtLeading"), HANDLE_UNIX_FORCE_ZERO_EXT_LEADING, CPPUTYPE_BOOLEAN, 0, 0},
          { RTL_CONSTASCII_STRINGPARAM("UseOldPrinterMetrics"), HANDLE_USE_OLD_PRINTER_METRICS, CPPUTYPE_BOOLEAN, 0, 0},
          { RTL_CONSTASCII_STRINGPARAM("TabsRelativeToIndent"), HANDLE_TABS_RELATIVE_TO_INDENT, CPPUTYPE_BOOLEAN, 0, 0},
-+        { RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0},
++	{ RTL_CONSTASCII_STRINGPARAM("ProtectForm"), HANDLE_PROTECT_FORM, CPPUTYPE_BOOLEAN, 0, 0},
+         // --> OD 2008-06-05 #i89181#
+         { RTL_CONSTASCII_STRINGPARAM("TabAtLeftIndentForParagraphsInList"), HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST, CPPUTYPE_BOOLEAN, 0, 0},
  
- /*
-  * As OS said, we don't have a view when we need to set this, so I have to
-@@ -691,6 +693,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
+@@ -662,6 +664,12 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
              mpDoc->set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, bTmp);
          }
          break;
-+        case HANDLE_PROTECT_FORM:
++	case HANDLE_PROTECT_FORM:
 +        {
-+            sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
-+            mpDoc->set(IDocumentSettingAccess::PROTECT_FORM, bTmp);
-+        }
-+        break;
-         default:
- 			throw UnknownPropertyException();
- 	}
-@@ -990,6 +998,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
++	    sal_Bool bTmp = *(sal_Bool*)rValue.getValue();
++	    mpDoc->set(IDocumentSettingAccess::PROTECT_FORM, bTmp);
++	}
++	break;
+         // --> OD 2008-06-05 #i89181#
+         case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
+         {
+@@ -983,7 +991,12 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
              rValue.setValue( &bTmp, ::getBooleanCppuType() );
          }
          break;
+-        // --> OD 2008-06-05 #i89181#
 +        case HANDLE_PROTECT_FORM:
-+        {
-+            sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::PROTECT_FORM);
-+            rValue.setValue( &bTmp, ::getBooleanCppuType() );
-+        }
-+        break;
++	{
++             sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::PROTECT_FORM);
++             rValue.setValue( &bTmp, ::getBooleanCppuType() );
++	}
++	break;        // --> OD 2008-06-05 #i89181#
+         case HANDLE_TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST:
+         {
+             sal_Bool bTmp = mpDoc->get(IDocumentSettingAccess::TAB_AT_LEFT_INDENT_FOR_PARA_IN_LIST);
+diff --git a/sw/source/ui/wrtsh/wrtsh1.cxx b/sw/source/ui/wrtsh/wrtsh1.cxx
+index 18c8feb..e7caf1b 100644
+--- sw/source/ui/wrtsh/wrtsh1.cxx
++++ sw/source/ui/wrtsh/wrtsh1.cxx
+@@ -1706,6 +1706,12 @@ SwWrtShell::SwWrtShell( SwDoc& rDoc, Window *_pWin, SwView &rShell,
+ 	SET_CURR_SHELL( this );
+ 	SetSfxViewShell( (SfxViewShell *)&rShell );
+ 	SetFlyMacroLnk( LINK(this, SwWrtShell, ExecFlyMac) );
++
++	// place the cursor on the first field...
++	SwBookmark *pBM=NULL;
++	if (IsFormProtected() && (pBM=GetNextFieldBookmark())!=NULL) {
++	    GotoFieldBookmark(pBM);
++	}
+ }
  
-         default:
- 			throw UnknownPropertyException();
+ /*
 diff --git a/sw/source/ui/wrtsh/wrtsh3.cxx b/sw/source/ui/wrtsh/wrtsh3.cxx
-index dde13db..2825119 100644
+index 79f165b..183ae92 100644
 --- sw/source/ui/wrtsh/wrtsh3.cxx
 +++ sw/source/ui/wrtsh/wrtsh3.cxx
-@@ -117,6 +117,24 @@ BOOL SwWrtShell::MoveBookMark(  BookMarkMove eFuncId,
- }
+@@ -51,6 +51,7 @@
+ #include "bookmrk.hxx"
+ #include "doc.hxx"
+ #include "wrtsh.hrc"
++#include "docsh.hxx"
  
+ #include <unomid.h>
+ 
+@@ -109,6 +110,25 @@ BOOL SwWrtShell::GotoField( const SwFmtFld& rFld )
+ 	return bRet;
+ }
  
 +bool SwWrtShell::GotoFieldBookmark(SwBookmark *pBkmk)
 +{
@@ -2706,6 +3154,7 @@
 +    return bRet;
 +}
 +
++
  /*--------------------------------------------------------------------
      Beschreibung: FontWork-Slots invalidieren
   --------------------------------------------------------------------*/

Modified: branches/ooo-build-3-0/patches/dev300/xmloff-field-patch.diff
==============================================================================
--- branches/ooo-build-3-0/patches/dev300/xmloff-field-patch.diff	(original)
+++ branches/ooo-build-3-0/patches/dev300/xmloff-field-patch.diff	Thu Sep  4 12:41:36 2008
@@ -1,8 +1,8 @@
 diff --git a/xmloff/inc/xmlnmspe.hxx b/xmloff/inc/xmlnmspe.hxx
-index 2a8a556..f50a123 100644
+index 69dac26..cc17d30 100644
 --- xmloff/inc/xmlnmspe.hxx
 +++ xmloff/inc/xmlnmspe.hxx
-@@ -98,4 +98,8 @@ XML_OLD_NAMESPACE( TEXT,	4U )
+@@ -93,4 +93,8 @@ XML_OLD_NAMESPACE( TEXT,	4U )
  XML_OLD_NAMESPACE( TABLE,	5U )
  XML_OLD_NAMESPACE( META,	6U )
  
@@ -12,12 +12,12 @@
 +
  #endif	//  _XMLOFF_XMLNMSPE_HXX
 diff --git a/xmloff/inc/xmloff/txtimp.hxx b/xmloff/inc/xmloff/txtimp.hxx
-index e11a34b..97e8b6b 100644
+index cd7001a..10848b6 100644
 --- xmloff/inc/xmloff/txtimp.hxx
 +++ xmloff/inc/xmloff/txtimp.hxx
-@@ -78,6 +78,11 @@
- #include <xmloff/uniref.hxx>
- #endif
+@@ -51,6 +51,11 @@
+ class XMLTextListsHelper;
+ // <--
  
 +#ifndef _COM_SUN_STAR_TEXT_XFORMFIELD_HPP_
 +#include <com/sun/star/text/XFormField.hpp>
@@ -27,7 +27,7 @@
  class SvXMLImport;
  class SvXMLStylesContext;
  class XMLTextListBlockContext;
-@@ -265,6 +270,11 @@ enum XMLTextPElemTokens
+@@ -238,6 +243,11 @@ enum XMLTextPElemTokens
  	XML_TOK_DRAW_DATE_TIME,
  	XML_TOK_TEXT_PAGE_CONTINUATION,
  
@@ -39,16 +39,16 @@
  	XML_TOK_TEXT_P_ELEM_END=XML_TOK_UNKNOWN
  };
  
-@@ -418,6 +428,8 @@ class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase
- 				::com::sun::star::uno::Reference<
- 					::com::sun::star::text::XTextRange>,
+@@ -404,6 +414,8 @@ class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase
+                         ::com::sun::star::text::XTextRange>,
+                     ::rtl::OUString>,
                  ::comphelper::UStringLess> aBookmarkStartRanges;
 +	typedef ::std::vector< ::rtl::OUString> BookmarkVector_t;
 +	BookmarkVector_t aBookmarkVector;
  
  	/// backpatcher for references to footnotes and endnotes
  	XMLPropertyBackpatcher<sal_Int16> * pFootnoteBackpatcher;
-@@ -484,6 +496,14 @@ class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase
+@@ -468,6 +480,14 @@ class XMLOFF_DLLPUBLIC XMLTextImportHelper : public UniRefBase
  	// Code is implemented in XMLPropertyBackpatcher.cxx
  	SAL_DLLPRIVATE void _FinitBackpatcher();
  
@@ -63,9 +63,9 @@
  protected:
  	virtual SvXMLImportContext *CreateTableChildContext(
  				SvXMLImport& rImport,
-@@ -754,6 +774,18 @@ public:
- 				::com::sun::star::text::XTextRange> & rRange,
- 		const ::rtl::OUString sName);
+@@ -745,6 +765,18 @@ public:
+ 				::com::sun::star::text::XTextRange> & o_rRange,
+         ::rtl::OUString& o_rXmlId);
  
 +	::rtl::OUString FindActiveBookmarkName();
 +	::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > GetRangeFor(::rtl::OUString &sName);
@@ -83,10 +83,10 @@
  	/// Also fixup open references from the backpatch list to this ID.
  	// Code is implemented in XMLPropertyBackpatcher.cxx
 diff --git a/xmloff/inc/xmloff/txtparae.hxx b/xmloff/inc/xmloff/txtparae.hxx
-index cf4e870..04b01f6 100644
+index 588952e..5e56e13 100644
 --- xmloff/inc/xmloff/txtparae.hxx
 +++ xmloff/inc/xmloff/txtparae.hxx
-@@ -231,7 +231,9 @@ protected:
+@@ -214,7 +214,9 @@ protected:
  	const ::rtl::OUString sVisitedCharStyleName;
  	const ::rtl::OUString sWidth;
  	const ::rtl::OUString sWidthType;
@@ -98,49 +98,48 @@
  	SinglePropertySetInfoCache aCharStyleNamesPropInfoCache;
  
 diff --git a/xmloff/inc/xmloff/xmltoken.hxx b/xmloff/inc/xmloff/xmltoken.hxx
-index 3b131f7..574a984 100644
+index f03fba5..ea7854e 100644
 --- xmloff/inc/xmloff/xmltoken.hxx
 +++ xmloff/inc/xmloff/xmltoken.hxx
-@@ -2994,6 +2994,13 @@ namespace xmloff { namespace token {
+@@ -3005,7 +3005,12 @@ namespace xmloff { namespace token {
          XML_CHARACTER_SET,
          XML_APPLICATION_CONNECTION_SETTINGS,
          XML_TABLE_INCLUDE_FILTER,
-+
+-		XML_DEFAULT_ROW_STYLE_NAME,
 +        XML_FIELDMARK, 
 +        XML_FIELDMARK_START, 
 +        XML_FIELDMARK_END, 
 +        XML_N_FIELD, 
 +        XML_NP_FIELD, 
-+	
- 		XML_TOKEN_END
-     };
- 
++	XML_DEFAULT_ROW_STYLE_NAME,
+         XML_ANGLE_OFFSET,
+         // --> OD 2007-09-14 #i81002#
+         XML_NUMBER_NO_SUPERIOR,
 diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
-index 8870e3a..bacaf3b 100644
+index d164a7c..1c3f4b1 100644
 --- xmloff/source/core/xmlexp.cxx
 +++ xmloff/source/core/xmlexp.cxx
-@@ -216,6 +216,8 @@
- #include "xformsexport.hxx"
- #endif
+@@ -106,6 +106,7 @@
+ 
+ #include <com/sun/star/rdf/XMetadatable.hpp>
  
 +#include <assert.h>
-+
- using namespace ::rtl;
- using namespace ::osl;
- using namespace ::com::sun::star;
-@@ -400,6 +402,7 @@ void SvXMLExport::_InitCtor()
+ 
+ using ::rtl::OUString;
+ 
+@@ -306,6 +307,7 @@ void SvXMLExport::_InitCtor()
  		mpNamespaceMap->Add( GetXMLToken(XML_NP_XFORMS_1_0), GetXMLToken(XML_N_XFORMS_1_0), XML_NAMESPACE_XFORMS );
  		mpNamespaceMap->Add( GetXMLToken(XML_NP_XSD), GetXMLToken(XML_N_XSD), XML_NAMESPACE_XSD );
  		mpNamespaceMap->Add( GetXMLToken(XML_NP_XSI), GetXMLToken(XML_N_XSI), XML_NAMESPACE_XSI );
 +		mpNamespaceMap->Add( GetXMLToken(XML_NP_FIELD), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
  	}
- 
- 	mxAttrList = (xml::sax::XAttributeList*)mpAttrList;
+ 	if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
+ 	{
 diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
-index 326703e..f01cd9b 100644
+index 3d25e07..bc3f69a 100644
 --- xmloff/source/core/xmlimp.cxx
 +++ xmloff/source/core/xmlimp.cxx
-@@ -191,6 +191,7 @@ sal_Char __READONLY_DATA sXML_np__db[] = "_db";
+@@ -114,6 +114,7 @@ sal_Char __READONLY_DATA sXML_np__db[] = "_db";
  sal_Char __READONLY_DATA sXML_np__xforms[] = "_xforms";
  sal_Char __READONLY_DATA sXML_np__xsd[] = "_xsd";
  sal_Char __READONLY_DATA sXML_np__xsi[] = "_xsi";
@@ -148,254 +147,356 @@
  
  sal_Char __READONLY_DATA sXML_np__fo_old[] = "__fo";
  sal_Char __READONLY_DATA sXML_np__xlink_old[] = "__xlink";
-@@ -354,6 +355,7 @@ void SvXMLImport::_InitCtor()
+@@ -294,8 +295,9 @@ void SvXMLImport::_InitCtor()
                              XML_NAMESPACE_XFORMS );
  		mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__ooow ) ), GetXMLToken(XML_N_OOOW), XML_NAMESPACE_OOOW );
  		mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__oooc ) ), GetXMLToken(XML_N_OOOC), XML_NAMESPACE_OOOC );
-+		mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__field ) ), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
+-		mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__of ) ),
+-                            GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
++		mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__of ) ),  GetXMLToken(XML_N_OF), XML_NAMESPACE_OF );
++	        mpNamespaceMap->Add( OUString( RTL_CONSTASCII_USTRINGPARAM ( sXML_np__field ) ), GetXMLToken(XML_N_FIELD), XML_NAMESPACE_FIELD );
++		    
  	}
  
  	msPackageProtocol = OUString( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) );
 diff --git a/xmloff/source/core/xmltoken.cxx b/xmloff/source/core/xmltoken.cxx
-index 94fca7a..b30f6cf 100644
+index 323d59b..29be41c 100644
 --- xmloff/source/core/xmltoken.cxx
 +++ xmloff/source/core/xmltoken.cxx
-@@ -2994,6 +2994,11 @@ namespace xmloff { namespace token {
+@@ -3005,6 +3005,11 @@ namespace xmloff { namespace token {
          TOKEN( "character-set",         XML_CHARACTER_SET ),
          TOKEN( "application-connection-settings",         XML_APPLICATION_CONNECTION_SETTINGS ),
          TOKEN( "table-include-filter",         XML_TABLE_INCLUDE_FILTER ),
-+        TOKEN( "fieldmark",             XML_FIELDMARK ),
-+        TOKEN( "fieldmark-start",       XML_FIELDMARK_START ),
-+        TOKEN( "fieldmark-end",         XML_FIELDMARK_END ),
-+        TOKEN( "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:field:1.0",   XML_N_FIELD ),
++	TOKEN( "fieldmark",             XML_FIELDMARK ),
++	TOKEN( "fieldmark-start",       XML_FIELDMARK_START ),
++	TOKEN( "fieldmark-end",         XML_FIELDMARK_END ),
++	TOKEN( "urn:openoffice:names:experimental:ooxml-odf-interop:xmlns:field:1.0",   XML_N_FIELD ),
 +        TOKEN( "field",         XML_NP_FIELD ),
- #if OSL_DEBUG_LEVEL > 0
-         { 0, NULL, NULL,                       XML_TOKEN_END }
- #else
+         TOKEN( "default-row-style-name", XML_DEFAULT_ROW_STYLE_NAME),
+         TOKEN( "angle-offset",          XML_ANGLE_OFFSET ),
+         // --> OD 2007-09-14 #i81002#
 diff --git a/xmloff/source/text/XMLTextMarkImportContext.cxx b/xmloff/source/text/XMLTextMarkImportContext.cxx
-index 8a7add5..c34071f 100644
+index 3feae43..c421300 100644
 --- xmloff/source/text/XMLTextMarkImportContext.cxx
 +++ xmloff/source/text/XMLTextMarkImportContext.cxx
-@@ -88,6 +88,10 @@
+@@ -49,7 +49,7 @@
+ #include <com/sun/star/beans/XPropertySet.hpp>
+ #include <com/sun/star/lang/XMultiServiceFactory.hpp>
  #include <com/sun/star/container/XNamed.hpp>
- #endif
- 
-+#ifndef _COM_SUN_STAR_TEXT_XFORMFIELD_HPP_
+-
 +#include <com/sun/star/text/XFormField.hpp>
-+#endif
-+
  
- using namespace ::rtl;
- using namespace ::com::sun::star::text;
-@@ -97,7 +101,50 @@ using namespace ::com::sun::star::lang;
- using namespace ::com::sun::star::container;
+ using ::rtl::OUString;
+ using ::rtl::OUStringBuffer;
+@@ -62,6 +62,49 @@ using namespace ::com::sun::star::container;
  using namespace ::com::sun::star::xml::sax;
  using namespace ::xmloff::token;
--	
-+
+ 
 +
++ 
 +XMLFieldParamImportContext::XMLFieldParamImportContext(
-+	SvXMLImport& rImport, 
-+	XMLTextImportHelper& rHlp,
-+	sal_uInt16 nPrefix,
-+	const OUString& rLocalName ) :
-+		SvXMLImportContext(rImport, nPrefix, rLocalName),
-+		rHelper(rHlp)
++    SvXMLImport& rImport, 
++    XMLTextImportHelper& rHlp,
++    sal_uInt16 nPrefix,
++    const OUString& rLocalName ) :
++    SvXMLImportContext(rImport, nPrefix, rLocalName),
++    rHelper(rHlp)
 +{
 +}
 +
 +
 +void XMLFieldParamImportContext::StartElement(const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList> & xAttrList)
 +{
-+	SvXMLImport& rImport = GetImport();
-+	::rtl::OUString sName;
-+	::rtl::OUString sValue;
-+
-+	sal_Int16 nLength = xAttrList->getLength();
-+	for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
++    SvXMLImport& rImport = GetImport();
++    ::rtl::OUString sName;
++    ::rtl::OUString sValue;
++    
++    sal_Int16 nLength = xAttrList->getLength();
++    for(sal_Int16 nAttr = 0; nAttr < nLength; nAttr++)
++    {
++	OUString sLocalName;
++	sal_uInt16 nPrefix = rImport.GetNamespaceMap().
++	    GetKeyByAttrName( xAttrList->getNameByIndex(nAttr), 
++			      &sLocalName );
++	
++	if ( (XML_NAMESPACE_FIELD == nPrefix) &&
++	     IsXMLToken(sLocalName, XML_NAME)   )
 +	{
-+		OUString sLocalName;
-+		sal_uInt16 nPrefix = rImport.GetNamespaceMap().
-+			GetKeyByAttrName( xAttrList->getNameByIndex(nAttr), 
-+							  &sLocalName );
-+
-+		if ( (XML_NAMESPACE_FIELD == nPrefix) &&
-+			 IsXMLToken(sLocalName, XML_NAME)   )
-+		{
-+			sName = xAttrList->getValueByIndex(nAttr);
-+		}
-+		if ( (XML_NAMESPACE_FIELD == nPrefix) &&
-+			 IsXMLToken(sLocalName, XML_VALUE)   )
-+		{
-+			sValue = xAttrList->getValueByIndex(nAttr);
-+		}
++	    sName = xAttrList->getValueByIndex(nAttr);
 +	}
-+	if (rHelper.hasCurrentFieldCtx() && sName.getLength()>0) {
-+		rHelper.addFieldParam(sName, sValue);
++	if ( (XML_NAMESPACE_FIELD == nPrefix) &&
++	     IsXMLToken(sLocalName, XML_VALUE)   )
++	{
++	    sValue = xAttrList->getValueByIndex(nAttr);
 +	}
++    }
++    if (rHelper.hasCurrentFieldCtx() && sName.getLength()>0) {
++	rHelper.addFieldParam(sName, sValue);
++    }
 +}
 +
-+
  TYPEINIT1( XMLTextMarkImportContext, SvXMLImportContext);
  
  XMLTextMarkImportContext::XMLTextMarkImportContext(
-@@ -111,7 +158,9 @@ XMLTextMarkImportContext::XMLTextMarkImportContext(
+@@ -75,7 +118,8 @@ XMLTextMarkImportContext::XMLTextMarkImportContext(
  }
  
  enum lcl_MarkType { TypeReference, TypeReferenceStart, TypeReferenceEnd,
 -					TypeBookmark, TypeBookmarkStart, TypeBookmarkEnd };
-+					TypeBookmark, TypeBookmarkStart, TypeBookmarkEnd,
-+					TypeFieldmark, TypeFieldmarkStart, TypeFieldmarkEnd,
-+				  };
++		    TypeBookmark, TypeBookmarkStart, TypeBookmarkEnd,
++		    TypeFieldmark, TypeFieldmarkStart, TypeFieldmarkEnd};
  
  static SvXMLEnumMapEntry __READONLY_DATA lcl_aMarkTypeMap[] =
  {
-@@ -121,21 +170,45 @@ static SvXMLEnumMapEntry __READONLY_DATA lcl_aMarkTypeMap[] =
+@@ -85,109 +129,177 @@ static SvXMLEnumMapEntry __READONLY_DATA lcl_aMarkTypeMap[] =
  	{ XML_BOOKMARK,				    TypeBookmark },
  	{ XML_BOOKMARK_START,			TypeBookmarkStart },
  	{ XML_BOOKMARK_END,			    TypeBookmarkEnd },
-+	{ XML_FIELDMARK,				TypeFieldmark },
-+	{ XML_FIELDMARK_START,			TypeFieldmarkStart },
-+	{ XML_FIELDMARK_END,			 TypeFieldmarkEnd },
++ 	{ XML_FIELDMARK,				TypeFieldmark },
++ 	{ XML_FIELDMARK_START,			TypeFieldmarkStart },
++ 	{ XML_FIELDMARK_END,			 TypeFieldmarkEnd },
  	{ XML_TOKEN_INVALID,    		0 },
  };
  
  void XMLTextMarkImportContext::StartElement(
  	const Reference<XAttributeList> & xAttrList)
  {
-+	if (!FindName(GetImport(), xAttrList, sBookmarkName, &sFieldName)) {
-+		sBookmarkName=OUString();
-+	}
-+
-+	if (IsXMLToken(GetLocalName(), XML_FIELDMARK_END)) {
-+		sBookmarkName=rHelper.FindActiveBookmarkName();
-+	} 
-+	if (IsXMLToken(GetLocalName(), XML_FIELDMARK_START) || IsXMLToken(GetLocalName(), XML_FIELDMARK)) {
-+		if (sBookmarkName.getLength()==0) {
-+			sBookmarkName=::rtl::OUString::createFromAscii("Unknown");
-+		}
-+		rHelper.pushFieldCtx( sBookmarkName, sFieldName );
+-	const OUString sAPI_reference_mark(
+-		RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ReferenceMark"));
+-	const OUString sAPI_bookmark(
+-		RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark"));
+-
+-
+-	OUString sName;
+-	OUString sXmlId;
++    if (!FindName(GetImport(), xAttrList, sBookmarkName, sXmlId, &sFieldName)) {
++	sBookmarkName=OUString();
++    }
++    
++    if (IsXMLToken(GetLocalName(), XML_FIELDMARK_END)) {
++	sBookmarkName=rHelper.FindActiveBookmarkName();
++    } 
++    if (IsXMLToken(GetLocalName(), XML_FIELDMARK_START) || IsXMLToken(GetLocalName(), XML_FIELDMARK)) {
++	if (sBookmarkName.getLength()==0) {
++	    sBookmarkName=::rtl::OUString::createFromAscii("Unknown");
 +	}
-+
++	rHelper.pushFieldCtx( sBookmarkName, sFieldName );
++    }
 +}
-+
++    
+ 
+-	if (FindName(GetImport(), xAttrList, sName, sXmlId))
 +void XMLTextMarkImportContext::EndElement()
 +{
-+	SvXMLImportContext::EndElement();
++    SvXMLImportContext::EndElement();
++    const OUString sAPI_reference_mark(
++	RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ReferenceMark"));
++     const OUString sAPI_bookmark(
++	RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark"));
++    const OUString sAPI_fieldmark(
++	RTL_CONSTASCII_USTRINGPARAM("org.go-oo.text.Fieldmark"));
++    const OUString sAPI_formfieldmark(
++	RTL_CONSTASCII_USTRINGPARAM("org.go-oo.text.FormFieldmark"));
 +
- 	const OUString sAPI_reference_mark(
- 		RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.ReferenceMark"));
- 	const OUString sAPI_bookmark(
- 		RTL_CONSTASCII_USTRINGPARAM("com.sun.star.text.Bookmark"));
-+	const OUString sAPI_fieldmark(
-+		RTL_CONSTASCII_USTRINGPARAM("org.go-oo.text.Fieldmark"));
-+	const OUString sAPI_formfieldmark(
-+		RTL_CONSTASCII_USTRINGPARAM("org.go-oo.text.FormFieldmark"));
- 
--
--	OUString sName;
--
--	if (FindName(GetImport(), xAttrList, sName))
-+	if (sBookmarkName.getLength()>0) 
++    
++    if (sBookmarkName.getLength()>0)
  	{
- 		sal_uInt16 nTmp;
- 		if (SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(), 
-@@ -147,30 +220,49 @@ void XMLTextMarkImportContext::StartElement(
- 					// export point reference mark
- 					CreateAndInsertMark(GetImport(),
- 										sAPI_reference_mark,
+-		sal_uInt16 nTmp;
+-		if (SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(), 
+-											lcl_aMarkTypeMap))
++	    sal_uInt16 nTmp;
++	    if (SvXMLUnitConverter::convertEnum(nTmp, GetLocalName(), 
++						lcl_aMarkTypeMap))
++	    {
++		switch ((lcl_MarkType)nTmp)
+ 		{
+-			switch ((lcl_MarkType)nTmp)
++		    case TypeReference:
++			// export point reference mark
++			CreateAndInsertMark(GetImport(),
++					    sAPI_reference_mark,
++					    sBookmarkName,
++					    rHelper.GetCursorAsRange()->getStart(),
++					    ::rtl::OUString());
++			break;
++
++		    case TypeFieldmark:
++		    case TypeBookmark:
++		    {
++			bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmark && sFieldName.compareToAscii("ecma.office-open-xml.field.FORMCHECKBOX")==0); // for now only import FORMCHECKBOX boxes
++			// export point bookmark
++			Reference<XInterface> xIfc=CreateAndInsertMark(GetImport(),
++					    (bImportAsField?sAPI_formfieldmark:sAPI_bookmark),
++					    sBookmarkName,
++					    rHelper.GetCursorAsRange()->getStart(),
++					    sXmlId);
++			if ((lcl_MarkType)nTmp==TypeFieldmark) {
++			    if (xIfc.is() && bImportAsField) {
++				// setup fieldmark...
++				Reference< ::com::sun::star::text::XFormField> xFormField(xIfc, UNO_QUERY);
++				xFormField->setType(1); // Checkbox...
++				if (xFormField.is() && rHelper.hasCurrentFieldCtx()) {
++//									xFormField->setDescription(::rtl::OUString::createFromAscii("HELLO CHECKBOX"));
++//									xFormField->setRes(1); 
++				    rHelper.setCurrentFieldParamsTo(xFormField);
++				}
++			    }
++			    rHelper.popFieldCtx();
++			}
++		    }
++		    break;
++			
++		    case TypeFieldmarkStart:
++		    case TypeBookmarkStart:
++			// save XTextRange for later construction of bookmark
++			rHelper.InsertBookmarkStartRange(
++			    sBookmarkName, rHelper.GetCursorAsRange()->getStart(), sXmlId);
++			break;
++			
++		    case TypeFieldmarkEnd:
++		    case TypeBookmarkEnd:
++		    {
++			// get old range, and construct
++			Reference<XTextRange> xStartRange;
++			if (rHelper.FindAndRemoveBookmarkStartRange(sBookmarkName,
++								    xStartRange, sXmlId))
+ 			{
+-				case TypeReference:
+-					// export point reference mark
+-					CreateAndInsertMark(GetImport(),
+-										sAPI_reference_mark,
 -										sName,
-+										sBookmarkName,
- 									   rHelper.GetCursorAsRange()->getStart());
- 					break;
- 
-+				case TypeFieldmark:
- 				case TypeBookmark:
+-									   rHelper.GetCursorAsRange()->getStart(),
+-									   ::rtl::OUString());
+-					break;
+-
+-				case TypeBookmark:
 -					// export point bookmark
 -					CreateAndInsertMark(GetImport(),
 -										sAPI_bookmark,
 -										sName,
-+					{
-+						bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmark && sFieldName.compareToAscii("ecma.office-open-xml.field.FORMCHECKBOX")==0); // for now only import FORMCHECKBOX boxes
-+						// export point bookmark
-+						Reference<XInterface> xIfc=CreateAndInsertMark(GetImport(),
-+										(bImportAsField?sAPI_formfieldmark:sAPI_bookmark),
-+										sBookmarkName,
- 									   rHelper.GetCursorAsRange()->getStart());
-+						if ((lcl_MarkType)nTmp==TypeFieldmark) {
-+							if (xIfc.is() && bImportAsField) {
-+								// setup fieldmark...
-+								Reference< ::com::sun::star::text::XFormField> xFormField(xIfc, UNO_QUERY);
-+								xFormField->setType(1); // Checkbox...
-+								if (xFormField.is() && rHelper.hasCurrentFieldCtx()) {
-+//									xFormField->setDescription(::rtl::OUString::createFromAscii("HELLO CHECKBOX"));
-+//									xFormField->setRes(1); 
-+									rHelper.setCurrentFieldParamsTo(xFormField);
-+								}
-+							}
-+							rHelper.popFieldCtx();
-+						}
-+					}
- 					break;
- 
-+				case TypeFieldmarkStart:
- 				case TypeBookmarkStart:
- 					// save XTextRange for later construction of bookmark
- 					rHelper.InsertBookmarkStartRange(
--						sName, rHelper.GetCursorAsRange()->getStart());
-+						sBookmarkName, rHelper.GetCursorAsRange()->getStart());
- 					break;
- 
-+				case TypeFieldmarkEnd:
- 				case TypeBookmarkEnd:
- 				{
- 					// get old range, and construct
- 					Reference<XTextRange> xStartRange;
- 					if (rHelper.FindAndRemoveBookmarkStartRange(xStartRange, 
--																sName))
-+																sBookmarkName))
- 					{
- 						Reference<XTextRange> xEndRange(
- 							rHelper.GetCursorAsRange()->getStart());
-@@ -192,12 +284,31 @@ void XMLTextMarkImportContext::StartElement(
- 
- 							Reference<XTextRange> xInsertionRange(
- 								xInsertionCursor, UNO_QUERY);
-+							
-+							bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmarkEnd && rHelper.hasCurrentFieldCtx());
-+							if (bImportAsField) {
-+								::rtl::OUString currentFieldType=rHelper.getCurrentFieldType();
-+								bImportAsField=currentFieldType.compareToAscii("ecma.office-open-xml.field.FORMTEXT")==0; // for now only import FORMTEXT boxes
-+							}
+-									   rHelper.GetCursorAsRange()->getStart(),
+-									   sXmlId);
+-					break;
+-
+-				case TypeBookmarkStart:
+-					// save XTextRange for later construction of bookmark
+-					rHelper.InsertBookmarkStartRange(
+-						sName, rHelper.GetCursorAsRange()->getStart(), sXmlId);
+-					break;
+-
+-				case TypeBookmarkEnd:
+-				{
+-					// get old range, and construct
+-					Reference<XTextRange> xStartRange;
+-					if (rHelper.FindAndRemoveBookmarkStartRange(sName,
+-                            xStartRange, sXmlId))
+-					{
+-						Reference<XTextRange> xEndRange(
+-							rHelper.GetCursorAsRange()->getStart());
+-
+-						// check if beginning and end are in same XText
+-						if (xStartRange->getText() == xEndRange->getText())
+-						{
+-							// create range for insertion
+-							Reference<XTextCursor> xInsertionCursor =
+-								rHelper.GetText()->createTextCursorByRange(
+-									xEndRange);
+-							xInsertionCursor->gotoRange(xStartRange, sal_True);
+-
+-							//DBG_ASSERT(! xInsertionCursor->isCollapsed(), 
+-							// 				"we want no point mark");
+-							// can't assert, because someone could
+-							// create a file with subsequence
+-							// start/end elements
+-
+-							Reference<XTextRange> xInsertionRange(
+-								xInsertionCursor, UNO_QUERY);
++			    Reference<XTextRange> xEndRange(
++				rHelper.GetCursorAsRange()->getStart());
++			    
++			    // check if beginning and end are in same XText
++			    if (xStartRange->getText() == xEndRange->getText())
++			    {
++				// create range for insertion
++				Reference<XTextCursor> xInsertionCursor =
++				    rHelper.GetText()->createTextCursorByRange(
++					xEndRange);
++				xInsertionCursor->gotoRange(xStartRange, sal_True);
++				
++				//DBG_ASSERT(! xInsertionCursor->isCollapsed(), 
++				// 				"we want no point mark");
++				// can't assert, because someone could
++				// create a file with subsequence
++				// start/end elements
++				
++				Reference<XTextRange> xInsertionRange(
++				    xInsertionCursor, UNO_QUERY);
++				
++				bool bImportAsField=((lcl_MarkType)nTmp==TypeFieldmarkEnd && rHelper.hasCurrentFieldCtx());
++				if (bImportAsField) {
++				    ::rtl::OUString currentFieldType=rHelper.getCurrentFieldType();
++				    bImportAsField=currentFieldType.compareToAscii("ecma.office-open-xml.field.FORMTEXT")==0; // for now only import FORMTEXT boxes
++				}
  
- 							// insert reference
+-							// insert reference
 -							CreateAndInsertMark(GetImport(),
 -												sAPI_bookmark,
--												sName, 
-+							Reference<XInterface> xIfc=CreateAndInsertMark(GetImport(),
-+												(bImportAsField?sAPI_fieldmark:sAPI_bookmark),
-+												sBookmarkName, 
- 												xInsertionRange);
-+
-+							if ((lcl_MarkType)nTmp==TypeFieldmarkEnd) {
-+								if (xIfc.is() && bImportAsField) {
-+									// setup fieldmark...
-+									Reference< ::com::sun::star::text::XFormField> xFormField(xIfc, UNO_QUERY);
-+									xFormField->setType(0); // Text
-+									if (xFormField.is() && rHelper.hasCurrentFieldCtx()) {
-+										rHelper.setCurrentFieldParamsTo(xFormField);
+-												sName,
+-												xInsertionRange,
+-												sXmlId);
+-						}
+-						// else: beginning/end in different XText -> ignore!
++				// insert reference
++				Reference<XInterface> xIfc=CreateAndInsertMark(GetImport(),
++						    (bImportAsField?sAPI_fieldmark:sAPI_bookmark),
++						    sBookmarkName,
++						    xInsertionRange,
++						    sXmlId);
++				
++				if ((lcl_MarkType)nTmp==TypeFieldmarkEnd) {
++				    if (xIfc.is() && bImportAsField) {
++					// setup fieldmark...
++					Reference< ::com::sun::star::text::XFormField> xFormField(xIfc, UNO_QUERY);
++					xFormField->setType(0); // Text
++					if (xFormField.is() && rHelper.hasCurrentFieldCtx()) {
++					    rHelper.setCurrentFieldParamsTo(xFormField);
 +//									xFormField->setDescription(::rtl::OUString::createFromAscii("HELLO"));
-+									}
-+								}
-+								rHelper.popFieldCtx();
-+							}
- 						}
- 						// else: beginning/end in different XText -> ignore!
  					}
-@@ -218,8 +329,15 @@ void XMLTextMarkImportContext::StartElement(
+-					// else: no start found -> ignore!
+-					break;
++				    }
++				    rHelper.popFieldCtx();
+ 				}
+-
+-				case TypeReferenceStart:
+-				case TypeReferenceEnd:	
+-					DBG_ERROR("reference start/end are handled in txtparai !");
+-					break;
+-
+-				default:
+-					DBG_ERROR("unknown mark type");
+-					break;
++			    }
++			    // else: beginning/end in different XText -> ignore!
+ 			}
++			// else: no start found -> ignore!
++			break;
++		    }
++		    
++		    case TypeReferenceStart:
++		    case TypeReferenceEnd:	
++			DBG_ERROR("reference start/end are handled in txtparai !");
++			break;
++			
++		    default:
++			DBG_ERROR("unknown mark type");
++			break;
+ 		}
++	    }
  	}
  }
- 
++ 
 +SvXMLImportContext *XMLTextMarkImportContext::CreateChildContext( USHORT nPrefix,
 +                                        const ::rtl::OUString& rLocalName,
 +                                        const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList )
@@ -403,13 +504,13 @@
 +	return new XMLFieldParamImportContext(GetImport(), rHelper, nPrefix, rLocalName);
 +}
  
+ 
 -void XMLTextMarkImportContext::CreateAndInsertMark(
-+
 +Reference<XInterface> XMLTextMarkImportContext::CreateAndInsertMark(
  	SvXMLImport& rImport,
  	const OUString& sServiceName,
  	const OUString& sMarkName,
-@@ -254,13 +372,14 @@ void XMLTextMarkImportContext::CreateAndInsertMark(
+@@ -226,14 +338,16 @@ void XMLTextMarkImportContext::CreateAndInsertMark(
  				}
  			}
  		}
@@ -421,31 +522,31 @@
  sal_Bool XMLTextMarkImportContext::FindName(
  	SvXMLImport& rImport,
  	const Reference<XAttributeList> & xAttrList,
--	OUString& sName)
-+	OUString& sName, ::rtl::OUString *pFieldName)
+ 	OUString& sName,
+-	OUString& o_rXmlId)
++	OUString& o_rXmlId,
++	OUString *pFieldName)
  {
  	sal_Bool bNameOK = sal_False;
  
-@@ -279,7 +398,14 @@ sal_Bool XMLTextMarkImportContext::FindName(
- 			sName = xAttrList->getValueByIndex(nAttr);
- 			bNameOK = sal_True;
+@@ -258,6 +372,12 @@ sal_Bool XMLTextMarkImportContext::FindName(
+ 			o_rXmlId = xAttrList->getValueByIndex(nAttr);
  		}
-+		if ( pFieldName!=NULL &&
-+			(XML_NAMESPACE_FIELD == nPrefix) &&
-+			 IsXMLToken(sLocalName, XML_TYPE)   )
-+		{
-+			*pFieldName = xAttrList->getValueByIndex(nAttr);
-+		}
+ //FIXME: RDFa (text:bookmark-start)
++ 		if ( pFieldName!=NULL &&
++		     (XML_NAMESPACE_FIELD == nPrefix) &&
++		     IsXMLToken(sLocalName, XML_TYPE)   )
++ 		{
++		    *pFieldName = xAttrList->getValueByIndex(nAttr);
++ 		}
  	}
  
  	return bNameOK;
- }
-+
 diff --git a/xmloff/source/text/XMLTextMarkImportContext.hxx b/xmloff/source/text/XMLTextMarkImportContext.hxx
-index 79e3f35..5554255 100644
+index 9028379..48fc08e 100644
 --- xmloff/source/text/XMLTextMarkImportContext.hxx
 +++ xmloff/source/text/XMLTextMarkImportContext.hxx
-@@ -59,6 +59,21 @@ namespace rtl {
+@@ -49,6 +49,21 @@ namespace rtl {
  }
  class XMLTextImportHelper;
  
@@ -467,16 +568,17 @@
  
  /**
   * import bookmarks and reference marks
-@@ -71,6 +86,8 @@ class XMLTextMarkImportContext : public SvXMLImportContext
+@@ -61,6 +76,9 @@ class XMLTextMarkImportContext : public SvXMLImportContext
  {
- 	
+ 
  	XMLTextImportHelper& rHelper;
 +	::rtl::OUString sBookmarkName;
++        ::rtl::OUString sXmlId;
 +	::rtl::OUString sFieldName;
  
  public:
- 	
-@@ -82,14 +99,20 @@ public:
+ 
+@@ -72,14 +90,20 @@ public:
  		sal_uInt16 nPrfx,
  		const ::rtl::OUString& rLocalName );
  
@@ -498,20 +600,21 @@
  		SvXMLImport& rImport,
  		const ::rtl::OUString& sServiceName,
  		const ::rtl::OUString& sMarkName,
-@@ -100,7 +123,7 @@ public:
- 		SvXMLImport& rImport,
+@@ -92,7 +116,8 @@ public:
  		const ::com::sun::star::uno::Reference<
  			::com::sun::star::xml::sax::XAttributeList> & xAttrList,
--		::rtl::OUString& sName);
-+			::rtl::OUString& sName, ::rtl::OUString *pFieldName=NULL);
+ 		::rtl::OUString& sName,
+-        ::rtl::OUString& o_rXmlId);
++        ::rtl::OUString& o_rXmlId,
++	::rtl::OUString *pFieldName=NULL);
  };
  
  #endif
 diff --git a/xmloff/source/text/txtimp.cxx b/xmloff/source/text/txtimp.cxx
-index 197d31d..0e643b1 100644
+index 3ade8c1..b6de7ff 100644
 --- xmloff/source/text/txtimp.cxx
 +++ xmloff/source/text/txtimp.cxx
-@@ -425,6 +425,11 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPElemTokenMap[] =
+@@ -331,6 +331,11 @@ static __FAR_DATA SvXMLTokenMapEntry aTextPElemTokenMap[] =
  	{ XML_NAMESPACE_PRESENTATION, XML_DATE_TIME, XML_TOK_DRAW_DATE_TIME },
  	{ XML_NAMESPACE_TEXT, XML_PAGE_CONTINUATION, XML_TOK_TEXT_PAGE_CONTINUATION },
  
@@ -523,7 +626,7 @@
  	XML_TOKEN_MAP_END
  };
  
-@@ -689,6 +694,8 @@ XMLTextImportHelper::~XMLTextImportHelper()
+@@ -648,6 +653,8 @@ XMLTextImportHelper::~XMLTextImportHelper()
      delete [] mpOutlineStylesCandidates;
      // <--
  
@@ -532,17 +635,17 @@
  	_FinitBackpatcher();
  }
  
-@@ -2126,6 +2133,7 @@ void XMLTextImportHelper::InsertBookmarkStartRange(
- 	const Reference<XTextRange> & rRange)
+@@ -2144,6 +2151,7 @@ void XMLTextImportHelper::InsertBookmarkStartRange(
+ 	const OUString& i_rXmlId)
  {
- 	aBookmarkStartRanges[sName].set(rRange);
+ 	aBookmarkStartRanges[sName] = std::make_pair(rRange, i_rXmlId);
 +	aBookmarkVector.push_back(sName);
  }
  
  sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange(
-@@ -2136,6 +2144,13 @@ sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange(
- 	{
- 		rRange.set(aBookmarkStartRanges[sName]);
+@@ -2156,6 +2164,13 @@ sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange(
+ 		o_rRange.set(aBookmarkStartRanges[sName].first);
+ 		o_rXmlId = aBookmarkStartRanges[sName].second;
  		aBookmarkStartRanges.erase(sName);
 +		BookmarkVector_t::iterator it=aBookmarkVector.begin();
 +		while(it!=aBookmarkVector.end() && it->compareTo(sName)!=0) {
@@ -554,7 +657,7 @@
  		return sal_True;
  	}
  	else
-@@ -2144,6 +2159,76 @@ sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange(
+@@ -2164,6 +2179,76 @@ sal_Bool XMLTextImportHelper::FindAndRemoveBookmarkStartRange(
  	}
  }
  
@@ -567,7 +670,7 @@
 +
 +::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange > XMLTextImportHelper::GetRangeFor(::rtl::OUString &sName)
 +{
-+	return aBookmarkStartRanges[sName];
++	return aBookmarkStartRanges[sName].first;
 +}
 +
 +
@@ -632,33 +735,32 @@
  void XMLTextImportHelper::ConnectFrameChains(
  		const OUString& rFrmName,
 diff --git a/xmloff/source/text/txtparae.cxx b/xmloff/source/text/txtparae.cxx
-index fa56e38..de91769 100644
+index 48dbeff..a1e2dd6 100644
 --- xmloff/source/text/txtparae.cxx
 +++ xmloff/source/text/txtparae.cxx
-@@ -158,6 +158,11 @@
- #include <com/sun/star/document/XRedlinesSupplier.hpp>
- #endif
+@@ -123,6 +123,11 @@
+ #include <xmloff/formlayerexport.hxx>
+ #include "XMLTextCharStyleNamesElementExport.hxx"
  
 +#include <com/sun/star/text/XBookmarksSupplier.hpp>
 +#include <com/sun/star/text/XFormField.hpp>
 +
 +#include <stdio.h>
 +
- #ifndef _COM_SUN_STAR_TEXT_XTEXTSECTION_HPP_
- #include <com/sun/star/text/XTextSection.hpp>
- #endif
-@@ -990,7 +995,9 @@ XMLTextParagraphExport::XMLTextParagraphExport(
+ // --> OD 2008-04-25 #refactorlists#
+ #include <txtlists.hxx>
+ // <--
+@@ -977,6 +982,9 @@ XMLTextParagraphExport::XMLTextParagraphExport(
  	sVisitedCharStyleName(RTL_CONSTASCII_USTRINGPARAM("VisitedCharStyleName")),
  	sWidth(RTL_CONSTASCII_USTRINGPARAM("Width")),
  	sWidthType( RTL_CONSTASCII_USTRINGPARAM( "WidthType" ) ),
--
-+	sTextFieldStart( RTL_CONSTASCII_USTRINGPARAM( "TextFieldStart" ) ),
-+	sTextFieldEnd( RTL_CONSTASCII_USTRINGPARAM( "TextFieldEnd" ) ),
-+	sTextFieldStartEnd( RTL_CONSTASCII_USTRINGPARAM( "TextFieldStartEnd" ) ),
++ 	sTextFieldStart( RTL_CONSTASCII_USTRINGPARAM( "TextFieldStart" ) ),
++ 	sTextFieldEnd( RTL_CONSTASCII_USTRINGPARAM( "TextFieldEnd" ) ),
++ 	sTextFieldStartEnd( RTL_CONSTASCII_USTRINGPARAM( "TextFieldStartEnd" ) ),
  	aCharStyleNamesPropInfoCache( sCharStyleNames )
  {
  	UniReference < XMLPropertySetMapper > xPropMapper(new XMLTextPropertySetMapper( TEXT_PROP_MAP_PARA ));
-@@ -2185,6 +2192,62 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
+@@ -2204,6 +2212,62 @@ void XMLTextParagraphExport::exportTextRangeEnumeration(
  			{
  				exportRuby(xPropSet, bAutoStyles);
  			}
@@ -722,10 +824,10 @@
  			{
  				exportSoftPageBreak(xPropSet,	bAutoStyles);
 diff --git a/xmloff/source/text/txtparai.cxx b/xmloff/source/text/txtparai.cxx
-index a5bf136..91d27e6 100644
+index accc470..7fa1b1e 100644
 --- xmloff/source/text/txtparai.cxx
 +++ xmloff/source/text/txtparai.cxx
-@@ -1419,6 +1419,14 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
+@@ -1478,6 +1478,14 @@ SvXMLImportContext *XMLImpSpanContext_Impl::CreateChildContext(
  												 nPrefix, rLocalName );
  		break;
  



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]