Bug 74627 - Libvisio: visio import - wrong page format keeps printing in portrait
Summary: Libvisio: visio import - wrong page format keeps printing in portrait
Status: RESOLVED FIXED
Alias: None
Product: Document Liberation Project
Classification: Unclassified
Component: General (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
Depends on:
Blocks:
 
Reported: 2014-02-06 17:21 UTC by libreoffice-201402
Modified: 2015-12-15 00:33 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
(german) screenshots of page format and print dialog (301.28 KB, application/x-zip)
2014-02-06 17:21 UTC, libreoffice-201402
Details
samples - blank with few shapes and ddn.vsd (291.25 KB, application/x-zip-compressed)
2014-02-07 19:53 UTC, libreoffice-201402
Details
same as "blank-with-few-shapes.vsd" but in portrait (46.55 KB, application/zip)
2014-06-20 12:31 UTC, libreoffice-201402
Details

Note You need to log in before you can comment on or make changes to this bug.
Description libreoffice-201402 2014-02-06 17:21:03 UTC
Created attachment 93550 [details]
(german) screenshots of page format and print dialog

Problem description: 
wrong page format prevents printing in any other orientation than portrait - no matter if you change orientation in page-format or in the print-dialog.

Steps to reproduce:
1. file / open *.vsd-file (might be only my strange files, 87 pages *)
2a. format / page: change orientation
2b. or file / print / properties / orientation
3. file / print / preview and paper-output will always be in portrait

*) sorry, can't provide a sample *.vsd-file at the moment.

Current behavior:
format / page:
- format: CUSTOM 
- width: 29,7cm
- height: 21,0cm
- orientation: portrait (!)

Expected behavior: autodetect the page format as A4-landscape if it matches the know format (and not as custom-portrait).
format / page:
- format: A4 
- width: 29,7cm
- height: 21,0cm
- orientation: landscape

workaround 1: export to pdf and print from pdf-viewer (tested with adobe11 and sumatrapdf2.4)

workaround 2 / solution: correct the page format to A4 and adjust orientation (see Expected behavior) 


searching for "visio (page|print) (portrait|landscape)" doesn't show up much: https://bugs.freedesktop.org/show_bug.cgi?id=49787
Operating System: All
Version: 4.1.4.2 release
Comment 1 bfoman (inactive) 2014-02-06 19:29:40 UTC
(In reply to comment #0)
> *) sorry, can't provide a sample *.vsd-file at the moment.

Sample file, even minimal reproducible test case could help a lot.
Comment 2 libreoffice-201402 2014-02-07 19:53:22 UTC
Created attachment 93630 [details]
samples - blank with few shapes and ddn.vsd

btw, i haven't mention it: OS is winxp pro sp3 (german), same result on win7 pro sp1

samples:
- "blank-with-few-shapes.vsd" as the names states a newly created visio2010 file (visio calims A4 and landscape)
- "ddn.vsd" is a wiped version of the original file that has additionally a text-style error (text escapes the sheet boundaries - new bug?). 
- "ddn.vsd.png" screenshot of visio2010sp2 and libreoffice4.1.4

best regards
nik
Comment 3 libreoffice-201402 2014-02-07 20:00:49 UTC
> btw, i haven't mention it: OS is winxp pro sp3 (german), same result on win7
> pro sp1

same on debian wheezy + lo3.5.4.2
Comment 4 libreoffice-201402 2014-02-14 19:53:18 UTC
(In reply to comment #3)
> > btw, i haven't mention it: OS is winxp pro sp3 (german), same result on win7
> > pro sp1
> 
> same on debian wheezy + lo3.5.4.2

same results with lo4.2.0 portable (win7)

i just realised that LO doesn't import the sheet names. if the visio sheets are labeled "foo" and "bar" they get labled "sheet 1" and "sheet 2" in LO.
Comment 5 Peter Maunder 2014-04-21 08:55:27 UTC
Same problem with 4.2.3.3 running on Ubuntu 12.04. The pages are displayed as Landscape, but the PAGE SETUP defines the page as PORTRAIT. When I change the Page Setup to Landscape it shows a landscape page but the image is truncated to Portrait width.

Same problem if I save the document as ODG file,

My bypass is to export the page as PDF and print those pages.
Comment 6 Peter Maunder 2014-04-21 10:19:53 UTC
I found that if I when to Page Setup (Right Click > Page > Page Setup) I could correct the settings by 1, Changing the Page to Landscape and then 2. Changing the Width and Height settings to those of landscape. With me it was cm size, paper is A4. 

If I just changed the orientation to Landscape, the dimensions also changed to still be 90 degrees out.
Comment 7 libreoffice-201402 2014-06-20 12:31:07 UTC
Created attachment 101428 [details]
same as "blank-with-few-shapes.vsd" but in portrait

note: "blank-with-few-shapes_portrait.vsd" - just changed orientation from landscape to portrait and saved (with visio2010/german).

1. it doesn't seem to happen when the visio sheet/slide is in portrait mode.

2. refering to https://github.com/LibreOffice/libvisio/blob/master/src/lib/VSDPages.cpp i'd say it's not a libvisio issue as i can't find a orientation (just width & height).

3. i guess something simple like this would fix it:
  orientation = square/unkown/custom?;
  if (width > height) {
    orientation = landscape;
  } else if (width < height) 
    orientation = portrait;
  }

ps: thx to Peter Maunder for pointing to the correct english menus.
pps: confirmation from the developers would be nice :)

btw, see bug #71381 for the lost/omitted sheet/slide names
Comment 8 Julien Nabet 2014-06-21 07:14:28 UTC
On pc Debian x86-64 with master sources updated yesterday, I could reproduce this.

Fridrich/Valek: one for you?
Comment 9 QA Administrators 2015-07-18 17:44:34 UTC
** Please read this message in its entirety before responding **

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present on a currently supported version of LibreOffice (4.4.1 or later): https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)


If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3)

http://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword


Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa

Thank you for your help!

-- The LibreOffice QA Team This NEW Message was generated on: 2015-07-18
Comment 10 Fridrich Strba 2015-12-14 00:41:21 UTC
This libodfgen commit fixes this issue:
http://sourceforge.net/p/libwpd/libodfgen/ci/c885e92b6c7a391e393e9ca6114f486bd1418c9c/
We have to wait for libodfgen release and integration with LO to be available to wider public. But it is fixed and I am marking is as such.