summaryrefslogtreecommitdiff
path: root/sw/inc
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@suse.cz>2011-03-23 17:00:12 +0100
committerJan Holesovsky <kendy@suse.cz>2011-03-23 17:00:12 +0100
commit5630cca2031eeeaa20c916ea9542ccef2327349f (patch)
treee62a262b1d9e1fcbaee23cfefd0ac2cefbc2beb0 /sw/inc
parent0562ba185b5c4783b8f59aa3a3ae8d1ef68011d3 (diff)
parentf6c764706cd411d3353666da91b334a899a12154 (diff)
Merge commit 'ooo/DEV300_m103'
Conflicts: sw/inc/calbck.hxx sw/inc/crsrsh.hxx sw/inc/dcontact.hxx sw/inc/doc.hxx sw/inc/docufld.hxx sw/inc/editsh.hxx sw/inc/expfld.hxx sw/inc/fchrfmt.hxx sw/inc/fmtcol.hxx sw/inc/fmthdft.hxx sw/inc/fmtpdsc.hxx sw/inc/format.hxx sw/inc/frmfmt.hxx sw/inc/ndhints.hxx sw/inc/ndtxt.hxx sw/inc/node.hxx sw/inc/numrule.hxx sw/inc/paratr.hxx sw/inc/swtable.hxx sw/inc/unocrsr.hxx sw/inc/unofield.hxx sw/inc/unoframe.hxx sw/inc/unoport.hxx sw/inc/unostyle.hxx sw/inc/usrfld.hxx sw/inc/viewopt.hxx sw/inc/viewsh.hxx sw/source/core/access/accframebase.cxx sw/source/core/access/accmap.cxx sw/source/core/access/accnotextframe.cxx sw/source/core/access/accpara.cxx sw/source/core/access/accpara.hxx sw/source/core/attr/calbck.cxx sw/source/core/crsr/callnk.cxx sw/source/core/crsr/crsrsh.cxx sw/source/core/doc/acmplwrd.cxx sw/source/core/doc/doc.cxx sw/source/core/doc/docdesc.cxx sw/source/core/doc/docdraw.cxx sw/source/core/doc/docfly.cxx sw/source/core/doc/docfmt.cxx sw/source/core/doc/doclay.cxx sw/source/core/doc/docnew.cxx sw/source/core/doc/docnum.cxx sw/source/core/doc/doctxm.cxx sw/source/core/doc/fmtcol.cxx sw/source/core/doc/htmltbl.cxx sw/source/core/doc/number.cxx sw/source/core/docnode/ndsect.cxx sw/source/core/docnode/ndtbl.cxx sw/source/core/docnode/node.cxx sw/source/core/docnode/node2lay.cxx sw/source/core/docnode/section.cxx sw/source/core/docnode/swbaslnk.cxx sw/source/core/draw/dcontact.cxx sw/source/core/draw/dview.cxx sw/source/core/edit/autofmt.cxx sw/source/core/edit/editsh.cxx sw/source/core/edit/edlingu.cxx sw/source/core/fields/authfld.cxx sw/source/core/fields/dbfld.cxx sw/source/core/fields/docufld.cxx sw/source/core/fields/expfld.cxx sw/source/core/fields/reffld.cxx sw/source/core/fields/tblcalc.cxx sw/source/core/frmedt/fefly1.cxx sw/source/core/frmedt/feshview.cxx sw/source/core/frmedt/tblsel.cxx sw/source/core/inc/flyfrm.hxx sw/source/core/inc/prevwpage.hxx sw/source/core/inc/rolbck.hxx sw/source/core/inc/txtfrm.hxx sw/source/core/layout/atrfrm.cxx sw/source/core/layout/findfrm.cxx sw/source/core/layout/flowfrm.cxx sw/source/core/layout/fly.cxx sw/source/core/layout/flycnt.cxx sw/source/core/layout/flylay.cxx sw/source/core/layout/frmtool.cxx sw/source/core/layout/hffrm.cxx sw/source/core/layout/pagechg.cxx sw/source/core/layout/pagedesc.cxx sw/source/core/layout/paintfrm.cxx sw/source/core/layout/sectfrm.cxx sw/source/core/layout/ssfrm.cxx sw/source/core/layout/tabfrm.cxx sw/source/core/layout/wsfrm.cxx sw/source/core/objectpositioning/tocntntanchoredobjectposition.cxx sw/source/core/table/swtable.cxx sw/source/core/text/EnhancedPDFExportHelper.cxx sw/source/core/text/inftxt.cxx sw/source/core/text/porfld.cxx sw/source/core/text/txtdrop.cxx sw/source/core/text/txtfly.cxx sw/source/core/text/txtfrm.cxx sw/source/core/text/txtio.cxx sw/source/core/text/txttab.cxx sw/source/core/tox/tox.cxx sw/source/core/txtnode/atrflyin.cxx sw/source/core/txtnode/fmtatr2.cxx sw/source/core/txtnode/ndtxt.cxx sw/source/core/undo/SwUndoPageDesc.cxx sw/source/core/undo/undraw.cxx sw/source/core/unocore/unochart.cxx sw/source/core/unocore/unocoll.cxx sw/source/core/unocore/unodraw.cxx sw/source/core/unocore/unofield.cxx sw/source/core/unocore/unoframe.cxx sw/source/core/unocore/unoftn.cxx sw/source/core/unocore/unoidx.cxx sw/source/core/unocore/unoobj2.cxx sw/source/core/unocore/unoparagraph.cxx sw/source/core/unocore/unoport.cxx sw/source/core/unocore/unoportenum.cxx sw/source/core/unocore/unoredline.cxx sw/source/core/unocore/unoredlines.cxx sw/source/core/unocore/unorefmk.cxx sw/source/core/unocore/unosect.cxx sw/source/core/unocore/unosett.cxx sw/source/core/unocore/unostyle.cxx sw/source/core/unocore/unotbl.cxx sw/source/core/unocore/unotext.cxx sw/source/core/view/viewimp.cxx sw/source/core/view/viewpg.cxx sw/source/core/view/viewsh.cxx sw/source/core/view/vnew.cxx sw/source/core/view/vprint.cxx sw/source/filter/ww8/rtfexport.cxx sw/source/filter/ww8/rtfexport.hxx sw/source/filter/ww8/wrtw8nds.cxx sw/source/filter/ww8/wrtww8gr.cxx sw/source/filter/xml/XMLRedlineImportHelper.cxx sw/source/ui/app/apphdl.cxx sw/source/ui/app/docsh.cxx sw/source/ui/app/docsh2.cxx sw/source/ui/app/swmodul1.cxx sw/source/ui/config/viewopt.cxx sw/source/ui/fldui/fldpage.cxx sw/source/ui/uiview/srcview.cxx sw/source/ui/uiview/view.cxx sw/source/ui/uno/unotxdoc.cxx sw/source/ui/vba/wordvbahelper.cxx sw/source/ui/wrtsh/wrtsh1.cxx
Diffstat (limited to 'sw/inc')
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx10
-rw-r--r--sw/inc/authfld.hxx4
-rw-r--r--sw/inc/calbck.hxx243
-rw-r--r--sw/inc/crsrsh.hxx5
-rw-r--r--sw/inc/dcontact.hxx35
-rw-r--r--sw/inc/doc.hxx25
-rw-r--r--sw/inc/docsh.hxx2
-rw-r--r--sw/inc/docufld.hxx14
-rw-r--r--sw/inc/editsh.hxx9
-rw-r--r--sw/inc/expfld.hxx8
-rw-r--r--sw/inc/fchrfmt.hxx5
-rw-r--r--sw/inc/fldbas.hxx2
-rw-r--r--sw/inc/fmtcol.hxx6
-rw-r--r--sw/inc/fmtfld.hxx8
-rw-r--r--sw/inc/fmthdft.hxx12
-rw-r--r--sw/inc/fmtmeta.hxx30
-rw-r--r--sw/inc/fmtpdsc.hxx9
-rw-r--r--sw/inc/format.hxx5
-rw-r--r--sw/inc/frmfmt.hxx8
-rw-r--r--sw/inc/ftninfo.hxx10
-rw-r--r--sw/inc/lineinfo.hxx4
-rw-r--r--sw/inc/ndhints.hxx9
-rw-r--r--sw/inc/ndnotxt.hxx2
-rw-r--r--sw/inc/ndtxt.hxx10
-rw-r--r--sw/inc/node.hxx21
-rw-r--r--sw/inc/numrule.hxx14
-rw-r--r--sw/inc/pagedesc.hxx4
-rw-r--r--sw/inc/paratr.hxx9
-rw-r--r--sw/inc/printdata.hxx9
-rw-r--r--sw/inc/reffld.hxx5
-rw-r--r--sw/inc/section.hxx12
-rw-r--r--sw/inc/swcrsr.hxx10
-rw-r--r--sw/inc/swddetbl.hxx4
-rwxr-xr-xsw/inc/switerator.hxx47
-rw-r--r--sw/inc/swtable.hxx24
-rw-r--r--sw/inc/swtblfmt.hxx6
-rw-r--r--sw/inc/swtypes.hxx2
-rw-r--r--sw/inc/tox.hxx12
-rw-r--r--sw/inc/txtatr.hxx33
-rw-r--r--sw/inc/txtftn.hxx3
-rw-r--r--sw/inc/txtinet.hxx7
-rw-r--r--sw/inc/txtrfmrk.hxx2
-rw-r--r--sw/inc/txttxmrk.hxx3
-rw-r--r--sw/inc/unobaseclass.hxx2
-rw-r--r--sw/inc/unobookmark.hxx3
-rw-r--r--sw/inc/unochart.hxx17
-rw-r--r--sw/inc/unocrsr.hxx5
-rw-r--r--sw/inc/unodraw.hxx6
-rw-r--r--sw/inc/unofield.hxx22
-rw-r--r--sw/inc/unoflatpara.hxx3
-rw-r--r--sw/inc/unoframe.hxx8
-rw-r--r--sw/inc/unoport.hxx13
-rw-r--r--sw/inc/unoredline.hxx6
-rw-r--r--sw/inc/unoredlines.hxx4
-rw-r--r--sw/inc/unosett.hxx7
-rw-r--r--sw/inc/unostyle.hxx15
-rw-r--r--sw/inc/unotbl.hxx22
-rw-r--r--sw/inc/unotext.hxx12
-rw-r--r--sw/inc/unotextmarkup.hxx6
-rw-r--r--sw/inc/unotxdoc.hxx13
-rw-r--r--sw/inc/usrfld.hxx5
-rw-r--r--sw/inc/viewopt.hxx15
-rw-r--r--sw/inc/viewsh.hxx14
63 files changed, 519 insertions, 381 deletions
diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx
index 7593aa670a99..0e995e857650 100644
--- a/sw/inc/IDocumentLayoutAccess.hxx
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -31,6 +31,7 @@
#include <swtypes.hxx>
+class ViewShell;
class SwRootFrm;
class SwFrmFmt;
class SfxItemSet;
@@ -45,12 +46,15 @@ public:
/** Returns the layout set at the document.
*/
- virtual const SwRootFrm* GetRootFrm() const = 0;
- virtual SwRootFrm* GetRootFrm() = 0;
+ virtual const ViewShell* GetCurrentViewShell() const = 0;
+ virtual ViewShell* GetCurrentViewShell() = 0; //swmod 071107//swmod 071225
+ virtual const SwRootFrm* GetCurrentLayout() const = 0;
+ virtual SwRootFrm* GetCurrentLayout() = 0; //swmod 080218
+ virtual bool HasLayout() const = 0;
/** !!!The old layout must be deleted!!!
*/
- virtual void SetRootFrm( SwRootFrm* pNew ) = 0;
+ virtual void SetCurrentViewShell( ViewShell* pNew ) = 0; //swmod 071107//swmod 071225
/**
*/
diff --git a/sw/inc/authfld.hxx b/sw/inc/authfld.hxx
index ebac43554a44..c11769d08912 100644
--- a/sw/inc/authfld.hxx
+++ b/sw/inc/authfld.hxx
@@ -81,13 +81,15 @@ class SW_DLLPUBLIC SwAuthorityFieldType : public SwFieldType
// @@@ private copy assignment, but public copy ctor? @@@
const SwAuthorityFieldType& operator=( const SwAuthorityFieldType& );
+protected:
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
SwAuthorityFieldType(SwDoc* pDoc);
SwAuthorityFieldType( const SwAuthorityFieldType& );
~SwAuthorityFieldType();
virtual SwFieldType* Copy() const;
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nWhichId );
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index e778e0366007..09d6fcbff3ed 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -26,140 +26,160 @@
*
************************************************************************/
-/*************************************************************
-#* service classes
- *************************************************************/
-
-/*
- * When an attribute in a format is changed, this change has to be propagated
- * to all dependent formats and over them to all concerned nodes.
- * In doing so it has to be decided whether the change can have an effect or
- * whether the dependent format redefines the changed attribute (such that the
- * attribute value of the dependent format occludes the changed value).
- * Furthermore, the concerned node can decide whether it makes use of the
- * changed attribute (for example: line distance for underlining was changed,
- * but the underlining attribute was not used). This way, the minimal effort
- * for reformatting is identified.
- */
#ifndef _CALBCK_HXX
#define _CALBCK_HXX
#include <tools/rtti.hxx>
#include "swdllapi.h"
+#include <boost/noncopyable.hpp>
class SwModify;
class SwClientIter;
class SfxPoolItem;
-class SvStream;
+class SfxHint;
+
+/*
+ SwModify and SwClient cooperate in propagating attribute changes.
+ If an attribute changes, the change is notified to all dependent
+ formats and other interested objects, e.g. Nodes. The clients will detect
+ if the change affects them. It could be that the changed attribute is
+ overruled in the receiving object so that its change does not become
+ effective or that the receiver is not interested in the particular attribute
+ in general (though probably in other attributes of the SwModify object they
+ are registered in).
+ As SwModify objects are derived from SwClient, they can create a chain of SwClient
+ objects where changes can get propagated through.
+ Each SwClient can be registered at only one SwModify object, while each SwModify
+ object is connected to a list of SwClient objects. If an object derived from SwClient
+ wants to get notifications from more than one SwModify object, it must create additional
+ SwClient objects. The SwDepend class allows to handle their notifications in the same
+ notification callback as it forwards the Modify() calls it receives to a "master"
+ SwClient implementation.
+ The SwClientIter class allows to iterate over the SwClient objects registered at an
+ SwModify. For historical reasons its ability to use TypeInfo to restrict this iteration
+ to objects of a particular type created a lot of code that misuses SwClient-SwModify
+ relationships that basically should be used only for Modify() callbacks.
+ This is still subject to refactoring.
+ Until this gets resolved, new SwClientIter base code should be reduced to the absolute
+ minimum and it also should be wrapped by SwIterator templates that prevent that the
+ code gets polluted by pointer casts (see switerator.hxx).
+ */
// ----------
// SwClient
// ----------
-class SW_DLLPUBLIC SwClient
+class SW_DLLPUBLIC SwClient : ::boost::noncopyable
{
+ // avoids making the details of the linked list and the callback method public
friend class SwModify;
friend class SwClientIter;
- SwClient *pLeft, *pRight; // for AVL sorting
- sal_Bool bModifyLocked : 1; // used in SwModify::Modify,
- // is really a member of SwModify
- // but here for lack of space
+ SwClient *pLeft, *pRight; // double-linked list of other clients
+ SwModify *pRegisteredIn; // event source
- sal_Bool bInModify : 1; // is in a modify. (Debug!!!)
- sal_Bool bInDocDTOR : 1; // Doc gets destroyed,
- // do not "unsubscribe"
- sal_Bool bInCache : 1; // is in BorderAttrCache of the layout,
- // unsubscribes itself then in Modify!
- sal_Bool bInSwFntCache : 1; // is in SwFont cache of the formatting
+ // in general clients should not be removed when their SwModify sends out Modify()
+ // notifications; in some rare cases this is necessary, but only the concrete SwClient
+ // sub class will know that; this flag allows to make that known
+ bool mbIsAllowedToBeRemovedInModifyCall;
-protected:
- SwModify *pRegisteredIn;
+ // callbacks received from SwModify (friend class - so these methods can be private)
+ // should be called only from SwModify the client is registered in
+ // mba: IMHO these methods should be pure virtual
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+protected:
// single argument ctors shall be explicit.
explicit SwClient(SwModify *pToRegisterIn);
+ // write access to pRegisteredIn shall be granted only to the object itself (protected access)
+ SwModify* GetRegisteredInNonConst() const { return pRegisteredIn; }
+ void SetIsAllowedToBeRemovedInModifyCall( bool bSet ) { mbIsAllowedToBeRemovedInModifyCall = bSet; }
+
public:
+
inline SwClient();
virtual ~SwClient();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ // in case an SwModify object is destroyed that itself is registered in another SwModify,
+ // its SwClient objects can decide to get registered to the latter instead by calling this method
+ void CheckRegistration( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue );
+
+ // controlled access to Modify method
+ // mba: this is still considered a hack and it should be fixed; the name makes grep-ing easier
+ void ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ) { Modify ( pOldValue, pNewValue ); }
+ void SwClientNotifyCall( const SwModify& rModify, const SfxHint& rHint ) { SwClientNotify( rModify, rHint ); }
+
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
+ bool IsLast() const { return !pLeft && !pRight; }
- //rtti, derived classes may do likewise or not. When they do, it can be
- //casted typesafely via the dependency list of a Modify
+ // needed for class SwClientIter
TYPEINFO();
- void LockModify() { bModifyLocked = sal_True; }
- void UnlockModify() { bModifyLocked = sal_False; }
- void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
- void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
- sal_Bool IsModifyLocked() const { return bModifyLocked; }
- sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
- sal_Bool IsInCache() const { return bInCache; }
- sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
-
- // get client Information
+ // get information about attribute
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
-
-private:
- SwClient( const SwClient& );
- SwClient &operator=( const SwClient& );
};
inline SwClient::SwClient() :
- pLeft(0), pRight(0), pRegisteredIn(0)
-{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = sal_False; }
-
+ pLeft(0), pRight(0), pRegisteredIn(0), mbIsAllowedToBeRemovedInModifyCall(false)
+{}
// ----------
// SwModify
// ----------
// class has a doubly linked list for dependencies
-
class SW_DLLPUBLIC SwModify: public SwClient
{
- friend SvStream& operator<<( SvStream& aS, SwModify & );
+ SwClient* pRoot; // the start of the linked list of clients
+ sal_Bool bModifyLocked : 1; // don't broadcast changes now
+ sal_Bool bLockClientList : 1; // may be set when this instance notifies its clients
+ sal_Bool bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed
+ sal_Bool bInCache : 1;
+ sal_Bool bInSwFntCache : 1;
- friend class SwClientIter;
- SwClient* pRoot;
-
- SwClient *_Remove(SwClient *pDepend);
+ // mba: IMHO this method should be pure virtual
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
- SwModify() : pRoot(0) {}
+ SwModify();
+
+ // broadcasting: send notifications to all clients
+ void NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue );
+
+ // the same, but without setting bModifyLocked or checking for any of the flags
+ // mba: it would be interesting to know why this is necessary
+ // also allows to limit callback to certain type (HACK)
+ void ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType = TYPE(SwClient) );
+
+ // a more universal broadcasting mechanism
+ void CallSwClientNotify( const SfxHint& rHint ) const;
// single argument ctors shall be explicit.
- explicit SwModify(SwModify *pToRegisterIn );
+ explicit SwModify( SwModify *pToRegisterIn );
virtual ~SwModify();
- virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
void Add(SwClient *pDepend);
- SwClient *Remove(SwClient *pDepend)
- { return bInDocDTOR ? 0 : _Remove( pDepend ); }
-
+ SwClient* Remove(SwClient *pDepend);
const SwClient* GetDepends() const { return pRoot; }
- // get client information
+ // get information about attribute
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
- void SetInDocDTOR() { bInDocDTOR = sal_True; }
+ void LockModify() { bModifyLocked = sal_True; }
+ void UnlockModify() { bModifyLocked = sal_False; }
+ void SetInCache( sal_Bool bNew ) { bInCache = bNew; }
+ void SetInSwFntCache( sal_Bool bNew ) { bInSwFntCache = bNew; }
+ void SetInDocDTOR() { bInDocDTOR = sal_True; }
+ sal_Bool IsModifyLocked() const { return bModifyLocked; }
+ sal_Bool IsInDocDTOR() const { return bInDocDTOR; }
+ sal_Bool IsInCache() const { return bInCache; }
+ sal_Bool IsInSwFntCache() const { return bInSwFntCache; }
void CheckCaching( const sal_uInt16 nWhich );
-
- sal_Bool IsLastDepend() const
- { return pRoot && !pRoot->pLeft && !pRoot->pRight; }
-
-private:
- // forbidden and not implemented (see @ SwClient).
- SwModify & operator= (const SwModify &);
-
-protected:
- // forbidden and not implemented (see @ SwClient),
- // but GCC >= 3.4 needs an accessible "T (const T&)"
- // to pass a "T" as a "const T&" argument
- SwModify (const SwModify &);
+ bool IsLastDepend() { return pRoot && pRoot->IsLast(); }
+ int GetClientCount() const;
};
// ----------
@@ -167,9 +187,7 @@ protected:
// ----------
/*
- * Very useful class when an object depends on multiple objects.
- * This should have an object of the class SwDepend as member for each
- * dependency.
+ * Helper class for objects that need to depend on more than one SwClient
*/
class SW_DLLPUBLIC SwDepend: public SwClient
{
@@ -180,69 +198,66 @@ public:
SwDepend(SwClient *pTellHim, SwModify *pDepend);
SwClient* GetToTell() { return pToTell; }
- virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
// get Client information
virtual sal_Bool GetInfo( SfxPoolItem & ) const;
-private:
- // forbidden and not implemented (see @ SwClient).
- SwDepend (const SwDepend &);
- SwDepend & operator= (const SwDepend &);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
};
class SwClientIter
{
- friend SwClient* SwModify::_Remove(SwClient *); // for ptr correction
- friend void SwModify::Add(SwClient *); // only for OSL_ENSURE !
+ friend SwClient* SwModify::Remove(SwClient *); // for pointer adjustments
+ friend void SwModify::Add(SwClient *pDepend); // for pointer adjustments
- SwModify const& rRoot;
- SwClient *pAkt, *pDelNext;
- // for updating of all iterators when inserting/deleting clients, while the
- // iterator points on it
- SwClientIter *pNxtIter;
+ const SwModify& rRoot;
+
+ // the current object in an iteration
+ SwClient* pAct;
+
+ // in case the current object is already removed, the next object in the list
+ // is marked down to become the current object in the next step
+ // this is necessary because iteration requires access to members of the current object
+ SwClient* pDelNext;
- SwClient* mpWatchClient; // if set, SwModify::_Remove checks if this client is removed
+ // SwClientIter objects are tracked in linked list so that they can react
+ // when the current (pAct) or marked down (pDelNext) SwClient is removed
+ // from its SwModify
+ SwClientIter *pNxtIter;
- TypeId aSrchId; // for First/Next - look for this type
+ // iterator can be limited to return only SwClient objects of a certain type
+ TypeId aSrchId;
public:
- SW_DLLPUBLIC SwClientIter( SwModify const& );
+ SW_DLLPUBLIC SwClientIter( const SwModify& );
SW_DLLPUBLIC ~SwClientIter();
- const SwModify& GetModify() const { return rRoot; }
+ const SwModify& GetModify() const { return rRoot; }
SwClient* operator++(int);
- SwClient* operator--(int);
- SwClient* operator++();
- SwClient* operator--();
-
SwClient* GoStart();
SwClient* GoEnd();
- inline SwClient* GoRoot(); // restart from root
-
+ // returns the current SwClient object;
+ // in case this was already removed, the object marked down to become
+ // the next current one is returned
SwClient* operator()() const
- { return pDelNext == pAkt ? pAkt : pDelNext; }
+ { return pDelNext == pAct ? pAct : pDelNext; }
- int IsChanged() const { return pDelNext != pAkt; }
+ // return "true" if an object was removed from a client chain in iteration
+ // adding objects to a client chain in iteration is forbidden
+ // SwModify::Add() asserts this
+ bool IsChanged() const { return pDelNext != pAct; }
SW_DLLPUBLIC SwClient* First( TypeId nType );
SW_DLLPUBLIC SwClient* Next();
-
- const SwClient* GetWatchClient() const { return mpWatchClient; }
- void SetWatchClient( SwClient* pWatch ) { mpWatchClient = pWatch; }
+ SW_DLLPUBLIC SwClient* Last( TypeId nType );
+ SW_DLLPUBLIC SwClient* Previous();
};
-inline SwClient* SwClientIter::GoRoot()
-{
- pAkt = rRoot.pRoot;
- return (pDelNext = pAkt);
-}
-
-
-
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/inc/crsrsh.hxx b/sw/inc/crsrsh.hxx
index 2a91682b5dc4..b24d29742db2 100644
--- a/sw/inc/crsrsh.hxx
+++ b/sw/inc/crsrsh.hxx
@@ -308,6 +308,9 @@ protected:
*/
SW_DLLPRIVATE void UpdateMarkedListLevel();
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
TYPEINFO();
SwCrsrShell( SwDoc& rDoc, Window *pWin, const SwViewOption *pOpt = 0 );
@@ -315,8 +318,6 @@ public:
SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
virtual ~SwCrsrShell();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
// create new cursor and append the old one
virtual SwPaM & CreateNewShellCursor();
virtual SwPaM & GetCurrentShellCursor();
diff --git a/sw/inc/dcontact.hxx b/sw/inc/dcontact.hxx
index 07044bce0182..54df6bf10243 100644
--- a/sw/inc/dcontact.hxx
+++ b/sw/inc/dcontact.hxx
@@ -36,6 +36,7 @@
#include <list>
#include "calbck.hxx"
+#include <anchoreddrawobject.hxx>
class SfxPoolItem;
class SwFrmFmt;
@@ -47,11 +48,10 @@ class SwVirtFlyDrawObj;
class SwFmtAnchor;
class SwFlyDrawObj;
class SwRect;
-// forward declaration for class <SwDrawVirtObj>
class SwDrawContact;
struct SwPosition;
class SwIndex;
-#include <anchoreddrawobject.hxx>
+class SdrTextObj;
// The other way round: Search format for given object.
// If object is a SwVirtFlyDrawObj the format will be obtained from it.
@@ -189,7 +189,7 @@ public:
/** get data collection of anchored objects, handled by with contact
*/
- virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const = 0;
/** get minimum order number of anchored objects handled by with contact
@@ -210,13 +210,9 @@ class SW_DLLPUBLIC SwFlyDrawContact : public SwContact
private:
SwFlyDrawObj* mpMasterObj;
- /** method to determine new order number for new instance of <SwVirtFlyDrawObj>
-
- Used in method <CreateNewRef(..)>.
-
- @author OD
- */
- sal_uInt32 _GetOrdNumForNewRef( const SwFlyFrm* pFlyFrm );
+protected:
+ // virtuelle Methoden von SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
public:
TYPEINFO();
@@ -232,11 +228,6 @@ public:
virtual SdrObject* GetMaster();
virtual void SetMaster( SdrObject* _pNewMaster );
- SwVirtFlyDrawObj* CreateNewRef( SwFlyFrm* pFly );
-
- // virtual methods from SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
// override methods to control Writer fly frames,
// which are linked, and to assure that all objects anchored at/inside the
// Writer fly frame are also made visible/invisible.
@@ -245,7 +236,7 @@ public:
/** get data collection of anchored objects handled by with contact
*/
- virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
};
// new class for re-direct methods calls at a 'virtual'
@@ -416,6 +407,11 @@ class SwDrawContact : public SwContact
// no copy-constructor and no assignment operator
SwDrawContact( const SwDrawContact& );
SwDrawContact& operator=( const SwDrawContact& );
+
+ protected:
+ // virtuelle Methoden von SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
TYPEINFO();
@@ -471,9 +467,6 @@ class SwDrawContact : public SwContact
// by frame.
SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm );
- // Virtual methods of SwClient.
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
// Virtual methods of SdrObjUserCall.
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
@@ -490,7 +483,9 @@ class SwDrawContact : public SwContact
/** get data collection of anchored objects, handled by with contact
*/
- virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
+
+ static void GetTextObjectsFromFmt( std::list<SdrTextObj*>&, SwDoc* );
+ virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
};
#endif
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index 44480a7012b7..1a4e7df2df65 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -321,7 +321,7 @@ class SW_DLLPUBLIC SwDoc :
SwTOXTypes *pTOXTypes; // Tables/indices
SwDefTOXBase_Impl * pDefTOXBases; // defaults of SwTOXBase's
- SwRootFrm *pLayout; // Rootframe of the specific layout.
+ ViewShell *pCurrentView; // SwDoc should get a new member pCurrentView//swmod 071225
SdrModel *pDrawModel; // StarView Drawing
SwDocUpdtFld *pUpdtFlds; // Struct for updating fields
@@ -447,7 +447,6 @@ private:
bool mbNewFldLst : 1; // TRUE: Rebuild field-list.
bool mbCopyIsMove : 1; // TRUE: Copy is a hidden Move.
bool mbVisibleLinks : 1; // TRUE: Links are inserted visibly.
- bool mbBrowseMode : 1; // TRUE: Show document in browser mode.
bool mbInReading : 1; // TRUE: Document is in the process of being read.
bool mbInXMLImport : 1; // TRUE: During xml import, attribute portion building is not necessary.
bool mbUpdateTOX : 1; // TRUE: After loading document, update TOX.
@@ -581,6 +580,8 @@ private:
bool mbCollapseEmptyCellPara : 1;
bool mbTabAtLeftIndentForParagraphsInList; // #i89181# - see above
+ bool mbLastBrowseMode : 1;
+
sal_uInt32 n32DummyCompatabilityOptions1;
sal_uInt32 n32DummyCompatabilityOptions2;
//
@@ -935,15 +936,18 @@ public:
/** IDocumentLayoutAccess
*/
- virtual const SwRootFrm* GetRootFrm() const ;
- virtual SwRootFrm* GetRootFrm();
- virtual void SetRootFrm( SwRootFrm* pNew );
+ virtual void SetCurrentViewShell( ViewShell* pNew );//swmod 071225
virtual SwLayouter* GetLayouter();
virtual const SwLayouter* GetLayouter() const;
virtual void SetLayouter( SwLayouter* pNew );
virtual SwFrmFmt* MakeLayoutFmt( RndStdIds eRequest, const SfxItemSet* pSet );
virtual void DelLayoutFmt( SwFrmFmt *pFmt );
virtual SwFrmFmt* CopyLayoutFmt( const SwFrmFmt& rSrc, const SwFmtAnchor& rNewAnchor, bool bSetTxtFlyAtt, bool bMakeFrms );
+ virtual const ViewShell *GetCurrentViewShell() const; //swmod 080219
+ virtual ViewShell *GetCurrentViewShell();//swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later.
+ virtual const SwRootFrm *GetCurrentLayout() const;
+ virtual SwRootFrm *GetCurrentLayout();//swmod 080219
+ virtual bool HasLayout() const;
/** IDocumentTimerAccess
*/
@@ -1130,6 +1134,8 @@ public:
String GetUniqueOLEName() const;
String GetUniqueFrameName() const;
+ std::set<SwRootFrm*> GetAllLayouts();//swmod 080225
+
void SetFlyName( SwFlyFrmFmt& rFmt, const String& rName );
const SwFlyFrmFmt* FindFlyByName( const String& rName, sal_Int8 nNdTyp = 0 ) const;
@@ -1288,16 +1294,13 @@ public:
// get the set of printable pages for the XRenderable API by
// evaluating the respective settings (see implementation)
- void CalculatePagesForPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
+ void CalculatePagesForPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
sal_Int32 nDocPageCount );
void UpdatePagesForPrintingWithPostItData( SwRenderData &rData, const SwPrintUIOptions &rOptions, bool bIsPDFExport,
sal_Int32 nDocPageCount );
- void CalculatePagePairsForProspectPrinting( SwRenderData &rData, const SwPrintUIOptions &rOptions,
+ void CalculatePagePairsForProspectPrinting( const SwRootFrm& rLayout, SwRenderData &rData, const SwPrintUIOptions &rOptions,
sal_Int32 nDocPageCount );
- sal_uInt16 GetPageCount() const;
- const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
-
// PageDescriptor interface.
sal_uInt16 GetPageDescCnt() const { return aPageDescs.Count(); }
const SwPageDesc& GetPageDesc( const sal_uInt16 i ) const { return *aPageDescs[i]; }
@@ -1842,7 +1845,7 @@ public:
// update all modified OLE-Objects. The modification is called over the
// StarOne - Interface
void SetOLEObjModified()
- { if( GetRootFrm() ) aOLEModifiedTimer.Start(); }
+ { if( GetCurrentViewShell() ) aOLEModifiedTimer.Start(); } //swmod 071107//swmod 071225
// -------------------- Uno - Interfaces ---------------------------
const SwUnoCrsrTbl& GetUnoCrsrTbl() const { return *pUnoCrsrTbl; }
diff --git a/sw/inc/docsh.hxx b/sw/inc/docsh.hxx
index a20d9d54f7a4..4f644afc40b0 100644
--- a/sw/inc/docsh.hxx
+++ b/sw/inc/docsh.hxx
@@ -278,7 +278,7 @@ public:
void EnterWait( sal_Bool bLockDispatcher );
void LeaveWait( sal_Bool bLockDispatcher );
- void ToggleBrowserMode(sal_Bool bOn, SwView* pView = 0);
+ void ToggleBrowserMode(sal_Bool bOn, SwView* pView);
sal_uLong LoadStylesFromFile( const String& rURL, SwgReaderOption& rOpt,
sal_Bool bUnoCall );
diff --git a/sw/inc/docufld.hxx b/sw/inc/docufld.hxx
index 177229930bdb..d4dcbd06d2c7 100644
--- a/sw/inc/docufld.hxx
+++ b/sw/inc/docufld.hxx
@@ -639,8 +639,10 @@ public:
SwRefPageSetFieldType();
virtual SwFieldType* Copy() const;
- // Overlay, because there is nothing to update!
- virtual void Modify( SfxPoolItem *, SfxPoolItem * );
+
+protected:
+ // Overlay, because there is nothing to update!
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
};
/*--------------------------------------------------------------------
@@ -680,15 +682,13 @@ class SwRefPageGetFieldType : public SwFieldType
sal_Int16 nNumberingType;
void UpdateField( SwTxtFld* pTxtFld, _SetGetExpFlds& rSetList );
-
+protected:
+ // ueberlagert, um alle RefPageGet-Felder zu updaten
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
public:
SwRefPageGetFieldType( SwDoc* pDoc );
virtual SwFieldType* Copy() const;
-
- // Overlay in order to update all RefPageGet-fields.
- virtual void Modify( SfxPoolItem *, SfxPoolItem * );
sal_uInt16 MakeSetList( _SetGetExpFlds& rTmpLst );
-
SwDoc* GetDoc() const { return pDoc; }
};
diff --git a/sw/inc/editsh.hxx b/sw/inc/editsh.hxx
index b9c747b22ffd..0d09cda564b0 100644
--- a/sw/inc/editsh.hxx
+++ b/sw/inc/editsh.hxx
@@ -552,7 +552,7 @@ public:
sal_Bool HasOtherCnt() const;
// Apply ViewOptions with Start-/EndAction.
- inline void ApplyViewOptions( const SwViewOption &rOpt );
+ virtual void ApplyViewOptions( const SwViewOption &rOpt );
// Query text within selection.
// Returns FALSE, if selected range is too large to be copied
@@ -918,13 +918,6 @@ private:
const SwEditShell &operator=(const SwEditShell &);
};
-inline void SwEditShell::ApplyViewOptions( const SwViewOption &rOpt )
-{
- SwCrsrShell::StartAction();
- ViewShell::ApplyViewOptions( rOpt );
- SwEditShell::EndAction();
-}
-
inline const sfx2::LinkManager& SwEditShell::GetLinkManager() const
{ return ((SwEditShell*)this)->GetLinkManager(); }
diff --git a/sw/inc/expfld.hxx b/sw/inc/expfld.hxx
index e80b2c264578..a565244b89ba 100644
--- a/sw/inc/expfld.hxx
+++ b/sw/inc/expfld.hxx
@@ -77,8 +77,8 @@ public:
// Overlay, because get-field cannot be changed and therefore
// does not need to be updated. Update at changing of set-values!
-
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
};
class SW_DLLPUBLIC SwGetExpField : public SwFormulaField
@@ -153,6 +153,9 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
sal_uInt8 nLevel;
sal_Bool bDeleted;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
SwSetExpFieldType( SwDoc* pDoc, const String& rName,
sal_uInt16 nType = nsSwGetSetExpType::GSE_EXPR );
@@ -169,7 +172,6 @@ public:
void SetDeleted( sal_Bool b ) { bDeleted = b; }
// Overlay, because set-field takes care for its being updated by itself.
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
inline const String& GetSetRefName() const;
sal_uInt16 SetSeqRefNo( SwSetExpField& rFld );
diff --git a/sw/inc/fchrfmt.hxx b/sw/inc/fchrfmt.hxx
index 48c7590dec11..a6951cde3372 100644
--- a/sw/inc/fchrfmt.hxx
+++ b/sw/inc/fchrfmt.hxx
@@ -54,6 +54,9 @@ public:
// @@@ public copy ctor, but no copy assignment?
SwFmtCharFmt( const SwFmtCharFmt& rAttr );
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
private:
// @@@ public copy ctor, but no copy assignment?
SwFmtCharFmt & operator= (const SwFmtCharFmt &);
@@ -73,8 +76,6 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- // Pass to SwTxtCharFmt (from SwClient).
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
diff --git a/sw/inc/fldbas.hxx b/sw/inc/fldbas.hxx
index 8c6c925d5bdf..0d2c13f0160a 100644
--- a/sw/inc/fldbas.hxx
+++ b/sw/inc/fldbas.hxx
@@ -272,7 +272,7 @@ public:
inline void SwFieldType::UpdateFlds() const
{
- ((SwFieldType*)this)->Modify( 0, 0 );
+ ((SwFieldType*)this)->ModifyNotification( 0, 0 );
}
// Base class of all fields.
diff --git a/sw/inc/fmtcol.hxx b/sw/inc/fmtcol.hxx
index 4f941e084132..95b4af9faf41 100644
--- a/sw/inc/fmtcol.hxx
+++ b/sw/inc/fmtcol.hxx
@@ -91,10 +91,11 @@ protected:
mbAssignedToOutlineStyle(false)
{ pNextTxtFmtColl = this; }
-public:
// To get UL- / LR- / FontHeight-changes.
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
+public:
TYPEINFO(); // Already in base class Client.
@@ -232,6 +233,7 @@ public:
void SetCondition( sal_uLong nCond, sal_uLong nSubCond );
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& );
};
typedef SwCollCondition* SwCollConditionPtr;
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index c6edb55fe82f..3641f3f6f534 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -28,6 +28,7 @@
#ifndef _FMTFLD_HXX
#define _FMTFLD_HXX
+#include <list>
#include <svl/poolitem.hxx>
#include <svl/brdcst.hxx>
#include <svl/smplhint.hxx>
@@ -38,6 +39,7 @@
class SwField;
class SwTxtFld;
class SwView;
+class SwFieldType;
// ATT_FLD
class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
@@ -54,6 +56,10 @@ class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBro
// @@@ copy construction allowed, but copy assignment is not? @@@
SwFmtFld& operator=(const SwFmtFld& rFld);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
+
public:
TYPEINFO();
@@ -69,7 +75,6 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
const SwField *GetFld() const { return pField; }
@@ -87,6 +92,7 @@ public:
const SwTxtFld *GetTxtFld() const { return pTxtAttr; }
SwTxtFld *GetTxtFld() { return pTxtAttr; }
+ void RegisterToFieldType( SwFieldType& );
sal_Bool IsFldInDoc() const;
sal_Bool IsProtect() const;
};
diff --git a/sw/inc/fmthdft.hxx b/sw/inc/fmthdft.hxx
index 67134aabd75d..1abca0c96cb1 100644
--- a/sw/inc/fmthdft.hxx
+++ b/sw/inc/fmthdft.hxx
@@ -35,7 +35,7 @@
class SwFrmFmt;
class IntlWrapper;
-
+class SwFmt;
//Header, for PageFormats
//Client of FrmFmt discribing the header.
@@ -62,9 +62,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ const SwFrmFmt *GetHeaderFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt *GetHeaderFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& rFmt );
sal_Bool IsActive() const { return bActive; }
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
@@ -94,9 +95,10 @@ public:
String &rText,
const IntlWrapper* pIntl = 0 ) const;
- const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)pRegisteredIn; }
+ const SwFrmFmt *GetFooterFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt *GetFooterFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ void RegisterToFormat( SwFmt& rFmt );
sal_Bool IsActive() const { return bActive; }
void SetActive( sal_Bool bNew = sal_True ) { bActive = bNew; }
};
diff --git a/sw/inc/fmtmeta.hxx b/sw/inc/fmtmeta.hxx
index 459220c6007f..87f096d2d806 100644
--- a/sw/inc/fmtmeta.hxx
+++ b/sw/inc/fmtmeta.hxx
@@ -75,17 +75,13 @@ namespace com { namespace sun { namespace star {
* <li>The pool item is cloned (because it is non-poolable); the clone
* points to the same metadatable entity, but the metadatable entity's
* reverse pointer is unchanged.</li>
- * <li>A new text hint is created, taking over the new pool item.
- * Unfortunately, this also makes the metadatable entity point at the
- * cloned pool item.</li>
- * <li>The text hint is inserted into the hints array of some text node.</li>
- * <li>The DoCopy() method must be called at the new pool item:
- * it will clone the metadatable entity (using RegisterAsCopyOf),
- * and fix the reverse pointer of the original to point at the
- * original pool item.
+ * <li>The DoCopy() method is called at the new pool item:
+ * it will clone the metadatable entity (using RegisterAsCopyOf).
* This is necessary, because first, a metadatable entity may
* only be inserted once into a document, and second, the copy may be
* inserted into a different document than the source document!</li>
+ * <li>A new text hint is created, taking over the new pool item.</li>
+ * <li>The text hint is inserted into the hints array of some text node.</li>
* </ol>
*/
@@ -100,7 +96,7 @@ class SwFmtMeta
: public SfxPoolItem
{
private:
- friend class SwTxtMeta; // needs SetTxtAttr
+ friend class SwTxtMeta; // needs SetTxtAttr, DoCopy
friend class ::sw::Meta; // needs m_pTxtAttr
::boost::shared_ptr< ::sw::Meta > m_pMeta;
@@ -109,6 +105,10 @@ private:
SwTxtMeta * GetTxtAttr() { return m_pTxtAttr; }
void SetTxtAttr(SwTxtMeta * const i_pTxtAttr);
+ /// this method <em>must</em> be called when the hint is actually copied
+ void DoCopy(::sw::MetaFieldManager & i_rTargetDocManager,
+ SwTxtNode & i_rTargetTxtNode);
+
explicit SwFmtMeta( const sal_uInt16 i_nWhich );
public:
@@ -125,8 +125,6 @@ public:
void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
static SwFmtMeta * CreatePoolDefault( const sal_uInt16 i_nWhich );
::sw::Meta * GetMeta() { return m_pMeta.get(); }
- /// this method <em>must</em> be called when the hint is actually copied
- void DoCopy( SwFmtMeta & rOriginalMeta );
};
@@ -146,6 +144,7 @@ protected:
::com::sun::star::rdf::XMetadatable> m_wXMeta;
SwFmtMeta * m_pFmt;
+ SwTxtNode * m_pTxtNode;
SwTxtMeta * GetTxtAttr() const;
SwTxtNode * GetTxtNode() const; // returns 0 if not in document (undo)
@@ -153,7 +152,8 @@ protected:
SwFmtMeta * GetFmtMeta() const { return m_pFmt; }
void SetFmtMeta( SwFmtMeta * const i_pFmt ) { m_pFmt = i_pFmt; };
- void NotifyChangeTxtNode();
+ void NotifyChangeTxtNodeImpl();
+ void NotifyChangeTxtNode(SwTxtNode *const pTxtNode);
::com::sun::star::uno::WeakReference<
::com::sun::star::rdf::XMetadatable> const& GetXMeta() const
@@ -162,13 +162,13 @@ protected:
::com::sun::star::rdf::XMetadatable> const& xMeta)
{ m_wXMeta = xMeta; }
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+
public:
explicit Meta(SwFmtMeta * const i_pFmt = 0);
virtual ~Meta();
- // SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
// sfx2::Metadatable
virtual ::sfx2::IXmlIdRegistry& GetRegistry();
virtual bool IsInClipboard() const;
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 307fcb6576ab..64f93d260724 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -39,6 +39,7 @@ class SwPageDesc;
class SwHistory;
class SwPaM;
class IntlWrapper;
+class SwEndNoteInfo;
// Pagedescriptor
// Client of SwPageDesc that is "described" by the attribute.
@@ -56,6 +57,9 @@ class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
sal_uInt16 nDescNameIdx; // SW3-Reader: stringpool-index of style name.
SwModify* pDefinedIn; // Points to the object in which the
// attribute was set (CntntNode/Format).
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& rHint );
public:
SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
@@ -76,8 +80,6 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt8 nMemberId = 0 );
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
-
SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
@@ -87,6 +89,9 @@ public:
// Query / set where attribute is anchored.
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
+ void RegisterToEndNotInfo( SwEndNoteInfo& );
+ void RegisterToPageDesc( SwPageDesc& );
+ bool KnowsPageDesc() const;
};
diff --git a/sw/inc/format.hxx b/sw/inc/format.hxx
index 6f7e9b84f428..660a7fe653e8 100644
--- a/sw/inc/format.hxx
+++ b/sw/inc/format.hxx
@@ -44,7 +44,6 @@ class SwDoc;
class SW_DLLPUBLIC SwFmt : public SwModify
{
-
String aFmtName;
SwAttrSet aSet;
@@ -68,6 +67,7 @@ protected:
SwFmt( SwAttrPool& rPool, const String &rFmtNm, const sal_uInt16* pWhichRanges,
SwFmt *pDrvdFrm, sal_uInt16 nFmtWhich );
SwFmt( const SwFmt& rFmt );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
public:
TYPEINFO(); // Already in base class Client.
@@ -78,7 +78,6 @@ public:
// for Querying of Writer-functions.
sal_uInt16 Which() const { return nWhichId; }
- virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
// Query format information.
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
@@ -106,7 +105,7 @@ public:
// returns count of deleted hints.
virtual sal_uInt16 ResetAllFmtAttr();
- inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
+ inline SwFmt* DerivedFrom() const { return (SwFmt*)GetRegisteredIn(); }
inline sal_Bool IsDefault() const { return DerivedFrom() == 0; }
inline const String& GetName() const { return aFmtName; }
diff --git a/sw/inc/frmfmt.hxx b/sw/inc/frmfmt.hxx
index 229d482b34e1..e06dea97ab54 100644
--- a/sw/inc/frmfmt.hxx
+++ b/sw/inc/frmfmt.hxx
@@ -29,12 +29,9 @@
#define _FRMFMT_HXX
#include <com/sun/star/text/PositionLayoutDir.hpp>
-
#include <cppuhelper/weakref.hxx>
#include <tools/gen.hxx>
-
#include <format.hxx>
-
#include "swdllapi.h"
class SwFlyFrm;
@@ -70,6 +67,8 @@ protected:
pDrvdFrm, nFmtWhich )
{}
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
public:
TYPEINFO(); // Already in base class Client.
@@ -81,8 +80,6 @@ public:
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
- virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
-
// Returns the IMapObject defined at format (Fly)
// in the ImageMap at position Point.
// rPoint - test on DocPosition.
@@ -142,6 +139,7 @@ public:
{ m_wXObject = xObject; }
DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
+ void RegisterToFormat( SwFmt& rFmt );
};
// The FlyFrame-Format
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index adfeda9975d2..95b626cc600a 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -46,13 +46,16 @@ class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
String sSuffix;
protected:
bool m_bEndNote;
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
SvxNumberType aFmt;
sal_uInt16 nFtnOffset;
void ChgPageDesc( SwPageDesc *pDesc );
- SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
- SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
+ SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
+ bool KnowsPageDesc() const;
+ bool DependsOn( const SwPageDesc* ) const;
void SetFtnTxtColl(SwTxtFmtColl& rColl);
SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // can be 0.
@@ -65,8 +68,6 @@ public:
void SetAnchorCharFmt( SwCharFmt* );
SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
-
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
sal_Bool operator==( const SwEndNoteInfo &rInf ) const;
@@ -78,6 +79,7 @@ public:
void SetPrefix(const String& rSet) { sPrefix = rSet; }
void SetSuffix(const String& rSet) { sSuffix = rSet; }
+ void ReleaseCollection() { if ( GetRegisteredInNonConst() ) GetRegisteredInNonConst()->Remove( this ); }
};
enum SwFtnPos
diff --git a/sw/inc/lineinfo.hxx b/sw/inc/lineinfo.hxx
index 17f78e950ce5..66e3cbf23cff 100644
--- a/sw/inc/lineinfo.hxx
+++ b/sw/inc/lineinfo.hxx
@@ -58,6 +58,8 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation fr
sal_Bool bCountInFlys; //Count also within FlyFrames?
sal_Bool bRestartEachPage; //Restart counting at the first paragraph of each page
//(even on follows when paragraphs are splitted)
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
public:
SwLineNumberInfo();
@@ -98,7 +100,7 @@ public:
sal_Bool IsRestartEachPage() const { return bRestartEachPage; }
void SetRestartEachPage( sal_Bool b ) { bRestartEachPage = b; }
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
+ bool HasCharFormat() const { return GetRegisteredIn() != 0; }
};
diff --git a/sw/inc/ndhints.hxx b/sw/inc/ndhints.hxx
index 58aa4c2d3037..7a345792f5c5 100644
--- a/sw/inc/ndhints.hxx
+++ b/sw/inc/ndhints.hxx
@@ -43,9 +43,16 @@ class SfxPoolItem;
class SfxItemSet;
class SwDoc;
+typedef enum {
+ COPY = true,
+ NEW = false,
+} CopyOrNew_t;
+
+// if COPY then pTxtNode must be given!
SW_DLLPRIVATE SwTxtAttr *
MakeTxtAttr( SwDoc & rDoc, SfxPoolItem & rNew,
- xub_StrLen nStt, xub_StrLen nEnd );
+ xub_StrLen const nStt, xub_StrLen const nEnd,
+ CopyOrNew_t const bIsCopy = NEW, SwTxtNode *const pTxtNode = 0);
SW_DLLPRIVATE SwTxtAttr *
MakeTxtAttr( SwDoc & rDoc, const SfxItemSet & rSet,
xub_StrLen nStt, xub_StrLen nEnd );
diff --git a/sw/inc/ndnotxt.hxx b/sw/inc/ndnotxt.hxx
index 70081fcac7ee..869696e4e1a3 100644
--- a/sw/inc/ndnotxt.hxx
+++ b/sw/inc/ndnotxt.hxx
@@ -60,7 +60,7 @@ protected:
public:
~SwNoTxtNode();
- virtual SwCntntFrm *MakeFrm();
+ virtual SwCntntFrm *MakeFrm( SwFrm* );
inline SwGrfFmtColl *GetGrfColl() const { return (SwGrfFmtColl*)GetRegisteredIn(); }
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 61838cf20a15..ee4b9a012c3a 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -44,6 +44,7 @@
#include <vector>
#include <set>
+class SfxHint;
class SwNumRule;
class SwNodeNum;
class SwList;
@@ -211,6 +212,10 @@ public:
//
// End: Data collected during idle time
//
+protected:
+ // fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
public:
using SwCntntNode::GetAttr;
@@ -333,7 +338,7 @@ public:
const ::com::sun::star::uno::Sequence<sal_Int32>& rOffsets );
// Virtual methods from CntntNode.
- virtual SwCntntFrm *MakeFrm();
+ virtual SwCntntFrm *MakeFrm( SwFrm* );
virtual SwCntntNode *SplitCntntNode( const SwPosition & );
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
@@ -741,9 +746,6 @@ public:
TYPEINFO(); // fuer rtti
- // For re-arranging TxtFmtCollections (outline-numbering!!).
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
-
// override SwIndexReg
virtual void Update( SwIndex const & rPos, const xub_StrLen nChangeLen,
const bool bNegative = false, const bool bDelete = false );
diff --git a/sw/inc/node.hxx b/sw/inc/node.hxx
index f666b70d7536..839b40510e1d 100644
--- a/sw/inc/node.hxx
+++ b/sw/inc/node.hxx
@@ -65,6 +65,7 @@ class SwTOXBase;
class SwSectionNode;
class SwStartNode;
class SwTabFrm;
+class SwRootFrm;
class SwTable;
class SwTableNode;
class SwTableBox;
@@ -83,6 +84,7 @@ class IDocumentLinksAdministration;
class IDocumentFieldsAccess;
class IDocumentContentOperations;
class IDocumentListItems;
+class SwOLENodes;
// --------------------
// class SwNode
@@ -386,13 +388,17 @@ protected:
// SwAttrSet (handle):
sal_uInt16 ClearItemsFromAttrSet( const std::vector<sal_uInt16>& rWhichIds );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
TYPEINFO(); //Already contained in base class Client.
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ // MakeFrm will be called for a certain layout
+ // pSib is another SwFrm of the same layout (e.g. the SwRootFrm itself, a sibling, the parent)
+ virtual SwCntntFrm *MakeFrm( SwFrm* pSib ) = 0;
- virtual SwCntntFrm *MakeFrm() = 0;
virtual SwCntntNode *SplitCntntNode(const SwPosition & ) = 0;
+
virtual SwCntntNode *JoinNext();
virtual SwCntntNode *JoinPrev();
// Is it possible to join two nodes?
@@ -406,7 +412,9 @@ public:
sal_Bool GoNext(SwIndex *, sal_uInt16 nMode ) const;
sal_Bool GoPrevious(SwIndex *, sal_uInt16 nMode ) const;
- SwCntntFrm *GetFrm( const Point* pDocPos = 0,
+ // Replacement for good old GetFrm(..):
+ SwCntntFrm *getLayoutFrm( const SwRootFrm*,
+ const Point* pDocPos = 0,
const SwPosition *pPos = 0,
const sal_Bool bCalcFrm = sal_True ) const;
// Returns the real size of the frame or an empty rectangle if
@@ -480,11 +488,12 @@ public:
inline void SetModifyAtAttr( bool bSetModifyAtAttr ) const { mbSetModifyAtAttr = bSetModifyAtAttr; }
inline bool GetModifyAtAttr() const { return mbSetModifyAtAttr; }
+ static SwOLENodes* CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize );
+
private:
// Private constructor because copying is never allowed!!
SwCntntNode( const SwCntntNode & rNode );
SwCntntNode & operator= ( const SwCntntNode & rNode );
-
};
@@ -504,7 +513,7 @@ public:
const SwTable& GetTable() const { return *pTable; }
SwTable& GetTable() { return *pTable; }
- SwTabFrm *MakeFrm();
+ SwTabFrm *MakeFrm( SwFrm* );
// Creates the frms for the table node (i.e. the TabFrms).
void MakeFrms( SwNodeIndex* pIdxBehind );
@@ -549,7 +558,7 @@ public:
const SwSection& GetSection() const { return *m_pSection; }
SwSection& GetSection() { return *m_pSection; }
- SwFrm *MakeFrm();
+ SwFrm *MakeFrm( SwFrm* );
// Creates the frms for the SectionNode (i.e. the SectionFrms).
// On default the frames are created until the end of the range.
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index beb6b1fe8e5c..35bc16818507 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -39,12 +39,12 @@
#include <hints.hxx>
#include <boost/unordered_map.hpp>
#include <stringhash.hxx>
-class SwNodeNum;
#include <SwNumberTreeTypes.hxx>
#include <vector>
+
class SwTxtFmtColl;
class IDocumentListsAccess;
-
+class SwNodeNum;
class Font;
class SvxBrushItem;
class SvxNumRule;
@@ -65,6 +65,9 @@ class SW_DLLPUBLIC SwNumFmt : public SvxNumberFormat, public SwClient
using SvxNumberFormat::operator ==;
using SvxNumberFormat::operator !=;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
SwNumFmt();
SwNumFmt( const SwNumFmt& );
@@ -77,9 +80,9 @@ public:
sal_Bool operator==( const SwNumFmt& ) const;
sal_Bool operator!=( const SwNumFmt& r ) const { return !(*this == r); }
- SwCharFmt* GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
+ SwCharFmt* GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
void SetCharFmt( SwCharFmt* );
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ void ForgetCharFmt();
virtual void SetCharFmtName(const String& rSet);
virtual const String& GetCharFmtName()const;
@@ -142,9 +145,6 @@ private:
const SvxNumberFormat::SvxNumPositionAndSpaceMode meDefaultNumberFormatPositionAndSpaceMode;
String msDefaultListId;
- // forbidden and not implemented.
- SwNumRule();
-
public:
// add parameter <eDefaultNumberFormatPositionAndSpaceMode>
SwNumRule( const String& rNm,
diff --git a/sw/inc/pagedesc.hxx b/sw/inc/pagedesc.hxx
index 156d5b2e1fc2..876540626620 100644
--- a/sw/inc/pagedesc.hxx
+++ b/sw/inc/pagedesc.hxx
@@ -162,6 +162,9 @@ class SW_DLLPUBLIC SwPageDesc : public SwModify
SW_DLLPRIVATE SwPageDesc(const String&, SwFrmFmt*, SwDoc *pDc );
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
+
public:
const String &GetName() const { return aDescName; }
void SetName( const String& rNewName ) { aDescName = rNewName; }
@@ -215,7 +218,6 @@ public:
void SetRegisterFmtColl( const SwTxtFmtColl* rFmt );
const SwTxtFmtColl* GetRegisterFmtColl() const;
- virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
void RegisterChange();
// Query and set PoolFormat-Id.
diff --git a/sw/inc/paratr.hxx b/sw/inc/paratr.hxx
index 54eff6a7cd26..d88201639530 100644
--- a/sw/inc/paratr.hxx
+++ b/sw/inc/paratr.hxx
@@ -65,6 +65,10 @@ public:
private:
// @@@ public copy ctor, but no copy assignment?
SwFmtDrop & operator= (const SwFmtDrop &);
+
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+
public:
// "pure virtual methods" of SfxPoolItem
@@ -90,10 +94,9 @@ public:
inline sal_uInt16 GetDistance() const { return nDistance; }
inline sal_uInt16 &GetDistance() { return nDistance; }
- inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)pRegisteredIn; }
- inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)pRegisteredIn; }
+ inline const SwCharFmt *GetCharFmt() const { return (SwCharFmt*)GetRegisteredIn(); }
+ inline SwCharFmt *GetCharFmt() { return (SwCharFmt*)GetRegisteredIn(); }
void SetCharFmt( SwCharFmt *pNew );
- virtual void Modify( SfxPoolItem*, SfxPoolItem* );
// Get information from Client.
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
diff --git a/sw/inc/printdata.hxx b/sw/inc/printdata.hxx
index a93ff9957695..cc0a239815a1 100644
--- a/sw/inc/printdata.hxx
+++ b/sw/inc/printdata.hxx
@@ -46,7 +46,8 @@ class _SetGetExpFlds;
class SwViewOption;
class OutputDevice;
class SwViewOptionAdjust_Impl;
-class SwWrtShell;
+class SwPrtOptions;
+class ViewShell;
class SfxViewShell;
// forward declarations
@@ -267,9 +268,9 @@ public:
void DeletePostItData();
bool IsViewOptionAdjust() const { return m_pViewOptionAdjust != 0; }
- bool NeedNewViewOptionAdjust( const SwWrtShell& ) const;
- void ViewOptionAdjustStart( SwWrtShell &rSh, const SwViewOption &rViewOptions );
- void ViewOptionAdjust( SwPrintData const*const pPrtOptions );
+ bool NeedNewViewOptionAdjust( const ViewShell& ) const;
+ void ViewOptionAdjustStart( ViewShell &rSh, const SwViewOption &rViewOptions );
+ void ViewOptionAdjust( SwPrintData const* const pPrtOptions );
void ViewOptionAdjustStop();
bool HasSwPrtOptions() const { return m_pPrtOptions != 0; }
diff --git a/sw/inc/reffld.hxx b/sw/inc/reffld.hxx
index 06b897576279..5b2b6cc10b66 100644
--- a/sw/inc/reffld.hxx
+++ b/sw/inc/reffld.hxx
@@ -73,13 +73,14 @@ enum REFERENCEMARK
class SwGetRefFieldType : public SwFieldType
{
SwDoc* pDoc;
+protected:
+ // ueberlagert, um alle Ref-Felder zu updaten
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
public:
SwGetRefFieldType(SwDoc* pDoc );
virtual SwFieldType* Copy() const;
SwDoc* GetDoc() const { return pDoc; }
- // ueberlagert, um alle Ref-Felder zu updaten
- virtual void Modify( SfxPoolItem *, SfxPoolItem * );
void MergeWithOtherDoc( SwDoc& rDestDoc );
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index 5a30cc0b502d..f636756f39e5 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -154,7 +154,6 @@ public:
class SW_DLLPUBLIC SwSection
: public SwClient
- , private ::boost::noncopyable
{
// damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird!
friend class SwSectionNode;
@@ -170,6 +169,9 @@ private:
SW_DLLPRIVATE void ImplSetHiddenFlag(
bool const bHidden, bool const bCondition);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
TYPEINFO(); // rtti
@@ -186,10 +188,8 @@ public:
SectionType GetType() const { return m_Data.GetType(); }
void SetType(SectionType const eType) { return m_Data.SetType(eType); }
- SwSectionFmt* GetFmt() { return (SwSectionFmt*)pRegisteredIn; }
- SwSectionFmt* GetFmt() const { return (SwSectionFmt*)pRegisteredIn; }
-
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ SwSectionFmt* GetFmt() { return (SwSectionFmt*)GetRegisteredIn(); }
+ SwSectionFmt* GetFmt() const { return (SwSectionFmt*)GetRegisteredIn(); }
// setze die Hidden/Protected -> gesamten Baum updaten !
// (Attribute/Flags werden gesetzt/erfragt)
@@ -287,6 +287,7 @@ class SW_DLLPUBLIC SwSectionFmt
protected:
SwSectionFmt( SwSectionFmt* pDrvdFrm, SwDoc *pDoc );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
@@ -298,7 +299,6 @@ public:
//Erzeugt die Ansichten
virtual void MakeFrms();
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
// erfrage vom Format Informationen
virtual sal_Bool GetInfo( SfxPoolItem& ) const;
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index 57c41714e75a..2376e80775e8 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -96,11 +96,7 @@ public:
// @@@ semantic: no copy ctor.
SwCursor( SwCursor& rCpy);
-private:
- // forbidden and not implemented.
- //SwCursor( const SwCursor& );
- // @@@ used e.g. in core/frmedt/fetab.cxx @@@
- // SwCursor & operator= ( const SwCursor& );
+
public:
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
@@ -140,7 +136,7 @@ public:
sal_Bool GoEndWord();
sal_Bool GoNextWord();
sal_Bool GoPrevWord();
- sal_Bool SelectWord( const Point* pPt = 0 );
+ sal_Bool SelectWord( ViewShell* pViewShell, const Point* pPt = 0 );
// API versions of above functions (will be used with a different
// WordType for the break iterator)
@@ -151,7 +147,7 @@ public:
sal_Bool GoEndWordWT( sal_Int16 nWordType );
sal_Bool GoNextWordWT( sal_Int16 nWordType );
sal_Bool GoPrevWordWT( sal_Int16 nWordType );
- sal_Bool SelectWordWT( sal_Int16 nWordType, const Point* pPt = 0 );
+ sal_Bool SelectWordWT( ViewShell* pViewShell, sal_Int16 nWordType, const Point* pPt = 0 );
enum SentenceMoveType
{
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index 57e000a998c5..e266465656c2 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -43,12 +43,14 @@ public:
sal_Bool bUpdate = sal_True );
~SwDDETable();
- void Modify( SfxPoolItem*, SfxPoolItem* );
void ChangeContent();
sal_Bool NoDDETable();
SwDDEFieldType* GetDDEFldType();
inline const SwDDEFieldType* GetDDEFldType() const;
+protected:
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
};
diff --git a/sw/inc/switerator.hxx b/sw/inc/switerator.hxx
new file mode 100755
index 000000000000..be729771b54b
--- /dev/null
+++ b/sw/inc/switerator.hxx
@@ -0,0 +1,47 @@
+/*************************************************************************
+ *
+ * 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 _SWITERATOR_HXX
+#define _SWITERATOR_HXX
+
+#include <calbck.hxx>
+#include <tools/debug.hxx>
+
+template< class TElementType, class TSource > class SwIterator
+{
+ SwClientIter aClientIter;
+public:
+
+ SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { DBG_ASSERT( TElementType::IsOf( TYPE(SwClient) ), "Incompatible types!" ); }
+ TElementType* First() { SwClient* p = aClientIter.First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ TElementType* Last() { SwClient* p = aClientIter.Last( TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ TElementType* Next() { SwClient* p = aClientIter.Next(); return PTR_CAST(TElementType,p); }
+ TElementType* Previous() { SwClient* p = aClientIter.Previous(); return PTR_CAST(TElementType,p); }
+ static TElementType* FirstElement( const TSource& rMod ) { SwClient* p = SwClientIter(rMod).First(TYPE(TElementType)); return PTR_CAST(TElementType,p); }
+ bool IsChanged() { return aClientIter.IsChanged(); }
+};
+
+#endif
diff --git a/sw/inc/swtable.hxx b/sw/inc/swtable.hxx
index 7df49e2cd355..8f8e70e8a333 100644
--- a/sw/inc/swtable.hxx
+++ b/sw/inc/swtable.hxx
@@ -43,6 +43,7 @@ class SwStartNode;
#include <node.hxx> // fuer StartNode->GetMyIndex
#endif
+class SwFmt;
class Color;
class SwFrmFmt;
class SwTableFmt;
@@ -86,7 +87,7 @@ typedef SwTableLine* SwTableLinePtr;
class SW_DLLPUBLIC SwTable: public SwClient //Client vom FrmFmt
{
- using SwClient::IsModifyLocked;
+
protected:
SwTableLines aLines;
@@ -116,6 +117,8 @@ protected:
sal_Bool IsModifyLocked(){ return bModifyLocked;}
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
enum SearchType
{
@@ -175,10 +178,9 @@ public:
SwTableLines &GetTabLines() { return aLines; }
const SwTableLines &GetTabLines() const { return aLines; }
- SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
-
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwTableFmt* GetTableFmt() const { return (SwTableFmt*)GetRegisteredIn(); }
void GetTabCols( SwTabCols &rToFill, const SwTableBox *pStart,
sal_Bool bHidden = sal_False, sal_Bool bCurRowOnly = sal_False ) const;
@@ -320,6 +322,7 @@ public:
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
sal_Bool SetRowHeight( SwTableBox& rAktBox, sal_uInt16 eType,
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
+ void RegisterToFormat( SwFmt& rFmt );
#if OSL_DEBUG_LEVEL > 1
void CheckConsistency() const;
#endif
@@ -346,8 +349,8 @@ public:
void SetUpper( SwTableBox *pNew ) { pUpper = pNew; }
- SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
//Macht ein eingenes FrmFmt wenn noch mehr Lines von ihm abhaengen.
SwFrmFmt* ClaimFrmFmt();
@@ -362,6 +365,7 @@ public:
SwTwips GetTableLineHeight( bool& bLayoutAvailable ) const;
bool hasSoftPageBreak() const;
+ void RegisterToFormat( SwFmt& rFmt );
};
class SW_DLLPUBLIC SwTableBox: public SwClient //Client vom FrmFmt
@@ -400,8 +404,8 @@ public:
const SwTableLine *GetUpper() const { return pUpper; }
void SetUpper( SwTableLine *pNew ) { pUpper = pNew; }
- SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)pRegisteredIn; }
- SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)pRegisteredIn; }
+ SwFrmFmt* GetFrmFmt() { return (SwFrmFmt*)GetRegisteredIn(); }
+ SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
//Macht ein eingenes FrmFmt wenn noch mehr Boxen von ihm abhaengen.
SwFrmFmt* ClaimFrmFmt();
@@ -466,6 +470,8 @@ public:
const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
sal_uInt16 nMaxStep = USHRT_MAX ) const
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
+ void RegisterToFormat( SwFmt& rFmt ) ;
+ void ForgetFrmFmt();
};
class SwCellFrm;
diff --git a/sw/inc/swtblfmt.hxx b/sw/inc/swtblfmt.hxx
index fb7a63efb9b4..5165c76ec960 100644
--- a/sw/inc/swtblfmt.hxx
+++ b/sw/inc/swtblfmt.hxx
@@ -87,12 +87,12 @@ protected:
: SwFrmFmt( rPool, rFmtNm, pDrvdFrm, RES_FRMFMT, aTableBoxSetRange )
{}
+ // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
+
public:
TYPEINFO(); //Bereits in Basisklasse Client drin.
- // zum Erkennen von Veraenderungen (haupts. TableBoxAttribute)
- virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
-
DECL_FIXEDMEMPOOL_NEWDEL(SwTableBoxFmt)
};
diff --git a/sw/inc/swtypes.hxx b/sw/inc/swtypes.hxx
index 87399c808ef6..15977766c25f 100644
--- a/sw/inc/swtypes.hxx
+++ b/sw/inc/swtypes.hxx
@@ -223,6 +223,8 @@ namespace nsSetAttrMode
// functionality will be disabled)
/// force hint expand (only matters for hints with CH_TXTATR)
const SetAttrMode SETATTR_FORCEHINTEXPAND= 0x0080;
+ /// the inserted item is a copy -- intended for use in ndtxt.cxx
+ const SetAttrMode SETATTR_IS_COPY = 0x0100;
}
//Umrechnung Twip<-> 1/100 mm fuer UNO
diff --git a/sw/inc/tox.hxx b/sw/inc/tox.hxx
index 1f5bf0530f9b..bff0b9ded740 100644
--- a/sw/inc/tox.hxx
+++ b/sw/inc/tox.hxx
@@ -92,6 +92,10 @@ class SW_DLLPUBLIC SwTOXMark
SwTOXMark(); // to create the dflt. atr. in _InitCore
+protected:
+ // SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
+
public:
TYPEINFO(); // rtti
@@ -106,9 +110,6 @@ public:
virtual int operator==( const SfxPoolItem& ) const;
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
- // SwClient
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
-
void InvalidateTOXMark();
String GetText() const;
@@ -152,7 +153,9 @@ public:
SW_DLLPRIVATE void SetXTOXMark(::com::sun::star::uno::Reference<
::com::sun::star::text::XDocumentIndexMark> const& xMark)
{ m_wXDocumentIndexMark = xMark; }
-
+ void DeRegister() { GetRegisteredInNonConst()->Remove( this ); }
+ void RegisterToTOXType( SwTOXType& rMark );
+ static void InsertTOXMarks( SwTOXMarks& aMarks, const SwTOXType& rType );
};
/*--------------------------------------------------------------------
@@ -579,6 +582,7 @@ public:
// #i21237#
void AdjustTabStops(SwDoc & rDoc, sal_Bool bDefaultRightTabStop);
SwTOXBase& operator=(const SwTOXBase& rSource);
+ void RegisterToTOXType( SwTOXType& rMark );
};
diff --git a/sw/inc/txtatr.hxx b/sw/inc/txtatr.hxx
index c3b816cc0d88..5224ec80b38f 100644
--- a/sw/inc/txtatr.hxx
+++ b/sw/inc/txtatr.hxx
@@ -35,6 +35,11 @@
class SwTxtNode; // fuer SwTxtFld
class SwCharFmt;
+namespace sw {
+ class MetaFieldManager;
+}
+
+
// ATT_CHARFMT *********************************************
class SwTxtCharFmt : public SwTxtAttrEnd
@@ -46,9 +51,9 @@ public:
SwTxtCharFmt( SwFmtCharFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtCharFmt( );
- // werden vom SwFmtCharFmt hierher weitergeleitet
- virtual void Modify( SfxPoolItem*, SfxPoolItem* ); // SwClient
- virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+ // werden vom SwFmtCharFmt hierher weitergeleitet (no derivation from SwClient!)
+ void ModifyNotification( const SfxPoolItem*, const SfxPoolItem* );
+ bool GetInfo( SfxPoolItem& rInfo ) const;
// get and set TxtNode pointer
void ChgTxtNode( SwTxtNode* pNew ) { m_pTxtNode = pNew; }
@@ -62,7 +67,7 @@ public:
class SwTxtAttrNesting : public SwTxtAttrEnd
{
-public:
+protected:
SwTxtAttrNesting( SfxPoolItem & i_rAttr,
const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
virtual ~SwTxtAttrNesting();
@@ -71,16 +76,20 @@ public:
class SwTxtMeta : public SwTxtAttrNesting
{
private:
- SwTxtNode * m_pTxtNode;
-
-public:
SwTxtMeta( SwFmtMeta & i_rAttr,
const xub_StrLen i_nStart, const xub_StrLen i_nEnd );
+
+public:
+ static SwTxtMeta * CreateTxtMeta(
+ ::sw::MetaFieldManager & i_rTargetDocManager,
+ SwTxtNode *const i_pTargetTxtNode,
+ SwFmtMeta & i_rAttr,
+ xub_StrLen const i_nStart, xub_StrLen const i_nEnd,
+ bool const i_bIsCopy);
+
virtual ~SwTxtMeta();
void ChgTxtNode(SwTxtNode * const pNode);
- SwTxtNode * GetTxtNode() const { return m_pTxtNode; }
-
};
@@ -89,15 +98,17 @@ public:
class SW_DLLPUBLIC SwTxtRuby : public SwTxtAttrNesting, public SwClient
{
SwTxtNode* m_pTxtNode;
-
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwTxtRuby( SwFmtRuby& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtRuby();
TYPEINFO();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+ SW_DLLPRIVATE void InitRuby(SwTxtNode & rNode);
+
/// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/txtftn.hxx b/sw/inc/txtftn.hxx
index 36fbfb0ee269..d48bcf7c8dff 100644
--- a/sw/inc/txtftn.hxx
+++ b/sw/inc/txtftn.hxx
@@ -34,6 +34,7 @@ class SwNodeIndex;
class SwTxtNode;
class SwNodes;
class SwDoc;
+class SwFrm;
// ATT_FTN **********************************************************
@@ -60,7 +61,7 @@ public:
void MakeNewTextSection( SwNodes& rNodes );
// loesche die FtnFrame aus der Seite
- void DelFrms();
+ void DelFrms( const SwFrm* );
// bedingten Absatzvorlagen checken
void CheckCondColl();
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index d09792c915cf..f6e35addb183 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -43,17 +43,18 @@ class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
bool m_bVisited : 1; // visited link?
bool m_bVisitedValid : 1; // is m_bVisited valid?
- // forbidden and not implemented.
- SwTxtINetFmt();
+protected:
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwTxtINetFmt( SwFmtINetFmt& rAttr, xub_StrLen nStart, xub_StrLen nEnd );
virtual ~SwTxtINetFmt();
TYPEINFO();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
virtual sal_Bool GetInfo( SfxPoolItem& rInfo ) const;
+ SW_DLLPRIVATE void InitINetFmt(SwTxtNode & rNode);
+
// get and set TxtNode pointer
const SwTxtNode* GetpTxtNode() const { return m_pTxtNode; }
inline const SwTxtNode& GetTxtNode() const;
diff --git a/sw/inc/txtrfmrk.hxx b/sw/inc/txtrfmrk.hxx
index c7507798be87..d60dd47cad4c 100644
--- a/sw/inc/txtrfmrk.hxx
+++ b/sw/inc/txtrfmrk.hxx
@@ -42,7 +42,7 @@ class SwTxtRefMark : public SwTxtAttrEnd
public:
SwTxtRefMark( SwFmtRefMark& rAttr,
- xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+ xub_StrLen const nStart, xub_StrLen const*const pEnd = 0);
virtual xub_StrLen * GetEnd(); // SwTxtAttr
inline const xub_StrLen * GetEnd() const { return m_pEnd; }
diff --git a/sw/inc/txttxmrk.hxx b/sw/inc/txttxmrk.hxx
index e70c28305082..56a928b98ce2 100644
--- a/sw/inc/txttxmrk.hxx
+++ b/sw/inc/txttxmrk.hxx
@@ -42,7 +42,8 @@ class SwTxtTOXMark : public SwTxtAttrEnd
xub_StrLen * m_pEnd; // 0 if SwTOXMark without AlternativeText
public:
- SwTxtTOXMark( SwTOXMark& rAttr, xub_StrLen nStart, xub_StrLen * pEnd = 0 );
+ SwTxtTOXMark( SwTOXMark& rAttr,
+ xub_StrLen const nStart, xub_StrLen const*const pEnd = 0);
virtual ~SwTxtTOXMark();
virtual xub_StrLen *GetEnd(); // SwTxtAttr
diff --git a/sw/inc/unobaseclass.hxx b/sw/inc/unobaseclass.hxx
index e49568b6256f..f04bb1adb04d 100644
--- a/sw/inc/unobaseclass.hxx
+++ b/sw/inc/unobaseclass.hxx
@@ -95,7 +95,7 @@ class UnoActionRemoveContext
::com::sun::star::uno::Sequence< sal_Int8 > CreateUnoTunnelId();
/// helper function for implementing SwClient::Modify
-void ClientModify(SwClient* pClient, SfxPoolItem *pOld, SfxPoolItem *pNew);
+void ClientModify(SwClient* pClient, const SfxPoolItem *pOld, const SfxPoolItem *pNew);
#include <boost/utility.hpp>
diff --git a/sw/inc/unobookmark.hxx b/sw/inc/unobookmark.hxx
index 4d76fca66849..474257b4a011 100644
--- a/sw/inc/unobookmark.hxx
+++ b/sw/inc/unobookmark.hxx
@@ -223,8 +223,9 @@ class SwXFieldmarkParameters
// XElementAccess
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException);
+ protected:
//SwClient
- virtual void Modify(SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
private:
::sw::mark::IFieldmark::parameter_map_t* getCoreParameters() throw (::com::sun::star::uno::RuntimeException);
};
diff --git a/sw/inc/unochart.hxx b/sw/inc/unochart.hxx
index c88d62be1d9e..02da7c5fb805 100644
--- a/sw/inc/unochart.hxx
+++ b/sw/inc/unochart.hxx
@@ -172,6 +172,10 @@ class SwChartDataProvider :
rtl::OUString GetBrokenCellRangeForExport( const rtl::OUString &rCellRangeRepresentation );
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwChartDataProvider( const SwDoc* pDoc );
virtual ~SwChartDataProvider();
@@ -198,10 +202,6 @@ public:
virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL getSupportedServiceNames( ) throw (::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
-
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
void AddDataSequence( const SwTable &rTable, ::com::sun::star::uno::Reference< ::com::sun::star::chart2::data::XDataSequence > &rxDataSequence );
@@ -293,6 +293,10 @@ class SwChartDataSequence :
SwChartDataSequence( const SwChartDataSequence &rObj );
SwChartDataSequence & operator = ( const SwChartDataSequence & );
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwChartDataSequence( SwChartDataProvider &rProvider,
SwFrmFmt &rTblFmt,
@@ -349,11 +353,6 @@ public:
virtual void SAL_CALL addEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
virtual void SAL_CALL removeEventListener( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener >& aListener ) throw (::com::sun::star::uno::RuntimeException);
-
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
-
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
sal_Bool DeleteBox( const SwTableBox &rBox );
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 0fc9b61b557a..26f193a9dc81 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -41,11 +41,6 @@ public:
SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
virtual ~SwUnoCrsr();
- // @@@ semantic: no copy ctor.
- SwUnoCrsr( SwUnoCrsr& );
-private:
- SwUnoCrsr & operator= ( const SwUnoCrsr& );
-
protected:
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
diff --git a/sw/inc/unodraw.hxx b/sw/inc/unodraw.hxx
index d45b83e9d6cf..7cc830cf6a96 100644
--- a/sw/inc/unodraw.hxx
+++ b/sw/inc/unodraw.hxx
@@ -232,6 +232,9 @@ class SwXShape : public SwXShapeBaseClass,
protected:
virtual ~SwXShape();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXShape(::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > & xShape);
@@ -281,9 +284,6 @@ public:
virtual void SAL_CALL setSize( const ::com::sun::star::awt::Size& aSize ) throw (::com::sun::star::beans::PropertyVetoException, ::com::sun::star::uno::RuntimeException);
virtual ::rtl::OUString SAL_CALL getShapeType( ) throw (::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
SwShapeDescriptor_Impl* GetDescImpl() {return pImpl;}
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation > GetAggregationInterface() {return xShapeAgg;}
diff --git a/sw/inc/unofield.hxx b/sw/inc/unofield.hxx
index ed36b278a652..6dc306cdb300 100644
--- a/sw/inc/unofield.hxx
+++ b/sw/inc/unofield.hxx
@@ -75,6 +75,9 @@ class SwXFieldMaster : public cppu::WeakImplHelper4
protected:
virtual ~SwXFieldMaster();
+ //SwClient
+virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXFieldMaster(SwDoc* pDoc, sal_uInt16 nResId);
@@ -107,9 +110,6 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
static rtl::OUString GetProgrammaticName(const SwFieldType& rType, SwDoc& rDoc);
static rtl::OUString LocalizeFormula(const SwSetExpField& rFld, const rtl::OUString& rFormula, sal_Bool bQuery);
@@ -148,6 +148,9 @@ class SwXTextField : public cppu::WeakImplHelper5
SwDoc* GetDoc() {return m_pDoc;}
protected:
virtual ~SwXTextField();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXTextField(sal_uInt16 nServiceId, SwDoc* pDoc=0);
SwXTextField(const SwFmtFld& rFmt, SwDoc* pDoc);
@@ -193,19 +196,16 @@ public:
//XUpdatable
virtual void SAL_CALL update( ) throw (::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
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 );
const SwField* GetField() const;
const SwFmtFld* GetFldFmt(){return GetField() ? pFmtFld : 0; };
void Invalidate();
-};
-/// @return a SwXTextField, either an already existing one or a new one
-SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+ /// @return an SwXTextField, either an already existing one or a new one
+ static SwXTextField* CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
+};
typedef
cppu::WeakImplHelper2
@@ -294,6 +294,8 @@ class SwXFieldEnumeration : public cppu::WeakImplHelper2
protected:
virtual ~SwXFieldEnumeration();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwXFieldEnumeration(SwDoc* pDoc);
@@ -306,8 +308,6 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unoflatpara.hxx b/sw/inc/unoflatpara.hxx
index 9eb36c20c1b3..2ab3e5988aa2 100644
--- a/sw/inc/unoflatpara.hxx
+++ b/sw/inc/unoflatpara.hxx
@@ -123,8 +123,9 @@ public:
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaBefore(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
virtual css::uno::Reference< css::text::XFlatParagraph > SAL_CALL getParaAfter(const css::uno::Reference< css::text::XFlatParagraph > & xPara) throw (css::uno::RuntimeException, css::lang::IllegalArgumentException);
+protected:
// SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
private:
SwXFlatParagraphIterator( const SwXFlatParagraphIterator & ); // not defined
diff --git a/sw/inc/unoframe.hxx b/sw/inc/unoframe.hxx
index 903ed043ac74..3642a8c089e8 100644
--- a/sw/inc/unoframe.hxx
+++ b/sw/inc/unoframe.hxx
@@ -56,7 +56,6 @@ class SwDoc;
class SwFmt;
class SwFlyFrmFmt;
-
class BaseFrameProperties_Impl;
class SwXFrame : public cppu::WeakImplHelper6
<
@@ -85,6 +84,7 @@ class SwXFrame : public cppu::WeakImplHelper6
protected:
com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet > mxStyleData;
com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess > mxStyleFamily;
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
virtual ~SwXFrame();
public:
@@ -143,9 +143,6 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
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 attach( const ::com::sun::star::uno::Reference< ::com::sun::star::text::XTextRange >& xTextRange ) throw(::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
@@ -361,7 +358,8 @@ public:
// ::com::sun::star::util::XModifyListener
virtual void SAL_CALL modified( const ::com::sun::star::lang::EventObject& aEvent ) throw(::com::sun::star::uno::RuntimeException);
- void Modify( SfxPoolItem*, SfxPoolItem* );
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
diff --git a/sw/inc/unoport.hxx b/sw/inc/unoport.hxx
index 4b4f95abaee8..12f93f6fcb56 100644
--- a/sw/inc/unoport.hxx
+++ b/sw/inc/unoport.hxx
@@ -129,8 +129,9 @@ private:
SwFmtFld * GetFldFmt(bool bInit = false);
-protected:
+ void init(const SwUnoCrsr* pPortionCursor);
+protected:
void SAL_CALL SetPropertyValues_Impl(
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
@@ -153,6 +154,9 @@ protected:
virtual ~SwXTextPortion();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwTextPortionType eType );
SwXTextPortion(const SwUnoCrsr* pPortionCrsr, ::com::sun::star::uno::Reference< ::com::sun::star::text::XText > const& rParent, SwFrmFmt& rFmt );
@@ -220,9 +224,6 @@ public:
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createContentEnumeration(const rtl::OUString& aServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getAvailableServiceNames() throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
void SetRefMark( ::com::sun::star::uno::Reference<
::com::sun::star::text::XTextContent > xMark)
{ m_xRefMark = xMark; }
@@ -305,9 +306,9 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
getSupportedServiceNames()
throw( ::com::sun::star::uno::RuntimeException );
-
+protected:
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unoredline.hxx b/sw/inc/unoredline.hxx
index bf0a0173808f..0386830a2e39 100644
--- a/sw/inc/unoredline.hxx
+++ b/sw/inc/unoredline.hxx
@@ -141,10 +141,10 @@ public:
virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw(::com::sun::star::uno::RuntimeException);
virtual sal_Bool SAL_CALL hasElements( ) throw(::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
const SwRedline* GetRedline() const {return pRedline;}
+protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unoredlines.hxx b/sw/inc/unoredlines.hxx
index 56ba53446922..af8ed1401bff 100644
--- a/sw/inc/unoredlines.hxx
+++ b/sw/inc/unoredlines.hxx
@@ -94,9 +94,9 @@ public:
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
-
+protected:
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
diff --git a/sw/inc/unosett.hxx b/sw/inc/unosett.hxx
index c5e75de6eb8f..055732148f87 100644
--- a/sw/inc/unosett.hxx
+++ b/sw/inc/unosett.hxx
@@ -164,6 +164,10 @@ class SwXNumberingRules : public cppu::WeakAggImplHelper5
static String sInvalidStyle;
protected:
virtual ~SwXNumberingRules();
+
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXNumberingRules(SwDocShell& rDocSh); // chapter numbering
SwXNumberingRules(const SwNumRule& rRule); // NumRule for paragraphs, numbering styles
@@ -211,9 +215,6 @@ public:
const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue>& rProperties, sal_Int32 nIndex)
throw( ::com::sun::star::uno::RuntimeException, ::com::sun::star::lang::IllegalArgumentException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
const String* GetNewCharStyleNames() const {return sNewCharStyleNames;}
const String* GetBulletFontNames() const {return sNewBulletFontNames;}
const SwNumRule* GetNumRule() {return pNumRule;}
diff --git a/sw/inc/unostyle.hxx b/sw/inc/unostyle.hxx
index 919c930f1fe6..1fd61f88f871 100644
--- a/sw/inc/unostyle.hxx
+++ b/sw/inc/unostyle.hxx
@@ -201,6 +201,7 @@ protected:
void SAL_CALL SetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames, const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any >& aValues ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::beans::PropertyVetoException, ::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > SAL_CALL GetPropertyValues_Impl( const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames ) throw(::com::sun::star::beans::UnknownPropertyException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
public:
SwXStyle(SwDoc* pDoc, SfxStyleFamily eFam = SFX_STYLE_FAMILY_PARA, sal_Bool bConditional = sal_False);
SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
@@ -274,7 +275,6 @@ public:
StartListening(*pBasePool);
}
SwDoc* GetDoc() const { return m_pDoc; }
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
};
class SwXFrameStyle : public SwXStyle,
@@ -358,10 +358,12 @@ class SwXAutoStyleFamily : public cppu::WeakImplHelper1< com::sun::star::style::
SwDocShell *pDocShell;
IStyleAccess::SwAutoStyleFamily eFamily;
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXAutoStyleFamily(SwDocShell* pDocShell, IStyleAccess::SwAutoStyleFamily eFamily);
virtual ~SwXAutoStyleFamily();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
//XAutoStyleFamily
virtual ::com::sun::star::uno::Reference< ::com::sun::star::style::XAutoStyle > SAL_CALL insertStyle( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& Values ) throw (::com::sun::star::uno::RuntimeException);
@@ -381,14 +383,15 @@ class SwXAutoStylesEnumerator : public cppu::WeakImplHelper1< ::com::sun::star::
public:
SwXAutoStylesEnumerator( SwDoc* pDoc, IStyleAccess::SwAutoStyleFamily eFam );
virtual ~SwXAutoStylesEnumerator();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
//XEnumeration
virtual sal_Bool SAL_CALL hasMoreElements( ) throw (::com::sun::star::uno::RuntimeException);
virtual ::com::sun::star::uno::Any SAL_CALL nextElement( ) throw (::com::sun::star::container::NoSuchElementException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
-
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
+
// an automatic style
class SwXAutoStyle : public cppu::WeakImplHelper3
<
@@ -407,7 +410,6 @@ public:
SwXAutoStyle( SwDoc* pDoc, SfxItemSet_Pointer_t pInitSet, IStyleAccess::SwAutoStyleFamily eFam );
virtual ~SwXAutoStyle();
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
//XPropertySet
virtual ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo > SAL_CALL getPropertySetInfo( ) throw(::com::sun::star::uno::RuntimeException);
@@ -438,6 +440,9 @@ public:
// Special
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue > SAL_CALL getProperties() throw (::com::sun::star::uno::RuntimeException);
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
};
#endif
diff --git a/sw/inc/unotbl.hxx b/sw/inc/unotbl.hxx
index 72c5c6a76865..f4c5c8e2af4d 100644
--- a/sw/inc/unotbl.hxx
+++ b/sw/inc/unotbl.hxx
@@ -111,6 +111,9 @@ protected:
virtual ~SwXCell();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXCell(SwFrmFmt* pTblFmt, SwTableBox* pBox, sal_uInt16 nPos=USHRT_MAX );
SwXCell(SwFrmFmt* pTblFmt, const SwStartNode& rStartNode); // XML import interface
@@ -158,9 +161,6 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
//XEnumerationAccess - frueher XParagraphEnumerationAccess
virtual ::com::sun::star::uno::Reference< ::com::sun::star::container::XEnumeration > SAL_CALL createEnumeration(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -188,6 +188,9 @@ class SwXTextTableRow : public cppu::WeakImplHelper2
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
protected:
virtual ~SwXTextTableRow();
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
public:
SwXTextTableRow(SwFrmFmt* pFmt, SwTableLine* pLine);
@@ -208,9 +211,6 @@ public:
virtual sal_Bool SAL_CALL supportsService(const rtl::OUString& ServiceName) throw( ::com::sun::star::uno::RuntimeException );
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
const SwTableLine* GetTblRow() const {return pLine;}
static SwTableLine* FindLine(SwTable* pTable, SwTableLine* pLine);
};
@@ -264,7 +264,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
// ITextCursorHelper
virtual const SwPaM* GetPaM() const;
@@ -405,7 +405,7 @@ public:
SwRangeDescriptor& rDesc);
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
};
@@ -487,7 +487,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
SwFrmFmt* GetFrmFmt() const { return (SwFrmFmt*)GetRegisteredIn(); }
sal_uInt16 getRowCount(void);
@@ -539,7 +539,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
class SwXTableColumns : public cppu::WeakImplHelper2
@@ -577,7 +577,7 @@ public:
virtual ::com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames(void) throw( ::com::sun::star::uno::RuntimeException );
//SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
};
#endif
diff --git a/sw/inc/unotext.hxx b/sw/inc/unotext.hxx
index 5e1543acfcde..cb483507b712 100644
--- a/sw/inc/unotext.hxx
+++ b/sw/inc/unotext.hxx
@@ -289,6 +289,12 @@ public:
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
+ // XTextCopy
+ virtual void SAL_CALL copyText(
+ const ::com::sun::star::uno::Reference<
+ ::com::sun::star::text::XTextCopy >& xSource )
+ throw (::com::sun::star::uno::RuntimeException);
+
// XTextRangeCompare
sal_Int16 SAL_CALL compareRegionStarts(
const ::com::sun::star::uno::Reference<
@@ -332,12 +338,6 @@ public:
::com::sun::star::text::XTextContent>& xPredecessor)
throw (::com::sun::star::lang::IllegalArgumentException,
::com::sun::star::uno::RuntimeException);
-
- // XTextCopy
- virtual void SAL_CALL copyText(
- const ::com::sun::star::uno::Reference<
- ::com::sun::star::text::XTextCopy >& xSource )
- throw (::com::sun::star::uno::RuntimeException);
};
#endif // SW_UNOTEXT_HXX
diff --git a/sw/inc/unotextmarkup.hxx b/sw/inc/unotextmarkup.hxx
index 4b015b95405e..b682a97db6a6 100644
--- a/sw/inc/unotextmarkup.hxx
+++ b/sw/inc/unotextmarkup.hxx
@@ -66,14 +66,14 @@ public:
// ::com::sun::star::text::XMultiTextMarkup:
virtual void SAL_CALL commitMultiTextMarkup( const ::com::sun::star::uno::Sequence< ::com::sun::star::text::TextMarkupDescriptor >& aMarkups ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::uno::RuntimeException);
- //SwClient
- virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
-
private:
SwXTextMarkup( const SwXTextMarkup & ); // not defined
SwXTextMarkup & operator =( const SwXTextMarkup & ); // not defined
protected:
+ //SwClient
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+
SwTxtNode* mpTxtNode;
const ModelToViewHelper::ConversionMap* mpConversionMap;
diff --git a/sw/inc/unotxdoc.hxx b/sw/inc/unotxdoc.hxx
index 82512aa9af5e..7aad16da1d3c 100644
--- a/sw/inc/unotxdoc.hxx
+++ b/sw/inc/unotxdoc.hxx
@@ -130,8 +130,7 @@ class SfxViewFrame;
class SwPrintUIOptions;
class SwPrintData;
class SwRenderData;
-class SwWrtShell;
-
+class ViewShell;
typedef UnoActionContext* UnoActionContextPtr;
SV_DECL_PTRARR(ActionContextArr, UnoActionContextPtr, 4, 4)
@@ -587,16 +586,14 @@ public:
-----------------------------------------------------------------------*/
class SwViewOptionAdjust_Impl
{
- SwWrtShell & m_rShell;
+ ViewShell & m_rShell;
SwViewOption m_aOldViewOptions;
public:
- SwViewOptionAdjust_Impl( SwWrtShell& rSh, const SwViewOption &rViewOptions );
+ SwViewOptionAdjust_Impl( ViewShell& rSh, const SwViewOption &rViewOptions );
~SwViewOptionAdjust_Impl();
-
- void AdjustViewOptions( SwPrintData const*const pPrtOptions );
-
- bool checkShell( const SwWrtShell& rCompare ) const
+ void AdjustViewOptions( SwPrintData const* const pPrtOptions );
+ bool checkShell( const ViewShell& rCompare ) const
{ return &rCompare == &m_rShell; }
};
diff --git a/sw/inc/usrfld.hxx b/sw/inc/usrfld.hxx
index 5b041e620d9a..49e7368a4d79 100644
--- a/sw/inc/usrfld.hxx
+++ b/sw/inc/usrfld.hxx
@@ -62,8 +62,6 @@ public:
inline sal_Bool IsValid() const;
inline void ChgValid( sal_Bool bNew );
- virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
-
double GetValue(SwCalc& rCalc); // Member nValue neu berrechnen
inline double GetValue() const;
inline void SetValue(const double nVal);
@@ -76,6 +74,9 @@ public:
virtual bool QueryValue( com::sun::star::uno::Any& rVal, sal_uInt16 nMId ) const;
virtual bool PutValue( const com::sun::star::uno::Any& rVal, sal_uInt16 nMId );
+
+protected:
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
};
inline sal_Bool SwUserFieldType::IsValid() const
diff --git a/sw/inc/viewopt.hxx b/sw/inc/viewopt.hxx
index af12afe42bbc..7da7da2f9c43 100644
--- a/sw/inc/viewopt.hxx
+++ b/sw/inc/viewopt.hxx
@@ -156,8 +156,9 @@ protected:
sal_Bool bStarOneSetting : 1;// prevent from UI automatics (no scrollbars in readonly documents)
sal_Bool bIsPagePreview : 1; // the preview mustn't print field/footnote/... shadings
sal_Bool bSelectionInReadonly : 1; //determines whether selection is switched on in readonly documents
- sal_Bool bFormView : 1;
- sal_Bool bBookview : 1; // view mode for page preview
+ sal_Bool mbFormView : 1;
+ sal_Bool mbBrowseMode : 1; //swmod 080130
+ sal_Bool mbBookView : 1; // view mode for page preview
sal_Bool mbViewLayoutBookMode : 1; // book view mode for edit view
sal_Bool bShowPlaceHolderFields : 1; //only used in printing!
mutable bool bIdle;
@@ -400,11 +401,13 @@ public:
sal_Bool IsSelectionInReadonly() const {return bSelectionInReadonly;}
void SetSelectionInReadonly(sal_Bool bSet) {bSelectionInReadonly = bSet;}
- sal_Bool IsFormView() const { return bFormView; }
- void SetFormView( sal_Bool bSet ) { bFormView = bSet; }
+ sal_Bool IsFormView() const { return mbFormView; }
+ void SetFormView( sal_Bool bSet ) { mbFormView = bSet; }
- inline sal_Bool IsPagePrevBookview() const { return bBookview; }
- inline void SetPagePrevBookview(sal_Bool bSet) { bBookview = bSet; }
+ inline sal_Bool getBrowseMode() const { return mbBrowseMode; }
+ inline void setBrowseMode(sal_Bool bSet) { mbBrowseMode = bSet; }
+ inline sal_Bool IsPagePrevBookview() const { return mbBookView; }
+ inline void SetPagePrevBookview(sal_Bool bSet) { mbBookView = bSet; }
sal_Bool IsAutoCompleteWords() const;
diff --git a/sw/inc/viewsh.hxx b/sw/inc/viewsh.hxx
index 7e07979f47a0..27f4d434df44 100644
--- a/sw/inc/viewsh.hxx
+++ b/sw/inc/viewsh.hxx
@@ -36,6 +36,7 @@
#include <swtypes.hxx>
#include <ring.hxx>
#include <swrect.hxx>
+#include <boost/shared_ptr.hpp>// swmod 080115
#include <vcl/mapmod.hxx>
#include <vcl/print.hxx>
@@ -95,7 +96,8 @@ namespace vcl
// benoetigt werden.
// Zur Zeit wird fuer die DrawPage das PreView Flag benoetigt
#define VSHELLFLAG_ISPREVIEW ((long)0x1)
-
+#define VSHELLFLAG_SHARELAYOUT ((long)0x2)//swmod 080125 flag
+typedef boost::shared_ptr<SwRootFrm> SwRootFrmPtr;
class SW_DLLPUBLIC ViewShell : public Ring
{
@@ -164,6 +166,8 @@ class SW_DLLPUBLIC ViewShell : public Ring
SdrPaintWindow* mpTargetPaintWindow;
OutputDevice* mpBufferedOut;
+ SwRootFrmPtr pLayout; //swmod 080116
+
//Initialisierung, wird von den verschiedenen Konstruktoren gerufen.
SW_DLLPRIVATE void Init( const SwViewOption *pNewOpt );
@@ -271,7 +275,7 @@ public:
//Invalidierung der ersten Sichtbaren Seite fuer alle Shells im Ring.
void SetFirstVisPageInvalid();
- SwRootFrm *GetLayout() const;
+ SwRootFrm *GetLayout() const;//swmod 080116
sal_Bool IsNewLayout() const; //Wurde das Layout geladen oder neu
//erzeugt?
@@ -279,6 +283,10 @@ public:
void CalcLayout(); //Durchformatierung des Layouts erzwingen.
+ sal_uInt16 GetPageCount() const;
+
+ const Size GetPageSize( sal_uInt16 nPageNum, bool bSkipEmptyPages ) const;
+
inline SwDoc *GetDoc() const { return pDoc; } //niemals 0.
/** Provides access to the document setting interface
@@ -420,7 +428,7 @@ public:
void LayoutIdle();
inline const SwViewOption *GetViewOptions() const { return pOpt; }
- void ApplyViewOptions( const SwViewOption &rOpt );
+ virtual void ApplyViewOptions( const SwViewOption &rOpt );
void SetUIOptions( const SwViewOption &rOpt );
void SetReadonlyOption(sal_Bool bSet); // Readonly-Bit d. ViewOptions setzen
void SetPDFExportOption(sal_Bool bSet); // set/reset PDF export mode