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
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
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.
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...
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...
Checked with LO-6-0, does not happen. Have to check the cloning of the Draw-Object...
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...?
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)...
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...)
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...
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.
@Armin, should it be cherry-picked to 6-1 ?
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.
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