[Libreoffice-commits] .: Branch 'libreoffice-3-4-4' - svtools/inc svtools/source
Petr Mladek
pmladek at kemper.freedesktop.org
Mon Oct 31 09:22:33 PDT 2011
svtools/inc/svtools/borderhelper.hxx | 3 +++
svtools/source/control/ctrlbox.cxx | 18 ++++++++++++++++++
2 files changed, 21 insertions(+)
New commits:
commit a38d5a3381555f1fd5e9afb1e3be1efd70a06bbc
Author: Tomofumi Yagi <yagit at mknada.sakura.ne.jp>
Date: Wed Oct 26 11:37:10 2011 -0400
fdo#37129: Fix the drawing of dotted and dashed borders in Calc.
Signed-off-by: Kohei Yoshida <kohei.yoshida at suse.com>
Signed-off-by: Petr Mladek <pmladek at suse.cz>
Signed-off-by: Cedric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
diff --git a/svtools/inc/svtools/borderhelper.hxx b/svtools/inc/svtools/borderhelper.hxx
index de24369..486eaef 100644
--- a/svtools/inc/svtools/borderhelper.hxx
+++ b/svtools/inc/svtools/borderhelper.hxx
@@ -42,6 +42,9 @@ namespace svtools
SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon,
sal_uInt16 nDashing, MapUnit eUnit );
+ SVT_DLLPUBLIC basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon,
+ sal_uInt16 nDashing, MapUnit eUnit, double fScale );
+
SVT_DLLPUBLIC void DrawLine( OutputDevice& rDev, const basegfx::B2DPoint& rBeg,
const basegfx::B2DPoint& rEnd, sal_uInt32 nWidth, sal_uInt16 nDashing );
diff --git a/svtools/source/control/ctrlbox.cxx b/svtools/source/control/ctrlbox.cxx
index 9305e18..70a040e 100644
--- a/svtools/source/control/ctrlbox.cxx
+++ b/svtools/source/control/ctrlbox.cxx
@@ -579,6 +579,24 @@ namespace svtools
return aPolygons;
}
+ basegfx::B2DPolyPolygon ApplyLineDashing( const basegfx::B2DPolygon& rPolygon, sal_uInt16 nDashing, MapUnit eUnit, double fScale )
+ {
+ std::vector< double > aPattern = GetDashing( nDashing, eUnit );
+ std::vector< double >::iterator i = aPattern.begin();
+ while( i != aPattern.end() ) {
+ (*i) *= fScale;
+ ++i;
+ }
+
+ basegfx::B2DPolyPolygon aPolygons;
+ if ( ! aPattern.empty() )
+ basegfx::tools::applyLineDashing( rPolygon, aPattern, &aPolygons );
+ else
+ aPolygons.append( rPolygon );
+
+ return aPolygons;
+ }
+
void DrawLine( OutputDevice& rDev, const Point& rP1, const Point& rP2,
sal_uInt32 nWidth, sal_uInt16 nDashing )
{
More information about the Libreoffice-commits
mailing list