Kaydet (Commit) 1f289431 authored tarafından Zolnai Tamás's avatar Zolnai Tamás

3D model insertion: here we need MM100

Change-Id: Iaa99e50589e08e8d82d860b6c61e6cbf0fd19b0a
üst 1de73df9
...@@ -795,9 +795,14 @@ void FuInsert3DModel::DoExecute( SfxRequest& ) ...@@ -795,9 +795,14 @@ void FuInsert3DModel::DoExecute( SfxRequest& )
mpWindow->EnterWait(); mpWindow->EnterWait();
Point aPos; Point aPos;
Size aSize(480,360);
sal_Int8 nAction = DND_ACTION_COPY; sal_Int8 nAction = DND_ACTION_COPY;
Size aSize(480,360);
if( mpWindow )
aSize = mpWindow->PixelToLogic( aSize, MAP_100TH_MM );
else
aSize = Application::GetDefaultDevice()->PixelToLogic( aSize, MAP_100TH_MM );
if( mpWindow ) if( mpWindow )
{ {
aPos = mpWindow->PixelToLogic( Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() ); aPos = mpWindow->PixelToLogic( Rectangle( aPos, mpWindow->GetOutputSizePixel() ).Center() );
...@@ -805,6 +810,7 @@ void FuInsert3DModel::DoExecute( SfxRequest& ) ...@@ -805,6 +810,7 @@ void FuInsert3DModel::DoExecute( SfxRequest& )
aPos.Y() -= aSize.Height() >> 1; aPos.Y() -= aSize.Height() >> 1;
} }
mpView->Insert3DModelURL( sURL, nAction, aPos, aSize, false ) ; mpView->Insert3DModelURL( sURL, nAction, aPos, aSize, false ) ;
if( mpWindow ) if( mpWindow )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment