sw/qa/extras/ooxmlimport/ooxmlimport.cxx |   11 ++++++-----
 1 file changed, 6 insertions(+), 5 deletions(-)

New commits:
commit d9e3a8d65a056596e1f5490c8813d2543eb95153
Author: Douglas Mencken <dougmenc...@gmail.com>
Date:   Mon Mar 14 09:35:40 2016 -0400

    sw/qa: some light on “horrible heuristics”
    
    Change-Id: Ice6336a0013b049c1796ca5f71171ed7f1bfd113
    Reviewed-on: https://gerrit.libreoffice.org/23243
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    Tested-by: Michael Stahl <mst...@redhat.com>

diff --git a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx 
b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
index 0ac923b..28d75f6 100644
--- a/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
+++ b/sw/qa/extras/ooxmlimport/ooxmlimport.cxx
@@ -1853,11 +1853,12 @@ DECLARE_OOXMLIMPORT_TEST(textboxWpsOnly, 
"textbox-wps-only.docx")
     xFrame.set(getShape(2), uno::UNO_QUERY);
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2173), getProperty<sal_Int32>(xFrame, 
"HoriOrientPosition"));
 #ifdef MACOSX
-    // FIXME: The assert below fails wildly on a Retina display. So use some 
(horrible)
-    // heuristics. Note that for instance on the 5K Retina iMac, [NSScreen 
mainScreen].frame.size is
-    // 2560x1440, not the true display size 5120x2880. But whatever, I don't 
have much time to spend
-    // on this.
-    if ([NSScreen mainScreen].frame.size.width > 2000)
+    // FIXME: The assert below fails wildly on a Retina display
+    NSScreen* nsScreen = [ NSScreen mainScreen ];
+    CGFloat scaleFactor = [ nsScreen userSpaceScaleFactor ]; // for instance 
on the 5K Retina iMac,
+                                                             // [NSScreen 
mainScreen].frame.size is 2560x1440,
+                                                             // while real 
display size is 5120x2880
+    if ( nsScreen.frame.size.width * scaleFactor > 4000 )
         return;
 #endif
     CPPUNIT_ASSERT_EQUAL(sal_Int32(2805), getProperty<sal_Int32>(xFrame, 
"VertOrientPosition"));
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to