summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/swcli.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/swcli.cxx')
-rw-r--r--sw/source/uibase/uiview/swcli.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/uibase/uiview/swcli.cxx b/sw/source/uibase/uiview/swcli.cxx
index 71b57499ddb2..900bab9db0e7 100644
--- a/sw/source/uibase/uiview/swcli.cxx
+++ b/sw/source/uibase/uiview/swcli.cxx
@@ -67,8 +67,8 @@ void SwOleClient::RequestNewObjectArea( Rectangle& aLogRect )
MapMode aObjectMap( VCLUnoHelper::UnoEmbed2VCLMapUnit( GetObject()->getMapUnit( GetAspect() ) ) );
MapMode aClientMap( GetEditWin()->GetMapMode().GetMapUnit() );
- Size aNewObjSize( Fraction( aLogRect.GetWidth() ) / GetScaleWidth(),
- Fraction( aLogRect.GetHeight() ) / GetScaleHeight() );
+ Size aNewObjSize( boost::rational_cast<long>(aLogRect.GetWidth() / GetScaleWidth()),
+ boost::rational_cast<long>(aLogRect.GetHeight() / GetScaleHeight()) );
// convert to logical coordinates of the embedded object
Size aNewSize = GetEditWin()->LogicToLogic( aNewObjSize, &aClientMap, &aObjectMap );
@@ -141,8 +141,8 @@ void SwOleClient::ViewChanged()
const MapMode aObjMap( VCLUnoHelper::UnoEmbed2VCLMapUnit( GetObject()->getMapUnit( GetAspect() ) ) );
aVisSize = OutputDevice::LogicToLogic( aVisSize, aObjMap, aMyMap );
- aVisSize.Width() = Fraction( aVisSize.Width() ) * GetScaleWidth();
- aVisSize.Height()= Fraction( aVisSize.Height() ) * GetScaleHeight();
+ aVisSize.Width() = boost::rational_cast<long>(aVisSize.Width() * GetScaleWidth());
+ aVisSize.Height()= boost::rational_cast<long>(aVisSize.Height() * GetScaleHeight());
SwRect aRect( Point( LONG_MIN, LONG_MIN ), aVisSize );
rSh.LockView( true ); // Prevent scrolling in the EndAction