1. mst
  2. ooo340

Commits

mba  committed 7ac718e

cws swcoreseparation: #i117814#: remove access to swmodule for configuration settings from core and filter code

  • Participants
  • Parent commits 651b383
  • Branches default

Comments (0)

Files changed (78)

File sw/Library_sw.mk

View file
  • Ignore whitespace
 	sw/source/core/bastyp/swregion \
 	sw/source/core/bastyp/swtypes \
 	sw/source/core/bastyp/tabcol \
+	sw/source/core/config/caption \
+	sw/source/core/config/dbconfig \
+	sw/source/core/config/modcfg \
+	sw/source/core/config/usrpref \
 	sw/source/core/crsr/BlockCursor \
 	sw/source/core/crsr/bookmrk \
 	sw/source/core/crsr/callnk \
 	sw/source/ui/cctrl/popbox \
 	sw/source/ui/cctrl/swlbox \
 	sw/source/ui/config/barcfg \
-	sw/source/ui/config/caption \
 	sw/source/ui/config/cfgitems \
-	sw/source/ui/config/dbconfig \
 	sw/source/ui/config/fontcfg \
-	sw/source/ui/config/modcfg \
 	sw/source/ui/config/prtopt \
 	sw/source/ui/config/swacorr \
 	sw/source/ui/config/uinums \
-	sw/source/ui/config/usrpref \
 	sw/source/ui/config/viewopt \
 	sw/source/ui/dbui/dbmgr \
 	sw/source/ui/dbui/dbtree \

File sw/inc/caption.hxx

View file
  • Ignore whitespace
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _CAPTION_HXX
+#define _CAPTION_HXX
+
+#include <tools/string.hxx>
+#include <tools/globname.hxx>
+#include <SwCapObjType.hxx>
+#include "swdllapi.h"
+
+/*--------------------------------------------------------------------
+	Beschreibung:
+ --------------------------------------------------------------------*/
+
+class SW_DLLPUBLIC InsCaptionOpt
+{
+private:
+    sal_Bool            bUseCaption;
+    SwCapObjType    eObjType;
+    SvGlobalName    aOleId;
+    String          sCategory;
+    sal_uInt16          nNumType;
+    ::rtl::OUString sNumberSeparator;
+    String          sCaption;
+    sal_uInt16          nPos;
+    sal_uInt16          nLevel;
+//  sal_Unicode     cSeparator;
+    String          sSeparator;
+    String          sCharacterStyle;
+    
+    sal_Bool         bIgnoreSeqOpts;    // wird nicht gespeichert
+	sal_Bool		 bCopyAttributes;   // 			-""-
+
+public:
+	InsCaptionOpt(const SwCapObjType eType = FRAME_CAP, const SvGlobalName* pOleId = 0);
+	InsCaptionOpt(const InsCaptionOpt&);
+	~InsCaptionOpt();
+
+	inline sal_Bool&			UseCaption()					{ return bUseCaption; }
+	inline sal_Bool				UseCaption() const				{ return bUseCaption; }
+
+	inline SwCapObjType		GetObjType() const				{ return eObjType; }
+	inline void				SetObjType(const SwCapObjType eType) { eObjType = eType; }
+
+	inline const SvGlobalName&	GetOleId() const				{ return aOleId; }
+	inline void				SetOleId(const SvGlobalName &rId)	{ aOleId = rId; }
+
+	inline const String&	GetCategory() const				{ return sCategory; }
+	inline void				SetCategory(const String& rCat) { sCategory = rCat; }
+
+	inline sal_uInt16			GetNumType() const				{ return nNumType; }
+	inline void				SetNumType(const sal_uInt16 nNT)	{ nNumType = nNT; }
+
+    const ::rtl::OUString&  GetNumSeparator() const { return sNumberSeparator; }
+    void                    SetNumSeparator(const ::rtl::OUString& rSet) {sNumberSeparator = rSet;}
+
+    inline const String&    GetCaption() const              { return sCaption; }
+	inline void				SetCaption(const String& rCap)	{ sCaption = rCap; }
+
+	inline sal_uInt16			GetPos() const					{ return nPos; }
+	inline void				SetPos(const sal_uInt16 nP)			{ nPos = nP; }
+
+	inline sal_uInt16			GetLevel() const				{ return nLevel; }
+	inline void				SetLevel(const sal_uInt16 nLvl)		{ nLevel = nLvl; }
+
+//	inline sal_Unicode		GetSeparator() const				{ return cSeparator; }
+//	inline void				SetSeparator(const sal_Unicode cSep){ cSeparator = cSep; }
+	inline const String&	GetSeparator() const				{ return sSeparator; }
+	inline void				SetSeparator(const String& rSep)	{ sSeparator = rSep; }
+
+    const String&           GetCharacterStyle() const { return sCharacterStyle; }
+    void                    SetCharacterStyle(const String& rStyle) 
+                                    { sCharacterStyle = rStyle; }
+
+	inline sal_Bool&			IgnoreSeqOpts()					{ return bIgnoreSeqOpts; }
+	inline sal_Bool				IgnoreSeqOpts() const			{ return bIgnoreSeqOpts; }
+
+	inline sal_Bool& 			CopyAttributes() 				{ return bCopyAttributes; }
+	inline sal_Bool 			CopyAttributes() const			{ return bCopyAttributes; }
+
+	sal_Bool					operator==( const InsCaptionOpt& rOpt ) const;
+	InsCaptionOpt&			operator= ( const InsCaptionOpt& rOpt );
+	inline sal_Bool				operator< ( const InsCaptionOpt & rObj ) const
+												{ return aOleId < rObj.aOleId; }
+//  friend SvStream&        operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt );
+//  friend SvStream&        operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt );
+};
+
+#endif
+
+

File sw/inc/comcore.hrc

View file
  • Ignore whitespace
 #define RID_GRAPHIC_REPLACEBMP_HC           (RC_COMCORE_BEGIN + 48)
 #define RID_GRAPHIC_ERRORBMP_HC             (RC_COMCORE_BEGIN + 49)
 // <- #146850#
+#define STR_REDLINE_UNKNOWN_AUTHOR  (RC_COMCORE_BEGIN + 54)
 
 // defines fuer die Autoformat Redline Kommentare
 #define STR_AUTOFMTREDL_DEL_EMPTY_PARA			0

File sw/inc/dbconfig.hxx

View file
  • Ignore whitespace
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _DBCONFIG_HXX
+#define _DBCONFIG_HXX
+
+#include <unotools/configitem.hxx>
+#include "swdllapi.h"
+
+struct SwDBData;
+
+class SW_DLLPUBLIC SwDBConfig : public utl::ConfigItem
+{
+	SW_DLLPRIVATE const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames();
+
+    SwDBData*       pAdrImpl;
+    SwDBData*       pBibImpl;
+
+public:
+	SwDBConfig();
+	virtual ~SwDBConfig();
+    static SwDBConfig& Get();
+    static void Remove();
+
+	void					Load();
+	const SwDBData&			GetAddressSource();
+    const SwDBData&         GetBibliographySource();
+	virtual void Commit();
+	virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+};
+
+#endif
+

File sw/inc/mdiexp.hxx

View file
  • Ignore whitespace
 #define _MDIEXP_HXX
 
 #include <tools/solar.h>
-#include <tblenum.hxx>
 #include <layout/layout.hxx>
 #include <swdllapi.h>
 
 // alle QuickDraw-Bitmaps des speziellen Docs loeschen
 void DelAllGrfCacheEntries( SwDoc* pDoc );
 
-// ChgMode fuer Tabellen aus der Konfiguration lesen
-TblChgMode GetTblChgDefaultMode();
-
 sal_Bool JumpToSwMark( ViewShell* pVwSh, const UniString& rMark );
 
 

File sw/inc/modcfg.hxx

View file
  • Ignore whitespace
 #ifndef _MODOPT_HXX
 #define _MODOPT_HXX
 
+#include <tools/globname.hxx>
 #include <tools/string.hxx>
 #include <tools/wintypes.hxx>
 #include <vcl/field.hxx>
 #include <unotools/configitem.hxx>
 #include "swdllapi.h"
 #include "authratr.hxx"
-#include <SwCapObjType.hxx>
+#include "SwCapObjType.hxx"
 #include "tblenum.hxx"
 #include "itabenum.hxx"
-#include <tools/globname.hxx>
+
 class SwModuleOptions;
+class SvStringsDtor;
+class SfxItemSet;
 
 //-----------------------------------------------------------------------------
 class InsCaptionOpt;
 	void 					SetModified(){ConfigItem::SetModified();}
 };
 
+class SW_DLLPUBLIC SwAuthors
+{
+	SvStringsDtor*		pAuthorNames;       // List of all redline authors
+	String				sActAuthor;
+    bool                bAuthorInitialised;
+    ~SwAuthors();
+public:
+    SwAuthors();
+    static SwAuthors&   Get();
+    static void         Remove();
+    void                Reset() { bAuthorInitialised = false; }
+	sal_uInt16			GetRedlineAuthor();
+	const String&		GetRedlineAuthor(sal_uInt16 nPos);
+	sal_uInt16			InsertRedlineAuthor(const String& rAuthor);
+	void				GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+	void				GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+	void				GetFormatAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
+};
+
 /* ---------------------------------------------------------------------------
 
  ---------------------------------------------------------------------------*/
 
 	sal_Bool 		IsHideFieldTips() const {return bHideFieldTips;}
 	void		SetHideFieldTips(sal_Bool bSet) {bHideFieldTips = bSet;}
+    static SwModuleOptions& Get();
+    static void Remove();
 };
 #endif
 

File sw/inc/swmodule.hxx

View file
  • Ignore whitespace
 class SfxItemSet;
 class SfxRequest;
 class SfxErrorHandler;
-class SwDBConfig;
-class SwModuleOptions;
-class SwMasterUsrPref;
 class SwViewOption;
 class SwView;
 class SwWrtShell;
 #define VIEWOPT_DEST_VIEW 		0
 #define VIEWOPT_DEST_TEXT		1
 #define VIEWOPT_DEST_WEB    	2
