summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuboš Luňák <l.lunak@suse.cz>2011-07-19 13:53:46 +0200
committerLuboš Luňák <l.lunak@suse.cz>2011-07-19 13:57:04 +0200
commit51dae8c127e4d9d3d864947f239ceec6bebd0ae8 (patch)
treecd14c66563a6dce9ab508cd003dd54a813fc2355
parent0e00fc23b54bc1f93bb531a18f7e23ada5ee429b (diff)
make text wrapping work in headers/footers too (fdo#39155)
There does not seem to be a reason for avoiding this in headers, with this change the behavior either stays the same or improves.
-rw-r--r--sw/source/core/text/txtfly.cxx11
1 files changed, 3 insertions, 8 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 513c2d5aa4..a90086733a 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1380,14 +1380,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
const SwSortedObjs *pSorted = pPage->GetSortedObjs();
const sal_uInt32 nCount = pSorted ? pSorted->Count() : 0;
- // --> #108724# Page header/footer content doesn't have to wrap around
- // floating screen objects
- const bool bFooterHeader = 0 != pCurrFrm->FindFooterOrHeader();
- 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 );
+ const sal_Bool bWrapAllowed = !SwLayouter::FrmNotToWrap( *pCurrFrm->GetTxtNode()->getIDocumentLayoutAccess(), *pCurrFrm );
bOn = sal_False;
@@ -1399,6 +1392,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
// #i28701# - consider complete frame area for new
// text wrapping
SwRect aRect;
+ const IDocumentSettingAccess* pIDSA = pCurrFrm->GetTxtNode()->getIDocumentSettingAccess();
if ( pIDSA->get(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING) )
{
aRect = pCurrFrm->Prt();
@@ -1414,6 +1408,7 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
const long nRight = (aRect.*fnRect->fnGetRight)() - 1;
const long nLeft = (aRect.*fnRect->fnGetLeft)() + 1;
const sal_Bool bR2L = pCurrFrm->IsRightToLeft();
+ const bool bFooterHeader = ( pCurrFrm->FindFooterOrHeader() != NULL );
const IDocumentDrawModelAccess* pIDDMA = pCurrFrm->GetTxtNode()->getIDocumentDrawModelAccess();