From e966e9fae635afe6237738a83658baf7c86eea93 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 9 Jun 2015 17:26:28 +0200 Subject: 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 --- svx/source/sdr/overlay/overlayselection.cxx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'svx/source/sdr') diff --git a/svx/source/sdr/overlay/overlayselection.cxx b/svx/source/sdr/overlay/overlayselection.cxx index f230ff88c051..3c308af8ea09 100644 --- a/svx/source/sdr/overlay/overlayselection.cxx +++ b/svx/source/sdr/overlay/overlayselection.cxx @@ -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()) { -- cgit