diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-07-20 15:11:30 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-07-28 17:51:56 +0200 |
commit | e32c12a444e5bd0c6735db8e8008340c29a7e25e (patch) | |
tree | 50262efd53047ee92f5f39f9a1fd6c9e00917fc7 /sw | |
parent | 1118e5b986e4df8a417edcd4ee23a40fb64a0a38 (diff) |
borderline: adaptions to primitives
Handling and paint of borderlines greatly adapted
to primitive usage. Solved the double paint mechanisn
to no longer use the sc-local special cases. The
svx tooling for borderline paint is now the only one
and was extended to also handle diagonal lines.
Big cleanups/removals of old paint to OutputDevice
and sc-specific rendering. All other app-usages
of borderline also adapted. Preparations for careful
line-start/end adaption prepared and possible due to
unified coordinate-system usages and basegfx class-usage
Change-Id: If9e4efcfc0fe25e14d4052907038ca5cf222a432
Diffstat (limited to 'sw')
-rw-r--r-- | sw/Library_swui.mk | 1 | ||||
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 18 | ||||
-rw-r--r-- | sw/source/ui/table/tautofmt.cxx | 18 |
3 files changed, 30 insertions, 7 deletions
diff --git a/sw/Library_swui.mk b/sw/Library_swui.mk index a614daf495fe..e33d16450b11 100644 --- a/sw/Library_swui.mk +++ b/sw/Library_swui.mk @@ -71,6 +71,7 @@ $(eval $(call gb_Library_use_libraries,swui,\ ucbhelper \ utl \ vcl \ + drawinglayer \ )) $(eval $(call gb_Library_add_exception_objects,swui,\ diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index d136f6f27ad2..cbb9ed9adc28 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -2746,11 +2746,16 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons if (bHori) { + const basegfx::B2DPoint aOrigin(aPaintStart.X(), aPaintStart.Y()); + const basegfx::B2DVector aX(basegfx::B2DPoint(aPaintEnd.X(), aPaintEnd.Y()) - aOrigin); + const basegfx::B2DVector aY(basegfx::getNormalizedPerpendicular(aX)); drawinglayer::primitive2d::Primitive2DContainer aSequence(1); + svx::frame::CreateBorderPrimitives( aSequence, - aPaintStart, - aPaintEnd, + aOrigin, + aX, + aY, aStyles[ 0 ], // current style aStyles[ 1 ], // aLFromT aStyles[ 2 ], // aLFromL @@ -2763,11 +2768,16 @@ void SwTabFramePainter::PaintLines(OutputDevice& rDev, const SwRect& rRect) cons } else { + const basegfx::B2DPoint aOrigin(aPaintEnd.X(), aPaintEnd.Y()); + const basegfx::B2DVector aX(basegfx::B2DPoint(aPaintStart.X(), aPaintStart.Y()) - aOrigin); + const basegfx::B2DVector aY(basegfx::getNormalizedPerpendicular(aX)); drawinglayer::primitive2d::Primitive2DContainer aSequence(1); + svx::frame::CreateBorderPrimitives( aSequence, - aPaintEnd, - aPaintStart, + aOrigin, + aX, + aY, aStyles[ 0 ], // current style aStyles[ 4 ], // aBFromL aStyles[ 5 ], // aBFromB diff --git a/sw/source/ui/table/tautofmt.cxx b/sw/source/ui/table/tautofmt.cxx index 0bb614d7d79a..6f4a5bf8c080 100644 --- a/sw/source/ui/table/tautofmt.cxx +++ b/sw/source/ui/table/tautofmt.cxx @@ -24,7 +24,6 @@ #include <vcl/svapp.hxx> #include <vcl/settings.hxx> #include <vcl/builderfactory.hxx> - #include <svl/zforlist.hxx> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/i18n/BreakIterator.hpp> @@ -32,6 +31,8 @@ #include <svtools/scriptedtext.hxx> #include <svtools/accessibilityoptions.hxx> #include <svx/framelinkarray.hxx> +#include <drawinglayer/processor2d/processor2dtools.hxx> + #include "app.hrc" #include "strings.hrc" #include "swmodule.hxx" @@ -819,14 +820,25 @@ void AutoFormatPreview::PaintCells(vcl::RenderContext& rRenderContext) // 3) border if (aCurData.IsFrame()) - maArray.DrawArray(rRenderContext); + { + const drawinglayer::geometry::ViewInformation2D aNewViewInformation2D; + std::unique_ptr<drawinglayer::processor2d::BaseProcessor2D> pProcessor2D( + drawinglayer::processor2d::createPixelProcessor2DFromOutputDevice( + rRenderContext, + aNewViewInformation2D)); + + if (pProcessor2D) + { + maArray.DrawArray(*pProcessor2D.get()); + pProcessor2D.reset(); + } + } } void AutoFormatPreview::Init() { SetBorderStyle( GetBorderStyle() | WindowBorderStyle::MONO ); maArray.Initialize( 5, 5 ); - maArray.SetUseDiagDoubleClipping( false ); nLabelColWidth = 0; nDataColWidth1 = 0; nDataColWidth2 = 0; |