summaryrefslogtreecommitdiff
path: root/sw/source/core/layout/objectformattertxtfrm.cxx
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2006-07-26 07:17:23 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2006-07-26 07:17:23 +0000
commitfbb43c31023d0930dd315c9a482ec69bf4fdbb6b (patch)
tree7582a3d5dface450fc2b34dbd391f06c42b228d0 /sw/source/core/layout/objectformattertxtfrm.cxx
parent6a5a06f50c1b8224ffa3bd540efa48dccb2c5664 (diff)
INTEGRATION: CWS swqbf75 (1.18.18); FILE MERGED
2006/07/24 11:50:11 od 1.18.18.1: #b6449874# - adjust consideration of anchored objects, whose wrapping style influence is temporarly considered, for formatting of anchor frame for checking move forward condition.
Diffstat (limited to 'sw/source/core/layout/objectformattertxtfrm.cxx')
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx60
1 files changed, 49 insertions, 11 deletions
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 355631a589ad..b47300dcac59 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -4,9 +4,9 @@
*
* $RCSfile: objectformattertxtfrm.cxx,v $
*
- * $Revision: 1.18 $
+ * $Revision: 1.19 $
*
- * last change: $Author: obo $ $Date: 2006-07-10 15:16:52 $
+ * last change: $Author: rt $ $Date: 2006-07-26 08:17:23 $
*
* The Contents of this file are made available subject to
* the terms of GNU Lesser General Public License Version 2.1.
@@ -216,15 +216,17 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
// wrapping style influence is temporarly considered.
// --> OD 2005-01-10 #i40147# - consider also anchored objects, for
// whose the check of a moved forward anchor frame is requested.
+ // --> OD 2006-07-24 #b6449874# - revise decision made for i3317:
+ // anchored objects, whose wrapping style influence is temporarly considered,
+ // have to be considered in method <SwObjectFormatterTxtFrm::DoFormatObjs()>
if ( bSuccess &&
- ( ( _rAnchoredObj.ConsiderObjWrapInfluenceOnObjPos() &&
- ( _bCheckForMovedFwd ||
- _rAnchoredObj.GetFrmFmt().GetWrapInfluenceOnObjPos().
- // --> OD 2004-10-18 #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
- GetWrapInfluenceOnObjPos( true ) ==
- // --> OD 2004-10-18 #i35017# - constant name has changed
- text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) ) ||
- _rAnchoredObj.IsTmpConsiderWrapInfluence() ) )
+ _rAnchoredObj.ConsiderObjWrapInfluenceOnObjPos() &&
+ ( _bCheckForMovedFwd ||
+ _rAnchoredObj.GetFrmFmt().GetWrapInfluenceOnObjPos().
+ // --> OD 2004-10-18 #i35017# - handle ITERATIVE as ONCE_SUCCESSIVE
+ GetWrapInfluenceOnObjPos( true ) ==
+ // --> OD 2004-10-18 #i35017# - constant name has changed
+ text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ) )
// <--
{
// --> OD 2004-10-11 #i26945# - check conditions for move forward of
@@ -401,7 +403,14 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
bSuccess = _FormatObjsAtFrm();
}
- if ( bSuccess && ConsiderWrapOnObjPos() )
+ // --> OD 2006-07-24 #b449874#
+ // consider anchored objects, whose wrapping style influence are temporarly
+ // considered.
+ if ( bSuccess &&
+ ( ConsiderWrapOnObjPos() ||
+ ( !mrAnchorTxtFrm.IsFollow() &&
+ _AtLeastOneObjIsTmpConsiderWrapInfluence() ) ) )
+ // <--
{
const bool bDoesAnchorHadPrev = ( mrAnchorTxtFrm.GetIndPrev() != 0 );
@@ -861,3 +870,32 @@ void SwObjectFormatterTxtFrm::_FormatAnchorFrmForCheckMoveFwd()
SwObjectFormatterTxtFrm::FormatAnchorFrmAndItsPrevs( mrAnchorTxtFrm );
}
+/** method to determine if at least one anchored object has state
+ <temporarly consider wrapping style influence> set.
+
+ OD 2006-07-24 #b6449874#
+
+ @author OD
+*/
+bool SwObjectFormatterTxtFrm::_AtLeastOneObjIsTmpConsiderWrapInfluence()
+{
+ bool bRet( false );
+
+ const SwSortedObjs* pObjs = GetAnchorFrm().GetDrawObjs();
+ if ( pObjs && pObjs->Count() > 1 )
+ {
+ sal_uInt32 i = 0;
+ for ( ; i < pObjs->Count(); ++i )
+ {
+ SwAnchoredObject* pAnchoredObj = (*pObjs)[i];
+ if ( pAnchoredObj->ConsiderObjWrapInfluenceOnObjPos() )
+ {
+ bRet = true;
+ break;
+ }
+ }
+ }
+
+ return bRet;
+}
+