Print images in grayscale when printing using the "Black & White".

Black and white color option found in Impress at
File-->Print-->Libreoffice Impress tab

Before change, images are printed in pure white, and hence
missing from the printouts.

Should resolve bug 62838, and is contributed under the LGPLv3+ / MPL.

Change-Id: I29e291c2f2baf95b5725b862625f6a206e4cb8ba
Reviewed-on: https://gerrit.libreoffice.org/5798
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Brian Fraser
2013-09-03 11:57:24 -07:00
committed by Caolán McNamara
parent 673881b8fb
commit bcbb20b0ef
2 changed files with 5 additions and 5 deletions

View File

@@ -116,11 +116,11 @@ SfxPrinter* DrawDocShell::GetPrinter(sal_Bool bCreate)
sal_uInt16 nQuality = aPrintItem.GetOptionsPrint().GetOutputQuality();
sal_uLong nMode = DRAWMODE_DEFAULT;
// 1 == Grayscale, 2 == Black & White (with grayscale images)
if( nQuality == 1 )
nMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL | DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_GRAYGRADIENT;
else if( nQuality == 2 )
nMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL | DRAWMODE_BLACKTEXT | DRAWMODE_WHITEBITMAP | DRAWMODE_WHITEGRADIENT;
nMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL | DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP | DRAWMODE_WHITEGRADIENT;
mpPrinter->SetDrawMode( nMode );

View File

@@ -1507,15 +1507,15 @@ private:
switch (mpOptions->GetOutputQuality())
{
case 1:
case 1: // Grayscale
aInfo.mnDrawMode = DRAWMODE_GRAYLINE | DRAWMODE_GRAYFILL
| DRAWMODE_GRAYTEXT | DRAWMODE_GRAYBITMAP
| DRAWMODE_GRAYGRADIENT;
break;
case 2:
case 2: // Black & White
aInfo.mnDrawMode = DRAWMODE_BLACKLINE | DRAWMODE_WHITEFILL
| DRAWMODE_BLACKTEXT | DRAWMODE_WHITEBITMAP
| DRAWMODE_BLACKTEXT | DRAWMODE_GRAYBITMAP
| DRAWMODE_WHITEGRADIENT;
break;