https://bugs.documentfoundation.org/show_bug.cgi?id=153533

            Bug ID: 153533
           Summary: The test chart2_import fails on HIDPI display
           Product: LibreOffice
           Version: 7.6.0.0 alpha0+ Master
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Chart
          Assignee: [email protected]
          Reporter: [email protected]

Description:
I have 2 displays, one is HIDPI, and another is not.
On the same system, it fails on the HiDPI display, and passes on another.

On HiDPI display:

Chart2ImportTest::testPieChartPlotAreaMarginWithAutomaticLayout finish
ed in: 774ms
lode/dev/core/chart2/qa/extras/chart2import.cxx(2207) : error : Assertion
Test name: Chart2ImportTest::testFixedSizeBarChartVeryLongLabel
double equality assertion failed
- Expected: 4800
- Actual  : 4632
- Delta   : 100

Failures !!!
Run: 85   Failure total: 1   Failures: 1   Errors: 0
...
Error: a unit test failed, please do one of:
make CppunitTest_chart2_import CPPUNITTRACE=TRUE # which is a shortcut
 for the following line
make CppunitTest_chart2_import CPPUNITTRACE="'C:/Program Files/Microso
ft Visual Studio/2022/Community/Common7/IDE/devenv.exe' /debugexe" # f
or interactive debugging in Visual Studio
make CppunitTest_chart2_import CPPUNITTRACE="drmemory -free_max_frames
 20" # for memory checking (install Dr.Memory first, and put it to you
r PATH)

You can limit the execution to just one particular test by:

make CppunitTest_chart2_import CPPUNIT_TEST_NAME="testXYZ" ...above me
ntioned params...

make[1]: *** [lode/dev/core/solenv/gbuild
/CppunitTest.mk:121: lode/dev/core/workdir/CppunitTest/chart2_import.test]
Error 1
make: *** [Makefile:169: CppunitTest_chart2_import] Error 2


Steps to Reproduce:
1. Compile LibreOffice core from the source code
2. Run 'make CppunitTest_chart2_import'

Actual Results:
The test fails on HiDPI display

Expected Results:
The test should pass on all displays including the HiDPI display


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 72959cc2b36749a779b56522f27e290731187043
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: fa-IR (fa_IR); UI: en-US
Calc: threaded

This is the related part of the code in chart2/qa/extras/chart2import.cxx:2202

https://opengrok.libreoffice.org/xref/core/chart2/qa/extras/chart2import.cxx?r=959fbfc0#2202

2202      // The text shape width should be smaller than the chart wall
2203      // The specific numbers unfortunately vary depending on DPI - allow 1
mm
2204      CPPUNIT_ASSERT_DOUBLES_EQUAL(5085, xChartWall->getSize().Width, 100);
2205      CPPUNIT_ASSERT_DOUBLES_EQUAL(7113, xChartWall->getSize().Height,
100);
2206  
2207      CPPUNIT_ASSERT_DOUBLES_EQUAL(4800, xXAxis->getSize().Width, 100);
2208      CPPUNIT_ASSERT_DOUBLES_EQUAL(398, xXAxis->getSize().Height, 100);

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to