diff options
Diffstat (limited to 'sd/source/ui/view/sdview.cxx')
-rw-r--r-- | sd/source/ui/view/sdview.cxx | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/sd/source/ui/view/sdview.cxx b/sd/source/ui/view/sdview.cxx index 813c6caba95a3..3aed9c6c0d9cf 100644 --- a/sd/source/ui/view/sdview.cxx +++ b/sd/source/ui/view/sdview.cxx @@ -969,89 +969,6 @@ void View::SetMarkedOriginalSize() delete pUndoGroup; } -/** create a virtual device and paints the slide contents into it. - The caller must delete the returned device */ -VirtualDevice* View::CreatePageVDev(USHORT nSdPage, PageKind ePageKind, ULONG nWidthPixel) -{ - ViewShell* pViewShell = mpDocSh->GetViewShell(); - OutputDevice* pRefDevice = 0; - if( pViewShell ) - pRefDevice = pViewShell->GetActiveWindow(); - - if( !pRefDevice ) - pRefDevice = Application::GetDefaultDevice(); - - DBG_ASSERT( pRefDevice, "sd::View::CreatePageVDev(), I need a reference device to work properly!" ); - - VirtualDevice* pVDev; - if( pRefDevice ) - pVDev = new VirtualDevice( *pRefDevice ); - else - pVDev = new VirtualDevice(); - - MapMode aMM( MAP_100TH_MM ); - - SdPage* pPage = mpDoc->GetSdPage(nSdPage, ePageKind); - DBG_ASSERT(pPage, "sd::View::CreatePageVDev(), slide not found!"); - - if( pPage ) - { - Size aPageSize(pPage->GetSize()); - aPageSize.Width() -= pPage->GetLftBorder(); - aPageSize.Width() -= pPage->GetRgtBorder(); - aPageSize.Height() -= pPage->GetUppBorder(); - aPageSize.Height() -= pPage->GetLwrBorder(); - - // use scaling? - if( nWidthPixel ) - { - const Fraction aFrac( (long) nWidthPixel, pVDev->LogicToPixel( aPageSize, aMM ).Width() ); - - aMM.SetScaleX( aFrac ); - aMM.SetScaleY( aFrac ); - } - - pVDev->SetMapMode( aMM ); - if( pVDev->SetOutputSize(aPageSize) ) - { - std::auto_ptr< SdrView > pView( new SdrView(mpDoc, pVDev) ); - pView->SetPageVisible( FALSE ); - pView->SetBordVisible( FALSE ); - pView->SetGridVisible( FALSE ); - pView->SetHlplVisible( FALSE ); - pView->SetGlueVisible( FALSE ); - pView->ShowSdrPage(pPage); // WAITING FOR SJ , Point(-pPage->GetLftBorder(), -pPage->GetUppBorder())); - SdrPageView* pPageView = pView->GetSdrPageView(); - if( pViewShell ) - { - FrameView* pFrameView = pViewShell->GetFrameView(); - if( pFrameView ) - { - pPageView->SetVisibleLayers( pFrameView->GetVisibleLayers() ); - pPageView->SetLockedLayers( pFrameView->GetLockedLayers() ); - pPageView->SetPrintableLayers( pFrameView->GetPrintableLayers() ); - } - } - - // SJ: i40609, the vdev mapmode seems to be dangled after CompleteRedraw, - // so we are pushing here, because the mapmode is used afterwards - pVDev->Push(); - - Point aPoint( 0, 0 ); - Region aRegion (Rectangle( aPoint, aPageSize ) ); - pView->CompleteRedraw(pVDev, aRegion); - pVDev->Pop(); - } - else - { - DBG_ERROR("sd::View::CreatePageVDev(), virt. device creation failed!"); - } - } - return pVDev; -} - - - /************************************************************************* |* |* OLE-Obj am Client connecten |