-#define VIEWOPT_DEST_VIEW_ONLY 	3 //ViewOptions werden nur an der ::com::sun::star::sdbcx::View, nicht an der Appl. gesetzt
-
+#define VIEWOPT_DEST_VIEW_ONLY 	3 // set ViewOptions only at the view, but not globally
+ 
 namespace com{ namespace sun{ namespace star{ namespace scanner{
 	class XScannerManager;
 }}}}
 
 class SW_DLLPUBLIC SwModule: public SfxModule, public SfxListener, public utl::ConfigurationListener
 {
-	String				sActAuthor;
-
-	// ConfigItems
-	SwModuleOptions*    pModuleConfig;
-	SwMasterUsrPref*	pUsrPref;
-	SwMasterUsrPref*	pWebUsrPref;
-	SwPrintOptions* 	pPrtOpt;
-	SwPrintOptions* 	pWebPrtOpt;
-	SwChapterNumRules*	pChapterNumRules;
-	SwStdFontConfig*	pStdFontConfig;
-	SwNavigationConfig*	pNavigationConfig;
-	SwToolbarConfigItem*pToolbarConfig;		//fuer gestackte Toolbars, welche
-	SwToolbarConfigItem*pWebToolbarConfig;	//war sichtbar?
-	SwDBConfig*			pDBConfig;
+    // just for listening (maybe handled by specialized listeners later)
     svtools::ColorConfig*   pColorConfig;
     SvtAccessibilityOptions* pAccessibilityOptions;
     SvtCTLOptions*      pCTLOptions;
     SvtUserOptions*     pUserOptions;
     SvtUndoOptions*     pUndoOptions;
 
+	// ConfigItems
+	SwPrintOptions* 	pPrtOpt;
+	SwPrintOptions* 	pWebPrtOpt;
+	SwChapterNumRules*	pChapterNumRules;
+	SwStdFontConfig*	pStdFontConfig;
+	SwNavigationConfig*	pNavigationConfig;
+	SwToolbarConfigItem*pToolbarConfig;
+	SwToolbarConfigItem*pWebToolbarConfig;
+
 	SfxErrorHandler* 	pErrorHdl;
-
 	SwAttrPool			*pAttrPool;
 
-	// Die aktuelle View wird hier gehalten um nicht ueber
-	// GetActiveView arbeiten zu muessen
-	// Die View ist solange gueltig bis Sie im Activate
-	// zerstoert oder ausgetauscht wird
+    // cache active view
 	SwView* 			pView;
 
-	// Liste aller Redline-Autoren
-	SvStringsDtor*		pAuthorNames;
-
 	// DictionaryList listener to trigger spellchecking or hyphenation
 	::com::sun::star::uno::Reference<
 		::com::sun::star::linguistic2::XLinguServiceEventListener > xLngSvcEvtListener;
     ::com::sun::star::uno::Reference<
         ::com::sun::star::linguistic2::XLanguageGuessing >  m_xLanguageGuesser;
 
-	sal_Bool				bAuthorInitialised : 1;
-	sal_Bool				bEmbeddedLoadSave : 1;
+	sal_Bool				bEmbeddedLoadSave;
 
-	// Hint abfangen fuer DocInfo
 	virtual void		Notify( SfxBroadcaster& rBC, const SfxHint& rHint );
-
     virtual void        ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 );
 
 protected:
-	// Briefumschlaege, Etiketten
     void                InsertEnv(SfxRequest&);
 	void				InsertLab(SfxRequest&, sal_Bool bLabel);
 
 	TYPEINFO();
 	SFX_DECL_INTERFACE(SW_INTERFACE_MODULE)
 
-	// dieser Ctor nur fuer SW-Dll
 	SwModule( SfxObjectFactory* pFact,
 				SfxObjectFactory* pWebFact,
 					SfxObjectFactory* pGlobalFact );
 
 	~SwModule();
 
-	// View setzen nur fuer internen Gebrauch,
-	// aus techn. Gruenden public
-	//
+    // use only internally
 	inline	void		SetView(SwView* pVw) { pView = pVw; }
 	inline	SwView*		GetView() { return pView; }
 
-	//Die Handler fuer die Slots
-	void				StateOther(SfxItemSet &);	// andere
+	void				StateOther(SfxItemSet &);
+    void                ExecOther(SfxRequest &); 
 
-    void                ExecOther(SfxRequest &);    // Felder, Formel ..
-
-	// Benutzereinstellungen modifizieren
-	const SwMasterUsrPref *GetUsrPref(sal_Bool bWeb) const;
 	const SwViewOption*	GetViewOption(sal_Bool bWeb);
 	void				ApplyUsrPref(const SwViewOption &, SwView*,
 									 sal_uInt16 nDest = VIEWOPT_DEST_VIEW );
     void ApplyUserMetric( FieldUnit eMetric, sal_Bool bWeb );
     void ApplyRulerMetric( FieldUnit eMetric, sal_Bool bHorizontal, sal_Bool bWeb );
-    void ApplyFldUpdateFlags(SwFldUpdateFlags eFldFlags);
-	void ApplyLinkMode(sal_Int32 nNewLinkMode);
 
-    //default page mode for text grid
-    void ApplyDefaultPageMode(sal_Bool bIsSquaredPageMode);
-
-	// ConfigItems erzeugen
-	SwModuleOptions*    GetModuleConfig()		{ return pModuleConfig;}
+	// ConfigItems
 	SwPrintOptions* 	GetPrtOptions(sal_Bool bWeb);
 	SwChapterNumRules*	GetChapterNumRules();
 	SwStdFontConfig*	GetStdFontConfig()		{ return pStdFontConfig; }
 	SwNavigationConfig* GetNavigationConfig();
 	SwToolbarConfigItem*GetToolbarConfig()		{ return pToolbarConfig;	}
 	SwToolbarConfigItem*GetWebToolbarConfig()   { return pWebToolbarConfig; }
-	SwDBConfig*			GetDBConfig();
+
+    // while we are listening anyway...
     svtools::ColorConfig&   GetColorConfig();
     SvtAccessibilityOptions&    GetAccessibilityOptions();
     SvtCTLOptions&      GetCTLOptions();
     SvtUserOptions&     GetUserOptions();
     SvtUndoOptions&     GetUndoOptions();
 
-	// Ueber Sichten iterieren
 	static SwView* 		GetFirstView();
 	static SwView* 		GetNextView(SwView*);
 
 
     void ShowDBObj( SwView& rView, const SwDBData& rData, sal_Bool bOnlyIfAvailable = sal_False);
 
-	// Tabellenmodi
-	sal_Bool			IsInsTblFormatNum(sal_Bool bHTML) const;
-	sal_Bool 			IsInsTblChangeNumFormat(sal_Bool bHTML) const;
-	sal_Bool			IsInsTblAlignNum(sal_Bool bHTML) const;
-
-	// Redlining
-	sal_uInt16			GetRedlineAuthor();
-	const String&		GetRedlineAuthor(sal_uInt16 nPos);
-	sal_uInt16			InsertRedlineAuthor(const String& rAuthor);
-
-	void				GetInsertAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
-	void				GetDeletedAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
-	void				GetFormatAuthorAttr(sal_uInt16 nAuthor, SfxItemSet &rSet);
-
-	sal_uInt16				GetRedlineMarkPos();
-	const Color&			GetRedlineMarkColor();
-
-	// returne den definierten DocStat - WordDelimiter
-	const String&		GetDocStatWordDelim() const;
-
-	// Durchreichen der Metric von der ModuleConfig (fuer HTML-Export)
-	sal_uInt16 GetMetric( sal_Bool bWeb ) const;
-
-	// Update-Stati durchreichen
-	sal_uInt16 GetLinkUpdMode( sal_Bool bWeb ) const;
-    SwFldUpdateFlags GetFldUpdateFlags( sal_Bool bWeb ) const;
-
-	//virtuelle Methoden fuer den Optionendialog
+	// virtual methods for OptionsDialog
 	virtual SfxItemSet*	 CreateItemSet( sal_uInt16 nId );
 	virtual void		 ApplyItemSet( sal_uInt16 nId, const SfxItemSet& rSet );
 	virtual	SfxTabPage*	 CreateTabPage( sal_uInt16 nId, Window* pParent, const SfxItemSet& rSet );
 
-	//hier wird der Pool angelegt und an der SfxShell gesetzt
 	void	InitAttrPool();
-	//Pool loeschen bevor es zu spaet ist
 	void	RemoveAttrPool();
 
-	// Invalidiert ggf. OnlineSpell-WrongListen
 	void	CheckSpellChanges( sal_Bool bOnlineSpelling,
 					sal_Bool bIsSpellWrongAgain, sal_Bool bIsSpellAllAgain, sal_Bool bSmartTags );
 
-	inline ::com::sun::star::uno::Reference<
-		::com::sun::star::linguistic2::XLinguServiceEventListener >
-			GetLngSvcEvtListener();
-    inline void SetLngSvcEvtListener( ::com::sun::star::uno::Reference<
-        ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr);
-    void    CreateLngSvcEvtListener();
+    void CreateLngSvcEvtListener();
 
 	::com::sun::star::uno::Reference<
 		::com::sun::star::scanner::XScannerManager >
             GetLanguageGuesser();
 };
 
-
-inline ::com::sun::star::uno::Reference<
-	::com::sun::star::linguistic2::XLinguServiceEventListener >
-		SwModule::GetLngSvcEvtListener()
-{
-	return xLngSvcEvtListener;
-}
-
-inline void SwModule::SetLngSvcEvtListener(
-    ::com::sun::star::uno::Reference<
-       ::com::sun::star::linguistic2::XLinguServiceEventListener > & xLstnr)
-{
-    xLngSvcEvtListener = xLstnr;
-}
-
-
-/*-----------------08.07.97 10.33-------------------
-	Zugriff auf das SwModule, die ::com::sun::star::sdbcx::View und die Shell
---------------------------------------------------*/
-
 #define SW_MOD() ( *(SwModule**) GetAppData(SHL_WRITER))
 
 SW_DLLPUBLIC SwView* 	GetActiveView();

File sw/inc/usrpref.hxx

View file
  • Ignore whitespace
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+#ifndef _USRPREF_HXX
+#define _USRPREF_HXX
+
+#include <unotools/configitem.hxx>
+#include <fldupde.hxx>
+#include "viewopt.hxx"
+#include <tools/fldunit.hxx>
+#include <swdllapi.h>
+
+class SwMasterUsrPref;
+class SwContentViewConfig : public utl::ConfigItem
+{
+	SwMasterUsrPref& 		rParent;
+	sal_Bool 					bWeb;
+
+	com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+	public:
+		SwContentViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
+		~SwContentViewConfig();
+
+    // utl::ConfigItem
+    virtual void    Notify( const com::sun::star::uno::Sequence< rtl::OUString > &rPropertyNames );
+    virtual void    Commit();
+
+    void                    Load();
+	void 					SetModified(){ConfigItem::SetModified();}
+};
+
+class SwLayoutViewConfig : public utl::ConfigItem
+{
+	SwMasterUsrPref& 	rParent;
+	sal_Bool 				bWeb;
+
+	com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+	public:
+		SwLayoutViewConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
+		~SwLayoutViewConfig();
+
+	virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+	virtual void			Commit();
+	void					Load();
+	void 					SetModified(){ConfigItem::SetModified();}
+};
+
+class SwGridConfig : public utl::ConfigItem
+{
+	SwMasterUsrPref& 	rParent;
+	sal_Bool 				bWeb;
+
+	com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+	public:
+		SwGridConfig(sal_Bool bWeb, SwMasterUsrPref& rParent);
+		~SwGridConfig();
+
+	virtual void Commit();
+	virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+	void					Load();
+	void 					SetModified(){ConfigItem::SetModified();}
+};
+class SwCursorConfig : public utl::ConfigItem
+{
+	SwMasterUsrPref& 	rParent;
+
+	com::sun::star::uno::Sequence<rtl::OUString> GetPropertyNames();
+	public:
+		SwCursorConfig(SwMasterUsrPref& rParent);
+		~SwCursorConfig();
+
+	virtual void Commit();
+	virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+	void					Load();
+	void 					SetModified(){ConfigItem::SetModified();}
+};
+
+class SwWebColorConfig : public utl::ConfigItem
+{
+	SwMasterUsrPref& 		rParent;
+	com::sun::star::uno::Sequence<rtl::OUString> aPropNames;
+
+	public:
+		SwWebColorConfig(SwMasterUsrPref& rParent);
+		~SwWebColorConfig();
+
+	virtual void Commit();
+	virtual void Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames );
+	void					Load();
+	void 					SetModified(){ConfigItem::SetModified();}
+};
+
+class SW_DLLPUBLIC SwMasterUsrPref : public SwViewOption
+{
+	friend class SwContentViewConfig;
+	friend class SwLayoutViewConfig;
+	friend class SwGridConfig;
+	friend class SwCursorConfig;
+	friend class SwWebColorConfig;
+
+    SwFldUpdateFlags eFldUpdateFlags;    //udpate of fields and charts
+	sal_Int32	nLinkUpdateMode;
+	FieldUnit	eUserMetric;
+    FieldUnit   eHScrollMetric;
+    sal_Bool    bIsHScrollMetricSet;
+    FieldUnit   eVScrollMetric;
+    sal_Bool    bIsVScrollMetricSet;
+
+	sal_Int32	nDefTab;			//default tab stop distance
+
+    sal_Bool    bIsSquaredPageMode; //default page mode for text grid
+    sal_Bool    bIsAlignMathObjectsToBaseline;
+
+    SwContentViewConfig aContentConfig;
+    SwLayoutViewConfig  aLayoutConfig;
+    SwGridConfig        aGridConfig;
+    SwCursorConfig      aCursorConfig;
+    SwWebColorConfig*   pWebColorConfig;
+
+public:
+	SwMasterUsrPref(sal_Bool bWeb);
+	~SwMasterUsrPref();
+
+	static SwMasterUsrPref& Get(bool bWeb);
+    static void Remove();
+
+	void SetUsrPref(const SwViewOption &rCopy);
+
+	void Commit()
+		{
+			aContentConfig.Commit();
+			aLayoutConfig.Commit();
+			aGridConfig.Commit();
+			aCursorConfig.Commit();
+			if(pWebColorConfig)
+				pWebColorConfig->Commit();
+		}
+    void SetModified()
+		{
+			aContentConfig.SetModified();
+			aLayoutConfig.SetModified();
+			aGridConfig.SetModified();
+			aCursorConfig.SetModified();
+			if(pWebColorConfig)
+				pWebColorConfig->SetModified();
+		}
+
+    void SetUpdateLinkMode(sal_Int32 nSet, sal_Bool bNoModify = sal_False)
+        {
+            nLinkUpdateMode = nSet;
+            if(!bNoModify)
+                aContentConfig.SetModified();
+        }
+	sal_Int32 GetUpdateLinkMode() const {return nLinkUpdateMode; }
+
+    void SetUpdateFields(sal_Bool bSet, sal_Bool bNoModify = sal_False)
+		{
+            if(bSet && eFldUpdateFlags == AUTOUPD_OFF)
+			{
+                eFldUpdateFlags = AUTOUPD_FIELD_ONLY;
+                if(!bNoModify)
+                    aContentConfig.SetModified();
+		 	}
+			else if(!bSet)
+			{
+                eFldUpdateFlags = AUTOUPD_OFF;
+                if(!bNoModify)
+                    aContentConfig.SetModified();
+			}
+		};
+    sal_Bool IsUpdateFields()const {return eFldUpdateFlags != AUTOUPD_OFF; }
+
+    SwFldUpdateFlags   GetFldUpdateFlags()const {return eFldUpdateFlags;}
+    void        SetFldUpdateFlags(SwFldUpdateFlags eSet, sal_Bool bNoModify = sal_False)
+        {
+            eFldUpdateFlags = eSet;
+            if(!bNoModify)
+                aContentConfig.SetModified();
+        }
+
+    void SetUpdateCharts(sal_Bool bSet, sal_Bool bNoModify = sal_False)
+		{
+			if(bSet)
+			{
+                eFldUpdateFlags = AUTOUPD_FIELD_AND_CHARTS;
+                if(!bNoModify)
+                    aContentConfig.SetModified();
+			 }
+             else if(eFldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS)
+			 {
+                eFldUpdateFlags = AUTOUPD_FIELD_ONLY;
+                if(!bNoModify)
+                    aContentConfig.SetModified();
+			 }
+		};
+    sal_Bool IsUpdateCharts()const {return eFldUpdateFlags == AUTOUPD_FIELD_AND_CHARTS; }
+
+	FieldUnit	GetMetric() const { return eUserMetric;}
+    void        SetMetric(FieldUnit eSet, sal_Bool bNoModify = sal_False)
+                {
+                    eUserMetric = eSet;
+                    if(!bNoModify)
+                        aLayoutConfig.SetModified();
+                }
+
+    sal_Bool    IsHScrollMetric()const {return bIsHScrollMetricSet;}
+    FieldUnit   GetHScrollMetric() const { return bIsHScrollMetricSet ? eHScrollMetric : eUserMetric;}
+    void        SetHScrollMetric(FieldUnit eSet, sal_Bool bNoModify = sal_False)
+                {
+                    eHScrollMetric = eSet; bIsHScrollMetricSet = sal_True;
+                    if(!bNoModify)
+                        aLayoutConfig.SetModified();
+                }
+
+    sal_Bool    IsVScrollMetric()const {return bIsVScrollMetricSet;}
+    FieldUnit   GetVScrollMetric() const { return bIsVScrollMetricSet ? eVScrollMetric : eUserMetric;}
+    void        SetVScrollMetric(FieldUnit eSet, sal_Bool bNoModify = sal_False)
+                {
+                    eVScrollMetric = eSet; bIsVScrollMetricSet = sal_True;
+                    if(!bNoModify)
+                        aLayoutConfig.SetModified();
+                }
+
+    sal_Int32   GetDefTab() const { return nDefTab;}
+    void        SetDefTab( sal_Int32  nSet, sal_Bool bNoModify = sal_False )
+                {
+                    nDefTab = nSet;
+                    if(!bNoModify)
+                        aLayoutConfig.SetModified();
+                }
+    
+    //default page mode for text grid
+    sal_Bool    IsSquaredPageMode() const {return bIsSquaredPageMode;}
+    void        SetDefaultPageMode( sal_Bool bVal, sal_Bool bNoModify = sal_False ) 
+                { 
+                    bIsSquaredPageMode = bVal;
+                    if(!bNoModify)
+                        aLayoutConfig.SetModified(); 
+                }
+
+    sal_Bool    IsAlignMathObjectsToBaseline() const { return bIsAlignMathObjectsToBaseline; }
+    void        SetAlignMathObjectsToBaseline( sal_Bool bVal, sal_Bool bNoModify = sal_False ) 
+                { 
+                    bIsAlignMathObjectsToBaseline = bVal;
+                    if(!bNoModify)
+                        aLayoutConfig.SetModified(); 
+                }
+};
+
+#endif
+

File sw/source/core/config/caption.cxx

View file
  • Ignore whitespace
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <tools/debug.hxx>
+
+#include "numrule.hxx"
+#include "caption.hxx"
+
+#define VERSION_01 		1
+#define CAPTION_VERSION VERSION_01
+
+/*--------------------------------------------------------------------
+	Beschreibung:
+ --------------------------------------------------------------------*/
+
+InsCaptionOpt::InsCaptionOpt(const SwCapObjType eType, const SvGlobalName* pOleId) :
+	bUseCaption(sal_False),
+	eObjType(eType),
+	nNumType(SVX_NUM_ARABIC),
+    sNumberSeparator( ::rtl::OUString::createFromAscii(". ") ),
+	nPos(1),
+	nLevel(0),
+	sSeparator( String::CreateFromAscii( ": " ) ),
+	bIgnoreSeqOpts(sal_False),
+	bCopyAttributes(sal_False)
+{
+	if (pOleId)
+		aOleId = *pOleId;
+}
+
+/*--------------------------------------------------------------------
+	Beschreibung:
+ --------------------------------------------------------------------*/
+
+InsCaptionOpt::InsCaptionOpt(const InsCaptionOpt& rOpt)
+{
+	*this = rOpt;
+}
+
+/*--------------------------------------------------------------------
+	Beschreibung:
+ --------------------------------------------------------------------*/
+
+InsCaptionOpt::~InsCaptionOpt()
+{
+}
+
+/*--------------------------------------------------------------------
+	Beschreibung:
+ --------------------------------------------------------------------*/
+
+InsCaptionOpt& InsCaptionOpt::operator=( const InsCaptionOpt& rOpt )
+{
+	bUseCaption = rOpt.bUseCaption;
+	eObjType = rOpt.eObjType;
+	aOleId = rOpt.aOleId;
+	sCategory = rOpt.sCategory;
+	nNumType = rOpt.nNumType;
+    sNumberSeparator = rOpt.sNumberSeparator;
+	sCaption = rOpt.sCaption;
+	nPos = rOpt.nPos;
+	nLevel = rOpt.nLevel;
+	sSeparator = rOpt.sSeparator;
+	bIgnoreSeqOpts = rOpt.bIgnoreSeqOpts;
+    sCharacterStyle = rOpt.sCharacterStyle;
+	bCopyAttributes = rOpt.bCopyAttributes;
+
+	return *this;
+}
+
+/*--------------------------------------------------------------------
+	Beschreibung:
+ --------------------------------------------------------------------*/
+
+sal_Bool InsCaptionOpt::operator==( const InsCaptionOpt& rOpt ) const
+{
+	return (eObjType == rOpt.eObjType &&
+			aOleId == rOpt.aOleId);	// Damit gleiche Ole-IDs nicht mehrfach eingefuegt
+									// werden koennen, auf nichts weiteres vergleichen
+
+
+/*			 &&
+			sCategory == rOpt.sCategory &&
+			nNumType == rOpt.nNumType &&
+			sCaption == rOpt.sCaption &&
+			nPos == rOpt.nPos &&
+			nLevel == rOpt.nLevel &&
+			cSeparator == rOpt.cSeparator);*/
+}
+
+/*************************************************************************
+|*
+|*    InsCaptionOpt::operator>>()
+|*
+|*    Beschreibung      Stream-Leseoperator
+|*
+*************************************************************************/
+
+/*SvStream& operator>>( SvStream& rIStream, InsCaptionOpt& rCapOpt )
+{
+	rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
+	sal_uInt16 nVal;
+	sal_uInt8   cVal;
+	sal_uInt8   nVersion;
+
+	rIStream >> nVersion;
+	rIStream >> cVal;				rCapOpt.UseCaption() = cVal != 0;
+	rIStream >> nVal;				rCapOpt.eObjType = (SwCapObjType)nVal;
+	rIStream >> rCapOpt.aOleId;
+
+	rIStream.ReadByteString( rCapOpt.sCategory, eEncoding );
+	rIStream >> nVal;				rCapOpt.nNumType = nVal;
+	rIStream.ReadByteString( rCapOpt.sCaption, eEncoding );
+	rIStream >> nVal;				rCapOpt.nPos = nVal;
+	rIStream >> nVal;				rCapOpt.nLevel = nVal;
+
+	rIStream >> cVal;
+	rCapOpt.sSeparator = UniString(
+        ByteString(static_cast< char >(cVal)) , eEncoding).GetChar(0);
+
+	return rIStream;
+}
+*/
+/*************************************************************************
+|*
+|*    InsCaptionOpt::operator<<()
+|*
+|*    Beschreibung      Stream-Schreiboperator
+|*
+*************************************************************************/
+
+/*SvStream& operator<<( SvStream& rOStream, const InsCaptionOpt& rCapOpt )
+{
+	rtl_TextEncoding eEncoding = gsl_getSystemTextEncoding();
+	rOStream	<< (sal_uInt8)CAPTION_VERSION
+				<< (sal_uInt8)rCapOpt.UseCaption()
+				<< (sal_uInt16)rCapOpt.eObjType
+				<< rCapOpt.aOleId;
+
+	rOStream.WriteByteString( rCapOpt.sCategory, eEncoding );
+
+	rOStream	<< (sal_uInt16)rCapOpt.nNumType;
+
+	rOStream.WriteByteString( rCapOpt.sCaption, eEncoding );
+
+	sal_uInt8 cSep = ByteString(rCapOpt.sSeparator, eEncoding).GetChar(0);
+	rOStream 	<< (sal_uInt16)rCapOpt.nPos
+				<< (sal_uInt16)rCapOpt.nLevel
+				<< cSep;
+
+	return rOStream;
+}
+*/
+

File sw/source/core/config/dbconfig.cxx

