Bug 153304 - Changing as-char object properties via UNO API behaves wrong
Summary: Changing as-char object properties via UNO API behaves wrong
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0 target:7.5.1
Keywords:
Depends on:
Blocks: Writer-Images
  Show dependency treegraph
 
Reported: 2023-02-01 11:33 UTC by Mike Kaganski
Modified: 2025-05-15 03:12 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
A sample with two images (27.23 KB, application/vnd.oasis.opendocument.text)
2023-02-01 11:33 UTC, Mike Kaganski
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mike Kaganski 2023-02-01 11:33:00 UTC
Created attachment 185043 [details]
A sample with two images

The attachment has first image anchored as-character to the empty second paragraph, and the second image anchored to paragraph 3, positioned to the right of the paragraph, and wrapped optimally.

Executing these two Basic commands:

  ThisComponent.GraphicObjects(0).setPropertyValue("RelativeWidth", 80)
  ThisComponent.GraphicObjects(0).setPropertyValue("RelativeHeight", 80)

is expected to make the first (as-char) image much larger, and shift the last paragraph down (presumably the second image would not fit to the first page; possibly it would need to move to the second page, together with the last paragraph, which is its anchor point).

Three problems arise:

1. The document does not get "modified" state after the macro.
2. There is no "undo" after the macro.
3. The layout of the document gets broken: the first image moves somewhere to the bottom of the first page (out from its paragraph, despite being anchored as character) - its *empty* frame is partially visible there *at some scroll positions* below the second, to-paragraph image.

It is possible that the last problem is independent from the first two.
Comment 1 Commit Notification 2023-02-02 13:01:24 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/333183d9a72d1e2b7ae65145092efec5e357ad14

tdf#153304: Add undo entries and set modified in SwXFrame::setProperty*

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 2 Commit Notification 2023-02-02 19:44:02 UTC
Mike Kaganski committed a patch related to this issue.
It has been pushed to "libreoffice-7-5":

https://git.libreoffice.org/core/commit/1c4790fbd594974d19da184077e086f70ef1e028

tdf#153304: Add undo entries and set modified in SwXFrame::setProperty*

It will be available in 7.5.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Buovjaga 2023-03-23 08:43:19 UTC
(In reply to Mike Kaganski from comment #0)
> Created attachment 185043 [details]
> A sample with two images
> 
> The attachment has first image anchored as-character to the empty second
> paragraph, and the second image anchored to paragraph 3, positioned to the
> right of the paragraph, and wrapped optimally.
> 
> Executing these two Basic commands:
> 
>   ThisComponent.GraphicObjects(0).setPropertyValue("RelativeWidth", 80)
>   ThisComponent.GraphicObjects(0).setPropertyValue("RelativeHeight", 80)
> 
> is expected to make the first (as-char) image much larger, and shift the
> last paragraph down (presumably the second image would not fit to the first
> page; possibly it would need to move to the second page, together with the
> last paragraph, which is its anchor point).
> 
> Three problems arise:
> 
> 1. The document does not get "modified" state after the macro.
> 2. There is no "undo" after the macro.
> 3. The layout of the document gets broken: the first image moves somewhere
> to the bottom of the first page (out from its paragraph, despite being
> anchored as character) - its *empty* frame is partially visible there *at
> some scroll positions* below the second, to-paragraph image.
> 
> It is possible that the last problem is independent from the first two.

I now only reproduce problem number 3.

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 6dfa9c7c0db91a71f3787226636864161d5367ca
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 23 March 2023
Comment 4 QA Administrators 2025-05-15 03:12:35 UTC
Dear Mike Kaganski,

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 with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
 
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

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) from https://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: https://web.libera.chat/?settings=#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team

MassPing-UntouchedBug