summaryrefslogtreecommitdiffstats
path: root/sd/source/ui/dlg/dlgsnap.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/dlg/dlgsnap.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/ui/dlg/dlgsnap.cxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/sd/source/ui/dlg/dlgsnap.cxx b/sd/source/ui/dlg/dlgsnap.cxx
index 2b78a649eaef..6cd220d5a5bc 100644..100755
--- a/sd/source/ui/dlg/dlgsnap.cxx
+++ b/sd/source/ui/dlg/dlgsnap.cxx
@@ -96,27 +96,35 @@ SdSnapLineDlg::SdSnapLineDlg(
DBG_ASSERT( pPool, "Wo ist der Pool?" );
SfxMapUnit ePoolUnit = pPool->GetMetric( SID_ATTR_FILL_HATCH );
- // Hier werden die Max- und MinWerte in Ahaengigkeit von der
+ // #i48497# Consider page origin
+ SdrPageView* pPV = pView->GetSdrPageView();
+ Point aLeftTop(aWorkArea.Left()+1, aWorkArea.Top()+1);
+ pPV->LogicToPagePos(aLeftTop);
+ Point aRightBottom(aWorkArea.Right()-2, aWorkArea.Bottom()-2);
+ pPV->LogicToPagePos(aRightBottom);
+
+ // Hier werden die Max- und MinWerte in Abhaengigkeit von der
// WorkArea, PoolUnit und der FieldUnit:
- SetMetricValue( aMtrFldX, aWorkArea.Left(), ePoolUnit );
+ SetMetricValue( aMtrFldX, aLeftTop.X(), ePoolUnit );
+
long nValue = static_cast<long>(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMin( nValue );
aMtrFldX.SetFirst( nValue );
- SetMetricValue( aMtrFldX, aWorkArea.Right()+1, ePoolUnit );
+ SetMetricValue( aMtrFldX, aRightBottom.X(), ePoolUnit );
nValue = static_cast<long>(aMtrFldX.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldX.SetMax( nValue );
aMtrFldX.SetLast( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Top(), ePoolUnit );
+ SetMetricValue( aMtrFldY, aLeftTop.Y(), ePoolUnit );
nValue = static_cast<long>(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMin( nValue );
aMtrFldY.SetFirst( nValue );
- SetMetricValue( aMtrFldY, aWorkArea.Bottom()+1, ePoolUnit );
+ SetMetricValue( aMtrFldY, aRightBottom.Y(), ePoolUnit );
nValue = static_cast<long>(aMtrFldY.GetValue());
nValue = Fraction( nValue ) / aUIScale;
aMtrFldY.SetMax( nValue );