summaryrefslogtreecommitdiff
path: root/svx/source/svdraw/svdsnpv.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw/svdsnpv.cxx')
-rw-r--r--svx/source/svdraw/svdsnpv.cxx72
1 files changed, 36 insertions, 36 deletions
diff --git a/svx/source/svdraw/svdsnpv.cxx b/svx/source/svdraw/svdsnpv.cxx
index 1fd9ac204fbe..2bb9527b63b4 100644
--- a/svx/source/svdraw/svdsnpv.cxx
+++ b/svx/source/svdraw/svdsnpv.cxx
@@ -72,23 +72,23 @@ ImplPageOriginOverlay::ImplPageOriginOverlay(const SdrPaintView& rView, const ba
void ImplPageOriginOverlay::SetPosition(const basegfx::B2DPoint& rNewPosition)
{
- if(rNewPosition != maPosition)
+ if(rNewPosition == maPosition)
+ return;
+
+ // apply to OverlayObjects
+ for(sal_uInt32 a(0); a < maObjects.count(); a++)
{
- // apply to OverlayObjects
- for(sal_uInt32 a(0); a < maObjects.count(); a++)
- {
- sdr::overlay::OverlayCrosshairStriped* pCandidate =
- static_cast< sdr::overlay::OverlayCrosshairStriped* >(&maObjects.getOverlayObject(a));
+ sdr::overlay::OverlayCrosshairStriped* pCandidate =
+ static_cast< sdr::overlay::OverlayCrosshairStriped* >(&maObjects.getOverlayObject(a));
- if(pCandidate)
- {
- pCandidate->setBasePosition(rNewPosition);
- }
+ if(pCandidate)
+ {
+ pCandidate->setBasePosition(rNewPosition);
}
-
- // remember new position
- maPosition = rNewPosition;
}
+
+ // remember new position
+ maPosition = rNewPosition;
}
@@ -146,23 +146,23 @@ ImplHelpLineOverlay::ImplHelpLineOverlay(
void ImplHelpLineOverlay::SetPosition(const basegfx::B2DPoint& rNewPosition)
{
- if(rNewPosition != maPosition)
+ if(rNewPosition == maPosition)
+ return;
+
+ // apply to OverlayObjects
+ for(sal_uInt32 a(0); a < maObjects.count(); a++)
{
- // apply to OverlayObjects
- for(sal_uInt32 a(0); a < maObjects.count(); a++)
- {
- sdr::overlay::OverlayHelplineStriped* pCandidate =
- static_cast< sdr::overlay::OverlayHelplineStriped* >(&maObjects.getOverlayObject(a));
+ sdr::overlay::OverlayHelplineStriped* pCandidate =
+ static_cast< sdr::overlay::OverlayHelplineStriped* >(&maObjects.getOverlayObject(a));
- if(pCandidate)
- {
- pCandidate->setBasePosition(rNewPosition);
- }
+ if(pCandidate)
+ {
+ pCandidate->setBasePosition(rNewPosition);
}
-
- // remember new position
- maPosition = rNewPosition;
}
+
+ // remember new position
+ maPosition = rNewPosition;
}
SdrSnapView::SdrSnapView(
@@ -460,19 +460,19 @@ void SdrSnapView::MovSetPageOrg(const Point& rPnt)
void SdrSnapView::EndSetPageOrg()
{
- if(IsSetPageOrg())
- {
- SdrPageView* pPV = GetSdrPageView();
+ if(!IsSetPageOrg())
+ return;
- if(pPV)
- {
- Point aPnt(maDragStat.GetNow());
- pPV->SetPageOrigin(aPnt);
- }
+ SdrPageView* pPV = GetSdrPageView();
- // cleanup
- BrkSetPageOrg();
+ if(pPV)
+ {
+ Point aPnt(maDragStat.GetNow());
+ pPV->SetPageOrigin(aPnt);
}
+
+ // cleanup
+ BrkSetPageOrg();
}
void SdrSnapView::BrkSetPageOrg()