Bug 147374 - PNG options dialog after File Export -> Selection doesn't show image dimensions for specific file
Summary: PNG options dialog after File Export -> Selection doesn't show image dimensi...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: bibisectRequest, bisected, regression
: 151635 (view as bug list)
Depends on:
Blocks: File-Export-Dialog
  Show dependency treegraph
 
Reported: 2022-02-11 11:18 UTC by Telesto
Modified: 2022-10-20 06:11 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Example file (26.11 KB, application/vnd.oasis.opendocument.text)
2022-02-11 11:19 UTC, Telesto
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2022-02-11 11:18:57 UTC
Description:
PNG options dialog after File Export -> Selection  doesn't show image dimensions for specific file

Steps to Reproduce:
1. open the attached file
2. Select the image
3. File -> Export -> PNG -> Selection checked -> Press Save
4. PNG dialog opens, but dimensions are empty (meaning 0x0)

Actual Results:
0x0

Expected Results:
Image size as on screen


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 42c5506a9e9ef58efd8193a193464e3b49d481ca
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: nl-NL (nl_NL); UI: en-US
Calc: CL
Comment 1 Telesto 2022-02-11 11:19:10 UTC
Created attachment 178220 [details]
Example file
Comment 2 Telesto 2022-02-11 11:23:46 UTC
Also in 7.0

and in
Version: 6.2.9.0.0+ (x86)
Build ID: 5f01fe15eb2661f1f9ce12d1d99dc2a705b462ee
CPU threads: 4; OS: Windows 6.3; UI render: default; VCL: win; 
Locale: nl-NL (nl_NL); UI-Language: en-US
Calc: CL

and in
Version: 6.0.6.0.0+
Build ID: c30963b8b4bbbe42a24b97aafa161eff9d7ccdd4
CPU threads: 4; OS: Windows 6.3; UI render: default; 
Locale: nl-NL (nl_NL); Calc: CL

still fine with
Version: 5.3.0.0.alpha0+
Build ID: 75239b77139434db9be5e0e7e133e3661c5404b0
CPU Threads: 4; OS Version: Windows 6.29; UI Render: default; 
Locale: nl-NL (nl_NL); Calc: CL
Comment 3 raal 2022-02-12 22:46:49 UTC
Confirm Version: 7.4.0.0.alpha0+ / LibreOffice Community
Build ID: 1c0aa970650ffc7c749e0b5ea655ebb2d137c8ae
CPU threads: 4; OS: Linux 5.11; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded Jumbo
Comment 4 raal 2022-02-12 23:04:57 UTC
This seems to have begun at the below commit.
Adding Cc: to Eike Rathke; Could you possibly take a look at this one?
Thanks
 56837f9df68e6013502d917185cc38517df1efbd is the first bad commit
commit 56837f9df68e6013502d917185cc38517df1efbd
Author: Jenkins Build User <tdf@pollux.tdf>
Date:   Thu Sep 21 22:53:25 2017 +0200

    source 7c8db524248bacc1dfa22df7bad0ad81e31d63ca

https://git.libreoffice.org/core/+/7c8db524248bacc1dfa22df7bad0ad81e31d63ca
  Writer export to PNG,JPG: switch to proper SvFilterOptionsDialog
Comment 5 Eike Rathke 2022-02-14 13:19:22 UTC
Sorry, I don't know. Some Writer wizard should take a look at this.
Before the indicated change another dialog was used.
Note this happens only if the image is selected by clicking (activating) it, not if selecting it by Shift+cursor movement, which doesn't activate the image. It does not happen if the image is activated and then using context menu Save...  It also does not happen if Selection in the export file picker is not checked.

I assume as there is no text selection the resulting size correctly is 0, but Writer should detect that the image is selected/activated instead.

Related seem to be:

commit cb9d99dbb5a7249ca7437bd5c30c6c9374089a16
Author:     Eike Rathke <erack@redhat.com>
AuthorDate: Tue Sep 19 20:30:05 2017 +0200
Commit:     Eike Rathke <erack@redhat.com>
CommitDate: Tue Sep 19 20:31:23 2017 +0200

    DocumentToGraphicRenderer: suppress selection for Writer, it doesn't work
    
    See FIXME comment.

Followed by
commit 5214e841b6ca5362f94d59f940ec3947978c1abe
Author:     Eike Rathke <erack@redhat.com>
AuthorDate: Tue Sep 19 20:43:02 2017 +0200
Commit:     Eike Rathke <erack@redhat.com>
CommitDate: Tue Sep 19 20:43:57 2017 +0200

    Detect Writer doc independent of selection, we'll need that later

Followed by
commit 9d46ee5e17fe70fb6fc0cbdcb85096ca8c7cff20
Author:     Eike Rathke <erack@redhat.com>
AuthorDate: Tue Sep 19 20:48:43 2017 +0200
Commit:     Eike Rathke <erack@redhat.com>
CommitDate: Tue Sep 19 20:49:32 2017 +0200

    Call getCurrentPageWriter() only for Writer

Likely relevant
commit 51c7d52ee1ff26ebf5fe407520514c484e0d7f82
Author:     Eike Rathke <erack@redhat.com>
AuthorDate: Tue Sep 19 21:10:45 2017 +0200
Commit:     Eike Rathke <erack@redhat.com>
CommitDate: Tue Sep 19 21:11:55 2017 +0200

    Writer does not support selection, so don't claim it would


To me it looks like the Selection checkbox in the export dialog simply should not be available when called from Writer, or Writer would need to implement selection export/rendering. As is, the result with a text selection is always one (the active) page, not the selected text.
Comment 6 Mike Kaganski 2022-10-20 06:11:47 UTC
*** Bug 151635 has been marked as a duplicate of this bug. ***