incubator-ooo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r1327190 - in /incubator/ooo/branches/alg/aw080/main: svx/inc/svx/ svx/source/svdraw/ sw/inc/ sw/source/core/attr/ sw/source/core/doc/ sw/source/core/docnode/ sw/source/core/edit/ sw/source/core/fields/ sw/source/core/frmedt/ sw/source/core...
Date Tue, 17 Apr 2012 17:23:57 GMT
Author: alg
Date: Tue Apr 17 17:23:56 2012
New Revision: 1327190

URL: http://svn.apache.org/viewvc?rev=1327190&view=rev
Log:
aw080: stabilizing sw, sd and sc, changes to svx.

Modified:
    incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx
    incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdcrtv.cxx
    incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdobj.cxx
    incubator/ooo/branches/alg/aw080/main/sw/inc/calbck.hxx
    incubator/ooo/branches/alg/aw080/main/sw/inc/switerator.hxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/calbck.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/format.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/doc.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docdesc.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docedt.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfld.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfmt.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/section.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/swbaslnk.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/edit/edfld.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/fields/ddefld.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/frmedt/fews.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/atrfrm.cxx
    incubator/ooo/branches/alg/aw080/main/sw/source/core/undo/undraw.cxx

Modified: incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/inc/svx/svdobj.hxx Tue Apr 17 17:23:56 2012
@@ -56,7 +56,7 @@ class SdrOutliner;
 class SdrDragStat;
 class SdrHdl;
 class SdrHdlList;
-class SdrItemPool;
+class SfxItemPool;
 class SdrModel;
 class SdrObjList;
 class SdrObject;
@@ -487,7 +487,7 @@ public:
     // DrawContact support: Methods for handling Object changes
 	void ActionChanged() const;
 
-	SdrItemPool& GetObjectItemPool() const;
+	SfxItemPool& GetObjectItemPool() const;
 
 	virtual sal_uInt32 GetObjInventor() const;
 	virtual sal_uInt16 GetObjIdentifier() const;

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdcrtv.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdcrtv.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdcrtv.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdcrtv.cxx Tue Apr 17 17:23:56
2012
@@ -381,29 +381,26 @@ void SdrCreateView::SetCurrentObj(sal_uI
 
 		mnAktInvent = nInvent;
 		mnAktIdent = nIdent;
-		SdrObject* pObj = SdrObjFactory::MakeNewObject(getSdrModelFromSdrView(), nInvent, nIdent);
-		
-		if(pObj) 
-		{
-			// Auf pers. Wunsch von Marco:
-			// Mauszeiger bei Textwerkzeug immer I-Beam. Fadenkreuz
-			// mit kleinem I-Beam erst bai MouseButtonDown
-			if(IsTextTool()) 
-			{
-				// #81944# AW: Here the correct pointer needs to be used
-				// if the default is set to vertical writing
-				maCreatePointer = POINTER_TEXT;
-			}
-			else 
-			{
-				maCreatePointer = pObj->GetCreatePointer(static_cast< SdrView& >(*this));
-			}
+        maCreatePointer = Pointer(POINTER_CROSS);
 
-			deleteSdrObjectSafeAndClearPointer( pObj );
-		} 
-		else 
+        // Auf pers. Wunsch von Marco:
+		// Mauszeiger bei Textwerkzeug immer I-Beam. Fadenkreuz
+		// mit kleinem I-Beam erst bai MouseButtonDown
+		if(IsTextTool()) 
+		{
+			// #81944# AW: Here the correct pointer needs to be used
+			// if the default is set to vertical writing
+			maCreatePointer = POINTER_TEXT;
+		}
+		else if(nIdent != sal_uInt16(OBJ_NONE)) // not for OBJ_NONE
 		{
-			maCreatePointer = Pointer(POINTER_CROSS);
+		    SdrObject* pObj = SdrObjFactory::MakeNewObject(getSdrModelFromSdrView(), nInvent, nIdent);
+		
+		    if(pObj) 
+		    {
+				maCreatePointer = pObj->GetCreatePointer(static_cast< SdrView& >(*this));
+                deleteSdrObjectSafeAndClearPointer( pObj );
+		    } 
 		}
 	}
 

