Bug 146139 - UNO API behaves differently depending on SDK version. (7.1.x vs. 7.2.x)
Summary: UNO API behaves differently depending on SDK version. (7.1.x vs. 7.2.x)
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: sdk (show other bugs)
Version:
(earliest affected)
7.2.4.1 release
Hardware: x86-64 (AMD64) Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-12-09 08:30 UTC by Heesu Ban
Modified: 2021-12-29 04:32 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
Java code that call UNO API. (5.10 KB, text/plain)
2021-12-09 08:30 UTC, Heesu Ban
Details
screen shot of document generated with sdk 7.1.x (16.71 KB, image/png)
2021-12-09 08:31 UTC, Heesu Ban
Details
screen shot of document generated with sdk 7.2.x (15.93 KB, image/png)
2021-12-09 08:32 UTC, Heesu Ban
Details
converted document in version 7.1.x (21.00 KB, application/vnd.oasis.opendocument.text)
2021-12-29 04:32 UTC, Heesu Ban
Details
converted document in version 7.2.x (16.24 KB, application/vnd.oasis.opendocument.text)
2021-12-29 04:32 UTC, Heesu Ban
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heesu Ban 2021-12-09 08:30:47 UTC
Created attachment 176825 [details]
Java code that call UNO API.

Description:
The writer documents that generated by using different UNO API SDK with same java code show difference. 
The most difference is that test frame position moved when inserting either PARA_BREAK character.

Actual Results:
With SDK version 7.1.x.x and LO 7.1.x,  Text frame sustains it's position regardless of inserting PARA_BREAK. 
With SDK version 7.2.x.x and LO 7.2.x,  Text frame moves it's position by inserting PARA_BREAK.

Expected Results:
UNO API over different SDK version should have same behavior.

Reproducible: Always

Additional Info:
Java code provided. screen shots are provided too.
Comment 1 Heesu Ban 2021-12-09 08:31:57 UTC
Created attachment 176826 [details]
screen shot of document generated with sdk 7.1.x
Comment 2 Heesu Ban 2021-12-09 08:32:15 UTC
Created attachment 176827 [details]
screen shot of document generated with sdk 7.2.x
Comment 3 Mike Kaganski 2021-12-28 09:22:54 UTC
Yes, that's related to the fix of bug 120469. The obvious change would be to insert the frame to the first paragraph *after* inserting the break.
Comment 4 Mike Kaganski 2021-12-28 09:48:17 UTC
Alternative: make it anchored AT_PAGE, and optionally make it AT_PARAGRAPH after inserting the following paragraphs.
Comment 5 Heesu Ban 2021-12-29 04:30:35 UTC
I tried Mike's advice. It works if it is simple case.  but it didn't work as I anticipate if case is complicated.
for reference, I will attach complicate case document.  that document came from converting from Hwp to Odf  using uno api. 

After some trials, I decided I'd rather append white space to the paragraph right after anchoring object to a paragraph. Appending white space make the paragraph to NOT EMPTY paragraph.

As a conclusion, this change came from Writer, not from UNO api
and it is an intended change.
I close this issue.
Comment 6 Heesu Ban 2021-12-29 04:32:05 UTC
Created attachment 177181 [details]
converted document in version 7.1.x
Comment 7 Heesu Ban 2021-12-29 04:32:26 UTC
Created attachment 177182 [details]
converted document in version 7.2.x