Kaydet (Commit) d798ee8f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

loplugin:vclwidgets (best guess)

Change-Id: I682a0970fd667eacda781e799a941a11593ade90
üst cd41fa43
...@@ -84,7 +84,7 @@ private: ...@@ -84,7 +84,7 @@ private:
rtl::Reference< KeyboardFocusListener > m_aFocusListener; rtl::Reference< KeyboardFocusListener > m_aFocusListener;
// the list of Windows that need deeper (focus) investigation // the list of Windows that need deeper (focus) investigation
std::set< vcl::Window *> m_aDocumentWindowList; std::set<VclPtr<vcl::Window>> m_aDocumentWindowList;
// the link object needed for Application::addEventListener // the link object needed for Application::addEventListener
Link m_aWindowEventLink; Link m_aWindowEventLink;
......
...@@ -299,14 +299,14 @@ class ControllerProperties ...@@ -299,14 +299,14 @@ class ControllerProperties
{ {
GDIMetaFile aMtf; GDIMetaFile aMtf;
PrinterController::PageSize aPageSize( mpController->getFilteredPageFile( i_nPage, aMtf, false ) ); PrinterController::PageSize aPageSize( mpController->getFilteredPageFile( i_nPage, aMtf, false ) );
VirtualDevice aDev; auto aDev(VclPtr<VirtualDevice>::Create());
if( mpController->getPrinter()->GetPrinterOptions().IsConvertToGreyscales() ) if( mpController->getPrinter()->GetPrinterOptions().IsConvertToGreyscales() )
aDev.SetDrawMode( aDev.GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | aDev->SetDrawMode( aDev->GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) ); DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
// see salprn.cxx, currently we pretend to be a 720dpi device on printers // see salprn.cxx, currently we pretend to be a 720dpi device on printers
aDev.SetReferenceDevice( 720, 720 ); aDev->SetReferenceDevice( 720, 720 );
aDev.EnableOutput( TRUE ); aDev->EnableOutput( TRUE );
Size aLogicSize( aDev.PixelToLogic( aPixelSize, MapMode( MAP_100TH_MM ) ) ); Size aLogicSize( aDev->PixelToLogic( aPixelSize, MapMode( MAP_100TH_MM ) ) );
double fScaleX = double(aLogicSize.Width())/double(aPageSize.aSize.Width()); double fScaleX = double(aLogicSize.Width())/double(aPageSize.aSize.Width());
double fScaleY = double(aLogicSize.Height())/double(aPageSize.aSize.Height()); double fScaleY = double(aLogicSize.Height())/double(aPageSize.aSize.Height());
double fScale = (fScaleX < fScaleY) ? fScaleX : fScaleY; double fScale = (fScaleX < fScaleY) ? fScaleX : fScaleY;
...@@ -321,13 +321,13 @@ class ControllerProperties ...@@ -321,13 +321,13 @@ class ControllerProperties
aMtf.WindStart(); aMtf.WindStart();
aLogicSize.Width() = long(double(aPageSize.aSize.Width()) * fScale); aLogicSize.Width() = long(double(aPageSize.aSize.Width()) * fScale);
aLogicSize.Height() = long(double(aPageSize.aSize.Height()) * fScale); aLogicSize.Height() = long(double(aPageSize.aSize.Height()) * fScale);
aPixelSize = aDev.LogicToPixel( aLogicSize, MapMode( MAP_100TH_MM ) ); aPixelSize = aDev->LogicToPixel( aLogicSize, MapMode( MAP_100TH_MM ) );
aDev.SetOutputSizePixel( aPixelSize ); aDev->SetOutputSizePixel( aPixelSize );
aMtf.WindStart(); aMtf.WindStart();
aDev.SetMapMode( MapMode( MAP_100TH_MM ) ); aDev->SetMapMode( MapMode( MAP_100TH_MM ) );
aMtf.Play( &aDev, Point( 0, 0 ), aLogicSize ); aMtf.Play( aDev.get(), Point( 0, 0 ), aLogicSize );
aDev.EnableMapMode( FALSE ); aDev->EnableMapMode( FALSE );
Image aImage( aDev.GetBitmap( Point( 0, 0 ), aPixelSize ) ); Image aImage( aDev->GetBitmap( Point( 0, 0 ), aPixelSize ) );
NSImage* pImage = CreateNSImage( aImage ); NSImage* pImage = CreateNSImage( aImage );
[mpPreview setImage: [pImage autorelease]]; [mpPreview setImage: [pImage autorelease]];
} }
......
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