Modified: incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdobj.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdobj.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdobj.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/svx/source/svdraw/svdobj.cxx Tue Apr 17 17:23:56
2012
@@ -653,9 +653,9 @@ void SdrObject::handlePageChange(SdrPage
 	// nothing to do in the default
 }
 
-SdrItemPool& SdrObject::GetObjectItemPool() const
+SfxItemPool& SdrObject::GetObjectItemPool() const
 {
-	return dynamic_cast< SdrItemPool& >(getSdrModelFromSdrObject().GetItemPool());
+	return getSdrModelFromSdrObject().GetItemPool();
 }
 
 sal_uInt32 SdrObject::GetObjInventor()   const

Modified: incubator/ooo/branches/alg/aw080/main/sw/inc/calbck.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/inc/calbck.hxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/inc/calbck.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/inc/calbck.hxx Tue Apr 17 17:23:56 2012
@@ -144,7 +144,10 @@ public:
     // 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, const
std::type_info* pType = &typeid(SwClient) );
+	void ModifyBroadcast( 
+        const SfxPoolItem *pOldValue, 
+        const SfxPoolItem *pNewValue, 
+        bool (*pIsValidSwClient)(const SwClient&) = 0);
 
     // a more universal broadcasting mechanism
 	void CallSwClientNotify( const SfxHint& rHint ) const;
@@ -202,6 +205,7 @@ protected:
 
 class SwClientIter
 {
+private:
 	friend SwClient* SwModify::Remove(SwClient *); // for pointer adjustments
 	friend void SwModify::Add(SwClient *pDepend);   // for pointer adjustments
 
@@ -220,36 +224,17 @@ class SwClientIter
     // from its SwModify
 	SwClientIter *pNxtIter;
 
-    SwClient* mpWatchClient;    // if set, SwModify::_Remove checks if this client is removed
-
-    // iterator can be limited to return only SwClient objects of a certain type
-	const std::type_info* mpSrchId;
-
 public:
     SW_DLLPUBLIC SwClientIter( const SwModify& );
 	SW_DLLPUBLIC ~SwClientIter();
 
-	const SwModify& GetModify() const { return rRoot; }
-
-	SwClient* operator++();
-	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 == pAct ? pAct : pDelNext; }
-
     // 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( const std::type_info& rType );
-	SW_DLLPUBLIC SwClient* Next();
-	SW_DLLPUBLIC SwClient* Last( const std::type_info& rType );
-	SW_DLLPUBLIC SwClient* Previous();
+	SW_DLLPUBLIC SwClient* SwClientIter_First();
+	SW_DLLPUBLIC SwClient* SwClientIter_Next();
 };
 
 #endif

Modified: incubator/ooo/branches/alg/aw080/main/sw/inc/switerator.hxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/inc/switerator.hxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/inc/switerator.hxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/inc/switerator.hxx Tue Apr 17 17:23:56 2012
@@ -29,15 +29,62 @@
 template< class TElementType, class TSource > class SwIterator 
 {
     SwClientIter aClientIter;
+
 public:
+    SwIterator( const TSource& rSrc ) 
+    :   aClientIter(rSrc) 
+    { 
+        DBG_ASSERT( 0 != dynamic_cast< const SwClient* >(&rSrc), "Incompatible
types!" ); 
+    }
+
+    TElementType* First()     
+    { 
+        SwClient* t = aClientIter.SwClientIter_First();
+        TElementType* p = dynamic_cast< TElementType* >(t);
+
+        while(!p && t)
+        {
+            t = aClientIter.SwClientIter_Next();
+            p = dynamic_cast< TElementType* >(t);
+        }
+
+        return p; 
+    }
+    
+    TElementType* Next()      
+    { 
+        SwClient* t = aClientIter.SwClientIter_Next();
+        TElementType* p = dynamic_cast< TElementType* >(t);
+
+        while(!p && t)
+        {
+            t = aClientIter.SwClientIter_Next();
+            p = dynamic_cast< TElementType* >(t);
+        }
+
+        return p; 
+    }
+
+    static TElementType* FirstElement(const TSource& rMod) 
+    { 
+        SwClientIter aIter(rMod);
+        SwClient* t = aIter.SwClientIter_First();
+        TElementType* p = dynamic_cast< TElementType* >(t);
+
+        while(!p && t)
+        {
+            t = aIter.SwClientIter_Next();
+            p = dynamic_cast< TElementType* >(t);
+        }
 
-    SwIterator( const TSource& rSrc ) : aClientIter(rSrc) { DBG_ASSERT( 0 != dynamic_cast<
const SwClient* >(&rSrc), "Incompatible types!" ); }
-    TElementType* First()     { SwClient* p = aClientIter.First(typeid(TElementType)); return
dynamic_cast<TElementType*>(p); }
-    TElementType* Last()      { SwClient* p = aClientIter.Last(typeid(TElementType)); return
dynamic_cast<TElementType*>(p); }
-    TElementType* Next()      { SwClient* p = aClientIter.Next();     return dynamic_cast<TElementType*>(p);
}
-    TElementType* Previous()  { SwClient* p = aClientIter.Previous(); return dynamic_cast<TElementType*>(p);
 }
-    static TElementType* FirstElement( const TSource& rMod ) { SwClient* p = SwClientIter(rMod).First(typeid(TElementType));
return dynamic_cast<TElementType*>(p); }
-    bool IsChanged()          { return aClientIter.IsChanged(); }
+        return p; 
+    }
+    
+    bool IsChanged()          
+    { 
+        return aClientIter.IsChanged(); 
+    }
 };
 
 #endif
+// eof

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/calbck.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/calbck.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/calbck.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/calbck.cxx Tue Apr 17 17:23:56
2012
@@ -132,11 +132,11 @@ SwModify::~SwModify()
 			// 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 = aIter.GoStart();
+			SwClient* p = aIter.SwClientIter_First();
 			while ( p )
             {
 				p->pRegisteredIn = 0;
-                p = ++aIter;
+                p = aIter.SwClientIter_Next();
             }
 		}
 		else
@@ -209,11 +209,11 @@ sal_Bool SwModify::GetInfo( SfxPoolItem&
 	if( pRoot )
 	{
 		SwClientIter aIter( *(SwModify*)this );
+		SwClient* pLast = aIter.SwClientIter_First();
 
-		SwClient* pLast = aIter.GoStart();
-		if( pLast )
+        if( pLast )
 			while( 0 != ( bRet = pLast->GetInfo( rInfo )) &&
-					0 != ( pLast = ++aIter ) )
+					0 != ( pLast = aIter.SwClientIter_Next() ) )
 				;
 	}
 
@@ -231,7 +231,7 @@ void SwModify::Add(SwClient *pDepend)
 		SwClientIter* pTmp = pClientIters;
 		while( pTmp )
 		{
-			ASSERT( &pTmp->GetModify() != pRoot, "Client added to active ClientIter" );
+			ASSERT( &pTmp->rRoot != pRoot, "Client added to active ClientIter" );
 			pTmp = pTmp->pNxtIter;
 		}
 #endif
@@ -311,12 +311,12 @@ int SwModify::GetClientCount() const
 {
     int nRet=0;
     SwClientIter aIter( *this );
-    SwClient *pLast = aIter.GoStart();
+    SwClient *pLast = aIter.SwClientIter_First();
     if( pLast )
         do
         {
             ++nRet;
-        } while( 0 != ( pLast = ++aIter ));
+        } while( 0 != ( pLast = aIter.SwClientIter_Next() ));
     return nRet;
 }
 
