summaryrefslogtreecommitdiff
path: root/svx/source/form
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2014-10-23 17:41:47 +0200
committerJan Holesovsky <kendy@collabora.com>2014-10-23 18:34:39 +0200
commit31af61ea091cc895b893c849f2130aa35792b7db (patch)
tree6c7b63c5b538034bd5d356c5a8667b7e95d59b9c /svx/source/form
parente92c0d6f9b7a6251e00dc55219a203a7e53c96e2 (diff)
Fraction: Revert "fdo#81356: convert Fraction to boost::rational<long> - wip"
This reverts commit 47a2d7642d249d70b5da0c330a73f3a0032e4bba. Conflicts: cui/source/tabpages/transfrm.cxx svx/source/svdraw/svdedtv1.cxx svx/source/svdraw/svdibrow.cxx sw/source/filter/ww1/w1filter.cxx tools/source/generic/rational.cxx Change-Id: I4849916f5f277a4afef0e279b0135c76b36b9d15
Diffstat (limited to 'svx/source/form')
-rw-r--r--svx/source/form/fmvwimp.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index e0b06c2e8412..5e5ea8cba42c 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1459,8 +1459,8 @@ SdrObject* FmXFormView::implCreateXFormsControl( const ::svx::OXFormsDescriptor
const sal_uInt16 nObjID = OBJ_FM_BUTTON;
::Size controlSize(4000, 500);
FmFormObj *pControl = static_cast<FmFormObj*>(SdrObjFactory::MakeNewObject( FmFormInventor, nObjID, NULL, NULL ));
- controlSize.Width() = boost::rational_cast<long>(controlSize.Width() * eTargetMode.GetScaleX());
- controlSize.Height() = boost::rational_cast<long>(controlSize.Height() * eTargetMode.GetScaleY());
+ controlSize.Width() = Fraction(controlSize.Width(), 1) * eTargetMode.GetScaleX();
+ controlSize.Height() = Fraction(controlSize.Height(), 1) * eTargetMode.GetScaleY();
::Point controlPos( OutputDevice::LogicToLogic( ::Point( controlSize.Width(), 0 ), eSourceMode, eTargetMode ) );
::Rectangle controlRect( controlPos, OutputDevice::LogicToLogic( controlSize, eSourceMode, eTargetMode ) );
pControl->SetLogicRect(controlRect);
@@ -1550,8 +1550,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO
aRealSize.Height()= aDefSize.Height();
// adjust to scaling of the target device (#53523#)
- aRealSize.Width() = boost::rational_cast<long>(aRealSize.Width() * eTargetMode.GetScaleX());
- aRealSize.Height() = boost::rational_cast<long>(aRealSize.Height() * eTargetMode.GetScaleY());
+ aRealSize.Width() = long(Fraction(aRealSize.Width(), 1) * eTargetMode.GetScaleX());
+ aRealSize.Height() = long(Fraction(aRealSize.Height(), 1) * eTargetMode.GetScaleY());
// for boolean fields, we do not create a label, but just a checkbox
bool bNeedLabel = ( _nControlObjectID != OBJ_FM_CHECKBOX );
@@ -1617,8 +1617,8 @@ bool FmXFormView::createControlLabelPair( OutputDevice& _rOutDev, sal_Int32 _nXO
if ( OBJ_FM_IMAGECONTROL == _nControlObjectID )
aControlSize = aDefImageSize;
- aControlSize.Width() = boost::rational_cast<long>(aControlSize.Width() * eTargetMode.GetScaleX());
- aControlSize.Height() = boost::rational_cast<long>(aControlSize.Height() * eTargetMode.GetScaleY());
+ aControlSize.Width() = long(Fraction(aControlSize.Width(), 1) * eTargetMode.GetScaleX());
+ aControlSize.Height() = long(Fraction(aControlSize.Height(), 1) * eTargetMode.GetScaleY());
pControl->SetLogicRect( ::Rectangle(
OutputDevice::LogicToLogic( ::Point( aRealSize.Width() + _nXOffsetMM, _nYOffsetMM ), eSourceMode, eTargetMode ),