summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-03-22 14:52:37 +0100
committerCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-03-22 15:10:51 +0100
commit8a233f17ae589b33e3b54ef9ebb1fcff41ef6cd7 (patch)
tree29c5ac065ba34fbd5ce5efff53a97d40300c9101 /sw
parent2a4e77a6f94d35919237b9db9de184e70943fc13 (diff)
n#750258: removed strange non-wrapping condition
In the bug file, some text wrapping was badly computed when showing the document (but not at the first rendering) due to that weird NotToWrap mecahnism in SwLayouter. Checked the original issue i#40155 that removing this does hurt.
Diffstat (limited to 'sw')
-rw-r--r--sw/source/core/doc/doc.cxx1
-rw-r--r--sw/source/core/inc/layouter.hxx9
-rw-r--r--sw/source/core/layout/layouter.cxx48
-rw-r--r--sw/source/core/layout/objectformattertxtfrm.cxx6
-rw-r--r--sw/source/core/text/txtfly.cxx3
5 files changed, 1 insertions, 66 deletions
diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index 64f14f481ada..47614733ca24 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1898,7 +1898,6 @@ void SwDoc::ClearSwLayouterEntries()
{
SwLayouter::ClearMovedFwdFrms( *this );
SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this );
- SwLayouter::ClearFrmsNotToWrap( *this );
// #i65250#
SwLayouter::ClearMoveBwdLayoutInfo( *this );
}
diff --git a/sw/source/core/inc/layouter.hxx b/sw/source/core/inc/layouter.hxx
index 135263e809b3..4350b95a8a8a 100644
--- a/sw/source/core/inc/layouter.hxx
+++ b/sw/source/core/inc/layouter.hxx
@@ -68,9 +68,6 @@ class SwLayouter
SwMovedFwdFrmsByObjPos* mpMovedFwdFrms;
// --> #i35911#
SwObjsMarkedAsTmpConsiderWrapInfluence* mpObjsTmpConsiderWrapInfl;
- // --> #i40155# - data structure to collect frames, which are
- // marked not to wrap around objects.
- std::vector< const SwFrm* > maFrmsNotToWrap;
public:
// --> #i65250#
@@ -148,12 +145,6 @@ public:
static void InsertObjForTmpConsiderWrapInfluence(
const SwDoc& _rDoc,
SwAnchoredObject& _rAnchoredObj );
- // --> #i40155#
- static void ClearFrmsNotToWrap( const SwDoc& _rDoc );
- static void InsertFrmNotToWrap( const SwDoc& _rDoc,
- const SwFrm& _rFrm );
- static bool FrmNotToWrap( const IDocumentLayoutAccess& _rIDLA,
- const SwFrm& _rFrm );
// --> #i65250#
static bool MoveBwdSuppressed( const SwDoc& p_rDoc,
const SwFlowFrm& p_rFlowFrm,
diff --git a/sw/source/core/layout/layouter.cxx b/sw/source/core/layout/layouter.cxx
index 344b388c0656..aa2ac4644b60 100644
--- a/sw/source/core/layout/layouter.cxx
+++ b/sw/source/core/layout/layouter.cxx
@@ -440,54 +440,6 @@ void SwLayouter::InsertObjForTmpConsiderWrapInfluence(
_rDoc.GetLayouter()->mpObjsTmpConsiderWrapInfl->Insert( _rAnchoredObj );
}
-// #i40155#
-void SwLayouter::ClearFrmsNotToWrap( const SwDoc& _rDoc )
-{
- if ( _rDoc.GetLayouter() )
- {
- const_cast<SwDoc&>(_rDoc).GetLayouter()->maFrmsNotToWrap.clear();
- }
-}
-
-void SwLayouter::InsertFrmNotToWrap( const SwDoc& _rDoc,
- const SwFrm& _rFrm )
-{
- if ( !_rDoc.GetLayouter() )
- {
- const_cast<SwDoc&>(_rDoc).SetLayouter( new SwLayouter() );
- }
-
- if ( !SwLayouter::FrmNotToWrap( _rDoc, _rFrm ) )
- {
- const_cast<SwDoc&>(_rDoc).GetLayouter()->maFrmsNotToWrap.push_back( &_rFrm );
- }
-}
-
-bool SwLayouter::FrmNotToWrap( const IDocumentLayoutAccess& _rDLA,
- const SwFrm& _rFrm )
-{
- const SwLayouter* pLayouter = _rDLA.GetLayouter();
- if ( !pLayouter )
- {
- return false;
- }
- else
- {
- bool bFrmNotToWrap( false );
- std::vector< const SwFrm* >::const_iterator aIter =
- pLayouter->maFrmsNotToWrap.begin();
- for ( ; aIter != pLayouter->maFrmsNotToWrap.end(); ++aIter )
- {
- const SwFrm* pFrm = *(aIter);
- if ( pFrm == &_rFrm )
- {
- bFrmNotToWrap = true;
- break;
- }
- }
- return bFrmNotToWrap;
- }
-}
void LOOPING_LOUIE_LIGHT( bool bCondition, const SwTxtFrm& rTxtFrm )
{
diff --git a/sw/source/core/layout/objectformattertxtfrm.cxx b/sw/source/core/layout/objectformattertxtfrm.cxx
index 3ceb54abb5fc..c1d8eb844b91 100644
--- a/sw/source/core/layout/objectformattertxtfrm.cxx
+++ b/sw/source/core/layout/objectformattertxtfrm.cxx
@@ -296,9 +296,6 @@ bool SwObjectFormatterTxtFrm::DoFormatObj( SwAnchoredObject& _rAnchoredObj,
mrAnchorTxtFrm.GetFollow() &&
mrAnchorTxtFrm.GetFollow()->GetOfst() == 0 )
{
- SwLayouter::InsertFrmNotToWrap(
- *(mrAnchorTxtFrm.FindPageFrm()->GetFmt()->GetDoc()),
- mrAnchorTxtFrm );
SwLayouter::RemoveMovedFwdFrm(
*(mrAnchorTxtFrm.FindPageFrm()->GetFmt()->GetDoc()),
mrAnchorTxtFrm );
@@ -467,9 +464,6 @@ bool SwObjectFormatterTxtFrm::DoFormatObjs()
mrAnchorTxtFrm.GetFollow() &&
mrAnchorTxtFrm.GetFollow()->GetOfst() == 0 )
{
- SwLayouter::InsertFrmNotToWrap(
- *(mrAnchorTxtFrm.FindPageFrm()->GetFmt()->GetDoc()),
- mrAnchorTxtFrm );
SwLayouter::RemoveMovedFwdFrm(
*(mrAnchorTxtFrm.FindPageFrm()->GetFmt()->GetDoc()),
mrAnchorTxtFrm );
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index dfe499619b4b..8e255ebb4a59 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -892,8 +892,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTxtNode()->getIDocumentSettingAccess();
// #i40155# - check, if frame is marked not to wrap
const sal_Bool bWrapAllowed = ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) ||
- ( !pCurrFrm->IsInFtn() && !bFooterHeader ) ) &&
- !SwLayouter::FrmNotToWrap( *pCurrFrm->GetTxtNode()->getIDocumentLayoutAccess(), *pCurrFrm );
+ ( !pCurrFrm->IsInFtn() && !bFooterHeader ) );
bOn = sal_False;