diff options
author | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-02-20 15:36:29 +0100 |
---|---|---|
committer | Cédric Bosdonnat <cedric.bosdonnat.ooo@free.fr> | 2012-02-20 15:37:32 +0100 |
commit | 7794baf89e74fc8308c8e1505f47d60b6547465f (patch) | |
tree | 013ed85ab71a4a9d1790001e9581468681497a17 | |
parent | f78cb7da33a9f69e865b28b55a212bf1d11b1d7d (diff) |
fdo#46073: Implemented soft boundaries only w/o non-printing chars
-rw-r--r-- | sw/source/core/layout/paintfrm.cxx | 36 |
1 files changed, 33 insertions, 3 deletions
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx index 206bdc9bd50c..ba89741d98ad 100644 --- a/sw/source/core/layout/paintfrm.cxx +++ b/sw/source/core/layout/paintfrm.cxx @@ -6307,6 +6307,27 @@ drawinglayer::primitive2d::Primitive2DSequence lcl_CreatePageAreaDelimiterPrimit return aSeq; } +drawinglayer::primitive2d::Primitive2DSequence lcl_CreateRectangleDelimiterPrimitives ( + const SwRect& rRect ) +{ + drawinglayer::primitive2d::Primitive2DSequence aSeq( 1 ); + basegfx::BColor aLineColor = SwViewOption::GetDocBoundariesColor().getBColor(); + + basegfx::B2DPolygon aPolygon; + aPolygon.append( basegfx::B2DPoint( rRect.Left(), rRect.Top() ) ); + aPolygon.append( basegfx::B2DPoint( rRect.Right(), rRect.Top() ) ); + aPolygon.append( basegfx::B2DPoint( rRect.Right(), rRect.Bottom() ) ); + aPolygon.append( basegfx::B2DPoint( rRect.Left(), rRect.Bottom() ) ); + aPolygon.setClosed( true ); + + drawinglayer::primitive2d::PolygonHairlinePrimitive2D* pLine = + new drawinglayer::primitive2d::PolygonHairlinePrimitive2D( + aPolygon, aLineColor ); + aSeq[0] = drawinglayer::primitive2d::Primitive2DReference( pLine ); + + return aSeq; +} + drawinglayer::primitive2d::Primitive2DSequence lcl_CreateColumnAreaDelimiterPrimitives( const SwRect& rRect ) { @@ -6362,7 +6383,10 @@ void SwPageFrm::PaintSubsidiaryLines( const SwPageFrm *, if ( pFtnCont ) aArea.AddBottom( pFtnCont->Frm().Bottom() - aArea.Bottom() ); - ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); + if ( !pGlobalShell->GetViewOptions()->IsViewMetaChars( ) ) + ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); + else + ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } } @@ -6399,7 +6423,10 @@ void SwColumnFrm::PaintSubsidiaryLines( const SwPageFrm *, ::SwAlignRect( aArea, pGlobalShell ); - ProcessPrimitives( lcl_CreateColumnAreaDelimiterPrimitives( aArea ) ); + if ( !pGlobalShell->GetViewOptions()->IsViewMetaChars( ) ) + ProcessPrimitives( lcl_CreateColumnAreaDelimiterPrimitives( aArea ) ); + else + ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } void SwSectionFrm::PaintSubsidiaryLines( const SwPageFrm * pPage, @@ -6426,7 +6453,10 @@ void SwHeadFootFrm::PaintSubsidiaryLines( const SwPageFrm *, const SwRect & ) co { SwRect aArea( Prt() ); aArea.Pos() += Frm().Pos(); - ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); + if ( !pGlobalShell->GetViewOptions()->IsViewMetaChars( ) ) + ProcessPrimitives( lcl_CreatePageAreaDelimiterPrimitives( aArea ) ); + else + ProcessPrimitives( lcl_CreateRectangleDelimiterPrimitives( aArea ) ); } } |