diff options
6 files changed, 42 insertions, 17 deletions
diff --git a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx index 381dc79dff5a..b389f6a25de3 100644 --- a/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/borderlineprimitive2d.cxx @@ -307,7 +307,8 @@ namespace drawinglayer const basegfx::BColor& rRGBColorLeft, const basegfx::BColor& rRGBColorGap, bool bHasGapColor, - const short nStyle) + const short nStyle, + double fPatternScale) : BufferedDecompositionPrimitive2D(), maStart(rStart), maEnd(rEnd), @@ -322,7 +323,8 @@ namespace drawinglayer maRGBColorLeft(rRGBColorLeft), maRGBColorGap(rRGBColorGap), mbHasGapColor(bHasGapColor), - mnStyle(nStyle) + mnStyle(nStyle), + mfPatternScale(fPatternScale) { } @@ -345,7 +347,8 @@ namespace drawinglayer && getRGBColorLeft() == rCompare.getRGBColorLeft() && getRGBColorGap() == rCompare.getRGBColorGap() && hasGapColor() == rCompare.hasGapColor() - && getStyle() == rCompare.getStyle()); + && getStyle() == rCompare.getStyle() + && getPatternScale() == rCompare.getPatternScale()); } return false; diff --git a/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx b/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx index 2bfcd8c121a8..895c06eafa52 100644 --- a/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/clippedborderlineprimitive2d.cxx @@ -33,10 +33,11 @@ namespace drawinglayer const basegfx::BColor& rRGBColorLeft, const basegfx::BColor& rRGBColorGap, bool bHasGapColor, - const short nStyle) + const short nStyle, + double fPatternScale) : BorderLinePrimitive2D( rStart, rEnd, fLeftWidth,fDistance, fRightWidth, 0.0, 0.0, 0.0, 0.0, rRGBColorRight, rRGBColorLeft, - rRGBColorGap, bHasGapColor, nStyle), + rRGBColorGap, bHasGapColor, nStyle, fPatternScale), maIntersection( rIntersection ) { } diff --git a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx index 3e85b3a5e845..9726dcd6dd03 100644 --- a/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/borderlineprimitive2d.hxx @@ -69,6 +69,8 @@ namespace drawinglayer short mnStyle; + double mfPatternScale; + /// local helpers double getWidth( const geometry::ViewInformation2D& rViewInformation) const; @@ -111,7 +113,8 @@ namespace drawinglayer const basegfx::BColor& rRGBColorLeft, const basegfx::BColor& rRGBColorGap, bool bHasGapColor, - const short nStyle ); + const short nStyle, + double fPatternScale = 1.0 ); /// data read access const basegfx::B2DPoint& getStart() const { return maStart; } @@ -128,6 +131,7 @@ namespace drawinglayer const basegfx::BColor& getRGBColorGap () const { return maRGBColorGap; } bool hasGapColor( ) const { return mbHasGapColor; } short getStyle () const { return mnStyle; } + double getPatternScale() const { return mfPatternScale; } /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx b/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx index a2e21948a908..aaa2095fb9d3 100644 --- a/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx +++ b/include/drawinglayer/primitive2d/clippedborderlineprimitive2d.hxx @@ -46,7 +46,8 @@ namespace drawinglayer const basegfx::BColor& rRGBColorLeft, const basegfx::BColor& rRGBColorGap, bool bHasGapColor, - const short nStyle ); + const short nStyle, + double fPatternScale = 1.0 ); /// compare operator virtual bool operator==(const BasePrimitive2D& rPrimitive) const; diff --git a/include/svx/framelink.hxx b/include/svx/framelink.hxx index ebdc010b69d7..afae83e428e7 100644 --- a/include/svx/framelink.hxx +++ b/include/svx/framelink.hxx @@ -127,6 +127,7 @@ public: inline double Prim() const { return mnPrim; } inline double Dist() const { return mnDist; } inline double Secn() const { return mnSecn; } + double Scale() const; inline editeng::SvxBorderStyle Type() const { return mnType; } /** Returns the total width of this frame style. */ @@ -167,6 +168,7 @@ private: double mnPrim; /// Width of primary (single, left, or top) line. double mnDist; /// Distance between primary and secondary line. double mnSecn; /// Width of secondary (right or bottom) line. + double mfScale; editeng::SvxBorderStyle mnType; }; diff --git a/svx/source/dialog/framelink.cxx b/svx/source/dialog/framelink.cxx index 93e16a0c57b0..82683743302c 100644 --- a/svx/source/dialog/framelink.cxx +++ b/svx/source/dialog/framelink.cxx @@ -1124,13 +1124,18 @@ void lclDrawDiagFrameBorders( #define SCALEVALUE( value ) lclScaleValue( value, fScale, nMaxWidth ) -Style::Style() - : meRefMode( REFMODE_CENTERED ) - , mnType( ::com::sun::star::table::BorderLineStyle::SOLID ) -{ Clear(); } +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 ), mnType( nType ) + meRefMode(REFMODE_CENTERED), + mfScale(1.0), + mnType(nType) { Clear(); Set( nP, nD, nS ); @@ -1138,23 +1143,32 @@ Style::Style( double nP, double nD, double nS, editeng::SvxBorderStyle nType ) : 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 ), mnType( 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 ) + meRefMode(REFMODE_CENTERED), + mfScale(fScale) { Set( rBorder, fScale, nMaxWidth ); } Style::Style( const editeng::SvxBorderLine* pBorder, double fScale, sal_uInt16 nMaxWidth ) : - meRefMode( REFMODE_CENTERED ) + 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 ); @@ -1415,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; } @@ -1443,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; } |