sc/source/core/data/patattr.cxx             |    2 +-
 svx/source/sdr/overlay/overlayselection.cxx |    3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

New commits:
commit e966e9fae635afe6237738a83658baf7c86eea93
Author: Miklos Vajna <vmik...@collabora.co.uk>
Date:   Tue Jun 9 17:26:28 2015 +0200

    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

diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx
index bef793e..7afa1d6 100644
--- a/sc/source/core/data/patattr.cxx
+++ b/sc/source/core/data/patattr.cxx
@@ -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
         {
diff --git a/svx/source/sdr/overlay/overlayselection.cxx 
b/svx/source/sdr/overlay/overlayselection.cxx
index f230ff8..3c308af 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())
                     {
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to