@@ -353,22 +353,30 @@ void SwModify::CheckCaching( const sal_u
 void SwModify::CallSwClientNotify( const SfxHint& rHint ) const
 {
     SwClientIter aIter(*this);
-    SwClient * pClient = aIter.GoStart();
+    SwClient * pClient = aIter.SwClientIter_First();
     while (pClient)
     {
         pClient->SwClientNotify( *this, rHint );
-        pClient = ++aIter;
+        pClient = aIter.SwClientIter_Next();
     }
 }
 
-void SwModify::ModifyBroadcast( const SfxPoolItem *pOldValue, const SfxPoolItem *pNewValue,
const std::type_info* pType )
+void SwModify::ModifyBroadcast( 
+    const SfxPoolItem *pOldValue, 
+    const SfxPoolItem *pNewValue, 
+    bool (*pIsValidSwClient)(const SwClient&))
 {
     SwClientIter aIter(*this);
-    SwClient * pClient = aIter.First( *pType );
+    SwClient* pClient = aIter.SwClientIter_First();
+    
     while (pClient)
     {
-        pClient->Modify( pOldValue, pNewValue );
-        pClient = aIter.Next();
+        if(!pIsValidSwClient || pIsValidSwClient(*pClient))
+        {
+            pClient->Modify( pOldValue, pNewValue );
+        }
+    
+        pClient = aIter.SwClientIter_Next();
     }
 }
 
@@ -426,8 +434,6 @@ SwClientIter::SwClientIter( const SwModi
 	pDelNext = pAct;
 }
 
-
-
 SwClientIter::~SwClientIter()
 {
 	if( pClientIters )
@@ -449,20 +455,7 @@ SwClientIter::~SwClientIter()
 	}
 }
 
-
-SwClient* SwClientIter::operator++()
-{
-	if( pDelNext == pAct )
-	{
-		pAct = pAct->pRight;
-		pDelNext = pAct;
-	}
-	else
-		pAct = pDelNext;
-	return pAct;
-}
-
-SwClient* SwClientIter::GoStart()
+SwClient* SwClientIter::SwClientIter_First()
 {
 	pAct = const_cast<SwClient*>(rRoot.GetDepends());
 	if( pAct )
@@ -472,87 +465,17 @@ SwClient* SwClientIter::GoStart()
 	return pAct;
 }
 
-SwClient* SwClientIter::GoEnd()	
-{
-	pAct = pDelNext;
-	if( !pAct )
-    	pAct = const_cast<SwClient*>(rRoot.GetDepends());
-	if( pAct )
-		while( pAct->pRight )
-			pAct = pAct->pRight;
-	pDelNext = pAct;
-	return pAct;
-}
-
-SwClient* SwClientIter::First( const std::type_info& rType )
+SwClient* SwClientIter::SwClientIter_Next()
 {
-	mpSrchId = &rType;
-	GoStart();
-	if( pAct )
-		do {
-			if( pAct && typeid(*pAct) == *mpSrchId )
-				break;
-
-			if( pDelNext == pAct )
-			{
-				pAct = pAct->pRight;
-				pDelNext = pAct;
-			}
-			else
-				pAct = pDelNext;
-
-		} while( pAct );
-	return pAct;
-}
-
-SwClient* SwClientIter::Next()
-{
-	do {
-		if( pDelNext == pAct )
-		{
-			pAct = pAct->pRight;
-			pDelNext = pAct;
-		}
-		else
-			pAct = pDelNext;
-
-		if( pAct && mpSrchId && typeid(*pAct) == *mpSrchId )
-			break;
-	} while( pAct );
-	return pAct;
-}
-
-SwClient* SwClientIter::Last( const std::type_info& rType )
-{
-	mpSrchId = &rType;
-	GoEnd();
-	if( pAct )
-		do {
-			if( pAct && typeid(*pAct) == *mpSrchId )
-				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( pDelNext == pAct )
+	{
+		pAct = pAct->pRight;
+		pDelNext = pAct;
+	}
+	else
+		pAct = pDelNext;
 
-		if( pAct && typeid(*pAct) == *mpSrchId )
-			break;
-	} while( pAct );
 	return pAct;
 }
 
