Kaydet (Commit) e966e9fa authored tarafından Miklos Vajna's avatar Miklos Vajna

More CppunitTest_sw_uiwriter fixes

1) Guard against nDPI == 0 in ImplLogicToPixel(), it's the caller's
responsibility to ensure that the DPI value is in the expected range.

2) pOut in sdr::overlay::impCheckPossibleOverlayType() is seen as 0.

Change-Id: Iab5ff10aa7953993161dcad2d49d99d80c588e01
üst 8ced97ca
......@@ -392,7 +392,7 @@ void ScPatternAttr::GetFont(
Size aSize( 0, (long) nFontHeight );
MapMode aDestMode = pOutDev->GetMapMode();
MapMode aSrcMode( MAP_TWIP, Point(), aFraction, aFraction );
if (aDestMode.GetMapUnit() == MAP_PIXEL)
if (aDestMode.GetMapUnit() == MAP_PIXEL && pOutDev->GetDPIX() > 0)
aEffSize = pOutDev->LogicToPixel( aSize, aSrcMode );
else
{
......
......@@ -72,9 +72,8 @@ namespace sdr
// not possible when switched off by user
return OVERLAY_INVERT;
}
else
else if (const OutputDevice* pOut = Application::GetDefaultDevice())
{
const OutputDevice *pOut = Application::GetDefaultDevice();
if(pOut->GetSettings().GetStyleSettings().GetHighContrastMode())
{
......
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