vcl/source/control/combobox.cxx | 3 +-- vcl/source/control/listbox.cxx | 3 +-- vcl/source/control/spinfld.cxx | 13 +------------ 3 files changed, 3 insertions(+), 16 deletions(-)
New commits: commit 56eb50de018ac806f92e2dd76c698d54edfe6122 Author: Arnaud Versini <arnaud.vers...@libreoffice.org> AuthorDate: Thu Jan 30 16:00:17 2020 +0100 Commit: Noel Grandin <noel.gran...@collabora.co.uk> CommitDate: Fri Jan 31 11:34:10 2020 +0100 tdf#83248 Print using the right color for other components too. PDF and printed documents should be the same. Change-Id: I34f43688f4ec8945c65a414bc0d955dea45dc9b3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87761 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 61d31a6333ef..3fac924ea4d6 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -1156,7 +1156,6 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); vcl::Font aFont = m_pImpl->m_pImplLB->GetMainWindow()->GetDrawPixelFont( pDev ); - OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); pDev->SetMapMode(); @@ -1202,7 +1201,7 @@ void ComboBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, D else nTextStyle |= DrawTextFlags::Left; - if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( nFlags & DrawFlags::Mono ) { pDev->SetTextColor( COL_BLACK ); } diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 8772fb40db8d..9b66451b37ed 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -329,7 +329,6 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); vcl::Font aFont = mpImplLB->GetMainWindow()->GetDrawPixelFont( pDev ); - OutDevType eOutDevType = pDev->GetOutDevType(); pDev->Push(); pDev->SetMapMode(); @@ -356,7 +355,7 @@ void ListBox::Draw( OutputDevice* pDev, const Point& rPos, const Size& rSize, Dr } // Content - if ( ( nFlags & DrawFlags::Mono ) || ( eOutDevType == OUTDEV_PRINTER ) ) + if ( nFlags & DrawFlags::Mono ) { pDev->SetTextColor( COL_BLACK ); } diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index 263af6f90179..20596fef23e9 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -968,22 +968,11 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D Point aPos = pDev->LogicToPixel( rPos ); Size aSize = pDev->LogicToPixel( rSize ); - OutDevType eOutDevType = pDev->GetOutDevType(); AllSettings aOldSettings = pDev->GetSettings(); pDev->Push(); pDev->SetMapMode(); - if (eOutDevType == OUTDEV_PRINTER) - { - StyleSettings aStyleSettings = aOldSettings.GetStyleSettings(); - aStyleSettings.SetFaceColor(COL_LIGHTGRAY); - aStyleSettings.SetButtonTextColor(COL_BLACK); - AllSettings aSettings(aOldSettings); - aSettings.SetStyleSettings(aStyleSettings); - pDev->SetSettings(aSettings); - } - tools::Rectangle aDD, aUp, aDown; ImplCalcButtonAreas(pDev, aSize, aDD, aUp, aDown); aDD.Move(aPos.X(), aPos.Y()); @@ -992,7 +981,7 @@ void SpinField::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, D aDown.Move(aPos.X(), aPos.Y()); Color aButtonTextColor; - if ((nFlags & DrawFlags::Mono) || (eOutDevType == OUTDEV_PRINTER)) + if (nFlags & DrawFlags::Mono) aButtonTextColor = COL_BLACK; else aButtonTextColor = GetSettings().GetStyleSettings().GetButtonTextColor(); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits