fdo#77987, part 2: snap line coordinates can be negative
thus, use signed integers here Change-Id: I8de1662680bd6e5dc9d42d633fa591dacc260a9b
This commit is contained in:
@@ -102,8 +102,8 @@ SdSnapLineDlg::SdSnapLineDlg(
|
|||||||
m_pMtrFldY->SetLast( nValue );
|
m_pMtrFldY->SetLast( nValue );
|
||||||
|
|
||||||
// set values
|
// set values
|
||||||
nXValue = ((const SfxUInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
|
nXValue = ((const SfxInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
|
||||||
nYValue = ((const SfxUInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
|
nYValue = ((const SfxInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
|
||||||
nXValue = Fraction(nXValue) / aUIScale;
|
nXValue = Fraction(nXValue) / aUIScale;
|
||||||
nYValue = Fraction(nYValue) / aUIScale;
|
nYValue = Fraction(nYValue) / aUIScale;
|
||||||
SetMetricValue( *m_pMtrFldX, nXValue, SFX_MAPUNIT_100TH_MM);
|
SetMetricValue( *m_pMtrFldX, nXValue, SFX_MAPUNIT_100TH_MM);
|
||||||
|
@@ -109,8 +109,8 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
|
|||||||
pPV->LogicToPagePos(aLinePos);
|
pPV->LogicToPagePos(aLinePos);
|
||||||
bLineExist = true;
|
bLineExist = true;
|
||||||
}
|
}
|
||||||
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
|
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
|
||||||
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
|
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
|
||||||
|
|
||||||
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
|
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
|
||||||
boost::scoped_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0);
|
boost::scoped_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0);
|
||||||
|
Reference in New Issue
Block a user