View file
  • Ignore whitespace
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <dbconfig.hxx>
+#include <tools/debug.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <swdbdata.hxx>
+
+#include <unomid.h>
+
+using namespace utl;
+using rtl::OUString;
+using namespace com::sun::star::uno;
+
+/*--------------------------------------------------------------------
+	 Beschreibung: Ctor
+ --------------------------------------------------------------------*/
+
+const Sequence<OUString>& SwDBConfig::GetPropertyNames()
+{
+	static Sequence<OUString> aNames;
+	if(!aNames.getLength())
+	{
+		static const char* aPropNames[] =
+		{
+            "AddressBook/DataSourceName",        //  0
+            "AddressBook/Command",              //  1
+            "AddressBook/CommandType",          //  2
+            "Bibliography/CurrentDataSource/DataSourceName",        //  4
+            "Bibliography/CurrentDataSource/Command",              //  5
+            "Bibliography/CurrentDataSource/CommandType"          //  6
+        };
+        const int nCount = sizeof(aPropNames)/sizeof(const char*);
+		aNames.realloc(nCount);
+		OUString* pNames = aNames.getArray();
+		for(int i = 0; i < nCount; i++)
+			pNames[i] = OUString::createFromAscii(aPropNames[i]);
+	}
+	return aNames;
+}
+/* -----------------------------06.09.00 16:44--------------------------------
+
+ ---------------------------------------------------------------------------*/
+SwDBConfig::SwDBConfig() :
+    ConfigItem(C2U("Office.DataAccess"),
+        CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
+    pAdrImpl(0),
+    pBibImpl(0)
+{
+};
+/* -----------------------------06.09.00 16:50--------------------------------
+
+ ---------------------------------------------------------------------------*/
+SwDBConfig::~SwDBConfig()
+{
+    delete pAdrImpl;
+    delete pBibImpl;
+}
+/* -----------------------------20.02.01 12:32--------------------------------
+
+ ---------------------------------------------------------------------------*/
+void SwDBConfig::Load()
+{
+	const Sequence<OUString>& rNames = GetPropertyNames();
+    if(!pAdrImpl)
+	{
+
+        pAdrImpl = new SwDBData;
+        pAdrImpl->nCommandType = 0;
+        pBibImpl = new SwDBData;
+        pBibImpl->nCommandType = 0;
+    }
+	Sequence<Any> aValues = GetProperties(rNames);
+	const Any* pValues = aValues.getConstArray();
+	DBG_ASSERT(aValues.getLength() == rNames.getLength(), "GetProperties failed");
+	if(aValues.getLength() == rNames.getLength())
+	{
+		for(int nProp = 0; nProp < rNames.getLength(); nProp++)
+		{
+			switch(nProp)
+			{
+                case  0: pValues[nProp] >>= pAdrImpl->sDataSource;  break;
+                case  1: pValues[nProp] >>= pAdrImpl->sCommand;     break;
+                case  2: pValues[nProp] >>= pAdrImpl->nCommandType; break;
+                case  3: pValues[nProp] >>= pBibImpl->sDataSource;  break;
+                case  4: pValues[nProp] >>= pBibImpl->sCommand;     break;
+                case  5: pValues[nProp] >>= pBibImpl->nCommandType; break;
+            }
+		}
+	}
+}
+/* -----------------------------20.02.01 12:36--------------------------------
+
+ ---------------------------------------------------------------------------*/
+const SwDBData& SwDBConfig::GetAddressSource()
+{
+    if(!pAdrImpl)
+		Load();
+    return *pAdrImpl;
+}
+/* -----------------29.11.2002 11:43-----------------
+ *
+ * --------------------------------------------------*/
+const SwDBData& SwDBConfig::GetBibliographySource()
+{
+    if(!pBibImpl)
+        Load();
+    return *pBibImpl;
+}
+
+void SwDBConfig::Commit() {}
+void SwDBConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
+static SwDBConfig* pDBConfig = 0;
+
+SwDBConfig& SwDBConfig::Get()
+{
+    if (!pDBConfig)
+        pDBConfig = new SwDBConfig;
+    return *pDBConfig;
+}
+
+void SwDBConfig::Remove()
+{
+    DELETEZ( pDBConfig );
+}

File sw/source/core/config/modcfg.cxx

View file
  • Ignore whitespace
+/*************************************************************************
+ *
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
+ *
+ * OpenOffice.org - a multi-platform office productivity suite
+ *
+ * This file is part of OpenOffice.org.
+ *
+ * OpenOffice.org is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License version 3
+ * only, as published by the Free Software Foundation.
+ *
+ * OpenOffice.org 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 Lesser General Public License version 3 for more details
+ * (a copy is included in the LICENSE file that accompanied this code).
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * version 3 along with OpenOffice.org.  If not, see
+ * <http://www.openoffice.org/license.html>
+ * for a copy of the LGPLv3 License.
+ *
+ ************************************************************************/
+
+// MARKER(update_precomp.py): autogen include statement, do not remove
+#include "precompiled_sw.hxx"
+
+
+#include <hintids.hxx>
+#include <sot/clsids.hxx>
+#include <tools/stream.hxx>
+#include <vcl/svapp.hxx>
+#include <svl/mailenum.hxx>
+#include <svx/svxids.hrc>
+#include <editeng/svxenum.hxx>
+#include <tools/debug.hxx>
+#include <comcore.hrc>
+#include <tools/globname.hxx>
+#include <swtypes.hxx>
+#include <itabenum.hxx>
+#include <modcfg.hxx>
+#include <fldupde.hxx>
+#include <unotools/syslocaleoptions.hxx>
+#include <caption.hxx>
+#include <com/sun/star/uno/Any.hxx>
+#include <unotools/useroptions.hxx>
+#include <unomid.h>
+#define _SVSTDARR_STRINGSDTOR
+#include <svl/svstdarr.hxx>
+#include <editeng/wghtitem.hxx>
+#include <editeng/postitem.hxx>
+#include <editeng/udlnitem.hxx>
+#include <editeng/crsditem.hxx>
+#include <editeng/cmapitem.hxx>
+#include <editeng/colritem.hxx>
+#include <editeng/brshitem.hxx>
+#include <svl/itemset.hxx>
+
+using namespace utl;
+using rtl::OUString;
+using namespace com::sun::star::uno;
+
+#define GLOB_NAME_CALC		0
+#define GLOB_NAME_IMPRESS   1
+#define GLOB_NAME_DRAW      2
+#define GLOB_NAME_MATH      3
+#define GLOB_NAME_CHART     4
+
+SV_IMPL_PTRARR_SORT(InsCapOptArr, InsCaptionOptPtr)
+/* -----------------03.11.98 13:46-------------------
+ *
+ * --------------------------------------------------*/
+InsCaptionOpt* InsCaptionOptArr::Find(const SwCapObjType eType, const SvGlobalName *pOleId) const
+{
+	for (sal_uInt16 i = 0; i < Count(); i++ )
+	{
+		InsCaptionOpt* pObj = GetObject(i);
+		if (pObj->GetObjType() == eType &&
+			(eType != OLE_CAP ||
+			 (pOleId &&
+              pObj->GetOleId() == *pOleId)))
+			return pObj;
+	}
+
+	return 0;
+}
+
+/* -----------------03.11.98 15:05-------------------
+ *
+ * --------------------------------------------------*/
+
+const InsCaptionOpt* SwModuleOptions::GetCapOption(
+	sal_Bool bHTML, const SwCapObjType eType, const SvGlobalName *pOleId)
+{
+	if(bHTML)
+	{
+		DBG_ERROR("no caption option in sw/web!");
+		return 0;
+	}
+	else
+	{
+		sal_Bool bFound = sal_False;
+		if(eType == OLE_CAP && pOleId)
+		{
+			for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART && !bFound; nId++)
+				bFound = *pOleId == aInsertConfig.aGlobalNames[nId  ];
+			if(!bFound)
+				return aInsertConfig.pOLEMiscOpt;
+		}
+		return aInsertConfig.pCapOptions->Find(eType, pOleId);
+	}
+}
+
+/* -----------------03.11.98 15:05-------------------
+ *
+ * --------------------------------------------------*/
+
+sal_Bool SwModuleOptions::SetCapOption(sal_Bool bHTML, const InsCaptionOpt* pOpt)
+{
+	sal_Bool bRet = sal_False;
+
+	if(bHTML)
+	{
+		DBG_ERROR("no caption option in sw/web!");
+	}
+	else if (pOpt)
+	{
+		sal_Bool bFound = sal_False;
+		if(pOpt->GetObjType() == OLE_CAP && &pOpt->GetOleId())
+		{
+			for( sal_uInt16 nId = 0; nId <= GLOB_NAME_CHART; nId++)
+				bFound = pOpt->GetOleId() == aInsertConfig.aGlobalNames[nId  ];
+			if(!bFound)
+			{
+				if(aInsertConfig.pOLEMiscOpt)
+					*aInsertConfig.pOLEMiscOpt = *pOpt;
+				else
+					aInsertConfig.pOLEMiscOpt = new InsCaptionOpt(*pOpt);
+			}
+		}
+
+		InsCaptionOptArr& rArr = *aInsertConfig.pCapOptions;
+		InsCaptionOpt *pObj = rArr.Find(pOpt->GetObjType(), &pOpt->GetOleId());
+
+		if (pObj)
+		{
+			*pObj = *pOpt;
+		}
+		else
+			rArr.Insert(new InsCaptionOpt(*pOpt));
+
+		aInsertConfig.SetModified();
+		bRet = sal_True;
+	}
+
+	return bRet;
+}
+
+static SwModuleOptions* pModuleOptions = 0;
+
+SwModuleOptions::SwModuleOptions() :
+	aInsertConfig(sal_False),
+	aWebInsertConfig(sal_True),
+	aTableConfig(sal_False),
+	aWebTableConfig(sal_True),
+	bHideFieldTips(sal_False)
+{
+}
+
+SwModuleOptions& SwModuleOptions::Get()
+{
+    if (!pModuleOptions)
+        pModuleOptions = new SwModuleOptions;
+    return *pModuleOptions;
+}
+
+void SwModuleOptions::Remove()
+{
+    DELETEZ(pModuleOptions);
+}
+
+/* -----------------------------19.01.01 12:26--------------------------------
+
+ ---------------------------------------------------------------------------*/
+String SwModuleOptions::ConvertWordDelimiter(const String& rDelim, sal_Bool bFromUI)
+{
+	String sReturn;
+	if(bFromUI)
+	{
+		String sChar;
+
+		xub_StrLen i = 0;
+		sal_Unicode c;
+
+		while (i < rDelim.Len())
+		{
+			c = rDelim.GetChar(i++);
+
+			if (c == '\\')
+			{
+				c = rDelim.GetChar(i++);
+
+				switch (c)
+				{
+					case 'n':	sReturn += '\n';	break;
+					case 't':	sReturn += '\t';	break;
+					case '\\':	sReturn += '\\';	break;
+
+					case 'x':
+					{
+						sal_Unicode nVal, nChar;
+						sal_Bool bValidData = sal_True;
+						xub_StrLen n;
+						for( n = 0, nChar = 0; n < 2 && i < rDelim.Len(); ++n, ++i )
+						{
+							if( ((nVal = rDelim.GetChar( i )) >= '0') && ( nVal <= '9') )
+								nVal -= '0';
+							else if( (nVal >= 'A') && (nVal <= 'F') )
+								nVal -= 'A' - 10;
+							else if( (nVal >= 'a') && (nVal <= 'f') )
+								nVal -= 'a' - 10;
+							else
+							{
+								DBG_ERROR( "ungueltiger Hex-Wert" );
+								bValidData = sal_False;
+								break;
+							}
+
+                            (nChar <<= 4 );
+                            nChar = nChar + nVal;
+						}
+						if( bValidData )
+							sReturn += nChar;
+						break;
+					}
+
+					default:	// Unbekannt, daher nur Backslash einfuegen
+						sReturn += '\\';
+						i--;
+						break;
+				}
+			}
+			else
+				sReturn += c;
+		}
+	}
+	else
+	{
+		for (xub_StrLen i = 0; i < rDelim.Len(); i++)
+		{
+			sal_Unicode c = rDelim.GetChar(i);
+
+			switch (c)
+			{
+				case '\n':	sReturn.AppendAscii(RTL_CONSTASCII_STRINGPARAM("\\n"));	break;
+				case '\t':	sReturn.AppendAscii(RTL_CONSTASCII_STRINGPARAM("\\t"));	break;
+				case '\\':	sReturn.AppendAscii(RTL_CONSTASCII_STRINGPARAM("\\\\"));	break;
+
+				default:
+					if( c <= 0x1f || c >= 0x7f )
+					{
+						sReturn.AppendAscii( RTL_CONSTASCII_STRINGPARAM( "\\x" ))
+							+= String::CreateFromInt32( c, 16 );
+					}
+					else
+						sReturn += c;
+			}
+		}
+	}
+	return sReturn;
+}
+/* -----------------------------10.10.00 16:22--------------------------------
+
+ ---------------------------------------------------------------------------*/
+const Sequence<OUString>& SwRevisionConfig::GetPropertyNames()
+{
+	static Sequence<OUString> aNames;
+	if(!aNames.getLength())
+	{
+		const int nCount = 8;
+		aNames.realloc(nCount);
+		static const char* aPropNames[] =
+		{
+			"TextDisplay/Insert/Attribute",   			// 0
+			"TextDisplay/Insert/Color",   				// 1
+			"TextDisplay/Delete/Attribute",   			// 2
+			"TextDisplay/Delete/Color",   				// 3
+			"TextDisplay/ChangedAttribute/Attribute",   // 4
+			"TextDisplay/ChangedAttribute/Color",   	// 5
+			"LinesChanged/Mark",   						// 6
+			"LinesChanged/Color"   						// 7
+		};
+		OUString* pNames = aNames.getArray();
+		for(int i = 0; i < nCount; i++)
+			pNames[i] = OUString::createFromAscii(aPropNames[i]);
+	}
+	return aNames;
+}
+/*-- 10.10.00 16:22:22---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+SwRevisionConfig::SwRevisionConfig() :
+    ConfigItem(C2U("Office.Writer/Revision"),
+        CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE)
+{
+	aInsertAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;
+	aInsertAttr.nAttr = UNDERLINE_SINGLE;
+	aInsertAttr.nColor = COL_TRANSPARENT;
+	aDeletedAttr.nItemId = SID_ATTR_CHAR_STRIKEOUT;
+	aDeletedAttr.nAttr = STRIKEOUT_SINGLE;
+	aDeletedAttr.nColor = COL_TRANSPARENT;
+	aFormatAttr.nItemId = SID_ATTR_CHAR_WEIGHT;
+	aFormatAttr.nAttr = WEIGHT_BOLD;
+	aFormatAttr.nColor = COL_BLACK;
+
+    Load();
+}
+/*-- 10.10.00 16:22:23---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+SwRevisionConfig::~SwRevisionConfig()
+{
+}
+/*-- 10.10.00 16:22:56---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+sal_Int32 lcl_ConvertAttrToCfg(const AuthorCharAttr& rAttr)
+{
+	sal_Int32 nRet = 0;
+	switch(rAttr.nItemId)
+	{
+		case  SID_ATTR_CHAR_WEIGHT:	nRet = 1; break;
+		case  SID_ATTR_CHAR_POSTURE: nRet = 2; break;
+		case  SID_ATTR_CHAR_UNDERLINE: nRet = UNDERLINE_SINGLE == rAttr.nAttr ? 3 : 4; break;
+        case  SID_ATTR_CHAR_STRIKEOUT: nRet = 3; break;
+		case  SID_ATTR_CHAR_CASEMAP:
+		{
+			switch(rAttr.nAttr)
+			{
+				case  SVX_CASEMAP_VERSALIEN   : nRet = 5;break;
+				case  SVX_CASEMAP_GEMEINE     : nRet = 6;break;
+				case  SVX_CASEMAP_KAPITAELCHEN: nRet = 7;break;
+				case  SVX_CASEMAP_TITEL       : nRet = 8;break;
+			}
+		}
+        break;
+		case SID_ATTR_BRUSH : nRet = 9; break;
+	}
+	return nRet;
+}
+//-----------------------------------------------------------------------------
+void SwRevisionConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
+void SwRevisionConfig::Commit()
+{
+	const Sequence<OUString>& aNames = GetPropertyNames();
+	Sequence<Any> aValues(aNames.getLength());
+	Any* pValues = aValues.getArray();
+
+	for(int nProp = 0; nProp < aNames.getLength(); nProp++)
+	{
+		sal_Int32 nVal = -1;
+		switch(nProp)
+		{
+            case 0 : nVal = lcl_ConvertAttrToCfg(aInsertAttr); break;
+			case 1 : nVal = aInsertAttr.nColor 	; break;
+            case 2 : nVal = lcl_ConvertAttrToCfg(aDeletedAttr); break;
+			case 3 : nVal = aDeletedAttr.nColor ; break;
+            case 4 : nVal = lcl_ConvertAttrToCfg(aFormatAttr); break;
+			case 5 : nVal = aFormatAttr.nColor 	; break;
+			case 6 : nVal = nMarkAlign 			; break;
+			case 7 : nVal = aMarkColor.GetColor(); break;
+		}
+		pValues[nProp] <<= nVal;
+	}
+	PutProperties(aNames, aValues);
+}
+/*-- 10.10.00 16:22:56---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+void lcl_ConvertCfgToAttr(sal_Int32 nVal, AuthorCharAttr& rAttr, sal_Bool bDelete = sal_False)
+{
+	rAttr.nItemId = rAttr.nAttr = 0;
+	switch(nVal)
+	{
+		case 1: rAttr.nItemId = SID_ATTR_CHAR_WEIGHT;	rAttr.nAttr = WEIGHT_BOLD              ; break;
+		case 2: rAttr.nItemId = SID_ATTR_CHAR_POSTURE;  rAttr.nAttr = ITALIC_NORMAL            ; break;
+        case 3: if(bDelete)
+                {
+                    rAttr.nItemId = SID_ATTR_CHAR_STRIKEOUT;
+                    rAttr.nAttr = STRIKEOUT_SINGLE;
+                }
+                else
+                {
+                    rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;
+                    rAttr.nAttr = UNDERLINE_SINGLE;
+                }
+        break;
+		case 4: rAttr.nItemId = SID_ATTR_CHAR_UNDERLINE;rAttr.nAttr = UNDERLINE_DOUBLE         ; break;
+		case 5: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP;  rAttr.nAttr = SVX_CASEMAP_VERSALIEN    ; break;
+		case 6: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP;  rAttr.nAttr = SVX_CASEMAP_GEMEINE      ; break;
+		case 7: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP;  rAttr.nAttr = SVX_CASEMAP_KAPITAELCHEN ; break;
+		case 8: rAttr.nItemId = SID_ATTR_CHAR_CASEMAP;  rAttr.nAttr = SVX_CASEMAP_TITEL        ; break;
+		case 9: rAttr.nItemId = SID_ATTR_BRUSH;	break;
+	}
+}
+void SwRevisionConfig::Load()
+{
+	const Sequence<OUString>& aNames = GetPropertyNames();
+	Sequence<Any> aValues = GetProperties(aNames);
+	const Any* pValues = aValues.getConstArray();
+	DBG_ASSERT(aValues.getLength() == aNames.getLength(), "GetProperties failed");
+	if(aValues.getLength() == aNames.getLength())
+	{
+		for(int nProp = 0; nProp < aNames.getLength(); nProp++)
+		{
+			if(pValues[nProp].hasValue())
+			{
+				sal_Int32 nVal = 0;
+				pValues[nProp] >>= nVal;
+				switch(nProp)
+				{
+					case 0 : lcl_ConvertCfgToAttr(nVal, aInsertAttr); break;
+					case 1 : aInsertAttr.nColor 	= nVal; break;
+                    case 2 : lcl_ConvertCfgToAttr(nVal, aDeletedAttr, sal_True); break;
+					case 3 : aDeletedAttr.nColor 	= nVal; break;
+					case 4 : lcl_ConvertCfgToAttr(nVal, aFormatAttr); break;
+					case 5 : aFormatAttr.nColor 	= nVal; break;
+                    case 6 : nMarkAlign = sal::static_int_cast< sal_uInt16, sal_Int32>(nVal); break;
+					case 7 : aMarkColor.SetColor(nVal); break;
+				}
+			}
+		}
+	}
+}
+/* -----------------------------10.10.00 16:22--------------------------------
+
+ ---------------------------------------------------------------------------*/
+enum InsertConfigProp
+{
+    INS_PROP_TABLE_HEADER = 0,
+    INS_PROP_TABLE_REPEATHEADER,                        // 1
+    INS_PROP_TABLE_BORDER,                              // 2
+    INS_PROP_TABLE_SPLIT,                               // 3 from here not in writer/web
+    INS_PROP_CAP_AUTOMATIC,                             // 4
+    INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST,            // 5
+    INS_PROP_CAP_OBJECT_TABLE_ENABLE,                   // 6
+    INS_PROP_CAP_OBJECT_TABLE_CATEGORY,                 // 7
+    INS_PROP_CAP_OBJECT_TABLE_NUMBERING,                // 8
+    INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR,       // 9
+    INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT,              //10
+    INS_PROP_CAP_OBJECT_TABLE_DELIMITER,                //11
+    INS_PROP_CAP_OBJECT_TABLE_LEVEL,                    //12
+    INS_PROP_CAP_OBJECT_TABLE_POSITION,                 //13
+    INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE,           //14
+    INS_PROP_CAP_OBJECT_FRAME_ENABLE,                   //15
+    INS_PROP_CAP_OBJECT_FRAME_CATEGORY,                 //16
+    INS_PROP_CAP_OBJECT_FRAME_NUMBERING,                //17
+    INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR,       //18
+    INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT,              //19
+    INS_PROP_CAP_OBJECT_FRAME_DELIMITER,                //20
+    INS_PROP_CAP_OBJECT_FRAME_LEVEL,                    //21
+    INS_PROP_CAP_OBJECT_FRAME_POSITION,                 //22
+    INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE,           //23
+    INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE,                          //24
+    INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY,               //25
+    INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING,              //26
+    INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR,     //27
+    INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT,            //28
+    INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER,              //29
+    INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL,                  //30
+    INS_PROP_CAP_OBJECT_GRAPHIC_POSITION,               //31
+    INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE,         //32
+    INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES,        //33
+    INS_PROP_CAP_OBJECT_CALC_ENABLE,                             //34
+    INS_PROP_CAP_OBJECT_CALC_CATEGORY,                  //35
+    INS_PROP_CAP_OBJECT_CALC_NUMBERING,                 //36
+    INS_PROP_CAP_OBJECT_CALC_NUMBERINGSEPARATOR,        //37
+    INS_PROP_CAP_OBJECT_CALC_CAPTIONTEXT,               //38
+    INS_PROP_CAP_OBJECT_CALC_DELIMITER,                 //39
+    INS_PROP_CAP_OBJECT_CALC_LEVEL,                     //40
+    INS_PROP_CAP_OBJECT_CALC_POSITION,                  //41
+    INS_PROP_CAP_OBJECT_CALC_CHARACTERSTYLE,            //42
+    INS_PROP_CAP_OBJECT_CALC_APPLYATTRIBUTES,           //43
+    INS_PROP_CAP_OBJECT_IMPRESS_ENABLE,                          //44
+    INS_PROP_CAP_OBJECT_IMPRESS_CATEGORY,               //45
+    INS_PROP_CAP_OBJECT_IMPRESS_NUMBERING,              //46
+    INS_PROP_CAP_OBJECT_IMPRESS_NUMBERINGSEPARATOR,     //47
+    INS_PROP_CAP_OBJECT_IMPRESS_CAPTIONTEXT,            //48
+    INS_PROP_CAP_OBJECT_IMPRESS_DELIMITER,              //49
+    INS_PROP_CAP_OBJECT_IMPRESS_LEVEL,                  //50
+    INS_PROP_CAP_OBJECT_IMPRESS_POSITION,               //51
+    INS_PROP_CAP_OBJECT_IMPRESS_CHARACTERSTYLE,         //52
+    INS_PROP_CAP_OBJECT_IMPRESS_APPLYATTRIBUTES,        //53
+    INS_PROP_CAP_OBJECT_CHART_ENABLE,                            //54
+    INS_PROP_CAP_OBJECT_CHART_CATEGORY,                 //55
+    INS_PROP_CAP_OBJECT_CHART_NUMBERING,                //56
+    INS_PROP_CAP_OBJECT_CHART_NUMBERINGSEPARATOR,       //57
+    INS_PROP_CAP_OBJECT_CHART_CAPTIONTEXT,              //58
+    INS_PROP_CAP_OBJECT_CHART_DELIMITER,                //59
+    INS_PROP_CAP_OBJECT_CHART_LEVEL,                    //60
+    INS_PROP_CAP_OBJECT_CHART_POSITION,                 //61
+    INS_PROP_CAP_OBJECT_CHART_CHARACTERSTYLE,           //62
+    INS_PROP_CAP_OBJECT_CHART_APPLYATTRIBUTES,          //63
+    INS_PROP_CAP_OBJECT_FORMULA_ENABLE,                          //64
+    INS_PROP_CAP_OBJECT_FORMULA_CATEGORY,               //65
+    INS_PROP_CAP_OBJECT_FORMULA_NUMBERING,              //66
+    INS_PROP_CAP_OBJECT_FORMULA_NUMBERINGSEPARATOR,     //67
+    INS_PROP_CAP_OBJECT_FORMULA_CAPTIONTEXT,            //68
+    INS_PROP_CAP_OBJECT_FORMULA_DELIMITER,              //69
+    INS_PROP_CAP_OBJECT_FORMULA_LEVEL,                  //70
+    INS_PROP_CAP_OBJECT_FORMULA_POSITION,               //71
+    INS_PROP_CAP_OBJECT_FORMULA_CHARACTERSTYLE,         //72
+    INS_PROP_CAP_OBJECT_FORMULA_APPLYATTRIBUTES,        //73
+    INS_PROP_CAP_OBJECT_DRAW_ENABLE,                             //74
+    INS_PROP_CAP_OBJECT_DRAW_CATEGORY,                  //75
+    INS_PROP_CAP_OBJECT_DRAW_NUMBERING,                 //76
+    INS_PROP_CAP_OBJECT_DRAW_NUMBERINGSEPARATOR,        //77
+    INS_PROP_CAP_OBJECT_DRAW_CAPTIONTEXT,               //78
+    INS_PROP_CAP_OBJECT_DRAW_DELIMITER,                 //79
+    INS_PROP_CAP_OBJECT_DRAW_LEVEL,                     //80
+    INS_PROP_CAP_OBJECT_DRAW_POSITION,                  //81
+    INS_PROP_CAP_OBJECT_DRAW_CHARACTERSTYLE,            //82
+    INS_PROP_CAP_OBJECT_DRAW_APPLYATTRIBUTES,           //83
+    INS_PROP_CAP_OBJECT_OLEMISC_ENABLE,                          //84
+    INS_PROP_CAP_OBJECT_OLEMISC_CATEGORY,               //85
+    INS_PROP_CAP_OBJECT_OLEMISC_NUMBERING,              //86
+    INS_PROP_CAP_OBJECT_OLEMISC_NUMBERINGSEPARATOR,     //87
+    INS_PROP_CAP_OBJECT_OLEMISC_CAPTIONTEXT,            //88
+    INS_PROP_CAP_OBJECT_OLEMISC_DELIMITER,              //89
+    INS_PROP_CAP_OBJECT_OLEMISC_LEVEL,                  //90
+    INS_PROP_CAP_OBJECT_OLEMISC_POSITION,               //91
+    INS_PROP_CAP_OBJECT_OLEMISC_CHARACTERSTYLE,         //92
+    INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES        //93
+};    
+const Sequence<OUString>& SwInsertConfig::GetPropertyNames()
+{
+	static Sequence<OUString> aNames;
+	static Sequence<OUString> aWebNames;
+	if(!aNames.getLength())
+	{
+		static const char* aPropNames[] =
+		{
+            "Table/Header",                                                 // 0
+            "Table/RepeatHeader",                                           // 1
+            "Table/Border",                                                 // 2
+            "Table/Split",                                                  // 3 from here not in writer/web
+            "Caption/Automatic",                                            // 4
+            "Caption/CaptionOrderNumberingFirst",                           // 5
+            "Caption/WriterObject/Table/Enable",                            // 6
+            "Caption/WriterObject/Table/Settings/Category",                 // 7
+            "Caption/WriterObject/Table/Settings/Numbering",                // 8
+            "Caption/WriterObject/Table/Settings/NumberingSeparator",       // 9
+            "Caption/WriterObject/Table/Settings/CaptionText",              //10
+            "Caption/WriterObject/Table/Settings/Delimiter",                //11
+            "Caption/WriterObject/Table/Settings/Level",                    //12
+            "Caption/WriterObject/Table/Settings/Position",                 //13
+            "Caption/WriterObject/Table/Settings/CharacterStyle",           //14
+            "Caption/WriterObject/Frame/Enable",                            //15
+            "Caption/WriterObject/Frame/Settings/Category",                 //16
+            "Caption/WriterObject/Frame/Settings/Numbering",                //17
+            "Caption/WriterObject/Frame/Settings/NumberingSeparator",       //18
+            "Caption/WriterObject/Frame/Settings/CaptionText",              //19
+            "Caption/WriterObject/Frame/Settings/Delimiter",                //20
+            "Caption/WriterObject/Frame/Settings/Level",                    //21
+            "Caption/WriterObject/Frame/Settings/Position",                 //22
+            "Caption/WriterObject/Frame/Settings/CharacterStyle",           //23
+            "Caption/WriterObject/Graphic/Enable",                          //24
+            "Caption/WriterObject/Graphic/Settings/Category",               //25
+            "Caption/WriterObject/Graphic/Settings/Numbering",              //26
+            "Caption/WriterObject/Graphic/Settings/NumberingSeparator",     //27
+            "Caption/WriterObject/Graphic/Settings/CaptionText",            //28
+            "Caption/WriterObject/Graphic/Settings/Delimiter",              //29
+            "Caption/WriterObject/Graphic/Settings/Level",                  //30
+            "Caption/WriterObject/Graphic/Settings/Position",               //31
+            "Caption/WriterObject/Graphic/Settings/CharacterStyle",         //32
+            "Caption/WriterObject/Graphic/Settings/ApplyAttributes",        //33
+            "Caption/OfficeObject/Calc/Enable",                             //34
+            "Caption/OfficeObject/Calc/Settings/Category",                  //35
+            "Caption/OfficeObject/Calc/Settings/Numbering",                 //36
+            "Caption/OfficeObject/Calc/Settings/NumberingSeparator",        //37
+            "Caption/OfficeObject/Calc/Settings/CaptionText",               //38
+            "Caption/OfficeObject/Calc/Settings/Delimiter",                 //39
+            "Caption/OfficeObject/Calc/Settings/Level",                     //40
+            "Caption/OfficeObject/Calc/Settings/Position",                  //41
+            "Caption/OfficeObject/Calc/Settings/CharacterStyle",            //42
+            "Caption/OfficeObject/Calc/Settings/ApplyAttributes",           //43
+            "Caption/OfficeObject/Impress/Enable",                          //44
+            "Caption/OfficeObject/Impress/Settings/Category",               //45
+            "Caption/OfficeObject/Impress/Settings/Numbering",              //46
+            "Caption/OfficeObject/Impress/Settings/NumberingSeparator",     //47
+            "Caption/OfficeObject/Impress/Settings/CaptionText",            //48
+            "Caption/OfficeObject/Impress/Settings/Delimiter",              //49
+            "Caption/OfficeObject/Impress/Settings/Level",                  //50
+            "Caption/OfficeObject/Impress/Settings/Position",               //51
+            "Caption/OfficeObject/Impress/Settings/CharacterStyle",         //52
+            "Caption/OfficeObject/Impress/Settings/ApplyAttributes",        //53
+            "Caption/OfficeObject/Chart/Enable",                            //54
+            "Caption/OfficeObject/Chart/Settings/Category",                 //55
+            "Caption/OfficeObject/Chart/Settings/Numbering",                //56
+            "Caption/OfficeObject/Chart/Settings/NumberingSeparator",       //57
+            "Caption/OfficeObject/Chart/Settings/CaptionText",              //58
+            "Caption/OfficeObject/Chart/Settings/Delimiter",                //59
+            "Caption/OfficeObject/Chart/Settings/Level",                    //60
+            "Caption/OfficeObject/Chart/Settings/Position",                 //61
+            "Caption/OfficeObject/Chart/Settings/CharacterStyle",           //62
+            "Caption/OfficeObject/Chart/Settings/ApplyAttributes",          //63
+            "Caption/OfficeObject/Formula/Enable",                          //64
+            "Caption/OfficeObject/Formula/Settings/Category",               //65
+            "Caption/OfficeObject/Formula/Settings/Numbering",              //66
+            "Caption/OfficeObject/Formula/Settings/NumberingSeparator",     //67
+            "Caption/OfficeObject/Formula/Settings/CaptionText",            //68
+            "Caption/OfficeObject/Formula/Settings/Delimiter",              //69
+            "Caption/OfficeObject/Formula/Settings/Level",                  //70
+            "Caption/OfficeObject/Formula/Settings/Position",               //71
+            "Caption/OfficeObject/Formula/Settings/CharacterStyle",         //72
+            "Caption/OfficeObject/Formula/Settings/ApplyAttributes",        //73
+            "Caption/OfficeObject/Draw/Enable",                             //74
+            "Caption/OfficeObject/Draw/Settings/Category",                  //75
+            "Caption/OfficeObject/Draw/Settings/Numbering",                 //76
+            "Caption/OfficeObject/Draw/Settings/NumberingSeparator",        //77
+            "Caption/OfficeObject/Draw/Settings/CaptionText",               //78
+            "Caption/OfficeObject/Draw/Settings/Delimiter",                 //79
+            "Caption/OfficeObject/Draw/Settings/Level",                     //80
+            "Caption/OfficeObject/Draw/Settings/Position",                  //81
+            "Caption/OfficeObject/Draw/Settings/CharacterStyle",            //82
+            "Caption/OfficeObject/Draw/Settings/ApplyAttributes",           //83
+            "Caption/OfficeObject/OLEMisc/Enable",                          //84
+            "Caption/OfficeObject/OLEMisc/Settings/Category",               //85
+            "Caption/OfficeObject/OLEMisc/Settings/Numbering",              //86
+            "Caption/OfficeObject/OLEMisc/Settings/NumberingSeparator",     //87
+            "Caption/OfficeObject/OLEMisc/Settings/CaptionText",            //88
+            "Caption/OfficeObject/OLEMisc/Settings/Delimiter",              //89
+            "Caption/OfficeObject/OLEMisc/Settings/Level",                  //90
+            "Caption/OfficeObject/OLEMisc/Settings/Position",               //91
+            "Caption/OfficeObject/OLEMisc/Settings/CharacterStyle",         //92
+            "Caption/OfficeObject/OLEMisc/Settings/ApplyAttributes"         //93
+        };                                                                  
+        const int nCount = INS_PROP_CAP_OBJECT_OLEMISC_APPLYATTRIBUTES + 1;
+        const int nWebCount = INS_PROP_TABLE_BORDER + 1;
+		aNames.realloc(nCount);
+		aWebNames.realloc(nWebCount);
+		OUString* pNames = aNames.getArray();
+		OUString* pWebNames = aWebNames.getArray();
+		int i;
+		for(i = 0; i < nCount; i++)
+			pNames[i] = C2U(aPropNames[i]);
+		for(i = 0; i < nWebCount; i++)
+			pWebNames[i] = C2U(aPropNames[i]);
+	}
+	return bIsWeb ? aWebNames : aNames;
+}
+/*-- 10.10.00 16:22:22---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+SwInsertConfig::SwInsertConfig(sal_Bool bWeb) :
+    ConfigItem(bWeb ? C2U("Office.WriterWeb/Insert") : C2U("Office.Writer/Insert"),
+        CONFIG_MODE_DELAYED_UPDATE|CONFIG_MODE_RELEASE_TREE),
+	pCapOptions(0),
+	pOLEMiscOpt(0),
+    bInsWithCaption( sal_False ),
+    bCaptionOrderNumberingFirst( sal_False ),
+    aInsTblOpts(0,0),
+    bIsWeb(bWeb)
+{
+	aGlobalNames[GLOB_NAME_CALC	  ] = SvGlobalName(SO3_SC_CLASSID);
+	aGlobalNames[GLOB_NAME_IMPRESS] = SvGlobalName(SO3_SIMPRESS_CLASSID);
+	aGlobalNames[GLOB_NAME_DRAW   ] = SvGlobalName(SO3_SDRAW_CLASSID);
+	aGlobalNames[GLOB_NAME_MATH   ] = SvGlobalName(SO3_SM_CLASSID);
+	aGlobalNames[GLOB_NAME_CHART  ] = SvGlobalName(SO3_SCH_CLASSID);
+	if(!bIsWeb)
+		pCapOptions = new InsCaptionOptArr;
+
+    Load();
+}
+/*-- 10.10.00 16:22:23---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+SwInsertConfig::~SwInsertConfig()
+{
+	delete pCapOptions;
+	delete pOLEMiscOpt;
+}
+/*-- 10.10.00 16:22:56---------------------------------------------------
+
+  -----------------------------------------------------------------------*/
+void lcl_WriteOpt(const InsCaptionOpt& rOpt, Any* pValues, sal_Int32 nProp, sal_Int32 nOffset)
+{
+	switch(nOffset)
+	{
+		case 0:
+		{
+			sal_Bool bTemp = rOpt.UseCaption();
+			pValues[nProp].setValue(&bTemp, ::getBooleanCppuType());
+		}
+		break;//Enable
+		case 1: pValues[nProp] <<= OUString(rOpt.GetCategory()); break;//Category
+		case 2: pValues[nProp] <<= (sal_Int32)rOpt.GetNumType(); break;//Numbering",
+        case 3: pValues[nProp] <<= rOpt.GetNumSeparator(); break;//NumberingSeparator",
+        case 4: pValues[nProp] <<= OUString(rOpt.GetCaption());  break;//CaptionText",
+        case 5: pValues[nProp] <<= OUString(rOpt.GetSeparator());break;//Delimiter",
+        case 6: pValues[nProp] <<= (sal_Int32)rOpt.GetLevel();   break;//Level",
+        case 7: pValues[nProp] <<= (sal_Int32)rOpt.GetPos();     break;//Position",
+        case 8: pValues[nProp] <<= (::rtl::OUString&)rOpt.GetCharacterStyle(); break; //CharacterStyle
+        case 9: pValues[nProp] <<= rOpt.CopyAttributes(); break; //ApplyAttributes
+	}
+}
+//-----------------------------------------------------------------------------
+void SwInsertConfig::Notify( const ::com::sun::star::uno::Sequence< rtl::OUString >& ) {}
+
+void SwInsertConfig::Commit()
+{
+	const Sequence<OUString>& aNames = GetPropertyNames();
+	Sequence<Any> aValues(aNames.getLength());
+	Any* pValues = aValues.getArray();
+
+	const Type& rType = ::getBooleanCppuType();
+	for(int nProp = 0; nProp < aNames.getLength(); nProp++)
+	{
+		const InsCaptionOpt* pWriterTableOpt = 0;
+		const InsCaptionOpt* pWriterFrameOpt = 0;
+		const InsCaptionOpt* pWriterGraphicOpt = 0;
+		const InsCaptionOpt* pOLECalcOpt = 0;
+		const InsCaptionOpt* pOLEImpressOpt = 0;
+		const InsCaptionOpt* pOLEChartOpt = 0;
+		const InsCaptionOpt* pOLEFormulaOpt = 0;
+		const InsCaptionOpt* pOLEDrawOpt = 0;
+		if(pCapOptions)
+		{
+			pWriterTableOpt = pCapOptions->Find(TABLE_CAP, 0);
+			pWriterFrameOpt = pCapOptions->Find(FRAME_CAP, 0);
+			pWriterGraphicOpt = pCapOptions->Find(GRAPHIC_CAP, 0);
+			pOLECalcOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_CALC]);
+			pOLEImpressOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_IMPRESS]);
+			pOLEDrawOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_DRAW   ]);
+			pOLEFormulaOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_MATH   ]);
+			pOLEChartOpt = pCapOptions->Find(OLE_CAP, &aGlobalNames[GLOB_NAME_CHART  ]);
+		}
+		switch(nProp)
+		{
+            case INS_PROP_TABLE_HEADER:
+			{
+                sal_Bool bVal = 0 !=(aInsTblOpts.mnInsMode & tabopts::HEADLINE); pValues[nProp].setValue(&bVal, rType);
+			}
+			break;//"Table/Header",
+            case INS_PROP_TABLE_REPEATHEADER:
+			{
+                sal_Bool bVal = (aInsTblOpts.mnRowsToRepeat>0); pValues[nProp].setValue(&bVal, rType);
+			}
+			break;//"Table/RepeatHeader",
+            case INS_PROP_TABLE_BORDER:
+			{
+                sal_Bool bVal = 0 !=(aInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER ); pValues[nProp].setValue(&bVal, rType);
+			}
+			break;//"Table/Border",
+            case INS_PROP_TABLE_SPLIT:
+			{
+                sal_Bool bVal = 0 !=(aInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT); pValues[nProp].setValue(&bVal, rType);
+			}
+			break;//"Table/Split",
+            case INS_PROP_CAP_AUTOMATIC: pValues[nProp].setValue(&bInsWithCaption, rType);break;//"Caption/Automatic",
+            case INS_PROP_CAP_CAPTIONORDERNUMBERINGFIRST: 
+                pValues[nProp] <<= bCaptionOrderNumberingFirst;
+            break;//"Caption/CaptionOrderNumberingFirst"
+
+            case INS_PROP_CAP_OBJECT_TABLE_ENABLE:
+            case INS_PROP_CAP_OBJECT_TABLE_CATEGORY:
+            case INS_PROP_CAP_OBJECT_TABLE_NUMBERING:
+            case INS_PROP_CAP_OBJECT_TABLE_NUMBERINGSEPARATOR:
+            case INS_PROP_CAP_OBJECT_TABLE_CAPTIONTEXT:
+            case INS_PROP_CAP_OBJECT_TABLE_DELIMITER:
+            case INS_PROP_CAP_OBJECT_TABLE_LEVEL:
+            case INS_PROP_CAP_OBJECT_TABLE_POSITION:
+            case INS_PROP_CAP_OBJECT_TABLE_CHARACTERSTYLE:
+					if(pWriterTableOpt)
+                        lcl_WriteOpt(*pWriterTableOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_TABLE_ENABLE);
+			break;
+            case INS_PROP_CAP_OBJECT_FRAME_ENABLE:
+            case INS_PROP_CAP_OBJECT_FRAME_CATEGORY:
+            case INS_PROP_CAP_OBJECT_FRAME_NUMBERING:
+            case INS_PROP_CAP_OBJECT_FRAME_NUMBERINGSEPARATOR:
+            case INS_PROP_CAP_OBJECT_FRAME_CAPTIONTEXT:
+            case INS_PROP_CAP_OBJECT_FRAME_DELIMITER:
+            case INS_PROP_CAP_OBJECT_FRAME_LEVEL:
+            case INS_PROP_CAP_OBJECT_FRAME_POSITION:
+            case INS_PROP_CAP_OBJECT_FRAME_CHARACTERSTYLE:
+					if(pWriterFrameOpt)
+                        lcl_WriteOpt(*pWriterFrameOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_FRAME_ENABLE);
+            break;
+            case INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_CATEGORY:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERING:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_NUMBERINGSEPARATOR:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_CAPTIONTEXT:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_DELIMITER:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_LEVEL:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_POSITION:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_CHARACTERSTYLE:
+            case INS_PROP_CAP_OBJECT_GRAPHIC_APPLYATTRIBUTES:
+					if(pWriterGraphicOpt)
+                        lcl_WriteOpt(*pWriterGraphicOpt, pValues, nProp, nProp - INS_PROP_CAP_OBJECT_GRAPHIC_ENABLE);
+	        break;
+            case INS_PROP_CAP_OBJECT_CALC_ENABLE:
+            case INS_PROP_CAP_OBJECT_CALC_CATEGORY:
+            case INS_PROP_CAP_OBJECT_CALC_NUMBERING:
</