summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/inc/IDocumentLayoutAccess.hxx1
-rw-r--r--sw/inc/calbck.hxx36
-rw-r--r--sw/inc/doc.hxx2
-rw-r--r--sw/inc/fmtfld.hxx3
-rw-r--r--sw/inc/fmtpdsc.hxx4
-rw-r--r--sw/inc/ftninfo.hxx5
-rw-r--r--sw/inc/ndtxt.hxx8
-rw-r--r--sw/inc/numrule.hxx3
-rw-r--r--sw/inc/section.hxx1
-rw-r--r--sw/inc/swcrsr.hxx6
-rw-r--r--sw/inc/swddetbl.hxx3
-rw-r--r--sw/inc/txtinet.hxx3
-rw-r--r--sw/inc/unocrsr.hxx7
-rw-r--r--sw/source/core/attr/calbck.cxx15
-rw-r--r--sw/source/core/crsr/unocrsr.cxx8
-rw-r--r--sw/source/core/doc/doc.cxx4
-rw-r--r--sw/source/core/doc/docdesc.cxx62
-rw-r--r--sw/source/core/doc/docftn.cxx17
-rw-r--r--sw/source/core/doc/doclay.cxx6
-rw-r--r--sw/source/core/docnode/ndsect.cxx4
-rw-r--r--sw/source/core/docnode/section.cxx5
-rw-r--r--sw/source/core/docnode/swbaslnk.cxx33
-rw-r--r--sw/source/core/edit/edfld.cxx48
-rw-r--r--sw/source/core/fields/ddetbl.cxx10
-rw-r--r--sw/source/core/inc/attrhint.hxx44
-rw-r--r--sw/source/core/inc/bookmrk.hxx1
-rw-r--r--sw/source/core/inc/fieldhint.hxx44
-rw-r--r--sw/source/core/inc/pagedeschint.hxx46
-rw-r--r--sw/source/core/inc/prevwpage.hxx27
-rw-r--r--sw/source/core/inc/sectfrm.hxx2
-rw-r--r--sw/source/core/layout/atrfrm.cxx44
-rw-r--r--sw/source/core/layout/sectfrm.cxx10
-rw-r--r--sw/source/core/txtnode/atrfld.cxx25
-rw-r--r--sw/source/core/txtnode/ndtxt.cxx22
-rw-r--r--sw/source/core/unocore/unosett.cxx4
-rw-r--r--sw/source/ui/fldui/fldmgr.cxx4
36 files changed, 330 insertions, 237 deletions
diff --git a/sw/inc/IDocumentLayoutAccess.hxx b/sw/inc/IDocumentLayoutAccess.hxx
index 3dd0d67aaaba..ee04ec055f1a 100644
--- a/sw/inc/IDocumentLayoutAccess.hxx
+++ b/sw/inc/IDocumentLayoutAccess.hxx
@@ -49,6 +49,7 @@ public:
virtual ViewShell* GetCurrentViewShell() = 0; //swmod 071107//swmod 071225
virtual const SwRootFrm* GetCurrentLayout() const = 0;
virtual SwRootFrm* GetCurrentLayout() = 0; //swmod 080218
+ virtual bool HasLayout() const = 0;
/** !!!The old layout must be deleted!!!
*/
diff --git a/sw/inc/calbck.hxx b/sw/inc/calbck.hxx
index 1f0b33f63acc..6b4eecc3c059 100644
--- a/sw/inc/calbck.hxx
+++ b/sw/inc/calbck.hxx
@@ -30,10 +30,12 @@
#include <tools/rtti.hxx>
#include "swdllapi.h"
+#include <boost/noncopyable.hpp>
class SwModify;
class SwClientIter;
class SfxPoolItem;
+class SfxHint;
/*
SwModify and SwClient cooperate in propagating attribute changes.
@@ -66,7 +68,7 @@ class SfxPoolItem;
// SwClient
// ----------
-class SW_DLLPUBLIC SwClient
+class SW_DLLPUBLIC SwClient : ::boost::noncopyable
{
// avoids making the details of the linked list and the callback method public
friend class SwModify;
@@ -84,7 +86,7 @@ class SW_DLLPUBLIC SwClient
// 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 );
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
protected:
// single argument ctors shall be explicit.
@@ -105,7 +107,8 @@ public:
// 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 );
+ void ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue ) { Modify ( pOldValue, pNewValue ); }
+ void SwClientNotifyCall( const SwModify& rModify, const SfxHint& rHint ) { SwClientNotify( rModify, rHint ); }
const SwModify* GetRegisteredIn() const { return pRegisteredIn; }
bool IsLast() const { return !pLeft && !pRight; }
@@ -115,11 +118,6 @@ public:
// get information about attribute
virtual BOOL GetInfo( SfxPoolItem& ) const;
-
-private:
- // forbidden and not implemented
- SwClient( const SwClient& );
- SwClient &operator=( const SwClient& );
};
inline SwClient::SwClient() :
@@ -155,8 +153,8 @@ public:
// 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 );
+ // a more universal broadcasting mechanism
+ void CallSwClientNotify( const SfxHint& rHint ) const;
// single argument ctors shall be explicit.
explicit SwModify( SwModify *pToRegisterIn );
@@ -184,18 +182,6 @@ public:
bool IsLastDepend() { return pRoot && pRoot->IsLast(); }
int GetClientCount() const;
-
-private:
- // forbidden and not implemented
- SwModify & operator= (const SwModify &);
-
-#ifdef GCC
-protected:
- // GCC >= 3.4 needs an accessible "T (const T&)"
- // to pass a "T" as a "const T&" argument
- // it does not require an implementation though
-#endif
- SwModify (const SwModify &);
};
// ----------
@@ -219,11 +205,7 @@ public:
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNewValue );
-
-private:
- // forbidden and not implemented
- SwDepend (const SwDepend &);
- SwDepend & operator= (const SwDepend &);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
};
diff --git a/sw/inc/doc.hxx b/sw/inc/doc.hxx
index aa39873e867a..fecafe104dbf 100644
--- a/sw/inc/doc.hxx
+++ b/sw/inc/doc.hxx
@@ -1007,6 +1007,8 @@ public:
virtual ViewShell *GetCurrentViewShell();//swmod 080219 It must be able to communicate to a ViewShell.This is going to be removerd later.
virtual const SwRootFrm *GetCurrentLayout() const;
virtual SwRootFrm *GetCurrentLayout();//swmod 080219
+ virtual bool HasLayout() const;
+
/** IDocumentTimerAccess
*/
virtual void StartIdling();
diff --git a/sw/inc/fmtfld.hxx b/sw/inc/fmtfld.hxx
index 1f8be0e88f12..52777e0b8022 100644
--- a/sw/inc/fmtfld.hxx
+++ b/sw/inc/fmtfld.hxx
@@ -56,7 +56,8 @@ class SW_DLLPUBLIC SwFmtFld : public SfxPoolItem, public SwClient, public SfxBro
SwFmtFld& operator=(const SwFmtFld& rFld);
protected:
- virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
+ virtual void SwClientNotify( const SwModify& rModify, const SfxHint& rHint );
public:
TYPEINFO();
diff --git a/sw/inc/fmtpdsc.hxx b/sw/inc/fmtpdsc.hxx
index 7f23e7cd7e2f..67aa49e4acca 100644
--- a/sw/inc/fmtpdsc.hxx
+++ b/sw/inc/fmtpdsc.hxx
@@ -57,7 +57,8 @@ class SW_DLLPUBLIC SwFmtPageDesc : public SfxPoolItem, public SwClient
SwModify* pDefinedIn; // Verweis auf das Objekt, in dem das
// Attribut gesetzt wurde (CntntNode/Format)
protected:
- virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+ virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& rHint );
public:
SwFmtPageDesc( const SwPageDesc *pDesc = 0 );
@@ -90,7 +91,6 @@ public:
void RegisterToEndNotInfo( SwEndNoteInfo& );
void RegisterToPageDesc( SwPageDesc& );
bool KnowsPageDesc() const;
- bool IsRegisteredAt( SwEndNoteInfo* pInfo ) const;
};
diff --git a/sw/inc/ftninfo.hxx b/sw/inc/ftninfo.hxx
index 6bf1f073aa3d..064dce11bb7e 100644
--- a/sw/inc/ftninfo.hxx
+++ b/sw/inc/ftninfo.hxx
@@ -52,8 +52,9 @@ public:
USHORT nFtnOffset;
void ChgPageDesc( SwPageDesc *pDesc );
- SwPageDesc *GetPageDesc( SwDoc &rDoc ) const;
- SwClient *GetPageDescDep() const { return (SwClient*)&aPageDescDep; }
+ SwPageDesc* GetPageDesc( SwDoc &rDoc ) const;
+ bool KnowsPageDesc() const;
+ bool DependsOn( const SwPageDesc* ) const;
void SetFtnTxtColl(SwTxtFmtColl& rColl);
SwTxtFmtColl* GetFtnTxtColl() const { return (SwTxtFmtColl*) GetRegisteredIn(); } // kann 0 sein
diff --git a/sw/inc/ndtxt.hxx b/sw/inc/ndtxt.hxx
index 3fa98364e177..bcc7c48e19ab 100644
--- a/sw/inc/ndtxt.hxx
+++ b/sw/inc/ndtxt.hxx
@@ -44,15 +44,11 @@
#include <vector>
#include <set>
-
+class SfxHint;
class SwNumRule;
class SwNodeNum;
-// --> OD 2008-05-06 #refactorlists#
class SwList;
-// <--
-// --> OD 2008-12-02 #i96772#
class SvxLRSpaceItem;
-// <--
namespace utl {
class TransliterationWrapper;
@@ -231,7 +227,7 @@ public:
protected:
// fuers Umhaengen der TxtFmtCollections (Outline-Nummerierung!!)
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
- virtual void SwClientNotify( SwModify* pModify, USHORT nWhich );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
public:
using SwCntntNode::GetAttr;
diff --git a/sw/inc/numrule.hxx b/sw/inc/numrule.hxx
index 99460b60b6be..c98f02823480 100644
--- a/sw/inc/numrule.hxx
+++ b/sw/inc/numrule.hxx
@@ -165,9 +165,6 @@ private:
String msDefaultListId;
// <--
- // forbidden and not implemented.
- SwNumRule();
-
public:
// --> OD 2008-02-08 #newlistlevelattrs#
// add parameter <eDefaultNumberFormatPositionAndSpaceMode>
diff --git a/sw/inc/section.hxx b/sw/inc/section.hxx
index f6b083dec54a..47a42dfc851d 100644
--- a/sw/inc/section.hxx
+++ b/sw/inc/section.hxx
@@ -161,7 +161,6 @@ public:
class SW_DLLPUBLIC SwSection
: public SwClient
- , private ::boost::noncopyable
{
// damit beim Anlegen/Loeschen von Frames das Flag richtig gepflegt wird!
friend class SwSectionNode;
diff --git a/sw/inc/swcrsr.hxx b/sw/inc/swcrsr.hxx
index f81f2e263b82..362763fff220 100644
--- a/sw/inc/swcrsr.hxx
+++ b/sw/inc/swcrsr.hxx
@@ -95,11 +95,7 @@ public:
// @@@ semantic: no copy ctor.
SwCursor( SwCursor& rCpy);
-private:
- // forbidden and not implemented.
- //SwCursor( const SwCursor& );
- // @@@ used e.g. in core/frmedt/fetab.cxx @@@
- // SwCursor & operator= ( const SwCursor& );
+
public:
virtual SwCursor* Create( SwPaM* pRing = 0 ) const;
diff --git a/sw/inc/swddetbl.hxx b/sw/inc/swddetbl.hxx
index 93d7fe578a1e..aea1c3671d03 100644
--- a/sw/inc/swddetbl.hxx
+++ b/sw/inc/swddetbl.hxx
@@ -48,7 +48,8 @@ public:
SwDDEFieldType* GetDDEFldType();
inline const SwDDEFieldType* GetDDEFldType() const;
protected:
- virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
};
diff --git a/sw/inc/txtinet.hxx b/sw/inc/txtinet.hxx
index bec9f403c41c..a62a9d6273d9 100644
--- a/sw/inc/txtinet.hxx
+++ b/sw/inc/txtinet.hxx
@@ -42,9 +42,6 @@ class SW_DLLPUBLIC SwTxtINetFmt : public SwTxtAttrNesting, public SwClient
bool m_bVisited : 1; // visited link?
bool m_bVisitedValid : 1; // is m_bVisited valid?
- // forbidden and not implemented.
- SwTxtINetFmt();
-
protected:
virtual void Modify( const SfxPoolItem* pOld, const SfxPoolItem *pNew);
diff --git a/sw/inc/unocrsr.hxx b/sw/inc/unocrsr.hxx
index 001f0eef3ab2..39e8ebbdce61 100644
--- a/sw/inc/unocrsr.hxx
+++ b/sw/inc/unocrsr.hxx
@@ -40,13 +40,6 @@ public:
SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing = 0 );
virtual ~SwUnoCrsr();
- // @@@ semantic: no copy ctor.
- SwUnoCrsr( SwUnoCrsr& );
-private:
- // forbidden and not implemented.
- //SwUnoCrsr( const SwUnoCrsr& );
- SwUnoCrsr & operator= ( const SwUnoCrsr& );
-
protected:
virtual const SwCntntFrm* DoSetBidiLevelLeftRight(
diff --git a/sw/source/core/attr/calbck.cxx b/sw/source/core/attr/calbck.cxx
index e12dbb94b221..b12805c9deeb 100644
--- a/sw/source/core/attr/calbck.cxx
+++ b/sw/source/core/attr/calbck.cxx
@@ -77,13 +77,9 @@ void SwClient::Modify( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValu
CheckRegistration( pOldValue, pNewValue );
}
-void SwClient::ModifyNotification( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue )
+void SwClient::SwClientNotify( const SwModify&, const SfxHint& )
{
- Modify( pOldValue, pNewValue );
-}
-void SwClient::SwClientNotify( SwModify*, USHORT )
-{
}
//*************************************************************************
@@ -363,13 +359,13 @@ void SwModify::CheckCaching( const USHORT nWhich )
}
}
-void SwModify::CallSwClientNotify( USHORT nWhich )
+void SwModify::CallSwClientNotify( const SfxHint& rHint ) const
{
SwClientIter aIter(*this);
SwClient * pClient = aIter.GoStart();
while (pClient)
{
- pClient->SwClientNotify( this, nWhich );
+ pClient->SwClientNotify( *this, rHint );
pClient = aIter++;
}
}
@@ -407,6 +403,11 @@ void SwDepend::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem *pNewValu
pToTell->ModifyNotification(pOldValue, pNewValue);
}
+void SwDepend::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
+{
+ if ( pToTell )
+ pToTell->SwClientNotifyCall( rMod, rHint );
+}
BOOL SwDepend::GetInfo( SfxPoolItem& rInfo ) const
{
diff --git a/sw/source/core/crsr/unocrsr.cxx b/sw/source/core/crsr/unocrsr.cxx
index 065855acb49d..be83af562584 100644
--- a/sw/source/core/crsr/unocrsr.cxx
+++ b/sw/source/core/crsr/unocrsr.cxx
@@ -47,14 +47,6 @@ SwUnoCrsr::SwUnoCrsr( const SwPosition &rPos, SwPaM* pRing )
{}
-// @@@ semantic: no copy ctor.
-SwUnoCrsr::SwUnoCrsr( SwUnoCrsr& rICrsr )
- : SwCursor( rICrsr ), SwModify( 0 ),
- bRemainInSection( rICrsr.bRemainInSection ),
- bSkipOverHiddenSections( rICrsr.bSkipOverHiddenSections ),
- bSkipOverProtectSections( rICrsr.bSkipOverProtectSections )
-{}
-
SwUnoCrsr::~SwUnoCrsr()
{
SwDoc* pDoc = GetDoc();
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index c7aabee9c99f..17a53483d9b6 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -114,7 +114,7 @@
#include <viewsh.hxx>
#include <shellres.hxx>
#include <txtfrm.hxx>
-
+#include <attrhint.hxx>
#include <vector>
#include <map>
@@ -2664,7 +2664,7 @@ void SwDoc::ChkCondColls()
{
SwTxtFmtColl *pColl = (*pTxtFmtCollTbl)[n];
if (RES_CONDTXTFMTCOLL == pColl->Which())
- pColl->CallSwClientNotify( RES_CONDTXTFMTCOLL );
+ pColl->CallSwClientNotify( SwAttrHint(RES_CONDTXTFMTCOLL) );
}
}
diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx
index ab7cebda7304..3f3d4630d5f8 100644
--- a/sw/source/core/doc/docdesc.cxx
+++ b/sw/source/core/doc/docdesc.cxx
@@ -70,7 +70,7 @@
#include <statstr.hrc>
#include <switerator.hxx>
#include <SwUndoPageDesc.hxx>
-
+#include <pagedeschint.hxx>
#include <tgrditem.hxx>
using namespace com::sun::star;
@@ -444,48 +444,30 @@ void SwDoc::ChgPageDesc( USHORT i, const SwPageDesc &rChged )
// #i7983#
void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
{
- SwRootFrm* pTmpRoot = GetCurrentLayout();//swmod 080219
if (0 == pDel)
return;
- SwFmtPageDesc aDfltDesc( aPageDescs[0] );
- SwClientIter aIter( *pDel ); // TODO
- SwClient* pLast;
- while( 0 != ( pLast = aIter.GoStart() ))
+ // mba: test iteration as clients are removed while iteration
+ SwPageDescHint aHint( aPageDescs[0] );
+ pDel->CallSwClientNotify( aHint );
+
+ bool bHasLayout = HasLayout();
+ if ( pFtnInfo->DependsOn( pDel ) )
{
- if( pLast->ISA( SwFmtPageDesc ) )
+ pFtnInfo->ChgPageDesc( aPageDescs[0] );
+ if ( bHasLayout )
{
- const SwModify* pMod = ((SwFmtPageDesc*)pLast)->GetDefinedIn();
- if ( pMod )
- {
- if( pMod->ISA( SwCntntNode ) )
- ((SwCntntNode*)pMod)->SetAttr( aDfltDesc );
- else if( pMod->ISA( SwFmt ))
- ((SwFmt*)pMod)->SetFmtAttr( aDfltDesc );
- else
- {
- ASSERT( !this, "was ist das fuer ein Mofify-Obj?" );
- ((SwFmtPageDesc*)pLast)->RegisterToPageDesc( *aPageDescs[0] );
- }
- }
- else //Es kann noch eine Undo-Kopie existieren
- ((SwFmtPageDesc*)pLast)->RegisterToPageDesc( *aPageDescs[0] );
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::CheckFtnPageDescs), false));
}
-
- // 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() )
+ }
+ else if ( pEndNoteInfo->DependsOn( pDel ) )
+ {
+ pEndNoteInfo->ChgPageDesc( aPageDescs[0] );
+ if ( bHasLayout )
{
- if ( bFtnInf )
- pFtnInfo->ChgPageDesc( aPageDescs[0] );
- else
- pEndNoteInfo->ChgPageDesc( aPageDescs[0] );
- if ( pTmpRoot )
- {
- std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
- std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::CheckFtnPageDescs), !bFtnInf));//swmod 080228
- }
+ std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
+ std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::bind2nd(std::mem_fun(&SwRootFrm::CheckFtnPageDescs), true));
}
}
@@ -494,17 +476,13 @@ void SwDoc::PreDelPageDesc(SwPageDesc * pDel)
if ( aPageDescs[j]->GetFollow() == pDel )
{
aPageDescs[j]->SetFollow( 0 );
- //Clients des PageDesc sind die Attribute, denen sagen wir bescheid.
- //die Attribute wiederum reichen die Meldung an die Absaetze weiter.
-
- //Layot benachrichtigen!
- if( pTmpRoot ) // ist nicht immer vorhanden!! (Orginizer)
+ if( bHasLayout )
{
std::set<SwRootFrm*> aAllLayouts = GetAllLayouts();
std::for_each( aAllLayouts.begin(), aAllLayouts.end(),std::mem_fun(&SwRootFrm::AllCheckPageDescs));//swmod 080228
+ }
}
}
- }
}
// #116530#
diff --git a/sw/source/core/doc/docftn.cxx b/sw/source/core/doc/docftn.cxx
index ee4f10f37b9c..4c905a6c4f02 100644
--- a/sw/source/core/doc/docftn.cxx
+++ b/sw/source/core/doc/docftn.cxx
@@ -106,8 +106,8 @@ SwEndNoteInfo::SwEndNoteInfo(const SwEndNoteInfo& rInfo) :
aFmt( rInfo.aFmt ),
nFtnOffset( rInfo.nFtnOffset )
{
- if( rInfo.GetPageDescDep()->GetRegisteredIn() )
- ((SwModify*)rInfo.GetPageDescDep()->GetRegisteredIn())->Add( &aPageDescDep );
+ if( rInfo.aPageDescDep.GetRegisteredIn() )
+ ((SwModify*)rInfo.aPageDescDep.GetRegisteredIn())->Add( &aPageDescDep );
if( rInfo.aCharFmtDep.GetRegisteredIn() )
((SwModify*)rInfo.aCharFmtDep.GetRegisteredIn())->Add( &aCharFmtDep );
@@ -136,7 +136,18 @@ SwPageDesc *SwEndNoteInfo::GetPageDesc( SwDoc &rDoc ) const
m_bEndNote ? RES_POOLPAGE_ENDNOTE : RES_POOLPAGE_FOOTNOTE ) );
pDesc->Add( &((SwClient&)aPageDescDep) );
}
- return (SwPageDesc*)aPageDescDep.GetRegisteredIn();
+
+ return (SwPageDesc*)( aPageDescDep.GetRegisteredIn() );
+}
+
+bool SwEndNoteInfo::KnowsPageDesc() const
+{
+ return (aPageDescDep.GetRegisteredIn() != 0);
+}
+
+bool SwEndNoteInfo::DependsOn( const SwPageDesc* pDesc ) const
+{
+ return ( aPageDescDep.GetRegisteredIn() == pDesc );
}
void SwEndNoteInfo::ChgPageDesc( SwPageDesc *pDesc )
diff --git a/sw/source/core/doc/doclay.cxx b/sw/source/core/doc/doclay.cxx
index 0413ad1c82a0..c52a185e1dbe 100644
--- a/sw/source/core/doc/doclay.cxx
+++ b/sw/source/core/doc/doclay.cxx
@@ -2338,6 +2338,12 @@ SwRootFrm *SwDoc::GetCurrentLayout()
return 0;
}
+bool SwDoc::HasLayout() const
+{
+ // if there is a view, there is always a layout
+ return (pCurrentView != 0);
+}
+
std::set<SwRootFrm*> SwDoc::GetAllLayouts()
{
std::set<SwRootFrm*> aAllLayouts;
diff --git a/sw/source/core/docnode/ndsect.cxx b/sw/source/core/docnode/ndsect.cxx
index a14a4f61e4bc..229b8b7dc36f 100644
--- a/sw/source/core/docnode/ndsect.cxx
+++ b/sw/source/core/docnode/ndsect.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
+#include <svl/smplhint.hxx>
#include <hintids.hxx>
#include <sfx2/linkmgr.hxx>
#include <svl/itemiter.hxx>
@@ -1083,7 +1083,7 @@ SwFrm* SwClearDummies( SwFrm* pFrm )
SwSectionNode::~SwSectionNode()
{
// mba: test if iteration works as clients will be removed in callback
- m_pSection->GetFmt()->CallSwClientNotify( RES_OBJECTDYING );
+ m_pSection->GetFmt()->CallSwClientNotify( SfxSimpleHint( SFX_HINT_DYING ) );
SwDoc* pDoc = GetDoc();
diff --git a/sw/source/core/docnode/section.cxx b/sw/source/core/docnode/section.cxx
index 678a4c454f09..7479335fc535 100644
--- a/sw/source/core/docnode/section.cxx
+++ b/sw/source/core/docnode/section.cxx
@@ -66,6 +66,7 @@
#include <swerror.h>
#include <unosection.hxx>
#include <switerator.hxx>
+#include <svl/smplhint.hxx>
using namespace ::com::sun::star;
@@ -702,7 +703,7 @@ SwSectionFmt::~SwSectionFmt()
}
// mba: test iteration; objects are removed while iterating
- CallSwClientNotify( RES_OBJECTDYING );
+ CallSwClientNotify( SfxSimpleHint(SFX_HINT_DYING) );
// hebe die Section doch mal auf
SwNodeRange aRg( *pSectNd, 0, *pSectNd->EndOfSectionNode() );
@@ -732,7 +733,7 @@ void SwSectionFmt::DelFrms()
{
// #147431# : First delete the <SwSectionFrm> of the <SwSectionFmt> instance
// mba: test iteration as objects are removed in iteration
- CallSwClientNotify( RES_OBJECTDYING );
+ CallSwClientNotify( SfxSimpleHint(SFX_HINT_DYING) );
// Then delete frames of the nested <SwSectionFmt> instances
SwIterator<SwSectionFmt,SwSectionFmt> aIter( *this );
diff --git a/sw/source/core/docnode/swbaslnk.cxx b/sw/source/core/docnode/swbaslnk.cxx
index 507b5b831b79..5dc653e18e63 100644
--- a/sw/source/core/docnode/swbaslnk.cxx
+++ b/sw/source/core/docnode/swbaslnk.cxx
@@ -409,30 +409,9 @@ BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat )
}
#endif
- // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
-// TestBalloonInputStream* pTBIS = 0;
-// if(!m_xInputStreamToLoadFrom.is()) {
-// if ( !pCntntNode->IsGrfNode() ||
-// static_cast<SwGrfNode*>(pCntntNode)->GetGrfObj().GetType()
-// != GRAPHIC_DEFAULT )
-// {
-// pTBIS = new TestBalloonInputStream();
-// m_xInputStreamToLoadFrom = pTBIS;
-// }
-// }
- // <--
-
if( GetObj() )
{
- // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
-// GetObj()->setStreamToLoadFrom(m_xInputStreamToLoadFrom,m_bIsReadOnly);
- // <--
String aMimeType( SotExchange::GetFormatMimeType( GetContentType() ));
-
-//!! ??? what have we here to do ????
-//!! if( bNativFormat )
-//!! aData.SetAspect( aData.GetAspect() | ASPECT_ICON );
-
uno::Any aValue;
GetObj()->GetData( aValue, aMimeType, !IsSynchron() && bWaitForData );
@@ -460,18 +439,6 @@ BOOL SwBaseLink::SwapIn( BOOL bWaitForData, BOOL bNativFormat )
bRes = Update();
bSwapIn = FALSE;
-
- // --> OD 2005-04-11 #i46300# - deactivate fix for issues i9861 and i33293
-// if ( pTBIS && pTBIS->isTouched() )
-// {
-// // --> OD 2005-04-11 #i46300# - determine correct URL for the graphic
-// String sGrfNm;
-// GetLinkManager()->GetDisplayNames( this, 0, &sGrfNm, 0, 0 );
-// (m_pReReadThread = new ReReadThread(
-// this, sGrfNm, bWaitForData, bNativFormat))->create();
-// // <--
-// }
- // <--
return bRes;
}
diff --git a/sw/source/core/edit/edfld.cxx b/sw/source/core/edit/edfld.cxx
index ffe6ada138a8..ad6e30241aaf 100644
--- a/sw/source/core/edit/edfld.cxx
+++ b/sw/source/core/edit/edfld.cxx
@@ -46,6 +46,7 @@
#include <swddetbl.hxx>
#include <hints.hxx>
#include <switerator.hxx>
+#include <fieldhint.hxx>
/*--------------------------------------------------------------------
Beschreibung: Feldtypen zu einer ResId zaehlen
@@ -200,46 +201,13 @@ void SwEditShell::FieldToText( SwFieldType* pType )
Push();
SwPaM* pPaM = GetCrsr();
- BOOL bDDEFld = RES_DDEFLD == pType->Which();
- // Modify-Object gefunden, trage alle Felder ins Array ein
- SwClientIter aIter( *pType ); // TODO
- SwClient * pLast = aIter.GoStart();
-
- if( pLast ) // konnte zum Anfang gesprungen werden ??
- do {
- pPaM->DeleteMark();
- const SwFmtFld* pFmtFld = bDDEFld
- ? PTR_CAST( SwFmtFld, pLast )
- : (SwFmtFld*)pLast;
-
- if( pFmtFld )
- {
- if( !pFmtFld->GetTxtFld() )
- continue;
-
- // kann keine DDETabelle sein
- const SwTxtNode& rTxtNode = pFmtFld->GetTxtFld()->GetTxtNode();
- pPaM->GetPoint()->nNode = rTxtNode;
- pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode,
- *pFmtFld->GetTxtFld()->GetStart() );
-
- // Feldinhalt durch Text ersetzen
- String const aEntry(
- pFmtFld->GetFld()->ExpandField(GetDoc()->IsClipBoard()) );
- pPaM->SetMark();
- pPaM->Move( fnMoveForward );
- GetDoc()->DeleteRange( *pPaM );
- GetDoc()->InsertString( *pPaM, aEntry );
- }
- else if( bDDEFld )
- {
- // DDETabelle
- SwDepend* pDep = (SwDepend*)pLast;
- SwDDETable* pDDETbl = (SwDDETable*)pDep->GetToTell();
- pDDETbl->NoDDETable();
- }
-
- } while( 0 != ( pLast = aIter++ ));
+ SwFieldHint aHint( pPaM );
+ SwClientIter aIter( *pType );
+ for ( SwClient* pClient = aIter.GoStart(); pClient; aIter++ )
+ {
+ pPaM->DeleteMark();
+ pClient->SwClientNotifyCall( *pType, aHint );
+ }
Pop( FALSE );
EndAllAction();
diff --git a/sw/source/core/fields/ddetbl.cxx b/sw/source/core/fields/ddetbl.cxx
index f7764ed2ebca..fb9bdaaaaeb5 100644
--- a/sw/source/core/fields/ddetbl.cxx
+++ b/sw/source/core/fields/ddetbl.cxx
@@ -39,7 +39,7 @@
#include <ndindex.hxx>
#include <fldupde.hxx>
#include <swtblfmt.hxx>
-
+#include <fieldhint.hxx>
TYPEINIT1( SwDDETable, SwTable );
@@ -101,6 +101,14 @@ void SwDDETable::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
SwTable::Modify( pOld, pNew );
}
+void SwDDETable::SwClientNotify( const SwModify&, const SfxHint& rHint )
+{
+ const SwFieldHint* pHint = dynamic_cast<const SwFieldHint*>( &rHint );
+ if ( pHint )
+ // replace DDETable by real table
+ NoDDETable();
+}
+
void SwDDETable::ChangeContent()
{
ASSERT( GetFrmFmt(), "Kein FrameFormat" );
diff --git a/sw/source/core/inc/attrhint.hxx b/sw/source/core/inc/attrhint.hxx
new file mode 100644
index 000000000000..da2ed160b9c4
--- /dev/null
+++ b/sw/source/core/inc/attrhint.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * 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 _ATTRHINT_HXX
+#define _ATTRHINT_HXX
+
+#include <svl/hint.hxx>
+
+class SwAttrHint : public SfxHint
+{
+ sal_Int32 nId;
+public:
+ SwAttrHint( sal_Int32 n )
+ : nId(n)
+ {}
+
+ sal_Int32 GetId() const { return nId; }
+};
+
+#endif
diff --git a/sw/source/core/inc/bookmrk.hxx b/sw/source/core/inc/bookmrk.hxx
index e51ae5139881..9b8a0d7c3876 100644
--- a/sw/source/core/inc/bookmrk.hxx
+++ b/sw/source/core/inc/bookmrk.hxx
@@ -50,7 +50,6 @@ namespace sw { namespace mark
{
class MarkBase
: virtual public IMark
- , private ::boost::noncopyable
{
public:
//getters
diff --git a/sw/source/core/inc/fieldhint.hxx b/sw/source/core/inc/fieldhint.hxx
new file mode 100644
index 000000000000..82955be53bc8
--- /dev/null
+++ b/sw/source/core/inc/fieldhint.hxx
@@ -0,0 +1,44 @@
+/*************************************************************************
+ *
+ * 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 _FIELDHINT_HXX
+#define _FIELDHINT_HXX
+
+#include <svl/hint.hxx>
+
+class SwFieldHint : public SfxHint
+{
+ SwPaM* pPaM;
+public:
+ SwFieldHint( SwPaM* p )
+ : pPaM(p)
+ {}
+
+ SwPaM* GetPaM() const { return pPaM; }
+};
+
+#endif
diff --git a/sw/source/core/inc/pagedeschint.hxx b/sw/source/core/inc/pagedeschint.hxx
new file mode 100644
index 000000000000..b18ed39e3315
--- /dev/null
+++ b/sw/source/core/inc/pagedeschint.hxx
@@ -0,0 +1,46 @@
+/*************************************************************************
+ *
+ * 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 _PAGEDESCHINT_HXX
+#define _PAGEDESCHINT_HXX
+
+#include <svl/hint.hxx>
+
+class SwPageDesc;
+
+class SwPageDescHint : public SfxHint
+{
+ SwPageDesc* pPageDesc;
+public:
+ SwPageDescHint( SwPageDesc* p )
+ : pPageDesc(p)
+ {}
+
+ SwPageDesc* GetPageDesc() const { return const_cast<SwPageDesc*>(pPageDesc); }
+};
+
+#endif
diff --git a/sw/source/core/inc/prevwpage.hxx b/sw/source/core/inc/prevwpage.hxx
index 517f4494b44f..5e9e0d752a4f 100644
--- a/sw/source/core/inc/prevwpage.hxx
+++ b/sw/source/core/inc/prevwpage.hxx
@@ -1,3 +1,30 @@
+/*************************************************************************
+ *
+ * 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 _PREVIEWPAGES_HXX
#define _PREVIEWPAGES_HXX
diff --git a/sw/source/core/inc/sectfrm.hxx b/sw/source/core/inc/sectfrm.hxx
index 0c09ca46612b..b4ecb4a9f733 100644
--- a/sw/source/core/inc/sectfrm.hxx
+++ b/sw/source/core/inc/sectfrm.hxx
@@ -60,7 +60,7 @@ protected:
virtual BOOL ShouldBwdMoved( SwLayoutFrm *pNewUpper, BOOL bHead, BOOL &rReformat );
virtual void Format( const SwBorderAttrs *pAttrs = 0 );
virtual void Modify( const SfxPoolItem*, const SfxPoolItem* );
- virtual void SwClientNotify( SwModify* pModify, USHORT nWhich );
+ virtual void SwClientNotify( const SwModify&, const SfxHint& );
public:
SwSectionFrm( SwSection &, SwFrm* ); //Inhalt wird nicht erzeugt!
diff --git a/sw/source/core/layout/atrfrm.cxx b/sw/source/core/layout/atrfrm.cxx
index 1a2e63545034..ac9467ab66c2 100644
--- a/sw/source/core/layout/atrfrm.cxx
+++ b/sw/source/core/layout/atrfrm.cxx
@@ -108,7 +108,7 @@
#include <HandleAnchorNodeChg.hxx>
#include <svl/cjkoptions.hxx>
#include <switerator.hxx>
-#include <ftninfo.hxx>
+#include <pagedeschint.hxx>
using namespace ::com::sun::star;
using ::rtl::OUString;
@@ -653,21 +653,11 @@ SwFmtPageDesc::SwFmtPageDesc( const SwPageDesc *pDesc )
SwFmtPageDesc::~SwFmtPageDesc() {}
-void SwFmtPageDesc::RegisterToPageDesc( SwPageDesc& rFmt )
-{
- rFmt.Add(this);
-}
-
bool SwFmtPageDesc::KnowsPageDesc() const
{
return (GetRegisteredIn() != 0);
}
-bool SwFmtPageDesc::IsRegisteredAt( SwEndNoteInfo* pInfo ) const
-{
- return (pInfo->GetPageDescDep() == this);
-}
-
int SwFmtPageDesc::operator==( const SfxPoolItem& rAttr ) const
{
ASSERT( SfxPoolItem::operator==( rAttr ), "keine gleichen Attribute" );
@@ -681,6 +671,38 @@ SfxPoolItem* SwFmtPageDesc::Clone( SfxItemPool* ) const
return new SwFmtPageDesc( *this );
}
+void SwFmtPageDesc::SwClientNotify( const SwModify&, const SfxHint& rHint )
+{
+ const SwPageDescHint* pHint = dynamic_cast<const SwPageDescHint*>(&rHint);
+ if ( pHint )
+ {
+ // mba: shouldn't that be broadcasted also?
+ SwFmtPageDesc aDfltDesc( pHint->GetPageDesc() );
+ SwPageDesc* pDesc = pHint->GetPageDesc();
+ const SwModify* pMod = GetDefinedIn();
+ if ( pMod )
+ {
+ if( pMod->ISA( SwCntntNode ) )
+ ((SwCntntNode*)pMod)->SetAttr( aDfltDesc );
+ else if( pMod->ISA( SwFmt ))
+ ((SwFmt*)pMod)->SetFmtAttr( aDfltDesc );
+ else
+ {
+ DBG_ERROR( "What kind of SwModify is this?" );
+ RegisterToPageDesc( *pDesc );
+ }
+ }
+ else
+ // there could be an Undo-copy
+ RegisterToPageDesc( *pDesc );
+ }
+}
+
+void SwFmtPageDesc::RegisterToPageDesc( SwPageDesc& rDesc )
+{
+ rDesc.Add( this );
+}
+
void SwFmtPageDesc::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
if( !pDefinedIn )
diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx
index 32aed8691795..d5ccc299be9f 100644
--- a/sw/source/core/layout/sectfrm.cxx
+++ b/sw/source/core/layout/sectfrm.cxx
@@ -28,7 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
-
+#include <svl/smplhint.hxx>
#include <svl/itemiter.hxx>
#include <hints.hxx>
#include <txtftn.hxx>
@@ -2477,13 +2477,15 @@ void SwSectionFrm::Modify( const SfxPoolItem* pOld, const SfxPoolItem * pNew )
}
}
-void SwSectionFrm::SwClientNotify( SwModify*, USHORT nWhich )
+void SwSectionFrm::SwClientNotify( const SwModify& rMod, const SfxHint& rHint )
{
- if ( nWhich == RES_OBJECTDYING )
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING && &rMod == GetRegisteredIn() )
+ {
SwSectionFrm::MoveCntntAndDelete( this, TRUE );
+ }
}
-
void SwSectionFrm::_UpdateAttr( const SfxPoolItem *pOld, const SfxPoolItem *pNew,
BYTE &rInvFlags,
SwAttrSetChg *pOldSet, SwAttrSetChg *pNewSet )
diff --git a/sw/source/core/txtnode/atrfld.cxx b/sw/source/core/txtnode/atrfld.cxx
index 8d4721ff23ff..79bf770b4e16 100644
--- a/sw/source/core/txtnode/atrfld.cxx
+++ b/sw/source/core/txtnode/atrfld.cxx
@@ -43,7 +43,7 @@
#include "calc.hxx" // Update fuer UserFields
#include "hints.hxx"
#include <IDocumentFieldsAccess.hxx>
-
+#include <fieldhint.hxx>
#include <svl/smplhint.hxx>
TYPEINIT3( SwFmtFld, SfxPoolItem, SwClient,SfxBroadcaster)
@@ -159,6 +159,29 @@ SfxPoolItem* SwFmtFld::Clone( SfxItemPool* ) const
return new SwFmtFld( *this );
}
+void SwFmtFld::SwClientNotify( const SwModify&, const SfxHint& rHint )
+{
+ if( !pTxtAttr )
+ return;
+
+ const SwFieldHint* pHint = dynamic_cast<const SwFieldHint*>( &rHint );
+ if ( pHint )
+ {
+ // replace field content by text
+ SwPaM* pPaM = pHint->GetPaM();
+ SwDoc* pDoc = pPaM->GetDoc();
+ const SwTxtNode& rTxtNode = pTxtAttr->GetTxtNode();
+ pPaM->GetPoint()->nNode = rTxtNode;
+ pPaM->GetPoint()->nContent.Assign( (SwTxtNode*)&rTxtNode, *pTxtAttr->GetStart() );
+
+ String const aEntry( GetFld()->ExpandField( pDoc->IsClipBoard() ) );
+ pPaM->SetMark();
+ pPaM->Move( fnMoveForward );
+ pDoc->DeleteRange( *pPaM );
+ pDoc->InsertString( *pPaM, aEntry );
+ }
+}
+
void SwFmtFld::Modify( const SfxPoolItem* pOld, const SfxPoolItem* pNew )
{
if( !pTxtAttr )
diff --git a/sw/source/core/txtnode/ndtxt.cxx b/sw/source/core/txtnode/ndtxt.cxx
index 6109aaa7364e..8dc7febc9314 100644
--- a/sw/source/core/txtnode/ndtxt.cxx
+++ b/sw/source/core/txtnode/ndtxt.cxx
@@ -92,6 +92,7 @@
#include <svl/intitem.hxx>
#include <list.hxx>
#include <switerator.hxx>
+#include <attrhint.hxx>
SV_DECL_PTRARR( TmpHints, SwTxtAttr*, 0, 4 )
@@ -123,21 +124,7 @@ SwTxtNode *SwNodes::MakeTxtNode( const SwNodeIndex & rWhere,
// --> OD 2005-11-03 #125329#
// call method <UpdateOutlineNode(..)> only for the document nodes array
if ( IsDocNodes() )
- {
- //if ( pColl && NO_NUMBERING != pColl->GetOutlineLevel() ) //#outline level,removed by zhaojianwei
- //{
- // UpdateOutlineNode( *pNode, NO_NUMBERING, pColl->GetOutlineLevel() );
- //}
-// if ( pColl && 0 != pColl->GetAttrOutlineLevel() )//#outline level,added by zhaojianwei
-// {
-// UpdateOutlineNode( *pNode, 0, pColl->GetAttrOutlineLevel() );
-// }//<--end
-// else
- {
- UpdateOutlineNode(*pNode);
- }
- }
- // <--
+ UpdateOutlineNode(*pNode);
//Wenn es noch kein Layout gibt oder in einer versteckten Section
// stehen, brauchen wir uns um das MakeFrms nicht bemuehen.
@@ -5062,9 +5049,10 @@ bool SwTxtNode::IsInContent() const
return !GetDoc()->IsInHeaderFooter( SwNodeIndex(*this) );
}
-void SwTxtNode::SwClientNotify( SwModify* pModify, USHORT nWhich )
+void SwTxtNode::SwClientNotify( const SwModify& rModify, const SfxHint& rHint )
{
- if ( nWhich == RES_CONDTXTFMTCOLL && pModify == GetRegisteredIn() )
+ const SwAttrHint* pHint = dynamic_cast<const SwAttrHint*>(&rHint);
+ if ( pHint && pHint->GetId() == RES_CONDTXTFMTCOLL && &rModify == GetRegisteredIn() )
ChkCondColl();
}
diff --git a/sw/source/core/unocore/unosett.cxx b/sw/source/core/unocore/unosett.cxx
index 25f40e4900e5..e72e48b4ade5 100644
--- a/sw/source/core/unocore/unosett.cxx
+++ b/sw/source/core/unocore/unosett.cxx
@@ -537,7 +537,7 @@ uno::Any SwXFootnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_PAGE_STYLE :
{
String aString;
- if( rFtnInfo.GetPageDescDep()->GetRegisteredIn() )
+ if( rFtnInfo.KnowsPageDesc() )
{
SwStyleNameMapper::FillProgName(
rFtnInfo.GetPageDesc( *pDoc )->GetName(),
@@ -809,7 +809,7 @@ uno::Any SwXEndnoteProperties::getPropertyValue(const OUString& rPropertyName)
case WID_PAGE_STYLE :
{
String aString;
- if( rEndInfo.GetPageDescDep()->GetRegisteredIn() )
+ if( rEndInfo.KnowsPageDesc() )
{
SwStyleNameMapper::FillProgName(
rEndInfo.GetPageDesc( *pDoc )->GetName(),
diff --git a/sw/source/ui/fldui/fldmgr.cxx b/sw/source/ui/fldui/fldmgr.cxx
index 4bec5c07e8a7..00949e605f65 100644
--- a/sw/source/ui/fldui/fldmgr.cxx
+++ b/sw/source/ui/fldui/fldmgr.cxx
@@ -1034,8 +1034,8 @@ BOOL SwFldMgr::InsertFld( const SwInsertFld_Data& rData )
USHORT nTmpPos = sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator );
sCmd.SearchAndReplace( ' ', sfx2::cTokenSeperator, nTmpPos );
- SwDDEFieldType* pTyp = (SwDDEFieldType*)pCurShell->InsertFldType(
- SwDDEFieldType( rData.sPar1, sCmd, (USHORT)nFormatId ));
+ SwDDEFieldType aTyp( rData.sPar1, sCmd, (USHORT)nFormatId );
+ SwDDEFieldType* pTyp = (SwDDEFieldType*)pCurShell->InsertFldType( aTyp );
pFld = new SwDDEField( pTyp );
break;
}