summaryrefslogtreecommitdiff
path: root/vcl/aqua/source/gdi
diff options
context:
space:
mode:
Diffstat (limited to 'vcl/aqua/source/gdi')
-rw-r--r--vcl/aqua/source/gdi/aquaprintaccessoryview.mm3
-rw-r--r--vcl/aqua/source/gdi/salgdi.cxx2
2 files changed, 5 insertions, 0 deletions
diff --git a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
index d19290d8320a..93945570dc96 100644
--- a/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
+++ b/vcl/aqua/source/gdi/aquaprintaccessoryview.mm
@@ -322,6 +322,9 @@ class ControllerProperties
GDIMetaFile aMtf;
PrinterController::PageSize aPageSize( mpController->getFilteredPageFile( i_nPage, aMtf, false ) );
VirtualDevice aDev;
+ if( mpController->getPrinter()->GetPrinterOptions().IsConvertToGreyscales() )
+ aDev.SetDrawMode( aDev.GetDrawMode() | ( DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT |
+ DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT ) );
// see salprn.cxx, currently we pretend to be a 720dpi device on printers
aDev.SetReferenceDevice( 720, 720 );
aDev.EnableOutput( TRUE );
diff --git a/vcl/aqua/source/gdi/salgdi.cxx b/vcl/aqua/source/gdi/salgdi.cxx
index e1daf649f6da..070c0753637d 100644
--- a/vcl/aqua/source/gdi/salgdi.cxx
+++ b/vcl/aqua/source/gdi/salgdi.cxx
@@ -2356,8 +2356,10 @@ void AquaSalGraphics::GetGlyphWidths( const ImplFontData* pFontData, bool bVerti
const ImplFontCharMap* pMap = mpMacFontData->GetImplFontCharMap();
DBG_ASSERT( pMap && pMap->GetCharCount(), "no charmap" );
+ pMap->AddReference(); // TODO: add and use RAII object instead
// get unicode<->glyph encoding
+ // TODO? avoid sft mapping by using the pMap itself
int nCharCount = pMap->GetCharCount();
sal_uInt32 nChar = pMap->GetFirstChar();
for(; --nCharCount >= 0; nChar = pMap->GetNextChar( nChar ) )