Bug 81276 - FILEOPEN: HTML file loads with incorrect page size
Summary: FILEOPEN: HTML file loads with incorrect page size
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: Other All
: low minor
Assignee: Michael Stahl (CIB)
URL:
Whiteboard: interoperability target:4.4.0 target...
Keywords: regression
Depends on:
Blocks: HTML-Import
  Show dependency treegraph
 
Reported: 2014-07-12 21:32 UTC by Yousuf Philips (jay) (retired)
Modified: 2017-10-22 20:05 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
LibO 4.1 VS 4.2 (95.63 KB, image/png)
2014-07-12 21:32 UTC, Yousuf Philips (jay) (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yousuf Philips (jay) (retired) 2014-07-12 21:32:48 UTC
Created attachment 102682 [details]
LibO 4.1 VS 4.2

While checking bug 80668, I see that with LibO 4.2 the page size is not retained for attachment 102656 [details]. The original can be considered landscape but it imports it as if it was portrait. This doesnt happen in 4.1.6 or 4.3.1.
Comment 1 Yousuf Philips (jay) (retired) 2014-07-12 22:00:32 UTC
Well 4.3.1 size loads correctly, but if i print it to pdf, then the page shrinks to the same size as 4.2.
Comment 2 Joel Madero 2014-07-12 22:43:44 UTC
Unfortunately not bibisectable.

Confirmed:
Ubuntu 14.04
LibreOffice 4.3.0.1 rc

Reproducible Steps:
1. Download the html attachment
2. Open writer
3. File -> Open -> (select the html file that you downloaded)
4. File -> Print -> Options -> check "print to file"
5. Print to file
6. Open the pdf with a pdf viewer

Observed: The document is portrait
Expected: Should be landscape A4

Minor - can slow down professional quality work
Medium - regression so bumped up from "low"
Comment 3 Yousuf Philips (jay) (retired) 2014-07-13 14:43:27 UTC
Dug into the html's css and the page size is defined as:

    @page { size: 29.7cm 21cm;
            margin-left: 0.5cm;
            margin-right: 0.5cm;
            margin-top: 2cm;
            margin-bottom: 0.5cm
    }

But opening Format > Page, the page tab has its orientation set to portrait with width 21.59cm, height 27.94cm, left 2cm, right 1cm, top 1cm, and bottom 1cm.
Comment 4 Commit Notification 2014-07-22 22:18:14 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7dff37c65e08985b80ac79e13f5571819a8e739d

fdo#81276: sw: HTML import: fix inverted test in CSS import



The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 5 Michael Stahl (CIB) 2014-07-22 22:19:20 UTC
since the Format->Page dialog crashes, have to test based on Print
dialog showing portrait or landscape in preview


bibisect range:

0089d3ae9442f26695ae742f5fbdeeaf698861f2..21055f014c2d98f9f57ee81da9c54a4218d45e0d 

regression from:

commit 5089bdb234a93bcb62b597c18b8ab66048246b13
Author:     Caolán McNamara <caolanm@redhat.com>
AuthorDate: Wed Oct 9 09:50:37 2013 +0100

    Related: fdo#38838 remove UniString::EqualsAscii


... inverted condition which probably affects lots of CSS properties.

fixed on master
Comment 6 Michael Stahl (CIB) 2014-07-22 22:31:15 UTC
*** Bug 81277 has been marked as a duplicate of this bug. ***
Comment 7 Commit Notification 2014-07-23 07:59:31 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e934df1c0702c37a6fcee956f75250e8b736c3c5&h=libreoffice-4-3

fdo#81276: sw: HTML import: fix inverted test in CSS import


It will be available in LibreOffice 4.3.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 8 Commit Notification 2014-07-23 08:01:26 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=a6a423148d66a9bf68cdd6475ea792263ab80df8&h=libreoffice-4-2

fdo#81276: sw: HTML import: fix inverted test in CSS import


It will be available in LibreOffice 4.2.7.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 9 Commit Notification 2014-07-23 15:26:42 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-4-2-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=8b674d486ea7f18c02f8a29f4a87529d7daf4491&h=libreoffice-4-2-6

fdo#81276: sw: HTML import: fix inverted test in CSS import


It will be available already in LibreOffice 4.2.6.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.