Bugzilla – Attachment 61466 Details for
Bug 38635
Gaps and jaggies in borders, affecting normal view and printing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
adds some assertions for debugging only
38635_sw_border_assertions.patch (text/plain), 3.52 KB, created by
Michael Stahl (allotropia)
on 2012-05-11 12:56:05 UTC
(
hide
)
Description:
adds some assertions for debugging only
Filename:
MIME Type:
Creator:
Michael Stahl (allotropia)
Created:
2012-05-11 12:56:05 UTC
Size:
3.52 KB
patch
obsolete
>fdo#38635: some assertions that the border start/end points match > >From: Michael Stahl <mstahl@redhat.com> > >This does not work in general, the assertions trigger when borders are >merged, as can easily happen for table cells. >--- > > sw/source/core/layout/paintfrm.cxx | 50 ++++++++++++++++++++++++++++++++++++ > 1 files changed, 50 insertions(+), 0 deletions(-) > > >diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx >index 0600d2e..0e5d3aa 100644 >--- a/sw/source/core/layout/paintfrm.cxx >+++ b/sw/source/core/layout/paintfrm.cxx >@@ -239,6 +239,10 @@ public: > > //----------------- End of classes for border lines ---------------------- > >+#ifdef DBG_UTIL >+static BorderLinePrimitive2D * g_pDebugLines[4] = {0,0,0,0}; >+#endif >+ > static ViewShell *pGlobalShell = 0; > > //Only repaint the Fly content as well as the background of the Fly content if >@@ -4621,6 +4625,49 @@ lcl_MakeBorderLine(SwRect const& rRect, > rBorder.GetColorGap().getBColor(), rBorder.HasGapColor(), > rBorder.GetStyle() ); > g_pBorderLines->AddBorderLine(xLine); >+#ifdef DBG_UTIL >+ size_t ix = isLeftOrTopBorderInModel ? isVerticalInModel ? 0 : 2 : isVerticalInModel ? 1 : 3; >+ g_pDebugLines[ix] = xLine.get(); >+ switch (ix) >+ { >+ case 1: >+ if (isVerticalInModel == isVertical) >+ { >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getStart().getY() == g_pDebugLines[1]->getStart().getY()); >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getEnd().getY() == g_pDebugLines[1]->getEnd().getY()); >+ } >+ else >+ { >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getStart().getX() == g_pDebugLines[1]->getStart().getX()); >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getEnd().getX() == g_pDebugLines[1]->getEnd().getX()); >+ } >+ break; >+ case 2: >+ if (isVerticalInModel == isVertical) >+ { >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getStart() == g_pDebugLines[2]->getStart()); >+ assert(!g_pDebugLines[1] || g_pDebugLines[1]->getStart() == g_pDebugLines[2]->getEnd()); >+ } >+ else >+ { >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getEnd() == g_pDebugLines[2]->getStart()); >+ assert(!g_pDebugLines[1] || g_pDebugLines[1]->getEnd() == g_pDebugLines[2]->getEnd()); >+ } >+ break; >+ case 3: >+ if (isVerticalInModel == isVertical) >+ { >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getEnd() == g_pDebugLines[3]->getStart()); >+ assert(!g_pDebugLines[1] || g_pDebugLines[1]->getEnd() == g_pDebugLines[3]->getEnd()); >+ } >+ else >+ { >+ assert(!g_pDebugLines[0] || g_pDebugLines[0]->getStart() == g_pDebugLines[3]->getStart()); >+ assert(!g_pDebugLines[1] || g_pDebugLines[1]->getStart() == g_pDebugLines[3]->getEnd()); >+ } >+ break; >+ } >+#endif > } > > // OD 19.05.2003 #109667# - merge <lcl_PaintLeftLine> and <lcl_PaintRightLine> >@@ -5095,6 +5142,9 @@ void SwFrm::PaintBorder( const SwRect& rRect, const SwPageFrm *pPage, > ::lcl_PaintTopBottomLine(sal_False, *(this), *(pPage), aRect, rRect, rAttrs, fnRect); > } > } >+#ifdef DBG_UTIL >+ g_pDebugLines[0] = g_pDebugLines[1] = g_pDebugLines[2] = g_pDebugLines[3] = 0; >+#endif > } > rAttrs.SetGetCacheLine( sal_False ); > }
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 38635
:
48373
|
48374
|
48375
|
60970
| 61466 |
74668
|
98943
|
99062
|
99102
|
99111