Bugzilla – Attachment 147870 Details for
Bug 50068
Incorrect spacing above paragraph on second column of section
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
0001-tdf-50068-partial-fix-sw-spacing-in-text-not-section.patch
0001-tdf-50068-partial-fix-sw-spacing-in-text-not-section.patch (text/plain), 3.23 KB, created by
Justin L
on 2018-12-28 09:11:29 UTC
(
hide
)
Description:
0001-tdf-50068-partial-fix-sw-spacing-in-text-not-section.patch
Filename:
MIME Type:
Creator:
Justin L
Created:
2018-12-28 09:11:29 UTC
Size:
3.23 KB
patch
obsolete
>From 31272b2fec455da9b8a6acbe6696bf8668a5dbee Mon Sep 17 00:00:00 2001 >From: Justin Luth <justin_luth@sil.org> >Date: Thu, 27 Dec 2018 19:17:33 +0300 >Subject: [PATCH] tdf#50068 partial fix sw: spacing in text, not section > >It shouldn't matter whether the column break is in the first >column or the following columns in terms of whether its >upper space is calculated. > >Now, ideally, we should be checking to see if the top >of any column is a naturally new paragraph. >But how? For now, continue ignoring the upper spacing >on all non-first columns. > >The first column definitely starts a new paragraph >if there is a pagebreak, or it is the first >column in the section. > >This hideous function hasn't seen a logic update in >18 years. There is no way that I would dare to do >anything here unless assisted by a very senior >developer. > >Although this patch seems to give decent >results to the documents I tested, there likely are >hidden implications all over the place, and it will >definitely affect existing documents. And finding >the documentation that details what things ought >to look like would also be necessary, since this >patch is just based on a bug report and gut feeling. > >Change-Id: Id80e18bd259a29e841d979b4e14a5bcab8abd35e >--- > sw/source/core/layout/flowfrm.cxx | 14 ++++++++++++-- > sw/source/core/layout/sectfrm.cxx | 2 +- > 2 files changed, 13 insertions(+), 3 deletions(-) > >diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx >index 2500fbc..5e780cd 100644 >--- a/sw/source/core/layout/flowfrm.cxx >+++ b/sw/source/core/layout/flowfrm.cxx >@@ -1248,8 +1248,18 @@ bool SwFlowFrame::HasParaSpaceAtPages( bool bSct ) const > return true; > if( pTmp->IsPageFrame() ) > return !pTmp->GetPrev() || IsPageBreak(true); >- if( pTmp->IsColumnFrame() && pTmp->GetPrev() ) >- return IsColBreak( true ); >+ if( pTmp->IsColumnFrame() ) >+ { >+ if ( IsColBreak(true) ) // column break in any column >+ return !bSct; >+ else if ( pTmp->GetPrev() ) // non-first columns without a column break >+ return false; >+ else if ( IsPageBreak(true) ) // page break same as column break for first column >+ return !bSct; >+ // first column in a section >+ else if ( pTmp->GetUpper() && pTmp->GetUpper()->IsSctFrame() && !static_cast<const SwSectionFrame*>(pTmp->GetUpper())->GetPrecede() ) >+ return !bSct; >+ } > if( pTmp->IsSctFrame() && ( !bSct || pTmp->GetPrev() ) ) > return false; > pTmp = pTmp->GetUpper(); >diff --git a/sw/source/core/layout/sectfrm.cxx b/sw/source/core/layout/sectfrm.cxx >index 0596f50..37b54b7 100644 >--- a/sw/source/core/layout/sectfrm.cxx >+++ b/sw/source/core/layout/sectfrm.cxx >@@ -1342,7 +1342,7 @@ void SwSectionFrame::Format( vcl::RenderContext* pRenderContext, const SwBorderA > { > PROTOCOL( this, PROT::PrintArea, DbgAction::NONE, nullptr ) > setFramePrintAreaValid(true); >- SwTwips nUpper = CalcUpperSpace(); >+ SwTwips nUpper = 0; > > // #109700# LRSpace for sections > const SvxLRSpaceItem& rLRSpace = GetFormat()->GetLRSpace(); >-- >2.7.4 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 50068
:
61770
|
114620
|
147849
|
147853
|
147869
| 147870