CWS swlayoutrefactoring: #i115510#: first step to clean up the SwClient mess
This commit is contained in:
parent
5e9bd0b1ce
commit
de60fd06b8
233 changed files with 2548 additions and 5356 deletions
|
@ -89,13 +89,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, USHORT nWhichId ) const;
|
||||
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nWhichId );
|
||||
|
|
|
@ -25,25 +25,6 @@
|
|||
*
|
||||
************************************************************************/
|
||||
|
||||
/*************************************************************
|
||||
#* Service-Klassen
|
||||
*************************************************************/
|
||||
|
||||
/*
|
||||
#* Aendert sich ein Attribut in einem Format, so muss diese
|
||||
#* Aenderung an alle abhaengigen Formate und ueber sie an
|
||||
#* alle betroffenen Nodes propagiert werden. Dabei muss
|
||||
#* festgestellt werden, ob die Aenderung einen Effekt haben
|
||||
#* kann, oder ob das geaenderte Attribut von dem abhaengigen
|
||||
#* Format ueberdefiniert wird (so dass ohnehin der
|
||||
#* Attributwert des abhaengigen Formates den geaenderten
|
||||
#* Wert verdeckt). Weiterhin kann der betroffene Node
|
||||
#* feststellen, ob er von dem geaenderten Attribut Gebrauch
|
||||
#* macht (Beispiel: Linienabstand fuer Unterstreichung wurde
|
||||
#* geaendert, das Attribut Unterstreichung wurde aber nicht
|
||||
#* verwendet). So wird bei Aenderungen der minimale Aufwand
|
||||
#* zum Reformatieren erkannt.
|
||||
*/
|
||||
#ifndef _CALBCK_HXX
|
||||
#define _CALBCK_HXX
|
||||
|
||||
|
@ -53,7 +34,33 @@
|
|||
class SwModify;
|
||||
class SwClientIter;
|
||||
class SfxPoolItem;
|
||||
class SvStream;
|
||||
|
||||
/*
|
||||
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
|
||||
|
@ -61,106 +68,128 @@ class SvStream;
|
|||
|
||||
class SW_DLLPUBLIC SwClient
|
||||
{
|
||||
// avoids making the details of the linked list and the callback method public
|
||||
friend class SwModify;
|
||||
friend class SwClientIter;
|
||||
|
||||
SwClient *pLeft, *pRight; // fuer die AVL-Sortierung
|
||||
BOOL bModifyLocked : 1; // wird in SwModify::Modify benutzt,
|
||||
// eigentlich ein Member des SwModify
|
||||
// aber aus Platzgruenden hier.
|
||||
BOOL bInModify : 1; // ist in einem Modify. (Debug!!!)
|
||||
BOOL bInDocDTOR : 1; // Doc wird zerstoert, nicht "abmelden"
|
||||
BOOL bInCache : 1; // Ist im BorderAttrCache des Layout,
|
||||
// Traegt sich dann im Modify aus!
|
||||
BOOL bInSwFntCache : 1; // Ist im SwFont-Cache der Formatierung
|
||||
SwClient *pLeft, *pRight; // double-linked list of other clients
|
||||
SwModify *pRegisteredIn; // event source
|
||||
|
||||
// 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;
|
||||
|
||||
// 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( SwModify* pModify, USHORT nWhich );
|
||||
|
||||
protected:
|
||||
SwModify *pRegisteredIn;
|
||||
|
||||
// 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);
|
||||
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
|
||||
// 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 );
|
||||
|
||||
//rtti, abgeleitete moegens gleichtun oder nicht. Wenn sie es gleichtun
|
||||
//kann ueber die Abhaengigkeitsliste eines Modify typsicher gecastet
|
||||
//werden.
|
||||
// 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 );
|
||||
|
||||
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
|
||||
bool IsLast() const { return !pLeft && !pRight; }
|
||||
|
||||
// needed for class SwClientIter
|
||||
TYPEINFO();
|
||||
|
||||
void LockModify() { bModifyLocked = TRUE; }
|
||||
void UnlockModify() { bModifyLocked = FALSE; }
|
||||
void SetInCache( BOOL bNew ) { bInCache = bNew; }
|
||||
void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
|
||||
BOOL IsModifyLocked() const { return bModifyLocked; }
|
||||
BOOL IsInDocDTOR() const { return bInDocDTOR; }
|
||||
BOOL IsInCache() const { return bInCache; }
|
||||
BOOL IsInSwFntCache() const { return bInSwFntCache; }
|
||||
|
||||
// erfrage vom Client Informationen
|
||||
// get information about attribute
|
||||
virtual BOOL GetInfo( SfxPoolItem& ) const;
|
||||
|
||||
private:
|
||||
// forbidden and not implemented
|
||||
SwClient( const SwClient& );
|
||||
SwClient &operator=( const SwClient& );
|
||||
};
|
||||
|
||||
inline SwClient::SwClient() :
|
||||
pLeft(0), pRight(0), pRegisteredIn(0)
|
||||
{ bModifyLocked = bInModify = bInDocDTOR = bInCache = bInSwFntCache = FALSE; }
|
||||
|
||||
pLeft(0), pRight(0), pRegisteredIn(0), mbIsAllowedToBeRemovedInModifyCall(false)
|
||||
{}
|
||||
|
||||
// ----------
|
||||
// SwModify
|
||||
// ----------
|
||||
|
||||
// Klasse hat eine doppelt Verkette Liste fuer die Abhaengigen.
|
||||
|
||||
class SW_DLLPUBLIC SwModify: public SwClient
|
||||
{
|
||||
friend SvStream& operator<<( SvStream& aS, SwModify & );
|
||||
// friend class SwClientIter;
|
||||
|
||||
friend class SwClientIter;
|
||||
SwClient* pRoot;
|
||||
SwClient* pRoot; // the start of the linked list of clients
|
||||
BOOL bModifyLocked : 1; // don't broadcast changes now
|
||||
BOOL bLockClientList : 1; // may be set when this instance notifies its clients
|
||||
BOOL bInDocDTOR : 1; // workaround for problems when a lot of objects are destroyed
|
||||
BOOL bInCache : 1;
|
||||
BOOL bInSwFntCache : 1;
|
||||
|
||||
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) );
|
||||
|
||||
// placeholder for a more elaborated broadcasting mechanism; currently the nWhich is enough
|
||||
void CallSwClientNotify( USHORT nWhich );
|
||||
|
||||
// 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; }
|
||||
|
||||
// erfrage vom Client Informationen
|
||||
// get information about attribute
|
||||
virtual BOOL GetInfo( SfxPoolItem& ) const;
|
||||
|
||||
void SetInDocDTOR() { bInDocDTOR = TRUE; }
|
||||
void LockModify() { bModifyLocked = TRUE; }
|
||||
void UnlockModify() { bModifyLocked = FALSE; }
|
||||
void SetInCache( BOOL bNew ) { bInCache = bNew; }
|
||||
void SetInSwFntCache( BOOL bNew ) { bInSwFntCache = bNew; }
|
||||
void SetInDocDTOR() { bInDocDTOR = TRUE; }
|
||||
BOOL IsModifyLocked() const { return bModifyLocked; }
|
||||
BOOL IsInDocDTOR() const { return bInDocDTOR; }
|
||||
BOOL IsInCache() const { return bInCache; }
|
||||
BOOL IsInSwFntCache() const { return bInSwFntCache; }
|
||||
|
||||
void CheckCaching( const USHORT nWhich );
|
||||
|
||||
BOOL IsLastDepend() const
|
||||
{ return pRoot && !pRoot->pLeft && !pRoot->pRight; }
|
||||
bool IsLastDepend() { return pRoot && pRoot->IsLast(); }
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
int GetClientCount() const;
|
||||
#endif
|
||||
|
||||
private:
|
||||
// forbidden and not implemented (see @ SwClient).
|
||||
// forbidden and not implemented
|
||||
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 &);
|
||||
};
|
||||
|
||||
|
@ -169,9 +198,7 @@ protected:
|
|||
// ----------
|
||||
|
||||
/*
|
||||
* Sehr sinnvolle Klasse, wenn ein Objekt von mehreren Objekten
|
||||
* abhaengig ist. Diese sollte fuer jede Abhaengigkeit ein Objekt
|
||||
* der Klasse SwDepend als Member haben.
|
||||
* Helper class for objects that need to depend on more than one SwClient
|
||||
*/
|
||||
class SW_DLLPUBLIC SwDepend: public SwClient
|
||||
{
|
||||
|
@ -182,13 +209,14 @@ public:
|
|||
SwDepend(SwClient *pTellHim, SwModify *pDepend);
|
||||
|
||||
SwClient* GetToTell() { return pToTell; }
|
||||
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
|
||||
|
||||
// erfrage vom Client Informationen
|
||||
virtual BOOL GetInfo( SfxPoolItem & ) const;
|
||||
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
|
||||
|
||||
private:
|
||||
// forbidden and not implemented (see @ SwClient).
|
||||
// forbidden and not implemented
|
||||
SwDepend (const SwDepend &);
|
||||
SwDepend & operator= (const SwDepend &);
|
||||
};
|
||||
|
@ -196,55 +224,52 @@ private:
|
|||
|
||||
class SwClientIter
|
||||
{
|
||||
friend SwClient* SwModify::_Remove(SwClient *); // fuer Ptr-Korrektur
|
||||
friend void SwModify::Add(SwClient *); // nur fuer ASSERT !
|
||||
friend SwClient* SwModify::Remove(SwClient *); // for pointer adjustments
|
||||
friend void SwModify::Add(SwClient *pDepend); // for pointer adjustments
|
||||
|
||||
SwModify const& rRoot;
|
||||
SwClient *pAkt, *pDelNext;
|
||||
// fuers Updaten der aller Iteratoren beim Einfuegen/Loeschen von
|
||||
// Clients, wenn der Iterator gerade draufsteht.
|
||||
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;
|
||||
|
||||
// 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;
|
||||
|
||||
SwClient* mpWatchClient; // if set, SwModify::_Remove checks if this client is removed
|
||||
|
||||
TypeId aSrchId; // fuer First/Next - suche diesen 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; }
|
||||
|
||||
#ifndef CFRONT
|
||||
SwClient* operator++(int); // zum Naechsten
|
||||
SwClient* operator--(int); // zum Vorherigen
|
||||
#endif
|
||||
SwClient* operator++(); // zum Naechsten
|
||||
SwClient* operator--(); // zum Vorherigen
|
||||
|
||||
SwClient* GoStart(); // zum Anfang
|
||||
SwClient* GoEnd(); // zum Ende
|
||||
|
||||
inline SwClient* GoRoot(); // wieder ab Root (==Start) anfangen
|
||||
SwClient* operator++(int);
|
||||
SwClient* GoStart();
|
||||
SwClient* GoEnd();
|
||||
|
||||
// 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() // wieder ab Root anfangen
|
||||
{
|
||||
pAkt = rRoot.pRoot;
|
||||
return (pDelNext = pAkt);
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
|
|
@ -322,6 +322,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 );
|
||||
|
@ -329,8 +332,6 @@ public:
|
|||
SwCrsrShell( SwCrsrShell& rShell, Window *pWin );
|
||||
virtual ~SwCrsrShell();
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
|
||||
// neuen Cusror erzeugen und den alten anhaengen
|
||||
SwPaM * CreateCrsr();
|
||||
// loesche den aktuellen Cursor und der folgende wird zum Aktuellen
|
||||
|
|
|
@ -28,17 +28,14 @@
|
|||
#define _DCONTACT_HXX
|
||||
|
||||
#include <svx/svdobj.hxx>
|
||||
// OD 14.05.2003 #108784#
|
||||
#include <svx/svdovirt.hxx>
|
||||
// OD 2004-01-16 #110582#
|
||||
#include <swtypes.hxx>
|
||||
#include <fmtanchr.hxx>
|
||||
#include <frmfmt.hxx>
|
||||
|
||||
// OD 17.06.2003 #108784#
|
||||
#include <list>
|
||||
|
||||
#include "calbck.hxx"
|
||||
#include <anchoreddrawobject.hxx>
|
||||
|
||||
class SfxPoolItem;
|
||||
class SwFrmFmt;
|
||||
|
@ -50,13 +47,10 @@ class SwVirtFlyDrawObj;
|
|||
class SwFmtAnchor;
|
||||
class SwFlyDrawObj;
|
||||
class SwRect;
|
||||
// OD 17.06.2003 #108784# - forward declaration for class <SwDrawVirtObj>
|
||||
class SwDrawContact;
|
||||
// OD 2004-01-16 #110582#
|
||||
struct SwPosition;
|
||||
class SwIndex;
|
||||
// OD 2004-03-25 #i26791#
|
||||
#include <anchoreddrawobject.hxx>
|
||||
class SdrTextObj;
|
||||
|
||||
//Der Umgekehrte Weg: Sucht das Format zum angegebenen Objekt.
|
||||
//Wenn das Object ein SwVirtFlyDrawObj ist so wird das Format von
|
||||
|
@ -212,7 +206,7 @@ public:
|
|||
|
||||
@author
|
||||
*/
|
||||
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
|
||||
|
||||
|
@ -240,14 +234,9 @@ private:
|
|||
// OD 2004-04-01 #i26791#
|
||||
SwFlyDrawObj* mpMasterObj;
|
||||
|
||||
/** method to determine new order number for new instance of <SwVirtFlyDrawObj>
|
||||
|
||||
OD 2004-08-16 #i27030#
|
||||
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();
|
||||
|
@ -265,11 +254,6 @@ public:
|
|||
virtual SdrObject* GetMaster();
|
||||
virtual void SetMaster( SdrObject* _pNewMaster );
|
||||
|
||||
SwVirtFlyDrawObj* CreateNewRef( SwFlyFrm* pFly );
|
||||
|
||||
// virtuelle Methoden von SwClient
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
|
||||
|
||||
// OD 2004-01-16 #110582# - 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.
|
||||
|
@ -282,7 +266,7 @@ public:
|
|||
|
||||
@author
|
||||
*/
|
||||
virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
|
||||
virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
|
||||
};
|
||||
|
||||
// OD 16.05.2003 #108784# - new class for re-direct methods calls at a 'virtual'
|
||||
|
@ -468,6 +452,11 @@ class SwDrawContact : public SwContact
|
|||
SwDrawContact( const SwDrawContact& );
|
||||
SwDrawContact& operator=( const SwDrawContact& );
|
||||
// <--
|
||||
|
||||
protected:
|
||||
// virtuelle Methoden von SwClient
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
|
||||
|
||||
public:
|
||||
TYPEINFO();
|
||||
|
||||
|
@ -530,9 +519,6 @@ class SwDrawContact : public SwContact
|
|||
// by frame.
|
||||
SdrObject* GetDrawObjectByAnchorFrm( const SwFrm& _rAnchorFrm );
|
||||
|
||||
// virtuelle Methoden von SwClient
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
|
||||
|
||||
// virtuelle Methoden von SdrObjUserCall
|
||||
virtual void Changed(const SdrObject& rObj, SdrUserCallType eType, const Rectangle& rOldBoundRect);
|
||||
|
||||
|
@ -555,7 +541,9 @@ class SwDrawContact : public SwContact
|
|||
|
||||
@author
|
||||
*/
|
||||
virtual void GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const;
|
||||
|
||||
static void GetTextObjectsFromFmt( std::list<SdrTextObj*>&, SwDoc* );
|
||||
virtual void GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -636,8 +636,10 @@ public:
|
|||
SwRefPageSetFieldType();
|
||||
|
||||
virtual SwFieldType* Copy() const;
|
||||
|
||||
protected:
|
||||
// ueberlagert, weil es nichts zum Updaten gibt!
|
||||
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
|
||||
virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -677,15 +679,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;
|
||||
|
||||
// ueberlagert, um alle RefPageGet-Felder zu updaten
|
||||
virtual void Modify( SfxPoolItem *, SfxPoolItem * );
|
||||
USHORT MakeSetList( _SetGetExpFlds& rTmpLst );
|
||||
|
||||
SwDoc* GetDoc() const { return pDoc; }
|
||||
};
|
||||
|
||||
|
|
|
@ -82,8 +82,8 @@ public:
|
|||
// ueberlagert, weil das Get-Field nicht veraendert werden kann
|
||||
// und dann auch nicht aktualisiert werden muss. Aktualisierung
|
||||
// erfolgt beim Aendern von Set-Werten !
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -165,6 +165,8 @@ class SW_DLLPUBLIC SwSetExpFieldType : public SwValueFieldType
|
|||
USHORT nType;
|
||||
BYTE nLevel;
|
||||
BOOL bDeleted;
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
|
||||
|
||||
public:
|
||||
SwSetExpFieldType( SwDoc* pDoc, const String& rName,
|
||||
|
@ -183,7 +185,6 @@ public:
|
|||
|
||||
// ueberlagert, weil das Set-Field selbst dafuer sorgt, das
|
||||
// es aktualisiert wird.
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
|
||||
inline const String& GetSetRefName() const;
|
||||
|
||||
USHORT SetSeqRefNo( SwSetExpField& rFld );
|
||||
|
|
|
@ -53,6 +53,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,7 +76,6 @@ public:
|
|||
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
|
||||
|
||||
// an das SwTxtCharFmt weiterleiten (vom SwClient)
|
||||
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
|
||||
|
||||
void SetCharFmt( SwFmt* pFmt ) { pFmt->Add(this); }
|
||||
|
|
|
@ -293,7 +293,7 @@ public:
|
|||
|
||||
inline void SwFieldType::UpdateFlds() const
|
||||
{
|
||||
((SwFieldType*)this)->Modify( 0, 0 );
|
||||
((SwFieldType*)this)->ModifyNotification( 0, 0 );
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
|
|
@ -96,10 +96,11 @@ protected:
|
|||
//nOutlineLevel( NO_NUMBERING ) //<-#outline level,removed by zhaojianwei
|
||||
mbAssignedToOutlineStyle(false) //<-#outline level,added by zhaojianwei
|
||||
{ pNextTxtFmtColl = this; }
|
||||
public:
|
||||
|
||||
// zum "abfischen" von UL-/LR-/FontHeight Aenderungen
|
||||
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
|
||||
|
||||
public:
|
||||
|
||||
TYPEINFO(); //Bereits in Basisklasse Client drin.
|
||||
|
||||
|
@ -255,6 +256,7 @@ public:
|
|||
|
||||
void SetCondition( ULONG nCond, ULONG nSubCond );
|
||||
SwTxtFmtColl* GetTxtFmtColl() const { return (SwTxtFmtColl*)GetRegisteredIn(); }
|
||||
void RegisterToFormat( SwFmt& );
|
||||
};
|
||||
|
||||
|
||||
|
@ -281,9 +283,6 @@ public:
|
|||
|
||||
virtual ~SwConditionTxtFmtColl();
|
||||
|
||||
// zum "abfischen" von Aenderungen
|
||||
// virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
|
||||
const SwCollCondition* HasCondition( const SwCollCondition& rCond ) const;
|
||||
const SwFmtCollConditions& GetCondColls() const { return aCondColls; }
|
||||
void InsertCondition( const SwCollCondition& rCond );
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#ifndef _FMTFLD_HXX
|
||||
#define _FMTFLD_HXX
|
||||
|
||||
#include <list>
|
||||
#include <svl/poolitem.hxx>
|
||||
#include <svl/brdcst.hxx>
|
||||
#include <svl/smplhint.hxx>
|
||||
|
@ -37,6 +38,7 @@
|
|||
class SwField;
|
||||
class SwTxtFld;
|
||||
class SwView;
|
||||
class SwFieldType;
|
||||
|
||||
// ATT_FLD ***********************************
|
||||
class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBroadcaster
|
||||
|
@ -53,6 +55,9 @@ 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);
|
||||
|
||||
public:
|
||||
TYPEINFO();
|
||||
|
||||
|
@ -68,7 +73,6 @@ public:
|
|||
virtual int operator==( const SfxPoolItem& ) const;
|
||||
virtual SfxPoolItem* Clone( SfxItemPool* pPool = 0 ) const;
|
||||
|
||||
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
|
||||
virtual BOOL GetInfo( SfxPoolItem& rInfo ) const;
|
||||
|
||||
const SwField *GetFld() const { return pField; }
|
||||
|
@ -89,6 +93,7 @@ public:
|
|||
|
||||
BOOL IsFldInDoc() const;
|
||||
BOOL IsProtect() const;
|
||||
void RegisterToFieldType( SwFieldType& );
|
||||
};
|
||||
|
||||
class SW_DLLPUBLIC SwFmtFldHint : public SfxHint
|
||||
|
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
class SwFrmFmt;
|
||||
class IntlWrapper;
|
||||
|
||||
class SwFmt;
|
||||
|
||||
//Kopfzeile, fuer Seitenformate
|
||||
//Client von FrmFmt das den Header beschreibt.
|
||||
|
@ -61,13 +61,15 @@ 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(); }
|
||||
|
||||
BOOL IsActive() const { return bActive; }
|
||||
void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
|
||||
void RegisterToFormat( SwFmt& rFmt );
|
||||
};
|
||||
|
||||
|
||||
//Fusszeile, fuer Seitenformate
|
||||
//Client von FrmFmt das den Footer beschreibt.
|
||||
|
||||
|
@ -93,13 +95,15 @@ 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(); }
|
||||
|
||||
BOOL IsActive() const { return bActive; }
|
||||
void SetActive( BOOL bNew = TRUE ) { bActive = bNew; }
|
||||
void RegisterToFormat( SwFmt& rFmt );
|
||||
};
|
||||
|
||||
|
||||
inline const SwFmtHeader &SwAttrSet::GetHeader(BOOL bInP) const
|
||||
{ return (const SwFmtHeader&)Get( RES_HEADER,bInP); }
|
||||
inline const SwFmtFooter &SwAttrSet::GetFooter(BOOL bInP) 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;
|
||||
|
|
|
@ -38,6 +38,7 @@ class SwPageDesc;
|
|||
class SwHistory;
|
||||
class SwPaM;
|
||||
class IntlWrapper;
|
||||
class SwEndNoteInfo;
|
||||
|
||||
//Pagedescriptor
|
||||
//Client vom SwPageDesc der durch das Attribut "beschrieben" wird.
|
||||
|
@ -55,6 +56,8 @@ class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
|
|||
USHORT nDescNameIdx; // SW3-Reader: Stringpool-Index des Vorlagennamens
|
||||
SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
|
||||
// Attribut gesetzt wurde (CntntNode/Format)
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
|
||||
|
||||
public:
|
||||
SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
|
||||
|
@ -75,8 +78,6 @@ public:
|
|||
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 ) const;
|
||||
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, BYTE nMemberId = 0 );
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew );
|
||||
|
||||
SwPageDesc *GetPageDesc() { return (SwPageDesc*)GetRegisteredIn(); }
|
||||
const SwPageDesc *GetPageDesc() const { return (SwPageDesc*)GetRegisteredIn(); }
|
||||
|
||||
|
@ -86,6 +87,10 @@ public:
|
|||
// erfrage/setze, wo drin das Attribut verankert ist
|
||||
inline const SwModify* GetDefinedIn() const { return pDefinedIn; }
|
||||
void ChgDefinedIn( const SwModify* pNew ) { pDefinedIn = (SwModify*)pNew; }
|
||||
void RegisterToEndNotInfo( SwEndNoteInfo& );
|
||||
void RegisterToPageDesc( SwPageDesc& );
|
||||
bool KnowsPageDesc() const;
|
||||
bool IsRegisteredAt( SwEndNoteInfo* pInfo ) const;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -44,9 +44,6 @@ class SwDoc;
|
|||
|
||||
class SW_DLLPUBLIC SwFmt : public SwModify
|
||||
{
|
||||
// friend class SwSwgReader;
|
||||
// friend class SwSwgWriter;
|
||||
|
||||
String aFmtName;
|
||||
SwAttrSet aSet;
|
||||
|
||||
|
@ -70,6 +67,7 @@ protected:
|
|||
SwFmt( SwAttrPool& rPool, const String &rFmtNm, const USHORT* pWhichRanges,
|
||||
SwFmt *pDrvdFrm, USHORT nFmtWhich );
|
||||
SwFmt( const SwFmt& rFmt );
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
|
||||
|
||||
public:
|
||||
TYPEINFO(); //Bereits in Basisklasse Client drin.
|
||||
|
@ -80,7 +78,6 @@ public:
|
|||
// fuer die Abfrage der Writer-Funktionen
|
||||
USHORT Which() const { return nWhichId; }
|
||||
|
||||
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
|
||||
// erfrage vom Format Informationen
|
||||
virtual BOOL GetInfo( SfxPoolItem& ) const;
|
||||
|
||||
|
@ -114,7 +111,7 @@ public:
|
|||
virtual USHORT ResetAllFmtAttr();
|
||||
// <--
|
||||
|
||||
inline SwFmt* DerivedFrom() const { return (SwFmt*)pRegisteredIn; }
|
||||
inline SwFmt* DerivedFrom() const { return (SwFmt*)GetRegisteredIn(); }
|
||||
inline BOOL IsDefault() const { return DerivedFrom() == 0; }
|
||||
|
||||
inline const String& GetName() const { return aFmtName; }
|
||||
|
|
|
@ -27,14 +27,9 @@
|
|||
#ifndef _FRMFMT_HXX
|
||||
#define _FRMFMT_HXX
|
||||
|
||||
// --> OD 2004-08-06 #i28749#
|
||||
#include <com/sun/star/text/PositionLayoutDir.hpp>
|
||||
// <--
|
||||
|
||||
#include <cppuhelper/weakref.hxx>
|
||||
|
||||
#include <format.hxx>
|
||||
|
||||
#include "swdllapi.h"
|
||||
|
||||
class SwFlyFrm;
|
||||
|
@ -70,6 +65,8 @@ protected:
|
|||
pDrvdFrm, nFmtWhich )
|
||||
{}
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNewValue );
|
||||
|
||||
public:
|
||||
TYPEINFO(); //Bereits in Basisklasse Client drin.
|
||||
|
||||
|
@ -81,8 +78,6 @@ public:
|
|||
|
||||
virtual Graphic MakeGraphic( ImageMap* pMap = NULL );
|
||||
|
||||
virtual void Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue );
|
||||
|
||||
// returnt das IMapObject, das an dem Format (Fly), in der ImageMap
|
||||
// an der Point Position definiert ist.
|
||||
// rPoint - teste auf der DocPosition
|
||||
|
@ -145,6 +140,7 @@ public:
|
|||
{ m_wXObject = xObject; }
|
||||
|
||||
DECL_FIXEDMEMPOOL_NEWDEL_DLL(SwFrmFmt)
|
||||
void RegisterToFormat( SwFmt& rFmt ) { Add( &rFmt ); }
|
||||
};
|
||||
|
||||
//Das FlyFrame-Format ------------------------------
|
||||
|
|
|
@ -29,9 +29,6 @@
|
|||
|
||||
#include <tools/string.hxx>
|
||||
#include "swdllapi.h"
|
||||
//#ifndef _NUMRULE_HXX
|
||||
//#include <numrule.hxx>
|
||||
//#endif
|
||||
#include <calbck.hxx>
|
||||
#include <editeng/numitem.hxx>
|
||||
|
||||
|
@ -48,6 +45,8 @@ class SW_DLLPUBLIC SwEndNoteInfo : public SwClient
|
|||
String sSuffix;
|
||||
protected:
|
||||
bool m_bEndNote;
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
|
||||
|
||||
public:
|
||||
SvxNumberType aFmt;
|
||||
USHORT nFtnOffset;
|
||||
|
@ -67,8 +66,6 @@ public:
|
|||
void SetAnchorCharFmt( SwCharFmt* );
|
||||
SwClient *GetAnchorCharFmtDep() const { return (SwClient*)&aAnchorCharFmtDep; }
|
||||
|
||||
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
|
||||
|
||||
SwEndNoteInfo & operator=(const SwEndNoteInfo&);
|
||||
BOOL operator==( const SwEndNoteInfo &rInf ) const;
|
||||
|
||||
|
@ -80,6 +77,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
|
||||
|
|
|
@ -28,9 +28,6 @@
|
|||
#define SW_LINEINFO_HXX
|
||||
|
||||
#include "calbck.hxx"
|
||||
//#ifndef _NUMRULE_HXX
|
||||
//#include <numrule.hxx>
|
||||
//#endif
|
||||
#include <editeng/numitem.hxx>
|
||||
#include "swdllapi.h"
|
||||
|
||||
|
@ -60,6 +57,8 @@ class SW_DLLPUBLIC SwLineNumberInfo : public SwClient //purpose of derivation fr
|
|||
BOOL bCountInFlys; //Count also within FlyFrames?
|
||||
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();
|
||||
|
@ -100,7 +99,7 @@ public:
|
|||
BOOL IsRestartEachPage() const { return bRestartEachPage; }
|
||||
void SetRestartEachPage( BOOL b ) { bRestartEachPage = b; }
|
||||
|
||||
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
bool HasCharFormat() const { return GetRegisteredIn() != 0; }
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -228,6 +228,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( SwModify* pModify, USHORT nWhich );
|
||||
|
||||
public:
|
||||
using SwCntntNode::GetAttr;
|
||||
|
@ -794,9 +798,6 @@ public:
|
|||
|
||||
TYPEINFO(); // fuer rtti
|
||||
|
||||
// fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
|
||||
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 );
|
||||
|
|
|
@ -82,9 +82,8 @@ class IDocumentLineNumberAccess;
|
|||
class IDocumentLinksAdministration;
|
||||
class IDocumentFieldsAccess;
|
||||
class IDocumentContentOperations;
|
||||
// --> OD 2007-10-31 #i83479#
|
||||
class IDocumentListItems;
|
||||
// <--
|
||||
class SwOLENodes;
|
||||
|
||||
// --------------------
|
||||
// class SwNode
|
||||
|
@ -398,11 +397,11 @@ protected:
|
|||
// SwAttrSet (handle):
|
||||
USHORT ClearItemsFromAttrSet( const std::vector<USHORT>& rWhichIds );
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
|
||||
public:
|
||||
TYPEINFO(); //Bereits in Basisklasse Client drin.
|
||||
|
||||
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;
|
||||
|
@ -508,11 +507,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:
|
||||
// privater Constructor, weil nie kopiert werden darf !!
|
||||
SwCntntNode( const SwCntntNode & rNode );
|
||||
SwCntntNode & operator= ( const SwCntntNode & rNode );
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -35,23 +35,17 @@
|
|||
#include "swdllapi.h"
|
||||
#include <swtypes.hxx>
|
||||
#include <calbck.hxx>
|
||||
#include <errhdl.hxx> // Fuer die inline-ASSERTs
|
||||
#include <error.h> // Fuer die inline-ASSERTs
|
||||
#include <errhdl.hxx>
|
||||
#include <error.h>
|
||||
#include <hints.hxx>
|
||||
#include <hash_map>
|
||||
#include <stringhash.hxx>
|
||||
// --> OD 2008-02-21 #refactorlists#
|
||||
class SwNodeNum;
|
||||
#include <SwNumberTreeTypes.hxx>
|
||||
// <--
|
||||
// --> OD 2008-02-19 #refactorlists#
|
||||
#include <vector>
|
||||
class SwTxtFmtColl;
|
||||
// <--
|
||||
// --> OD 2008-07-08 #i91400#
|
||||
class IDocumentListsAccess;
|
||||
// <--
|
||||
|
||||
class SwTxtFmtColl;
|
||||
class IDocumentListsAccess;
|
||||
class SwNodeNum;
|
||||
class Font;
|
||||
class SvxBrushItem;
|
||||
class SvxNumRule;
|
||||
|
@ -72,6 +66,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& );
|
||||
|
@ -84,9 +81,9 @@ public:
|
|||
BOOL operator==( const SwNumFmt& ) const;
|
||||
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;
|
||||
|
|
|
@ -160,6 +160,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; }
|
||||
|
@ -213,7 +216,6 @@ public:
|
|||
|
||||
void SetRegisterFmtColl( const SwTxtFmtColl* rFmt );
|
||||
const SwTxtFmtColl* GetRegisterFmtColl() const;
|
||||
virtual void Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue );
|
||||
void RegisterChange();
|
||||
|
||||
// erfragen und setzen der PoolFormat-Id
|
||||
|
|
|
@ -69,6 +69,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 Methoden" vom SfxPoolItem
|
||||
|
@ -94,10 +98,9 @@ public:
|
|||
inline USHORT GetDistance() const { return nDistance; }
|
||||
inline USHORT &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* );
|
||||
// erfrage vom Client Informationen
|
||||
virtual BOOL GetInfo( SfxPoolItem& ) const;
|
||||
|
||||
|
|
|
@ -77,14 +77,15 @@ public:
|
|||
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 );
|
||||
|
||||
static SwTxtNode* FindAnchor( SwDoc* pDoc, const String& rRefMark,
|
||||
USHORT nSubType, USHORT nSeqNo,
|
||||
USHORT* pStt, USHORT* pEnd = 0 );
|
||||
protected:
|
||||
// ueberlagert, um alle Ref-Felder zu updaten
|
||||
virtual void Modify( const SfxPoolItem*, const SfxPoolItem * );
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
|
|
@ -425,6 +425,9 @@ private:
|
|||
|
||||
void _MakeSetWhichIds();
|
||||
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
|
||||
|
||||
public:
|
||||
// --> OD 2008-02-27 #refactorlists# - removed <rDoc>
|
||||
SwRegHistory( SwHistory* pHst );
|
||||
|
@ -432,8 +435,6 @@ public:
|
|||
SwRegHistory( const SwNode& rNd, SwHistory* pHst );
|
||||
SwRegHistory( SwModify* pRegIn, const SwNode& rNd, SwHistory* pHst );
|
||||
|
||||
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
|
||||
|
||||
/// @return true iff at least 1 item was inserted
|
||||
bool InsertItems( const SfxItemSet& rSet,
|
||||
xub_StrLen const nStart, xub_StrLen const nEnd,
|
||||
|
|
|
@ -177,6 +177,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
|
||||
|
||||
|
@ -193,10 +196,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)
|
||||
|
@ -300,6 +301,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.
|
||||
|
@ -311,7 +313,6 @@ public:
|
|||
//Erzeugt die Ansichten
|
||||
virtual void MakeFrms();
|
||||
|
||||
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew );
|
||||
// erfrage vom Format Informationen
|
||||
virtual BOOL GetInfo( SfxPoolItem& ) const;
|
||||
|
||||
|
|
|
@ -42,12 +42,13 @@ public:
|
|||
BOOL bUpdate = TRUE );
|
||||
~SwDDETable();
|
||||
|
||||
void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
void ChangeContent();
|
||||
BOOL NoDDETable();
|
||||
|
||||
SwDDEFieldType* GetDDEFldType();
|
||||
inline const SwDDEFieldType* GetDDEFldType() const;
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
|
||||
};
|
||||
|
||||
|
||||
|
|
47
sw/inc/switerator.hxx
Executable file
47
sw/inc/switerator.hxx
Executable file
|
@ -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
|
|
@ -27,9 +27,7 @@
|
|||
#ifndef _SWTABLE_HXX
|
||||
#define _SWTABLE_HXX
|
||||
#include <tools/mempool.hxx>
|
||||
#ifndef _TOOLS_REF_HXX
|
||||
#include <tools/ref.hxx>
|
||||
#endif
|
||||
#include <svl/svarray.hxx>
|
||||
#include <tblenum.hxx>
|
||||
#include <swtypes.hxx>
|
||||
|
@ -43,6 +41,7 @@ class SwStartNode;
|
|||
#include <boost/noncopyable.hpp>
|
||||
#endif
|
||||
|
||||
class SwFmt;
|
||||
class Color;
|
||||
class SwFrmFmt;
|
||||
class SwTableFmt;
|
||||
|
@ -86,7 +85,7 @@ typedef SwTableLine* SwTableLinePtr;
|
|||
|
||||
class SW_DLLPUBLIC SwTable: public SwClient //Client vom FrmFmt
|
||||
{
|
||||
using SwClient::IsModifyLocked;
|
||||
|
||||
|
||||
protected:
|
||||
SwTableLines aLines;
|
||||
|
@ -116,6 +115,8 @@ protected:
|
|||
|
||||
BOOL IsModifyLocked(){ return bModifyLocked;}
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
|
||||
|
||||
public:
|
||||
enum SearchType
|
||||
{
|
||||
|
@ -175,10 +176,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,
|
||||
BOOL bHidden = FALSE, BOOL bCurRowOnly = FALSE ) const;
|
||||
|
@ -322,6 +322,7 @@ public:
|
|||
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
|
||||
BOOL SetRowHeight( SwTableBox& rAktBox, USHORT eType,
|
||||
SwTwips nAbsDiff, SwTwips nRelDiff, SwUndo** ppUndo );
|
||||
void RegisterToFormat( SwFmt& rFmt );
|
||||
#ifdef DBG_UTIL
|
||||
void CheckConsistency() const;
|
||||
#endif
|
||||
|
@ -348,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();
|
||||
|
@ -364,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
|
||||
|
@ -402,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();
|
||||
|
@ -468,6 +470,8 @@ public:
|
|||
const SwTableBox& FindEndOfRowSpan( const SwTable& rTable,
|
||||
USHORT nMaxStep = USHRT_MAX ) const
|
||||
{ return const_cast<SwTableBox*>(this)->FindEndOfRowSpan( rTable, nMaxStep ); }
|
||||
void RegisterToFormat( SwFmt& rFmt ) ;
|
||||
void ForgetFrmFmt();
|
||||
};
|
||||
|
||||
class SwCellFrm;
|
||||
|
|
|
@ -86,12 +86,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)
|
||||
};
|
||||
|
||||
|
|
|
@ -91,6 +91,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
|
||||
|
||||
|
@ -105,9 +109,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;
|
||||
|
@ -151,7 +152,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 );
|
||||
};
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
@ -592,6 +595,7 @@ public:
|
|||
// #i21237#
|
||||
void AdjustTabStops(SwDoc & rDoc, BOOL bDefaultRightTabStop);
|
||||
SwTOXBase& operator=(const SwTOXBase& rSource);
|
||||
void RegisterToTOXType( SwTOXType& rMark );
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -45,9 +45,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 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; }
|
||||
|
@ -88,15 +88,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 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;
|
||||
|
|
|
@ -45,14 +45,18 @@ class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
|
|||
// 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 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;
|
||||
|
|
|
@ -680,12 +680,12 @@ class SwUndoFmtAttrHelper : public SwClient
|
|||
{
|
||||
::std::auto_ptr<SwUndoFmtAttr> m_pUndo;
|
||||
const bool m_bSaveDrawPt;
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
|
||||
|
||||
public:
|
||||
SwUndoFmtAttrHelper( SwFmt& rFmt, bool bSaveDrawPt = true );
|
||||
|
||||
virtual void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
|
||||
SwUndoFmtAttr* GetUndo() const { return m_pUndo.get(); }
|
||||
// release the undo object (so it is not deleted here), and return it
|
||||
SwUndoFmtAttr* ReleaseUndo() { return m_pUndo.release(); }
|
||||
|
@ -1243,9 +1243,11 @@ class SwUndoSetFlyFmt : public SwUndo, public SwClient
|
|||
BOOL bAnchorChgd;
|
||||
|
||||
void PutAttr( USHORT nWhich, const SfxPoolItem* pItem );
|
||||
void Modify( SfxPoolItem*, SfxPoolItem* );
|
||||
void GetAnchor( SwFmtAnchor& rAnhor, ULONG nNode, xub_StrLen nCntnt );
|
||||
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
|
||||
|
||||
public:
|
||||
SwUndoSetFlyFmt( SwFrmFmt& rFlyFmt, SwFrmFmt& rNewFrmFmt );
|
||||
virtual ~SwUndoSetFlyFmt();
|
||||
|
@ -1254,6 +1256,7 @@ public:
|
|||
virtual void Redo( SwUndoIter& );
|
||||
|
||||
virtual SwRewriter GetRewriter() const;
|
||||
void DeRegisterFromFormat( SwFmt& );
|
||||
};
|
||||
|
||||
//--------------------------------------------------------------------
|
||||
|
|
|
@ -98,7 +98,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>
|
||||
|
|
|
@ -220,8 +220,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);
|
||||
};
|
||||
|
|
|
@ -171,6 +171,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();
|
||||
|
@ -197,10 +201,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 );
|
||||
|
@ -292,6 +292,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,
|
||||
|
@ -348,11 +352,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 );
|
||||
|
||||
|
|
|
@ -257,6 +257,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);
|
||||
|
||||
|
@ -310,9 +313,6 @@ public:
|
|||
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;}
|
||||
|
||||
|
|
|
@ -77,6 +77,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);
|
||||
|
@ -109,9 +112,6 @@ public:
|
|||
virtual 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);
|
||||
|
||||
|
@ -122,9 +122,6 @@ public:
|
|||
sal_uInt16 GetResId() const {return nResTypeId;}
|
||||
};
|
||||
|
||||
/* -----------------04.12.98 12:49-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
struct SwFieldProperties_Impl;
|
||||
class SwXTextField : public cppu::WeakImplHelper5
|
||||
<
|
||||
|
@ -153,6 +150,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);
|
||||
|
@ -198,24 +198,18 @@ 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 an SwXTextField, either an already existing one or a new one
|
||||
static SwXTextField* CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
|
||||
};
|
||||
|
||||
/// @return a SwXTextField, either an already existing one or a new one
|
||||
SwXTextField * CreateSwXTextField(SwDoc & rDoc, SwFmtFld const& rFmt);
|
||||
|
||||
|
||||
/* -----------------21.12.98 10:26-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
typedef
|
||||
cppu::WeakImplHelper2
|
||||
<
|
||||
|
@ -292,9 +286,6 @@ public:
|
|||
virtual void Invalidate();
|
||||
};
|
||||
|
||||
/* -----------------21.12.98 14:49-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
class SwXFieldEnumeration : public cppu::WeakImplHelper2
|
||||
<
|
||||
::com::sun::star::container::XEnumeration,
|
||||
|
@ -309,6 +300,8 @@ class SwXFieldEnumeration : public cppu::WeakImplHelper2
|
|||
|
||||
protected:
|
||||
virtual ~SwXFieldEnumeration();
|
||||
//SwClient
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
public:
|
||||
SwXFieldEnumeration(SwDoc* pDoc);
|
||||
|
||||
|
@ -321,8 +314,6 @@ public:
|
|||
virtual 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
|
||||
|
||||
|
|
|
@ -122,8 +122,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
|
||||
|
|
|
@ -55,10 +55,6 @@ class SwDoc;
|
|||
class SwFmt;
|
||||
class SwFlyFrmFmt;
|
||||
|
||||
|
||||
/*-----------------12.02.98 11:21-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
class BaseFrameProperties_Impl;
|
||||
class SwXFrame : public cppu::WeakImplHelper6
|
||||
<
|
||||
|
@ -87,6 +83,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:
|
||||
|
@ -145,9 +142,6 @@ public:
|
|||
virtual 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);
|
||||
|
||||
|
@ -163,9 +157,7 @@ public:
|
|||
void SetSelection(SwPaM& rCopySource);
|
||||
static SdrObject *GetOrCreateSdrObject( SwFlyFrmFmt *pFmt );
|
||||
};
|
||||
/*-----------------20.02.98 11:28-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
typedef cppu::WeakImplHelper3
|
||||
<
|
||||
::com::sun::star::text::XTextFrame,
|
||||
|
@ -244,9 +236,7 @@ public:
|
|||
void * SAL_CALL operator new( size_t ) throw();
|
||||
void SAL_CALL operator delete( void * ) throw();
|
||||
};
|
||||
/*-----------------20.02.98 11:28-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
typedef cppu::WeakImplHelper2
|
||||
<
|
||||
::com::sun::star::text::XTextContent,
|
||||
|
@ -370,7 +360,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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -133,9 +133,9 @@ private:
|
|||
|
||||
SwFmtFld * GetFldFmt(bool bInit = false);
|
||||
|
||||
protected:
|
||||
void init(const SwUnoCrsr* pPortionCursor);
|
||||
|
||||
//SfxItemPropertySet& GetPropSet() { return aPropSet; }
|
||||
protected:
|
||||
|
||||
void SAL_CALL SetPropertyValues_Impl(
|
||||
const ::com::sun::star::uno::Sequence< ::rtl::OUString >& aPropertyNames,
|
||||
|
@ -145,9 +145,6 @@ protected:
|
|||
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);
|
||||
|
||||
// ::com::sun::star::uno::Any GetPropertyValue( const SfxItemPropertyMap *pEntry,
|
||||
// SwUnoCrsr *pUnoCrsr,
|
||||
// SfxItemSet *pSet );
|
||||
void GetPropertyValues( const ::rtl::OUString *pPropertyNames,
|
||||
::com::sun::star::uno::Any *pValues,
|
||||
sal_Int32 nLength );
|
||||
|
@ -161,6 +158,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 );
|
||||
|
@ -229,9 +229,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; }
|
||||
|
@ -317,9 +314,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
|
||||
|
|
|
@ -148,9 +148,9 @@ 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
|
||||
|
|
|
@ -95,9 +95,9 @@ public:
|
|||
virtual rtl::OUString SAL_CALL getImplementationName(void) throw( ::com::sun::star::uno::RuntimeException );
|
||||
virtual 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);
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -176,6 +176,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
|
||||
|
@ -223,9 +227,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;}
|
||||
|
|
|
@ -211,6 +211,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, BOOL bConditional = FALSE);
|
||||
SwXStyle(SfxStyleSheetBasePool& rPool, SfxStyleFamily eFam,
|
||||
|
@ -286,7 +287,6 @@ public:
|
|||
StartListening(*pBasePool);
|
||||
}
|
||||
SwDoc* GetDoc() const { return m_pDoc; }
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
};
|
||||
/* -----------------------------15.12.00 14:25--------------------------------
|
||||
|
||||
|
@ -377,10 +377,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);
|
||||
|
@ -400,13 +402,14 @@ 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);
|
||||
};
|
||||
|
||||
/*-- 19.05.2006 11:20:02---------------------------------------------------
|
||||
an automatic style
|
||||
-----------------------------------------------------------------------*/
|
||||
|
@ -428,7 +431,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);
|
||||
|
@ -461,6 +463,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
|
||||
|
||||
|
|
|
@ -115,6 +115,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
|
||||
|
@ -162,9 +165,6 @@ public:
|
|||
virtual 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 );
|
||||
|
||||
|
@ -194,6 +194,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);
|
||||
|
||||
|
@ -214,9 +217,6 @@ public:
|
|||
virtual 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);
|
||||
};
|
||||
|
@ -274,7 +274,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;
|
||||
|
@ -418,7 +418,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(); }
|
||||
|
||||
|
@ -505,7 +505,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);
|
||||
|
@ -567,7 +567,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);
|
||||
};
|
||||
|
||||
/* -----------------03.02.99 07:31-------------------
|
||||
|
@ -615,7 +615,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
|
||||
|
|
|
@ -65,14 +65,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;
|
||||
|
||||
|
|
|
@ -61,8 +61,6 @@ public:
|
|||
inline BOOL IsValid() const;
|
||||
inline void ChgValid( 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);
|
||||
|
@ -75,6 +73,8 @@ public:
|
|||
|
||||
virtual BOOL QueryValue( com::sun::star::uno::Any& rVal, USHORT nMId ) const;
|
||||
virtual BOOL PutValue( const com::sun::star::uno::Any& rVal, USHORT nMId );
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew );
|
||||
};
|
||||
|
||||
inline BOOL SwUserFieldType::IsValid() const
|
||||
|
|
|
@ -216,7 +216,7 @@ SwAccessibleFrameBase::~SwAccessibleFrameBase()
|
|||
{
|
||||
}
|
||||
|
||||
void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
||||
void SwAccessibleFrameBase::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
|
||||
{
|
||||
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
|
||||
const SwFlyFrm *pFlyFrm = static_cast< const SwFlyFrm * >( GetFrm() );
|
||||
|
@ -230,13 +230,13 @@ void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
|||
|
||||
OUString sOldName( GetName() );
|
||||
ASSERT( !pOld ||
|
||||
static_cast < SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
|
||||
static_cast < const SwStringMsgPoolItem * >( pOld )->GetString() == String( sOldName ),
|
||||
"invalid old name" );
|
||||
|
||||
const String& rNewName = pFrmFmt->GetName();
|
||||
SetName( rNewName );
|
||||
ASSERT( !pNew ||
|
||||
static_cast < SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
|
||||
static_cast < const SwStringMsgPoolItem * >( pNew )->GetString() == rNewName,
|
||||
"invalid new name" );
|
||||
|
||||
if( sOldName != GetName() )
|
||||
|
@ -250,18 +250,20 @@ void SwAccessibleFrameBase::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
|||
}
|
||||
break;
|
||||
case RES_OBJECTDYING:
|
||||
// mba: it seems that this class intentionally does not call code in base class SwClient
|
||||
if( GetRegisteredIn() ==
|
||||
static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
|
||||
pRegisteredIn->Remove( this );
|
||||
static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
break;
|
||||
|
||||
case RES_FMT_CHG:
|
||||
if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
|
||||
static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
|
||||
pRegisteredIn->Remove( this );
|
||||
if( static_cast< const SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
|
||||
static_cast< const SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
break;
|
||||
|
||||
default:
|
||||
SwClient::Modify( pOld, pNew );
|
||||
// mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -271,7 +273,7 @@ void SwAccessibleFrameBase::Dispose( sal_Bool bRecursive )
|
|||
vos::OGuard aGuard(Application::GetSolarMutex());
|
||||
|
||||
if( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
|
||||
SwAccessibleContext::Dispose( bRecursive );
|
||||
}
|
||||
|
|
|
@ -51,6 +51,7 @@ protected:
|
|||
virtual void _InvalidateFocus();
|
||||
|
||||
virtual ~SwAccessibleFrameBase();
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
|
||||
public:
|
||||
|
||||
|
@ -60,8 +61,6 @@ public:
|
|||
|
||||
virtual sal_Bool HasCursor(); // required by map to remember that object
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
|
||||
static sal_uInt8 GetNodeType( const SwFlyFrm *pFlyFrm );
|
||||
|
||||
// The object is not visible an longer and should be destroyed
|
||||
|
|
|
@ -68,14 +68,12 @@
|
|||
#include <com/sun/star/accessibility/AccessibleEventId.hpp>
|
||||
#include <com/sun/star/accessibility/AccessibleStateType.hpp>
|
||||
#include <cppuhelper/implbase1.hxx>
|
||||
// OD 15.01.2003 #103492#
|
||||
#include <pagepreviewlayout.hxx>
|
||||
// --> OD 2005-12-13 #i27301#
|
||||
#include <pam.hxx>
|
||||
#include <ndtxt.hxx>
|
||||
// <--
|
||||
#include <dflyobj.hxx>
|
||||
#include <prevwpage.hxx>
|
||||
#include <switerator.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::accessibility;
|
||||
|
@ -2722,15 +2720,8 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
|
|||
if ( pTxtNode )
|
||||
{
|
||||
// loop on all text frames registered at the text node.
|
||||
SwClientIter aIter( *pTxtNode );
|
||||
for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
|
||||
pFrm;
|
||||
pFrm = (SwFrm*)aIter.Next() )
|
||||
{
|
||||
ASSERT( dynamic_cast<SwTxtFrm*>(pFrm),
|
||||
"<SwAccessibleMap::_BuildSelectedParas()> - unexpected frame type" );
|
||||
SwTxtFrm* pTxtFrm( dynamic_cast<SwTxtFrm*>(pFrm) );
|
||||
if ( pTxtFrm )
|
||||
SwIterator<SwTxtFrm,SwTxtNode> aIter( *pTxtNode );
|
||||
for( SwTxtFrm* pTxtFrm = aIter.First(); pTxtFrm; pTxtFrm = aIter.Next() )
|
||||
{
|
||||
uno::WeakReference < XAccessible > xWeakAcc;
|
||||
SwAccessibleContextMap_Impl::iterator aMapIter =
|
||||
|
@ -2758,7 +2749,6 @@ SwAccessibleSelectedParas_Impl* SwAccessibleMap::_BuildSelectedParas()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// prepare next turn: get next cursor in ring
|
||||
pCrsr = static_cast<SwPaM*>( pCrsr->GetNext() );
|
||||
|
|
|
@ -92,7 +92,7 @@ SwAccessibleNoTextFrame::~SwAccessibleNoTextFrame()
|
|||
{
|
||||
}
|
||||
|
||||
void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
||||
void SwAccessibleNoTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
|
||||
{
|
||||
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
|
||||
// --> OD 2009-07-14 #i73249#
|
||||
|
@ -112,9 +112,9 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
|||
case RES_TITLE_CHANGED:
|
||||
{
|
||||
const String& sOldTitle(
|
||||
dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
|
||||
dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
|
||||
const String& sNewTitle(
|
||||
dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
|
||||
dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
|
||||
if ( sOldTitle == sNewTitle )
|
||||
{
|
||||
break;
|
||||
|
@ -168,7 +168,7 @@ void SwAccessibleNoTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
|||
case RES_FMT_CHG:
|
||||
if( static_cast< SwFmtChg * >(pNew)->pChangedFmt == GetRegisteredIn() &&
|
||||
static_cast< SwFmtChg * >(pOld)->pChangedFmt->IsFmtInDTOR() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredIn()->Remove( this );
|
||||
break;
|
||||
*/
|
||||
}
|
||||
|
|
|
@ -47,14 +47,14 @@ protected:
|
|||
|
||||
const SwNoTxtNode *GetNoTxtNode() const;
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
|
||||
public:
|
||||
|
||||
SwAccessibleNoTextFrame( SwAccessibleMap* pInitMap,
|
||||
sal_Int16 nInitRole,
|
||||
const SwFlyFrm *pFlyFrm );
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
|
||||
//===== XAccessibleContext ==============================================
|
||||
|
||||
// --> OD 2009-07-14 #i73249#
|
||||
|
|
|
@ -2669,10 +2669,10 @@ sal_Int32 SAL_CALL SwAccessibleParagraph::getNumberOfLineWithCaret()
|
|||
}
|
||||
|
||||
// --> OD 2010-02-19 #i108125#
|
||||
void SwAccessibleParagraph::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwAccessibleParagraph::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
mpParaChangeTrackInfo->reset();
|
||||
|
||||
SwClient::Modify( pOld, pNew );
|
||||
CheckRegistration( pOld, pNew );
|
||||
}
|
||||
// <--
|
||||
|
|
|
@ -234,6 +234,8 @@ protected:
|
|||
::com::sun::star::lang::IllegalArgumentException,
|
||||
::com::sun::star::uno::RuntimeException);
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew);
|
||||
|
||||
public:
|
||||
|
||||
SwAccessibleParagraph( SwAccessibleMap& rInitMap,
|
||||
|
@ -243,10 +245,6 @@ public:
|
|||
|
||||
virtual sal_Bool HasCursor(); // required by map to remember that object
|
||||
|
||||
// --> OD 2010-02-19 #i108125#
|
||||
virtual void Modify( SfxPoolItem* pOld, SfxPoolItem* pNew);
|
||||
// <--
|
||||
|
||||
//===== XAccessibleContext ==============================================
|
||||
|
||||
/// Return this object's description.
|
||||
|
|
|
@ -740,7 +740,7 @@ SwAccessibleTable::~SwAccessibleTable()
|
|||
delete mpTableData;
|
||||
}
|
||||
|
||||
void SwAccessibleTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
||||
void SwAccessibleTable::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
|
||||
{
|
||||
sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
|
||||
const SwTabFrm *pTabFrm = static_cast< const SwTabFrm * >( GetFrm() );
|
||||
|
@ -787,13 +787,14 @@ void SwAccessibleTable::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
|||
break;
|
||||
|
||||
case RES_OBJECTDYING:
|
||||
// mba: it seems that this class intentionally does not call code in base class SwClient
|
||||
if( GetRegisteredIn() ==
|
||||
static_cast< SwModify *>( static_cast< SwPtrMsgPoolItem * >( pOld )->pObject ) )
|
||||
pRegisteredIn->Remove( this );
|
||||
static_cast< SwModify *>( static_cast< const SwPtrMsgPoolItem * >( pOld )->pObject ) )
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
break;
|
||||
|
||||
default:
|
||||
SwClient::Modify( pOld, pNew );
|
||||
// mba: former call to base class method removed as it is meant to handle only RES_OBJECTDYING
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1360,7 +1361,7 @@ void SwAccessibleTable::Dispose( sal_Bool bRecursive )
|
|||
vos::OGuard aGuard(Application::GetSolarMutex());
|
||||
|
||||
if( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
|
||||
SwAccessibleContext::Dispose( bRecursive );
|
||||
}
|
||||
|
@ -1717,7 +1718,7 @@ SwAccessibleTableData_Impl* SwAccessibleTableColHeaders::CreateNewTableData()
|
|||
}
|
||||
|
||||
|
||||
void SwAccessibleTableColHeaders::Modify( SfxPoolItem * /*pOld*/, SfxPoolItem * /*pNew*/ )
|
||||
void SwAccessibleTableColHeaders::Modify( const SfxPoolItem * /*pOld*/, const SfxPoolItem * /*pNew*/ )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -89,12 +89,12 @@ protected:
|
|||
// Is table data evailable?
|
||||
sal_Bool HasTableData() const { return (mpTableData != 0); }
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
|
||||
public:
|
||||
|
||||
SwAccessibleTable( SwAccessibleMap* pInitMap, const SwTabFrm* pTableFrm );
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
|
||||
//===== XInterface ======================================================
|
||||
|
||||
// (XInterface methods need to be implemented to disambigouate
|
||||
|
@ -277,13 +277,12 @@ protected:
|
|||
{}
|
||||
|
||||
virtual SwAccessibleTableData_Impl* CreateNewTableData();
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
|
||||
public:
|
||||
|
||||
SwAccessibleTableColHeaders( SwAccessibleMap *pMap, const SwTabFrm *pTabFrm );
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
|
||||
//===== XInterface ======================================================
|
||||
|
||||
virtual ::com::sun::star::uno::Any SAL_CALL queryInterface(
|
||||
|
|
|
@ -84,7 +84,7 @@ SwAccessibleTextFrame::~SwAccessibleTextFrame()
|
|||
{
|
||||
}
|
||||
|
||||
void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
||||
void SwAccessibleTextFrame::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew)
|
||||
{
|
||||
const sal_uInt16 nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
|
||||
// --> OD 2009-07-14 #i73249#
|
||||
|
@ -103,9 +103,9 @@ void SwAccessibleTextFrame::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew)
|
|||
case RES_TITLE_CHANGED:
|
||||
{
|
||||
const String& sOldTitle(
|
||||
dynamic_cast<SwStringMsgPoolItem*>(pOld)->GetString() );
|
||||
dynamic_cast<const SwStringMsgPoolItem*>(pOld)->GetString() );
|
||||
const String& sNewTitle(
|
||||
dynamic_cast<SwStringMsgPoolItem*>(pNew)->GetString() );
|
||||
dynamic_cast<const SwStringMsgPoolItem*>(pNew)->GetString() );
|
||||
if ( sOldTitle == sNewTitle )
|
||||
{
|
||||
break;
|
||||
|
|
|
@ -46,13 +46,12 @@ protected:
|
|||
|
||||
virtual ~SwAccessibleTextFrame();
|
||||
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
|
||||
public:
|
||||
|
||||
SwAccessibleTextFrame( SwAccessibleMap* pInitMap, const SwFlyFrm* pFlyFrm );
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
|
||||
|
||||
//===== XAccessibleContext ==============================================
|
||||
|
||||
// --> OD 2009-07-14 #i73249#
|
||||
|
|
|
@ -28,127 +28,107 @@
|
|||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_sw.hxx"
|
||||
|
||||
|
||||
#include <hintids.hxx> // fuer RES_..
|
||||
#include <hintids.hxx> // contains RES_.. IDs
|
||||
#include <frame.hxx>
|
||||
#include <hints.hxx>
|
||||
#include <swcache.hxx>
|
||||
#include <swfntcch.hxx>
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
#include <unotextmarkup.hxx>
|
||||
#endif
|
||||
#include <swcache.hxx> // mba: get rid of that dependency
|
||||
#include <swfntcch.hxx> // mba: get rid of that dependency
|
||||
|
||||
static SwClientIter* pClientIters = 0;
|
||||
|
||||
TYPEINIT0(SwClient); //rtti
|
||||
|
||||
/*************************************************************************
|
||||
|* SwClient::SwClient(SwModify *)
|
||||
|*
|
||||
|* Beschreibung callback.doc V1.14
|
||||
|* Ersterstellung VB 20.03.91
|
||||
|* Letzte Aenderung MA 20. Mar. 95
|
||||
*************************************************************************/
|
||||
|
||||
TYPEINIT0(SwClient);
|
||||
|
||||
/*************************************************************************/
|
||||
SwClient::SwClient(SwModify *pToRegisterIn)
|
||||
: pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 )
|
||||
: pLeft( 0 ), pRight( 0 ), pRegisteredIn( 0 ), mbIsAllowedToBeRemovedInModifyCall(false)
|
||||
{
|
||||
bModifyLocked =
|
||||
bInModify =
|
||||
bInDocDTOR =
|
||||
bInCache = FALSE;
|
||||
bInSwFntCache = FALSE;
|
||||
|
||||
if(pToRegisterIn)
|
||||
// connect to SwModify
|
||||
pToRegisterIn->Add(this);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwClient::Modify()
|
||||
|*
|
||||
|* Beschreibung callback.doc V1.14
|
||||
|* Ersterstellung VB 20.03.91
|
||||
|* Letzte Aenderung VB 20.03.91
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
void SwClient::Modify( SfxPoolItem *pOld, SfxPoolItem * )
|
||||
/*************************************************************************/
|
||||
void SwClient::CheckRegistration( const SfxPoolItem* pOld, const SfxPoolItem * )
|
||||
{
|
||||
// this method only handles notification about dying SwModify objects
|
||||
if( (!pOld || pOld->Which() != RES_OBJECTDYING) )
|
||||
return;
|
||||
|
||||
SwPtrMsgPoolItem *pDead = (SwPtrMsgPoolItem *)pOld;
|
||||
if(pDead->pObject == pRegisteredIn)
|
||||
const SwPtrMsgPoolItem *pDead = static_cast<const SwPtrMsgPoolItem*>(pOld);
|
||||
if(pDead && pDead->pObject == pRegisteredIn)
|
||||
{
|
||||
SwModify *pAbove = (SwModify*)pRegisteredIn->GetRegisteredIn();
|
||||
// I've got a notification from the object I know
|
||||
SwModify *pAbove = const_cast<SwModify*>(pRegisteredIn->GetRegisteredIn());
|
||||
if(pAbove)
|
||||
{
|
||||
// if the dying object itself was listening at an SwModify, I take over
|
||||
// adding myself to pAbove will automatically remove me from my current pRegisteredIn
|
||||
pAbove->Add(this);
|
||||
return;
|
||||
}
|
||||
|
||||
// destroy connection
|
||||
pRegisteredIn->Remove(this);
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwClient::~SwClient()
|
||||
|*
|
||||
|* Beschreibung callback.doc V1.14
|
||||
|* Ersterstellung VB 20.03.91
|
||||
|* Letzte Aenderung MA 25. Jan. 94
|
||||
*************************************************************************/
|
||||
void SwClient::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
|
||||
{
|
||||
CheckRegistration( pOldValue, pNewValue );
|
||||
}
|
||||
|
||||
void SwClient::ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
|
||||
{
|
||||
Modify( pOldValue, pNewValue );
|
||||
}
|
||||
|
||||
void SwClient::SwClientNotify( SwModify*, USHORT )
|
||||
{
|
||||
}
|
||||
|
||||
//*************************************************************************
|
||||
SwClient::~SwClient()
|
||||
{
|
||||
DBG_ASSERT( !pRegisteredIn || pRegisteredIn->GetDepends(),"SwModify still known, but Client already disconnected!" );
|
||||
if( pRegisteredIn && pRegisteredIn->GetDepends() )
|
||||
// still connected
|
||||
pRegisteredIn->Remove( this );
|
||||
|
||||
ASSERT( !IsModifyLocked(), "Modify destroyed but locked." );
|
||||
}
|
||||
|
||||
|
||||
// erfrage vom Client Informationen
|
||||
/*************************************************************************/
|
||||
BOOL SwClient::GetInfo( SfxPoolItem& ) const
|
||||
{
|
||||
return TRUE; // und weiter
|
||||
return TRUE; // no information here, return TRUE to enable continuation
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwModify::SwModify( SwModify * )
|
||||
|*
|
||||
|* Beschreibung Dokument 1.7
|
||||
|* Ersterstellung JP 20.11.90
|
||||
|* Letzte Aenderung VB 20.03.91
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
SwModify::SwModify()
|
||||
: SwClient(0), pRoot(0)
|
||||
{
|
||||
bModifyLocked = FALSE;
|
||||
bLockClientList = FALSE;
|
||||
bInDocDTOR = FALSE;
|
||||
bInCache = FALSE;
|
||||
bInSwFntCache = FALSE;
|
||||
}
|
||||
|
||||
SwModify::SwModify( SwModify *pToRegisterIn )
|
||||
: SwClient(pToRegisterIn), pRoot( 0 )
|
||||
{
|
||||
bModifyLocked = FALSE;
|
||||
bLockClientList = FALSE;
|
||||
bInDocDTOR = FALSE;
|
||||
bInCache = FALSE;
|
||||
bInSwFntCache = FALSE;
|
||||
}
|
||||
|
||||
// @@@ forbidden and not implemented, but needs to be accessible (protected).
|
||||
SwModify::SwModify( const SwModify & )
|
||||
: SwClient( 0 )
|
||||
{
|
||||
OSL_PRECOND(0, "SwModify(const SwModify&): not implemented.");
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwModify::~SwModify()
|
||||
|*
|
||||
|* Beschreibung Dokument 1.7
|
||||
|* Ersterstellung JP 20.11.90
|
||||
|* Letzte Aenderung JP 15.04.94
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
SwModify::~SwModify()
|
||||
{
|
||||
ASSERT( !IsModifyLocked(), "Modify destroyed but locked." );
|
||||
|
||||
if ( IsInCache() )
|
||||
SwFrm::GetCache().Delete( this );
|
||||
|
||||
|
@ -157,44 +137,40 @@ SwModify::~SwModify()
|
|||
|
||||
if( pRoot )
|
||||
{
|
||||
// there are depending objects
|
||||
if( IsInDocDTOR() )
|
||||
{
|
||||
// alle Clients "logisch" austragen
|
||||
// if document gets destroyed anyway, just tell clients to forget me
|
||||
// so that they don't try to get removed from my list later when they also get destroyed
|
||||
SwClientIter aIter( *this );
|
||||
SwClient* p;
|
||||
while( 0 != ( p = aIter++ ) )
|
||||
SwClient* p = aIter.GoStart();
|
||||
while ( p )
|
||||
{
|
||||
p->pRegisteredIn = 0;
|
||||
|
||||
p = aIter.GoRoot(); // wieder ab Root (==Start) anfangen
|
||||
do {
|
||||
p->pRegisteredIn = 0;
|
||||
} while( 0 != ( p = aIter-- ) );
|
||||
p = aIter++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
// verschicke die Nachricht an die abgeleiteten Objekte.
|
||||
// notify all clients that they shall remove themselves
|
||||
SwPtrMsgPoolItem aDyObject( RES_OBJECTDYING, this );
|
||||
Modify( &aDyObject, &aDyObject );
|
||||
NotifyClients( &aDyObject, &aDyObject );
|
||||
|
||||
// Zwangsummeldung aller derjenigen, die sich nicht ausgetragen
|
||||
// haben, durch Aufruf von SwClient::Modify()
|
||||
// remove all clients that have not done themselves
|
||||
// mba: possibly a hotfix for forgotten base class calls?!
|
||||
while( pRoot )
|
||||
pRoot->SwClient::Modify(&aDyObject, &aDyObject);
|
||||
pRoot->CheckRegistration(&aDyObject, &aDyObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwModify::Modify( SwHint * pOldValue, SwHint * pNewValue )
|
||||
|*
|
||||
|* Beschreibung Dokument 1.7
|
||||
|* Ersterstellung JP 20.11.90
|
||||
|* Letzte Aenderung MA 20. Mar. 95
|
||||
*************************************************************************/
|
||||
/*************************************************************************/
|
||||
void SwModify::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
|
||||
{
|
||||
NotifyClients( pOldValue, pNewValue );
|
||||
}
|
||||
|
||||
|
||||
|
||||
void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
||||
void SwModify::NotifyClients( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
|
||||
{
|
||||
if (IsInCache() || IsInSwFntCache())
|
||||
{
|
||||
|
@ -208,50 +184,38 @@ void SwModify::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
|||
|
||||
LockModify();
|
||||
|
||||
#ifndef DBG_UTIL
|
||||
bInModify = TRUE;
|
||||
#else
|
||||
// mba: WTF?!
|
||||
if( !pOldValue )
|
||||
bInModify = TRUE;
|
||||
bLockClientList = TRUE;
|
||||
else
|
||||
// following Modifies don't calls an ASSRT
|
||||
{
|
||||
// following Modifies shouldn't call an ASSERT
|
||||
switch( pOldValue->Which() )
|
||||
{
|
||||
case RES_OBJECTDYING:
|
||||
case RES_REMOVE_UNO_OBJECT:
|
||||
bInModify = ((SwPtrMsgPoolItem *)pOldValue)->pObject != this;
|
||||
bLockClientList = ((SwPtrMsgPoolItem *)pOldValue)->pObject != this;
|
||||
break;
|
||||
|
||||
case RES_FOOTNOTE_DELETED:
|
||||
case RES_REFMARK_DELETED:
|
||||
case RES_TOXMARK_DELETED:
|
||||
case RES_FIELD_DELETED:
|
||||
bInModify = FALSE;
|
||||
bLockClientList = FALSE;
|
||||
break;
|
||||
default:
|
||||
bInModify = TRUE;
|
||||
bLockClientList = TRUE;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
SwClientIter aIter( *this );
|
||||
SwClient * pLast = aIter.GoStart();
|
||||
if( pLast ) // konnte zum Anfang gesprungen werden ??
|
||||
do
|
||||
{
|
||||
pLast->Modify( pOldValue, pNewValue );
|
||||
if( !pRoot ) // Baum schon Weg ??
|
||||
break;
|
||||
} while( 0 != ( pLast = aIter++ ));
|
||||
|
||||
bInModify = FALSE;
|
||||
ModifyBroadcast( pOldValue, pNewValue );
|
||||
bLockClientList = FALSE;
|
||||
UnlockModify();
|
||||
}
|
||||
|
||||
// erfrage vom Modify Informationen
|
||||
|
||||
BOOL SwModify::GetInfo( SfxPoolItem& rInfo ) const
|
||||
{
|
||||
BOOL bRet = TRUE; // bedeutet weiter zum naechsten
|
||||
BOOL bRet = TRUE; // means: continue with next one
|
||||
|
||||
if( pRoot )
|
||||
{
|
||||
|
@ -264,48 +228,38 @@ BOOL SwModify::GetInfo( SfxPoolItem& rInfo ) const
|
|||
;
|
||||
}
|
||||
|
||||
return bRet; // und weiter
|
||||
return bRet;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwModify::Add( SwClient *pDepend )
|
||||
|*
|
||||
|* Beschreibung Dokument 1.7
|
||||
|* Ersterstellung JP 20.11.90
|
||||
|* Letzte Aenderung JP 14.09.94
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
void SwModify::Add(SwClient *pDepend)
|
||||
{
|
||||
ASSERT( !bInModify, "Client innerhalb des eigenen Modifies einfuegen?" );
|
||||
ASSERT( !bLockClientList, "Client inserted while in Modify" );
|
||||
|
||||
// nur wenn das hier noch nicht eingetragen ist einfuegen
|
||||
if(pDepend->pRegisteredIn != this )
|
||||
{
|
||||
#ifdef DBG_UTIL
|
||||
SwClientIter* pTmp = pClientIters;
|
||||
while( pTmp )
|
||||
{
|
||||
ASSERT( &pTmp->rRoot != pRoot,
|
||||
"Client beim angemeldeten ClientIter einfuegen?" );
|
||||
ASSERT( &pTmp->GetModify() != pRoot, "Client added to active ClientIter" );
|
||||
pTmp = pTmp->pNxtIter;
|
||||
}
|
||||
#endif
|
||||
// wenn schon wanders angemeldet, dann dort abmelden
|
||||
// deregister new client in case it is already registered elsewhere
|
||||
if( pDepend->pRegisteredIn != 0 )
|
||||
pDepend->pRegisteredIn->Remove( pDepend );
|
||||
|
||||
if( !pRoot )
|
||||
{
|
||||
// first client added
|
||||
pRoot = pDepend;
|
||||
pRoot->pLeft = 0;
|
||||
pRoot->pRight = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
// immer hinter die Root haengen
|
||||
// append client
|
||||
pDepend->pRight = pRoot->pRight;
|
||||
pRoot->pRight = pDepend;
|
||||
pDepend->pLeft = pRoot;
|
||||
|
@ -313,29 +267,24 @@ void SwModify::Add(SwClient *pDepend)
|
|||
pDepend->pRight->pLeft = pDepend;
|
||||
}
|
||||
|
||||
// connect client to me
|
||||
pDepend->pRegisteredIn = this;
|
||||
}
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|* SwModify::_Remove( SwClient *pDepend )
|
||||
|*
|
||||
|* Beschreibung Dokument 1.7
|
||||
|* Ersterstellung JP 20.11.90
|
||||
|* Letzte Aenderung JP 14.09.94
|
||||
*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
|
||||
SwClient *SwModify::_Remove(SwClient * pDepend)
|
||||
SwClient* SwModify::Remove(SwClient * pDepend)
|
||||
{
|
||||
// FME 2007-07-16 #i79641# SwXTextMarkup is allowed to be removed ...
|
||||
ASSERT( !bInModify || 0 != dynamic_cast<SwXTextMarkup*>(pDepend), "Client innerhalb des eigenen Modifies loeschen?" );
|
||||
if ( bInDocDTOR )
|
||||
return 0;
|
||||
|
||||
ASSERT( !bLockClientList || pDepend->mbIsAllowedToBeRemovedInModifyCall, "SwClient shall be removed in Modify call!" );
|
||||
|
||||
// loesche das Object aus der Liste und setze den
|
||||
// Registrierungs-Pointer zurueck
|
||||
if( pDepend->pRegisteredIn == this )
|
||||
{
|
||||
// SwClient is my listener
|
||||
// remove it from my list
|
||||
SwClient* pR = pDepend->pRight;
|
||||
SwClient* pL = pDepend->pLeft;
|
||||
if( pRoot == pDepend )
|
||||
|
@ -346,40 +295,45 @@ SwClient *SwModify::_Remove(SwClient * pDepend)
|
|||
if( pR )
|
||||
pR->pLeft = pL;
|
||||
|
||||
// alle Client-Iters updaten
|
||||
// update ClientIters
|
||||
SwClientIter* pTmp = pClientIters;
|
||||
while( pTmp )
|
||||
{
|
||||
if( pTmp->pAkt == pDepend || pTmp->pDelNext == pDepend )
|
||||
if( pTmp->pAct == pDepend || pTmp->pDelNext == pDepend )
|
||||
// if object being removed is the current or next object in an iterator, advance this iterator
|
||||
pTmp->pDelNext = pR;
|
||||
|
||||
// --> FME 2006-02-03 #127369# Notify SwClientIter if mpWatchClient is removed
|
||||
if ( pTmp->mpWatchClient == pDepend )
|
||||
pTmp->mpWatchClient = 0;
|
||||
// <--
|
||||
|
||||
pTmp = pTmp->pNxtIter;
|
||||
}
|
||||
|
||||
pDepend->pLeft = 0;
|
||||
pDepend->pRight = 0;
|
||||
}
|
||||
else {
|
||||
ASSERT( FALSE, "SwModify::Remove(): pDepend nicht gefunden");
|
||||
else
|
||||
{
|
||||
ASSERT( false, "SwModify::Remove(): pDepend nicht gefunden" );
|
||||
}
|
||||
|
||||
// disconnect client from me
|
||||
pDepend->pRegisteredIn = 0;
|
||||
return pDepend;
|
||||
}
|
||||
|
||||
#ifdef DBG_UTIL
|
||||
int SwModify::GetClientCount() const
|
||||
{
|
||||
int nRet=0;
|
||||
SwClientIter aIter( *this );
|
||||
SwClient *pLast = aIter.GoStart();
|
||||
if( pLast )
|
||||
do
|
||||
{
|
||||
++nRet;
|
||||
} while( 0 != ( pLast = aIter++ ));
|
||||
return nRet;
|
||||
}
|
||||
#endif
|
||||
|
||||
/*************************************************************************
|
||||
|* SwModify::CheckCaching( const USHORT nWhich )
|
||||
|*
|
||||
|* Ersterstellung JP 25.06.95
|
||||
|* Letzte Aenderung JP 25.06.95
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
void SwModify::CheckCaching( const USHORT nWhich )
|
||||
{
|
||||
|
@ -411,19 +365,33 @@ void SwModify::CheckCaching( const USHORT nWhich )
|
|||
}
|
||||
}
|
||||
|
||||
void SwModify::CallSwClientNotify( USHORT nWhich )
|
||||
{
|
||||
SwClientIter aIter(*this);
|
||||
SwClient * pClient = aIter.GoStart();
|
||||
while (pClient)
|
||||
{
|
||||
pClient->SwClientNotify( this, nWhich );
|
||||
pClient = aIter++;
|
||||
}
|
||||
}
|
||||
|
||||
void SwModify::ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue, TypeId nType )
|
||||
{
|
||||
SwClientIter aIter(*this);
|
||||
SwClient * pClient = aIter.First( nType );
|
||||
while (pClient)
|
||||
{
|
||||
pClient->Modify( pOldValue, pNewValue );
|
||||
pClient = aIter.Next();
|
||||
}
|
||||
}
|
||||
|
||||
// ----------
|
||||
// SwDepend
|
||||
// ----------
|
||||
|
||||
/*************************************************************************
|
||||
|* SwDepend::SwDepend(SwClient *pTellHim,SwModify *pDepend)
|
||||
|*
|
||||
|* Beschreibung callback.doc V1.14
|
||||
|* Ersterstellung VB 20.03.91
|
||||
|* Letzte Aenderung VB 20.03.91
|
||||
*************************************************************************/
|
||||
|
||||
/*************************************************************************/
|
||||
|
||||
SwDepend::SwDepend(SwClient *pTellHim, SwModify *pDepend)
|
||||
: SwClient(pDepend)
|
||||
|
@ -431,27 +399,17 @@ SwDepend::SwDepend(SwClient *pTellHim, SwModify *pDepend)
|
|||
pToTell = pTellHim;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* SwDepend::Modify(SwHint *, SwHint *)
|
||||
|*
|
||||
|* Beschreibung callback.doc V1.14
|
||||
|* Ersterstellung VB 20.03.91
|
||||
|* Letzte Aenderung VB 20.03.91
|
||||
|*
|
||||
*************************************************************************/
|
||||
/*************************************************************************/
|
||||
|
||||
|
||||
void SwDepend::Modify( SfxPoolItem *pOldValue, SfxPoolItem *pNewValue )
|
||||
void SwDepend::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValue )
|
||||
{
|
||||
if(pNewValue && pNewValue->Which() == RES_OBJECTDYING)
|
||||
SwClient::Modify(pOldValue,pNewValue);
|
||||
CheckRegistration(pOldValue,pNewValue);
|
||||
else if(pToTell)
|
||||
pToTell->Modify(pOldValue, pNewValue);
|
||||
pToTell->ModifyNotification(pOldValue, pNewValue);
|
||||
}
|
||||
|
||||
|
||||
// erfrage vom Modify Informationen
|
||||
BOOL SwDepend::GetInfo( SfxPoolItem& rInfo ) const
|
||||
{
|
||||
return pToTell ? pToTell->GetInfo( rInfo ) : TRUE;
|
||||
|
@ -459,14 +417,13 @@ BOOL SwDepend::GetInfo( SfxPoolItem& rInfo ) const
|
|||
|
||||
/********************************************************************/
|
||||
|
||||
|
||||
SwClientIter::SwClientIter( SwModify const& rModify )
|
||||
SwClientIter::SwClientIter( const SwModify& rModify )
|
||||
: rRoot( rModify )
|
||||
{
|
||||
// hinten einketten!
|
||||
pNxtIter = 0;
|
||||
if( pClientIters )
|
||||
{
|
||||
// append to list of ClientIters
|
||||
SwClientIter* pTmp = pClientIters;
|
||||
while( pTmp->pNxtIter )
|
||||
pTmp = pTmp->pNxtIter;
|
||||
|
@ -475,9 +432,8 @@ SwClientIter::SwClientIter( SwModify const& rModify )
|
|||
else
|
||||
pClientIters = this;
|
||||
|
||||
pAkt = rRoot.pRoot;
|
||||
pDelNext = pAkt;
|
||||
mpWatchClient = 0;
|
||||
pAct = const_cast<SwClient*>(rRoot.GetDepends());
|
||||
pDelNext = pAct;
|
||||
}
|
||||
|
||||
|
||||
|
@ -486,6 +442,7 @@ SwClientIter::~SwClientIter()
|
|||
{
|
||||
if( pClientIters )
|
||||
{
|
||||
// reorganize list of ClientIters
|
||||
if( pClientIters == this )
|
||||
pClientIters = pNxtIter;
|
||||
else
|
||||
|
@ -503,132 +460,109 @@ SwClientIter::~SwClientIter()
|
|||
}
|
||||
|
||||
|
||||
#ifndef CFRONT
|
||||
// Postfix Operator
|
||||
SwClient* SwClientIter::operator++(int)
|
||||
{
|
||||
// solange der CFRONT Prefix und PostFix nicht unterscheiden kann, immer
|
||||
// als Prefix-Operator arbeiten. Wenn der CFRONT es kann, muss auch der
|
||||
// Code entsprechen umgestellt werden !!!
|
||||
if( pDelNext == pAkt )
|
||||
if( pDelNext == pAct )
|
||||
{
|
||||
pAkt = pAkt->pRight;
|
||||
pDelNext = pAkt;
|
||||
pAct = pAct->pRight;
|
||||
pDelNext = pAct;
|
||||
}
|
||||
else
|
||||
pAkt = pDelNext;
|
||||
return pAkt;
|
||||
pAct = pDelNext;
|
||||
return pAct;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Prefix Operator
|
||||
SwClient* SwClientIter::operator++()
|
||||
SwClient* SwClientIter::GoStart()
|
||||
{
|
||||
if( pDelNext == pAkt )
|
||||
{
|
||||
pAkt = pAkt->pRight;
|
||||
pDelNext = pAkt;
|
||||
}
|
||||
else
|
||||
pAkt = pDelNext;
|
||||
return pAkt;
|
||||
pAct = const_cast<SwClient*>(rRoot.GetDepends());
|
||||
if( pAct )
|
||||
while( pAct->pLeft )
|
||||
pAct = pAct->pLeft;
|
||||
pDelNext = pAct;
|
||||
return pAct;
|
||||
}
|
||||
|
||||
|
||||
#ifndef CFRONT
|
||||
// Postfix Operator
|
||||
SwClient* SwClientIter::operator--(int)
|
||||
SwClient* SwClientIter::GoEnd()
|
||||
{
|
||||
// solange der CFRONT Prefix und PostFix nicht unterscheiden kann, immer
|
||||
// als Prefix-Operator arbeiten. Wenn der CFRONT es kann, muss auch der
|
||||
// Code entsprechen umgestellt werden !!!
|
||||
if( pDelNext == pAkt )
|
||||
pAkt = pAkt->pLeft;
|
||||
else
|
||||
pAkt = pDelNext->pLeft;
|
||||
pDelNext = pAkt;
|
||||
return pAkt;
|
||||
pAct = pDelNext;
|
||||
if( !pAct )
|
||||
pAct = const_cast<SwClient*>(rRoot.GetDepends());
|
||||
if( pAct )
|
||||
while( pAct->pRight )
|
||||
pAct = pAct->pRight;
|
||||
pDelNext = pAct;
|
||||
return pAct;
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
// Prefix Operator
|
||||
SwClient* SwClientIter::operator--()
|
||||
{
|
||||
if( pDelNext == pAkt )
|
||||
pAkt = pAkt->pLeft;
|
||||
else
|
||||
pAkt = pDelNext->pLeft;
|
||||
pDelNext = pAkt;
|
||||
return pAkt;
|
||||
}
|
||||
|
||||
|
||||
SwClient* SwClientIter::GoStart() // zum Anfang des Baums
|
||||
{
|
||||
pAkt = rRoot.pRoot;
|
||||
if( pAkt )
|
||||
while( pAkt->pLeft )
|
||||
pAkt = pAkt->pLeft;
|
||||
pDelNext = pAkt;
|
||||
return pAkt;
|
||||
}
|
||||
|
||||
|
||||
SwClient* SwClientIter::GoEnd() // zum End des Baums
|
||||
{
|
||||
pAkt = pDelNext;
|
||||
if( !pAkt )
|
||||
pAkt = rRoot.pRoot;
|
||||
if( pAkt )
|
||||
while( pAkt->pRight )
|
||||
pAkt = pAkt->pRight;
|
||||
pDelNext = pAkt;
|
||||
return pAkt;
|
||||
}
|
||||
|
||||
|
||||
|
||||
SwClient* SwClientIter::First( TypeId nType )
|
||||
{
|
||||
aSrchId = nType;
|
||||
GoStart();
|
||||
if( pAkt )
|
||||
if( pAct )
|
||||
do {
|
||||
if( pAkt->IsA( aSrchId ) )
|
||||
if( pAct->IsA( aSrchId ) )
|
||||
break;
|
||||
|
||||
if( pDelNext == pAkt )
|
||||
if( pDelNext == pAct )
|
||||
{
|
||||
pAkt = pAkt->pRight;
|
||||
pDelNext = pAkt;
|
||||
pAct = pAct->pRight;
|
||||
pDelNext = pAct;
|
||||
}
|
||||
else
|
||||
pAkt = pDelNext;
|
||||
pAct = pDelNext;
|
||||
|
||||
} while( pAkt );
|
||||
return pAkt;
|
||||
} while( pAct );
|
||||
return pAct;
|
||||
}
|
||||
|
||||
|
||||
SwClient* SwClientIter::Next()
|
||||
{
|
||||
do {
|
||||
// erstmal zum naechsten
|
||||
if( pDelNext == pAkt )
|
||||
if( pDelNext == pAct )
|
||||
{
|
||||
pAkt = pAkt->pRight;
|
||||
pDelNext = pAkt;
|
||||
pAct = pAct->pRight;
|
||||
pDelNext = pAct;
|
||||
}
|
||||
else
|
||||
pAkt = pDelNext;
|
||||
pAct = pDelNext;
|
||||
|
||||
if( pAkt && pAkt->IsA( aSrchId ) )
|
||||
if( pAct && pAct->IsA( aSrchId ) )
|
||||
break;
|
||||
} while( pAkt );
|
||||
return pAkt;
|
||||
} while( pAct );
|
||||
return pAct;
|
||||
}
|
||||
|
||||
SwClient* SwClientIter::Last( TypeId nType )
|
||||
{
|
||||
aSrchId = nType;
|
||||
GoEnd();
|
||||
if( pAct )
|
||||
do {
|
||||
if( pAct->IsA( aSrchId ) )
|
||||
break;
|
||||
|
||||
if( pDelNext == pAct )
|
||||
pAct = pAct->pLeft;
|
||||
else
|
||||
pAct = pDelNext->pLeft;
|
||||
pDelNext = pAct;
|
||||
|
||||
} while( pAct );
|
||||
return pAct;
|
||||
}
|
||||
|
||||
SwClient* SwClientIter::Previous()
|
||||
{
|
||||
do {
|
||||
if( pDelNext == pAct )
|
||||
pAct = pAct->pLeft;
|
||||
else
|
||||
pAct = pDelNext->pLeft;
|
||||
pDelNext = pAct;
|
||||
|
||||
if( pAct && pAct->IsA( aSrchId ) )
|
||||
break;
|
||||
} while( pAct );
|
||||
return pAct;
|
||||
}
|
||||
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
#include "precompiled_sw.hxx"
|
||||
|
||||
#include <float.h>
|
||||
|
||||
#include <rtl/math.hxx>
|
||||
|
||||
#include <hintids.hxx> // fuer RES_..
|
||||
#include <cellatr.hxx>
|
||||
#include <calc.hxx>
|
||||
|
@ -41,7 +39,7 @@
|
|||
#include <node.hxx>
|
||||
#include <hints.hxx>
|
||||
#include <rolbck.hxx>
|
||||
|
||||
#include <switerator.hxx>
|
||||
|
||||
|
||||
//TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
|
||||
|
@ -112,9 +110,9 @@ const SwNode* SwTblBoxFormula::GetNodeOfFormula() const
|
|||
const SwNode* pRet = 0;
|
||||
if( pDefinedIn )
|
||||
{
|
||||
SwClient* pBox = SwClientIter( *pDefinedIn ).First( TYPE( SwTableBox ));
|
||||
SwTableBox* pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
|
||||
if( pBox )
|
||||
pRet = ((SwTableBox*)pBox)->GetSttNd();
|
||||
pRet = pBox->GetSttNd();
|
||||
}
|
||||
return pRet;
|
||||
}
|
||||
|
@ -124,8 +122,7 @@ SwTableBox* SwTblBoxFormula::GetTableBox()
|
|||
{
|
||||
SwTableBox* pBox = 0;
|
||||
if( pDefinedIn )
|
||||
pBox = (SwTableBox*)SwClientIter( *pDefinedIn ).
|
||||
First( TYPE( SwTableBox ));
|
||||
pBox = SwIterator<SwTableBox,SwModify>::FirstElement( *pDefinedIn );
|
||||
return pBox;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,9 +36,7 @@
|
|||
#include <doc.hxx>
|
||||
#include <paratr.hxx> // fuer SwParaFmt - SwHyphenBug
|
||||
#include <swcache.hxx>
|
||||
// --> OD 2006-11-22 #i71574#
|
||||
#include <fmtcolfunc.hxx>
|
||||
// <--
|
||||
|
||||
TYPEINIT1( SwFmt, SwClient ); //rtti fuer SwFmt
|
||||
|
||||
|
@ -142,16 +140,16 @@ SwFmt &SwFmt::operator=(const SwFmt& rFmt)
|
|||
{
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
|
||||
if( pRegisteredIn != rFmt.pRegisteredIn )
|
||||
if( GetRegisteredIn() != rFmt.GetRegisteredIn() )
|
||||
{
|
||||
if( pRegisteredIn )
|
||||
pRegisteredIn->Remove(this);
|
||||
if(rFmt.pRegisteredIn)
|
||||
if( GetRegisteredIn() )
|
||||
GetRegisteredInNonConst()->Remove(this);
|
||||
if(rFmt.GetRegisteredIn())
|
||||
{
|
||||
rFmt.pRegisteredIn->Add(this);
|
||||
const_cast<SwFmt&>(rFmt).GetRegisteredInNonConst()->Add(this);
|
||||
aSet.SetParent( &rFmt.aSet );
|
||||
}
|
||||
else
|
||||
|
@ -170,7 +168,7 @@ void SwFmt::SetName( const String& rNewName, sal_Bool bBroadcast )
|
|||
SwStringMsgPoolItem aOld( RES_NAME_CHANGED, aFmtName );
|
||||
SwStringMsgPoolItem aNew( RES_NAME_CHANGED, rNewName );
|
||||
aFmtName = rNewName;
|
||||
Modify( &aOld, &aNew );
|
||||
ModifyNotification( &aOld, &aNew );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -229,7 +227,7 @@ void SwFmt::CopyAttrs( const SwFmt& rFmt, BOOL bReplace )
|
|||
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -269,7 +267,7 @@ SwFmt::~SwFmt()
|
|||
SwFmtChg aNewFmt(pParentFmt);
|
||||
SwClient * pDepend = (SwClient*)GetDepends();
|
||||
pParentFmt->Add(pDepend);
|
||||
pDepend->Modify(&aOldFmt, &aNewFmt);
|
||||
pDepend->ModifyNotification(&aOldFmt, &aNewFmt);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -277,7 +275,7 @@ SwFmt::~SwFmt()
|
|||
|
||||
|
||||
/*************************************************************************
|
||||
|* void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
||||
|* void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
|
||||
|*
|
||||
|* Beschreibung Dokument 1.14
|
||||
|* Ersterstellung JP 22.11.90
|
||||
|
@ -285,7 +283,7 @@ SwFmt::~SwFmt()
|
|||
*************************************************************************/
|
||||
|
||||
|
||||
void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
||||
void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
|
||||
{
|
||||
BOOL bWeiter = TRUE; // TRUE = Propagierung an die Abhaengigen
|
||||
|
||||
|
@ -302,9 +300,9 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
|||
SwFmt * pFmt = (SwFmt *) ((SwPtrMsgPoolItem *)pNewValue)->pObject;
|
||||
|
||||
// nicht umhaengen wenn dieses das oberste Format ist !!
|
||||
if( pRegisteredIn && pRegisteredIn == pFmt )
|
||||
if( GetRegisteredIn() && GetRegisteredIn() == pFmt )
|
||||
{
|
||||
if( pFmt->pRegisteredIn )
|
||||
if( pFmt->GetRegisteredIn() )
|
||||
{
|
||||
// wenn Parent, dann im neuen Parent wieder anmelden
|
||||
pFmt->DerivedFrom()->Add( this );
|
||||
|
@ -332,7 +330,7 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
|||
|
||||
if( aNew.Count() )
|
||||
// keine mehr gesetzt, dann Ende !!
|
||||
SwModify::Modify( &aOld, &aNew );
|
||||
NotifyClients( &aOld, &aNew );
|
||||
bWeiter = FALSE;
|
||||
}
|
||||
break;
|
||||
|
@ -353,12 +351,12 @@ void SwFmt::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
|||
{
|
||||
// IsWritten-Flag zuruecksetzen. Hint nur an abhanegige
|
||||
// Formate (und keine Frames) propagieren.
|
||||
// mba: the code does the opposite from what is written in the comment!
|
||||
ResetWritten();
|
||||
SwClientIter aIter( *this );
|
||||
for( SwClient *pClient = aIter.First( TYPE(SwFmt) ); pClient;
|
||||
pClient = aIter.Next() )
|
||||
pClient->Modify( pOldValue, pNewValue );
|
||||
|
||||
// mba: here we don't use the additional stuff from NotifyClients().
|
||||
// should we?!
|
||||
// mba: move the code that ignores this event to the clients
|
||||
ModifyBroadcast( pOldValue, pNewValue, TYPE(SwFmt) );
|
||||
bWeiter = FALSE;
|
||||
}
|
||||
break;
|
||||
|
@ -383,7 +381,7 @@ ASSERT( RES_PARATR_DROP == nWhich, "Modify ohne Absender verschickt" );
|
|||
if( bWeiter )
|
||||
{
|
||||
// laufe durch alle abhaengigen Formate
|
||||
SwModify::Modify( pOldValue, pNewValue );
|
||||
NotifyClients( pOldValue, pNewValue );
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -431,7 +429,7 @@ BOOL SwFmt::SetDerivedFrom(SwFmt *pDerFrom)
|
|||
|
||||
SwFmtChg aOldFmt(this);
|
||||
SwFmtChg aNewFmt(this);
|
||||
Modify( &aOldFmt, &aNewFmt );
|
||||
ModifyNotification( &aOldFmt, &aNewFmt );
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
@ -476,7 +474,7 @@ BOOL SwFmt::SetFmtAttr(const SfxPoolItem& rAttr )
|
|||
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
return bRet;
|
||||
|
@ -524,7 +522,7 @@ BOOL SwFmt::SetFmtAttr( const SfxItemSet& rSet )
|
|||
aSet.SetModifyAtAttr( this );
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
return bRet;
|
||||
|
@ -561,7 +559,7 @@ BOOL SwFmt::ResetFmtAttr( USHORT nWhich1, USHORT nWhich2 )
|
|||
{
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
@ -595,7 +593,7 @@ USHORT SwFmt::ResetAllFmtAttr()
|
|||
{
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
return aNew.Count();
|
||||
}
|
||||
|
@ -644,7 +642,7 @@ void SwFmt::DelDiffs( const SfxItemSet& rSet )
|
|||
{
|
||||
SwAttrSetChg aChgOld( aSet, aOld );
|
||||
SwAttrSetChg aChgNew( aSet, aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -164,9 +164,9 @@ namespace sw { namespace mark
|
|||
}
|
||||
|
||||
|
||||
void MarkBase::Modify(SfxPoolItem *pOld, SfxPoolItem *pNew)
|
||||
void MarkBase::Modify( const SfxPoolItem *pOld, const SfxPoolItem *pNew )
|
||||
{
|
||||
SwModify::Modify(pOld, pNew);
|
||||
NotifyClients(pOld, pNew);
|
||||
if (pOld && (RES_REMOVE_UNO_OBJECT == pOld->Which()))
|
||||
{ // invalidate cached uno object
|
||||
SetXBookmark(uno::Reference<text::XTextContent>(0));
|
||||
|
|
|
@ -2147,7 +2147,7 @@ SwCntntFrm *SwCrsrShell::GetCurrFrm( const BOOL bCalcFrm ) const
|
|||
// Link weitergeleitet.
|
||||
|
||||
|
||||
void SwCrsrShell::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwCrsrShell::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
const USHORT nWhich = pOld ?
|
||||
pOld->Which() :
|
||||
|
@ -2673,7 +2673,7 @@ SwCrsrShell::~SwCrsrShell()
|
|||
// der CursorShell haengt keine Chance geben, sich an den
|
||||
// TextNode zu haengen.
|
||||
if( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
}
|
||||
|
||||
SwShellCrsr* SwCrsrShell::getShellCrsr( bool bBlock )
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
#include <fmturl.hxx>
|
||||
#include "txtfrm.hxx"
|
||||
#include <wrong.hxx>
|
||||
|
||||
#include <switerator.hxx>
|
||||
#include <vcl/window.hxx>
|
||||
#include <docufld.hxx> // OD 2008-06-19 #i90516#
|
||||
|
||||
|
@ -411,14 +411,13 @@ BOOL SwCrsrShell::GotoTOXMarkBase()
|
|||
// dann nehme den 1. und hole den Verzeichnis-Typ.
|
||||
// Suche in seiner Abhaengigkeitsliste nach dem eigentlichem
|
||||
// Verzeichnis
|
||||
SwModify* pType = (SwModify*)aMarks[0]->GetRegisteredIn();
|
||||
SwClientIter aIter( *pType );
|
||||
const SwTOXType* pType = aMarks[0]->GetTOXType();
|
||||
SwIterator<SwTOXBase,SwTOXType> aIter( *pType );
|
||||
const SwSectionNode* pSectNd;
|
||||
const SwSectionFmt* pSectFmt;
|
||||
|
||||
for( SwTOXBase* pTOX =
|
||||
(SwTOXBase*)aIter.First( TYPE( SwTOXBase ));
|
||||
pTOX; pTOX = (SwTOXBase*)aIter.Next() )
|
||||
for( SwTOXBase* pTOX = aIter.First(); pTOX; pTOX = aIter.Next() )
|
||||
{
|
||||
if( pTOX->ISA( SwTOXBaseSection ) &&
|
||||
0 != ( pSectFmt = ((SwTOXBaseSection*)pTOX)->GetFmt() ) &&
|
||||
0 != ( pSectNd = pSectFmt->GetSectionNode() ))
|
||||
|
@ -445,6 +444,7 @@ BOOL SwCrsrShell::GotoTOXMarkBase()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -630,13 +630,13 @@ void lcl_MakeFldLst( _SetGetExpFlds& rLst, const SwFieldType& rFldType,
|
|||
// es muss immer der 1. Frame gesucht werden
|
||||
Point aPt;
|
||||
SwTxtFld* pTxtFld;
|
||||
SwClientIter aIter( (SwFieldType&)rFldType );
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter(rFldType);
|
||||
BOOL bSubType = nSubType != USHRT_MAX;
|
||||
for( SwClient* pLast = aIter.First( TYPE( SwFmtFld )); pLast; pLast = aIter.Next() )
|
||||
if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
|
||||
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
|
||||
if( 0 != ( pTxtFld = pFmtFld->GetTxtFld() ) &&
|
||||
( !bChkInpFlag || ((SwSetExpField*)pTxtFld->GetFld().GetFld())
|
||||
->GetInputFlag() ) &&
|
||||
(!bSubType || (((SwFmtFld*)pLast)->GetFld()->GetSubType()
|
||||
(!bSubType || (pFmtFld->GetFld()->GetSubType()
|
||||
& 0xff ) == nSubType ))
|
||||
{
|
||||
SwCntntFrm* pCFrm;
|
||||
|
@ -1612,20 +1612,16 @@ bool SwContentAtPos::IsInRTLText()const
|
|||
}
|
||||
if(pNd)
|
||||
{
|
||||
SwClientIter aClientIter( * const_cast<SwTxtNode*>(pNd) );
|
||||
SwClient* pLast = aClientIter.GoStart();
|
||||
while( pLast )
|
||||
SwIterator<SwTxtFrm,SwTxtNode> aIter(*pNd);
|
||||
SwTxtFrm* pTmpFrm = aIter.First();
|
||||
while( pTmpFrm )
|
||||
{
|
||||
if ( pLast->ISA( SwTxtFrm ) )
|
||||
{
|
||||
SwTxtFrm* pTmpFrm = static_cast<SwTxtFrm*>( pLast );
|
||||
if ( !pTmpFrm->IsFollow())
|
||||
{
|
||||
bRet = pTmpFrm->IsRightToLeft();
|
||||
break;
|
||||
}
|
||||
}
|
||||
pLast = ++aClientIter;
|
||||
pTmpFrm = aIter.Next();
|
||||
}
|
||||
}
|
||||
return bRet;
|
||||
|
@ -2110,14 +2106,13 @@ BOOL SwCrsrShell::SelectNxtPrvHyperlink( BOOL bNext )
|
|||
const SwCharFmts* pFmts = GetDoc()->GetCharFmts();
|
||||
for( USHORT n = pFmts->Count(); 1 < n; )
|
||||
{
|
||||
SwClientIter aIter( *(*pFmts)[ --n ] );
|
||||
SwIterator<SwTxtINetFmt,SwCharFmt> aIter(*(*pFmts)[--n]);
|
||||
|
||||
for( SwClient* pFnd = aIter.First(TYPE( SwTxtINetFmt ));
|
||||
pFnd; pFnd = aIter.Next() )
|
||||
if( 0 != ( pTxtNd = ((SwTxtINetFmt*)pFnd)->GetpTxtNode()) &&
|
||||
for( SwTxtINetFmt* pFnd = aIter.First(); pFnd; pFnd = aIter.Next() )
|
||||
if( 0 != ( pTxtNd = pFnd->GetpTxtNode()) &&
|
||||
pTxtNd->GetNodes().IsDocNodes() )
|
||||
{
|
||||
SwTxtINetFmt& rAttr = *(SwTxtINetFmt*)pFnd;
|
||||
SwTxtINetFmt& rAttr = *pFnd;
|
||||
SwPosition aTmpPos( *pTxtNd );
|
||||
_SetGetExpFld aPos( aTmpPos.nNode, rAttr );
|
||||
SwCntntFrm* pFrm;
|
||||
|
|
|
@ -1236,7 +1236,7 @@ void SwPaM::InvalidatePaM()
|
|||
SwInsTxt aHint( Start()->nContent.GetIndex(),
|
||||
End()->nContent.GetIndex() - Start()->nContent.GetIndex() + 1 );
|
||||
SwModify *_pModify=(SwModify*)_pTxtNd;
|
||||
_pModify->Modify( 0, &aHint);
|
||||
_pModify->ModifyNotification( 0, &aHint);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -66,11 +66,12 @@ public:
|
|||
|
||||
SwAutoCompleteClient& operator=(const SwAutoCompleteClient& rClient);
|
||||
|
||||
virtual void Modify( SfxPoolItem *pOld, SfxPoolItem *pNew);
|
||||
const SwDoc& GetDoc(){return *pDoc;}
|
||||
#ifdef DBG_UTIL
|
||||
static ULONG GetElementCount() {return nSwAutoCompleteClientCount;}
|
||||
#endif
|
||||
protected:
|
||||
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
|
||||
};
|
||||
/* -----------------------------05.08.2002 12:48------------------------------
|
||||
|
||||
|
@ -156,15 +157,15 @@ SwAutoCompleteClient& SwAutoCompleteClient::operator=(const SwAutoCompleteClient
|
|||
pAutoCompleteWord = rClient.pAutoCompleteWord;
|
||||
pDoc = rClient.pDoc;
|
||||
if(rClient.GetRegisteredIn())
|
||||
rClient.pRegisteredIn->Add(this);
|
||||
((SwModify*)rClient.GetRegisteredIn())->Add(this);
|
||||
else if(GetRegisteredIn())
|
||||
pRegisteredIn->Remove(this);
|
||||
GetRegisteredInNonConst()->Remove(this);
|
||||
return *this;
|
||||
}
|
||||
/* -----------------------------05.08.2002 12:49------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
void SwAutoCompleteClient::Modify(SfxPoolItem *pOld, SfxPoolItem *)
|
||||
void SwAutoCompleteClient::Modify( const SfxPoolItem* pOld, const SfxPoolItem *)
|
||||
{
|
||||
switch( pOld ? pOld->Which() : 0 )
|
||||
{
|
||||
|
|
|
@ -124,6 +124,8 @@
|
|||
#include <vbahelper/vbaaccesshelper.hxx>
|
||||
#endif
|
||||
|
||||
#include "switerator.hxx"
|
||||
|
||||
/* @@@MAINTAINABILITY-HORROR@@@
|
||||
Probably unwanted dependency on SwDocShell
|
||||
*/
|
||||
|
@ -1087,9 +1089,8 @@ USHORT _PostItFld::GetPageNo(
|
|||
//Bereichs ermittelt werden.
|
||||
rVirtPgNo = 0;
|
||||
USHORT nPos = GetCntnt();
|
||||
SwClientIter aIter( (SwModify &)GetFld()->GetTxtNode() );
|
||||
for( SwTxtFrm* pFrm = (SwTxtFrm*)aIter.First( TYPE( SwFrm ));
|
||||
pFrm; pFrm = (SwTxtFrm*)aIter.Next() )
|
||||
SwIterator<SwTxtFrm,SwTxtNode> aIter( GetFld()->GetTxtNode() );
|
||||
for( SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
|
||||
{
|
||||
if( pFrm->GetOfst() > nPos ||
|
||||
(pFrm->HasFollow() && pFrm->GetFollow()->GetOfst() <= nPos) )
|
||||
|
@ -1119,13 +1120,11 @@ bool lcl_GetPostIts(
|
|||
if( pFldType->GetDepends() )
|
||||
{
|
||||
// Modify-Object gefunden, trage alle Felder ins Array ein
|
||||
SwClientIter aIter( *pFldType );
|
||||
SwClient* pLast;
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
|
||||
const SwTxtFld* pTxtFld;
|
||||
|
||||
for( pLast = aIter.First( TYPE(SwFmtFld)); pLast; pLast = aIter.Next() )
|
||||
for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
|
||||
{
|
||||
if( 0 != ( pTxtFld = ((SwFmtFld*)pLast)->GetTxtFld() ) &&
|
||||
if( 0 != ( pTxtFld = pFld->GetTxtFld() ) &&
|
||||
pTxtFld->GetTxtNode().GetNodes().IsDocNodes() )
|
||||
{
|
||||
bHasPostIts = true;
|
||||
|
@ -1736,10 +1735,8 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
|
|||
// #i93174#: notes contain paragraphs that are not nodes
|
||||
{
|
||||
SwFieldType * const pPostits( GetSysFldType(RES_POSTITFLD) );
|
||||
SwClientIter aIter(*pPostits);
|
||||
SwFmtFld const * pFmtFld =
|
||||
static_cast<SwFmtFld const*>(aIter.First( TYPE(SwFmtFld) ));
|
||||
while (pFmtFld)
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pPostits );
|
||||
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
|
||||
{
|
||||
if (pFmtFld->IsFldInDoc())
|
||||
{
|
||||
|
@ -1747,7 +1744,6 @@ void SwDoc::UpdateDocStat( SwDocStat& rStat )
|
|||
static_cast<SwPostItField const*>(pFmtFld->GetFld()));
|
||||
rStat.nAllPara += pField->GetNumberOfParagraphs();
|
||||
}
|
||||
pFmtFld = static_cast<SwFmtFld const*>(aIter.Next());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2192,9 +2188,8 @@ BOOL SwDoc::RemoveInvisibleContent()
|
|||
|
||||
{
|
||||
SwTxtNode* pTxtNd;
|
||||
SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
|
||||
for( SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
|
||||
pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
|
||||
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
|
||||
{
|
||||
if( pFmtFld->GetTxtFld() &&
|
||||
0 != ( pTxtNd = (SwTxtNode*)pFmtFld->GetTxtFld()->GetpTxtNode() ) &&
|
||||
|
@ -2374,14 +2369,11 @@ BOOL SwDoc::ConvertFieldsToText()
|
|||
if ( RES_POSTITFLD == pCurType->Which() )
|
||||
continue;
|
||||
|
||||
SwClientIter aIter( *(SwFieldType*)pCurType );
|
||||
const SwFmtFld* pCurFldFmt = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pCurType );
|
||||
::std::vector<const SwFmtFld*> aFieldFmts;
|
||||
while (pCurFldFmt)
|
||||
{
|
||||
for( SwFmtFld* pCurFldFmt = aIter.First(); pCurFldFmt; pCurFldFmt = aIter.Next() )
|
||||
aFieldFmts.push_back(pCurFldFmt);
|
||||
pCurFldFmt = (SwFmtFld*)aIter.Next();
|
||||
}
|
||||
|
||||
::std::vector<const SwFmtFld*>::iterator aBegin = aFieldFmts.begin();
|
||||
::std::vector<const SwFmtFld*>::iterator aEnd = aFieldFmts.end();
|
||||
while(aBegin != aEnd)
|
||||
|
@ -2671,21 +2663,8 @@ void SwDoc::ChkCondColls()
|
|||
for (USHORT n = 0; n < pTxtFmtCollTbl->Count(); n++)
|
||||
{
|
||||
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
|
||||
|
||||
if (RES_CONDTXTFMTCOLL == pColl->Which())
|
||||
{
|
||||
SwClientIter aIter(*pColl);
|
||||
|
||||
SwClient * pClient = aIter.First(TYPE(SwTxtNode));
|
||||
while (pClient)
|
||||
{
|
||||
SwTxtNode * pTxtNode = static_cast<SwTxtNode *>(pClient);
|
||||
|
||||
pTxtNode->ChkCondColl();
|
||||
|
||||
pClient = aIter.Next();
|
||||
}
|
||||
}
|
||||
pColl->CallSwClientNotify( RES_CONDTXTFMTCOLL );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1490,7 +1490,7 @@ void _RestoreCntntIdx(SwDoc* pDoc,
|
|||
{
|
||||
SwFrmFmt *pFrmFmt = (*pSpz)[ aSave.GetCount() ];
|
||||
SfxPoolItem *pAnchor = (SfxPoolItem*)&pFrmFmt->GetAnchor();
|
||||
pFrmFmt->SwModify::Modify( pAnchor, pAnchor );
|
||||
pFrmFmt->NotifyClients( pAnchor, pAnchor );
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
|
@ -257,7 +257,7 @@ void PaMCorrAbs( const SwNodeIndex &rStartNode,
|
|||
{
|
||||
// the UNO cursor has left its section. We need to notify it!
|
||||
SwMsgPoolItem aHint( RES_UNOCURSOR_LEAVES_SECTION );
|
||||
pUnoCursor->Modify( &aHint, NULL );
|
||||
pUnoCursor->ModifyNotification( &aHint, NULL );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -55,9 +55,7 @@
|
|||
#include <frmtool.hxx>
|
||||
#include <pagedesc.hxx>
|
||||
#include <poolfmt.hxx>
|
||||
#ifndef _DOCSH_HXX
|
||||
#include <docsh.hxx>
|
||||
#endif
|
||||
#include <ndindex.hxx>
|
||||
#include <ftnidx.hxx>
|
||||
#include <fmtftn.hxx>
|
||||
|
@ -69,10 +67,8 @@
|
|||
#include <swwait.hxx>
|
||||
#include <GetMetricVal.hxx>
|
||||
#include <unotools/syslocale.hxx>
|
||||
#ifndef _STATSTR_HRC
|
||||
#include <statstr.hrc>
|
||||
#endif
|
||||
|
||||
#include <switerator.hxx>
|
||||
#include <SwUndoPageDesc.hxx>
|
||||
|
||||
#include <tgrditem.hxx>
|
||||
|
@ -416,16 +412,10 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
|
|||
pDesc->SetFtnInfo( rChged.GetFtnInfo() );
|
||||
SwMsgPoolItem aInfo( RES_PAGEDESC_FTNINFO );
|
||||
{
|
||||
SwClientIter aIter( pDesc->GetMaster() );
|
||||
for( SwClient* pLast = aIter.First(TYPE(SwFrm)); pLast;
|
||||
pLast = aIter.Next() )
|
||||
pLast->Modify( &aInfo, 0 );
|
||||
pDesc->GetMaster().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
|
||||
}
|
||||
{
|
||||
SwClientIter aIter( pDesc->GetLeft() );
|
||||
for( SwClient* pLast = aIter.First(TYPE(SwFrm)); pLast;
|
||||
pLast = aIter.Next() )
|
||||
pLast->Modify( &aInfo, 0 );
|
||||
pDesc->GetLeft().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
|
||||
}
|
||||
}
|
||||
SetModified();
|
||||
|
@ -459,9 +449,9 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
|
|||
return;
|
||||
|
||||
SwFmtPageDesc aDfltDesc( aPageDescs[0] );
|
||||
SwClientIter aIter( *pDel );
|
||||
SwClientIter aIter( *pDel ); // TODO
|
||||
SwClient* pLast;
|
||||
while( 0 != ( pLast = aIter.GoRoot() ))
|
||||
while( 0 != ( pLast = aIter.GoStart() ))
|
||||
{
|
||||
if( pLast->ISA( SwFmtPageDesc ) )
|
||||
{
|
||||
|
@ -475,18 +465,22 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
|
|||
else
|
||||
{
|
||||
ASSERT( !this, "was ist das fuer ein Mofify-Obj?" );
|
||||
aPageDescs[0]->Add( pLast );
|
||||
((SwFmtPageDesc*)pLast)->RegisterToPageDesc( *aPageDescs[0] );
|
||||
}
|
||||
}
|
||||
else //Es kann noch eine Undo-Kopie existieren
|
||||
aPageDescs[0]->Add( pLast );
|
||||
((SwFmtPageDesc*)pLast)->RegisterToPageDesc( *aPageDescs[0] );
|
||||
}
|
||||
|
||||
// mba: this code prevents us from using an SwIterator as GetPageDescDep() returns an SwClient that is an SwDepend
|
||||
BOOL bFtnInf = FALSE;
|
||||
if ( TRUE == (bFtnInf = pLast == pFtnInfo->GetPageDescDep()) ||
|
||||
pLast == pEndNoteInfo->GetPageDescDep() )
|
||||
{
|
||||
aPageDescs[0]->Add( pLast );
|
||||
if ( bFtnInf )
|
||||
pFtnInfo->ChgPageDesc( aPageDescs[0] );
|
||||
else
|
||||
pEndNoteInfo->ChgPageDesc( aPageDescs[0] );
|
||||
if ( pTmpRoot )
|
||||
{
|
||||
std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
|
||||
|
@ -746,23 +740,7 @@ void SwDoc::PrtOLENotify( BOOL bAll )
|
|||
|
||||
mbOLEPrtNotifyPending = mbAllOLENotify = FALSE;
|
||||
|
||||
|
||||
SwOLENodes *pNodes = 0;
|
||||
SwClientIter aIter( *(SwModify*)GetDfltGrfFmtColl() );
|
||||
for( SwCntntNode* pNd = (SwCntntNode*)aIter.First( TYPE( SwCntntNode ) );
|
||||
pNd;
|
||||
pNd = (SwCntntNode*)aIter.Next() )
|
||||
{
|
||||
SwOLENode *pONd;
|
||||
if ( 0 != (pONd = pNd->GetOLENode()) &&
|
||||
(bAll || pONd->IsOLESizeInvalid()) )
|
||||
{
|
||||
if ( !pNodes )
|
||||
pNodes = new SwOLENodes;
|
||||
pNodes->Insert( pONd, pNodes->Count() );
|
||||
}
|
||||
}
|
||||
|
||||
SwOLENodes *pNodes = SwCntntNode::CreateOLENodesArray( *GetDfltGrfFmtColl(), !bAll );
|
||||
if ( pNodes )
|
||||
{
|
||||
::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
|
||||
|
@ -836,31 +814,19 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
|
|||
{
|
||||
mbOLEPrtNotifyPending = mbAllOLENotify = FALSE;
|
||||
|
||||
SwOLENodes aOLENodes;
|
||||
SwClientIter aIter( *(SwModify*)GetDfltGrfFmtColl() );
|
||||
for( SwCntntNode* pNd = (SwCntntNode*)aIter.First( TYPE( SwCntntNode ) );
|
||||
pNd;
|
||||
pNd = (SwCntntNode*)aIter.Next() )
|
||||
{
|
||||
SwOLENode *pONd = pNd->GetOLENode();
|
||||
if( pONd && pONd->IsOLESizeInvalid() )
|
||||
{
|
||||
aOLENodes.Insert( pONd, aOLENodes.Count() );
|
||||
}
|
||||
}
|
||||
|
||||
if( aOLENodes.Count() )
|
||||
SwOLENodes *pNodes = SwCntntNode::CreateOLENodesArray( *GetDfltGrfFmtColl(), true );
|
||||
if( pNodes )
|
||||
{
|
||||
::StartProgress( STR_STATSTR_SWGPRTOLENOTIFY,
|
||||
0, aOLENodes.Count(), GetDocShell());
|
||||
0, pNodes->Count(), GetDocShell());
|
||||
GetCurrentLayout()->StartAllAction(); //swmod 080218
|
||||
SwMsgPoolItem aMsgHint( RES_UPDATE_ATTR );
|
||||
|
||||
for( USHORT i = 0; i < aOLENodes.Count(); ++i )
|
||||
for( USHORT i = 0; i < pNodes->Count(); ++i )
|
||||
{
|
||||
::SetProgressState( i, GetDocShell() );
|
||||
|
||||
SwOLENode* pOLENd = aOLENodes[i];
|
||||
SwOLENode* pOLENd = (*pNodes)[i];
|
||||
pOLENd->SetOLESizeInvalid( FALSE );
|
||||
|
||||
//Kennen wir nicht, also muss das Objekt geladen werden.
|
||||
|
@ -881,11 +847,12 @@ IMPL_LINK( SwDoc, DoUpdateModifiedOLE, Timer *, )
|
|||
pOLENd->SetOLESizeInvalid( TRUE );
|
||||
}*/
|
||||
// repaint it
|
||||
pOLENd->Modify( &aMsgHint, &aMsgHint );
|
||||
pOLENd->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
}
|
||||
GetCurrentLayout()->EndAllAction(); //swmod 080218
|
||||
::EndProgress( GetDocShell() );
|
||||
delete pNodes;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -63,21 +63,15 @@
|
|||
#include <dflyobj.hxx>
|
||||
#include <svx/svdetc.hxx>
|
||||
#include <editeng/fhgtitem.hxx>
|
||||
|
||||
// OD 26.06.2003 #108784#
|
||||
#include <svx/svdpagv.hxx>
|
||||
// OD 2004-04-01 #i26791#
|
||||
#include <dcontact.hxx>
|
||||
#include <txtfrm.hxx>
|
||||
#include <frmfmt.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <fmtornt.hxx>
|
||||
// --> OD 2006-03-14 #i62875#
|
||||
#include <svx/svditer.hxx>
|
||||
// <--
|
||||
// --> OD 2006-11-01 #130889#
|
||||
#include <vector>
|
||||
// <--
|
||||
#include <switerator.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
using namespace ::com::sun::star::linguistic2;
|
||||
|
@ -544,28 +538,29 @@ _ZSortFly::_ZSortFly( const SwFrmFmt* pFrmFmt, const SwFmtAnchor* pFlyAn,
|
|||
// #i11176#
|
||||
// This also needs to work when no layout exists. Thus, for
|
||||
// FlyFrames an alternative method is used now in that case.
|
||||
SwClientIter aIter( (SwFmt&)*pFmt );
|
||||
|
||||
if( RES_FLYFRMFMT == pFmt->Which() )
|
||||
{
|
||||
if( pFmt->getIDocumentLayoutAccess()->GetCurrentViewShell() ) //swmod 071107//swmod 071225
|
||||
{
|
||||
// Schauen, ob es ein SdrObject dafuer gibt
|
||||
if( aIter.First( TYPE( SwFlyFrm) ) )
|
||||
nOrdNum = ((SwFlyFrm*)aIter())->GetVirtDrawObj()->GetOrdNum();
|
||||
SwFlyFrm* pFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement( *pFrmFmt );
|
||||
if( pFly )
|
||||
nOrdNum = pFly->GetVirtDrawObj()->GetOrdNum();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Schauen, ob es ein SdrObject dafuer gibt
|
||||
if( aIter.First( TYPE(SwFlyDrawContact) ) )
|
||||
nOrdNum = ((SwFlyDrawContact*)aIter())->GetMaster()->GetOrdNum();
|
||||
SwFlyDrawContact* pContact = SwIterator<SwFlyDrawContact,SwFmt>::FirstElement( *pFrmFmt );
|
||||
if( pContact )
|
||||
nOrdNum = pContact->GetMaster()->GetOrdNum();
|
||||
}
|
||||
}
|
||||
else if( RES_DRAWFRMFMT == pFmt->Which() )
|
||||
{
|
||||
// Schauen, ob es ein SdrObject dafuer gibt
|
||||
if( aIter.First( TYPE(SwDrawContact) ) )
|
||||
nOrdNum = ((SwDrawContact*)aIter())->GetMaster()->GetOrdNum();
|
||||
SwDrawContact* pContact = SwIterator<SwDrawContact,SwFmt>::FirstElement( *pFrmFmt );
|
||||
if( pContact )
|
||||
nOrdNum = pContact->GetMaster()->GetOrdNum();
|
||||
}
|
||||
else {
|
||||
ASSERT( !this, "was ist das fuer ein Format?" );
|
||||
|
|
|
@ -832,13 +832,7 @@ bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
|
|||
if( nOldAttrCnt != nNewAttrCnt )
|
||||
{
|
||||
SwUpdateAttr aHint( 0, 0, 0 );
|
||||
SwClientIter aIter( *pNode );
|
||||
SwClient* pGTO = aIter.First(TYPE( SwCrsrShell ));
|
||||
while( pGTO )
|
||||
{
|
||||
pGTO->Modify( 0, &aHint );
|
||||
pGTO = aIter.Next();
|
||||
}
|
||||
pNode->ModifyBroadcast( 0, &aHint, TYPE( SwCrsrShell ) );
|
||||
}
|
||||
|
||||
if( !DoesUndo() && !IsIgnoreRedline() && GetRedlineTbl().Count() )
|
||||
|
|
|
@ -74,6 +74,7 @@
|
|||
#endif
|
||||
|
||||
#include <SwUndoField.hxx>
|
||||
#include "switerator.hxx"
|
||||
|
||||
using namespace ::com::sun::star::uno;
|
||||
|
||||
|
@ -361,10 +362,10 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
|
|||
if( !pNewHt )
|
||||
{
|
||||
SwMsgPoolItem aUpdateDDE( RES_UPDATEDDETBL );
|
||||
(*pFldTypes)[i]->Modify( 0, &aUpdateDDE );
|
||||
(*pFldTypes)[i]->ModifyNotification( 0, &aUpdateDDE );
|
||||
}
|
||||
else
|
||||
(*pFldTypes)[i]->Modify( 0, pNewHt );
|
||||
(*pFldTypes)[i]->ModifyNotification( 0, pNewHt );
|
||||
break;
|
||||
}
|
||||
case RES_GETEXPFLD:
|
||||
|
@ -375,7 +376,7 @@ void SwDoc::UpdateFlds( SfxPoolItem *pNewHt, bool bCloseDB )
|
|||
if( !pNewHt )
|
||||
break;
|
||||
default:
|
||||
(*pFldTypes)[i]->Modify( 0, pNewHt );
|
||||
(*pFldTypes)[i]->ModifyNotification ( 0, pNewHt );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -427,7 +428,7 @@ void SwDoc::UpdateRefFlds( SfxPoolItem* pHt )
|
|||
SwFieldType* pFldType;
|
||||
for( USHORT i = 0; i < pFldTypes->Count(); ++i )
|
||||
if( RES_GETREFFLD == ( pFldType = (*pFldTypes)[i] )->Which() )
|
||||
pFldType->Modify( 0, pHt );
|
||||
pFldType->ModifyNotification( 0, pHt );
|
||||
}
|
||||
|
||||
void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
|
||||
|
@ -446,9 +447,9 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
|
|||
if( pHt && RES_TABLEFML_UPDATE == pHt->Which() )
|
||||
pUpdtFld = (SwTableFmlUpdate*)pHt;
|
||||
|
||||
SwClientIter aIter( *pFldType );
|
||||
for( SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
|
||||
pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
|
||||
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
|
||||
{
|
||||
if( pFmtFld->GetTxtFld() )
|
||||
{
|
||||
SwTblField* pFld = (SwTblField*)pFmtFld->GetFld();
|
||||
|
@ -499,6 +500,7 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
|
|||
// setze bei allen das Value-Flag zurueck
|
||||
pFld->ChgValid( FALSE );
|
||||
}
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -525,16 +527,13 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
|
|||
|
||||
if( pFldType )
|
||||
{
|
||||
SwClient* pLast;
|
||||
SwClientIter aIter( *pFldType );
|
||||
// dann rechne mal schoen
|
||||
// JP 27.03.97: Beim Berechnen am Ende anfangen - weil neue
|
||||
// Felder immer am Anfang der Modifykette eingefuegt
|
||||
// werden. Beim Import haben wir damit eine bessere/
|
||||
// schnellere Berechnung bei "Kettenformeln"
|
||||
if( 0 != ( pLast = aIter.GoEnd() ))
|
||||
do {
|
||||
SwFmtFld* pFmtFld = (SwFmtFld*)pLast;
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
|
||||
for( SwFmtFld* pFmtFld = aIter.Last(); pFmtFld; pFmtFld = aIter.Previous() )
|
||||
{
|
||||
// start calculation at the end
|
||||
// new fields are inserted at the beginning of the modify chain
|
||||
// that gives faster calculation on import
|
||||
// mba: do we really need this "optimization"? Is it still valid?
|
||||
SwTblField* pFld;
|
||||
if( !pFmtFld->GetTxtFld() || (nsSwExtendedSubType::SUB_CMD &
|
||||
(pFld = (SwTblField*)pFmtFld->GetFld())->GetSubType() ))
|
||||
|
@ -603,8 +602,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* pHt )
|
|||
}
|
||||
pCalc->SetCalcError( CALC_NOERR );
|
||||
}
|
||||
pFmtFld->Modify( 0, pHt );
|
||||
} while( 0 != ( pLast = aIter-- ));
|
||||
pFmtFld->ModifyNotification( 0, pHt );
|
||||
}
|
||||
}
|
||||
|
||||
// dann berechene noch die Formeln an den Boxen
|
||||
|
@ -700,10 +699,10 @@ void SwDoc::UpdatePageFlds( SfxPoolItem* pMsgHnt )
|
|||
case RES_CHAPTERFLD:
|
||||
case RES_GETEXPFLD:
|
||||
case RES_REFPAGEGETFLD:
|
||||
pFldType->Modify( 0, pMsgHnt );
|
||||
pFldType->ModifyNotification( 0, pMsgHnt );
|
||||
break;
|
||||
case RES_DOCSTATFLD:
|
||||
pFldType->Modify( 0, 0 );
|
||||
pFldType->ModifyNotification( 0, 0 );
|
||||
break;
|
||||
}
|
||||
SetNewFldLst(true);
|
||||
|
@ -1542,7 +1541,7 @@ void SwDoc::UpdateExpFlds( SwTxtFld* pUpdtFld, bool bUpdRefFlds )
|
|||
}
|
||||
} // switch
|
||||
|
||||
pFmtFld->Modify( 0, 0 ); // Formatierung anstossen
|
||||
pFmtFld->ModifyNotification( 0, 0 ); // Formatierung anstossen
|
||||
|
||||
if( pUpdtFld == pTxtFld ) // sollte nur dieses geupdatet werden
|
||||
{
|
||||
|
@ -1685,9 +1684,8 @@ const SwDBData& SwDoc::GetDBDesc()
|
|||
case RES_DBNUMSETFLD:
|
||||
case RES_DBSETNUMBERFLD:
|
||||
{
|
||||
SwClientIter aIter( rFldType );
|
||||
SwFmtFld* pFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
|
||||
while(pFld)
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( rFldType );
|
||||
for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
|
||||
{
|
||||
if(pFld->IsFldInDoc())
|
||||
{
|
||||
|
@ -1699,7 +1697,6 @@ const SwDBData& SwDoc::GetDBDesc()
|
|||
aDBData = (static_cast < SwDBNameInfField* > (pFld->GetFld()))->GetRealDBData();
|
||||
break;
|
||||
}
|
||||
pFld = (SwFmtFld*)aIter.Next();
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -1957,7 +1954,7 @@ void SwDoc::ChangeDBFields( const SvStringsDtor& rOldNames,
|
|||
SwDBFieldType* pTyp = (SwDBFieldType*)InsertFldType(
|
||||
SwDBFieldType(this, pOldTyp->GetColumnName(), aNewDBData));
|
||||
|
||||
pTyp->Add(pFmtFld); // Feld auf neuen Typ umhaengen
|
||||
pFmtFld->RegisterToFieldType( *pTyp );
|
||||
pFld->ChgTyp(pTyp);
|
||||
|
||||
((SwDBField*)pFld)->ClearInitialized();
|
||||
|
@ -2102,10 +2099,8 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
|
|||
for( ; nStt < 5; ++nStt )
|
||||
{
|
||||
SwFieldType* pFldType = GetSysFldType( aTypes[ nStt ] );
|
||||
SwClientIter aDocInfIter( *pFldType );
|
||||
|
||||
for( SwFmtFld* pFld = (SwFmtFld*)aDocInfIter.First( TYPE( SwFmtFld ));
|
||||
pFld; pFld = (SwFmtFld*)aDocInfIter.Next() )
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
|
||||
for( SwFmtFld* pFld = aIter.First(); pFld; pFld = aIter.Next() )
|
||||
{
|
||||
if( pFld && pFld->GetTxtFld() )
|
||||
{
|
||||
|
@ -2173,7 +2168,7 @@ void SwDoc::SetFixFields( bool bOnlyTimeDate, const DateTime* pNewDateTime )
|
|||
|
||||
// Formatierung anstossen
|
||||
if( bChgd )
|
||||
pFld->Modify( 0, 0 );
|
||||
pFld->ModifyNotification( 0, 0 );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2436,7 +2431,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
|
|||
|
||||
pFormel = 0;
|
||||
// Formatierung anstossen
|
||||
((SwFmtFld*)pFmtFld)->Modify( 0, 0 );
|
||||
((SwFmtFld*)pFmtFld)->ModifyNotification( 0, 0 );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2456,7 +2451,7 @@ void SwDocUpdtFld::_MakeFldList( SwDoc& rDoc, int eGetMode )
|
|||
// Feld Evaluieren
|
||||
((SwHiddenTxtField*)pFld)->Evaluate(&rDoc);
|
||||
// Formatierung anstossen
|
||||
((SwFmtFld*)pFmtFld)->Modify( 0, 0 );
|
||||
((SwFmtFld*)pFmtFld)->ModifyNotification( 0, 0 );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -2757,7 +2752,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
|
|||
if (bUpdateFlds)
|
||||
UpdateTblFlds( &aTblUpdate );
|
||||
else
|
||||
pNewFld->GetTyp()->Modify(0, &aTblUpdate);
|
||||
pNewFld->GetTyp()->ModifyNotification(0, &aTblUpdate);
|
||||
|
||||
if (! bUpdateFlds)
|
||||
bTblSelBreak = TRUE;
|
||||
|
@ -2768,7 +2763,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
|
|||
case RES_MACROFLD:
|
||||
if( bUpdateFlds && pDstTxtFld->GetpTxtNode() )
|
||||
(pDstTxtFld->GetpTxtNode())->
|
||||
Modify( 0, pDstFmtFld );
|
||||
ModifyNotification( 0, pDstFmtFld );
|
||||
break;
|
||||
|
||||
case RES_DBNAMEFLD:
|
||||
|
@ -2795,7 +2790,7 @@ bool SwDoc::UpdateFld(SwTxtFld * pDstTxtFld, SwField & rSrcFld,
|
|||
// kein break;
|
||||
|
||||
default:
|
||||
pDstFmtFld->Modify( 0, pMsgHnt );
|
||||
pDstFmtFld->ModifyNotification( 0, pMsgHnt );
|
||||
}
|
||||
|
||||
// Die Felder die wir berechnen koennen werden hier expli.
|
||||
|
|
|
@ -64,19 +64,14 @@
|
|||
#include <undobj.hxx>
|
||||
#include <fmtcnct.hxx>
|
||||
#include <dflyobj.hxx>
|
||||
|
||||
// --> OD 2009-07-20 #i73249#
|
||||
#include <undoflystrattr.hxx>
|
||||
// <--
|
||||
#include <switerator.hxx>
|
||||
|
||||
extern USHORT GetHtmlMode( const SwDocShell* );
|
||||
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
/*-----------------17.02.98 08:35-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
USHORT SwDoc::GetFlyCount( FlyCntType eType ) const
|
||||
{
|
||||
const SwSpzFrmFmts& rFmts = *GetSpzFrmFmts();
|
||||
|
@ -118,9 +113,6 @@ USHORT SwDoc::GetFlyCount( FlyCntType eType ) const
|
|||
return nCount;
|
||||
}
|
||||
|
||||
/*-----------------17.02.98 08:35-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
// If you change this, also update SwXFrameEnumeration in unocoll.
|
||||
SwFrmFmt* SwDoc::GetFlyNum( USHORT nIdx, FlyCntType eType )
|
||||
{
|
||||
|
@ -161,16 +153,6 @@ SwFrmFmt* SwDoc::GetFlyNum( USHORT nIdx, FlyCntType eType )
|
|||
return pRetFmt;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
/***********************************************************************
|
||||
#* Class : SwDoc
|
||||
#* Methode : SetFlyFrmAnchor
|
||||
#* Beschreibung: Das Ankerattribut des FlyFrms aendert sich.
|
||||
#* Datum : MA 01. Feb. 94
|
||||
#* Update : JP 09.03.98
|
||||
#***********************************************************************/
|
||||
|
||||
Point lcl_FindAnchorLayPos( SwDoc& rDoc, const SwFmtAnchor& rAnch,
|
||||
const SwFrmFmt* pFlyFmt )
|
||||
{
|
||||
|
@ -527,13 +509,6 @@ void SwDoc::SetFlyFrmDescription( SwFlyFrmFmt& rFlyFrmFmt,
|
|||
}
|
||||
// <--
|
||||
|
||||
/***************************************************************************
|
||||
* Methode : BOOL SwDoc::SetFrmFmtToFly( SwFlyFrm&, SwFrmFmt& )
|
||||
* Beschreibung:
|
||||
* Erstellt : OK 14.04.94 15:40
|
||||
* Aenderung : JP 23.04.98
|
||||
***************************************************************************/
|
||||
|
||||
BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
|
||||
SfxItemSet* pSet, BOOL bKeepOrient )
|
||||
{
|
||||
|
@ -617,7 +592,7 @@ BOOL SwDoc::SetFrmFmtToFly( SwFrmFmt& rFmt, SwFrmFmt& rNewFmt,
|
|||
rFmt.MakeFrms();
|
||||
|
||||
if( pUndo )
|
||||
rFmt.Remove( pUndo );
|
||||
pUndo->DeRegisterFromFormat( rFmt );
|
||||
|
||||
SetModified();
|
||||
|
||||
|
@ -638,15 +613,6 @@ void SwDoc::GetGrfNms( const SwFlyFrmFmt& rFmt, String* pGrfName,
|
|||
pGrfNd->GetFileFilterNms( pGrfName, pFltName );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* SwDoc::ChgAnchor()
|
||||
|*
|
||||
|* Ersterstellung MA 10. Jan. 95
|
||||
|* Letzte Aenderung JP 08.07.98
|
||||
|*
|
||||
*************************************************************************/
|
||||
|
||||
sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
|
||||
RndStdIds _eAnchorType,
|
||||
const sal_Bool _bSameOnly,
|
||||
|
@ -898,9 +864,6 @@ sal_Bool SwDoc::ChgAnchor( const SdrMarkList& _rMrkList,
|
|||
}
|
||||
|
||||
|
||||
/* -----------------23.07.98 13:56-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
|
||||
{
|
||||
//Die Source darf noch keinen Follow haben.
|
||||
|
@ -999,9 +962,7 @@ int SwDoc::Chainable( const SwFrmFmt &rSource, const SwFrmFmt &rDest )
|
|||
|
||||
return bAllowed ? SW_CHAIN_OK : SW_CHAIN_WRONG_AREA;
|
||||
}
|
||||
/* -----------------23.07.98 13:56-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
|
||||
int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
|
||||
{
|
||||
int nErr = Chainable( rSource, rDest );
|
||||
|
@ -1032,8 +993,7 @@ int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
|
|||
SwFmtFrmSize aSize( rSource.GetFrmSize() );
|
||||
if ( aSize.GetHeightSizeType() != ATT_FIX_SIZE )
|
||||
{
|
||||
SwClientIter aIter( rSource );
|
||||
SwFlyFrm *pFly = (SwFlyFrm*)aIter.First( TYPE(SwFlyFrm) );
|
||||
SwFlyFrm *pFly = SwIterator<SwFlyFrm,SwFmt>::FirstElement( rSource );
|
||||
if ( pFly )
|
||||
aSize.SetHeight( pFly->Frm().Height() );
|
||||
aSize.SetHeightSizeType( ATT_FIX_SIZE );
|
||||
|
@ -1045,9 +1005,7 @@ int SwDoc::Chain( SwFrmFmt &rSource, const SwFrmFmt &rDest )
|
|||
}
|
||||
return nErr;
|
||||
}
|
||||
/* -----------------23.07.98 13:56-------------------
|
||||
*
|
||||
* --------------------------------------------------*/
|
||||
|
||||
void SwDoc::Unchain( SwFrmFmt &rFmt )
|
||||
{
|
||||
SwFmtChain aChain( rFmt.GetChain() );
|
||||
|
|
|
@ -1359,7 +1359,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
|
|||
{
|
||||
SwFmtChg aChgFmt( pDfltCharFmt );
|
||||
// dann sage mal den Frames bescheid
|
||||
aCallMod.Modify( &aChgFmt, &aChgFmt );
|
||||
aCallMod.ModifyNotification( &aChgFmt, &aChgFmt );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1368,7 +1368,7 @@ void SwDoc::SetDefault( const SfxItemSet& rSet )
|
|||
{
|
||||
SwAttrSetChg aChgOld( aOld, aOld );
|
||||
SwAttrSetChg aChgNew( aNew, aNew );
|
||||
aCallMod.Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
aCallMod.ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
|
||||
// und die default-Formate wieder beim Object austragen
|
||||
|
@ -2040,14 +2040,9 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
|
|||
|
||||
pDest = FindFmtByName( rDestArr, pSrc->GetName() );
|
||||
pDest->SetAuto( FALSE );
|
||||
// pDest->ResetAllAttr();
|
||||
// pDest->CopyAttrs( *pSrc, TRUE ); // kopiere Attribute
|
||||
//JP 19.02.96: ist so wohl optimaler - loest ggfs. kein Modify aus!
|
||||
pDest->DelDiffs( *pSrc );
|
||||
// --> OD 2009-03-23 #i94285#
|
||||
// copy existing <SwFmtPageDesc> instance, before copying attributes
|
||||
// pDest->SetFmtAttr( pSrc->GetAttrSet() ); // kopiere Attribute
|
||||
//JP 18.08.98: Bug 55115 - copy PageDescAttribute in this case
|
||||
|
||||
// #i94285#: existing <SwFmtPageDesc> instance, before copying attributes
|
||||
const SfxPoolItem* pItem;
|
||||
if( &GetAttrPool() != pSrc->GetAttrSet().GetPool() &&
|
||||
SFX_ITEM_SET == pSrc->GetAttrSet().GetItemState(
|
||||
|
@ -2061,8 +2056,7 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
|
|||
{
|
||||
pPageDesc = aPageDescs[ MakePageDesc( rNm ) ];
|
||||
}
|
||||
pPageDesc->Add( &aPageDesc );
|
||||
// pDest->SetFmtAttr( aPageDesc );
|
||||
aPageDesc.RegisterToPageDesc( *pPageDesc );
|
||||
SwAttrSet aTmpAttrSet( pSrc->GetAttrSet() );
|
||||
aTmpAttrSet.Put( aPageDesc );
|
||||
pDest->SetFmtAttr( aTmpAttrSet );
|
||||
|
@ -2071,7 +2065,6 @@ void SwDoc::CopyFmtArr( const SvPtrarr& rSourceArr,
|
|||
{
|
||||
pDest->SetFmtAttr( pSrc->GetAttrSet() );
|
||||
}
|
||||
// <--
|
||||
|
||||
pDest->SetPoolFmtId( pSrc->GetPoolFmtId() );
|
||||
pDest->SetPoolHelpId( pSrc->GetPoolHelpId() );
|
||||
|
@ -2159,9 +2152,9 @@ void SwDoc::CopyPageDescHeaderFooterImpl( bool bCpyHeader,
|
|||
pNewFmt->ResetFmtAttr( RES_CNTNT );
|
||||
}
|
||||
if( bCpyHeader )
|
||||
pNewFmt->Add( (SwFmtHeader*)pNewItem );
|
||||
((SwFmtHeader*)pNewItem)->RegisterToFormat(*pNewFmt);
|
||||
else
|
||||
pNewFmt->Add( (SwFmtFooter*)pNewItem );
|
||||
((SwFmtFooter*)pNewItem)->RegisterToFormat(*pNewFmt);
|
||||
rDestFmt.SetFmtAttr( *pNewItem );
|
||||
}
|
||||
delete pNewItem;
|
||||
|
@ -2248,16 +2241,10 @@ void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
|
|||
rDstDesc.SetFtnInfo( rSrcDesc.GetFtnInfo() );
|
||||
SwMsgPoolItem aInfo( RES_PAGEDESC_FTNINFO );
|
||||
{
|
||||
SwClientIter aIter( rDstDesc.GetMaster() );
|
||||
for( SwClient* pLast = aIter.First(TYPE(SwFrm)); pLast;
|
||||
pLast = aIter.Next() )
|
||||
pLast->Modify( &aInfo, 0 );
|
||||
rDstDesc.GetMaster().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
|
||||
}
|
||||
{
|
||||
SwClientIter aIter( rDstDesc.GetLeft() );
|
||||
for( SwClient* pLast = aIter.First(TYPE(SwFrm)); pLast;
|
||||
pLast = aIter.Next() )
|
||||
pLast->Modify( &aInfo, 0 );
|
||||
rDstDesc.GetLeft().ModifyBroadcast( &aInfo, 0, TYPE(SwFrm) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,8 +49,8 @@ SwEndNoteInfo& SwEndNoteInfo::operator=(const SwEndNoteInfo& rInfo)
|
|||
{
|
||||
if( rInfo.GetFtnTxtColl() )
|
||||
rInfo.GetFtnTxtColl()->Add(this);
|
||||
else if ( pRegisteredIn)
|
||||
pRegisteredIn->Remove(this);
|
||||
else if ( GetRegisteredIn())
|
||||
GetRegisteredInNonConst()->Remove(this);
|
||||
|
||||
if ( rInfo.aPageDescDep.GetRegisteredIn() )
|
||||
((SwModify*)rInfo.aPageDescDep.GetRegisteredIn())->Add( &aPageDescDep );
|
||||
|
@ -183,7 +183,7 @@ void SwEndNoteInfo::SetAnchorCharFmt( SwCharFmt* pChFmt )
|
|||
pChFmt->Add( &((SwClient&)aAnchorCharFmtDep) );
|
||||
}
|
||||
|
||||
void SwEndNoteInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwEndNoteInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0 ;
|
||||
|
||||
|
@ -207,7 +207,7 @@ void SwEndNoteInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
}
|
||||
}
|
||||
else
|
||||
SwClient::Modify( pOld, pNew );
|
||||
CheckRegistration( pOld, pNew );
|
||||
}
|
||||
|
||||
SwFtnInfo& SwFtnInfo::operator=(const SwFtnInfo& rInfo)
|
||||
|
@ -314,7 +314,7 @@ void SwDoc::SetFtnInfo(const SwFtnInfo& rInfo)
|
|||
{
|
||||
SwFmtChg aOld( pOldChrFmt );
|
||||
SwFmtChg aNew( pNewChrFmt );
|
||||
pFtnInfo->Modify( &aOld, &aNew );
|
||||
pFtnInfo->ModifyNotification( &aOld, &aNew );
|
||||
}
|
||||
|
||||
// --> OD 2008-01-09 #i81002#
|
||||
|
@ -379,7 +379,7 @@ void SwDoc::SetEndNoteInfo(const SwEndNoteInfo& rInfo)
|
|||
{
|
||||
SwFmtChg aOld( pOldChrFmt );
|
||||
SwFmtChg aNew( pNewChrFmt );
|
||||
pEndNoteInfo->Modify( &aOld, &aNew );
|
||||
pEndNoteInfo->ModifyNotification( &aOld, &aNew );
|
||||
}
|
||||
|
||||
// --> OD 2008-01-09 #i81002#
|
||||
|
@ -446,7 +446,7 @@ bool SwDoc::SetCurFtn( const SwPaM& rPam, const String& rNumStr,
|
|||
pTxtFtn->CheckCondColl();
|
||||
//#i11339# dispose UNO wrapper when a footnote is changed to an endnote or vice versa
|
||||
SwPtrMsgPoolItem aMsgHint( RES_FOOTNOTE_DELETED, (void*)&pTxtFtn->GetAttr() );
|
||||
GetUnoCallBack()->Modify( &aMsgHint, &aMsgHint );
|
||||
GetUnoCallBack()->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -53,7 +53,7 @@
|
|||
#include <section.hxx>
|
||||
#include <doctxm.hxx>
|
||||
#include <poolfmt.hxx>
|
||||
|
||||
#include <switerator.hxx>
|
||||
#include <com/sun/star/uno/Reference.h>
|
||||
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
|
||||
#include <com/sun/star/document/XDocumentProperties.hpp>
|
||||
|
@ -132,9 +132,8 @@ BOOL SwDoc::SplitDoc( USHORT eDocType, const String& rPath,
|
|||
if( pSplitColl->GetAttrOutlineLevel() == 0 )//<-end,zhaojianwei, 0814
|
||||
{
|
||||
pOutlNds = new SwOutlineNodes( 8, 8 );
|
||||
SwClientIter aIter( *(SwModify*)pSplitColl );
|
||||
for( SwTxtNode* pTNd = (SwTxtNode*)aIter.First( TYPE( SwTxtNode ));
|
||||
pTNd; pTNd = (SwTxtNode*)aIter.Next() )
|
||||
SwIterator<SwTxtNode,SwFmtColl> aIter( *pSplitColl );
|
||||
for( SwTxtNode* pTNd = aIter.First(); pTNd; pTNd = aIter.Next() )
|
||||
if( pTNd->GetNodes().IsDocNodes() )
|
||||
pOutlNds->Insert( pTNd );
|
||||
|
||||
|
|
|
@ -1917,7 +1917,7 @@ IMPL_LINK( SwDoc, DoIdleJobs, Timer *, pTimer )
|
|||
const sal_Bool bOldLockView = pStartSh->IsViewLocked();
|
||||
pStartSh->LockView( sal_True );
|
||||
|
||||
GetSysFldType( RES_CHAPTERFLD )->Modify( 0, 0 ); // KapitelFld
|
||||
GetSysFldType( RES_CHAPTERFLD )->ModifyNotification( 0, 0 ); // KapitelFld
|
||||
UpdateExpFlds( 0, sal_False ); // Expression-Felder Updaten
|
||||
UpdateTblFlds(NULL); // Tabellen
|
||||
UpdateRefFlds(NULL); // Referenzen
|
||||
|
|
|
@ -603,10 +603,8 @@ SwDoc::~SwDoc()
|
|||
|
||||
// Delete fuer Collections
|
||||
// damit die Abhaengigen wech sind
|
||||
SwTxtFmtColl *pFtnColl = pFtnInfo->GetFtnTxtColl();
|
||||
if ( pFtnColl ) pFtnColl->Remove(pFtnInfo);
|
||||
pFtnColl = pEndNoteInfo->GetFtnTxtColl();
|
||||
if ( pFtnColl ) pFtnColl->Remove(pEndNoteInfo);
|
||||
pFtnInfo->ReleaseCollection();
|
||||
pEndNoteInfo->ReleaseCollection();
|
||||
|
||||
ASSERT( pDfltTxtFmtColl == (*pTxtFmtCollTbl)[0],
|
||||
"Default-Text-Collection muss immer am Anfang stehen" );
|
||||
|
@ -865,10 +863,8 @@ void SwDoc::ClearDoc()
|
|||
|
||||
// Delete fuer Collections
|
||||
// damit die Abhaengigen wech sind
|
||||
SwTxtFmtColl* pFtnColl = pFtnInfo->GetFtnTxtColl();
|
||||
if( pFtnColl ) pFtnColl->Remove( pFtnInfo );
|
||||
pFtnColl = pEndNoteInfo->GetFtnTxtColl();
|
||||
if( pFtnColl ) pFtnColl->Remove( pEndNoteInfo );
|
||||
pFtnInfo->ReleaseCollection();
|
||||
pEndNoteInfo->ReleaseCollection();
|
||||
|
||||
// JP 27.01.98: opt.: ausgehend davon, das Standard als 2. im Array
|
||||
// steht, sollte das als letztes geloescht werden, damit
|
||||
|
|
|
@ -49,18 +49,15 @@
|
|||
#include <txtfrm.hxx>
|
||||
#include <pamtyp.hxx>
|
||||
#include <redline.hxx>
|
||||
#ifndef _COMCORE_HRC
|
||||
#include <comcore.hrc>
|
||||
#endif
|
||||
#include <editeng/adjitem.hxx>
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
#include <frmatr.hxx>
|
||||
#include <SwStyleNameMapper.hxx>
|
||||
#include <SwNodeNum.hxx>
|
||||
// --> OD 2008-03-13 #refactorlists#
|
||||
#include <list.hxx>
|
||||
#include <listfunc.hxx>
|
||||
// <--
|
||||
#include <switerator.hxx>
|
||||
|
||||
#include <map>
|
||||
|
||||
|
@ -145,8 +142,6 @@ void SwDoc::PropagateOutlineRule()
|
|||
// if (NO_NUMBERING != pColl->GetOutlineLevel())//#outline level,zhaojianwei
|
||||
if(pColl->IsAssignedToListLevelOfOutlineStyle())//<-end,zhaojianwei
|
||||
{
|
||||
SwClientIter aIter(*pColl);
|
||||
|
||||
// --> OD 2006-11-20 #i71764#
|
||||
// Check only the list style, which is set at the paragraph style
|
||||
const SwNumRuleItem & rCollRuleItem = pColl->GetNumRule( FALSE );
|
||||
|
@ -1353,33 +1348,17 @@ void SwDoc::StopNumRuleAnimations( OutputDevice* pOut )
|
|||
{
|
||||
for( USHORT n = GetNumRuleTbl().Count(); n; )
|
||||
{
|
||||
// --> OD 2008-02-19 #refactorlists#
|
||||
// SwNumRuleInfo aUpd( GetNumRuleTbl()[ --n ]->GetName() );
|
||||
// aUpd.MakeList( *this );
|
||||
|
||||
// for( ULONG nFirst = 0, nLast = aUpd.GetList().Count();
|
||||
// nFirst < nLast; ++nFirst )
|
||||
// {
|
||||
// SwTxtNode* pTNd = aUpd.GetList().GetObject( nFirst );
|
||||
// SwClientIter aIter( *pTNd );
|
||||
// for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
|
||||
// pFrm; pFrm = (SwFrm*)aIter.Next() )
|
||||
// if( ((SwTxtFrm*)pFrm)->HasAnimation() )
|
||||
// ((SwTxtFrm*)pFrm)->StopAnimation( pOut );
|
||||
// }
|
||||
SwNumRule::tTxtNodeList aTxtNodeList;
|
||||
GetNumRuleTbl()[ --n ]->GetTxtNodeList( aTxtNodeList );
|
||||
for ( SwNumRule::tTxtNodeList::iterator aTxtNodeIter = aTxtNodeList.begin();
|
||||
aTxtNodeIter != aTxtNodeList.end(); ++aTxtNodeIter )
|
||||
{
|
||||
SwTxtNode* pTNd = *aTxtNodeIter;
|
||||
SwClientIter aIter( *pTNd );
|
||||
for( SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
|
||||
pFrm; pFrm = (SwFrm*)aIter.Next() )
|
||||
if( ((SwTxtFrm*)pFrm)->HasAnimation() )
|
||||
((SwTxtFrm*)pFrm)->StopAnimation( pOut );
|
||||
SwIterator<SwTxtFrm,SwTxtNode> aIter(*pTNd);
|
||||
for(SwTxtFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
|
||||
if( pFrm->HasAnimation() )
|
||||
pFrm->StopAnimation( pOut );
|
||||
}
|
||||
// <--
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3279,7 +3279,7 @@ void SwRedline::InvalidateRange() // das Layout anstossen
|
|||
{
|
||||
aHt.nStart = n == nSttNd ? nSttCnt : 0;
|
||||
aHt.nEnd = n == nEndNd ? nEndCnt : ((SwTxtNode*)pNd)->GetTxt().Len();
|
||||
((SwTxtNode*)pNd)->Modify( &aHt, &aHt );
|
||||
((SwTxtNode*)pNd)->ModifyNotification( &aHt, &aHt );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,6 +75,7 @@
|
|||
#include <breakit.hxx>
|
||||
#include <editsh.hxx>
|
||||
#include <scriptinfo.hxx>
|
||||
#include <switerator.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
|
@ -259,15 +260,16 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
|
|||
const SwTOXMark* pMax = &rCurTOXMark;
|
||||
const SwTOXMark* pMin = &rCurTOXMark;
|
||||
|
||||
const SwModify* pType = rCurTOXMark.GetRegisteredIn();
|
||||
SwClientIter aIter( *(SwModify*)pType );
|
||||
const SwTOXType* pType = rCurTOXMark.GetTOXType();
|
||||
SwTOXMarks aMarks;
|
||||
SwTOXMark::InsertTOXMarks( aMarks, *pType );
|
||||
|
||||
const SwTOXMark* pTOXMark;
|
||||
const SwCntntFrm* pCFrm;
|
||||
Point aPt;
|
||||
for( pTOXMark = (SwTOXMark*)aIter.First( TYPE( SwTOXMark )); pTOXMark;
|
||||
pTOXMark = (SwTOXMark*)aIter.Next() )
|
||||
for( sal_Int32 nMark=0; nMark<aMarks.Count(); nMark++ )
|
||||
{
|
||||
pTOXMark = aMarks[nMark];
|
||||
if( pTOXMark != &rCurTOXMark &&
|
||||
0 != ( pMark = pTOXMark->GetTxtTOXMark()) &&
|
||||
0 != ( pTOXSrc = pMark->GetpTxtNd() ) &&
|
||||
|
@ -357,7 +359,6 @@ const SwTOXMark& SwDoc::GotoTOXMark( const SwTOXMark& rCurTOXMark,
|
|||
return *pNew;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
const SwTOXBaseSection* SwDoc::InsertTableOf( const SwPosition& rPos,
|
||||
const SwTOXBase& rTOX,
|
||||
|
@ -477,9 +478,7 @@ const SwTOXBase* SwDoc::GetCurTOX( const SwPosition& rPos ) const
|
|||
}
|
||||
return 0;
|
||||
}
|
||||
/* -----------------01.09.99 16:01-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) const
|
||||
{
|
||||
ASSERT( rTOXBase.ISA( SwTOXBaseSection ), "no TOXBaseSection!" );
|
||||
|
@ -488,9 +487,7 @@ const SwAttrSet& SwDoc::GetTOXBaseAttrSet(const SwTOXBase& rTOXBase) const
|
|||
ASSERT( pFmt, "invalid TOXBaseSection!" );
|
||||
return pFmt->GetAttrSet();
|
||||
}
|
||||
/* -----------------02.09.99 07:48-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
|
||||
{
|
||||
SwTOXBase** prBase = 0;
|
||||
|
@ -512,9 +509,7 @@ const SwTOXBase* SwDoc::GetDefaultTOXBase( TOXTypes eTyp, BOOL bCreate )
|
|||
}
|
||||
return (*prBase);
|
||||
}
|
||||
/* -----------------02.09.99 08:06-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
void SwDoc::SetDefaultTOXBase(const SwTOXBase& rBase)
|
||||
{
|
||||
SwTOXBase** prBase = 0;
|
||||
|
@ -640,9 +635,7 @@ USHORT SwDoc::GetTOXTypeCount(TOXTypes eTyp) const
|
|||
++nCnt;
|
||||
return nCnt;
|
||||
}
|
||||
/*--------------------------------------------------------------------
|
||||
|
||||
--------------------------------------------------------------------*/
|
||||
const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, USHORT nId ) const
|
||||
{
|
||||
const SwTOXTypePtr * ppTTypes = pTOXTypes->GetData();
|
||||
|
@ -653,18 +646,14 @@ const SwTOXType* SwDoc::GetTOXType( TOXTypes eTyp, USHORT nId ) const
|
|||
return 0;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
||||
--------------------------------------------------------------------*/
|
||||
const SwTOXType* SwDoc::InsertTOXType( const SwTOXType& rTyp )
|
||||
{
|
||||
SwTOXType * pNew = new SwTOXType( rTyp );
|
||||
pTOXTypes->Insert( pNew, pTOXTypes->Count() );
|
||||
return pNew;
|
||||
}
|
||||
/*--------------------------------------------------------------------
|
||||
|
||||
--------------------------------------------------------------------*/
|
||||
String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
|
||||
const String* pChkStr ) const
|
||||
{
|
||||
|
@ -719,9 +708,6 @@ String SwDoc::GetUniqueTOXBaseName( const SwTOXType& rType,
|
|||
return aName += String::CreateFromInt32( ++nNum );
|
||||
}
|
||||
|
||||
/*--------------------------------------------------------------------
|
||||
|
||||
--------------------------------------------------------------------*/
|
||||
BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
|
||||
{
|
||||
ASSERT( rTOXBase.ISA( SwTOXBaseSection ),
|
||||
|
@ -739,7 +725,6 @@ BOOL SwDoc::SetTOXBaseName(const SwTOXBase& rTOXBase, const String& rName)
|
|||
return bRet;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
const SwTxtNode* lcl_FindChapterNode( const SwNode& rNd, BYTE nLvl = 0 )
|
||||
{
|
||||
|
@ -1204,18 +1189,17 @@ SwTxtFmtColl* SwTOXBaseSection::GetTxtFmtColl( USHORT nLevel )
|
|||
void SwTOXBaseSection::UpdateMarks( const SwTOXInternational& rIntl,
|
||||
const SwTxtNode* pOwnChapterNode )
|
||||
{
|
||||
const SwModify* pType = SwTOXBase::GetRegisteredIn();
|
||||
const SwTOXType* pType = (SwTOXType*) SwTOXBase::GetRegisteredIn();
|
||||
if( !pType->GetDepends() )
|
||||
return;
|
||||
|
||||
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
|
||||
TOXTypes eTOXTyp = GetTOXType()->GetType();
|
||||
SwClientIter aIter( *(SwModify*)pType );
|
||||
SwIterator<SwTOXMark,SwTOXType> aIter( *pType );
|
||||
|
||||
SwTxtTOXMark* pTxtMark;
|
||||
SwTOXMark* pMark;
|
||||
for( pMark = (SwTOXMark*)aIter.First( TYPE( SwTOXMark )); pMark;
|
||||
pMark = (SwTOXMark*)aIter.Next() )
|
||||
for( pMark = aIter.First(); pMark; pMark = aIter.Next() )
|
||||
{
|
||||
::SetProgressState( 0, pDoc->GetDocShell() );
|
||||
|
||||
|
@ -1329,9 +1313,8 @@ void SwTOXBaseSection::UpdateTemplate( const SwTxtNode* pOwnChapterNode )
|
|||
pColl->IsAssignedToListLevelOfOutlineStyle()) )//<-end,zhaojianwei
|
||||
continue;
|
||||
|
||||
SwClientIter aIter( *pColl );
|
||||
SwTxtNode* pTxtNd = (SwTxtNode*)aIter.First( TYPE( SwTxtNode ));
|
||||
for( ; pTxtNd; pTxtNd = (SwTxtNode*)aIter.Next() )
|
||||
SwIterator<SwTxtNode,SwFmtColl> aIter( *pColl );
|
||||
for( SwTxtNode* pTxtNd = aIter.First(); pTxtNd; pTxtNd = aIter.Next() )
|
||||
{
|
||||
::SetProgressState( 0, pDoc->GetDocShell() );
|
||||
|
||||
|
@ -1358,9 +1341,8 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
|
|||
if(!pSeqFld)
|
||||
return;
|
||||
|
||||
SwClientIter aIter( *pSeqFld );
|
||||
SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
|
||||
for( ; pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pSeqFld );
|
||||
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
|
||||
{
|
||||
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
|
||||
if(!pTxtFld)
|
||||
|
@ -1388,9 +1370,7 @@ void SwTOXBaseSection::UpdateSequence( const SwTxtNode* pOwnChapterNode )
|
|||
}
|
||||
}
|
||||
}
|
||||
/* -----------------15.09.99 14:18-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
|
||||
{
|
||||
SwDoc* pDoc = (SwDoc*)GetFmt()->GetDoc();
|
||||
|
@ -1398,9 +1378,8 @@ void SwTOXBaseSection::UpdateAuthorities( const SwTOXInternational& rIntl )
|
|||
if(!pAuthFld)
|
||||
return;
|
||||
|
||||
SwClientIter aIter( *pAuthFld );
|
||||
SwFmtFld* pFmtFld = (SwFmtFld*)aIter.First( TYPE( SwFmtFld ));
|
||||
for( ; pFmtFld; pFmtFld = (SwFmtFld*)aIter.Next() )
|
||||
SwIterator<SwFmtFld,SwFieldType> aIter( *pAuthFld );
|
||||
for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
|
||||
{
|
||||
const SwTxtFld* pTxtFld = pFmtFld->GetTxtFld();
|
||||
//undo
|
||||
|
@ -2431,9 +2410,7 @@ BOOL SwTOXBase::IsTOXBaseInReadonly() const
|
|||
}
|
||||
return bRet;
|
||||
}
|
||||
/* -----------------17.08.99 13:29-------------------
|
||||
|
||||
--------------------------------------------------*/
|
||||
const SfxItemSet* SwTOXBase::GetAttrSet() const
|
||||
{
|
||||
const SwTOXBaseSection *pSect = PTR_CAST(SwTOXBaseSection, this);
|
||||
|
@ -2464,6 +2441,3 @@ BOOL SwTOXBase::GetInfo( SfxPoolItem& rInfo ) const
|
|||
return TRUE;
|
||||
}
|
||||
|
||||
/* */
|
||||
|
||||
|
||||
|
|
|
@ -34,20 +34,14 @@
|
|||
#include <doc.hxx> // fuer GetAttrPool
|
||||
#include <errhdl.hxx>
|
||||
#include <fmtcol.hxx>
|
||||
// --> OD 2006-11-22 #i71574#
|
||||
#include <fmtcolfunc.hxx>
|
||||
// <--
|
||||
#include <hints.hxx>
|
||||
#include <calc.hxx>
|
||||
#include <node.hxx>
|
||||
#include <numrule.hxx>
|
||||
#include <paratr.hxx>
|
||||
|
||||
//--> #outlinelevel added by zhaojianwei
|
||||
#ifndef _SFXINTITEM_HXX
|
||||
#include <switerator.hxx>
|
||||
#include <svl/intitem.hxx>
|
||||
#endif
|
||||
//<--end
|
||||
|
||||
TYPEINIT1( SwTxtFmtColl, SwFmtColl );
|
||||
TYPEINIT1( SwGrfFmtColl, SwFmtColl );
|
||||
|
@ -141,7 +135,7 @@ namespace TxtFmtCollFunc
|
|||
* SwTxtFmtColl TXT
|
||||
*/
|
||||
|
||||
void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwTxtFmtColl::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
if( GetDoc()->IsInDtor() )
|
||||
{
|
||||
|
@ -361,10 +355,10 @@ void SwTxtFmtColl::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
|
||||
BOOL SwTxtFmtColl::IsAtDocNodeSet() const
|
||||
{
|
||||
SwClientIter aIter( *(SwModify*)this );
|
||||
SwIterator<SwCntntNode,SwFmtColl> aIter( *this );
|
||||
const SwNodes& rNds = GetDoc()->GetNodes();
|
||||
for( SwClient* pC = aIter.First(TYPE(SwCntntNode)); pC; pC = aIter.Next() )
|
||||
if( &((SwCntntNode*)pC)->GetNodes() == &rNds )
|
||||
for( SwCntntNode* pNode = aIter.First(); pNode; pNode = aIter.Next() )
|
||||
if( &(pNode->GetNodes()) == &rNds )
|
||||
return TRUE;
|
||||
|
||||
return FALSE;
|
||||
|
@ -547,6 +541,12 @@ SwCollCondition::~SwCollCondition()
|
|||
delete aSubCondition.pFldExpression;
|
||||
}
|
||||
|
||||
void SwCollCondition::RegisterToFormat( SwFmt& rFmt )
|
||||
{
|
||||
rFmt.Add( this );
|
||||
}
|
||||
|
||||
|
||||
|
||||
int SwCollCondition::operator==( const SwCollCondition& rCmp ) const
|
||||
{
|
||||
|
@ -684,9 +684,8 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
|
|||
SetAttrOutlineLevel(nAssignedListLevel+1);
|
||||
|
||||
// --> OD 2009-03-18 #i100277#
|
||||
SwClientIter aIter( *this );
|
||||
SwTxtFmtColl* pDerivedTxtFmtColl =
|
||||
dynamic_cast<SwTxtFmtColl*>(aIter.First( TYPE( SwTxtFmtColl ) ));
|
||||
SwIterator<SwTxtFmtColl,SwFmtColl> aIter( *this );
|
||||
SwTxtFmtColl* pDerivedTxtFmtColl = aIter.First();
|
||||
while ( pDerivedTxtFmtColl != 0 )
|
||||
{
|
||||
if ( !pDerivedTxtFmtColl->IsAssignedToListLevelOfOutlineStyle() )
|
||||
|
@ -702,7 +701,7 @@ void SwTxtFmtColl::AssignToListLevelOfOutlineStyle(const int nAssignedListLevel)
|
|||
}
|
||||
}
|
||||
|
||||
pDerivedTxtFmtColl = dynamic_cast<SwTxtFmtColl*>(aIter.Next());
|
||||
pDerivedTxtFmtColl = aIter.Next();
|
||||
}
|
||||
// <--
|
||||
}
|
||||
|
|
|
@ -34,12 +34,8 @@
|
|||
#ifdef TEST_DELAYED_RESIZE
|
||||
#include <vcl/sound.hxx>
|
||||
#endif
|
||||
#ifndef _WRKWIN_HXX //autogen
|
||||
#include <vcl/wrkwin.hxx>
|
||||
#endif
|
||||
#ifndef _APP_HXX //autogen
|
||||
#include <vcl/svapp.hxx>
|
||||
#endif
|
||||
#include <sot/storage.hxx>
|
||||
#include <fmtornt.hxx>
|
||||
#include <fmtfsize.hxx>
|
||||
|
@ -55,9 +51,9 @@
|
|||
#include "viewsh.hxx"
|
||||
#include "tabfrm.hxx"
|
||||
#include "viewopt.hxx"
|
||||
|
||||
#include "htmltbl.hxx"
|
||||
#include "ndindex.hxx"
|
||||
#include "switerator.hxx"
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
|
@ -66,8 +62,6 @@ using namespace ::com::sun::star;
|
|||
#define MAX_TABWIDTH (USHRT_MAX - 2001)
|
||||
|
||||
|
||||
/* */
|
||||
|
||||
class SwHTMLTableLayoutConstraints
|
||||
{
|
||||
USHORT nRow; // Start-Zeile
|
||||
|
@ -421,11 +415,10 @@ USHORT SwHTMLTableLayout::GetBrowseWidthByTabFrm(
|
|||
USHORT SwHTMLTableLayout::GetBrowseWidthByTable( const SwDoc& rDoc ) const
|
||||
{
|
||||
USHORT nBrowseWidth = 0;
|
||||
SwClientIter aIter( *(SwModify*)pSwTable->GetFrmFmt() );
|
||||
SwClient* pCli = aIter.First( TYPE( SwTabFrm ));
|
||||
if( pCli )
|
||||
SwTabFrm* pFrm = SwIterator<SwTabFrm,SwFmt>::FirstElement( *pSwTable->GetFrmFmt() );
|
||||
if( pFrm )
|
||||
{
|
||||
nBrowseWidth = GetBrowseWidthByTabFrm( *(SwTabFrm*)pCli );
|
||||
nBrowseWidth = GetBrowseWidthByTabFrm( *pFrm );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -94,7 +94,7 @@ SwLineNumberInfo& SwLineNumberInfo::operator=(const SwLineNumberInfo &rCpy)
|
|||
if ( rCpy.GetRegisteredIn() )
|
||||
((SwModify*)rCpy.GetRegisteredIn())->Add( this );
|
||||
else if ( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
|
||||
aType = rCpy.GetNumType();
|
||||
aDivider = rCpy.GetDivider();
|
||||
|
@ -142,9 +142,9 @@ void SwLineNumberInfo::SetCharFmt( SwCharFmt *pChFmt )
|
|||
pChFmt->Add( this );
|
||||
}
|
||||
|
||||
void SwLineNumberInfo::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwLineNumberInfo::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
SwClient::Modify( pOld, pNew );
|
||||
CheckRegistration( pOld, pNew );
|
||||
SwDoc *pDoc = ((SwCharFmt*)GetRegisteredIn())->GetDoc();
|
||||
SwRootFrm* pRoot = pDoc->GetCurrentLayout();
|
||||
if( pRoot )
|
||||
|
|
|
@ -663,7 +663,7 @@ BOOL SwNoTxtFrm::GetCrsrOfst(SwPosition* pPos, Point& ,
|
|||
}\
|
||||
}
|
||||
|
||||
void SwNoTxtFrm::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwNoTxtFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
USHORT nWhich = pNew ? pNew->Which() : pOld ? pOld->Which() : 0;
|
||||
|
||||
|
|
|
@ -209,7 +209,7 @@ SwNumFmt::SwNumFmt() :
|
|||
---------------------------------------------------------------------------*/
|
||||
SwNumFmt::SwNumFmt( const SwNumFmt& rFmt) :
|
||||
SvxNumberFormat(rFmt),
|
||||
SwClient( rFmt.pRegisteredIn ),
|
||||
SwClient( rFmt.GetRegisteredInNonConst() ),
|
||||
pVertOrient(new SwFmtVertOrient( 0, rFmt.GetVertOrient()))
|
||||
{
|
||||
sal_Int16 eMyVertOrient = rFmt.GetVertOrient();
|
||||
|
@ -241,7 +241,7 @@ SwNumFmt::SwNumFmt(const SvxNumberFormat& rNumFmt, SwDoc* pDoc) :
|
|||
pCFmt->Add( this );
|
||||
}
|
||||
else if( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
|
||||
}
|
||||
/* -----------------------------22.02.01 13:42--------------------------------
|
||||
|
@ -323,9 +323,9 @@ SwNumFmt& SwNumFmt::operator=( const SwNumFmt& rNumFmt)
|
|||
{
|
||||
SvxNumberFormat::operator=(rNumFmt);
|
||||
if( rNumFmt.GetRegisteredIn() )
|
||||
rNumFmt.pRegisteredIn->Add( this );
|
||||
rNumFmt.GetRegisteredInNonConst()->Add( this );
|
||||
else if( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
return *this;
|
||||
}
|
||||
/* -----------------------------23.02.01 09:28--------------------------------
|
||||
|
@ -334,7 +334,7 @@ SwNumFmt& SwNumFmt::operator=( const SwNumFmt& rNumFmt)
|
|||
BOOL SwNumFmt::operator==( const SwNumFmt& rNumFmt) const
|
||||
{
|
||||
BOOL bRet = SvxNumberFormat::operator==(rNumFmt) &&
|
||||
pRegisteredIn == rNumFmt.pRegisteredIn;
|
||||
GetRegisteredIn() == rNumFmt.GetRegisteredIn();
|
||||
return bRet;
|
||||
}
|
||||
|
||||
|
@ -346,17 +346,18 @@ void SwNumFmt::SetCharFmt( SwCharFmt* pChFmt)
|
|||
if( pChFmt )
|
||||
pChFmt->Add( this );
|
||||
else if( GetRegisteredIn() )
|
||||
pRegisteredIn->Remove( this );
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
}
|
||||
/* -----------------------------22.02.01 13:45--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
void SwNumFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwNumFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
// dann suche mal in dem Doc nach dem NumRules-Object, in dem dieses
|
||||
// NumFormat gesetzt ist. Das Format muss es nicht geben!
|
||||
const SwCharFmt* pFmt = 0;
|
||||
switch( pOld ? pOld->Which() : pNew ? pNew->Which() : 0 )
|
||||
USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
|
||||
switch( nWhich )
|
||||
{
|
||||
case RES_ATTRSET_CHG:
|
||||
case RES_FMT_CHG:
|
||||
|
@ -367,7 +368,7 @@ void SwNumFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( pFmt && !pFmt->GetDoc()->IsInDtor() )
|
||||
UpdateNumNodes( (SwDoc*)pFmt->GetDoc() );
|
||||
else
|
||||
SwClient::Modify( pOld, pNew );
|
||||
CheckRegistration( pOld, pNew );
|
||||
}
|
||||
/* -----------------------------23.02.01 11:08--------------------------------
|
||||
|
||||
|
@ -381,11 +382,18 @@ void SwNumFmt::SetCharFmtName(const String& rSet)
|
|||
---------------------------------------------------------------------------*/
|
||||
const String& SwNumFmt::GetCharFmtName() const
|
||||
{
|
||||
if((SwCharFmt*)pRegisteredIn)
|
||||
return ((SwCharFmt*)pRegisteredIn)->GetName();
|
||||
if((SwCharFmt*)GetRegisteredIn())
|
||||
return ((SwCharFmt*)GetRegisteredIn())->GetName();
|
||||
else
|
||||
return aEmptyStr;
|
||||
}
|
||||
|
||||
void SwNumFmt::ForgetCharFmt()
|
||||
{
|
||||
if ( GetRegisteredIn() )
|
||||
GetRegisteredInNonConst()->Remove( this );
|
||||
}
|
||||
|
||||
/* -----------------------------22.02.01 16:05--------------------------------
|
||||
|
||||
---------------------------------------------------------------------------*/
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
#include <tblrwcl.hxx>
|
||||
#include <unochart.hxx>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
#include <switerator.hxx>
|
||||
|
||||
using namespace com::sun::star;
|
||||
using namespace com::sun::star::uno;
|
||||
|
@ -210,20 +211,14 @@ void _CheckBoxWidth( const SwTableLine& rLine, SwTwips nSize );
|
|||
for ( USHORT i = 0; i < GetTabLines().Count(); ++i ) \
|
||||
{ \
|
||||
SwFrmFmt* pFmt = GetTabLines()[i]->GetFrmFmt(); \
|
||||
SwClientIter aIter( *pFmt ); \
|
||||
SwClient* pLast = aIter.GoStart(); \
|
||||
if( pLast ) \
|
||||
SwIterator<SwRowFrm,SwFmt> aIter( *pFmt ); \
|
||||
for (SwRowFrm* pFrm=aIter.First(); pFrm; pFrm=aIter.Next())\
|
||||
{ \
|
||||
do \
|
||||
{ \
|
||||
SwFrm *pFrm = PTR_CAST( SwFrm, pLast ); \
|
||||
if ( pFrm && \
|
||||
((SwRowFrm*)pFrm)->GetTabLine() == GetTabLines()[i] ) \
|
||||
if ( pFrm->GetTabLine() == GetTabLines()[i] ) \
|
||||
{ \
|
||||
ASSERT( pFrm->GetUpper()->IsTabFrm(), \
|
||||
"Table layout does not match table structure" ) \
|
||||
} \
|
||||
} while ( 0 != ( pLast = aIter++ ) ); \
|
||||
} \
|
||||
} \
|
||||
}
|
||||
|
@ -529,11 +524,10 @@ void lcl_InsCol( _FndLine* pFndLn, _CpyPara& rCpyPara, USHORT nCpyCnt,
|
|||
|
||||
SwRowFrm* GetRowFrm( SwTableLine& rLine )
|
||||
{
|
||||
SwClientIter aIter( *rLine.GetFrmFmt() );
|
||||
for( SwClient* pFrm = aIter.First( TYPE( SwRowFrm )); pFrm;
|
||||
pFrm = aIter.Next() )
|
||||
if( ((SwRowFrm*)pFrm)->GetTabLine() == &rLine )
|
||||
return (SwRowFrm*)pFrm;
|
||||
SwIterator<SwRowFrm,SwFmt> aIter( *rLine.GetFrmFmt() );
|
||||
for( SwRowFrm* pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
|
||||
if( pFrm->GetTabLine() == &rLine )
|
||||
return pFrm;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -629,7 +623,7 @@ BOOL SwTable::_InsertRow( SwDoc* pDoc, const SwSelBoxes& rBoxes,
|
|||
|
||||
//Lines fuer das Layout-Update herausuchen.
|
||||
const BOOL bLayout = !IsNewModel() &&
|
||||
0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
|
||||
0 != SwIterator<SwTabFrm,SwFmt>::FirstElement( *GetFrmFmt() );
|
||||
|
||||
if ( bLayout )
|
||||
{
|
||||
|
@ -750,7 +744,7 @@ BOOL SwTable::AppendRow( SwDoc* pDoc, USHORT nCnt )
|
|||
SetHTMLTableLayout( 0 ); // MIB 9.7.97: HTML-Layout loeschen
|
||||
|
||||
//Lines fuer das Layout-Update herausuchen.
|
||||
const BOOL bLayout = 0 != SwClientIter( *GetFrmFmt() ).First( TYPE(SwTabFrm) );
|
||||
const BOOL bLayout = 0 != SwIterator<SwTabFrm,SwFmt>::FirstElement( *GetFrmFmt() );
|
||||
if( bLayout )
|
||||
{
|
||||
aFndBox.SetTableLines( *this );
|
||||
|
@ -3758,8 +3752,7 @@ BOOL SwTable::SetColWidth( SwTableBox& rAktBox, USHORT eType,
|
|||
if( GetFrmFmt()->getIDocumentSettingAccess()->get(IDocumentSettingAccess::BROWSE_MODE) &&
|
||||
!rSz.GetWidthPercent() )
|
||||
{
|
||||
SwTabFrm* pTabFrm = (SwTabFrm*)SwClientIter(
|
||||
*GetFrmFmt() ).First( TYPE( SwTabFrm ));
|
||||
SwTabFrm* pTabFrm = SwIterator<SwTabFrm,SwFmt>::FirstElement( *GetFrmFmt() );
|
||||
if( pTabFrm &&
|
||||
pTabFrm->Prt().Width() != rSz.GetWidth() )
|
||||
{
|
||||
|
|
|
@ -92,7 +92,7 @@ void SwURLStateChanged::Notify( SfxBroadcaster& , const SfxHint& rHint )
|
|||
SwUpdateAttr aUpdateAttr( *pAttr->GetStart(),
|
||||
*pAttr->GetEnd(),
|
||||
RES_FMT_CHG );
|
||||
((SwTxtNode*)pTxtNd)->Modify( &aUpdateAttr, &aUpdateAttr );
|
||||
((SwTxtNode*)pTxtNd)->ModifyNotification( &aUpdateAttr, &aUpdateAttr );
|
||||
}
|
||||
|
||||
if( bAction )
|
||||
|
|
|
@ -455,7 +455,7 @@ SwTableNode* SwTableNode::MakeCopy( SwDoc* pDoc, const SwNodeIndex& rIdx ) const
|
|||
SwNodeIndex aInsPos( *pEndNd );
|
||||
|
||||
SwTable& rTbl = (SwTable&)pTblNd->GetTable();
|
||||
pTblFmt->Add( &rTbl ); // das Frame-Format setzen
|
||||
rTbl.RegisterToFormat( *pTblFmt );
|
||||
|
||||
rTbl.SetRowsToRepeat( GetTable().GetRowsToRepeat() );
|
||||
rTbl.SetTblChgMode( GetTable().GetTblChgMode() );
|
||||
|
|
|
@ -575,7 +575,7 @@ void SwDoc::DelSectionFmt( SwSectionFmt *pFmt, BOOL bDelNodes )
|
|||
|
||||
{
|
||||
SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, pFmt );
|
||||
pFmt->Modify( &aMsgHint, &aMsgHint );
|
||||
pFmt->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
|
||||
// A ClearRedo could result in a rekursive call of this function and delete some section
|
||||
|
@ -1082,21 +1082,9 @@ SwFrm* SwClearDummies( SwFrm* pFrm )
|
|||
|
||||
SwSectionNode::~SwSectionNode()
|
||||
{
|
||||
{
|
||||
SwClientIter aIter( *(m_pSection->GetFmt()) );
|
||||
SwClient *pLast = aIter.GoStart();
|
||||
while ( pLast )
|
||||
{
|
||||
if ( pLast->IsA( TYPE(SwFrm) ) )
|
||||
{
|
||||
SwSectionFrm *pSectFrm = (SwSectionFrm*)pLast;
|
||||
SwSectionFrm::MoveCntntAndDelete( pSectFrm, TRUE );
|
||||
pLast = aIter.GoStart();
|
||||
}
|
||||
else
|
||||
pLast = aIter++;
|
||||
}
|
||||
}
|
||||
// mba: test if iteration works as clients will be removed in callback
|
||||
m_pSection->GetFmt()->CallSwClientNotify( RES_OBJECTDYING );
|
||||
|
||||
SwDoc* pDoc = GetDoc();
|
||||
|
||||
SwSectionFmt* pFmt = m_pSection->GetFmt();
|
||||
|
@ -1415,7 +1403,7 @@ void SwSectionNode::NodesArrChgd()
|
|||
if( !rNds.IsDocNodes() )
|
||||
{
|
||||
SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, pFmt );
|
||||
pFmt->Modify( &aMsgHint, &aMsgHint );
|
||||
pFmt->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
|
||||
pFmt->LockModify();
|
||||
|
|
|
@ -29,17 +29,11 @@
|
|||
#include "precompiled_sw.hxx"
|
||||
|
||||
#include <com/sun/star/chart2/XChartDocument.hpp>
|
||||
|
||||
#ifdef WTC
|
||||
#define private public
|
||||
#endif
|
||||
#include <hintids.hxx>
|
||||
|
||||
#include <editeng/lrspitem.hxx>
|
||||
#include <editeng/brkitem.hxx>
|
||||
#include <editeng/protitem.hxx>
|
||||
#include <editeng/boxitem.hxx>
|
||||
// OD 06.08.2003 #i17174#
|
||||
#include <editeng/shaditem.hxx>
|
||||
#include <fmtfsize.hxx>
|
||||
#include <fmtornt.hxx>
|
||||
|
@ -83,23 +77,17 @@
|
|||
#include <section.hxx>
|
||||
#include <frmtool.hxx>
|
||||
#include <node2lay.hxx>
|
||||
#ifndef _COMCORE_HRC
|
||||
#include <comcore.hrc>
|
||||
#endif
|
||||
#include "docsh.hxx"
|
||||
#include <tabcol.hxx>
|
||||
#include <unochart.hxx>
|
||||
|
||||
#include <node.hxx>
|
||||
#include <ndtxt.hxx>
|
||||
|
||||
#include <map>
|
||||
#include <algorithm>
|
||||
// --> OD 2005-12-05 #i27138#
|
||||
#include <rootfrm.hxx>
|
||||
// <--
|
||||
#include <fldupde.hxx>
|
||||
|
||||
#include <switerator.hxx>
|
||||
|
||||
#ifndef DBG_UTIL
|
||||
#define CHECK_TABLE(t)
|
||||
|
@ -498,7 +486,7 @@ const SwTable* SwDoc::InsertTable( const SwInsertTableOptions& rInsTblOpts,
|
|||
}
|
||||
|
||||
SwTable * pNdTbl = &pTblNd->GetTable();
|
||||
pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
|
||||
pNdTbl->RegisterToFormat( *pTableFmt );
|
||||
|
||||
pNdTbl->SetRowsToRepeat( nRowsToRepeat );
|
||||
pNdTbl->SetTableModel( bNewModel );
|
||||
|
@ -794,7 +782,7 @@ const SwTable* SwDoc::TextToTable( const SwInsertTableOptions& rInsTblOpts,
|
|||
|
||||
//Orientation am Fmt der Table setzen
|
||||
pTableFmt->SetFmtAttr( SwFmtHoriOrient( 0, eAdjust ) );
|
||||
pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
|
||||
pNdTbl->RegisterToFormat( *pTableFmt );
|
||||
|
||||
if( pTAFmt || ( rInsTblOpts.mnInsMode & tabopts::DEFAULT_BORDER) )
|
||||
{
|
||||
|
@ -1149,10 +1137,6 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
|
|||
SwUndoTxtToTbl* pUndo = 0;
|
||||
if( DoesUndo() )
|
||||
{
|
||||
// StartUndo( UNDO_TEXTTOTABLE );
|
||||
// pUndo = new SwUndoTxtToTbl( aOriginal, rInsTblOpts, cCh, eAdjust, pTAFmt );
|
||||
// AppendUndo( pUndo );
|
||||
|
||||
// das Splitten vom TextNode nicht in die Undohistory aufnehmen
|
||||
DoUndo( FALSE );
|
||||
}
|
||||
|
@ -1204,8 +1188,6 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
|
|||
pLineFmt->SetFmtAttr( SwFmtFillOrder( ATT_LEFT_TO_RIGHT ));
|
||||
// die Tabelle bekommt USHRT_MAX als default SSize
|
||||
pTableFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, USHRT_MAX ));
|
||||
// if( !(rInsTblOpts.mnInsMode & tabopts::SPLIT_LAYOUT) )
|
||||
// pTableFmt->SetAttr( SwFmtLayoutSplit( FALSE ));
|
||||
|
||||
/* #106283# If the first node in the selection is a context node and if it
|
||||
has an item FRAMEDIR set (no default) propagate the item to the
|
||||
|
@ -1228,13 +1210,7 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
|
|||
|
||||
SwTable * pNdTbl = &pTblNd->GetTable();
|
||||
ASSERT( pNdTbl, "kein Tabellen-Node angelegt." )
|
||||
pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
|
||||
|
||||
// const USHORT nRowsToRepeat =
|
||||
// tabopts::HEADLINE == (rInsTblOpts.mnInsMode & tabopts::HEADLINE) ?
|
||||
// rInsTblOpts.mnRowsToRepeat :
|
||||
// 0;
|
||||
// pNdTbl->SetRowsToRepeat( nRowsToRepeat );
|
||||
pNdTbl->RegisterToFormat( *pTableFmt );
|
||||
|
||||
BOOL bUseBoxFmt = FALSE;
|
||||
if( !pBoxFmt->GetDepends() )
|
||||
|
@ -1244,28 +1220,11 @@ const SwTable* SwDoc::TextToTable( const std::vector< std::vector<SwNodeRange> >
|
|||
bUseBoxFmt = TRUE;
|
||||
pTableFmt->SetFmtAttr( pBoxFmt->GetFrmSize() );
|
||||
delete pBoxFmt;
|
||||
// eAdjust = HORI_NONE;
|
||||
}
|
||||
|
||||
//Orientation am Fmt der Table setzen
|
||||
// pTableFmt->SetAttr( SwFmtHoriOrient( 0, eAdjust ) );
|
||||
// pTableFmt->Add( pNdTbl ); // das Frame-Format setzen
|
||||
|
||||
|
||||
ULONG nIdx = pTblNd->GetIndex();
|
||||
aNode2Layout.RestoreUpperFrms( GetNodes(), nIdx, nIdx + 1 );
|
||||
|
||||
{
|
||||
// SwPaM& rTmp = (SwPaM&)rRange; // Point immer an den Anfang
|
||||
// rTmp.DeleteMark();
|
||||
// rTmp.GetPoint()->nNode = *pTblNd;
|
||||
// SwCntntNode* pCNd = GetNodes().GoNext( &rTmp.GetPoint()->nNode );
|
||||
// rTmp.GetPoint()->nContent.Assign( pCNd, 0 );
|
||||
}
|
||||
|
||||
// if( pUndo )
|
||||
// EndUndo( UNDO_TEXTTOTABLE );
|
||||
|
||||
SetModified();
|
||||
SetFieldsDirty( true, NULL, 0 );
|
||||
return pNdTbl;
|
||||
|
@ -2451,7 +2410,7 @@ SwTableNode::~SwTableNode()
|
|||
SwFrmFmt* pTblFmt = GetTable().GetFrmFmt();
|
||||
SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT,
|
||||
pTblFmt );
|
||||
pTblFmt->Modify( &aMsgHint, &aMsgHint );
|
||||
pTblFmt->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
DelFrms();
|
||||
delete pTable;
|
||||
}
|
||||
|
@ -2537,14 +2496,12 @@ void SwTableNode::DelFrms()
|
|||
//Sie muessen etwas umstaendlich zerstort werden, damit die Master
|
||||
//die Follows mit in's Grab nehmen.
|
||||
|
||||
SwClientIter aIter( *(pTable->GetFrmFmt()) );
|
||||
SwClient *pLast = aIter.GoStart();
|
||||
while ( pLast )
|
||||
SwIterator<SwTabFrm,SwFmt> aIter( *(pTable->GetFrmFmt()) );
|
||||
SwTabFrm *pFrm = aIter.First();
|
||||
while ( pFrm )
|
||||
{
|
||||
BOOL bAgain = FALSE;
|
||||
if ( pLast->IsA( TYPE(SwFrm) ) )
|
||||
{
|
||||
SwTabFrm *pFrm = (SwTabFrm*)pLast;
|
||||
if ( !pFrm->IsFollow() )
|
||||
{
|
||||
while ( pFrm->HasFollow() )
|
||||
|
@ -2570,7 +2527,7 @@ void SwTableNode::DelFrms()
|
|||
bAgain = TRUE;
|
||||
}
|
||||
}
|
||||
pLast = bAgain ? aIter.GoStart() : aIter++;
|
||||
pFrm = bAgain ? aIter.First() : aIter.Next();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -3044,7 +3001,7 @@ void SwDoc::SetRowsToRepeat( SwTable &rTable, USHORT nSet )
|
|||
|
||||
SwMsgPoolItem aChg( RES_TBLHEADLINECHG );
|
||||
rTable.SetRowsToRepeat( nSet );
|
||||
rTable.GetFrmFmt()->Modify( &aChg, &aChg );
|
||||
rTable.GetFrmFmt()->ModifyNotification( &aChg, &aChg );
|
||||
SetModified();
|
||||
}
|
||||
|
||||
|
@ -3568,7 +3525,7 @@ SwTableNode* SwNodes::SplitTable( const SwNodeIndex& rPos, BOOL bAfter,
|
|||
pOldTblFmt->GetDoc()->GetDfltFrmFmt() );
|
||||
|
||||
*pNewTblFmt = *pOldTblFmt;
|
||||
pNewTblFmt->Add( &pNewTblNd->GetTable() );
|
||||
pNewTblNd->GetTable().RegisterToFormat( *pNewTblFmt );
|
||||
|
||||
// neue Size errechnen ? (lcl_ChgTblSize nur das 2. aufrufen, wenn es
|
||||
// beim 1. schon geklappt hat; also absolute Groesse hat)
|
||||
|
|
|
@ -28,11 +28,6 @@
|
|||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_sw.hxx"
|
||||
|
||||
|
||||
#ifdef WTC
|
||||
#define private public
|
||||
#endif
|
||||
|
||||
#include "hintids.hxx"
|
||||
#include <editeng/lrspitem.hxx>
|
||||
#include <editeng/boxitem.hxx>
|
||||
|
@ -60,6 +55,7 @@
|
|||
#include "docary.hxx"
|
||||
#include "ndindex.hxx"
|
||||
#include "undobj.hxx"
|
||||
#include "switerator.hxx"
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
|
@ -462,12 +458,12 @@ BOOL SwDoc::BalanceRowHeight( const SwCursor& rCursor, BOOL bTstOnly )
|
|||
|
||||
for ( i = 0; i < aRowArr.Count(); ++i )
|
||||
{
|
||||
SwClientIter aIter( *((SwTableLine*)aRowArr[i])->GetFrmFmt() );
|
||||
SwFrm* pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
|
||||
SwIterator<SwFrm,SwFmt> aIter( *((SwTableLine*)aRowArr[i])->GetFrmFmt() );
|
||||
SwFrm* pFrm = aIter.First();
|
||||
while ( pFrm )
|
||||
{
|
||||
nHeight = Max( nHeight, pFrm->Frm().Height() );
|
||||
pFrm = (SwFrm*)aIter.Next();
|
||||
pFrm = aIter.Next();
|
||||
}
|
||||
}
|
||||
SwFmtFrmSize aNew( ATT_MIN_SIZE, 0, nHeight );
|
||||
|
|
|
@ -28,12 +28,8 @@
|
|||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_sw.hxx"
|
||||
|
||||
|
||||
#include <hintids.hxx>
|
||||
|
||||
// --> OD 2005-02-21 #i42921#
|
||||
#include <editeng/frmdiritem.hxx>
|
||||
// <--
|
||||
#include <editeng/protitem.hxx>
|
||||
#include <com/sun/star/i18n/CharacterIteratorMode.hdl>
|
||||
#include <fmtcntnt.hxx>
|
||||
|
@ -71,13 +67,11 @@
|
|||
#include <crsskip.hxx>
|
||||
#include <SwStyleNameMapper.hxx>
|
||||
#include <scriptinfo.hxx>
|
||||
// --> OD 2005-12-05 #i27138#
|
||||
#include <rootfrm.hxx>
|
||||
// <--
|
||||
#include <istyleaccess.hxx>
|
||||
// --> OD 2007-10-31 #i83479#
|
||||
#include <IDocumentListItems.hxx>
|
||||
// <--
|
||||
#include <switerator.hxx>
|
||||
#include "ndole.hxx"
|
||||
|
||||
using namespace ::com::sun::star::i18n;
|
||||
|
||||
|
@ -787,10 +781,9 @@ SwFrmFmt* SwNode::GetFlyFmt() const
|
|||
{
|
||||
if( IsCntntNode() )
|
||||
{
|
||||
SwClientIter aIter( *(SwCntntNode*)this );
|
||||
SwClient* pCli = aIter.First( TYPE( SwCntntFrm ));
|
||||
if( pCli )
|
||||
pRet = ((SwCntntFrm*)pCli)->FindFlyFrm()->GetFmt();
|
||||
SwCntntFrm* pFrm = SwIterator<SwCntntFrm,SwCntntNode>::FirstElement( *(SwCntntNode*)this );
|
||||
if( pFrm )
|
||||
pRet = pFrm->FindFlyFrm()->GetFmt();
|
||||
}
|
||||
if( !pRet )
|
||||
{
|
||||
|
@ -1060,7 +1053,7 @@ SwCntntNode::~SwCntntNode()
|
|||
((SwAttrSet*)mpAttrSet.get())->SetModifyAtAttr( 0 );
|
||||
}
|
||||
|
||||
void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
||||
void SwCntntNode::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
|
||||
{
|
||||
USHORT nWhich = pOldValue ? pOldValue->Which() :
|
||||
pNewValue ? pNewValue->Which() : 0 ;
|
||||
|
@ -1072,7 +1065,7 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
|||
SwFmt * pFmt = (SwFmt *) ((SwPtrMsgPoolItem *)pNewValue)->pObject;
|
||||
|
||||
// nicht umhaengen wenn dieses das oberste Format ist !!
|
||||
if( pRegisteredIn == pFmt )
|
||||
if( GetRegisteredIn() == pFmt )
|
||||
{
|
||||
if( pFmt->GetRegisteredIn() )
|
||||
{
|
||||
|
@ -1139,7 +1132,7 @@ void SwCntntNode::Modify( SfxPoolItem* pOldValue, SfxPoolItem* pNewValue )
|
|||
break;
|
||||
}
|
||||
|
||||
SwModify::Modify( pOldValue, pNewValue );
|
||||
NotifyClients( pOldValue, pNewValue );
|
||||
}
|
||||
|
||||
BOOL SwCntntNode::InvalidateNumRule()
|
||||
|
@ -1218,8 +1211,6 @@ SwFmtColl *SwCntntNode::ChgFmtColl( SwFmtColl *pNewColl )
|
|||
{
|
||||
SwFmtChg aTmp1( pOldColl );
|
||||
SwFmtChg aTmp2( pNewColl );
|
||||
// damit alles was im Modify passiert hier nicht noch impl.
|
||||
// werden muss
|
||||
SwCntntNode::Modify( &aTmp1, &aTmp2 );
|
||||
}
|
||||
}
|
||||
|
@ -1386,60 +1377,7 @@ void SwCntntNode::DelFrms()
|
|||
if( !GetDepends() )
|
||||
return;
|
||||
|
||||
SwClientIter aIter( *this );
|
||||
SwCntntFrm *pFrm;
|
||||
|
||||
for( pFrm = (SwCntntFrm*)aIter.First( TYPE(SwCntntFrm)); pFrm;
|
||||
pFrm = (SwCntntFrm*)aIter.Next() )
|
||||
{
|
||||
// --> OD 2005-12-01 #i27138#
|
||||
// notify accessibility paragraphs objects about changed
|
||||
// CONTENT_FLOWS_FROM/_TO relation.
|
||||
// Relation CONTENT_FLOWS_FROM for current next paragraph will change
|
||||
// and relation CONTENT_FLOWS_TO for current previous paragraph will change.
|
||||
if ( pFrm->IsTxtFrm() )
|
||||
{
|
||||
ViewShell* pViewShell( pFrm->getRootFrm()->GetCurrShell() );
|
||||
if ( pViewShell && pViewShell->GetLayout() &&
|
||||
pViewShell->GetLayout()->IsAnyShellAccessible() )
|
||||
{
|
||||
pViewShell->InvalidateAccessibleParaFlowRelation(
|
||||
dynamic_cast<SwTxtFrm*>(pFrm->FindNextCnt( true )),
|
||||
dynamic_cast<SwTxtFrm*>(pFrm->FindPrevCnt( true )) );
|
||||
}
|
||||
}
|
||||
// <--
|
||||
if( pFrm->HasFollow() )
|
||||
pFrm->GetFollow()->_SetIsFollow( pFrm->IsFollow() );
|
||||
if( pFrm->IsFollow() )
|
||||
{
|
||||
SwCntntFrm* pMaster = (SwTxtFrm*)pFrm->FindMaster();
|
||||
pMaster->SetFollow( pFrm->GetFollow() );
|
||||
pFrm->_SetIsFollow( FALSE );
|
||||
}
|
||||
pFrm->SetFollow( 0 );//Damit er nicht auf dumme Gedanken kommt.
|
||||
//Andernfalls kann es sein, dass ein Follow
|
||||
//vor seinem Master zerstoert wird, der Master
|
||||
//greift dann ueber den ungueltigen
|
||||
//Follow-Pointer auf fremdes Memory zu.
|
||||
//Die Kette darf hier zerknauscht werden, weil
|
||||
//sowieso alle zerstoert werden.
|
||||
if( pFrm->GetUpper() && pFrm->IsInFtn() && !pFrm->GetIndNext() &&
|
||||
!pFrm->GetIndPrev() )
|
||||
{
|
||||
SwFtnFrm *pFtn = pFrm->FindFtnFrm();
|
||||
ASSERT( pFtn, "You promised a FtnFrm?" );
|
||||
SwCntntFrm* pCFrm;
|
||||
if( !pFtn->GetFollow() && !pFtn->GetMaster() &&
|
||||
0 != ( pCFrm = pFtn->GetRefFromAttr()) && pCFrm->IsFollow() )
|
||||
{
|
||||
ASSERT( pCFrm->IsTxtFrm(), "NoTxtFrm has Footnote?" );
|
||||
((SwTxtFrm*)pCFrm->FindMaster())->Prepare( PREP_FTN_GONE );
|
||||
}
|
||||
}
|
||||
pFrm->Cut();
|
||||
delete pFrm;
|
||||
}
|
||||
SwCntntFrm::DelFrms(*this);
|
||||
if( IsTxtNode() )
|
||||
{
|
||||
((SwTxtNode*)this)->SetWrong( NULL );
|
||||
|
@ -1510,7 +1448,7 @@ BOOL SwCntntNode::GetInfo( SfxPoolItem& rInfo ) const
|
|||
case RES_CONTENT_VISIBLE:
|
||||
{
|
||||
((SwPtrMsgPoolItem&)rInfo).pObject =
|
||||
SwClientIter( *(SwCntntNode*)this ).First( TYPE(SwFrm) );
|
||||
SwIterator<SwFrm,SwCntntNode>::FirstElement(*this);
|
||||
}
|
||||
return FALSE;
|
||||
}
|
||||
|
@ -1548,7 +1486,7 @@ BOOL SwCntntNode::SetAttr(const SfxPoolItem& rAttr )
|
|||
{
|
||||
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
|
||||
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
return bRet;
|
||||
|
@ -1624,7 +1562,7 @@ BOOL SwCntntNode::SetAttr( const SfxItemSet& rSet )
|
|||
// einige Sonderbehandlungen fuer Attribute
|
||||
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
|
||||
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
return bRet;
|
||||
|
@ -1674,7 +1612,7 @@ BOOL SwCntntNode::ResetAttr( USHORT nWhich1, USHORT nWhich2 )
|
|||
{
|
||||
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
|
||||
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
|
||||
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
|
||||
mpAttrSet.reset();//DELETEZ( mpAttrSet );
|
||||
|
@ -1715,7 +1653,7 @@ BOOL SwCntntNode::ResetAttr( const SvUShorts& rWhichArr )
|
|||
{
|
||||
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
|
||||
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
}
|
||||
}
|
||||
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
|
||||
|
@ -1754,7 +1692,7 @@ USHORT SwCntntNode::ResetAllAttr()
|
|||
{
|
||||
SwAttrSetChg aChgOld( *GetpSwAttrSet(), aOld );
|
||||
SwAttrSetChg aChgNew( *GetpSwAttrSet(), aNew );
|
||||
Modify( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
ModifyNotification( &aChgOld, &aChgNew ); // alle veraenderten werden verschickt
|
||||
|
||||
if( !GetpSwAttrSet()->Count() ) // leer, dann loeschen
|
||||
mpAttrSet.reset();//DELETEZ( mpAttrSet );
|
||||
|
@ -1894,7 +1832,7 @@ void SwCntntNode::SetCondFmtColl( SwFmtColl* pColl )
|
|||
{
|
||||
SwFmtChg aTmp1( pOldColl ? pOldColl : GetFmtColl() );
|
||||
SwFmtChg aTmp2( pColl ? pColl : GetFmtColl() );
|
||||
SwModify::Modify( &aTmp1, &aTmp2 );
|
||||
NotifyClients( &aTmp1, &aTmp2 );
|
||||
}
|
||||
if( IsInCache() )
|
||||
{
|
||||
|
@ -2074,6 +2012,24 @@ short SwCntntNode::GetTextDirection( const SwPosition& rPos,
|
|||
}
|
||||
// <--
|
||||
|
||||
SwOLENodes* SwCntntNode::CreateOLENodesArray( const SwFmtColl& rColl, bool bOnlyWithInvalidSize )
|
||||
{
|
||||
SwOLENodes *pNodes = 0;
|
||||
SwIterator<SwCntntNode,SwFmtColl> aIter( rColl );
|
||||
for( SwCntntNode* pNd = aIter.First(); pNd; pNd = aIter.Next() )
|
||||
{
|
||||
SwOLENode *pONd = pNd->GetOLENode();
|
||||
if ( pONd && (!bOnlyWithInvalidSize || pONd->IsOLESizeInvalid()) )
|
||||
{
|
||||
if ( !pNodes )
|
||||
pNodes = new SwOLENodes;
|
||||
pNodes->Insert( pONd, pNodes->Count() );
|
||||
}
|
||||
}
|
||||
|
||||
return pNodes;
|
||||
}
|
||||
|
||||
//FEATURE::CONDCOLL
|
||||
// Metoden aus Node.hxx - erst hier ist der TxtNode bekannt !!
|
||||
// os: nur fuer ICC, da der zum optimieren zu dumm ist
|
||||
|
|
|
@ -28,8 +28,8 @@
|
|||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_sw.hxx"
|
||||
|
||||
|
||||
#include <calbck.hxx> // SwClientIter
|
||||
#include <switerator.hxx>
|
||||
#include <calbck.hxx>
|
||||
#include <node.hxx>
|
||||
#include <ndindex.hxx>
|
||||
#include <swtable.hxx>
|
||||
|
@ -42,14 +42,14 @@
|
|||
#include "section.hxx"
|
||||
#include "node2lay.hxx"
|
||||
|
||||
|
||||
/* -----------------25.02.99 10:31-------------------
|
||||
* Die SwNode2LayImpl-Klasse erledigt die eigentliche Arbeit,
|
||||
* die SwNode2Layout-Klasse ist nur die der Oefffentlichkeit bekannte Schnittstelle
|
||||
* --------------------------------------------------*/
|
||||
class SwNode2LayImpl
|
||||
{
|
||||
SwClientIter *pIter; // Der eigentliche Iterator
|
||||
SwIterator<SwFrm,SwModify>* pIter;
|
||||
SwModify* pMod;
|
||||
SvPtrarr *pUpperFrms;// Zum Einsammeln der Upper
|
||||
ULONG nIndex; // Der Index des einzufuegenden Nodes
|
||||
BOOL bMaster : 1; // TRUE => nur Master , FALSE => nur Frames ohne Follow
|
||||
|
@ -77,6 +77,71 @@ public:
|
|||
* vor oder hinter den eingefuegt werden soll.
|
||||
* --------------------------------------------------*/
|
||||
|
||||
SwNode* GoNextWithFrm(const SwNodes& rNodes, SwNodeIndex *pIdx)
|
||||
{
|
||||
if( pIdx->GetIndex() >= rNodes.Count() - 1 )
|
||||
return 0;
|
||||
|
||||
SwNodeIndex aTmp(*pIdx, +1);
|
||||
SwNode* pNd = 0;
|
||||
while( aTmp < rNodes.Count()-1 )
|
||||
{
|
||||
pNd = &aTmp.GetNode();
|
||||
bool bFound = false;
|
||||
if ( pNd->IsCntntNode() )
|
||||
bFound = ( SwIterator<SwFrm,SwCntntNode>::FirstElement(*(SwCntntNode*)pNd) != 0);
|
||||
else if ( pNd->IsTableNode() )
|
||||
bFound = ( SwIterator<SwFrm,SwFmt>::FirstElement(*((SwTableNode*)pNd)->GetTable().GetFrmFmt()) != 0 );
|
||||
else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() )
|
||||
{
|
||||
pNd = 0;
|
||||
break;
|
||||
}
|
||||
if ( bFound )
|
||||
break;
|
||||
aTmp++;
|
||||
}
|
||||
|
||||
if( aTmp == rNodes.Count()-1 )
|
||||
pNd = 0;
|
||||
else if( pNd )
|
||||
(*pIdx) = aTmp;
|
||||
return pNd;
|
||||
}
|
||||
|
||||
SwNode* GoPreviousWithFrm(SwNodeIndex *pIdx)
|
||||
{
|
||||
if( !pIdx->GetIndex() )
|
||||
return 0;
|
||||
|
||||
SwNodeIndex aTmp( *pIdx, -1 );
|
||||
SwNode* pNd(0);
|
||||
while( aTmp.GetIndex() )
|
||||
{
|
||||
pNd = &aTmp.GetNode();
|
||||
bool bFound = false;
|
||||
if ( pNd->IsCntntNode() )
|
||||
bFound = ( SwIterator<SwFrm,SwCntntNode>::FirstElement(*(SwCntntNode*)pNd) != 0);
|
||||
else if ( pNd->IsTableNode() )
|
||||
bFound = ( SwIterator<SwFrm,SwFmt>::FirstElement(*((SwTableNode*)pNd)->GetTable().GetFrmFmt()) != 0 );
|
||||
else if( pNd->IsStartNode() && !pNd->IsSectionNode() )
|
||||
{
|
||||
pNd = 0;
|
||||
break;
|
||||
}
|
||||
if ( bFound )
|
||||
break;
|
||||
aTmp--;
|
||||
}
|
||||
|
||||
if( !aTmp.GetIndex() )
|
||||
pNd = 0;
|
||||
else if( pNd )
|
||||
(*pIdx) = aTmp;
|
||||
return pNd;
|
||||
}
|
||||
|
||||
|
||||
SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
|
||||
: pUpperFrms( NULL ), nIndex( nIdx ), bInit( FALSE )
|
||||
{
|
||||
|
@ -88,7 +153,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
|
|||
if( !bSearch && rNode.GetIndex() < nIndex )
|
||||
{
|
||||
SwNodeIndex aTmp( *rNode.EndOfSectionNode(), +1 );
|
||||
pNd = rNode.GetNodes().GoPreviousWithFrm( &aTmp );
|
||||
pNd = GoPreviousWithFrm( &aTmp );
|
||||
if( !bSearch && pNd && rNode.GetIndex() > pNd->GetIndex() )
|
||||
pNd = NULL; // Nicht ueber den Bereich hinausschiessen
|
||||
bMaster = FALSE;
|
||||
|
@ -96,7 +161,7 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
|
|||
else
|
||||
{
|
||||
SwNodeIndex aTmp( rNode, -1 );
|
||||
pNd = rNode.GetNodes().GoNextWithFrm( &aTmp );
|
||||
pNd = GoNextWithFrm( rNode.GetNodes(), &aTmp );
|
||||
bMaster = TRUE;
|
||||
if( !bSearch && pNd && rNode.EndOfSectionIndex() < pNd->GetIndex() )
|
||||
pNd = NULL; // Nicht ueber den Bereich hinausschiessen
|
||||
|
@ -109,7 +174,6 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
|
|||
}
|
||||
if( pNd )
|
||||
{
|
||||
SwModify *pMod;
|
||||
if( pNd->IsCntntNode() )
|
||||
pMod = (SwModify*)pNd->GetCntntNode();
|
||||
else
|
||||
|
@ -117,10 +181,13 @@ SwNode2LayImpl::SwNode2LayImpl( const SwNode& rNode, ULONG nIdx, BOOL bSearch )
|
|||
ASSERT( pNd->IsTableNode(), "For Tablenodes only" );
|
||||
pMod = pNd->GetTableNode()->GetTable().GetFrmFmt();
|
||||
}
|
||||
pIter = new SwClientIter( *pMod );
|
||||
pIter = new SwIterator<SwFrm,SwModify>( *pMod );
|
||||
}
|
||||
else
|
||||
{
|
||||
pIter = NULL;
|
||||
pMod = 0;
|
||||
}
|
||||
}
|
||||
|
||||
/* -----------------25.02.99 10:41-------------------
|
||||
|
@ -141,11 +208,11 @@ SwFrm* SwNode2LayImpl::NextFrm()
|
|||
return FALSE;
|
||||
if( !bInit )
|
||||
{
|
||||
pRet = (SwFrm*)pIter->First(TYPE(SwFrm));
|
||||
pRet = pIter->First();
|
||||
bInit = TRUE;
|
||||
}
|
||||
else
|
||||
pRet = (SwFrm*)pIter->Next();
|
||||
pRet = pIter->Next();
|
||||
while( pRet )
|
||||
{
|
||||
SwFlowFrm* pFlow = SwFlowFrm::CastFlowFrm( pRet );
|
||||
|
@ -188,7 +255,7 @@ SwFrm* SwNode2LayImpl::NextFrm()
|
|||
}
|
||||
return pRet;
|
||||
}
|
||||
pRet = (SwFrm*)pIter->Next();
|
||||
pRet = pIter->Next();
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
@ -215,6 +282,7 @@ void SwNode2LayImpl::SaveUpperFrms()
|
|||
}
|
||||
delete pIter;
|
||||
pIter = NULL;
|
||||
pMod = 0;
|
||||
}
|
||||
|
||||
SwLayoutFrm* SwNode2LayImpl::UpperFrm( SwFrm* &rpFrm, const SwNode &rNode )
|
||||
|
@ -358,9 +426,8 @@ SwFrm* SwNode2LayImpl::GetFrm( const Point* pDocPos,
|
|||
const SwPosition *pPos,
|
||||
const BOOL bCalcFrm ) const
|
||||
{
|
||||
return pIter ? ::GetFrmOfModify( 0, pIter->GetModify(), USHRT_MAX,
|
||||
pDocPos, pPos, bCalcFrm )
|
||||
: 0;
|
||||
// mba: test if change of member pIter -> pMod broke anything
|
||||
return pMod ? ::GetFrmOfModify( 0, *pMod, USHRT_MAX, pDocPos, pPos, bCalcFrm ) : 0;
|
||||
}
|
||||
|
||||
SwNode2Layout::SwNode2Layout( const SwNode& rNd, ULONG nIdx )
|
||||
|
|
|
@ -366,7 +366,7 @@ void SwNodes::ChgNode( SwNodeIndex& rDelPos, ULONG nSz,
|
|||
SwPtrMsgPoolItem aMsgHint( nDelMsg,
|
||||
(void*)&pAttr->GetAttr() );
|
||||
rNds.GetDoc()->GetUnoCallBack()->
|
||||
Modify( &aMsgHint, &aMsgHint );
|
||||
ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -663,7 +663,7 @@ BOOL SwNodes::_MoveNodes( const SwNodeRange& aRange, SwNodes & rNodes,
|
|||
SwFrmFmt* pTblFmt = pTblNd->GetTable().GetFrmFmt();
|
||||
SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT,
|
||||
pTblFmt );
|
||||
pTblFmt->Modify( &aMsgHint, &aMsgHint );
|
||||
pTblFmt->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
}
|
||||
if( bNewFrms )
|
||||
|
@ -1525,79 +1525,6 @@ SwCntntNode* SwNodes::GoPrevious(SwNodeIndex *pIdx) const
|
|||
return (SwCntntNode*)pNd;
|
||||
}
|
||||
|
||||
SwNode* SwNodes::GoNextWithFrm(SwNodeIndex *pIdx) const
|
||||
{
|
||||
if( pIdx->GetIndex() >= Count() - 1 )
|
||||
return 0;
|
||||
|
||||
SwNodeIndex aTmp(*pIdx, +1);
|
||||
SwNode* pNd = 0;
|
||||
while( aTmp < Count()-1 )
|
||||
{
|
||||
pNd = &aTmp.GetNode();
|
||||
SwModify *pMod = 0;
|
||||
if ( pNd->IsCntntNode() )
|
||||
pMod = (SwCntntNode*)pNd;
|
||||
else if ( pNd->IsTableNode() )
|
||||
pMod = ((SwTableNode*)pNd)->GetTable().GetFrmFmt();
|
||||
else if( pNd->IsEndNode() && !pNd->StartOfSectionNode()->IsSectionNode() )
|
||||
{
|
||||
pNd = 0;
|
||||
break;
|
||||
}
|
||||
if ( pMod && pMod->GetDepends() )
|
||||
{
|
||||
SwClientIter aIter( *pMod );
|
||||
if( aIter.First( TYPE(SwFrm) ) )
|
||||
break;
|
||||
}
|
||||
aTmp++;
|
||||
}
|
||||
if( aTmp == Count()-1 )
|
||||
pNd = 0;
|
||||
else if( pNd )
|
||||
(*pIdx) = aTmp;
|
||||
return pNd;
|
||||
}
|
||||
|
||||
SwNode* SwNodes::GoPreviousWithFrm(SwNodeIndex *pIdx) const
|
||||
{
|
||||
if( !pIdx->GetIndex() )
|
||||
return 0;
|
||||
|
||||
SwNodeIndex aTmp( *pIdx, -1 );
|
||||
SwNode* pNd(0);
|
||||
while( aTmp.GetIndex() )
|
||||
{
|
||||
pNd = &aTmp.GetNode();
|
||||
SwModify *pMod = 0;
|
||||
if ( pNd->IsCntntNode() )
|
||||
pMod = (SwCntntNode*)pNd;
|
||||
else if ( pNd->IsTableNode() )
|
||||
pMod = ((SwTableNode*)pNd)->GetTable().GetFrmFmt();
|
||||
else if( pNd->IsStartNode() && !pNd->IsSectionNode() )
|
||||
{
|
||||
pNd = 0;
|
||||
break;
|
||||
}
|
||||
if ( pMod && pMod->GetDepends() )
|
||||
{
|
||||
SwClientIter aIter( *pMod );
|
||||
if( aIter.First( TYPE(SwFrm) ) )
|
||||
break;
|
||||
}
|
||||
aTmp--;
|
||||
}
|
||||
|
||||
if( !aTmp.GetIndex() )
|
||||
pNd = 0;
|
||||
else if( pNd )
|
||||
(*pIdx) = aTmp;
|
||||
return pNd;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* BOOL SwNodes::CheckNodesRange()
|
||||
|
|
|
@ -28,7 +28,6 @@
|
|||
// MARKER(update_precomp.py): autogen include statement, do not remove
|
||||
#include "precompiled_sw.hxx"
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <hintids.hxx>
|
||||
#include <svl/intitem.hxx>
|
||||
|
@ -38,7 +37,6 @@
|
|||
#include <editeng/protitem.hxx>
|
||||
#include <sfx2/linkmgr.hxx>
|
||||
#include <tools/urlobj.hxx>
|
||||
|
||||
#include <sfx2/sfxsids.hrc>
|
||||
#include <sfx2/fcontnr.hxx>
|
||||
#include <docary.hxx>
|
||||
|
@ -64,11 +62,10 @@
|
|||
#include <fmtftntx.hxx>
|
||||
#include <ftnidx.hxx>
|
||||
#include <doctxm.hxx>
|
||||
// --> FME 2004-06-22 #114856# edit in readonly sections
|
||||
#include <fmteiro.hxx>
|
||||
// <--
|
||||
#include <swerror.h>
|
||||
#include <unosection.hxx>
|
||||
#include <switerator.hxx>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
||||
|
@ -250,7 +247,7 @@ SwSection::~SwSection()
|
|||
// dann melden wir noch schnell unser Format um ans dflt FrameFmt,
|
||||
// damit es keine Abhaengigkeiten gibt
|
||||
if( pFmt->DerivedFrom() != pDoc->GetDfltFrmFmt() )
|
||||
pDoc->GetDfltFrmFmt()->Add( pFmt );
|
||||
pFmt->RegisterToFormat( *pDoc->GetDfltFrmFmt() );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -269,7 +266,7 @@ SwSection::~SwSection()
|
|||
// ist die Section der letzte Client im Format, kann dieses
|
||||
// geloescht werden
|
||||
SwPtrMsgPoolItem aMsgHint( RES_REMOVE_UNO_OBJECT, pFmt );
|
||||
pFmt->Modify( &aMsgHint, &aMsgHint );
|
||||
pFmt->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
if( !pFmt->GetDepends() )
|
||||
{
|
||||
// Bug: 28191 - nicht ins Undo aufnehmen, sollte schon vorher
|
||||
|
@ -336,7 +333,7 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
|
|||
|
||||
// erstmal allen Childs sagen, das sie versteckt sind
|
||||
SwMsgPoolItem aMsgItem( RES_SECTION_HIDDEN );
|
||||
pFmt->Modify( &aMsgItem, &aMsgItem );
|
||||
pFmt->ModifyNotification( &aMsgItem, &aMsgItem );
|
||||
|
||||
// alle Frames loeschen
|
||||
pFmt->DelFrms();
|
||||
|
@ -353,7 +350,7 @@ void SwSection::ImplSetHiddenFlag(bool const bTmpHidden, bool const bCondition)
|
|||
// erstmal allen Childs sagen, das der Parent nicht mehr
|
||||
// versteckt ist
|
||||
SwMsgPoolItem aMsgItem( RES_SECTION_NOT_HIDDEN );
|
||||
pFmt->Modify( &aMsgItem, &aMsgItem );
|
||||
pFmt->ModifyNotification( &aMsgItem, &aMsgItem );
|
||||
|
||||
pFmt->MakeFrms();
|
||||
}
|
||||
|
@ -438,7 +435,7 @@ void SwSection::SetEditInReadonly(bool const bFlag)
|
|||
}
|
||||
// <--
|
||||
|
||||
void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwSection::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
bool bRemake = false;
|
||||
bool bUpdateFtn = false;
|
||||
|
@ -487,7 +484,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( pNew )
|
||||
{
|
||||
bool bNewFlag =
|
||||
static_cast<SvxProtectItem*>(pNew)->IsCntntProtected();
|
||||
static_cast<const SvxProtectItem*>(pNew)->IsCntntProtected();
|
||||
if( !bNewFlag )
|
||||
{
|
||||
// Abschalten: teste ob nicht vielleich ueber die Parents
|
||||
|
@ -511,7 +508,7 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( pNew )
|
||||
{
|
||||
const bool bNewFlag =
|
||||
static_cast<SwFmtEditInReadonly*>(pNew)->GetValue();
|
||||
static_cast<const SwFmtEditInReadonly*>(pNew)->GetValue();
|
||||
m_Data.SetEditInReadonlyFlag( bNewFlag );
|
||||
}
|
||||
return;
|
||||
|
@ -543,6 +540,10 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
bUpdateFtn = true;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
CheckRegistration( pOld, pNew );
|
||||
break;
|
||||
}
|
||||
|
||||
if( bRemake )
|
||||
|
@ -557,7 +558,6 @@ void SwSection::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( pSectNd )
|
||||
pSectNd->GetDoc()->GetFtnIdxs().UpdateFtn(SwNodeIndex( *pSectNd ));
|
||||
}
|
||||
SwClient::Modify( pOld, pNew );
|
||||
}
|
||||
|
||||
void SwSection::SetRefObject( SwServerObject* pObj )
|
||||
|
@ -700,19 +700,10 @@ SwSectionFmt::~SwSectionFmt()
|
|||
rSect.SetHidden(false);
|
||||
}
|
||||
}
|
||||
SwClientIter aIter( *this );
|
||||
SwClient *pLast = aIter.GoStart();
|
||||
while ( pLast )
|
||||
{
|
||||
if ( pLast->IsA( TYPE(SwFrm) ) )
|
||||
{
|
||||
SwSectionFrm *pFrm = (SwSectionFrm*)pLast;
|
||||
SwSectionFrm::MoveCntntAndDelete( pFrm, TRUE );
|
||||
pLast = aIter.GoStart();
|
||||
}
|
||||
else
|
||||
pLast = aIter++;
|
||||
}
|
||||
|
||||
// mba: test iteration; objects are removed while iterating
|
||||
CallSwClientNotify( RES_OBJECTDYING );
|
||||
|
||||
// hebe die Section doch mal auf
|
||||
SwNodeRange aRg( *pSectNd, 0, *pSectNd->EndOfSectionNode() );
|
||||
GetDoc()->GetNodes().SectionUp( &aRg );
|
||||
|
@ -726,14 +717,7 @@ SwSectionFmt::~SwSectionFmt()
|
|||
|
||||
SwSection * SwSectionFmt::GetSection() const
|
||||
{
|
||||
if( GetDepends() )
|
||||
{
|
||||
SwClientIter aIter( *(SwSectionFmt*)this );
|
||||
return (SwSectionPtr)aIter.First( TYPE(SwSection) );
|
||||
}
|
||||
|
||||
ASSERT( FALSE, "keine Section als Client." )
|
||||
return 0;
|
||||
return SwIterator<SwSection,SwSectionFmt>::FirstElement( *this );
|
||||
}
|
||||
|
||||
extern void lcl_DeleteFtn( SwSectionNode *pNd, ULONG nStt, ULONG nEnd );
|
||||
|
@ -746,34 +730,19 @@ void SwSectionFmt::DelFrms()
|
|||
if( pIdx && &GetDoc()->GetNodes() == &pIdx->GetNodes() &&
|
||||
0 != (pSectNd = pIdx->GetNode().GetSectionNode() ))
|
||||
{
|
||||
SwClientIter aIter( *this );
|
||||
SwClient *pLast = aIter.GoStart();
|
||||
// --> OD 2007-08-14 #147431#
|
||||
// First delete the <SwSectionFrm> of the <SwSectionFmt> instance
|
||||
while ( pLast )
|
||||
{
|
||||
if ( pLast->IsA( TYPE(SwFrm) ) )
|
||||
{
|
||||
SwSectionFrm *pFrm = (SwSectionFrm*)pLast;
|
||||
SwSectionFrm::MoveCntntAndDelete( pFrm, FALSE );
|
||||
pLast = aIter.GoStart();
|
||||
}
|
||||
else
|
||||
{
|
||||
pLast = aIter++;
|
||||
}
|
||||
}
|
||||
// #147431# : First delete the <SwSectionFrm> of the <SwSectionFmt> instance
|
||||
// mba: test iteration as objects are removed in iteration
|
||||
CallSwClientNotify( RES_OBJECTDYING );
|
||||
|
||||
// Then delete frames of the nested <SwSectionFmt> instances
|
||||
pLast = aIter.GoStart();
|
||||
SwIterator<SwSectionFmt,SwSectionFmt> aIter( *this );
|
||||
SwSectionFmt *pLast = aIter.First();
|
||||
while ( pLast )
|
||||
{
|
||||
if ( pLast->IsA( TYPE(SwSectionFmt) ) )
|
||||
{
|
||||
((SwSectionFmt*)pLast)->DelFrms();
|
||||
}
|
||||
pLast = aIter++;
|
||||
pLast->DelFrms();
|
||||
pLast = aIter.Next();
|
||||
}
|
||||
// <--
|
||||
|
||||
ULONG nEnde = pSectNd->EndOfSectionIndex();
|
||||
ULONG nStart = pSectNd->GetIndex()+1;
|
||||
lcl_DeleteFtn( pSectNd, nStart, nEnde );
|
||||
|
@ -790,7 +759,7 @@ void SwSectionFmt::DelFrms()
|
|||
if( pCNd )
|
||||
{
|
||||
const SfxPoolItem& rItem = pCNd->GetSwAttrSet().Get( RES_PAGEDESC );
|
||||
pCNd->Modify( (SfxPoolItem*)&rItem, (SfxPoolItem*)&rItem );
|
||||
pCNd->ModifyNotification( (SfxPoolItem*)&rItem, (SfxPoolItem*)&rItem );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -810,18 +779,7 @@ void SwSectionFmt::MakeFrms()
|
|||
}
|
||||
}
|
||||
|
||||
void lcl_ClientIter( SwSectionFmt* pFmt, const SfxPoolItem* pOld,
|
||||
const SfxPoolItem* pNew )
|
||||
{
|
||||
SwClientIter aIter( *pFmt );
|
||||
SwClient * pLast = aIter.GoStart();
|
||||
if( pLast )
|
||||
do {
|
||||
pLast->Modify( (SfxPoolItem*)pOld, (SfxPoolItem*)pNew );
|
||||
} while( 0 != ( pLast = aIter++ ));
|
||||
}
|
||||
|
||||
void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
||||
void SwSectionFmt::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
|
||||
{
|
||||
BOOL bClients = FALSE;
|
||||
USHORT nWhich = pOld ? pOld->Which() : pNew ? pNew->Which() : 0;
|
||||
|
@ -836,7 +794,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( SFX_ITEM_SET == pNewSet->GetItemState(
|
||||
RES_PROTECT, FALSE, &pItem ))
|
||||
{
|
||||
lcl_ClientIter( this, pItem, pItem );
|
||||
ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
|
||||
pNewSet->ClearItem( RES_PROTECT );
|
||||
pOldSet->ClearItem( RES_PROTECT );
|
||||
}
|
||||
|
@ -845,7 +803,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( SFX_ITEM_SET == pNewSet->GetItemState(
|
||||
RES_EDIT_IN_READONLY, FALSE, &pItem ) )
|
||||
{
|
||||
lcl_ClientIter( this, pItem, pItem );
|
||||
ModifyBroadcast( (SfxPoolItem*)pItem, (SfxPoolItem*)pItem );
|
||||
pNewSet->ClearItem( RES_EDIT_IN_READONLY );
|
||||
pOldSet->ClearItem( RES_EDIT_IN_READONLY );
|
||||
}
|
||||
|
@ -854,16 +812,14 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( SFX_ITEM_SET == pNewSet->GetItemState(
|
||||
RES_FTN_AT_TXTEND, FALSE, &pItem ))
|
||||
{
|
||||
lcl_ClientIter( this, &pOldSet->Get( RES_FTN_AT_TXTEND ),
|
||||
pItem );
|
||||
ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_FTN_AT_TXTEND ), (SfxPoolItem*)pItem );
|
||||
pNewSet->ClearItem( RES_FTN_AT_TXTEND );
|
||||
pOldSet->ClearItem( RES_FTN_AT_TXTEND );
|
||||
}
|
||||
if( SFX_ITEM_SET == pNewSet->GetItemState(
|
||||
RES_END_AT_TXTEND, FALSE, &pItem ))
|
||||
{
|
||||
lcl_ClientIter( this, &pOldSet->Get( RES_END_AT_TXTEND ),
|
||||
pItem );
|
||||
ModifyBroadcast( (SfxPoolItem*)&pOldSet->Get( RES_END_AT_TXTEND ), (SfxPoolItem*)pItem );
|
||||
pNewSet->ClearItem( RES_END_AT_TXTEND );
|
||||
pOldSet->ClearItem( RES_END_AT_TXTEND );
|
||||
}
|
||||
|
@ -883,12 +839,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
if( pSect && ( bClients || ( RES_SECTION_HIDDEN == nWhich ?
|
||||
!pSect->IsHiddenFlag() : pSect->IsHiddenFlag() ) ) )
|
||||
{
|
||||
// selbst ueber die Clients iterieren, sollte schneller sein!
|
||||
SwClientIter aIter( *this );
|
||||
SwClient * pLast = aIter.GoStart();
|
||||
do {
|
||||
pLast->Modify( pOld, pNew );
|
||||
} while( 0 != ( pLast = aIter++ ));
|
||||
ModifyBroadcast( pOld, pNew );
|
||||
}
|
||||
}
|
||||
return ;
|
||||
|
@ -901,12 +852,7 @@ void SwSectionFmt::Modify( SfxPoolItem* pOld, SfxPoolItem* pNew )
|
|||
// diese Messages bis zum Ende des Baums durchreichen !
|
||||
if( GetDepends() )
|
||||
{
|
||||
SwClientIter aIter( *this );
|
||||
SwClient * pLast = aIter.GoStart();
|
||||
if( pLast ) // konnte zum Anfang gesprungen werden ??
|
||||
do {
|
||||
pLast->Modify( pOld, pNew );
|
||||
} while( 0 != ( pLast = aIter++ ));
|
||||
ModifyBroadcast( pOld, pNew );
|
||||
}
|
||||
return; // das wars
|
||||
|
||||
|
@ -958,17 +904,16 @@ BOOL SwSectionFmt::GetInfo( SfxPoolItem& rInfo ) const
|
|||
|
||||
case RES_CONTENT_VISIBLE:
|
||||
{
|
||||
SwFrm* pFrm = (SwFrm*)SwClientIter( *(SwSectionFmt*)this ).First( TYPE(SwFrm) );
|
||||
SwFrm* pFrm = SwIterator<SwFrm,SwFmt>::FirstElement(*this);
|
||||
// if the current section has no own frame search for the children
|
||||
if(!pFrm)
|
||||
{
|
||||
SwClientIter aFormatIter( *(SwSectionFmt*)this );
|
||||
SwSectionFmt* pChild = (SwSectionFmt*)aFormatIter.
|
||||
First( TYPE(SwSectionFmt) );
|
||||
SwIterator<SwSectionFmt,SwSectionFmt> aFormatIter(*this);
|
||||
SwSectionFmt* pChild = aFormatIter.First();
|
||||
while(pChild && !pFrm)
|
||||
{
|
||||
pFrm = (SwFrm*)SwClientIter( *pChild ).First( TYPE(SwFrm) );
|
||||
pChild = (SwSectionFmt*)aFormatIter.Next();
|
||||
pFrm = SwIterator<SwFrm,SwFmt>::FirstElement(*pChild);
|
||||
pChild = aFormatIter.Next();
|
||||
}
|
||||
}
|
||||
((SwPtrMsgPoolItem&)rInfo).pObject = pFrm;
|
||||
|
@ -1027,15 +972,14 @@ USHORT SwSectionFmt::GetChildSections( SwSections& rArr,
|
|||
|
||||
if( GetDepends() )
|
||||
{
|
||||
SwClientIter aIter( *this );
|
||||
SwClient * pLast;
|
||||
SwIterator<SwSectionFmt,SwSectionFmt> aIter(*this);
|
||||
const SwNodeIndex* pIdx;
|
||||
for( pLast = aIter.First(TYPE(SwSectionFmt)); pLast; pLast = aIter.Next() )
|
||||
for( SwSectionFmt* pLast = aIter.First(); pLast; pLast = aIter.Next() )
|
||||
if( bAllSections ||
|
||||
( 0 != ( pIdx = ((SwSectionFmt*)pLast)->GetCntnt(FALSE).
|
||||
( 0 != ( pIdx = pLast->GetCntnt(FALSE).
|
||||
GetCntntIdx()) && &pIdx->GetNodes() == &GetDoc()->GetNodes() ))
|
||||
{
|
||||
const SwSection* Dummy=((SwSectionFmt*)pLast)->GetSection();
|
||||
const SwSection* Dummy = pLast->GetSection();
|
||||
rArr.C40_INSERT( SwSection,
|
||||
Dummy,
|
||||
rArr.Count() );
|
||||
|
@ -1085,8 +1029,8 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
|
|||
// <--
|
||||
bool bIsHidden = false;
|
||||
|
||||
SwClientIter aIter( *this );
|
||||
SwClient * pLast = aIter.GoStart();
|
||||
SwClientIter aIter( *this ); // TODO
|
||||
::SwClient * pLast = aIter.GoStart();
|
||||
if( pLast ) // konnte zum Anfang gesprungen werden ??
|
||||
do {
|
||||
if( pLast->IsA( TYPE(SwSectionFmt) ) )
|
||||
|
@ -1115,7 +1059,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
|
|||
if (!pProtect->IsCntntProtected() !=
|
||||
!pSection->IsProtectFlag())
|
||||
{
|
||||
pLast->Modify( (SfxPoolItem*)pProtect,
|
||||
pLast->ModifyNotification( (SfxPoolItem*)pProtect,
|
||||
(SfxPoolItem*)pProtect );
|
||||
}
|
||||
|
||||
|
@ -1123,7 +1067,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
|
|||
if (!pEditInReadonly->GetValue() !=
|
||||
!pSection->IsEditInReadonlyFlag())
|
||||
{
|
||||
pLast->Modify( (SfxPoolItem*)pEditInReadonly,
|
||||
pLast->ModifyNotification( (SfxPoolItem*)pEditInReadonly,
|
||||
(SfxPoolItem*)pEditInReadonly );
|
||||
}
|
||||
// <--
|
||||
|
@ -1133,7 +1077,7 @@ void SwSectionFmt::UpdateParent() // Parent wurde veraendert
|
|||
SwMsgPoolItem aMsgItem( static_cast<USHORT>(bIsHidden
|
||||
? RES_SECTION_HIDDEN
|
||||
: RES_SECTION_NOT_HIDDEN ) );
|
||||
pLast->Modify( &aMsgItem, &aMsgItem );
|
||||
pLast->ModifyNotification( &aMsgItem, &aMsgItem );
|
||||
}
|
||||
}
|
||||
else if( !pSection &&
|
||||
|
|
|
@ -80,7 +80,7 @@ void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
|
|||
// them havent't a loaded Graphic. - #86501#
|
||||
rGrfNd.LockModify();
|
||||
|
||||
SwClientIter aIter( rGrfNd );
|
||||
SwClientIter aIter( rGrfNd ); // TODO
|
||||
for( int n = 0; n < 2; ++n )
|
||||
{
|
||||
SwClient * pLast = aIter.GoStart();
|
||||
|
@ -88,7 +88,7 @@ void lcl_CallModify( SwGrfNode& rGrfNd, SfxPoolItem& rItem )
|
|||
{
|
||||
do {
|
||||
if( (0 == n) ^ ( 0 != pLast->ISA( SwCntntFrm )) )
|
||||
pLast->Modify( &rItem, &rItem );
|
||||
pLast->ModifyNotification( &rItem, &rItem );
|
||||
} while( 0 != ( pLast = aIter++ ));
|
||||
}
|
||||
}
|
||||
|
@ -218,7 +218,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
|
|||
if ( (!pSh || !pSh->ActionPend()) && (!pESh || !pESh->ActionPend()) )
|
||||
{
|
||||
SwMsgPoolItem aMsgHint( RES_GRAPHIC_PIECE_ARRIVED );
|
||||
pCntntNode->Modify( &aMsgHint, &aMsgHint );
|
||||
pCntntNode->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
bUpdate = FALSE;
|
||||
}
|
||||
}
|
||||
|
@ -283,7 +283,7 @@ void SwBaseLink::DataChanged( const String& rMimeType,
|
|||
}
|
||||
else
|
||||
{
|
||||
pCntntNode->Modify( &aMsgHint, &aMsgHint );
|
||||
pCntntNode->ModifyNotification( &aMsgHint, &aMsgHint );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include <editeng/ulspitem.hxx>
|
||||
#include <editeng/lrspitem.hxx>
|
||||
#include <svx/svdpage.hxx>
|
||||
#include <svx/svditer.hxx>
|
||||
#include <svx/fmglob.hxx>
|
||||
#include <svx/svdogrp.hxx>
|
||||
#include <svx/svdotext.hxx>
|
||||
|
@ -71,7 +72,7 @@
|
|||
#include <drawinglayer/primitive2d/transformprimitive2d.hxx>
|
||||
#include <svx/sdr/contact/viewobjectcontactofsdrobj.hxx>
|
||||
#include <com/sun/star/text/WritingMode2.hpp>
|
||||
|
||||
#include <switerator.hxx>
|
||||
#include <algorithm>
|
||||
|
||||
using namespace ::com::sun::star;
|
||||
|
@ -309,13 +310,13 @@ void SwContact::_MoveObjToLayer( const bool _bToVisible,
|
|||
return;
|
||||
}
|
||||
|
||||
if ( !pRegisteredIn )
|
||||
if ( !GetRegisteredIn() )
|
||||
{
|
||||
ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no drawing frame format!" );
|
||||
return;
|
||||
}
|
||||
|
||||
const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess();
|
||||
const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(GetRegisteredInNonConst())->getIDocumentDrawModelAccess();
|
||||
if ( !pIDDMA )
|
||||
{
|
||||
ASSERT( false, "SwDrawContact::_MoveObjToLayer(..) - no writer document!" );
|
||||
|
@ -408,7 +409,7 @@ sal_uInt32 SwContact::GetMinOrdNum() const
|
|||
{
|
||||
sal_uInt32 nMinOrdNum( SAL_MAX_UINT32 );
|
||||
|
||||
std::vector< SwAnchoredObject* > aObjs;
|
||||
std::list< SwAnchoredObject* > aObjs;
|
||||
GetAnchoredObjs( aObjs );
|
||||
|
||||
while ( !aObjs.empty() )
|
||||
|
@ -438,7 +439,7 @@ sal_uInt32 SwContact::GetMaxOrdNum() const
|
|||
{
|
||||
sal_uInt32 nMaxOrdNum( 0L );
|
||||
|
||||
std::vector< SwAnchoredObject* > aObjs;
|
||||
std::list< SwAnchoredObject* > aObjs;
|
||||
GetAnchoredObjs( aObjs );
|
||||
|
||||
while ( !aObjs.empty() )
|
||||
|
@ -543,88 +544,6 @@ void SwFlyDrawContact::SetMaster( SdrObject* _pNewMaster )
|
|||
mpMasterObj = static_cast<SwFlyDrawObj *>(_pNewMaster);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* SwFlyDrawContact::CreateNewRef()
|
||||
|*
|
||||
|* Ersterstellung MA 14. Dec. 94
|
||||
|* Letzte Aenderung MA 24. Apr. 95
|
||||
|*
|
||||
|*************************************************************************/
|
||||
|
||||
SwVirtFlyDrawObj *SwFlyDrawContact::CreateNewRef( SwFlyFrm *pFly )
|
||||
{
|
||||
SwVirtFlyDrawObj *pDrawObj = new SwVirtFlyDrawObj( *GetMaster(), pFly );
|
||||
pDrawObj->SetModel( GetMaster()->GetModel() );
|
||||
pDrawObj->SetUserCall( this );
|
||||
|
||||
//Der Reader erzeugt die Master und setzt diese, um die Z-Order zu
|
||||
//transportieren, in die Page ein. Beim erzeugen der ersten Referenz werden
|
||||
//die Master aus der Liste entfernt und fuehren von da an ein
|
||||
//Schattendasein.
|
||||
SdrPage* pPg( 0L );
|
||||
if ( 0 != ( pPg = GetMaster()->GetPage() ) )
|
||||
{
|
||||
const UINT32 nOrdNum = GetMaster()->GetOrdNum();
|
||||
pPg->ReplaceObject( pDrawObj, nOrdNum );
|
||||
}
|
||||
// --> OD 2004-08-16 #i27030# - insert new <SwVirtFlyDrawObj> instance
|
||||
// into drawing page with correct order number
|
||||
else
|
||||
{
|
||||
GetFmt()->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage( 0 )->
|
||||
InsertObject( pDrawObj, _GetOrdNumForNewRef( pFly ) );
|
||||
}
|
||||
// <--
|
||||
// --> OD 2004-12-13 #i38889# - assure, that new <SwVirtFlyDrawObj> instance
|
||||
// is in a visible layer.
|
||||
MoveObjToVisibleLayer( pDrawObj );
|
||||
// <--
|
||||
return pDrawObj;
|
||||
}
|
||||
|
||||
/** method to determine new order number for new instance of <SwVirtFlyDrawObj>
|
||||
|
||||
OD 2004-08-16 #i27030#
|
||||
Used in method <CreateNewRef(..)>
|
||||
|
||||
@author OD
|
||||
*/
|
||||
sal_uInt32 SwFlyDrawContact::_GetOrdNumForNewRef( const SwFlyFrm* _pFlyFrm )
|
||||
{
|
||||
sal_uInt32 nOrdNum( 0L );
|
||||
|
||||
// search for another Writer fly frame registered at same frame format
|
||||
SwClientIter aIter( *GetFmt() );
|
||||
const SwFlyFrm* pFlyFrm( 0L );
|
||||
for ( pFlyFrm = (SwFlyFrm*)aIter.First( TYPE(SwFlyFrm) );
|
||||
pFlyFrm;
|
||||
pFlyFrm = (SwFlyFrm*)aIter.Next() )
|
||||
{
|
||||
if ( pFlyFrm != _pFlyFrm )
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if ( pFlyFrm )
|
||||
{
|
||||
// another Writer fly frame found. Take its order number
|
||||
nOrdNum = pFlyFrm->GetVirtDrawObj()->GetOrdNum();
|
||||
}
|
||||
else
|
||||
{
|
||||
// no other Writer fly frame found. Take order number of 'master' object
|
||||
// --> OD 2004-11-11 #i35748# - use method <GetOrdNumDirect()> instead
|
||||
// of method <GetOrdNum()> to avoid a recalculation of the order number,
|
||||
// which isn't intended.
|
||||
nOrdNum = GetMaster()->GetOrdNumDirect();
|
||||
// <--
|
||||
}
|
||||
|
||||
return nOrdNum;
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|*
|
||||
|* SwFlyDrawContact::Modify()
|
||||
|
@ -634,7 +553,7 @@ sal_uInt32 SwFlyDrawContact::_GetOrdNumForNewRef( const SwFlyFrm* _pFlyFrm )
|
|||
|*
|
||||
|*************************************************************************/
|
||||
|
||||
void SwFlyDrawContact::Modify( SfxPoolItem *, SfxPoolItem * )
|
||||
void SwFlyDrawContact::Modify( const SfxPoolItem*, const SfxPoolItem * )
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -716,17 +635,10 @@ void SwFlyDrawContact::MoveObjToInvisibleLayer( SdrObject* _pDrawObj )
|
|||
|
||||
@author
|
||||
*/
|
||||
void SwFlyDrawContact::GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const
|
||||
void SwFlyDrawContact::GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const
|
||||
{
|
||||
const SwFrmFmt* pFmt = GetFmt();
|
||||
|
||||
SwClientIter aIter( *(const_cast<SwFrmFmt*>(pFmt)) );
|
||||
for( SwFlyFrm* pFlyFrm = (SwFlyFrm*)aIter.First( TYPE(SwFlyFrm) );
|
||||
pFlyFrm;
|
||||
pFlyFrm = (SwFlyFrm*)aIter.Next() )
|
||||
{
|
||||
_roAnchoredObjs.push_back( pFlyFrm );
|
||||
}
|
||||
SwFlyFrm::GetAnchoredObjects( _roAnchoredObjs, *pFmt );
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -769,7 +681,7 @@ SwDrawContact::SwDrawContact( SwFrmFmt* pToRegisterIn, SdrObject* pObj ) :
|
|||
meEventTypeOfCurrentUserCall( SDRUSERCALL_MOVEONLY )
|
||||
// <--
|
||||
{
|
||||
// clear vector containing 'virtual' drawing objects.
|
||||
// clear list containing 'virtual' drawing objects.
|
||||
maDrawVirtObjs.clear();
|
||||
|
||||
// --> OD 2004-09-22 #i33909# - assure, that drawing object is inserted
|
||||
|
@ -818,6 +730,45 @@ SwDrawContact::~SwDrawContact()
|
|||
}
|
||||
}
|
||||
|
||||
void SwDrawContact::GetTextObjectsFromFmt( std::list<SdrTextObj*>& rTextObjects, SwDoc* pDoc )
|
||||
{
|
||||
for( sal_Int32 n=0; n<pDoc->GetSpzFrmFmts()->Count(); n++ )
|
||||
{
|
||||
SwFrmFmt* pFly = (*pDoc->GetSpzFrmFmts())[n];
|
||||
if( pFly->IsA( TYPE(SwDrawFrmFmt) ) )
|
||||
{
|
||||
std::list<SdrTextObj*> aTextObjs;
|
||||
SwDrawContact* pContact = SwIterator<SwDrawContact,SwFrmFmt>::FirstElement(*pFly);
|
||||
if( pContact )
|
||||
{
|
||||
SdrObject* pSdrO = pContact->GetMaster();
|
||||
if ( pSdrO )
|
||||
{
|
||||
if ( pSdrO->IsA( TYPE(SdrObjGroup) ) )
|
||||
{
|
||||
SdrObjListIter aListIter( *pSdrO, IM_DEEPNOGROUPS );
|
||||
//iterate inside of a grouped object
|
||||
while( aListIter.IsMore() )
|
||||
{
|
||||
SdrObject* pSdrOElement = aListIter.Next();
|
||||
if( pSdrOElement && pSdrOElement->IsA( TYPE(SdrTextObj) ) &&
|
||||
static_cast<SdrTextObj*>( pSdrOElement)->HasText() )
|
||||
{
|
||||
rTextObjects.push_back((SdrTextObj*) pSdrOElement);
|
||||
}
|
||||
}
|
||||
}
|
||||
else if( pSdrO->IsA( TYPE(SdrTextObj) ) &&
|
||||
static_cast<SdrTextObj*>( pSdrO )->HasText() )
|
||||
{
|
||||
rTextObjects.push_back((SdrTextObj*) pSdrO);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// OD 2004-03-29 #i26791#
|
||||
const SwAnchoredObject* SwDrawContact::GetAnchoredObj( const SdrObject* _pSdrObj ) const
|
||||
{
|
||||
|
@ -1405,7 +1356,7 @@ void SwDrawContact::_Changed( const SdrObject& rObj,
|
|||
{
|
||||
if(::CheckControlLayer(maAnchoredDrawObj.DrawObj()))
|
||||
{
|
||||
const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(pRegisteredIn)->getIDocumentDrawModelAccess();
|
||||
const IDocumentDrawModelAccess* pIDDMA = static_cast<SwFrmFmt*>(GetRegisteredInNonConst())->getIDocumentDrawModelAccess();
|
||||
const SdrLayerID aCurrentLayer(maAnchoredDrawObj.DrawObj()->GetLayer());
|
||||
const SdrLayerID aControlLayerID(pIDDMA->GetControlsId());
|
||||
const SdrLayerID aInvisibleControlLayerID(pIDDMA->GetInvisibleControlsId());
|
||||
|
@ -1621,7 +1572,7 @@ namespace
|
|||
|*
|
||||
|*************************************************************************/
|
||||
|
||||
void SwDrawContact::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
|
||||
void SwDrawContact::Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew )
|
||||
{
|
||||
// OD 10.10.2003 #112299#
|
||||
ASSERT( !mbDisconnectInProgress,
|
||||
|
@ -1834,7 +1785,7 @@ void SwDrawContact::DisconnectFromLayout( bool _bMoveMasterToInvisibleLayer )
|
|||
// drawing page, move the 'master' drawing object into the corresponding
|
||||
// invisible layer.
|
||||
{
|
||||
//((SwFrmFmt*)pRegisteredIn)->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage(0)->
|
||||
//((SwFrmFmt*)GetRegisteredIn())->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage(0)->
|
||||
// RemoveObject( GetMaster()->GetOrdNum() );
|
||||
// OD 21.08.2003 #i18447# - in order to consider group object correct
|
||||
// use new method <SwDrawContact::MoveObjToInvisibleLayer(..)>
|
||||
|
@ -1855,7 +1806,7 @@ void SwDrawContact::RemoveMasterFromDrawPage()
|
|||
GetMaster()->SetUserCall( 0 );
|
||||
if ( GetMaster()->IsInserted() )
|
||||
{
|
||||
((SwFrmFmt*)pRegisteredIn)->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage(0)->
|
||||
((SwFrmFmt*)GetRegisteredIn())->getIDocumentDrawModelAccess()->GetDrawModel()->GetPage(0)->
|
||||
RemoveObject( GetMaster()->GetOrdNum() );
|
||||
}
|
||||
}
|
||||
|
@ -1947,7 +1898,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
|
|||
}
|
||||
// <--
|
||||
|
||||
SwFrmFmt* pDrawFrmFmt = (SwFrmFmt*)pRegisteredIn;
|
||||
SwFrmFmt* pDrawFrmFmt = (SwFrmFmt*)GetRegisteredIn();
|
||||
|
||||
if( !pDrawFrmFmt->getIDocumentLayoutAccess()->GetCurrentViewShell() )
|
||||
return;
|
||||
|
@ -2009,8 +1960,7 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
|
|||
{
|
||||
SwNodeIndex aIdx( pAnch->GetCntntAnchor()->nNode );
|
||||
SwCntntNode* pCNd = pDrawFrmFmt->GetDoc()->GetNodes().GoNext( &aIdx );
|
||||
SwClientIter aIter( *pCNd );
|
||||
if ( aIter.First( TYPE(SwFrm) ) )
|
||||
if ( SwIterator<SwFrm,SwCntntNode>::FirstElement( *pCNd ) )
|
||||
pModify = pCNd;
|
||||
else
|
||||
{
|
||||
|
@ -2042,11 +1992,9 @@ void SwDrawContact::ConnectToLayout( const SwFmtAnchor* pAnch )
|
|||
pModify = pAnch->GetCntntAnchor()->nNode.GetNode().GetCntntNode();
|
||||
}
|
||||
}
|
||||
SwClientIter aIter( *pModify );
|
||||
SwIterator<SwFrm,SwModify> aIter( *pModify );
|
||||
SwFrm* pAnchorFrmOfMaster = 0;
|
||||
for( SwFrm *pFrm = (SwFrm*)aIter.First( TYPE(SwFrm) );
|
||||
pFrm;
|
||||
pFrm = (SwFrm*)aIter.Next() )
|
||||
for( SwFrm *pFrm = aIter.First(); pFrm; pFrm = aIter.Next() )
|
||||
{
|
||||
// append drawing object, if
|
||||
// (1) proposed anchor frame isn't a follow and
|
||||
|
@ -2216,7 +2164,7 @@ void SwDrawContact::ChangeMasterObject( SdrObject *pNewMaster )
|
|||
|
||||
@author
|
||||
*/
|
||||
void SwDrawContact::GetAnchoredObjs( std::vector<SwAnchoredObject*>& _roAnchoredObjs ) const
|
||||
void SwDrawContact::GetAnchoredObjs( std::list<SwAnchoredObject*>& _roAnchoredObjs ) const
|
||||
{
|
||||
_roAnchoredObjs.push_back( const_cast<SwAnchoredDrawObject*>(&maAnchoredDrawObj) );
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue