diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-08-11 18:32:33 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-09-15 12:58:03 +0200 |
commit | fe14ddf25003c0f79f9f8a249bc22d45f57a0068 (patch) | |
tree | f0470ccd992a439bf52b83688d818c776bcd733e /sw/source/ui | |
parent | 596efaad51735a130e7b7bd27dbc34dc07f32f68 (diff) |
borderline: Abstraction of BorderLinePrimitive
As preparation for more detailed definition of BorderLine
primitives I have adapted the BorderLine definition to
work with motre possibilities to define the LineStartEnd
definitions in a BorderLineExtend class. That one is
flexible to hold all kinds of definitions - from none to
all four possible extends (Start/End, Left/Right of vector)
Cleanup of DiagStyle and others: DiagStyle is not needed
anymore due to no longer using angles calculated, but
being based on vectors defining the geometry. Also cleaned
up quite a bit of no longer needed calculation stuff for
the control.
Diffstat (limited to 'sw/source/ui')
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 0793190c75b3..ab2650d8587f 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -709,7 +709,10 @@ MAKENUMSTR: SvtScriptedTextHelper aScriptedText(rRenderContext); Size aStrSize; sal_uInt8 nFormatIndex = GetFormatIndex( nCol, nRow ); - tools::Rectangle cellRect = maArray.GetCellRect( nCol, nRow ); + const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow )); + const tools::Rectangle cellRect( + basegfx::fround(aCellRange.getMinX()), basegfx::fround(aCellRange.getMinY()), + basegfx::fround(aCellRange.getMaxX()), basegfx::fround(aCellRange.getMaxY())); Point aPos = cellRect.TopLeft(); long nRightX = 0; @@ -801,7 +804,11 @@ void AutoFormatPreview::DrawBackground(vcl::RenderContext& rRenderContext) rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::FILLCOLOR); rRenderContext.SetLineColor(); rRenderContext.SetFillColor(aBrushItem.GetColor()); - rRenderContext.DrawRect(maArray.GetCellRect(nCol, nRow)); + const basegfx::B2DRange aCellRange(maArray.GetCellRange( nCol, nRow )); + rRenderContext.DrawRect( + tools::Rectangle( + basegfx::fround(aCellRange.getMinX()), basegfx::fround(aCellRange.getMinY()), + basegfx::fround(aCellRange.getMaxX()), basegfx::fround(aCellRange.getMaxY()))); rRenderContext.Pop(); } } |