[Libreoffice-commits] .: sw/source
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Mon Feb 20 06:37:56 PST 2012
sw/source/core/layout/paintfrm.cxx | 36 +++++++++++++++++++++++++++++++++---
1 file changed, 33 insertions(+), 3 deletions(-)
New commits:
commit 7794baf89e74fc8308c8e1505f47d60b6547465f
Author: Cédric Bosdonnat <cedric.bosdonnat.ooo at free.fr>
Date: Mon Feb 20 15:36:29 2012 +0100
fdo#46073: Implemented soft boundaries only w/o non-printing chars
diff --git a/sw/source/core/layout/paintfrm.cxx b/sw/source/core/layout/paintfrm.cxx
index 206bdc9..ba89741 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 ) );
}
}
More information about the Libreoffice-commits
mailing list