fdo#77987, part 2: snap line coordinates can be negative

thus, use signed integers here

Change-Id: I8de1662680bd6e5dc9d42d633fa591dacc260a9b
This commit is contained in:
Katarina Behrens
2014-06-10 00:02:25 +02:00
parent 64992cc56e
commit 25678ae57d
2 changed files with 4 additions and 4 deletions

View File

@@ -102,8 +102,8 @@ SdSnapLineDlg::SdSnapLineDlg(
m_pMtrFldY->SetLast( nValue );
// set values
nXValue = ((const SfxUInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
nYValue = ((const SfxUInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
nXValue = ((const SfxInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_X)).GetValue();
nYValue = ((const SfxInt32Item&) rInAttrs.Get(ATTR_SNAPLINE_Y)).GetValue();
nXValue = Fraction(nXValue) / aUIScale;
nYValue = Fraction(nYValue) / aUIScale;
SetMetricValue( *m_pMtrFldX, nXValue, SFX_MAPUNIT_100TH_MM);

View File

@@ -109,8 +109,8 @@ void FuSnapLine::DoExecute( SfxRequest& rReq )
pPV->LogicToPagePos(aLinePos);
bLineExist = true;
}
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
aNewAttr.Put(SfxUInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_X, aLinePos.X()));
aNewAttr.Put(SfxInt32Item(ATTR_SNAPLINE_Y, aLinePos.Y()));
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
boost::scoped_ptr<AbstractSdSnapLineDlg> pDlg(pFact ? pFact->CreateSdSnapLineDlg( NULL, aNewAttr, mpView ) : 0);