summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@collabora.com>2014-01-13 13:18:25 -0500
committerAndras Timar <andras.timar@collabora.com>2014-01-29 22:33:16 +0000
commit9a19e8d838753128504274e1885eb3ce8ec1dbb8 (patch)
treeba7783a8d2ddfa3a4f2fedd9fc4075e1b8a0990b /svx
parent33ada1f20a2cdd6d52e6cb6e81aa0477ec0df563 (diff)
fdo#73487, fdo#73886: Overhaul cell borders to make them look sane.
Change-Id: Ie563f272b60ec8b6b8a4ff0df7256902997610c1 Reviewed-on: https://gerrit.libreoffice.org/7597 Reviewed-by: Andras Timar <andras.timar@collabora.com> Tested-by: Andras Timar <andras.timar@collabora.com>
Diffstat (limited to 'svx')
-rw-r--r--svx/source/dialog/framelink.cxx49
1 files changed, 47 insertions, 2 deletions
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx
index 20fdd3f68c3d..82683743302c 100644
--- a/svx/source/dialog/framelink.cxx
+++ b/svx/source/dialog/framelink.cxx
@@ -1124,6 +1124,51 @@ void lclDrawDiagFrameBorders(
#define SCALEVALUE( value ) lclScaleValue( value, fScale, nMaxWidth )
+Style::Style() :
+ meRefMode(REFMODE_CENTERED),
+ mfScale(1.0),
+ mnType(table::BorderLineStyle::SOLID)
+{
+ Clear();
+}
+
+Style::Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
+ meRefMode(REFMODE_CENTERED),
+ mfScale(1.0),
+ mnType(nType)
+{
+ Clear();
+ Set( nP, nD, nS );
+}
+
+Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor,
+ double nP, double nD, double nS, editeng::SvxBorderStyle nType ) :
+ meRefMode(REFMODE_CENTERED),
+ mfScale(1.0),
+ mnType(nType)
+{
+ Set( rColorPrim, rColorSecn, rColorGap, bUseGapColor, nP, nD, nS );
+}
+
+Style::Style( const editeng::SvxBorderLine& rBorder, double fScale, sal_uInt16 nMaxWidth ) :
+ meRefMode(REFMODE_CENTERED),
+ mfScale(fScale)
+{
+ Set( rBorder, fScale, nMaxWidth );
+}
+
+Style::Style( const editeng::SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWidth ) :
+ meRefMode(REFMODE_CENTERED),
+ mfScale(fScale)
+{
+ Set( pBorder, fScale, nMaxWidth );
+}
+
+double Style::Scale() const
+{
+ return mfScale;
+}
+
void Style::Clear()
{
Set( Color(), Color(), Color(), false, 0, 0, 0 );
@@ -1384,7 +1429,7 @@ drawinglayer::primitive2d::Primitive2DSequence CreateClippedBorderPrimitives (
rBorder.GetColorSecn().getBColor(),
rBorder.GetColorPrim().getBColor(),
rBorder.GetColorGap().getBColor(),
- rBorder.UseGapColor(), rBorder.Type() );
+ rBorder.UseGapColor(), rBorder.Type(), rBorder.Scale() );
return aSequence;
}
@@ -1412,7 +1457,7 @@ drawinglayer::primitive2d::Primitive2DSequence CreateBorderPrimitives(
rBorder.GetColorSecn().getBColor(),
rBorder.GetColorPrim().getBColor(),
rBorder.GetColorGap().getBColor(),
- rBorder.UseGapColor(), rBorder.Type() );
+ rBorder.UseGapColor(), rBorder.Type(), rBorder.Scale() );
return aSequence;
}