summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdsnpv.cxx
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2002-09-04 14:56:27 +0000
committerChristian Lippka <cl@openoffice.org>2002-09-04 14:56:27 +0000
commitab1be4621951153c65a8673a829f49f34c11c793 (patch)
tree151e4dc703092850fad2237e1114354b707ed5cc /svx/source/svdraw/svdsnpv.cxx
parentf2c928967f622c4d9b8e63336302745234eb8150 (diff)
#102934# don't overpaint already painted help lines
Diffstat (limited to 'svx/source/svdraw/svdsnpv.cxx')
-rw-r--r--svx/source/svdraw/svdsnpv.cxx43
1 files changed, 33 insertions, 10 deletions
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index b3ec5973aed2..4d8fc25baf39 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: svdsnpv.cxx,v $
*
- * $Revision: 1.2 $
+ * $Revision: 1.3 $
*
- * last change: $Author: aw $ $Date: 2002-03-07 09:49:27 $
+ * last change: $Author: cl $ $Date: 2002-09-04 15:56:27 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -655,14 +655,37 @@ void SdrSnapView::DrawDragHelpLine(OutputDevice* pOut) const
}
if (pO!=NULL)
{
- RasterOp eRop0=pO->GetRasterOp();
- pO->SetRasterOp(ROP_INVERT);
- Color aColor0( pO->GetLineColor() );
- Color aBlackColor( COL_BLACK );
- pO->SetLineColor( aBlackColor );
- aDragHelpLine.Draw(*pO,Point());
- pO->SetRasterOp(eRop0);
- pO->SetLineColor( aColor0 );
+ bool bDontDraw = false;
+
+ // see if there is already a help line on same position
+ Point aPnt(aDragStat.GetNow());
+ SdrPageView* pPV=GetPageView(aPnt);
+ if (pPV!=NULL)
+ {
+ const SdrHelpLineList& rList = pPV->GetHelpLines();
+ sal_uInt16 nAnz = rList.GetCount(),i;
+
+ for(i=0; i<nAnz; i++)
+ {
+ const SdrHelpLine rHelpLine = rList[i];
+
+ // check if we already drawn a help line like this one
+ if( aDragHelpLine.IsVisibleEqual( rHelpLine, *pO) )
+ bDontDraw = true;
+ }
+ }
+
+ if( !bDontDraw )
+ {
+ RasterOp eRop0=pO->GetRasterOp();
+ pO->SetRasterOp(ROP_INVERT);
+ Color aColor0( pO->GetLineColor() );
+ Color aBlackColor( COL_BLACK );
+ pO->SetLineColor( aBlackColor );
+ aDragHelpLine.Draw(*pO,Point());
+ pO->SetRasterOp(eRop0);
+ pO->SetLineColor( aColor0 );
+ }
}
} while (pOut==NULL && i<GetWinCount());
}