<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div>
<div id="appendonsend"></div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="divRplyFwdMsg" dir="ltr"><font style="font-size:11pt" face="Calibri, sans-serif" color="#000000"><b>De :</b> Tomaž Vajngerl <quikee@gmail.com><br>
<b>Envoyé :</b> mercredi 10 juillet 2019 06:46<br>
<b>À :</b> Adrien Ollier<br>
<b>Cc :</b> libreoffice@lists.freedesktop.org<br>
<b>Objet :</b> Re: tdf#74702 2/2</font>
<div> </div>
</div>
<div>
<div dir="ltr">
<div dir="ltr">Hi,</div>
<div dir="ltr"><br>
<div class="x_gmail_quote">
<div dir="ltr" class="x_gmail_attr">On Wed, Jul 10, 2019 at 5:54 AM Adrien Ollier <<a href="mailto:adr.ollier@hotmail.fr" target="_blank">adr.ollier@hotmail.fr</a>> wrote:<br>
</div>
<blockquote class="x_gmail_quote" style="margin:0px 0px 0px 0.8ex; border-left:1px solid rgb(204,204,204); padding-left:1ex">
<div dir="ltr">
<div></div>
<div>
<div id="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484appendonsend" style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<span style="font-family:Arial,Helvetica,sans-serif; font-size:small; color:rgb(34,34,34)"> </span><br>
</div>
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484BodyFragment">
<font size="2"><span style="font-size:11pt">
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484PlainText">
<span style="font-family:Calibri,Helvetica,sans-serif; font-size:11pt">Also, let's take a concrete example:</span><br>
</div>
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484PlainText">
<span style="font-family:Calibri,Helvetica,sans-serif"><a href="https://opengrok.libreoffice.org/xref/core/canvas/source/vcl/canvashelper.cxx?r=c88f7603" id="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484LPlnk799971" target="_blank"></a><a href="https://opengrok.libreoffice.org/xref/core/vcl/source/control/edit.cxx?r=d00ee2cb" id="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484LPlnk715579" target="_blank">https://opengrok.libreoffice.org/xref/core/vcl/source/control/edit.cxx?r=d00ee2cb</a><br>
</span></div>
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484PlainText">
<span style="font-family:Calibri,Helvetica,sans-serif">void Edit::Draw(OutputDevice* pDev, const Point& rPos, const Size& rSize, DrawFlags nFlags)<br>
</span></div>
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484PlainText">
<span style="font-family:Calibri,Helvetica,sans-serif">see l.1771<br>
</span></div>
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484PlainText">
<span style="font-family:Calibri,Helvetica,sans-serif"><br>
</span></div>
</span></font><font size="2"><span style="font-size:11pt"></span></font>Can you tell me how you would remove the use of GetOutDevType?<br>
<font size="2"><span style="font-size:11pt">
<div class="x_m_7545341053443083808gmail-m_8466748928262796521gmail-m_-4577117991308935484PlainText">
<span style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; line-height:normal"></span></div>
</span></font></div>
</div>
</div>
</blockquote>
<div><br>
</div>
<div>In this case I would remove the condition "eOutDevType == OUTDEV_PRINTER" completely. No idea why it exists but color printers exist today and overriding the text color to black just because the output device is a printer is backwards and wrong. Anything
 that a printer can't handle should be modified in the output device itself and not outside of it. In this case, what would happen if the background of the Edit is set to black? Yup - the text would be drawn in black instead of the color that was set. I tried
 it with inserting a combo box into a writer document with black background and white font color to confirm and surely it printed it with black text. I think you actually found a bug, or a workaround for some assumption made in the past that's not relevant
 today anymore. ;)</div>
<div><br>
</div>
<div>Regards, Tomaž</div>
<div><br>
</div>
<div>--------</div>
<div><br>
</div>
<div>Hi Tomaž,</div>
<div><br>
</div>
<div>Thank you for your answer. That is very interesting.</div>
<div>This bug is very complex, and there are some major design errors, so it is hard to guess the good way for resolving this bug.</div>
<div><br>
</div>
<div>I'll do my best to improve LibreOffice.</div>
<div>Regards,</div>
<div>Adrien Ollier<br>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>