summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCédric Bosdonnat <cedric.bosdonnat.ooo@free.fr>2012-03-22 14:27:43 +0100
committerCaolán McNamara <caolanm@redhat.com>2012-03-22 14:43:00 +0000
commit347bb1634b10eba577742fe8a7edb4b2dd69265d (patch)
tree8756694c262c69aea178d9607f0503ce3da232d7
parent3ca642e58251ffbb8fc30f85ae29cc75d97e4802 (diff)
Revert "make text wrapping work in headers/footers too (fdo#39155)"
This reverts commit e2a8fb0427e6b33a0fd3873bb7e077a6e5da8ebb. This is a feature, not a bug and would cause loads of documents to be badly rendered. Link to the spec that brough that feature: http://www.openoffice.org/specs/writer/compatibility/adjust-text-wrapping.sxw Conflicts: sw/source/core/text/txtfly.cxx (cherry picked from commit 2a4e77a6f94d35919237b9db9de184e70943fc13) Conflicts: sw/source/core/text/txtfly.cxx
-rw-r--r--sw/source/core/text/txtfly.cxx11
1 files changed, 8 insertions, 3 deletions
diff --git a/sw/source/core/text/txtfly.cxx b/sw/source/core/text/txtfly.cxx
index 7a7ddf5bf8b2..8eb06ca6a619 100644
--- a/sw/source/core/text/txtfly.cxx
+++ b/sw/source/core/text/txtfly.cxx
@@ -1378,7 +1378,14 @@ SwAnchoredObjList* SwTxtFly::InitAnchoredObjList()
const SwSortedObjs *pSorted = pPage->GetSortedObjs();
const sal_uInt32 nCount = pSorted ? pSorted->Count() : 0;
- const sal_Bool bWrapAllowed = !SwLayouter::FrmNotToWrap( *pCurrFrm->GetTxtNode()->getIDocumentLayoutAccess(), *pCurrFrm );
+ // --> #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 );
bOn = sal_False;
@@ -1390,7 +1397,6 @@ 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();
@@ -1406,7 +1412,6 @@ 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();