sw/source/core/doc/doc.cxx                      |    1 
 sw/source/core/inc/layouter.hxx                 |    9 ----
 sw/source/core/layout/layouter.cxx              |   48 ------------------------
 sw/source/core/layout/objectformattertxtfrm.cxx |    6 ---
 sw/source/core/text/txtfly.cxx                  |    3 -
 5 files changed, 1 insertion(+), 66 deletions(-)

New commits:
commit b4b8f6966d5c2d308874f6213e68ecc620e92777
Author: Cédric Bosdonnat <cedric.bosdonnat....@free.fr>
Date:   Thu Mar 22 14:52:37 2012 +0100

    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.
    
    (cherry picked from commit 8a233f17ae589b33e3b54ef9ebb1fcff41ef6cd7)
    
    Signed-off-by: Miklos Vajna <vmik...@suse.cz>

diff --git a/sw/source/core/doc/doc.cxx b/sw/source/core/doc/doc.cxx
index d07ef90..5a2f44c 100644
--- a/sw/source/core/doc/doc.cxx
+++ b/sw/source/core/doc/doc.cxx
@@ -1822,7 +1822,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 135263e..4350b95 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 3105bce..5ed1712 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 3ceb54a..c1d8eb8 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 8eb06ca..f5cfed7 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1384,8 +1384,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;
 
_______________________________________________
Libreoffice-commits mailing list
Libreoffice-commits@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to