+// eof

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/format.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/format.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/format.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/attr/format.cxx Tue Apr 17 17:23:56
2012
@@ -276,6 +276,10 @@ SwFmt::~SwFmt()
 |*    Letzte Aenderung  JP 05.08.94
 *************************************************************************/
 
+namespace
+{
+    bool ImpCheck(const SwClient& rClient) { return 0 != dynamic_cast< const SwFmt*
>(&rClient); }
+}
 
 void SwFmt::Modify( const SfxPoolItem* pOldValue, const SfxPoolItem* pNewValue )
 {
@@ -350,7 +354,7 @@ void SwFmt::Modify( const SfxPoolItem* p
             // 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, &typeid(SwFmt) );
+            ModifyBroadcast( pOldValue, pNewValue, &ImpCheck);
 			bWeiter = sal_False;
 		}
 		break;

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/doc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/doc.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/doc.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/doc.cxx Tue Apr 17 17:23:56 2012
@@ -2362,11 +2362,21 @@ bool SwDoc::RemoveInvisibleContent()
   -----------------------------------------------------------------------*/
 bool SwDoc::HasInvisibleContent() const
 {
-    sal_Bool bRet = sal_False;
-
+    bool bRet(false);
     SwClientIter aIter( *GetSysFldType( RES_HIDDENPARAFLD ) );
-    if( aIter.First( typeid( SwFmtFld ) ) )
-        bRet = sal_True;
+    SwClient* t = aIter.SwClientIter_First();
+    SwFmtFld* pSwFmtFld = dynamic_cast< SwFmtFld* >(t);
+
+    while(!pSwFmtFld && t)
+    {
+        t = aIter.SwClientIter_Next();
+        pSwFmtFld = dynamic_cast< SwFmtFld* >(t);
+    }
+
+    if(pSwFmtFld)
+    {
+        bRet = true;
+    }
 
     //
     // Search for any hidden paragraph (hidden text attribute)
@@ -2381,7 +2391,7 @@ bool SwDoc::HasInvisibleContent() const
                 SwPaM aPam( *pTxtNd, 0, *pTxtNd, pTxtNd->GetTxt().Len() );
                 if( pTxtNd->HasHiddenCharAttribute( true ) ||  ( pTxtNd->HasHiddenCharAttribute(
false ) ) )
                 {
-                    bRet = sal_True;
+                    bRet = true;
                 }
             }
         }
@@ -2400,9 +2410,10 @@ bool SwDoc::HasInvisibleContent() const
                 continue;
             SwSection* pSect = pSectFmt->GetSection();
             if( pSect->IsHidden() )
-                bRet = sal_True;
+                bRet = true;
         }
     }
+
     return bRet;
 }
 

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docdesc.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docdesc.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docdesc.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docdesc.cxx Tue Apr 17 17:23:56
2012
@@ -192,6 +192,10 @@ void lcl_DescSetAttr( const SwFrmFmt &rS
 	rDest.SetPoolHlpFileId( rSource.GetPoolHlpFileId() );
 }
 
