Bug 117707 - Fontwork border line increases from 0,02inch to 0,03 inch when copy/pasting a fontwork between two sessions
Summary: Fontwork border line increases from 0,02inch to 0,03 inch when copy/pasting a...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.1.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:6.2.0 target:6.1.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks: FontWork-WordArt Regressions-AW080
  Show dependency treegraph
 
Reported: 2018-05-19 11:46 UTC by Telesto
Modified: 2019-09-27 05:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-05-19 11:46:23 UTC
Description:
Fontwork border line increases from 0,02inch to 0,03 inch when copy/pasting a fontwork between two sessions

Steps to Reproduce:
1. Open Writer
2. Insert Fontwork Favorite 6
3. Copy it
4. Close LibreOffice (CTRL+Q)
5. Open Writer
6. Paste

Actual Results:  
Fontwork border line increases from 0,02inch to 0,03 inch

Expected Results:
Shouldn't happen


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.1.0.0.alpha1+ (x64)
Build ID: 47dc3115f12ff16dc326b6edd12c46e6a6ef1843
CPU threads: 4; OS: Windows 6.3; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-05-16_23:27:22
Locale: nl-NL (nl_NL); Calc: CL


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:52.0) Gecko/20100101 Firefox/52.0
Comment 1 Dieter 2018-05-19 12:57:31 UTC
Reproducible (increases from 0,5pt to 2,3pt).

Version: 6.1.0.0.alpha1+ (x64)
Build ID: e1a8338876bd161de4e9d9a4b22d4bc5335f7cee
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-05-18_23:55:37
Locale: de-DE (de_DE); Calc: CL

but not in 

Version: 5.4.7.2 (x64)
Build-ID: c838ef25c16710f8838b1faec480ebba495259d0
CPU-Threads: 4; BS: Windows 6.19; UI-Render: Standard; 
Gebietsschema: de-DE (de_DE); Calc: group
Comment 2 Buovjaga 2018-06-06 19:24:11 UTC
Bisected with bibisect-win32-6.1 to https://cgit.freedesktop.org/libreoffice/core/commit/?id=dfefe448c41921f2f1e54d3f69b8b9e89031d055

commit dfefe448c41921f2f1e54d3f69b8b9e89031d055 (patch)
tree 1aace31054b5740e2faffcbc5de66a791be27f7d
parent eba4d5b2b76cefde90cb3d6638c736f435023a45 (diff)
SOSAW080: Added first bunch of basic changes to helpers

Adding Cc: to Armin Le Grand

The line thickness is thicker compared to previous version already upon first insert. Perhaps this is unintentional as well.

In the bibisect repo I always got a crash when pasting this thicker version and marked those as bad.
Comment 3 Armin Le Grand 2018-06-26 14:59:55 UTC
LineWidth continues growing when doing continued copy/pastes. The clipboard content gets saved when LO is quit in ODF format - seems as if units in app (Writer uses Twips, rest of LO 100thmm) lead to problems. If LO is not quit, that save does not happen due to exchanging internally directly.
Checking with simple shape...
Comment 4 Armin Le Grand 2018-06-26 15:03:29 UTC
Same happens with simple draw object. Insert, change line width to 1.0 -> same actions as described. After paste, LineWidth is 1.8 which is a good hint for the diff between Twips and 100thmm. Question is where this happens...
Comment 5 Armin Le Grand 2018-06-26 15:05:53 UTC
Checked with LO-6-0, does not happen. Have to check the cloning of the Draw-Object...
Comment 6 Armin Le Grand 2018-06-26 15:10:00 UTC
Checked that on CTRL-C copy is done using SdrObjCustomShape::CloneSdrObject and that the target SdrModel is a SwDrawModel and uses Twips as units - no conversion needed, none done. The LineWidth is in the Properties, maybe there is a change there...?
Comment 7 Armin Le Grand 2018-06-26 15:32:08 UTC
Pasted to lo-6-0, all correct -> a definitive hint that the conversion happens/is wrong at load time. Debugging with master shows that at paste, source SdrModel is a FmFormModel using 100thmm, while target is a SwDrawModel using 100thmm. Need to check against lo-6-0.
Same in lo-6-0, but in SdrExchangeView::Paste a 'resize' is done for the different units - that's for the Geomatry. A resize is also done in AttributeProperties::SetModel which is called from SdrAttrObj::SetModel and thus from SdrExchangeView::Paste. This is not the case in new code - seems as if a instance that scales the Items is missing/needed (old code uses DefaultProperties::Scale -> sdr/properties/ScaleItemSet)...
Comment 8 Armin Le Grand 2018-07-02 17:38:31 UTC
Thus - I know what goes wrong, just thinking deeply how to do this most elegant and future safe (and not go back to that former hassle of stiching it togehther...)
Comment 9 Armin Le Grand 2018-07-17 12:41:25 UTC
Took a 2nd look at DefaultProperties::DefaultProperties - there is already code to execute a already existing DefaultProperties::::Scale when model is changed. It seems that detection of that mldel change uses the wrong test - like it was in AttributeProperties::AttributeProperties. Debugging if this is the case...
Comment 10 Commit Notification 2018-07-17 15:40:57 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "master":

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

tdf#117707 Correctly Scale ItemSets when pasting from External

It will be available in 6.2.0.

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 11 Xisco Faulí 2018-07-27 10:15:58 UTC
@Armin, should it be cherry-picked to 6-1 ?
Comment 12 Commit Notification 2018-08-01 23:25:23 UTC
Armin Le Grand committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ad79d17acc7487e476832287ddea9ebe3d067c6a&h=libreoffice-6-1

tdf#117707 Correctly Scale ItemSets when pasting from External

It will be available in 6.1.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 13 Dieter 2019-09-27 05:15:00 UTC
VERIFIED with

Version: 6.1.6.3 (x64)
Build ID: 5896ab1714085361c45cf540f76f60673dd96a72
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: de-DE (de_DE); Calc: group threaded