diff options
author | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-09-14 11:44:23 +0200 |
---|---|---|
committer | Armin Le Grand <Armin.Le.Grand@cib.de> | 2017-09-15 12:58:04 +0200 |
commit | 2f16219741aba016677103e4b22738d055c39a91 (patch) | |
tree | 55a3ab0dc313b4eb28893970c10b1732658e7e89 /svx | |
parent | 16fd7af90a9be159ebc7eab09083f1ef7eb64645 (diff) |
borderline: Fixed PatternScale
The applied PatternScale factor was not consequently used in
svx::frame::Style so that the Previews in the Dialogs look weird.
Fixed that and stumbled over Writer applying it's own scale
which then was leading to double scaling, ceaned that up.
Change-Id: I89f41bfd7884e5e743080301e219491e215054c3
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/framelink.cxx | 7 | ||||
-rw-r--r-- | svx/source/dialog/frmsel.cxx | 10 | ||||
-rw-r--r-- | svx/source/inc/frmselimpl.hxx | 1 |
3 files changed, 11 insertions, 7 deletions
diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index b7554436bf48..ea5b33315cfc 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -56,19 +56,21 @@ Style::Style() : { } -Style::Style( double nP, double nD, double nS, SvxBorderLineStyle nType ) : +Style::Style( double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale ) : maImplStyle(new implStyle()), mpUsingCell(nullptr) { maImplStyle->mnType = nType; + maImplStyle->mfPatternScale = fScale; Set( nP, nD, nS ); } -Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor, double nP, double nD, double nS, SvxBorderLineStyle nType ) : +Style::Style( const Color& rColorPrim, const Color& rColorSecn, const Color& rColorGap, bool bUseGapColor, double nP, double nD, double nS, SvxBorderLineStyle nType, double fScale ) : maImplStyle(new implStyle()), mpUsingCell(nullptr) { maImplStyle->mnType = nType; + maImplStyle->mfPatternScale = fScale; Set( rColorPrim, rColorSecn, rColorGap, bUseGapColor, nP, nD, nS ); } @@ -154,6 +156,7 @@ void Style::Set( const SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWid const sal_uInt16 nSecn(pBorder->GetInWidth()); pTarget->mnType = pBorder->GetBorderLineStyle(); + pTarget->mfPatternScale = fScale; if( !nSecn ) // no or single frame border { diff --git a/svx/source/dialog/frmsel.cxx b/svx/source/dialog/frmsel.cxx index 9678339fbca6..291d47903361 100644 --- a/svx/source/dialog/frmsel.cxx +++ b/svx/source/dialog/frmsel.cxx @@ -132,7 +132,7 @@ void FrameBorder::SetCoreStyle( const SvxBorderLine* pStyle ) maCoreStyle = SvxBorderLine(); // from twips to points - maUIStyle.Set( &maCoreStyle, 0.05, FRAMESEL_GEOM_WIDTH ); + maUIStyle.Set( &maCoreStyle, FrameBorder::GetDefaultPatternScale(), FRAMESEL_GEOM_WIDTH ); meState = maUIStyle.IsUsed() ? FrameBorderState::Show : FrameBorderState::Hide; } @@ -150,7 +150,7 @@ void FrameBorder::SetState( FrameBorderState eState ) break; case FrameBorderState::DontCare: maCoreStyle = SvxBorderLine(); - maUIStyle = frame::Style(3, 0, 0, SvxBorderLineStyle::SOLID); //OBJ_FRAMESTYLE_DONTCARE + maUIStyle = frame::Style(3, 0, 0, SvxBorderLineStyle::SOLID, FrameBorder::GetDefaultPatternScale()); //OBJ_FRAMESTYLE_DONTCARE break; } } @@ -643,7 +643,7 @@ void FrameSelectorImpl::DrawAllFrameBorders() rRightStyle.GetColorSecn(), rRightStyle.GetColorGap(), rRightStyle.UseGapColor(), rRightStyle.Secn(), rRightStyle.Dist(), rRightStyle.Prim( ), - rRightStyle.Type( ) ); + rRightStyle.Type( ), rRightStyle.PatternScale() ); maArray.SetColumnStyleRight( mbVer ? 1 : 0, rInvertedRight ); maArray.SetRowStyleTop( 0, maTop.GetUIStyle() ); @@ -655,7 +655,7 @@ void FrameSelectorImpl::DrawAllFrameBorders() rHorStyle.GetColorSecn(), rHorStyle.GetColorGap(), rHorStyle.UseGapColor(), rHorStyle.Secn(), rHorStyle.Dist(), rHorStyle.Prim( ), - rHorStyle.Type() ); + rHorStyle.Type(), rHorStyle.PatternScale() ); maArray.SetRowStyleTop( 1, rInvertedHor ); } @@ -665,7 +665,7 @@ void FrameSelectorImpl::DrawAllFrameBorders() rBottomStyle.GetColorSecn(), rBottomStyle.GetColorGap(), rBottomStyle.UseGapColor(), rBottomStyle.Secn(), rBottomStyle.Dist(), rBottomStyle.Prim( ), - rBottomStyle.Type() ); + rBottomStyle.Type(), rBottomStyle.PatternScale() ); maArray.SetRowStyleBottom( mbHor ? 1 : 0, rInvertedBottom ); for( size_t nCol = 0; nCol < maArray.GetColCount(); ++nCol ) diff --git a/svx/source/inc/frmselimpl.hxx b/svx/source/inc/frmselimpl.hxx index 7e2e73b8238a..62a0d7f3a9d7 100644 --- a/svx/source/inc/frmselimpl.hxx +++ b/svx/source/inc/frmselimpl.hxx @@ -36,6 +36,7 @@ class FrameBorder { public: explicit FrameBorder(FrameBorderType eType); + static double GetDefaultPatternScale() { return 0.05; } FrameBorderType GetType() const { |