+namespace
+{
+    bool ImpCheck(const SwClient& rClient) { return 0 != dynamic_cast< const SwFrm*
>(&rClient); }
+}
 
 void SwDoc::ChgPageDesc( sal_uInt16 i, const SwPageDesc &rChged )
 {
@@ -411,11 +415,13 @@ void SwDoc::ChgPageDesc( sal_uInt16 i, c
 	{
 		pDesc->SetFtnInfo( rChged.GetFtnInfo() );
 		SwMsgPoolItem  aInfo( RES_PAGEDESC_FTNINFO );
-		{
-            pDesc->GetMaster().ModifyBroadcast( &aInfo, 0, &typeid(SwFrm) );
+
+        {
+            pDesc->GetMaster().ModifyBroadcast( &aInfo, 0, &ImpCheck );
 		}
-		{
-            pDesc->GetLeft().ModifyBroadcast( &aInfo, 0, &typeid(SwFrm) );
+		
+        {
+            pDesc->GetLeft().ModifyBroadcast( &aInfo, 0, &ImpCheck );
 		}
 	}
 	SetModified();

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docedt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docedt.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docedt.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docedt.cxx Tue Apr 17 17:23:56
2012
@@ -761,6 +761,11 @@ void SwDoc::SetModified(SwPaM &rPaM)
  *				  SwDoc::Overwrite()
  ************************************************************************/
 
+namespace
+{
+    bool ImpCheck(const SwClient& rClient) { return 0 != dynamic_cast< const SwCrsrShell*
>(&rClient); }
+}
+
 bool SwDoc::Overwrite( const SwPaM &rRg, const String &rStr )
 {
 	SwPosition& rPt = *(SwPosition*)rRg.GetPoint();
@@ -842,7 +847,8 @@ bool SwDoc::Overwrite( const SwPaM &rRg,
 	if( nOldAttrCnt != nNewAttrCnt )
 	{
 		SwUpdateAttr aHint( 0, 0, 0 );
-        pNode->ModifyBroadcast( 0, &aHint, &typeid( SwCrsrShell ) );
+        
+        pNode->ModifyBroadcast( 0, &aHint, &ImpCheck);
 	}
 
     if (!GetIDocumentUndoRedo().DoesUndo() &&

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfld.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfld.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfld.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfld.cxx Tue Apr 17 17:23:56
2012
@@ -524,12 +524,8 @@ void SwDoc::UpdateTblFlds( SfxPoolItem* 
 	if( pFldType )
 	{
 		SwIterator<SwFmtFld,SwFieldType> aIter( *pFldType );
-		for( SwFmtFld* pFmtFld = aIter.Last(); pFmtFld; pFmtFld = aIter.Previous() )
+		for( SwFmtFld* pFmtFld = aIter.First(); pFmtFld; pFmtFld = aIter.Next() )
         {
-                // 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() ))

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfmt.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfmt.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfmt.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/doc/docfmt.cxx Tue Apr 17 17:23:56
2012
@@ -2118,6 +2118,11 @@ void SwDoc::CopyPageDescHeaderFooterImpl
 	delete pNewItem;
 }
 
+namespace
+{
+    bool ImpCheck(const SwClient& rClient) { return 0 != dynamic_cast< const SwFrm*
>(&rClient); }
+}
+
 void SwDoc::CopyPageDesc( const SwPageDesc& rSrcDesc, SwPageDesc& rDstDesc,
 							sal_Bool bCopyPoolIds )
 {
@@ -2198,11 +2203,13 @@ void SwDoc::CopyPageDesc( const SwPageDe
 	{
 		rDstDesc.SetFtnInfo( rSrcDesc.GetFtnInfo() );
 		SwMsgPoolItem  aInfo( RES_PAGEDESC_FTNINFO );
-		{
-            rDstDesc.GetMaster().ModifyBroadcast( &aInfo, 0, &typeid(SwFrm) );
+
+        {
+            rDstDesc.GetMaster().ModifyBroadcast( &aInfo, 0, &ImpCheck);
 		}
-		{
-            rDstDesc.GetLeft().ModifyBroadcast( &aInfo, 0, &typeid(SwFrm) );
+		
+        {
+            rDstDesc.GetLeft().ModifyBroadcast( &aInfo, 0, &ImpCheck);
 		}
 	}
 }

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/section.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/section.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/section.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/section.cxx Tue Apr 17 17:23:56
2012
@@ -1028,7 +1028,7 @@ void SwSectionFmt::UpdateParent()		// Pa
     bool bIsHidden = false;
 
 	SwClientIter aIter( *this );    // TODO
-	::SwClient * pLast = aIter.GoStart();
+	::SwClient * pLast = aIter.SwClientIter_First();
 	if( pLast ) 	// konnte zum Anfang gesprungen werden ??
 		do {
 			if( dynamic_cast< SwSectionFmt* >(pLast) )
@@ -1099,7 +1099,7 @@ void SwSectionFmt::UpdateParent()		// Pa
                     bIsHidden = pSection->IsHidden();
 				}
 			}
-		} while( 0 != ( pLast = ++aIter ));
+		} while( 0 != ( pLast = aIter.SwClientIter_Next() ));
 }
 
 

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/swbaslnk.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/swbaslnk.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/swbaslnk.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/docnode/swbaslnk.cxx Tue Apr 17 17:23:56
2012
@@ -77,13 +77,13 @@ void lcl_CallModify( SwGrfNode& rGrfNd, 
 	SwClientIter aIter( rGrfNd );   // TODO
 	for( int n = 0; n < 2; ++n )
 	{
-		SwClient * pLast = aIter.GoStart();
+		SwClient * pLast = aIter.SwClientIter_First();
 		if( pLast ) 	// konnte zum Anfang gesprungen werden ??
 		{
 			do {
 				if( (0 == n) ^ ( 0 != dynamic_cast< SwCntntFrm* >(pLast)) )
 					pLast->ModifyNotification( &rItem, &rItem );
-			} while( 0 != ( pLast = ++aIter ));
+			} while( 0 != ( pLast = aIter.SwClientIter_Next() ));
 		}
 	}
 	rGrfNd.UnlockModify();

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/edit/edfld.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/edit/edfld.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/edit/edfld.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/edit/edfld.cxx Tue Apr 17 17:23:56
2012
@@ -199,7 +199,7 @@ void SwEditShell::FieldToText( SwFieldTy
 
     SwFieldHint aHint( pPaM );
 	SwClientIter aIter( *pType );
-    for ( SwClient* pClient = aIter.GoStart(); pClient; pClient = ++aIter )
+    for ( SwClient* pClient = aIter.SwClientIter_First(); pClient; pClient = aIter.SwClientIter_Next()
)
     {
         pPaM->DeleteMark();
         pClient->SwClientNotifyCall( *pType, aHint );

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/fields/ddefld.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/fields/ddefld.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/fields/ddefld.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/fields/ddefld.cxx Tue Apr 17 17:23:56
2012
@@ -119,7 +119,7 @@ void SwIntrnlRefLink::DataChanged( const
 		rFldType.LockModify();
 
 		SwClientIter aIter( rFldType );     // TODO
-		SwClient * pLast = aIter.GoStart();
+		SwClient * pLast = aIter.SwClientIter_First();
 		if( pLast ) 	// konnte zum Anfang gesprungen werden ??
 			do {
 				// eine DDE-Tabelle oder ein DDE-FeldAttribut im Text
@@ -135,7 +135,7 @@ void SwIntrnlRefLink::DataChanged( const
 					pLast->ModifyNotification( 0, &aUpdateDDE );
 					bCallModify = sal_True;
 				}
-			} while( 0 != ( pLast = ++aIter ));
+			} while( 0 != ( pLast = aIter.SwClientIter_Next() ));
 
 		rFldType.UnlockModify();
 
@@ -180,7 +180,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor
 	// hier sollte irgend ein Anchor aus dem normalen Nodes-Array reichen
 	const SwNode* pNd = 0;
 	SwClientIter aIter( rFldType );     // TODO
-	SwClient * pLast = aIter.GoStart();
+	SwClient * pLast = aIter.SwClientIter_First();
 	if( pLast ) 	// konnte zum Anfang gesprungen werden ??
 		do {
 			// eine DDE-Tabelle oder ein DDE-FeldAttribut im Text
@@ -196,7 +196,7 @@ const SwNode* SwIntrnlRefLink::GetAnchor
 			if( pNd && &rFldType.GetDoc()->GetNodes() == &pNd->GetNodes() )
 				break;
 			pNd = 0;
-		} while( 0 != ( pLast = ++aIter ));
+		} while( 0 != ( pLast = aIter.SwClientIter_Next() ));
 
 	return pNd;
 }
@@ -207,7 +207,7 @@ sal_Bool SwIntrnlRefLink::IsInRange( sal
 	// hier sollte irgend ein Anchor aus dem normalen Nodes-Array reichen
 	SwNodes* pNds = &rFldType.GetDoc()->GetNodes();
 	SwClientIter aIter( rFldType );         // TODO
-	SwClient * pLast = aIter.GoStart();
+	SwClient * pLast = aIter.SwClientIter_First();
 	if( pLast ) 	// konnte zum Anfang gesprungen werden ??
 		do {
 			// eine DDE-Tabelle oder ein DDE-FeldAttribut im Text
@@ -235,7 +235,7 @@ sal_Bool SwIntrnlRefLink::IsInRange( sal
 						return sal_True;
 				}
 			}
-		} while( 0 != ( pLast = ++aIter ));
+		} while( 0 != ( pLast = aIter.SwClientIter_Next() ));
 
 	return sal_False;
 }

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/frmedt/fews.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/frmedt/fews.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/frmedt/fews.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/frmedt/fews.cxx Tue Apr 17 17:23:56
2012
@@ -1331,13 +1331,12 @@ sal_Bool SwFEShell::IsFrmVertical(const 
     {
 	    SdrObject* pObj = Imp()->GetDrawView()->getSelectedIfSingle();
 
-        // --> OD 2006-01-06 #123831# - make code robust:
+        // only continue if a single and only a single object is selected
         if ( !pObj )
         {
-            ASSERT( false,
-                    "<SwFEShell::IsFrmVertical(..)> - missing SdrObject instance in
marked object list -> This is a serious situation, please inform OD" );
             return bVert;
         }
+
         // <--
         // OD 2004-03-29 #i26791#
         SwContact* pContact = static_cast<SwContact*>(findConnectionToSdrObject( pObj
));

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/atrfrm.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/atrfrm.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/atrfrm.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/layout/atrfrm.cxx Tue Apr 17 17:23:56
2012
@@ -175,12 +175,12 @@ void DelHFFormat( SwClient *pToRemove, S
 		// Klammer, weil im DTOR SwClientIter das Flag bTreeChg zurueck
 		// gesetzt wird. Unguenstig, wenn das Format vorher zerstoert wird.
 		SwClientIter aIter( *pFmt );        // TODO
-		SwClient *pLast = aIter.GoStart();
+		SwClient *pLast = aIter.SwClientIter_First();
 		if( pLast )
 			do {
                 bDel = dynamic_cast< SwFrm* >(pLast)
                     || SwXHeadFootText::IsXHeadFootText(pLast);
-			} while( bDel && 0 != ( pLast = ++aIter ));
+			} while( bDel && 0 != ( pLast = aIter.SwClientIter_Next() ));
 	}
 
 	if ( bDel )

Modified: incubator/ooo/branches/alg/aw080/main/sw/source/core/undo/undraw.cxx
URL: http://svn.apache.org/viewvc/incubator/ooo/branches/alg/aw080/main/sw/source/core/undo/undraw.cxx?rev=1327190&r1=1327189&r2=1327190&view=diff
==============================================================================
--- incubator/ooo/branches/alg/aw080/main/sw/source/core/undo/undraw.cxx (original)
+++ incubator/ooo/branches/alg/aw080/main/sw/source/core/undo/undraw.cxx Tue Apr 17 17:23:56
2012
@@ -89,7 +89,9 @@ IMPL_LINK( SwDoc, AddDrawUndo, SdrUndoAc
 }
 
 SwSdrUndo::SwSdrUndo( SdrUndoAction* pUndo, const SdrObjectVector& rSelectedSdrObjectVector
)
-	: SwUndo( UNDO_DRAWUNDO ), maSelectedSdrObjectVector(rSelectedSdrObjectVector)
+:   SwUndo(UNDO_DRAWUNDO), 
+    pSdrUndo(pUndo),
+    maSelectedSdrObjectVector(rSelectedSdrObjectVector)
 {
 }
 



Mime
View raw message