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.
This commit is contained in:
@@ -1898,7 +1898,6 @@ void SwDoc::ClearSwLayouterEntries()
|
||||
{
|
||||
SwLayouter::ClearMovedFwdFrms( *this );
|
||||
SwLayouter::ClearObjsTmpConsiderWrapInfluence( *this );
|
||||
SwLayouter::ClearFrmsNotToWrap( *this );
|
||||
// #i65250#
|
||||
SwLayouter::ClearMoveBwdLayoutInfo( *this );
|
||||
}
|
||||
|
@@ -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,
|
||||
|
@@ -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 )
|
||||
{
|
||||
|
@@ -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 );
|
||||
|
@@ -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;
|
||||
|
||||
|
Reference in New Issue
Block a user